[
  {
    "path": ".eslintrc.js",
    "content": "module.exports = {\n  env: {\n    browser: true,\n    commonjs: true,\n    es2021: true,\n    node: true,\n  },\n  extends: [\"plugin:vue/essential\", \"prettier\", \"plugin:prettier/recommended\"],\n  parserOptions: {\n    ecmaVersion: \"latest\",\n  },\n  plugins: [\"vue\"],\n  rules: {\n    \"prettier/prettier\": \"warn\",\n  },\n};\n"
  },
  {
    "path": ".github/workflows/release.yml",
    "content": "name: Build App\n\non:\n  workflow_dispatch:\n    inputs:\n      version:\n        description: \"Version label (e.g. v1.2.3)\"\n        required: false\n  release:\n    types: [published]\n\njobs:\n  release:\n    runs-on: ${{ matrix.os }}\n    strategy:\n      matrix:\n        os: [macos-latest, windows-latest]\n\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v4\n\n      - name: Set up Node.js\n        uses: actions/setup-node@v4\n        with:\n          node-version: \"22\"\n\n      - name: Install dependencies\n        run: yarn install\n\n      - name: Build the app\n        run: |\n          if [[ \"${{ runner.os }}\" == \"macOS\" ]]; then\n            yarn build:macos\n          elif [[ \"${{ runner.os }}\" == \"Windows\" ]]; then\n            yarn build:windows\n          fi\n        shell: bash\n\n      - name: Determine version\n        run: |\n          echo \"VERSION=${{ github.event.release.tag_name != '' && github.event.release.tag_name || github.event.inputs.version != '' && github.event.inputs.version || 'v-dev' }}\" >> $GITHUB_ENV\n        shell: bash\n\n      - name: Package build output for macOS\n        if: runner.os == 'macOS'\n        run: |\n          mkdir release\n          cp build/*.dmg release/ 2>/dev/null || true\n          cd release && zip -r \"HimeDisplay-macos-${VERSION}.zip\" . && cd ..\n        shell: bash\n\n      - name: Package build output for Windows\n        if: runner.os == 'Windows'\n        run: |\n          mkdir release\n          copy build\\*.exe release\\ 2>$null\n          Compress-Archive -Path release\\* -DestinationPath (\"release\\HimeDisplay-windows-$env:VERSION.zip\")\n        shell: pwsh\n\n      - name: Upload build artifacts\n        uses: actions/upload-artifact@v4\n        with:\n          name: HimeDisplay-${{ runner.os }}-${{ env.VERSION }}\n          path: |\n            build/*.dmg\n            build/*.exe\n\n      - name: Upload to GitHub Release (only on release)\n        if: github.event_name == 'release'\n        uses: softprops/action-gh-release@v2\n        with:\n          files: release/HimeDisplay-${{ runner.os }}-${{ env.VERSION }}.zip\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n"
  },
  {
    "path": ".gitignore",
    "content": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\nnode_modules\n/npm-debug.log*\nyarn-error.log\n\n# misc\n.DS_Store\n\n# local\n*.local\n\n# dist\ndist\nbuild\n\n.idea\n\ngomibako\n/info\n.yarnrc\n\nauto-imports.d.ts\ncomponents.d.ts"
  },
  {
    "path": "LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<https://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<https://www.gnu.org/licenses/why-not-lgpl.html>.\n"
  },
  {
    "path": "README-CN.md",
    "content": "# Hime Display\n\n<p align=\"center\">\n<img width=\"200px\" src=\"./images/icon.png\">\n</p>\n\n> illustrated by [MakoSaikou](https://www.pixiv.net/users/72669923)\n\n[English](./README.md) | 简体中文 | [日本語](./README-JP.md)\n\n[下载](https://hime.xdrv.cn/download/) | [文档](https://hime.xdrv.cn/) | [介绍视频](https://www.bilibili.com/video/BV1Me411u7pF)\n\n此应用旨在打造一个开源、跨平台的通用桌面模型展示器。\n\n## 预览\n\n### 控制面板\n\n<p align=\"center\">\n<img width=\"450\" src=\"./images/control-panel-cn.png\">\n</p>\n\n### 展示器\n\n什么没看见？那就对了，展示器其实就是一个透明窗口。\n\n## 特性\n\n1. 多种模型类型支持：支持载入 Live2D、MMD、VRoid、Spine 四种模型。\n2. 动作捕捉：借助于 Google 的 MediaPipe 对 Live2D、MMD、VRoid 提供了动捕支持。\n3. 跨平台：同时对 macOS 与 Windows 提供了支持。\n4. 多语言支持： 对简体中文、日语、英语提供了支持。\n5. 全面的模型控制：可对模型的进行各种操作，包括骨骼变换，变形，动画播放。\n6. 动画转译：MMD 模型可以直接加载来源于 Mixamo 的动画（VRoid 计划之后支持）。\n\n## 基础载入\n\n### 模型库数据库设计\n\n以一个或多个文件路径作为数据源，根据一些模型文件特征，递归检测该路径下的模型，添加至数据库后载入。\n\n### 加载模型的方法\n\n1. 在控制面板中点击`来源`；\n2. 然后`添加数据源`，选择模型及动作文件，音频所在的目录；\n3. 点击数据源操作中的刷新按钮；\n4. 点击控制面板菜单中的`模型`，在模型数据库中选择希望载入的模型，选中的模型将会高亮显示；\n5. 然后点击数据库下方的`载入选中模型`。\n\n### 注意事项\n\n1. 不同类型的模型以及音频与动作文件均可放置到同一数据源下。\n2. 为提高效率和增强通用性，对于大多数文件类型，该检测过程没有读取文件的内容，主要通过文件扩展名判断，因此即使文件存在问题或者不支持，也有可能被载入到数据库中。\n3. 对于模型文件，由于一些类型的模型的文件名称通常不是模型名称，将以模型文件的上级目录名作为模型名称，因此在同一目录下放置多个模型可能命名混乱。\n4. 对于音频与动作文件，文件名通常与内容直接相关，因此将直接采用文件名作为名称，同时放到同一个目录下不会造成命名混乱。\n5. 添加数据源后可以点击编辑检索类型，默认检测全部类型。\n6. 执行刷新操作后，将自动更新统计信息，模型数据库，音频数据库，动作数据库（后两者在 3D 模型的动画控制页面中显示）。\n\n## 模型机能对比\n\n|          |        MMD        |        VRoid        |           Live2D            |             Spine             |\n| :------: | :---------------: | :-----------------: | :-------------------------: | :---------------------------: |\n| 模型信息 |        ✅         |         ✅          |             ✅              |              ✅               |\n| 对象变换 |        ✅         |         ✅          |             ✅              |              ✅               |\n| 动画播放 |        ✅         |  ❌<br/>（待开发）  |             ✅              |              ✅               |\n| 物理模拟 | ✅<br/>（仅动画） | ✅<br/>（所有状态） | ❌<br/>（好像有，还没深究） | ❌<br/>（Spine 跟我扯这个？） |\n| 参数控制 |       变形        |        变形         |     Parameter<br/>Part      |      ❌<br/>（人懒没做）      |\n| 面部捕捉 |        ✅         |         ✅          |             ✅              |     ❌<br/>（无参数规范）     |\n| 全身捕捉 |        ✅         |         ✅          |    ❌<br/>（无参数规范）    |     ❌<br/>（无参数规范）     |\n\n## 主要开发技术\n\n本应用使用前端技术，基于[Electron](https://www.electronjs.org/)开发，构建工具使用了[Vite](https://vitejs.dev/)。\n\n数据库存储采用了[lowdb](https://github.com/typicode/lowdb)。\n\n多语言的支持采用了[i18next](https://www.i18next.com/)。\n\n控制面板采用[Vue](https://vuejs.org/)框架开发，使用了[Element Plus](https://element-plus.org/)组件库。\n\n2D 模型使用[Pixi.js](https://pixijs.com/)作为渲染引擎，3D 模型使用[Three.js](https://threejs.org/)作为渲染引擎。\n\n动作捕捉使用了 Google 的[MediaPipe](https://mediapipe.dev/)进行识别，并使用[Kalidokit](https://github.com/yeemachine/kalidokit)进行捕捉数据解析。\n\n## 开发\n\n```bash\n# 安装依赖\nyarn\n# 启动\nyarn start\n# 构建（具体build版本可以在根目录下的build.config.js文件中配置）\nyarn build\n```\n\n## Special Thanks\n\n这是我的初次尝试开发一个完整的应用，各方面经验都十分欠缺。\n\n本项目的文件结构参考了同样使用 Electron 开发的下载工具[Motrix](https://motrix.app/)，在此表示感谢。\n\n感谢 [笺染菲素](https://space.bilibili.com/33572615) 测试应用并提供了不少建议。\n\n感谢 [HuiDesktop](https://github.com/HuiDesktop/HuiDesktop) 的作者 [pure01fx](https://github.com/pure01fx) 提供的 Spine 方面的一些技术支持。\n\n感谢 [greenjerry](https://github.com/greenjerry) 对我在物质，精神层面，以及软件和硬件上的大力支持。\n"
  },
  {
    "path": "README-JP.md",
    "content": "# Hime Display\n\n<p align=\"center\">\n<img width=\"200px\" src=\"./images/icon.png\">\n</p>\n\n> illustrated by [MakoSaikou](https://www.pixiv.net/users/72669923)\n\n[English](./README.md) | [简体中文](./README-CN.md) | 日本語\n\n[ダウンロード](https://hime.xdrv.cn/download/) | [ドキュメント（中国語のみ）](https://hime.xdrv.cn/) | [紹介動画](https://www.bilibili.com/video/BV1Me411u7pF)\n\nこのアプリケーションは、オープンソースで、クロスプラットフォームのユニバーサルなデスクトップモデルディスプレイヤーを狙っています。\n\n## プレビュー\n\n### コントロールパネル\n\n<p align=\"center\">\n<img width=\"450\" src=\"./images/control-panel-jp.png\">\n</p>\n\n### ディスプレイウインドウ\n\n何も見えない？そう、ディスプレイは実際には透明なウィンドウです。\n\n## 特徴\n\n1. 多種類のモデルタイプをサポート：Live2D、MMD、VRoid、Spine を支持します。\n2. モーションキャプチャ：Google の MediaPipe を使用して、Live2D、MMD、VRoid にモーションキャプチャを提供します。\n3. クロスプラットフォーム：macOS と Windows の両方に対応しています。\n4. 多言語対応：簡体中国語、日本語、英語に対応しています。\n5. 全面的なモデルコントロール：モデルの各種操作を行うことができます。ボーン変形、モーフ、アニメーション再生など。\n6. アニメーショントランスレート：MMD モデルは、Mixamo からのアニメーション（VRoid は後にサポートする予定）を直接ロードできます。\n\n## 基本の使い方\n\n### モデルデータベースのデザイン\n\n1 つ以上のファイルパスをデータソースとして、いくつかのモデルファイルの特徴に基づいて、そのパス以下のモデルを再帰的に検出し、データベースに追加してから読み込みます。\n\n### モデルをロードするの方法\n\n1. コントロールパネルの`ソース`をクリックします。\n2. そして`データソースを追加`をクリックし、モデルとアニメーションファイル、音声ファイルがあるディレクトリを選択します。\n3. データソース操作の更新ボタンをクリックします。\n4. コントロールパネルのメニューの`モデル`をクリックし、ロードしたいモデルを選択します。選択したモデルはハイライトで表示されます。\n5. そして、データベースの下の`選択したモデルをロード`をクリックします。\n\n### 注意事項\n\n1.  異なるタイプのモデルと音声とアニメーションファイルを同じデータソースに配置できます。\n2.  効率化と汎用性のため、ほとんどのファイルタイプは、検索プロセスでファイルの内容を読み取らず、主にファイルの拡張子で判断されます。サポートされていないファイルが存在する場合でも、データベースにロードされる可能性があります。\n3.  モデルファイルについては、一部のモデルのファイル名は通常モデル名ではないため、モデルファイルの上位ディレクトリの名前がモデル名として使用されるから、複数のモデルを同じディレクトリに配置すれば、混乱を招く可能性があります。\n4.  オーディオファイルとアクションファイルの場合、通常はファイル名はコンテンツに直接関係しているから、ファイル名がそのまま名前として使用され、同じディレクトリに配置しても混乱は起こりません。\n5.  データソースを追加した後、検索タイプの編集をクリックするとロードされたいモデルタイプを配置できます。デフォルトでは全てびタイプが検索されます。\n6.  更新操作を実行した後、統計インフォメーション、モデルデータベース、オーディオデータベース、モーションデータベースが自動的に更新されます (後者の 2 つは 3D モデルのアニメーションコントロールページに表示されます)。\n\n## モデル機能の対比\n\n|                      |             MMD              |         VRoid          |            Live2D            |            Spine             |\n| :------------------: | :--------------------------: | :--------------------: | :--------------------------: | :--------------------------: |\n|      モデル情報      |              ✅              |           ✅           |              ✅              |              ✅              |\n|   オブジェクト変換   |              ✅              |           ✅           |              ✅              |              ✅              |\n|  アニメーション再生  |              ✅              |   ❌<br/> (開発予定)   |              ✅              |              ✅              |\n| 物理シミュレーション | ✅<br/> (アニメーションのみ) | ✅<br/> (すべての状態) | ❌<br/> (まだ調べていません) |   ❌<br/> (スパインは無理)   |\n|    パラメータ制御    |            モーフ            |         モーフ         |      Parameter<br/>Part      |              ❌              |\n|     顔キャプチャ     |              ✅              |           ✅           |              ✅              | ❌<br/> (パラメータ基準なし) |\n|    全身キャプチャ    |              ✅              |           ✅           | ❌<br/> (パラメータ基準なし) | ❌<br/> (パラメータ基準なし) |\n\n## 主な開発技術\n\nこのアプリケーションは、フロントエンド技術を使用し、[Electron](https://www.electronjs.org/) に使って開発されており、構築ツールは [Vite](https://vitejs.dev/) を使用しています。\n\nデータベースは [lowdb](https://github.com/typicode/lowdb) を使用しています。\n\n多言語対応は[i18next](https://www.i18next.com/) を採用。\n\nコントロールパネルは [Vue](https://vuejs.org/) フレームワークで開発され、[Element Plus](https://element-plus.org/) コンポーネントライブラリを使用します。\n\n2D モデルはレンダリングエンジンに[Pixi.js](https://pixijs.com/)を、3D モデルはレンダリングエンジンに[Three.js](https://threejs.org/)を使用しています。\n\nモーション キャプチャは、Google の [MediaPipe](https://mediapipe.dev/) を使用し、キャプチャデータの分析は [Kalidokit](https://github.com/yeemachine/kalidokit) を使用します。\n\n## 開発\n\n```bash\n# デペンデンシーのインストール\nyarn\n# 起動\nyarn start\n# ビルド（具体的なビルドタイプは、ルートディレクトリのbuild.config.jsファイルで配置できます）\nyarn build\n```\n\n## スペシャルサンクス\n\n私にとって、健全なアプリケーションを開発のは初めてで、まだ右も左もわかりません。\n\nこのプロジェクトのファイル構造は、同じく Electron によって開発されたダウンロードツール [Motrix](https://motrix.app/) を参照しています。ありがとうございます。\n\nアプリケーションをテストし、多くの提案を提供してくれた [笺染菲素](https://space.bilibili.com/33572615) に感謝します。\n\n[HuiDesktop](https://github.com/HuiDesktop/HuiDesktop) の作成者 [pure01fx](https://github.com/pure01fx) による Spine のテクニカルサポートに感謝します。\n\n[greenjerry](https://github.com/greenjerry) には、物質的、精神的、そしてソフトウェア、およびハードウェアで私をサポートしていただき、本当にありがとうございます。\n"
  },
  {
    "path": "README.md",
    "content": "# Hime Display\n\n<p align=\"center\">\n<img width=\"200px\" src=\"./images/icon.png\">\n</p>\n\n> illustrated by [MakoSaikou](https://www.pixiv.net/users/72669923)\n\nEnglish | [简体中文](./README-CN.md) | [日本語](./README-JP.md)\n\n[Download](https://hime.xdrv.cn/download/) | [Docs(Chinese Only)](https://hime.xdrv.cn/) | [Introduction Video](https://www.bilibili.com/video/BV1Me411u7pF)\n\nHime Display aims to create an open-source, cross-platform, universal desktop model presenter.\n\n## Preview\n\n### Control Panel\n\n<p align=\"center\">\n<img width=\"450\" src=\"./images/control-panel-en.png\">\n</p>\n\n### Display Window\n\nCan't see anything? that's right, the display window is just a transparent window.\n\n## Features\n\n1. Multiple Model Type Support: Supports loading Live2D, MMD, VRoid, Spine models.\n2. Motion Capture: Provides motion capture support for Live2D, MMD, VRoid with the help of Google's MediaPipe.\n3. Cross Platform: Supports Windows and macOS.\n4. Multilingual support: Supports English, Simplified Chinese, and Japanese.\n5. Full Model Control: Various operations can be performed on the model, including bone transformation, deformation, and animation playback.\n6. Animation transition: MMD model can load animations from Mixamo directly (Plan to support VRoid).\n\n## Basic Usage\n\n### Design of model database\n\nThe application uses one or more paths as the model data source. It can recursively detect the model under these paths according to some model file features and add them to the database.\n\n### Method to load models\n\n1. Click `Source` in left row of the control panel.\n2. `Add Data Source`, select the directory of models, motions, and audios.\n3. Click `Refresh` in the source path operations.\n4. Click `Model` in left row, select the model you want to load in the model database, the selected one will be highlighted.\n5. Last step, Click `Load Selected Model` under the database.\n\n### Attentions\n\n1. Different types of models, motions, audios can be put in the same data source.\n2. In order to improve efficiency and enhance generality, for most file types, the detection process does not read the content of the file, and mainly judges by the file extension. So even if the file has problems or is not supported, it may be loaded into the database.\n3. For some types of models, their file names are usually not the model names, and the names of the upper-level directory of the model files will be used as the model names, so placing multiple model files in the same directory may be confusing.\n4. For motions and audios, their file names are usually related to the contents, so the file names will be used as the names, and placeing them into one directory will not cause naming confusion.\n5. After adding data source, you can click `Edit` and decide the search type. All types will be detected by default.\n6. When the search is complete, it will automatically update the statistic info, model database, motion database, and audio database (the latter two are displayed in the animation control page of the selected and displayed 3D model)\n\n## Implemented Features Comparison\n\n|                    |           MMD           |        VRoid        |          Live2D           |           Spine           |\n| :----------------: | :---------------------: | :-----------------: | :-----------------------: | :-----------------------: |\n| Model Description  |           ✅            |         ✅          |            ✅             |            ✅             |\n|  Object Transform  |           ✅            |         ✅          |            ✅             |            ✅             |\n| Animation Control  |           ✅            | ❌<br/>(Developing) |            ✅             |            ✅             |\n| Physics Simulation | ✅<br/>(Animation only) | ✅<br/>(All status) |   ❌<br/>(Considering)    |   ❌<br/>(Not support)    |\n| Parameter Control  |          Morph          |        Morph        |    Parameter<br/>Part     |       ❌<br/>(TODO)       |\n|    Face Capture    |           ✅            |         ✅          |            ✅             | ❌<br/>(No specification) |\n|  Holistic Capture  |           ✅            |         ✅          | ❌<br/>(No specification) | ❌<br/>(No specification) |\n\n## Main Techniques\n\nThis application mainly uses Front-end technology, based on [Electron](https://www.electronjs.org/), mainly uses [Vite](https://vitejs.dev/) as build tools.\n\nUses [lowdb](https://github.com/typicode/lowdb) as the database.\n\nMultilingual support adopted [i18next](https://www.i18next.com/).\n\nThe control panel adopted [Vue](https://vuejs.org/) framework and [Element Plus](https://element-plus.org/) component library.\n\nUses [Pixi.js](https://pixijs.com/) as the rendering engine of 2D models, and the 3D models use [Three.js](https://threejs.org/).\n\nMotion capture adopts Google's [MediaPipe](https://mediapipe.dev/), and adopts [Kalidokit](https://github.com/yeemachine/kalidokit) to analyse captured data.\n\n## Develop\n\n```bash\n# Install dependencies\nyarn\n# start\nyarn start\n# build (The specific build version can be configured in the `build.config.js` file in the root directory)\nyarn build\n```\n\n## Special Thanks\n\nThis is my first attempt to develop a full application, maybe there are some deficiencies.\n\nThe file structure of this application refers to a download tool [Motrix](https://motrix.app/) which is also developed by Electron.\n\nThanks to [笺染菲素](https://space.bilibili.com/33572615) for testing the application and providing many suggestions.\n\nThanks to [pure01fx](https://github.com/pure01fx), the author of [HuiDesktop](https://github.com/HuiDesktop/HuiDesktop) for some technical support on Spine.\n\nThanks to [greenjerry](https://github.com/greenjerry) for supporting me in material, spiritual, software and hardware.\n"
  },
  {
    "path": "build.config.js",
    "content": "/**\n * @type {import('electron-builder').CliOptions}\n * {@link https://www.electron.build/configuration/configuration}\n */\nconst options = {\n  // targets: builder.createTargets([\n  //   builder.Platform.WINDOWS,\n  //   builder.Platform.MAC,\n  // ]),\n  // config: {\n  productName: \"Hime Display\",\n  directories: {\n    output: \"build\",\n  },\n  // https://github.com/electron-userland/electron-builder/issues/5463\n  // 太脑瘫了，electron-builder在使用GitHub Actions时必须手动指定不自动执行publish过程\n  publish: null,\n  files: [\"dist/renderer/**/*\", \"dist/main/**/*\"],\n  // asar: false,\n  dmg: {\n    background: \"public/background/background.tiff\",\n    window: {\n      width: 540,\n      height: 380,\n    },\n    contents: [\n      {\n        x: 410,\n        y: 230,\n        type: \"link\",\n        path: \"/Applications\",\n      },\n      {\n        x: 130,\n        y: 230,\n        type: \"file\",\n      },\n    ],\n  },\n  mac: {\n    icon: \"public/icons/icon.png\",\n    extendInfo: {\n      // 现在的macOS应用想要访问摄像机等权限必须在此声明，i18n我是没本事做到这儿来了，因此就用英文了\n      NSCameraUsageDescription:\n        \"Face mesh and holistic capturing need to access to your camera\",\n      \"com.apple.security.device.camera\": true,\n    },\n  },\n  nsis: {\n    oneClick: false,\n    allowElevation: true,\n    allowToChangeInstallationDirectory: true,\n    createDesktopShortcut: true,\n    createStartMenuShortcut: false,\n  },\n  win: {\n    icon: \"public/icons/icon.png\",\n    target: [\n      {\n        target: \"nsis\",\n        arch: [\"x64\"],\n      },\n    ],\n  },\n  // linux: {\n  //   icon: \"public/icons\",\n  // },\n  // },\n};\n\nmodule.exports = options;\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"hime-display\",\n  \"version\": \"1.2.0\",\n  \"description\": \"A universal desktop model displayer for Live2D, Spine, MMD and VRoid.\",\n  \"main\": \"./dist/main/main.cjs.js\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/TSKI433/hime-display\"\n  },\n  \"author\": \"TSKI433\",\n  \"license\": \"GPL-3.0\",\n  \"private\": true,\n  \"workspaces\": {\n    \"packages\": [\n      \"src/*\"\n    ]\n  },\n  \"scripts\": {\n    \"start\": \"node ./scripts/dev-runner\",\n    \"build\": \"node ./scripts/build\",\n    \"build:macos\": \"node ./scripts/build --macos\",\n    \"build:windows\": \"node ./scripts/build --windows\"\n  },\n  \"dependencies\": {\n    \"electron-is\": \"^3.0.0\",\n    \"electron-log\": \"^5.3.4\",\n    \"lowdb\": \"1.0.0\"\n  },\n  \"devDependencies\": {\n    \"chalk\": \"^5.4.1\",\n    \"electron\": \"^35.2.1\",\n    \"electron-builder\": \"^26.0.12\",\n    \"eslint\": \"^9.25.1\",\n    \"eslint-config-prettier\": \"^10.1.2\",\n    \"eslint-plugin-prettier\": \"^5.2.6\",\n    \"eslint-plugin-vue\": \"^10.0.0\",\n    \"listr\": \"^0.14.3\",\n    \"vite\": \"^6.3.3\"\n  }\n}\n"
  },
  {
    "path": "scripts/build.js",
    "content": "const path = require(\"path\");\nconst chalk = require(\"chalk\");\nconst ListR = require(\"listr\");\nconst builder = require(\"electron-builder\");\nconst { build: viteBuild, createLogger } = require(\"vite\");\n\nconst builderConfig = require(\"../build.config\");\nconst {\n  MAIN_ROOT,\n  MAIN_CONTROL_PRELOAD_ROOT,\n  MAIN_DISPLAY_PRELOAD_ROOT,\n  RENDERER_ROOT,\n} = require(\"./constants\");\n\nconst args = process.argv.slice(2);\nlet targets = null;\nif (args.includes(\"--macos\")) {\n  targets = builder.Platform.MAC.createTarget();\n} else if (args.includes(\"--windows\")) {\n  targets = builder.Platform.WINDOWS.createTarget();\n} else {\n  targets = builder.createTargets([\n    builder.Platform.WINDOWS,\n    builder.Platform.MAC,\n  ]);\n}\n\nfunction build() {\n  const tasks = new ListR([\n    {\n      title: \"building renderer process\",\n      task: buildRenderer,\n    },\n    {\n      title: \"building main process\",\n      task: buildMainProcess(MAIN_ROOT),\n    },\n    {\n      title: \"building main control preload process\",\n      task: buildMainProcess(MAIN_CONTROL_PRELOAD_ROOT),\n    },\n    {\n      title: \"building main display preload process\",\n      task: buildMainProcess(MAIN_DISPLAY_PRELOAD_ROOT),\n    },\n  ]);\n\n  tasks\n    .run()\n    .then(() => {\n      builder.build({\n        targets,\n        config: builderConfig,\n      });\n    })\n    .catch((error) => {\n      createLogger().error(\n        chalk.red(`error during build application:\\n${error.stack}`)\n      );\n      process.exit(1);\n    });\n}\n\nasync function buildRenderer() {\n  try {\n    const rendererOutput = await viteBuild({\n      root: RENDERER_ROOT,\n      base: \"./\",\n      build: {\n        outDir: path.resolve(__dirname, \"../dist/renderer\"),\n      },\n    });\n    return rendererOutput;\n  } catch (error) {\n    createLogger().error(\n      chalk.red(`error during build renderer:\\n${error.stack}`)\n    );\n    process.exit(1);\n  }\n}\n\nfunction buildMainProcess(root) {\n  return async function () {\n    try {\n      const buildOutput = await viteBuild({\n        root,\n        build: {\n          outDir: path.resolve(__dirname, \"../dist/main\"),\n        },\n      });\n      return buildOutput;\n    } catch (error) {\n      createLogger().error(\n        chalk.red(`error during build main process:\\n${error.stack}`)\n      );\n      process.exit(1);\n    }\n  };\n}\n\nbuild();\n"
  },
  {
    "path": "scripts/constants.js",
    "content": "const path = require(\"path\");\n\nmodule.exports = {\n  MAIN_ROOT: path.resolve(__dirname, \"../src/main\"),\n  // MAIN_PRELOAD_ROOT: path.resolve(__dirname, \"../src/preload\"),\n  MAIN_CONTROL_PRELOAD_ROOT: path.resolve(__dirname, \"../src/preload/control\"),\n  MAIN_DISPLAY_PRELOAD_ROOT: path.resolve(__dirname, \"../src/preload/display\"),\n  RENDERER_ROOT: path.resolve(__dirname, \"../src/renderer\"),\n};\n"
  },
  {
    "path": "scripts/dev-runner.js",
    "content": "const path = require(\"path\");\nconst chalk = require(\"chalk\");\nconst electron = require(\"electron\");\nconst { spawn } = require(\"child_process\");\nconst { createServer, createLogger, build } = require(\"vite\");\nconst {\n  MAIN_ROOT,\n  MAIN_CONTROL_PRELOAD_ROOT,\n  MAIN_DISPLAY_PRELOAD_ROOT,\n  RENDERER_ROOT,\n} = require(\"./constants\");\n\nlet manualRestart;\nlet electronProcess;\n\nasync function startRenderer() {\n  try {\n    const viteServer = await createServer({\n      root: RENDERER_ROOT,\n    });\n    await viteServer.listen();\n    return viteServer;\n  } catch (error) {\n    createLogger().error(\n      chalk.red(`error when starting dev server:\\n${error.stack}`)\n    );\n  }\n}\n\nasync function watchMainProcess(root) {\n  try {\n    const rollupWatcher = await build({\n      root,\n      mode: \"development\",\n      build: {\n        emptyOutDir: false,\n        outDir: path.resolve(__dirname, \"../dist/dev\"),\n        watch: true,\n      },\n    });\n    return await new Promise((resolve, reject) => {\n      rollupWatcher.on(\"event\", (event) => {\n        if (event.code === \"BUNDLE_END\") {\n          resolve(rollupWatcher);\n        }\n      });\n    });\n  } catch (error) {\n    createLogger().error(\n      chalk.red(`error during watch main process:\\n${error.stack}`)\n    );\n    process.exit(1);\n  }\n}\n\nfunction startElectron(RENDERER_URL) {\n  let args = [\n    \"--inspect=5858\",\n    path.join(__dirname, \"../dist/dev/main.cjs.js\"),\n  ];\n\n  if (process.env.npm_execpath.endsWith(\"yarn.js\")) {\n    args = args.concat(process.argv.slice(3));\n  } else if (process.env.npm_execpath.endsWith(\"npm-cli.js\")) {\n    args = args.concat(process.argv.slice(2));\n  }\n\n  electronProcess = spawn(electron, args, {\n    env: {\n      ...process.env,\n      RENDERER_URL,\n    },\n    stdio: \"inherit\",\n  });\n\n  electronProcess.on(\"close\", () => {\n    if (!manualRestart) process.exit();\n  });\n}\n\nasync function start() {\n  const rendererServer = await startRenderer();\n  const { port = 3000, https = false } = rendererServer.config.server;\n  const RENDERER_URL = `http${https ? \"s\" : \"\"}://localhost:${port}`;\n\n  const mainWatcher = await watchMainProcess(MAIN_ROOT);\n  const mainControlPreloadWatcher = await watchMainProcess(\n    MAIN_CONTROL_PRELOAD_ROOT\n  );\n  const mainDisplayPreloadWatcher = await watchMainProcess(\n    MAIN_DISPLAY_PRELOAD_ROOT\n  );\n\n  startElectron(RENDERER_URL);\n\n  const manageElectronProcess = (event) => {\n    if (event.code !== \"BUNDLE_END\") {\n      return;\n    }\n\n    if (electronProcess && electronProcess.kill) {\n      manualRestart = true;\n      process.kill(electronProcess.pid);\n      electronProcess = null;\n      startElectron(RENDERER_URL);\n\n      setTimeout(() => {\n        manualRestart = false;\n      }, 5000);\n    }\n  };\n\n  mainWatcher.on(\"event\", manageElectronProcess);\n  mainControlPreloadWatcher.on(\"event\", manageElectronProcess);\n  mainDisplayPreloadWatcher.on(\"event\", manageElectronProcess);\n}\n\nstart();\n"
  },
  {
    "path": "src/main/Application.js",
    "content": "import { EventEmitter } from \"events\";\nimport { WindowManager } from \"./ui/WindowManager\";\nimport { ThemeManager } from \"./ui/ThemeManager\";\nimport { TrayManager } from \"./ui/TrayManager\";\nimport fs from \"fs\";\nimport { Buffer } from \"buffer\";\nimport low from \"lowdb\";\nimport lowFileSync from \"lowdb/adapters/FileSync\";\nimport {\n  APP_CONFIG_PATH,\n  APP_DATA_PATH,\n  CHROMIUM_PREFERENCE_PATH,\n} from \"./options/paths\";\nimport { defaultConfig } from \"@shared/defaults/defaultConfig\";\nimport { ipcMain, dialog, systemPreferences, app } from \"electron\";\nimport is from \"electron-is\";\nimport i18next from \"@shared/locales/i18next\";\n\nexport class Application extends EventEmitter {\n  constructor() {\n    super();\n    // this.isReady = false;\n    this.init();\n  }\n  init() {\n    this.setChromiumPreference();\n    this.initConfigDB();\n    this.initLanguage();\n    this.initWindowManager();\n    this.initThemeManager();\n    this.initTrayManager();\n    this.handleIpcMessages();\n  }\n  startApp() {\n    // 为了实现展示器加载上一次的模型这种操作，控制面板必须要在启动应用的时候启动，只是show与hide的区别，而这个判断已经下方到windowManager里面去了\n    this.openWindow(\"controlPanel\");\n    if (this.configDB.get([\"general\", \"open-display-at-launch\"]).value()) {\n      this.openWindow(this.configDB.get([\"display\", \"display-mode\"]).value());\n    }\n    // win.once(\"ready-to-show\", () => {\n    // this.isReady = true;\n    // this.emit(\"ready\");\n    // });\n  }\n  openWindow(windowName) {\n    return this.windowManager.openWindow(windowName);\n  }\n  setChromiumPreference() {\n    // 每一次启动应用时，将默认的开发者工具窗口设定为一个独立的窗口，防止全屏透明的展示器打开窗口内开发者工具的时候透明失效\n    low(new lowFileSync(CHROMIUM_PREFERENCE_PATH))\n      .set(\"electron.devtools.preferences.currentDockState\", '\"undocked\"')\n      .write();\n  }\n  initConfigDB() {\n    this.configDB = low(new lowFileSync(APP_CONFIG_PATH));\n    // 看样子lowdb的这个defaults只能浅层defaults，到第二级就不管用了\n    this.configDB.defaults(defaultConfig).write();\n  }\n  initLanguage() {\n    i18next.changeLanguage(this.configDB.get([\"general\", \"language\"]).value());\n  }\n  initWindowManager() {\n    // 启动window时也需要读取配置数据库\n    this.windowManager = new WindowManager(this.configDB);\n  }\n  initThemeManager() {\n    this.themeManager = new ThemeManager();\n    this.themeManager.on(\"system-theme-change\", (theme) => {\n      this.windowManager.sendMessageToWindow(\n        \"control\",\n        \"main:update-theme\",\n        theme\n      );\n    });\n  }\n  initTrayManager() {\n    this.trayManager = new TrayManager();\n    this.trayManager.buildMenu();\n    this.trayManager.on(\"tray:open-control-window\", () => {\n      // this.openWindow(\"controlPanel\");\n      // 更改机制，目前控制面板永远不会被关闭，只会隐藏\n      this.windowManager.windows.control.show();\n    });\n    this.trayManager.on(\"tray:open-display-window\", () => {\n      this.openWindow(this.configDB.get([\"display\", \"display-mode\"]).value());\n    });\n    this.trayManager.on(\"tray:quit-app\", () => {\n      // this.windowManager.windows.control.destroy();\n      // 使用before-quit事件来处理应用无法正确退出的问题，直接上exit实在是有点暴力\n      app.quit();\n    });\n  }\n  handleIpcMessages() {\n    // 向子进程提供数据库存储目录\n    ipcMain.on(\"control2main:query-data-path\", (event) => {\n      event.returnValue = APP_DATA_PATH;\n    });\n    ipcMain.on(\"control2main:query-system-theme\", (event) => {\n      event.returnValue = this.themeManager.getSystemTheme();\n    });\n    ipcMain.handle(\"control2main:select-path\", (windowName) => {\n      return dialog.showOpenDialogSync(this.windowManager.windows[windowName], {\n        properties: [\"openDirectory\"],\n      });\n    });\n    ipcMain.on(\"control2main:launch-display-window\", () => {\n      this.openWindow(this.configDB.get([\"display\", \"display-mode\"]).value());\n    });\n    ipcMain.on(\"control2main:relaunch-display-window\", () => {\n      // 使用destroy方法，防止使用close导致关闭窗口受阻\n      this.windowManager.windows.display.destroy();\n      this.openWindow(this.configDB.get([\"display\", \"display-mode\"]).value());\n    });\n    ipcMain.on(\"control2main:close-display-window\", () => {\n      this.windowManager.windows.display.destroy();\n    });\n    ipcMain.handle(\"control2main:query-window-ids\", () => {\n      // 因为关闭了新建窗口的this.allUpdateWindowIds();，对展示器的通知状态只能在这里进行\n      this.windowManager.updateWindowIds(\"display\");\n      return this.windowManager.windowIds;\n    });\n    ipcMain.handle(\"display2main:query-window-ids\", () => {\n      // 控制面板有必要确认展示器的模型载入状态，刷新页面后模型也会变为未载入状态\n      // 这里仅向控制面板发送消息，如果展示器发送消息，展示器的windowId在query状态同时成了update，会导致奇怪的问题，id直接变undefined了\n      // 为实现启动展示器自动加载之前的模型，也必须这么设计，而且还要把主进程检测到窗口打开时的广播操作关了，因为这个时候新建的窗口可能还没有准备接收消息\n      this.windowManager.updateWindowIds(\"control\");\n      return this.windowManager.windowIds;\n    });\n    ipcMain.handle(\"display2main:query-config\", () => {\n      return {\n        config: this.configDB.value(),\n        // 属于是让windowName搭个顺风车……免得初始化的时候多弄出一个通信来\n        windowName: this.windowManager.windows.display.windowName,\n      };\n    });\n    ipcMain.on(\"control2main:update-config\", () => {\n      this.configDB.read();\n    });\n    ipcMain.on(\"control2main:open-dev-tool\", (event, type) => {\n      if (\n        type === \"display\" &&\n        this.windowManager.windows.display.windowName === \"displayFullScreen\"\n      ) {\n        dialog\n          .showMessageBox(this.windowManager.windows.control, {\n            type: \"info\",\n            message: i18next.t(\"message.display-open-dev-title\"),\n            detail: i18next.t(\"message.display-open-dev-detail\"),\n            buttons: [\n              i18next.t(\"message.confirm\"),\n              i18next.t(\"message.cancel\"),\n            ],\n            defaultId: 0,\n            cancelId: 1,\n          })\n          .then((result) => {\n            result.response === 0 &&\n              this.windowManager.windows[type].webContents.openDevTools();\n          });\n      } else {\n        this.windowManager.windows[type].webContents.openDevTools();\n      }\n    });\n    ipcMain.handle(\"display2main:ask-for-media-access\", () => {\n      return this.askForMediaAccess();\n    });\n    ipcMain.on(\"display2main:set-ignore-mouse-events\", (event, ...args) => {\n      this.windowManager.windows.display.setIgnoreMouseEvents(...args);\n    });\n    ipcMain.on(\"control2main:change-language\", (event, language) => {\n      console.log(\"[Hime Display] change language to\", language);\n      i18next.changeLanguage(language);\n      this.trayManager.buildMenu();\n    });\n    // 窗口之间的消息中转\n    const routes = [\n      [\"display2control:model-control-info\", \"control\"],\n      [\"display2control:send-to-model-control\", \"control\"],\n      [\"display2control:send-display-window-state\", \"control\"],\n      [\"display2control:error\", \"control\"],\n      [\"control2display:load-model\", \"display\"],\n      [\"control2display:send-to-model-manager\", \"display\"],\n      [\"control2display:query-display-window-state\", \"display\"],\n      [\"control2display:screenshot\", \"display\"],\n    ];\n    routes.forEach(([channel, targetWindowKey]) => {\n      ipcMain.on(channel, (event, ...args) => {\n        const targetWindow = this.windowManager.windows[targetWindowKey];\n        if (targetWindow) {\n          targetWindow.webContents.send(channel, ...args);\n        }\n      });\n    });\n  }\n  async askForMediaAccess() {\n    if (is.macOS()) {\n      return systemPreferences.askForMediaAccess(\"camera\");\n    } else {\n      return true;\n    }\n  }\n  quitApp() {}\n}\n"
  },
  {
    "path": "src/main/Launcher.js",
    "content": "import { EventEmitter } from \"events\";\nimport { app } from \"electron\";\n// import is from \"electron-is\";\nimport { ExceptionHandler } from \"./core/ExceptionHandler\";\nimport { logger } from \"./core/Logger\";\nimport { Application } from \"./Application\";\nexport class Launcher extends EventEmitter {\n  constructor() {\n    super();\n    this.file = \"\";\n    this.init();\n  }\n\n  init() {\n    this.exceptionHandler = new ExceptionHandler();\n    // this.openedAtLogin = is.macOS()\n    //   ? app.getLoginItemSettings().wasOpenedAtLogin\n    //   : false;\n    // logger.info(\"[Hime Display] openedAtLogin:\", this.openedAtLogin);\n    this.handleAppEvents();\n  }\n  handleAppEvents() {\n    app.on(\"ready\", () => {\n      this.application = new Application();\n      this.application.startApp();\n      // this.application.on(\"ready\", () => {\n      // this.sendFileToApplication();\n      // });\n    });\n    app.on(\"activate\", () => {\n      if (this.application) {\n        logger.info(\"[Hime Display] activate\");\n        // this.application.openWindow(\"controlPanel\");\n        this.application.windowManager.windows.control.show();\n      }\n    });\n    // 为了实现缓存不被清理的效果，展示器的close事件的默认行为已经被阻止，若不对app执行exit，应用会因为展示器未关闭而不退出，这里在应用希望退出时强制关闭展示器来解决这个问题\n    app.on(\"before-quit\", () => {\n      this.application.windowManager.windows.control.destroy();\n    });\n    app.on(\"will-quit\", () => {\n      logger.info(\"[Hime Display] will-quit\");\n      if (this.application) {\n        this.application.quitApp();\n      }\n    });\n    // 监听此事件后，将不会在所有窗口退出时自动退出\n    app.on(\"window-all-closed\", () => {});\n  }\n}\n"
  },
  {
    "path": "src/main/core/ExceptionHandler.js",
    "content": "import { app, dialog } from \"electron\";\nimport { logger } from \"./Logger\";\nimport is from \"electron-is\";\nexport class ExceptionHandler {\n  constructor() {\n    this.init();\n  }\n  init() {\n    if (is.dev()) {\n      return;\n    }\n    process.on(\"uncaughtException\", (error) => {\n      const { message, stack } = error;\n      logger.error(`[Hime Display] Uncaught exception: ${message}`);\n      logger.error(stack);\n      dialog.showErrorBox(\"Hime Display Error: \", stack);\n      app.quit();\n    });\n  }\n}\n"
  },
  {
    "path": "src/main/core/Logger.js",
    "content": "import logger from \"electron-log\";\nlogger.info(\"[Hime Display] Logger init\");\nexport { logger };\n"
  },
  {
    "path": "src/main/index.js",
    "content": "import { Launcher } from \"./Launcher\";\nnew Launcher();\n"
  },
  {
    "path": "src/main/menus/tray.js",
    "content": "export const trayMenuTemplate = [\n  { locale: \"tray.open-control-window\", event: \"tray:open-control-window\" },\n  { locale: \"tray.open-display-window\", event: \"tray:open-display-window\" },\n  { locale: \"tray.quit-app\", event: \"tray:quit-app\" },\n];\n"
  },
  {
    "path": "src/main/options/paths.js",
    "content": "import { app } from \"electron\";\nimport { resolve } from \"path\";\nexport const APP_DATA_PATH = app.getPath(\"userData\");\nexport const APP_CONFIG_PATH = resolve(APP_DATA_PATH, \"config.json\");\nexport const APP_DATABASE_PATH = resolve(APP_DATA_PATH, \"database.json\");\nexport const CHROMIUM_PREFERENCE_PATH = resolve(APP_DATA_PATH, \"Preferences\");\n"
  },
  {
    "path": "src/main/options/windows.js",
    "content": "import { resolve } from \"path\";\nimport { DEV_SERVER_PORT } from \"@shared/constants\";\nexport const windowsOptions = {\n  controlPanel: {\n    attrs: {\n      title: \"Hime Display 控制面板\",\n      height: 600,\n      width: 700,\n      titleBarStyle: \"hidden\",\n      vibrancy: \"menu\",\n      autoHideMenuBar: true,\n      titleBarOverlay: true,\n      resizable: false,\n      // visualEffectState: \"active\",\n      // skipTaskbar: true,\n      // 默认不显示，但必须启动\n      show: false,\n      webPreferences: {\n        // nodeIntegration: true,\n        // contextIsolation: false,\n        // webSecurity: false,\n        devTools: true,\n        sandbox: false,\n        preload: resolve(__dirname, \"./control-preload.cjs.js\"),\n      },\n    },\n    url: import.meta.env.DEV\n      ? `http://localhost:${DEV_SERVER_PORT}/control.html`\n      : \"file://\" + resolve(__dirname, \"../renderer/control.html\"),\n    dev: {\n      autoOpenDevTool: false,\n    },\n    pageType: \"control\",\n  },\n  displayFullScreen: {\n    attrs: {\n      title: \"Hime Display\",\n      frame: false, //去除边框\n      hasShadow: false, //live2d模型会动，导致阴影出问题，所以干脆不要了\n      transparent: true, //让窗口透明\n      autoHideMenuBar: true,\n      skipTaskbar: true,\n      roundedCorners: false, //去除边角圆角，本来就是要占满整个屏幕的，stats面板被圆角弄掉一块实在有点难看\n      webPreferences: {\n        // nodeIntegration: true,\n        // contextIsolation: false,\n        // 便于访问本地文件\n        webSecurity: false,\n        devTools: true,\n        preload: resolve(__dirname, \"./display-preload.cjs.js\"),\n      },\n    },\n    url: import.meta.env.DEV\n      ? `http://localhost:${DEV_SERVER_PORT}/display.html`\n      : \"file://\" + resolve(__dirname, \"../renderer/display.html\"),\n    dev: {\n      autoOpenDevTool: false,\n    },\n    pageType: \"display\",\n  },\n  displayWindowed: {\n    attrs: {\n      title: \"Hime Display\",\n      // frame: false, //去除边框\n      // hasShadow: false, //live2d模型会动，导致阴影出问题，所以干脆不要了\n      // transparent: true, //让窗口透明\n      autoHideMenuBar: true,\n      // skipTaskbar: true,\n      webPreferences: {\n        // nodeIntegration: true,\n        // contextIsolation: false,\n        webSecurity: false,\n        devTools: true,\n        preload: resolve(__dirname, \"./display-preload.cjs.js\"),\n      },\n    },\n    url: import.meta.env.DEV\n      ? `http://localhost:${DEV_SERVER_PORT}/display.html`\n      : \"file://\" + resolve(__dirname, \"../renderer/display.html\"),\n    dev: {\n      autoOpenDevTool: false,\n    },\n    pageType: \"display\",\n  },\n};\n"
  },
  {
    "path": "src/main/package.json",
    "content": "{\n  \"name\": \"@app/main\",\n  \"version\": \"0.0.0\",\n  \"dependencies\": {\n    \"electron\": \"^35.2.1\",\n    \"electron-is\": \"^3.0.0\",\n    \"electron-log\": \"^5.3.4\",\n    \"lowdb\": \"1.0.0\"\n  },\n  \"devDependencies\": {\n    \"rollup-plugin-auto-external\": \"^2.0.0\",\n    \"vite\": \"^6.3.3\"\n  }\n}\n"
  },
  {
    "path": "src/main/ui/ThemeManager.js",
    "content": "import { nativeTheme } from \"electron\";\nimport { EventEmitter } from \"events\";\nexport class ThemeManager extends EventEmitter {\n  constructor() {\n    super();\n    this.init();\n  }\n  init() {\n    this.handelEvents();\n  }\n  handelEvents() {\n    nativeTheme.on(\"updated\", () => {\n      this.emit(\"system-theme-change\", this.getSystemTheme());\n    });\n  }\n  getSystemTheme() {\n    return nativeTheme.shouldUseDarkColors ? \"dark\" : \"light\";\n  }\n}\n"
  },
  {
    "path": "src/main/ui/TrayManager.js",
    "content": "import i18next from \"@shared/locales/i18next\";\nimport { trayMenuTemplate } from \"../menus/tray\";\nimport { Tray, Menu } from \"electron\";\nimport path from \"path\";\nimport { EventEmitter } from \"events\";\nimport is from \"electron-is\";\n// 我其实已经注意到macOS上显示的菜单为英语了，之所以没有对其进行处理，是因为这个应用用不到那个菜单，但是如果把菜单弄成null的话，默认注册的快捷键会失效，复制粘贴什么都用不了，所以直接懒得干了\nexport class TrayManager extends EventEmitter {\n  constructor() {\n    super();\n    this.template = trayMenuTemplate;\n    if (is.macOS()) {\n      this.tray = new Tray(\n        path.resolve(__dirname, \"./assets/trayTemplate.png\")\n      );\n    } else {\n      this.tray = new Tray(path.resolve(__dirname, \"./assets/trayWindows.png\"));\n    }\n  }\n  translateTemplate() {\n    for (const item of this.template) {\n      item.label = i18next.t(item.locale);\n      item.click = () => {\n        this.emit(item.event);\n      };\n    }\n  }\n  buildMenu() {\n    this.translateTemplate();\n    this.menu = Menu.buildFromTemplate(this.template);\n    this.tray.setContextMenu(this.menu);\n  }\n}\n"
  },
  {
    "path": "src/main/ui/WindowManager.js",
    "content": "import { EventEmitter } from \"events\";\nimport { windowsOptions } from \"../options/windows\";\nimport { BrowserWindow } from \"electron\";\nimport { logger } from \"../core/Logger\";\nimport is from \"electron-is\";\nexport class WindowManager extends EventEmitter {\n  constructor(configDB) {\n    super();\n    this.configDB = configDB;\n    this.windows = {\n      control: null,\n      display: null,\n    };\n    this.windowIds = {\n      control: -1,\n      display: -1,\n    };\n  }\n  openWindow(windowName) {\n    const pageOptions = windowsOptions[windowName];\n    const pageType = pageOptions.pageType;\n    if (this.windows[pageType] !== null) {\n      // return new Error(`${pageType} window opened again before set to null`);\n      // this.windows[pageType].show();\n      return this.windows[pageType];\n    }\n    const window = new BrowserWindow(pageOptions.attrs);\n    logger.info(\n      `[Hime Display] new window created, windowName: ${windowName}, ID: ${window.webContents.id}`\n    );\n    // 此标识主要用于展示器判断自身类型\n    window.windowName = windowName;\n    this.windows[pageType] = window;\n    this.windowIds[pageType] = window.webContents.id;\n    window.loadURL(pageOptions.url);\n    if (import.meta.env.DEV && pageOptions.dev.autoOpenDevTool) {\n      window.webContents.openDevTools();\n    }\n    window.on(\"closed\", () => {\n      this.windows[pageType] = null;\n      this.windowIds[pageType] = -1;\n      this.allUpdateWindowIds();\n    });\n    if (windowName === \"displayFullScreen\") {\n      window.maximize();\n      window.setIgnoreMouseEvents(true, {\n        forward: true,\n      });\n      if (this.configDB.get([\"display\", \"keep-display-at-top\"]).value()) {\n        // 之前这个级别太高了，搞不好会出大问题……\n        // window.setAlwaysOnTop(true, \"screen-saver\", 1);\n        // 对于macOS而言，默认的层级已经足够了，但Windows在该层级下无法置顶\n        if (is.macOS()) {\n          window.setAlwaysOnTop(true);\n        } else {\n          window.setAlwaysOnTop(true, \"screen-saver\");\n        }\n      }\n\n      switch (this.configDB.get([\"display\", \"display-range\"]).value()) {\n        case \"singleDesktop\": {\n          break;\n        }\n        case \"allDesktops\": {\n          window.setVisibleOnAllWorkspaces(true);\n          break;\n        }\n        case \"allWorkspaces\": {\n          window.setVisibleOnAllWorkspaces(true, {\n            visibleOnFullScreen: true, //在所有窗口上显示，全屏应用也不例外，目前已证实这个操作会带来一些问题，例如菜单栏无法正确显示，好像跟内部的进程转换有关\n            // 实测该项目设定为true时，在全屏状态下窗口不会显示\n            // skipTransformProcessType: true,\n          });\n          break;\n        }\n      }\n    }\n    if (windowName === \"controlPanel\") {\n      if (this.configDB.get([\"general\", \"open-control-at-launch\"]).value()) {\n        window.once(\"ready-to-show\", () => {\n          window.show();\n        });\n      }\n      //保持display窗口一直处于聚焦状态\b，以处理鼠标事件\n      window.on(\"blur\", () => {\n        if (this.windows.display?.windowName === \"displayFullScreen\") {\n          this.windows.display.focus();\n        }\n      });\n      // 更改机制，目前控制面板永远不会被关闭，只会隐藏\n      window.on(\"close\", (event) => {\n        event.preventDefault();\n        window.hide();\n      });\n    }\n    // 为实现启动展示器自动加载之前的模型，需要在这里关闭事件通知，因为展示器窗口是在启动触发下方函数时，展示器只是开始加载了，并不一定准备好了接受消息，这时告知控制面板展示器已经准备好了的话，控制面板发送的消息无法被接收到\n    // this.allUpdateWindowIds();\n    return this.windows[pageType];\n  }\n  sendMessageToWindow(windowName, message, ...args) {\n    const window = this.windows[windowName];\n    if (window === null) {\n      return;\n    }\n    logger.info(`[Hime Display] send to ${windowName}: ${message}`, ...args);\n    window.webContents.send(message, ...args);\n  }\n  allUpdateWindowIds() {\n    Object.keys(this.windows).forEach((key) => {\n      this.updateWindowIds(key);\n    });\n  }\n  updateWindowIds(windowName) {\n    this.sendMessageToWindow(\n      windowName,\n      \"main2control&display:update-window-ids\",\n      this.windowIds\n    );\n  }\n  // 备选方案，使用MessageChannel实现两个渲染进程的通信\n  // buildMessagePort() {\n  //   const { port1, port2 } = new MessageChannel();\n  //   this.windows.control.webContents.postMessage(\"buildMessagePort\", null, [\n  //     port1,\n  //   ]);\n  //   this.windows.display.webContents.postMessage(\"buildMessagePort\", null, [\n  //     port2,\n  //   ]);\n  // }\n}\n"
  },
  {
    "path": "src/main/vite.config.js",
    "content": "import { resolve } from \"path\";\nimport { defineConfig } from \"vite\";\nimport autoExternal from \"rollup-plugin-auto-external\";\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  build: {\n    lib: {\n      entry: resolve(__dirname, \"./index.js\"),\n      name: \"main\",\n      formats: [\"cjs\"],\n      fileName: (format) => `main.${format}.js`,\n    },\n    rollupOptions: {\n      plugins: [\n        autoExternal({\n          packagePath: resolve(__dirname, \"./package.json\"),\n        }),\n      ],\n    },\n  },\n  resolve: {\n    alias: {\n      \"@shared\": resolve(__dirname, \"../shared\"),\n    },\n  },\n});\n"
  },
  {
    "path": "src/preload/control/config.js",
    "content": "// 几经考虑，还是把配置数据库也搬到控制面板了，IPC通信实在是麻烦了，不如直接在控制面板的preload中加载数据库\nimport low from \"lowdb\";\nimport lowFileSync from \"lowdb/adapters/FileSync\";\nimport path from \"path\";\nimport { APP_DATA_PATH } from \"./paths\";\nimport { ipcRenderer } from \"electron\";\nimport { defaultConfig } from \"@shared/defaults/defaultConfig\";\nconst APP_CONFIG_PATH = path.join(APP_DATA_PATH, \"config.json\");\nconst db = low(new lowFileSync(APP_CONFIG_PATH));\n// 不是我想重复写代码，这个config和database绝对用不了class的继承，preload暴露的对象直接把原型链全灭了，所以只能一个一个写函数，也不用class了\nexport function value() {\n  return db.value();\n}\nexport function write(value, data) {\n  db.set(value, data).write();\n  // display从主进程请求配置，还得通知主进程更新一下\n  ipcRenderer.send(\"control2main:update-config\");\n}\nexport function resetAllConfig() {\n  db.setState(defaultConfig).write();\n  ipcRenderer.send(\"control2main:update-config\");\n}\n"
  },
  {
    "path": "src/preload/control/database.js",
    "content": "// 由于数据库仅在控制面板使用而不在主进程以及展示器使用，决定直接在控制面板的preload中加载数据库，减少IPC通信，优化性能\nimport low from \"lowdb\";\nimport lowFileSync from \"lowdb/adapters/FileSync\";\nimport fs from \"fs\";\nimport util from \"util\";\nimport path from \"path\";\nimport { defalutDatabase } from \"@shared/defaults/defalutDatabase\";\nimport { APP_DATA_PATH } from \"./paths\";\nimport { detectSpineVersionFromBinary } from \"./utils\";\nconst APP_DATABASE_PATH = path.join(APP_DATA_PATH, \"database.json\");\nconst db = low(new lowFileSync(APP_DATABASE_PATH));\ndb.defaults(defalutDatabase).write();\nexport function value() {\n  return db.value();\n}\nexport function write(value, data) {\n  db.set(value, data).write();\n}\nexport function removeDataFromSourcePath(sourcePath) {\n  // 不愧是lodash，极致精简语法，remove({sourcePath})，优雅啊\n  // 从本源来讲，要追溯到_.matches，然后再到_.isMatch，然后再搭配上ES6的对象属性简写，最终浓缩成这个简单的语句\n  [\"model\", \"motion3D\", \"audio3D\"].forEach((type) => {\n    db.get(type).remove({ sourcePath }).write();\n  });\n}\nexport async function loadDataFromSourcePathInfo(sourcePathInfo) {\n  // 已改变载入机制\n  // removeRemovedSourceTypeData(sourcePathInfo);\n  // await removeDeletedData(sourcePathInfo.sourcePath);\n\n  removeDataFromSourcePath(sourcePathInfo.sourcePath);\n  // 这里的await后面虽然没有任何操作，但是还是必要的，因为可以推住Promise的resolve时机，确保控制面板载入刷新以后的数据\n  await loadDataFromPath(\n    sourcePathInfo.sourcePath,\n    sourcePathInfo.sourceTypes,\n    sourcePathInfo.sourcePath\n  );\n}\n// 造了半天我在造个寂寞，跟异步同步扯了半天有意思吗？改变思路，直接把刷新数据源的相关数据全删了重载\n// // 若更改过一个数据源的sourceTypes，需要删除一些原来sourceType允许载入的数据\n// function removeRemovedSourceTypeData(sourcePathInfo) {\n//   db.get(\"model\")\n//     .remove(\n//       (item) =>\n//         item.sourcePath === sourcePathInfo.sourcePath &&\n//         !sourcePathInfo.sourceTypes[item.modelType]\n//     )\n//     .write();\n//   if (!sourcePathInfo.sourceTypes.motion3D) {\n//     db.get(\"motion3D\")\n//       .remove({ sourcePath: sourcePathInfo.sourcePath })\n//       .write();\n//   }\n//   if (!sourcePathInfo.sourceTypes.audio3D) {\n//     db.get(\"audio3D\").remove({ sourcePath: sourcePathInfo.sourcePath }).write();\n//   }\n// }\n// // 移除目录中被删除的模型数据\n// function removeDeletedData(sourcePath) {\n//   const promises = [];\n//   [\"model\", \"motion3D\", \"audio3D\"].forEach((type) => {\n//     db.get(type)\n//       .value()\n//       .forEach((item) => {\n//         if (item.sourcePath === sourcePath) {\n//           promises.push(\n//             new Promise((resolve) => {\n//               fs.access(\n//                 item.entranceFile.slice(7).split(\"/\").join(path.sep),\n//                 fs.constants.F_OK,\n//                 (err) => {\n//                   console.log(item.entranceFile, err);\n//                   if (err) {\n//                     console.log(`${item.entranceFile} is deleted`);\n//                     db.get(type)\n//                       .remove({ entranceFile: item.entranceFile })\n//                       .write();\n//                   }\n//                   // 又被坑了，resolve一定要放在if之后，不然一些promise一直没有resolve，导致程序卡在这个程序的await上。\n//                   resolve();\n//                 }\n//               );\n//             })\n//           );\n//         }\n//       });\n//   });\n//   return Promise.all(promises);\n// }\n\n// 后面这些函数里面带的sourcePath都是最原始，不受递归影响的那个sourcePath，用于判断一个模型由哪个源检索到的，方便跟随删除\nasync function loadDataFromPath(dataPath, sourceTypes, sourcePath) {\n  //根据文件路径读取文件，返回文件列表\n  // 全部使用箭头函数，确保this对象可以传进去\n  const files = await util.promisify(fs.readdir)(dataPath);\n  let promises = [];\n  //遍历读取到的文件列表\n  // 为了保证顶级的Promise在所有目录读取结束后再返回，这里无法使用forEach，因为这样以来就无法await了，直接在里面forEach里面async整活也做不到让顶级的一步函数等着\n  for (const filename of files) {\n    //获取当前文件的绝对路径\n    const dir = path.join(dataPath, filename);\n    //根据文件路径获取文件信息，返回一个fs.Stats对象\n    const stats = await util.promisify(fs.stat)(dir);\n    const isFile = stats.isFile(); //是文件\n    const isDir = stats.isDirectory(); //是文件夹\n    if (isFile) {\n      //是文件\n      // 这里也需要加到promise里面，不然会出现还没有检索完成，整个promise就已经resolve了，导致后面的数据没有载入\n      promises.push(detectDatabaseItem(dir, sourceTypes, sourcePath));\n    }\n    if (isDir) {\n      //递归，如果是文件夹，就继续遍历该文件夹下面的文件\n      // 这里不能在push里面写await，Promise.all应该接收一个Promise的列表\n      promises.push(loadDataFromPath(dir, sourceTypes, sourcePath));\n      // 这样写的话和同步都没有区别了\n      // await this.refreshModelDB(dir);\n    }\n  }\n  // console.log(sourcePath);\n  // 异步的关键\n  return Promise.all(promises);\n}\nasync function detectDatabaseItem(fileDir, sourceTypes, sourcePath) {\n  const extensionName = path.extname(fileDir);\n  switch (extensionName) {\n    case \".json\": {\n      // 回调函数往上无法嵌套，转换成Promise\n      const fileData = await util.promisify(fs.readFile)(fileDir);\n      let fileJson;\n      try {\n        fileJson = JSON.parse(fileData.toString());\n        if (sourceTypes[\"Live2D\"]) {\n          processLive2dJson(fileDir, fileJson, sourcePath);\n        }\n        if (sourceTypes[\"Spine\"]) {\n          processSpineJson(fileDir, fileJson, sourcePath);\n        }\n      } catch (e) {\n        console.warn(`File ${fileDir} is not a valid json file`);\n      }\n      break;\n    }\n    case \".pmx\": {\n      if (sourceTypes[\"MMD\"]) {\n        processPmx(fileDir, sourcePath);\n      }\n      break;\n    }\n    case \".vrm\": {\n      if (sourceTypes[\"VRoid\"]) {\n        processVrm(fileDir, sourcePath);\n      }\n      break;\n    }\n    case \".skel\": {\n      if (sourceTypes[\"Spine\"]) {\n        const fileData = await util.promisify(fs.readFile)(fileDir);\n        processSkel(fileDir, sourcePath, fileData);\n      }\n      break;\n    }\n    case \".vmd\": {\n      if (sourceTypes[\"motion3D\"]) {\n        processVmd(fileDir, sourcePath);\n      }\n      break;\n    }\n    case \".fbx\": {\n      if (sourceTypes[\"motion3D\"]) {\n        processFbx(fileDir, sourcePath);\n      }\n      break;\n    }\n    case \".wav\": {\n      if (sourceTypes[\"audio3D\"]) {\n        processWav(fileDir, sourcePath);\n      }\n      break;\n    }\n    case \".mp3\": {\n      if (sourceTypes[\"audio3D\"]) {\n        processMp3(fileDir, sourcePath);\n      }\n      break;\n    }\n  }\n}\nfunction processLive2dJson(fileDir, fileJson, sourcePath) {\n  if (\"model\" in fileJson) {\n    writeModelInfo({\n      name: splitDirName(fileDir),\n      modelType: \"Live2D\",\n      extensionName: \"moc\",\n      entranceFile: resolveEntrancePath(fileDir),\n      themeColor: \"#ff6e2d\",\n      sourcePath,\n      // has_motion: \"motions\" in fileJson ? true : false;\n    });\n  } else if (\"FileReferences\" in fileJson) {\n    writeModelInfo({\n      name: splitDirName(fileDir),\n      modelType: \"Live2D\",\n      extensionName: \"moc3\",\n      entranceFile: resolveEntrancePath(fileDir),\n      themeColor: \"#ff6e2d\",\n      sourcePath,\n      // has_motion:\"Motions\" in fileJson.FileReferences ? true : false\n    });\n  }\n}\nfunction processPmx(fileDir, sourcePath) {\n  writeModelInfo({\n    name: splitDirName(fileDir),\n    modelType: \"MMD\",\n    extensionName: \"pmx\",\n    entranceFile: resolveEntrancePath(fileDir),\n    themeColor: \"#39c5bb\",\n    sourcePath,\n  });\n}\nfunction processVrm(fileDir, sourcePath) {\n  writeModelInfo({\n    name: splitDirName(fileDir),\n    modelType: \"VRoid\",\n    extensionName: \"vrm\",\n    entranceFile: resolveEntrancePath(fileDir),\n    themeColor: \"#ffec00\",\n    sourcePath,\n  });\n}\n// todo: spine模型比较特殊，即使是加载模型，版本也不向下兼容……因此之后有必要进一步对模型版本进行判断\nfunction processSkel(fileDir, sourcePath, fileData) {\n  const version = detectSpineVersionFromBinary(fileData);\n  writeModelInfo({\n    name: splitDirName(fileDir),\n    modelType: \"Spine\",\n    extensionName: \"skel\",\n    entranceFile: resolveEntrancePath(fileDir),\n    themeColor: \"#3fa9f5\",\n    sourcePath,\n    version,\n  });\n}\nfunction processSpineJson(fileDir, fileJson, sourcePath) {\n  if (\"skeleton\" in fileJson && \"spine\" in fileJson.skeleton) {\n    writeModelInfo({\n      name: splitDirName(fileDir),\n      modelType: \"Spine\",\n      extensionName: \"json\",\n      entranceFile: resolveEntrancePath(fileDir),\n      themeColor: \"#3fa9f5\",\n      sourcePath,\n      version: fileJson.skeleton.spine,\n    });\n  }\n}\nfunction processVmd(fileDir, sourcePath) {\n  writeMotion3DInfo({\n    // 根据我在B碗上的下载经验，有一些配布中都会带有多个版本的vmd，这些文件的名称都不是曲名，但没有办法，只能让用户手动改一下文件名了\n    name: path.basename(fileDir),\n    extensionName: \"vmd\",\n    entranceFile: resolveEntrancePath(fileDir),\n    sourcePath,\n  });\n}\nfunction processFbx(fileDir, sourcePath) {\n  writeMotion3DInfo({\n    name: path.basename(fileDir),\n    extensionName: \"fbx\",\n    entranceFile: resolveEntrancePath(fileDir),\n    sourcePath,\n  });\n}\nfunction processWav(fileDir, sourcePath) {\n  writeAudio3DInfo({\n    name: path.basename(fileDir),\n    extensionName: \"wav\",\n    entranceFile: resolveEntrancePath(fileDir),\n    sourcePath,\n  });\n}\nfunction processMp3(fileDir, sourcePath) {\n  writeAudio3DInfo({\n    name: path.basename(fileDir),\n    extensionName: \"mp3\",\n    entranceFile: resolveEntrancePath(fileDir),\n    sourcePath,\n  });\n}\n// 因为有些模型入口文件名完全没有辨识度，如model.json，以模型入口文件的的上级目录名作为模型名称\nfunction splitDirName(fileDir) {\n  // 同时切分Windows和UNIX路径\n  return path.dirname(fileDir).split(\"/\").pop().split(\"\\\\\").pop();\n}\n// Windows下使用file:会导致路径出错，热重载开发环境下不使用file:会导致路径报错\n// Windows的路径斜杠导致MMD和Spine模型无法加载，这里统一又进行了一次斜杠的替换……Windows我忍你很久了啊，光在这个路径上这已经是第三次出问题了\nfunction resolveEntrancePath(fileDir) {\n  return (\n    (import.meta.env.DEV ? \"file:///\" : \"\") +\n    path.resolve(fileDir).split(path.sep).join(\"/\")\n  );\n}\nfunction writeModelInfo(modelInfo) {\n  //  防止重复写入模型数据\n  // 现在以模型入口文件的路径作为唯一标识，如果已经存在，则不再写入。不直接用motionInfo是考虑到万一有人载入了具有包含关系的多个源路径，这会导致模型重复写入\n  if (\n    db\n      .get(\"model\")\n      .findIndex((item) => item.entranceFile === modelInfo.entranceFile)\n      .value() == -1\n  ) {\n    db.get(\"model\").push(modelInfo).write();\n  }\n}\nfunction writeMotion3DInfo(motionInfo) {\n  if (\n    db\n      .get(\"motion3D\")\n      .findIndex((item) => item.entranceFile === motionInfo.entranceFile)\n      .value() == -1\n  ) {\n    db.get(\"motion3D\").push(motionInfo).write();\n  }\n}\nfunction writeAudio3DInfo(audioInfo) {\n  if (\n    db\n      .get(\"audio3D\")\n      .findIndex((item) => item.entranceFile === audioInfo.entranceFile)\n      .value() == -1\n  ) {\n    db.get(\"audio3D\").push(audioInfo).write();\n  }\n}\n"
  },
  {
    "path": "src/preload/control/index.js",
    "content": "import { contextBridge } from \"electron\";\nimport { shell } from \"electron\";\nimport * as database from \"./database\";\nimport * as config from \"./config\";\nimport * as ipc from \"./ipc\";\nimport \"./theme\";\ncontextBridge.exposeInMainWorld(\"nodeAPI\", {\n  database,\n  config,\n  ipc,\n  showInFolder,\n  openLink,\n});\nfunction showInFolder(path) {\n  shell.showItemInFolder(path);\n}\nfunction openLink(link) {\n  shell.openExternal(link);\n}\n"
  },
  {
    "path": "src/preload/control/ipc.js",
    "content": "import { ipcRenderer } from \"electron\";\nexport function selectPath() {\n  return ipcRenderer.invoke(\"control2main:select-path\", \"controlPanel\");\n}\nexport function launchDisplayWindow() {\n  ipcRenderer.send(\"control2main:launch-display-window\");\n}\nexport function relaunchDisplayWindow() {\n  ipcRenderer.send(\"control2main:relaunch-display-window\");\n}\nexport function closeDisplayWindow() {\n  ipcRenderer.send(\"control2main:close-display-window\");\n}\nexport function queryWindowIds() {\n  return ipcRenderer.invoke(\"control2main:query-window-ids\");\n}\nexport function handleUpdateWindowIds(callback) {\n  ipcRenderer.on(\"main2control&display:update-window-ids\", callback);\n}\nexport function receiveModelControlInfo(callback) {\n  ipcRenderer.once(\"display2control:model-control-info\", callback);\n}\nexport function handleSendToModelControl(callback) {\n  console.log(\"handleSendToModelControl\");\n  ipcRenderer.on(\"display2control:send-to-model-control\", callback);\n}\nexport function removeManagerListeners() {\n  ipcRenderer.removeAllListeners(\"display2control:send-to-model-control\");\n}\nexport function openDevTool(type) {\n  ipcRenderer.send(\"control2main:open-dev-tool\", type);\n}\nexport function changeLanguage(language) {\n  ipcRenderer.send(\"control2main:change-language\", language);\n}\nexport function handleDisplayWindowState(callback) {\n  ipcRenderer.once(\"display2control:send-display-window-state\", callback);\n}\nexport function handleDisplayWindowError(callback) {\n  ipcRenderer.on(\"display2control:error\", callback);\n}\n\nexport function loadModel(modelInfo) {\n  ipcRenderer.send(\"control2display:load-model\", modelInfo);\n}\n\nexport function sendToModelManager(message) {\n  ipcRenderer.send(\"control2display:send-to-model-manager\", message);\n}\n\nexport function queryDisplayWindowState() {\n  ipcRenderer.send(\"control2display:query-display-window-state\");\n}\nexport function screenshot() {\n  ipcRenderer.send(\"control2display:screenshot\");\n}\n"
  },
  {
    "path": "src/preload/control/paths.js",
    "content": "import { ipcRenderer } from \"electron\";\n// console.time(\"control:query-database-path\");\n// 应用的许多后续操作必须要等到数据库加载完成，若使用异步请求可能有一定概率导致无法访问数据库报错\n// 毕竟涉及到主进程通信，能少一次算一次，数据库路径到后方再拼接吧\nexport const APP_DATA_PATH = ipcRenderer.sendSync(\n  \"control2main:query-data-path\"\n);\n// console.timeEnd(\"control:query-database-path\");\n"
  },
  {
    "path": "src/preload/control/theme.js",
    "content": "import { ipcRenderer } from \"electron\";\n// document.addEventListener(\"DOMContentLoaded\", () => {\n//   ipcRenderer.invoke(\"control2main:query-system-theme\").then((theme) => {\n// updateTheme(theme);\n//   });\n// });\n// 经测试，采用异步函数加载深色主题时，会出现又浅色到深色主题的闪烁，因此只能改用同步阻塞函数\n// 放到DOMContentLoaded之前有助于减少等待时长，虽然说相对于DOMContentLoaded完成所花的几百甚至一千多ms来讲，这里省下的约0.5ms可能什么都不是\n// console.time(\"control2main:query-system-theme\");\nconst theme = ipcRenderer.sendSync(\"control2main:query-system-theme\");\n// 不放在DOMContentLoaded事件之后会导致document.documentElement为null\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n  // console.timeEnd(\"control2main:query-system-theme\");\n  updateTheme(theme);\n});\nipcRenderer.on(\"main:update-theme\", (evnet, theme) => {\n  updateTheme(theme);\n});\nfunction updateTheme(theme) {\n  if (theme === \"dark\") {\n    document.documentElement.className = \"dark\";\n  } else if (theme === \"light\") {\n    document.documentElement.className = \"\";\n  }\n}\n"
  },
  {
    "path": "src/preload/control/utils.js",
    "content": "export function detectSpineVersionFromBinary(dataToParse) {\n  const versionOld = readSpineVersionOldFormat(dataToParse);\n  if (isSpineValidVersion(versionOld)) {\n    return versionOld;\n  }\n\n  const versionNew = readSpineVersionNewFormat(dataToParse);\n  if (isSpineValidVersion(versionNew)) {\n    return versionNew;\n  }\n  return \"Unknown\";\n}\n\nfunction readSpineVersionOldFormat(dataToParse) {\n  const input = new SpineBinaryInput(dataToParse);\n  let version = \"\";\n\n  try {\n    input.readString();\n    version = input.readString();\n  } catch (e) {\n    version = \"\";\n  }\n\n  return version;\n}\n\nfunction readSpineVersionNewFormat(dataToParse) {\n  const input = new SpineBinaryInput(dataToParse);\n  let version = \"\";\n\n  try {\n    input.readInt32();\n    input.readInt32();\n    version = input.readString();\n  } catch (e) {\n    version = \"\";\n  }\n\n  return version;\n}\nfunction isSpineValidVersion(version) {\n  return typeof version === \"string\" && /^\\d+\\.\\d+\\.\\d+$/.test(version);\n}\n\nclass SpineBinaryInput {\n  constructor(\n    data,\n    strings = new Array(),\n    index = 0,\n    buffer = new DataView(data.buffer)\n  ) {\n    this.data = data;\n    this.strings = strings;\n    this.index = index;\n    this.buffer = buffer;\n  }\n\n  readByte() {\n    return this.buffer.getInt8(this.index++);\n  }\n\n  readUnsignedByte() {\n    return this.buffer.getUint8(this.index++);\n  }\n\n  readShort() {\n    const value = this.buffer.getInt16(this.index);\n\n    this.index += 2;\n\n    return value;\n  }\n\n  readInt32() {\n    const value = this.buffer.getInt32(this.index);\n\n    this.index += 4;\n\n    return value;\n  }\n\n  readInt(optimizePositive) {\n    let b = this.readByte();\n    let result = b & 0x7f;\n\n    if ((b & 0x80) != 0) {\n      b = this.readByte();\n      result |= (b & 0x7f) << 7;\n      if ((b & 0x80) != 0) {\n        b = this.readByte();\n        result |= (b & 0x7f) << 14;\n        if ((b & 0x80) != 0) {\n          b = this.readByte();\n          result |= (b & 0x7f) << 21;\n          if ((b & 0x80) != 0) {\n            b = this.readByte();\n            result |= (b & 0x7f) << 28;\n          }\n        }\n      }\n    }\n\n    return optimizePositive ? result : (result >>> 1) ^ -(result & 1);\n  }\n\n  readStringRef() {\n    const index = this.readInt(true);\n\n    return index == 0 ? null : this.strings[index - 1];\n  }\n\n  readString() {\n    let byteCount = this.readInt(true);\n\n    switch (byteCount) {\n      case 0:\n        return null;\n      case 1:\n        return \"\";\n    }\n    byteCount--;\n    let chars = \"\";\n\n    for (let i = 0; i < byteCount; ) {\n      const b = this.readUnsignedByte();\n\n      switch (b >> 4) {\n        case 12:\n        case 13:\n          chars += String.fromCharCode(\n            ((b & 0x1f) << 6) | (this.readByte() & 0x3f)\n          );\n          i += 2;\n          break;\n        case 14:\n          chars += String.fromCharCode(\n            ((b & 0x0f) << 12) |\n              ((this.readByte() & 0x3f) << 6) |\n              (this.readByte() & 0x3f)\n          );\n          i += 3;\n          break;\n        default:\n          chars += String.fromCharCode(b);\n          i++;\n      }\n    }\n\n    return chars;\n  }\n\n  readFloat() {\n    const value = this.buffer.getFloat32(this.index);\n\n    this.index += 4;\n\n    return value;\n  }\n\n  readBoolean() {\n    return this.readByte() != 0;\n  }\n}\n"
  },
  {
    "path": "src/preload/control/vite.config.js",
    "content": "import { resolve } from \"path\";\nimport { defineConfig } from \"vite\";\nimport autoExternal from \"rollup-plugin-auto-external\";\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  build: {\n    lib: {\n      entry: resolve(__dirname, \"./index.js\"),\n      name: \"main\",\n      formats: [\"cjs\"],\n      fileName: (format) => `control-preload.${format}.js`,\n    },\n    rollupOptions: {\n      plugins: [\n        autoExternal({\n          packagePath: resolve(__dirname, \"../package.json\"),\n        }),\n      ],\n    },\n  },\n  resolve: {\n    alias: {\n      \"@shared\": resolve(__dirname, \"../../shared\"),\n    },\n  },\n});\n"
  },
  {
    "path": "src/preload/display/index.js",
    "content": "import { contextBridge } from \"electron\";\nimport * as ipc from \"./ipc\";\ncontextBridge.exposeInMainWorld(\"nodeAPI\", {\n  ipc,\n});\n"
  },
  {
    "path": "src/preload/display/ipc.js",
    "content": "import { ipcRenderer } from \"electron\";\nexport function handleLoadModel(callback) {\n  ipcRenderer.on(\"control2display:load-model\", callback);\n}\nexport function queryWindowIds() {\n  return ipcRenderer.invoke(\"display2main:query-window-ids\");\n}\nexport function handleUpdateWindowIds(callback) {\n  ipcRenderer.on(\"main2control&display:update-window-ids\", callback);\n}\nexport function queryConfig() {\n  // 尬住了，这里请求配置是后续操作的基础，必须要用同步请求\n  // 然而electron的API里，ipcRenderer有sendTo，但是没有sendSyncTo，也没有invokeTo……用成sendTo本来就是考虑到之后通信频率比较高，不想走主进程的中继，这里请求要等待相应，实在没办法，不然要实现类似invokeTo的话，大概得这么写：\n  // return new Promise((resolve, reject) => {\n  //   ipcRenderer.sendTo(controlWindowId, \"display2main:query-config\");\n  //   ipcRenderer.once(\"control-resopnce:query-config\", (event, config) => {\n  //     resolve(config);\n  //   });\n  // });\n  // config数据主进程也有，这里还是invoke主进程吧\n  return ipcRenderer.invoke(\"display2main:query-config\");\n}\n\nexport function handleSendToModelManager(callback) {\n  ipcRenderer.on(\"control2display:send-to-model-manager\", callback);\n}\nexport function askForMediaAccess() {\n  return ipcRenderer.invoke(\"display2main:ask-for-media-access\");\n}\nexport function setIgnoreMouseEvents(...args) {\n  ipcRenderer.send(\"display2main:set-ignore-mouse-events\", ...args);\n}\n\nexport function handleQueryDisplayWindowState(callback) {\n  ipcRenderer.on(\"control2display:query-display-window-state\", callback);\n}\n\nexport function sendModelControlInfo(modelControlInfo) {\n  ipcRenderer.send(\"display2control:model-control-info\", modelControlInfo);\n}\n\nexport function sendToModelControl(message) {\n  ipcRenderer.send(\"display2control:send-to-model-control\", message);\n}\n\nexport function sendDisplayWindowState(state) {\n  ipcRenderer.send(\"display2control:send-display-window-state\", state);\n}\n\nexport function throwError(message) {\n  ipcRenderer.send(\"display2control:error\", message);\n}\n\nexport function handleScreenshot(callback) {\n  ipcRenderer.on(\"control2display:screenshot\", callback);\n}\n"
  },
  {
    "path": "src/preload/display/vite.config.js",
    "content": "import { resolve } from \"path\";\nimport { defineConfig } from \"vite\";\nimport autoExternal from \"rollup-plugin-auto-external\";\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  build: {\n    lib: {\n      entry: resolve(__dirname, \"./index.js\"),\n      name: \"main\",\n      formats: [\"cjs\"],\n      fileName: (format) => `display-preload.${format}.js`,\n    },\n    rollupOptions: {\n      plugins: [\n        autoExternal({\n          packagePath: resolve(__dirname, \"../package.json\"),\n        }),\n      ],\n    },\n  },\n});\n"
  },
  {
    "path": "src/preload/package.json",
    "content": "{\n  \"name\": \"@app/preload\",\n  \"version\": \"0.0.0\",\n  \"dependencies\": {\n    \"electron\": \"^35.2.1\",\n    \"lowdb\": \"1.0.0\"\n  },\n  \"devDependencies\": {\n    \"rollup-plugin-auto-external\": \"^2.0.0\",\n    \"vite\": \"^6.3.3\"\n  }\n}\n"
  },
  {
    "path": "src/renderer/control/App.vue",
    "content": "<template>\n  <div class=\"drag-area\"></div>\n  <el-config-provider :locale=\"locale\">\n    <el-container>\n      <hime-menu></hime-menu>\n      <hime-main></hime-main>\n    </el-container>\n  </el-config-provider>\n</template>\n\n<script setup>\nimport throttle from \"lodash/throttle\";\nimport HimeMenu from \"@control/components/Menu/Index.vue\";\nimport HimeMain from \"@control/components/Main.vue\";\nimport { useAppStore } from \"@control/store/app\";\nimport { useControlStore } from \"@control/store/control\";\nimport { useTranslation } from \"i18next-vue\";\nimport zhCn from \"element-plus/dist/locale/zh-cn.mjs\";\nimport en from \"element-plus/dist/locale/en.mjs\";\nimport ja from \"element-plus/dist/locale/ja.mjs\";\n// 发现element-plus的bug，使用自动引入ElMessage的方式会导致非深色模式下主题色被覆盖，因此这里手动引入了一遍\nimport { ElMessage } from \"element-plus\";\nimport { computed, watch } from \"vue\";\nconst { i18next } = useTranslation();\nconst appStore = useAppStore();\nconst controlStore = useControlStore();\nconst ipcAPI = window.nodeAPI.ipc;\nappStore.syncDatabase();\nappStore.syncConfig();\nipcAPI.queryWindowIds().then((windowIds) => {\n  appStore.displayWindowId = windowIds.display;\n  appStore.displayWindowOpened.value =\n    appStore.displayWindowId === -1 ? false : true;\n});\nipcAPI.handleUpdateWindowIds((event, windowIds) => {\n  appStore.displayWindowId = windowIds.display;\n  appStore.displayWindowOpened.value =\n    appStore.displayWindowId === -1 ? false : true;\n  // 展示器关闭或重载时重置模型控制器的状态\n  // controlStore.currentModelType = \"\";\n  // controlStore.modelControlInfoLoading = false;\n  // controlStore.modelControlInfo = null;\n  // 原来pinia有个方法叫reset……\n  controlStore.$reset();\n});\n\ni18next.changeLanguage(appStore.config.general.language);\nconst locale = computed(() =>\n  appStore.config.general.language === \"en\"\n    ? en\n    : appStore.config.general.language === \"zh-CN\"\n    ? zhCn\n    : appStore.config.general.language === \"jp\"\n    ? ja\n    : null\n);\n\n// 报错信息使用节流函数封装，防止因渲染错误疯狂弹窗\nconst handleDisplayWindowError = throttle((event, message) => {\n  ElMessage({\n    showClose: true,\n    message: `Display Error: ${message}`,\n    type: \"error\",\n  });\n}, 3000);\nipcAPI.handleDisplayWindowError(handleDisplayWindowError);\nconst handleControlWindowError = throttle((message) => {\n  ElMessage({\n    showClose: true,\n    message: `Control Error: ${message}`,\n    type: \"error\",\n  });\n}, 3000);\n\n// if (appStore.config.general[\"error-report\"]) {\n//   window.onerror = function (message) {\n//     handleControlWindowError(message);\n//   };\n//   window.addEventListener(\"unhandledrejection\", rejectErrorHandler);\n// }\nconst rejectErrorHandler = function (event) {\n  handleControlWindowError(event.reason.message);\n};\nwatch(\n  () => appStore.config.general[\"error-report\"],\n  () => {\n    // console.log(\"watch\", appStore.config.general[\"error-report\"]);\n    if (appStore.config.general[\"error-report\"]) {\n      window.onerror = function (message) {\n        handleControlWindowError(message);\n      };\n      const rejectErrorHandler = function (event) {\n        handleControlWindowError(event.reason.message);\n      };\n      window.addEventListener(\"unhandledrejection\", rejectErrorHandler);\n    } else {\n      window.onerror = null;\n      window.removeEventListener(\"unhandledrejection\", rejectErrorHandler);\n    }\n  }\n);\nwindow.appStore = appStore;\n</script>\n\n<style lang=\"scss\">\n:root {\n  height: 100%;\n  font-family: var(--el-font-family);\n  font-size: var(--el-font-size-base);\n  color: var(--el-text-color-regular);\n  user-select: none;\n  table {\n    font-size: var(--el-font-size-base);\n  }\n}\nbody {\n  height: 100%;\n  margin: 0;\n}\n// 禁止图片拖拽\nimg {\n  -webkit-user-drag: none;\n}\n#app {\n  height: 100%;\n  .el-container {\n    height: 100%;\n  }\n}\n.drag-area {\n  position: fixed;\n  top: 0;\n  left: 0;\n  height: 30px;\n  width: 100%;\n  -webkit-app-region: drag;\n}\n// 默认的表头背景色和底色不搭\n.el-table th.el-table__cell {\n  background-color: rgba(0, 0, 0, 0);\n}\n// 貌似是element plus的问题，自动引入时，深色模式下显示popover的效果不对劲\n// https://github.com/element-plus/element-plus/issues/8113\n// https://github.com/element-plus/element-plus/pull/8133\n// 已在2.2.7修复\n// .el-popper.is-light {\n//   background: var(--el-bg-color-overlay);\n//   border: 1px solid var(--el-border-color-light);\n// }\n.el-divider--horizontal.hime-el-divider {\n  margin: 12px 0;\n}\n.el-table {\n  --el-bg-color: transparent;\n}\n</style>\n"
  },
  {
    "path": "src/renderer/control/components/Common/ConfigItem.vue",
    "content": "<template>\n  <div\n    class=\"hime-config-item\"\n    :class=\"{ 'hime-config-item--top': labelPosition === 'top' }\"\n  >\n    <div v-if=\"label\" class=\"hime-config-item__label\">{{ label }}:</div>\n    <slot></slot>\n  </div>\n</template>\n\n<script setup>\nconst props = defineProps({\n  label: String,\n  labelPosition: {\n    type: String,\n    default: \"left\",\n  },\n});\n</script>\n\n<style lang=\"scss\">\n.hime-config-item {\n  display: flex;\n  // 实践发现不设下面这一条的话small版的el-input-number会抽风\n  align-items: center;\n  + .hime-config-item {\n    margin-top: 10px;\n  }\n\n  &.hime-config-item--top {\n    flex-direction: column;\n    align-items: flex-start;\n    margin-top: initial;\n    & > .hime-config-item__label {\n      margin: 0 0 10px;\n      font-weight: bold;\n    }\n  }\n  .hime-config-item__label {\n    margin-right: 10px;\n  }\n  // https://github.com/element-plus/element-plus/issues/15834#issuecomment-1936919229\n  // 版本2.5.0后，el-select的样式发生了变化，需要手动置顶宽度，否则行内样式异常\n  // 那问题来了，之前的默认宽度是哪里来的？经过我的疯狂刨根问底，结论是，大概是用户代理样式表设定的默认行为……\n  & > .el-select {\n    --el-select-width: 160px;\n  }\n}\n</style>\n"
  },
  {
    "path": "src/renderer/control/components/Common/SvgIcon.vue",
    "content": "<template>\n  <svg aria-hidden=\"true\">\n    <use :xlink:href=\"symbolId\" :fill=\"color\" />\n  </svg>\n</template>\n\n<script>\nimport { defineComponent, computed } from \"vue\";\n\nexport default defineComponent({\n  name: \"SvgIcon\",\n  props: {\n    prefix: {\n      type: String,\n      default: \"icon\",\n    },\n    name: {\n      type: String,\n      required: true,\n    },\n    color: {\n      type: String,\n      default: \"#333\",\n    },\n  },\n  setup(props) {\n    const symbolId = computed(() => `#${props.prefix}-${props.name}`);\n    return { symbolId };\n  },\n});\n</script>\n"
  },
  {
    "path": "src/renderer/control/components/Common/SvgIconElButton.vue",
    "content": "<template>\n  <el-button>\n    <svg-icon :name=\"name\" class=\"hime-el-svg-icon\"></svg-icon>\n  </el-button>\n</template>\n\n<script setup>\nimport SvgIcon from \"@control/components/Common/SvgIcon.vue\";\nconst props = defineProps({\n  name: String,\n});\n</script>\n\n<style lang=\"scss\">\n.hime-el-svg-icon {\n  height: var(--el-font-size-base);\n  width: var(--el-font-size-base);\n  use {\n    fill: var(--el-button-text-color);\n  }\n}\n</style>\n"
  },
  {
    "path": "src/renderer/control/components/Common/TitleWithDivider.vue",
    "content": "<template>\n  <div style=\"font-size: 2rem\"><slot></slot></div>\n  <el-divider class=\"hime-el-divider\" />\n</template>\n\n<script setup></script>\n\n<style lang=\"scss\"></style>\n"
  },
  {
    "path": "src/renderer/control/components/Contents/About.vue",
    "content": "<template>\n  <div class=\"hime-content\">\n    <hime-title-with-divider>{{ $t(\"menu.about\") }}</hime-title-with-divider>\n    <el-card :class=\"{ hide, expend }\">\n      <div class=\"hime-about__logo\">\n        <div class=\"icon\" @click=\"toggleClass\">\n          <img :src=\"iconImage\" alt=\"\" />\n        </div>\n        <div class=\"hime-about__info\">\n          <div class=\"title\">Hime Display</div>\n          <div class=\"hime-about__info__item\">Version 1.2.0</div>\n          <div class=\"hime-about__info__item\">\n            Developed by\n            <a href=\"https://github.com/TSKI433\" @click.prevent=\"openLink\"\n              >TSKI433</a\n            >\n          </div>\n          <div class=\"hime-about__info__item\">\n            Illustrated by\n            <a\n              href=\"https://www.pixiv.net/users/72669923\"\n              @click.prevent=\"openLink\"\n              >MakoSaikou</a\n            >\n          </div>\n          <div class=\"hime-about__info__item\">\n            Special Thanks:\n            <a href=\"https://github.com/greenjerry\" @click.prevent=\"openLink\"\n              >greenjerry</a\n            >\n            |\n            <a href=\"https://github.com/pure01fx\" @click.prevent=\"openLink\"\n              >pure01fx</a\n            >\n          </div>\n          <div class=\"hime-about__info__item\">\n            Links:\n            <a\n              href=\"https://github.com/TSKI433/hime-display\"\n              @click.prevent=\"openLink\"\n              >GitHub</a\n            >\n            |\n            <a href=\"https://hime.xdrv.cn/\" @click.prevent=\"openLink\"\n              >Documention</a\n            >\n          </div>\n        </div>\n      </div>\n    </el-card>\n  </div>\n</template>\n\n<script setup>\nimport HimeTitleWithDivider from \"@control/components/Common/TitleWithDivider.vue\";\nimport iconImage from \"@control/assets/logo.png\";\nimport { ref } from \"vue\";\nconst hide = ref(false);\nconst expend = ref(false);\nfunction toggleClass() {\n  if (expend.value) {\n    expend.value = false;\n    hide.value = true;\n    setTimeout(() => {\n      hide.value = false;\n    }, 1000);\n  } else {\n    expend.value = true;\n  }\n}\nfunction openLink(event) {\n  window.nodeAPI.openLink(event.target.href);\n}\n</script>\n\n<style lang=\"scss\">\n@keyframes rotate {\n  0% {\n    transform: rotate3d(0, 0, 0, 0deg);\n  }\n  70% {\n    transform: rotate3d(0.3, 0.4, 0.2, 380deg);\n  }\n  85% {\n    transform: rotate3d(0.3, 0.4, 0.2, 350deg);\n  }\n  100% {\n    transform: rotate3d(0.3, 0.4, 0.2, 360deg);\n  }\n}\n.el-card {\n  margin-right: 178px;\n  margin-left: 178px;\n  transition: cubic-bezier(0.83, 0.28, 0.16, 0.98) 0.8s;\n  border-radius: 16px;\n  &.hide {\n    .hime-about__logo {\n      .icon {\n        animation: rotate 1s cubic-bezier(0.53, 0.15, 0.57, 0.96);\n      }\n      .hime-about__info {\n        opacity: 0;\n      }\n    }\n  }\n  &.expend {\n    margin-right: 0;\n    margin-left: 0;\n    .hime-about__logo {\n      .hime-about__info {\n        opacity: 1;\n      }\n    }\n  }\n  .hime-about__logo {\n    display: flex;\n    position: relative;\n    .icon {\n      width: 220px;\n      display: flex;\n      justify-content: center;\n      img {\n        height: 180px;\n      }\n    }\n    .hime-about__info {\n      transition: cubic-bezier(0.8, 0.31, 0.08, 0.82) 1.2s;\n      opacity: 0;\n      white-space: nowrap;\n      position: absolute;\n      left: 220px;\n      display: flex;\n      flex-direction: column;\n      justify-content: space-evenly;\n      align-items: flex-start;\n      .title {\n        font-size: 3rem;\n        a {\n          text-decoration: none;\n          color: var(--el-text-color-primary);\n        }\n      }\n      .hime-about__info__item {\n        margin-top: 4px;\n        font-size: var(--el-font-size-large);\n        color: var(--el-text-color-secondary);\n        a {\n          text-decoration: none;\n          color: var(--el-color-primary);\n        }\n      }\n    }\n  }\n}\n// .link-icon {\n//   height: 1em;\n//   width: 1em;\n//   use {\n//     fill: var(--el-text-color-secondary);\n//   }\n// }\n</style>\n"
  },
  {
    "path": "src/renderer/control/components/Contents/Control/Common/2d/EventAnimation.vue",
    "content": "<template>\n  <config-item :label=\"$t('control.animation.event-motion')\">\n    <el-select v-model=\"eventSelected\" style=\"width: 80px; margin-right: 12px\">\n      <el-option value=\"click\" />\n      <el-option value=\"drag\" />\n    </el-select>\n    <el-button @click=\"setEventAnimation('none')\">\n      {{ $t(\"control.animation.no-motion\") }}\n    </el-button>\n    <el-button @click=\"setEventAnimation('random')\">\n      {{ $t(\"control.animation.random-motion\") }}\n    </el-button>\n    <el-button\n      @click=\"setEventAnimation('database')\"\n      :disabled=\"!motionTableSelected\"\n    >\n      {{ $t(\"control.animation.selected-motion\") }}\n    </el-button>\n  </config-item>\n  <config-item :label=\"$t('control.animation.click-motion-now')\">\n    {{ clickAnimation.label }}\n  </config-item>\n  <config-item :label=\"$t('control.animation.drag-motion-now')\">\n    {{ dragAnimation.label }}\n  </config-item>\n</template>\n\n<script setup>\nimport ConfigItem from \"@control/components/Common/ConfigItem.vue\";\nimport { useAppStore } from \"@control/store/app\";\nimport { reactive, toRaw, ref } from \"vue\";\nconst appStore = useAppStore();\nconst ipcAPI = window.nodeAPI.ipc;\nconst props = defineProps({\n  currentMotion: Object,\n  motionTableSelected: Boolean,\n  modelType: String,\n});\nconst currentMotion = props.currentMotion;\n\nconst clickAnimation = reactive({\n  name: \"clickAnimation\",\n  value: \"random\",\n  // label用于UI显示\n  label: \"random\",\n});\nconst dragAnimation = reactive({\n  name: \"dragAnimation\",\n  value: \"none\",\n  label: \"none\",\n});\nconst eventSelected = ref(\"click\");\nfunction setEventAnimation(animation) {\n  const instantConfig =\n    eventSelected.value === \"click\" ? clickAnimation : dragAnimation;\n  if (animation === \"none\" || animation === \"random\") {\n    instantConfig.value = animation;\n    instantConfig.label = animation;\n    // 使用group曲线救国判断是否是live2d控制……\n  } else if (props.modelType === \"Live2d\") {\n    instantConfig.value = currentMotion.value.File\n      ? currentMotion.value.File\n      : currentMotion.value.file;\n    instantConfig.label = currentMotion.value.name;\n  } else if (props.modelType === \"Spine\") {\n    instantConfig.value = currentMotion.value.name;\n    instantConfig.label = currentMotion.value.name;\n  }\n  ipcAPI.sendToModelManager({\n    channel: \"control:change-instant-config\",\n    data: toRaw(instantConfig),\n  });\n}\n</script>\n\n<style lang=\"scss\"></style>\n"
  },
  {
    "path": "src/renderer/control/components/Contents/Control/Common/2d/Transform2D.vue",
    "content": "<template>\n  <config-item label=\"x\">\n    <el-input-number\n      :precision=\"2\"\n      :step=\"10\"\n      v-model=\"transform.x\"\n      @change=\"setModelTransform\"\n    >\n    </el-input-number>\n  </config-item>\n  <config-item label=\"y\">\n    <el-input-number\n      :precision=\"2\"\n      :step=\"10\"\n      v-model=\"transform.y\"\n      @change=\"setModelTransform\"\n    >\n    </el-input-number>\n  </config-item>\n  <config-item :label=\"$t('control.transform.scale')\">\n    <el-input-number\n      :precision=\"2\"\n      :step=\"0.01\"\n      v-model=\"transform.scale\"\n      @change=\"setModelTransform\"\n    >\n    </el-input-number>\n  </config-item>\n</template>\n\n<script setup>\nimport { reactive, toRaw } from \"vue\";\nimport ConfigItem from \"@control/components/Common/ConfigItem.vue\";\nimport { useAppStore } from \"@control/store/app\";\nconst appStore = useAppStore();\nconst ipcAPI = window.nodeAPI.ipc;\nconst transform = reactive({\n  x: 0,\n  y: 0,\n  scale: 1,\n});\nfunction setModelTransform() {\n  ipcAPI.sendToModelManager({\n    channel: \"control:set-model-transform\",\n    data: toRaw(transform),\n  });\n}\nipcAPI.handleSendToModelControl((event, message) => {\n  switch (message.channel) {\n    case \"manager:update-model-transform\": {\n      transform.x = message.data.x;\n      transform.y = message.data.y;\n      transform.scale = message.data.scale;\n      break;\n    }\n  }\n});\nipcAPI.sendToModelManager({\n  channel: \"control:query-model-transform\",\n  data: null,\n});\n</script>\n\n<style lang=\"scss\" scoped></style>\n"
  },
  {
    "path": "src/renderer/control/components/Contents/Control/Common/3d/AnimationControl.vue",
    "content": "<template>\n  <el-scrollbar max-height=\"400px\">\n    <el-collapse class=\"hime-control-collapse\">\n      <el-collapse-item\n        :title=\"$t('control.animation.motion-db')\"\n        name=\"motionDatabase\"\n      >\n        <el-table\n          :border=\"true\"\n          :data=\"appStore.database.motion3D\"\n          @current-change=\"changeCurrentMotionInfo\"\n          size=\"small\"\n          height=\"160\"\n          highlight-current-row\n        >\n          <el-table-column type=\"index\" width=\"60\" align=\"center\" />\n          <el-table-column\n            :label=\"$t('control.animation.motion-name')\"\n            prop=\"name\"\n            show-overflow-tooltip\n            width=\"300\"\n          />\n          <el-table-column\n            :label=\"$t('control.animation.extension-name')\"\n            align=\"center\"\n          >\n            <template #default=\"props\">\n              <el-tag effect=\"light\">\n                {{ props.row.extensionName }}\n              </el-tag>\n            </template>\n          </el-table-column>\n        </el-table>\n      </el-collapse-item>\n      <el-collapse-item\n        :title=\"$t('control.animation.audio-db')\"\n        name=\"audioDatabase\"\n      >\n        <el-table\n          :data=\"appStore.database.audio3D\"\n          :border=\"true\"\n          @current-change=\"changeCurrentAudioInfo\"\n          size=\"small\"\n          height=\"160\"\n          highlight-current-row\n        >\n          <el-table-column type=\"index\" width=\"60\" align=\"center\" />\n          <el-table-column\n            :label=\"$t('control.animation.audio-name')\"\n            prop=\"name\"\n            show-overflow-tooltip\n            width=\"300\"\n          />\n          <el-table-column\n            :label=\"$t('control.animation.extension-name')\"\n            align=\"center\"\n          >\n            <template #default=\"props\">\n              <el-tag effect=\"light\">\n                {{ props.row.extensionName }}\n              </el-tag>\n            </template>\n          </el-table-column>\n        </el-table>\n      </el-collapse-item>\n    </el-collapse>\n    <config-item :label=\"$t('control.animation.audio-delay')\">\n      <el-input-number\n        v-model=\"delayTime\"\n        :disabled=\"!audioTableSelected\"\n      ></el-input-number>\n    </config-item>\n    <config-item\n      :label=\"$t('control.animation.physics-simulation')\"\n      v-if=\"modelType == 'MMD'\"\n    >\n      <el-switch v-model=\"physicsSimulation.value\" />\n    </config-item>\n    <config-item\n      :label=\"$t('control.animation.mixamo-convert-mode')\"\n      v-if=\"modelType == 'MMD'\"\n    >\n      <el-select v-model=\"mixamoLegTranslateMode.value\">\n        <el-option :label=\"$t('control.animation.ik-calculate')\" value=\"ik\" />\n        <el-option\n          :label=\"$t('control.animation.rotate-calculate')\"\n          value=\"rotate\"\n        />\n      </el-select>\n    </config-item>\n    <config-item :label=\"$t('control.animation.loop-play')\">\n      <el-switch v-model=\"animationLoop\" />\n    </config-item>\n    <config-item :label=\"$t('control.animation.load')\">\n      <el-button @click=\"playMotion\" :disabled=\"!motionTableSelected\">{{\n        $t(\"control.animation.load-motion\")\n      }}</el-button>\n      <el-button\n        @click=\"playMotionWithAudio\"\n        :disabled=\"!motionTableSelected || !audioTableSelected\"\n        >{{ $t(\"control.animation.load-motion-and-audio\") }}</el-button\n      >\n    </config-item>\n    <config-item :label=\"$t('control.animation.control')\">\n      <el-button @click=\"setMotionState\" :disabled=\"!motionLoaded\">{{\n        motionPlaying\n          ? $t(\"control.animation.pause\")\n          : $t(\"control.animation.play\")\n      }}</el-button>\n      <el-button @click=\"quitAnimationPlay\" :disabled=\"!motionLoaded\">{{\n        $t(\"control.animation.quit-motion\")\n      }}</el-button>\n    </config-item>\n  </el-scrollbar>\n</template>\n\n<script setup>\nimport { useAppStore } from \"@control/store/app\";\nimport ConfigItem from \"@control/components/Common/ConfigItem.vue\";\n// 发现奇妙的现象，这里不引入ref不会直接报错，而是先蹦出两三百个vue的警告来\nimport { reactive, ref, watch, toRaw } from \"vue\";\nconst appStore = useAppStore();\nconst ipcAPI = window.nodeAPI.ipc;\nconst props = defineProps({\n  modelType: String,\n});\nconst currentMotionInfo = reactive({ value: null });\nconst currentAudioInfo = reactive({ value: null });\nconst motionTableSelected = ref(false);\nconst audioTableSelected = ref(false);\nconst animationLoop = ref(true);\nconst delayTime = ref(0);\nfunction changeCurrentMotionInfo(currentRow) {\n  motionTableSelected.value = true;\n  currentMotionInfo.value = currentRow;\n}\nfunction changeCurrentAudioInfo(currentRow) {\n  audioTableSelected.value = true;\n  currentAudioInfo.value = currentRow;\n}\nfunction playMotion() {\n  if (currentMotionInfo.value !== null) {\n    ipcAPI.sendToModelManager({\n      channel: \"control:play-motion\",\n      data: {\n        motionFilePath: currentMotionInfo.value.entranceFile,\n        animationLoop: animationLoop.value,\n      },\n    });\n  }\n}\nfunction playMotionWithAudio() {\n  if (currentMotionInfo.value !== null && currentAudioInfo.value !== null) {\n    ipcAPI.sendToModelManager({\n      channel: \"control:play-motion-with-audio\",\n      data: {\n        motionFilePath: currentMotionInfo.value.entranceFile,\n        audioFilePath: currentAudioInfo.value.entranceFile,\n        delayTime: delayTime.value,\n        // TODO：音频跟着loop，现在懒得做\n        animationLoop: animationLoop.value,\n      },\n    });\n  }\n}\nconst motionLoaded = ref(false);\nconst motionPlaying = ref(false);\nfunction setMotionState() {\n  if (motionLoaded.value) {\n    ipcAPI.sendToModelManager({\n      channel: \"control:set-motion-state\",\n      data: {\n        state: motionPlaying.value ? \"pause\" : \"play\",\n      },\n    });\n    motionPlaying.value = !motionPlaying.value;\n  }\n}\nfunction quitAnimationPlay() {\n  ipcAPI.sendToModelManager({\n    channel: \"control:quit-motion\",\n    data: null,\n  });\n  motionLoaded.value = false;\n  motionPlaying.value = false;\n}\nconst physicsSimulation = reactive({\n  name: \"physicsSimulation\",\n  value: true,\n});\nwatch(physicsSimulation, () => {\n  // 发现个有意思的问题，使用watch监视reactive，回调函数返回的新旧两个参数其实都指向那个reactive对象，所以下方的判断永远不成立\n  // if (newVal.value !== oldVal.value) {\n  ipcAPI.sendToModelManager({\n    channel: \"control:change-instant-config\",\n    data: toRaw(physicsSimulation),\n  });\n});\nconst mixamoLegTranslateMode = reactive({\n  name: \"mixamoLegTranslateMode\",\n  value: \"ik\",\n});\nwatch(mixamoLegTranslateMode, () => {\n  ipcAPI.sendToModelManager({\n    channel: \"control:change-instant-config\",\n    data: toRaw(mixamoLegTranslateMode),\n  });\n});\nipcAPI.handleSendToModelControl((event, message) => {\n  switch (message.channel) {\n    case \"manager:update-motion-info\": {\n      console.log(\"[Hime Display] Update motion info:\", message.data);\n      motionLoaded.value = true;\n      motionPlaying.value = true;\n      break;\n    }\n  }\n});\n</script>\n\n<style lang=\"scss\">\n.hime-control-collapse {\n  margin-bottom: 16px;\n}\n</style>\n"
  },
  {
    "path": "src/renderer/control/components/Contents/Control/Common/3d/ObjectTransform3D.vue",
    "content": "<template>\n  <config-item :label=\"$t('control.transform.tree-select')\">\n    <el-tree-select\n      :data=\"[transformInfo.tree]\"\n      check-strictly\n      v-model=\"nodeIdNow\"\n    />\n  </config-item>\n  <!-- 我去，这几天这么巧的吗，又碰到一个Element Plus刚刚修复了的bug：https://github.com/element-plus/element-plus/issues/8542 -->\n  <config-item :label=\"$t('control.transform.auto-fill-select')\">\n    <el-select v-model=\"nodeIdNow\" filterable>\n      <el-option\n        v-for=\"transformItem in transformInfo.list\"\n        :label=\"transformItem.label\"\n        :value=\"transformItem.value\"\n      >\n      </el-option>\n    </el-select>\n  </config-item>\n  <transform\n    :transform-object=\"transformObject\"\n    @input=\"setNodeTransform\"\n    :disabled=\"nodeIdNow === ''\"\n  ></transform>\n</template>\n\n<script setup>\nimport Transform from \"./Transform3D.vue\";\nimport ConfigItem from \"@control/components/Common/ConfigItem.vue\";\nimport { reactive, ref, watch, toRaw } from \"vue\";\nimport { useAppStore } from \"@control/store/app\";\nconst appStore = useAppStore();\nconst ipcAPI = window.nodeAPI.ipc;\nconst props = defineProps({\n  transformInfo: Object,\n});\nconst transformObject = reactive({\n  position: { x: 0, y: 0, z: 0 },\n  rotation: { x: 0, y: 0, z: 0 },\n  scale: { x: 1, y: 1, z: 1 },\n});\nconst nodeIdNow = ref(\"\");\n// 此处发现，vue的watch对于ref返回原始值，对于reactive返回代理值\nwatch(nodeIdNow, (newId, oldId) => {\n  if (newId === oldId) return;\n  ipcAPI.sendToModelManager({\n    channel: \"control:bind-node-transform\",\n    data: { nodeId: newId },\n  });\n});\n// 这里和morph不一样，不用watch了，下方对\"manager:update-node-transform\"事件的处理（出于懒）使用了直接赋值position，rotation，scale，改变了引用对象，因此展示器那边带来的数据更新也会触发watch，带来不必要的消耗（甚至可能导致死循环，不过根据目前monitor的监测机制，应该会在第二重循环上就拦住的）\n// watch(transformObject, (newTransform) => {\n//      ipcAPI.setNodeTransform(nodeIdNow.value,toRaw(newTransform))\n// });\nfunction setNodeTransform() {\n  ipcAPI.sendToModelManager({\n    channel: \"control:set-node-transform\",\n    data: {\n      nodeId: nodeIdNow.value,\n      transform: toRaw(transformObject),\n    },\n  });\n}\n\n// 照理来讲，模型控制这一级的组件没用keep-alive，动态组件切换后事件监听也能正确弄过去？（目前已在切换组件时已进行了事件监听清理）\nipcAPI.handleSendToModelControl((event, message) => {\n  switch (message.channel) {\n    case \"manager:update-node-transform\": {\n      // 直接赋值会完全失去响应性\n      transformObject.position = message.data.position;\n      transformObject.rotation = message.data.rotation;\n      transformObject.scale = message.data.scale;\n      break;\n    }\n  }\n});\n</script>\n\n<style lang=\"scss\"></style>\n"
  },
  {
    "path": "src/renderer/control/components/Contents/Control/Common/3d/ParameterControl.vue",
    "content": "<template>\n  <config-item :label=\"$t('control.parameter.morph')\" label-position=\"top\">\n    <config-item :label=\"$t('control.parameter.target-select')\">\n      <el-select\n        v-model=\"selectedMorphName\"\n        @change=\"bindMorphTarget\"\n        filterable\n      >\n        <el-option\n          v-for=\"morphName in morphInfo\"\n          :label=\"morphName\"\n          :value=\"morphName\"\n        />\n      </el-select>\n    </config-item>\n    <config-item\n      :label=\"$t('control.parameter.parameter-control')\"\n      style=\"width: 100%\"\n    >\n      <el-slider\n        v-model=\"morphWeight\"\n        :min=\"0\"\n        :max=\"1\"\n        :step=\"0.1\"\n        style=\"width: 60%; margin-left: 10px\"\n        :disabled=\"selectedMorphName === ''\"\n      />\n    </config-item>\n  </config-item>\n  <el-divider style=\"margin: 12px 0\" />\n  <config-item :label=\"$t('control.parameter.mouse-focus')\">\n    <el-switch v-model=\"trackMouse.value\" />\n  </config-item>\n  <template v-if=\"modelType == 'VRoid'\">\n    <config-item :label=\"$t('control.parameter.vrm-calculate')\">\n      <el-switch v-model=\"vrmUpdate.value\" />\n    </config-item>\n  </template>\n</template>\n\n<script setup>\nimport ConfigItem from \"@control/components/Common/ConfigItem.vue\";\nimport { ref, watch, reactive, toRaw } from \"vue\";\nimport { useAppStore } from \"@control/store/app\";\nconst appStore = useAppStore();\nconst ipcAPI = window.nodeAPI.ipc;\nconst props = defineProps({\n  morphInfo: Object,\n  modelType: String,\n});\n// 若使用morph的index作为传递目标，可能存在难以发现的隐患\nconst selectedMorphName = ref(\"\");\nconst morphWeight = ref(0);\nfunction bindMorphTarget() {\n  if (selectedMorphName.value === \"\") return;\n  ipcAPI.sendToModelManager({\n    channel: \"control:bind-morph-target\",\n    data: {\n      morphName: selectedMorphName.value,\n    },\n  });\n}\nfunction setMorphWeight() {\n  ipcAPI.sendToModelManager({\n    channel: \"control:set-morph-weight\",\n    data: {\n      morphName: selectedMorphName.value,\n      weight: morphWeight.value,\n    },\n  });\n}\n// 这里和live2d的参数控制一样，不再用input事件触发setMorphWeight函数，改为watch了，理由是，el-slider控件设定step参数后，即使参数没有更新，有滑动的操作也可能触发input，这样会导致setMorphWeight函数重复触发，消耗性能，由于这里监听的morphWeight是ref包裹的原始值，所以也不用担心会像ObjectTransform.vue里面那样意外的由于watch触发setMorphWeight函数。\nwatch(morphWeight, setMorphWeight);\nipcAPI.handleSendToModelControl((event, message) => {\n  switch (message.channel) {\n    case \"manager:update-node-morph\": {\n      morphWeight.value = message.data.weight;\n      break;\n    }\n  }\n});\n\n// 鼠标跟踪\nconst trackMouse = reactive({\n  name: \"trackMouse\",\n  value: true,\n});\nwatch(trackMouse, () => {\n  ipcAPI.sendToModelManager({\n    channel: \"control:change-instant-config\",\n    data: toRaw(trackMouse),\n  });\n});\n\n// VRM演算控制\nconst vrmUpdate = reactive({\n  name: \"vrmUpdate\",\n  value: true,\n});\nwatch(vrmUpdate, () => {\n  ipcAPI.sendToModelManager({\n    channel: \"control:change-instant-config\",\n    data: toRaw(vrmUpdate),\n  });\n});\n</script>\n\n<style lang=\"scss\"></style>\n"
  },
  {
    "path": "src/renderer/control/components/Contents/Control/Common/3d/Transform3D.vue",
    "content": "<template>\n  <!-- 遇到一个坑，如果template下级有多个元素的话，下方的input事件就会无法正确向上传递 -->\n  <div class=\"hime-transform--3d\">\n    <config-item\n      :label=\"$t('control.transform.position')\"\n      label-position=\"top\"\n      class=\"hime-transform--3d__item\"\n    >\n      <!-- 多层组件嵌套导致input事件无法从底层的el-input-number向上传递，因此需要在上级组件再次设定事件传递， -->\n      <config-item :label=\"i\" v-for=\"i in xyz\">\n        <el-input-number\n          :precision=\"2\"\n          v-model=\"transformObject.position[i]\"\n          @input=\"$emit('input')\"\n          :disabled=\"disabled\"\n        ></el-input-number>\n      </config-item>\n    </config-item>\n    <config-item\n      :label=\"$t('control.transform.rotation')\"\n      label-position=\"top\"\n      class=\"hime-transform--3d__item\"\n    >\n      <config-item :label=\"i\" v-for=\"i in xyz\">\n        <el-input-number\n          :precision=\"2\"\n          v-model=\"transformObject.rotation[i]\"\n          @input=\"$emit('input')\"\n          :disabled=\"disabled\"\n        ></el-input-number>\n      </config-item>\n    </config-item>\n    <config-item\n      :label=\"$t('control.transform.scale')\"\n      label-position=\"top\"\n      class=\"hime-transform--3d__item\"\n    >\n      <config-item :label=\"i\" v-for=\"i in xyz\">\n        <el-input-number\n          :precision=\"2\"\n          v-model=\"transformObject.scale[i]\"\n          @input=\"$emit('input')\"\n          :disabled=\"disabled\"\n        ></el-input-number>\n      </config-item>\n    </config-item>\n  </div>\n</template>\n\n<script setup>\nimport ConfigItem from \"@control/components/Common/ConfigItem.vue\";\n// 由于VRoid和MMD的模型大小不在一个量级上，且VRoid模型更改大小会导致模型的物理模拟炸毛，这里根据实际情况改变位置设定步长\nconst xyz = [\"x\", \"y\", \"z\"];\nconst props = defineProps({\n  positionStep: Number,\n  transformObject: Object,\n  disabled: Boolean,\n});\n</script>\n\n<style lang=\"scss\">\n.hime-transform--3d {\n  display: flex;\n  .hime-transform--3d__item {\n    margin-right: 20px;\n    margin-top: 12px;\n  }\n}\n</style>\n"
  },
  {
    "path": "src/renderer/control/components/Contents/Control/Common/ControlLoadError.vue",
    "content": "<template>{{ $t(\"control.control-load-error\") }}</template>\n\n<script setup></script>\n\n<style lang=\"scss\"></style>\n"
  },
  {
    "path": "src/renderer/control/components/Contents/Control/Common/ModelDescription.vue",
    "content": "<template>\n  <el-descriptions border size=\"small\" direction=\"vertical\" :column=\"5\">\n    <el-descriptions-item\n      align=\"center\"\n      width=\"20%\"\n      :label=\"$t(`control.description.${descriptionItem.label}`)\"\n      v-for=\"descriptionItem in description\"\n      >{{ descriptionItem.value }}</el-descriptions-item\n    >\n  </el-descriptions>\n</template>\n\n<script setup>\nconst props = defineProps({\n  description: Object,\n});\n</script>\n\n<style lang=\"scss\"></style>\n"
  },
  {
    "path": "src/renderer/control/components/Contents/Control/Common/MotionCapture.vue",
    "content": "<template>\n  <config-item\n    :label=\"$t('control.capture.capture-type')\"\n    v-if=\"modelType == 'MMD' || modelType == 'VRoid'\"\n  >\n    <el-radio-group v-model=\"motionCaptureType\">\n      <el-radio-button label=\"faceMesh\">{{\n        $t(\"control.capture.face-capture\")\n      }}</el-radio-button>\n      <el-radio-button label=\"holistic\">{{\n        $t(\"control.capture.holistic-capture\")\n      }}</el-radio-button>\n    </el-radio-group>\n  </config-item>\n  <config-item :label=\"$t('control.capture.capture-control')\">\n    <el-button @click=\"launchCapture\" :disabled=\"capturing\">{{\n      $t(\"control.capture.start-capture\")\n    }}</el-button>\n    <el-button @click=\"quitCapture\" :disabled=\"!capturing\" type=\"danger\">\n      {{ $t(\"control.capture.quit-capture\") }}</el-button\n    >\n  </config-item>\n</template>\n\n<script setup>\nimport { useAppStore } from \"@control/store/app\";\nimport ConfigItem from \"@control/components/Common/ConfigItem.vue\";\nimport { ref } from \"vue\";\nconst props = defineProps({\n  modelType: String,\n});\nconst appStore = useAppStore();\nconst ipcAPI = window.nodeAPI.ipc;\nconst capturing = ref(false);\nconst motionCaptureType = ref(\"faceMesh\");\nfunction launchCapture() {\n  ipcAPI.sendToModelManager({\n    channel: \"control:launch-capture\",\n    data: {\n      type: motionCaptureType.value,\n    },\n  });\n  capturing.value = true;\n}\nfunction quitCapture() {\n  ipcAPI.sendToModelManager({\n    channel: \"control:quit-capture\",\n    data: null,\n  });\n  capturing.value = false;\n}\n</script>\n\n<style lang=\"scss\"></style>\n"
  },
  {
    "path": "src/renderer/control/components/Contents/Control/Live2DControl/AnimationControl.vue",
    "content": "<template>\n  <el-table\n    :data=\"motions\"\n    :border=\"true\"\n    @current-change=\"changeCurrentMotion\"\n    highlight-current-row\n    height=\"200\"\n    size=\"small\"\n    style=\"margin-bottom: 12px\"\n    tooltip-effect=\"light\"\n  >\n    <el-table-column type=\"index\" width=\"60\" align=\"center\" />\n    <el-table-column\n      :label=\"$t('control.animation.motion-name')\"\n      show-overflow-tooltip\n      prop=\"name\"\n      align=\"center\"\n    >\n    </el-table-column>\n    <el-table-column\n      :label=\"$t('control.animation.motion-group')\"\n      prop=\"group\"\n      width=\"200\"\n      align=\"center\"\n    >\n    </el-table-column>\n  </el-table>\n  <config-item :label=\"$t('control.animation.operate')\">\n    <el-button @click=\"loadMotionNow\">\n      {{ $t(\"control.animation.load-motion\") }}\n    </el-button>\n  </config-item>\n  <el-divider style=\"margin: 12px 0\" />\n  <event-animation\n    :current-motion=\"currentMotion\"\n    :motion-table-selected=\"motiontableSelected\"\n    model-type=\"Live2D\"\n  ></event-animation>\n</template>\n\n<script setup>\nimport { computed, ref, toRaw, reactive } from \"vue\";\nimport ConfigItem from \"@control/components/Common/ConfigItem.vue\";\nimport EventAnimation from \"../Common/2d/EventAnimation.vue\";\nimport { useAppStore } from \"@control/store/app\";\nconst appStore = useAppStore();\nconst ipcAPI = window.nodeAPI.ipc;\n// 直接赋值为null在各种响应式需求下会很不妙\nconst currentMotion = reactive({ value: null });\nconst motiontableSelected = ref(false);\nconst props = defineProps({\n  motionInfo: Object,\n});\nconst motions = computed(function () {\n  const motionList = [];\n  Object.keys(props.motionInfo).forEach((motionGroupName) => {\n    props.motionInfo[motionGroupName].forEach((motion, index) => {\n      motion.group = motionGroupName;\n      // moc与moc3的入口文件属性名不同\n      motion.name =\n        (motion.File || motion.file) &&\n        /(?<=\\/?)[^\\/]+(?=\\.(json|mtn))/.exec(motion.File || motion.file)[0];\n      motionList.push(motion);\n    });\n  });\n  return motionList;\n});\nfunction changeCurrentMotion(currentRow) {\n  motiontableSelected.value = true;\n  currentMotion.value = currentRow;\n}\nfunction loadMotionNow() {\n  ipcAPI.sendToModelManager({\n    channel: \"control:play-motion\",\n    data: {\n      motion: toRaw(currentMotion.value),\n    },\n  });\n}\n</script>\n\n<style lang=\"scss\"></style>\n"
  },
  {
    "path": "src/renderer/control/components/Contents/Control/Live2DControl/ParameterControl.vue",
    "content": "<template>\n  <config-item label=\"Parameter\" label-position=\"top\">\n    <config-item :label=\"$t('control.parameter.target-select')\">\n      <el-select\n        v-model=\"selectedParameterId\"\n        @change=\"bindParameterId\"\n        filterable\n      >\n        <el-option\n          v-for=\"parameterId in parameterInfo._parameterIds\"\n          :label=\"parameterId\"\n          :value=\"parameterId\"\n        />\n      </el-select>\n    </config-item>\n    <config-item\n      :label=\"$t('control.parameter.parameter-control')\"\n      style=\"width: 100%\"\n    >\n      <el-slider\n        v-model=\"parameterValue\"\n        :min=\"parameterInfo._parameterMinimumValues[selectedParameterIndex]\"\n        :max=\"parameterInfo._parameterMaximumValues[selectedParameterIndex]\"\n        :step=\"0.1\"\n        style=\"width: 60%; margin-left: 10px\"\n        :disabled=\"selectedParameterId === ''\"\n      />\n    </config-item>\n  </config-item>\n  <el-divider style=\"margin: 12px 0\" />\n  <config-item\n    :label=\"$t('control.parameter.part-opacity')\"\n    label-position=\"top\"\n  >\n    <config-item :label=\"$t('control.parameter.target-select')\">\n      <el-select v-model=\"selectedPartId\" @change=\"bindPartId\" filterable>\n        <el-option v-for=\"partId in partInfo\" :label=\"partId\" :value=\"partId\" />\n      </el-select>\n    </config-item>\n    <config-item\n      :label=\"$t('control.parameter.parameter-control')\"\n      style=\"width: 100%\"\n    >\n      <el-slider\n        v-model=\"partOpacity\"\n        :min=\"0\"\n        :max=\"1\"\n        :step=\"0.05\"\n        style=\"width: 60%; margin-left: 10px\"\n        :disabled=\"selectedPartId === ''\"\n        @input=\"setPartOpacity\"\n      />\n    </config-item>\n  </config-item>\n  <el-divider style=\"margin: 12px 0\" />\n  <config-item :label=\"$t('control.parameter.mouse-focus')\">\n    <el-switch v-model=\"trackMouse.value\" />\n  </config-item>\n  <config-item :label=\"$t('control.parameter.auto-breath')\">\n    <el-switch v-model=\"autoBreath.value\" />\n  </config-item>\n  <config-item :label=\"$t('control.parameter.auto-eye-blink')\">\n    <el-switch v-model=\"autoEyeBlink.value\" />\n  </config-item>\n</template>\n\n<script setup>\nimport ConfigItem from \"@control/components/Common/ConfigItem.vue\";\nimport { computed, ref, watch, reactive, toRaw } from \"vue\";\nimport { useAppStore } from \"@control/store/app\";\nconst appStore = useAppStore();\nconst ipcAPI = window.nodeAPI.ipc;\nconst props = defineProps({\n  parameterInfo: Object,\n  partInfo: Object,\n});\nconst selectedParameterId = ref(\"\");\nconst parameterValue = ref(0);\nconst selectedParameterIndex = computed(() => {\n  return props.parameterInfo._parameterIds.indexOf(selectedParameterId.value);\n});\nfunction bindParameterId() {\n  if (selectedParameterId.value === \"\") return;\n  ipcAPI.sendToModelManager({\n    channel: \"control:bind-parameter\",\n    data: {\n      parameterId: selectedParameterId.value,\n    },\n  });\n}\nfunction setParameterValue() {\n  ipcAPI.sendToModelManager({\n    channel: \"control:set-parameter\",\n    data: {\n      parameterId: selectedParameterId.value,\n      value: parameterValue.value,\n    },\n  });\n}\n// 若检测input事件，会在相同的parameterValue下多次触发事件，消耗性能\nwatch(parameterValue, setParameterValue);\nconst selectedPartId = ref(\"\");\nconst partOpacity = ref(0);\nfunction bindPartId() {\n  if (selectedPartId.value === \"\") return;\n  ipcAPI.sendToModelManager({\n    channel: \"control:bind-part\",\n    data: {\n      partId: selectedPartId.value,\n    },\n  });\n}\nfunction setPartOpacity() {\n  ipcAPI.sendToModelManager({\n    channel: \"control:set-part\",\n    data: {\n      partId: selectedPartId.value,\n      value: partOpacity.value,\n    },\n  });\n}\nwatch(partOpacity, setPartOpacity);\nipcAPI.handleSendToModelControl((event, message) => {\n  switch (message.channel) {\n    case \"manager:update-parameter\": {\n      parameterValue.value = message.data.value;\n      break;\n    }\n    // 虽然没怎么遇到part可见性的动画，但是通过分析live2d的motion文件发现，partOpacity也是可以设定动画帧的\n    case \"manager:update-part\": {\n      partOpacity.value = message.data.value;\n    }\n  }\n});\nconst trackMouse = reactive({\n  name: \"trackMouse\",\n  value: true,\n});\nwatch(trackMouse, () => {\n  ipcAPI.sendToModelManager({\n    channel: \"control:change-instant-config\",\n    data: toRaw(trackMouse),\n  });\n});\nconst autoBreath = reactive({\n  name: \"autoBreath\",\n  value: true,\n});\nwatch(autoBreath, () => {\n  ipcAPI.sendToModelManager({\n    channel: \"control:change-instant-config\",\n    data: toRaw(autoBreath),\n  });\n});\nconst autoEyeBlink = reactive({\n  name: \"autoEyeBlink\",\n  value: true,\n});\nwatch(autoEyeBlink, () => {\n  ipcAPI.sendToModelManager({\n    channel: \"control:change-instant-config\",\n    data: toRaw(autoEyeBlink),\n  });\n});\n</script>\n\n<style lang=\"scss\"></style>\n"
  },
  {
    "path": "src/renderer/control/components/Contents/Control/Live2DControl/index.vue",
    "content": "<template>\n  <div class=\"hime-model-control\">\n    <el-tabs type=\"border-card\">\n      <el-tab-pane :label=\"$t(`control.model-description`)\">\n        <model-description\n          v-if=\"controlStore.modelControlInfo?.description !== undefined\"\n          :description=\"controlStore.modelControlInfo.description\"\n        >\n        </model-description>\n        <template v-else>\n          <control-load-error></control-load-error>\n        </template>\n      </el-tab-pane>\n      <el-tab-pane :label=\"$t(`control.object-transform`)\">\n        <transform></transform>\n      </el-tab-pane>\n      <el-tab-pane :label=\"$t(`control.animation-control`)\">\n        <animation-control\n          v-if=\"controlStore.modelControlInfo?.motion !== undefined\"\n          :motion-info=\"controlStore.modelControlInfo.motion\"\n        >\n        </animation-control>\n        <template v-else>\n          <control-load-error></control-load-error>\n        </template>\n      </el-tab-pane>\n      <el-tab-pane :label=\"$t(`control.parameter-control`)\">\n        <parameter-control\n          v-if=\"\n            controlStore.modelControlInfo?.parameter !== undefined &&\n            controlStore.modelControlInfo?.part !== undefined\n          \"\n          :parameter-info=\"controlStore.modelControlInfo.parameter\"\n          :part-info=\"controlStore.modelControlInfo.part\"\n        ></parameter-control>\n        <template v-else>\n          <control-load-error></control-load-error>\n        </template>\n      </el-tab-pane>\n      <el-tab-pane :label=\"$t(`control.motion-capture`)\">\n        <motion-capture model-type=\"Live2D\"></motion-capture>\n      </el-tab-pane>\n    </el-tabs>\n  </div>\n</template>\n\n<script setup>\nimport ControlLoadError from \"../Common/ControlLoadError.vue\";\nimport ModelDescription from \"../Common/ModelDescription.vue\";\nimport Transform from \"../Common/2d/Transform2D.vue\";\nimport AnimationControl from \"./AnimationControl.vue\";\nimport ParameterControl from \"./ParameterControl.vue\";\nimport MotionCapture from \"../Common/MotionCapture.vue\";\nimport { useControlStore } from \"@control/store/control\";\nconst controlStore = useControlStore();\n</script>\n\n<style lang=\"scss\"></style>\n"
  },
  {
    "path": "src/renderer/control/components/Contents/Control/MMDControl/index.vue",
    "content": "<template>\n  <div class=\"hime-model-control\">\n    <!-- 弃用方案：使用Menu组件构建 -->\n    <!-- <el-menu\n      @select=\"handleSelect\"\n      mode=\"horizontal\"\n      class=\"hime-el-menu--sub-control\"\n      :ellipsis=\"false\"\n      :default-active=\"subControlComponentNameNow\"\n    >\n      <el-menu-item index=\"ModelDescription\">模型信息</el-menu-item>\n      <el-menu-item index=\"ObjectTransform\">对象变换</el-menu-item>\n      <el-menu-item index=\"AnimationControl\">动画播放</el-menu-item>\n      <el-menu-item index=\"MotionCapture\">动作捕捉</el-menu-item>\n    </el-menu> -->\n    <el-tabs type=\"border-card\">\n      <!-- 这里用v-for实在是麻烦，还是依次设置 -->\n      <el-tab-pane :label=\"$t(`control.model-description`)\">\n        <model-description\n          v-if=\"controlStore.modelControlInfo?.description !== undefined\"\n          :description=\"controlStore.modelControlInfo.description\"\n        >\n        </model-description>\n        <template v-else>\n          <control-load-error></control-load-error>\n        </template>\n      </el-tab-pane>\n      <el-tab-pane :label=\"$t(`control.object-transform`)\">\n        <object-transform\n          v-if=\"controlStore.modelControlInfo?.transform !== undefined\"\n          :transform-info=\"controlStore.modelControlInfo.transform\"\n        >\n        </object-transform>\n        <template v-else>\n          <control-load-error></control-load-error>\n        </template>\n      </el-tab-pane>\n      <el-tab-pane :label=\"$t(`control.animation-control`)\">\n        <animation-control model-type=\"MMD\"> </animation-control>\n      </el-tab-pane>\n      <el-tab-pane :label=\"$t(`control.parameter-control`)\">\n        <parameter-control\n          v-if=\"controlStore.modelControlInfo?.morph !== undefined\"\n          :morph-info=\"controlStore.modelControlInfo.morph\"\n          model-type=\"MMD\"\n        >\n        </parameter-control>\n        <template v-else>\n          <control-load-error></control-load-error>\n        </template>\n      </el-tab-pane>\n      <el-tab-pane :label=\"$t(`control.motion-capture`)\">\n        <motion-capture model-type=\"MMD\"> </motion-capture>\n      </el-tab-pane>\n    </el-tabs>\n  </div>\n</template>\n\n<script setup>\nimport ControlLoadError from \"../Common/ControlLoadError.vue\";\nimport ModelDescription from \"../Common/ModelDescription.vue\";\nimport ObjectTransform from \"../Common/3d/ObjectTransform3D.vue\";\nimport AnimationControl from \"../Common/3d/AnimationControl.vue\";\nimport ParameterControl from \"../Common/3d/ParameterControl.vue\";\nimport MotionCapture from \"../Common/MotionCapture.vue\";\nimport { useControlStore } from \"@control/store/control\";\nconst controlStore = useControlStore();\n</script>\n\n<style lang=\"scss\"></style>\n"
  },
  {
    "path": "src/renderer/control/components/Contents/Control/SpineControl/AnimationControl.vue",
    "content": "<template>\n  <el-scrollbar max-height=\"400px\">\n    <config-item\n      :label=\"$t('control.animation.motion-db')\"\n      label-position=\"top\"\n    >\n      <el-table\n        :border=\"true\"\n        :data=\"motionInfo\"\n        @current-change=\"changeCurrentMotion\"\n        highlight-current-row\n        height=\"200\"\n        size=\"small\"\n        tooltip-effect=\"light\"\n      >\n        <el-table-column type=\"index\" width=\"60\" align=\"center\" />\n        <el-table-column\n          :label=\"$t('control.animation.motion-name')\"\n          prop=\"name\"\n          align=\"center\"\n        />\n        <el-table-column\n          :label=\"$t('control.animation.motion-duration')\"\n          prop=\"duration\"\n          width=\"200\"\n          align=\"center\"\n        />\n      </el-table>\n    </config-item>\n    <config-item :label=\"$t('control.animation.loop-play')\">\n      <el-switch v-model=\"animationLoop\" />\n    </config-item>\n    <config-item :label=\"$t('control.animation.operate')\">\n      <el-button @click=\"loadMotionNow\">\n        {{ $t(\"control.animation.load-motion\") }}\n      </el-button>\n      <el-button @click=\"quitMotion\">\n        {{ $t(\"control.animation.quit-motion\") }}\n      </el-button>\n    </config-item>\n    <el-divider style=\"margin: 12px 0\" />\n    <event-animation\n      :current-motion=\"currentMotion\"\n      :motion-table-selected=\"motionTableSelected\"\n      modelType=\"Spine\"\n    ></event-animation>\n  </el-scrollbar>\n</template>\n\n<script setup>\nimport { ref, toRaw, reactive } from \"vue\";\nimport ConfigItem from \"@control/components/Common/ConfigItem.vue\";\nimport EventAnimation from \"../Common/2d/EventAnimation.vue\";\nimport { useAppStore } from \"@control/store/app\";\nconst appStore = useAppStore();\nconst ipcAPI = window.nodeAPI.ipc;\nconst currentMotion = reactive({ value: null });\nconst motionTableSelected = ref(false);\nconst animationLoop = ref(true);\nconst props = defineProps({\n  motionInfo: Object,\n});\nfunction changeCurrentMotion(currentRow) {\n  motionTableSelected.value = true;\n  currentMotion.value = currentRow;\n}\nfunction loadMotionNow() {\n  ipcAPI.sendToModelManager({\n    channel: \"control:play-motion\",\n    data: {\n      motion: toRaw(currentMotion.value),\n      animationLoop: animationLoop.value,\n    },\n  });\n}\nfunction quitMotion() {\n  ipcAPI.sendToModelManager({\n    channel: \"control:quit-motion\",\n    data: null,\n  });\n}\n</script>\n\n<style lang=\"scss\"></style>\n"
  },
  {
    "path": "src/renderer/control/components/Contents/Control/SpineControl/ParameterControl.vue",
    "content": "<template>\n  <config-item :label=\"$t('control.parameter.skin')\">\n    <el-select v-model=\"selectedSkin\" @change=\"setSkin\" filterable>\n      <el-option v-for=\"skin in skinInfo\" :label=\"skin\" :value=\"skin\" />\n    </el-select>\n  </config-item>\n</template>\n\n<script setup>\nimport ConfigItem from \"@control/components/Common/ConfigItem.vue\";\nimport { ref } from \"vue\";\nimport { useAppStore } from \"@control/store/app\";\nconst appStore = useAppStore();\nconst ipcAPI = window.nodeAPI.ipc;\nconst props = defineProps({\n  skinInfo: Object,\n});\nconst selectedSkin = ref(\"default\");\nfunction setSkin() {\n  ipcAPI.sendToModelManager({\n    channel: \"control:set-skin\",\n    data: {\n      skin: selectedSkin.value,\n    },\n  });\n}\n</script>\n\n<style lang=\"scss\"></style>\n"
  },
  {
    "path": "src/renderer/control/components/Contents/Control/SpineControl/index.vue",
    "content": "<template>\n  <div class=\"hime-model-control\">\n    <el-tabs type=\"border-card\">\n      <el-tab-pane :label=\"$t(`control.model-description`)\">\n        <template\n          v-if=\"controlStore.modelControlInfo?.description !== undefined\"\n        >\n          <model-description\n            :description=\"controlStore.modelControlInfo.description\"\n          >\n          </model-description>\n          <div\n            style=\"\n              color: var(--el-text-color-secondary);\n              margin: 1rem auto 0;\n              width: 95%;\n            \"\n          >\n            {{ $t(`control.description.spine-license`) }}\n          </div>\n        </template>\n        <template v-else>\n          <control-load-error></control-load-error>\n        </template>\n      </el-tab-pane>\n      <el-tab-pane :label=\"$t(`control.object-transform`)\">\n        <transform></transform>\n      </el-tab-pane>\n      <el-tab-pane :label=\"$t(`control.animation-control`)\">\n        <animation-control\n          v-if=\"controlStore.modelControlInfo?.motion !== undefined\"\n          :motion-info=\"controlStore.modelControlInfo.motion\"\n        >\n        </animation-control>\n        <template v-else>\n          <control-load-error></control-load-error>\n        </template>\n      </el-tab-pane>\n      <el-tab-pane :label=\"$t(`control.parameter-control`)\">\n        <parameter-control\n          v-if=\"controlStore.modelControlInfo?.skin !== undefined\"\n          :skin-info=\"controlStore.modelControlInfo.skin\"\n        ></parameter-control>\n      </el-tab-pane>\n    </el-tabs>\n  </div>\n</template>\n\n<script setup>\nimport ControlLoadError from \"../Common/ControlLoadError.vue\";\nimport ModelDescription from \"../Common/ModelDescription.vue\";\nimport Transform from \"../Common/2d/Transform2D.vue\";\nimport AnimationControl from \"./AnimationControl.vue\";\nimport ParameterControl from \"./ParameterControl.vue\";\nimport { useControlStore } from \"@control/store/control\";\nconst controlStore = useControlStore();\n</script>\n\n<style lang=\"scss\"></style>\n"
  },
  {
    "path": "src/renderer/control/components/Contents/Control/VRoidControl/index.vue",
    "content": "<template>\n  <div class=\"hime-model-control\">\n    <!-- 弃用方案：使用Menu组件构建 -->\n    <!-- <el-menu\n      @select=\"handleSelect\"\n      mode=\"horizontal\"\n      class=\"hime-el-menu--sub-control\"\n      :ellipsis=\"false\"\n      :default-active=\"subControlComponentNameNow\"\n    >\n      <el-menu-item index=\"ModelDescription\">模型信息</el-menu-item>\n      <el-menu-item index=\"ObjectTransform\">对象变换</el-menu-item>\n      <el-menu-item index=\"AnimationControl\">动画播放</el-menu-item>\n      <el-menu-item index=\"MotionCapture\">动作捕捉</el-menu-item>\n    </el-menu> -->\n    <el-tabs type=\"border-card\">\n      <!-- 这里用v-for实在是麻烦，还是依次设置 -->\n      <el-tab-pane :label=\"$t(`control.model-description`)\">\n        <model-description\n          v-if=\"controlStore.modelControlInfo?.description !== undefined\"\n          :description=\"controlStore.modelControlInfo.description\"\n        >\n        </model-description>\n        <template v-else>\n          <control-load-error></control-load-error>\n        </template>\n      </el-tab-pane>\n      <el-tab-pane :label=\"$t(`control.object-transform`)\">\n        <object-transform\n          v-if=\"controlStore.modelControlInfo?.transform !== undefined\"\n          :transform-info=\"controlStore.modelControlInfo.transform\"\n        >\n        </object-transform>\n        <template v-else>\n          <control-load-error></control-load-error>\n        </template>\n      </el-tab-pane>\n      <!-- 动画转换遇到较大问题，暂时不去支持动画播放了 -->\n      <!-- <el-tab-pane :label=\"$t(`control.animation-control`)\">\n        <animation-control model-type=\"VRoid\"> </animation-control>\n      </el-tab-pane> -->\n      <el-tab-pane :label=\"$t(`control.parameter-control`)\">\n        <parameter-control\n          v-if=\"controlStore.modelControlInfo?.morph !== undefined\"\n          :morph-info=\"controlStore.modelControlInfo.morph\"\n          model-type=\"VRoid\"\n        >\n        </parameter-control>\n        <template v-else>\n          <control-load-error></control-load-error>\n        </template>\n      </el-tab-pane>\n      <el-tab-pane :label=\"$t(`control.motion-capture`)\">\n        <motion-capture model-type=\"VRoid\"> </motion-capture>\n      </el-tab-pane>\n    </el-tabs>\n  </div>\n</template>\n\n<script setup>\nimport ControlLoadError from \"../Common/ControlLoadError.vue\";\nimport ModelDescription from \"../Common/ModelDescription.vue\";\nimport ObjectTransform from \"../Common/3d/ObjectTransform3D.vue\";\n// import AnimationControl from \"../Common/3d/AnimationControl.vue\";\nimport ParameterControl from \"../Common/3d/ParameterControl.vue\";\nimport MotionCapture from \"../Common/MotionCapture.vue\";\nimport { useControlStore } from \"@control/store/control\";\nconst controlStore = useControlStore();\n</script>\n\n<style lang=\"scss\"></style>\n"
  },
  {
    "path": "src/renderer/control/components/Contents/Control/index.vue",
    "content": "<template>\n  <div class=\"hime-content\">\n    <hime-title-with-divider>{{ $t(\"menu.control\") }}</hime-title-with-divider>\n    <!-- <HimeMMDControl></HimeMMDControl> -->\n    <template\n      v-if=\"\n        controlComponentNow !== undefined &&\n        !controlStore.modelControlInfoLoading\n      \"\n    >\n      <component :is=\"controlComponentNow\"></component>\n    </template>\n    <template v-else>\n      <div class=\"hime-model-control--blank\">\n        {{ $t(\"control.load-a-model-to-control\") }}\n      </div>\n    </template>\n  </div>\n</template>\n\n<script setup>\nimport HimeTitleWithDivider from \"@control/components/Common/TitleWithDivider.vue\";\nimport HimeMMDControl from \"@control/components/Contents/Control/MMDControl/index.vue\";\nimport HimeSpineControl from \"@control/components/Contents/Control/SpineControl/index.vue\";\nimport HimeVRoidControl from \"@control/components/Contents/Control/VRoidControl/index.vue\";\nimport HimeLive2DControl from \"@control/components/Contents/Control/Live2DControl/index.vue\";\nimport { useControlStore } from \"@control/store/control\";\nimport { computed, watch } from \"vue\";\nconst controlStore = useControlStore();\nconst controlComponents = {\n  HimeMMDControl,\n  HimeSpineControl,\n  HimeVRoidControl,\n  HimeLive2DControl,\n};\nconst controlComponentNow = computed(() => {\n  return controlComponents[`Hime${controlStore.currentModelType}Control`];\n});\nwatch(\n  () => controlStore.currentModelType,\n  () => {\n    // 切换模型类型时，清空事件监听\n    nodeAPI.ipc.removeManagerListeners();\n  }\n);\n</script>\n\n<style lang=\"scss\">\n.hime-model-control {\n  flex: 1;\n}\n.hime-model-control--blank {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  flex-direction: column;\n  font-size: 2rem;\n  color: var(--el-text-color-placeholder);\n  height: 100%;\n}\n</style>\n"
  },
  {
    "path": "src/renderer/control/components/Contents/Display.vue",
    "content": "<template>\n  <div class=\"hime-content\">\n    <!-- <el-form label-position=\"top\" class=\"hime-el-form--large-label\"> -->\n    <hime-title-with-divider>{{ $t(\"menu.display\") }}</hime-title-with-divider>\n    <el-scrollbar height=\"100%\">\n      <el-form label-width=\"170px\" class=\"hime-el-form--config\">\n        <el-form-item :label=\"$t('display.window')\">\n          <config-item :label=\"$t('display.window-type')\">\n            <!-- 由于日语片假名实在太长了，不得不妥协一下换个组件…… -->\n            <!-- <el-radio-group v-model=\"appStore.config.display['display-mode']\">\n                <el-radio-button label=\"displayFullScreen\">\n                {{ $t(\"display.fullscreen\") }}\n              </el-radio-button>\n              <el-radio-button label=\"displayWindowed\">\n                {{ $t(\"display.windowed\") }}\n              </el-radio-button>\n            </el-radio-group> -->\n            <el-select v-model=\"appStore.config.display['display-mode']\">\n              <!-- 我感觉这里的element plus给我整懵了，填在label里面的东西其实却是value？ -->\n              <el-option\n                :label=\"$t('display.fullscreen')\"\n                value=\"displayFullScreen\"\n              />\n              <el-option\n                :label=\"$t('display.windowed')\"\n                value=\"displayWindowed\"\n              />\n            </el-select>\n          </config-item>\n        </el-form-item>\n        <el-form-item :label=\"$t('display.show')\">\n          <config-item :label=\"$t('display.pixel-ratio')\">\n            <!-- <el-radio-group v-model=\"appStore.config.display['pixel-ratio']\">\n              <el-radio-button label=\"normal\"> Normal </el-radio-button>\n              <el-radio-button label=\"retina\"> Retina </el-radio-button>\n              <el-radio-button label=\"system\"> Auto </el-radio-button>\n            </el-radio-group> -->\n            <el-select v-model=\"appStore.config.display['pixel-ratio']\">\n              <el-option label=\"Normal\" value=\"normal\" />\n              <el-option label=\"Retina\" value=\"retina\" />\n              <el-option label=\"System\" value=\"system\" />\n            </el-select>\n          </config-item>\n          <config-item :label=\"$t('display.show-fps')\">\n            <el-switch v-model=\"appStore.config.display['show-fps']\" />\n          </config-item>\n          <config-item :label=\"$t('display.antialias')\">\n            <el-switch v-model=\"appStore.config.display['antialias']\" />\n          </config-item>\n          <config-item :label=\"$t('display.auto-load-last')\">\n            <el-switch v-model=\"appStore.config.display['auto-load-last']\" />\n          </config-item>\n        </el-form-item>\n        <el-form-item :label=\"$t('display.transparent-display')\">\n          <config-item :label=\"$t('display.click-through')\">\n            <!-- <el-radio-group v-model=\"appStore.config.display['click-through']\">\n              <el-radio-button label=\"all\">\n                {{ $t(\"display.all-area\") }}\n              </el-radio-button>\n              <el-radio-button label=\"transparent\">\n                {{ $t(\"display.transparent-area\") }}\n              </el-radio-button>\n            </el-radio-group> -->\n            <el-select v-model=\"appStore.config.display['click-through']\">\n              <el-option :label=\"$t('display.all-area')\" value=\"all\" />\n              <el-option\n                :label=\"$t('display.transparent-area')\"\n                value=\"transparent\"\n              />\n            </el-select>\n          </config-item>\n          <config-item :label=\"$t('display.show-area') + '(macOS)'\">\n            <!-- <el-radio-group v-model=\"appStore.config.display['display-range']\">\n              <el-radio-button label=\"singleDesktop\">\n                {{ $t(\"display.single-desktop\") }}\n              </el-radio-button>\n              <el-radio-button label=\"allDesktops\">\n                {{ $t(\"display.all-desktops\") }}\n              </el-radio-button>\n              <el-radio-button label=\"allWorkspaces\">\n                {{ $t(\"display.all-workspaces\") }}\n              </el-radio-button>\n            </el-radio-group> -->\n            <el-select v-model=\"appStore.config.display['display-range']\">\n              <!-- 我感觉这里的element plus给我整懵了，填在label里面的东西其实却是value？ -->\n              <el-option\n                :label=\"$t('display.single-desktop')\"\n                value=\"singleDesktop\"\n              />\n              <el-option\n                :label=\"$t('display.all-desktops')\"\n                value=\"allDesktops\"\n              />\n              <el-option\n                :label=\"$t('display.all-workspaces')\"\n                value=\"allWorkspaces\"\n              />\n            </el-select>\n          </config-item>\n          <config-item :label=\"$t('display.always-on-top')\">\n            <el-switch\n              v-model=\"appStore.config.display['keep-display-at-top']\"\n            />\n          </config-item>\n        </el-form-item>\n        <el-form-item :label=\"$t('display.windowed-display')\">\n          <config-item :label=\"$t('display.background-color')\">\n            <el-color-picker\n              v-model=\"appStore.config.display.background\"\n              color-format=\"hex\"\n            />\n          </config-item>\n        </el-form-item>\n        <!-- 虽然3D和2D分别有很多共有的配置，但实际使用时发现不同模型类型的最佳默认值存在较大差异，例如2D的显示范围，一般来讲spine模型更加小巧，而VRoid的默认轮廓线效果也很爆炸，因此这里都改成了独立的设置 -->\n        <el-form-item :label=\"$t('display.live2d-render')\">\n          <config-item :label=\"$t('display.width-range')\">\n            <div class=\"hime-el-slicder--with-label\">\n              <span> 0% </span>\n              <el-slider\n                v-model=\"appStore.config.display['live2d-initial-width-range']\"\n                class=\"hime-el-slider\"\n                show-tooltip\n                :format-tooltip=\"(value) => value + '%'\"\n                range\n                :min=\"0\"\n                :max=\"100\"\n              />\n              <span> 100% </span>\n            </div>\n          </config-item>\n          <config-item :label=\"$t('display.height-range')\">\n            <div class=\"hime-el-slicder--with-label\">\n              <span> 0% </span>\n              <el-slider\n                v-model=\"appStore.config.display['live2d-initial-height-range']\"\n                class=\"hime-el-slider\"\n                show-tooltip\n                :format-tooltip=\"(value) => value + '%'\"\n                range\n                :min=\"0\"\n                :max=\"100\"\n              />\n              <span> 100% </span>\n            </div>\n          </config-item>\n          <config-item :label=\"$t('display.drag-to-move')\">\n            <el-switch v-model=\"appStore.config.display['live2d-draggable']\" />\n          </config-item>\n        </el-form-item>\n        <el-form-item :label=\"$t('display.spine-render')\">\n          <config-item :label=\"$t('display.width-range')\">\n            <div class=\"hime-el-slicder--with-label\">\n              <span> 0% </span>\n              <el-slider\n                v-model=\"appStore.config.display['spine-initial-width-range']\"\n                class=\"hime-el-slider\"\n                show-tooltip\n                :format-tooltip=\"(value) => value + '%'\"\n                range\n                :min=\"0\"\n                :max=\"100\"\n              />\n              <span> 100% </span>\n            </div>\n          </config-item>\n          <config-item :label=\"$t('display.height-range')\">\n            <div class=\"hime-el-slicder--with-label\">\n              <span> 0% </span>\n              <el-slider\n                v-model=\"appStore.config.display['spine-initial-height-range']\"\n                class=\"hime-el-slider\"\n                show-tooltip\n                :format-tooltip=\"(value) => value + '%'\"\n                range\n                :min=\"0\"\n                :max=\"100\"\n              />\n              <span> 100% </span>\n            </div>\n          </config-item>\n          <config-item :label=\"$t('display.drag-to-move')\">\n            <el-switch v-model=\"appStore.config.display['spine-draggable']\" />\n          </config-item>\n          <config-item :label=\"$t('display.premultiply-alpha')\">\n            <el-switch\n              v-model=\"appStore.config.display['spine-premultiply-alpha']\"\n            />\n          </config-item>\n        </el-form-item>\n        <el-form-item :label=\"$t('display.mmd-render')\">\n          <config-item :label=\"$t('display.outline-effect')\">\n            <el-switch\n              v-model=\"appStore.config.display['mmd-outline-effect']\"\n            />\n          </config-item>\n          <config-item :label=\"$t('display.camera-orbit-control')\">\n            <el-switch\n              v-model=\"appStore.config.display['mmd-orbit-controls']\"\n            />\n          </config-item>\n        </el-form-item>\n        <el-form-item :label=\"$t('display.vroid-render')\">\n          <config-item :label=\"$t('display.outline-effect')\">\n            <el-switch\n              v-model=\"appStore.config.display['vroid-outline-effect']\"\n            />\n          </config-item>\n          <config-item :label=\"$t('display.camera-orbit-control')\">\n            <el-switch\n              v-model=\"appStore.config.display['vroid-orbit-controls']\"\n            />\n          </config-item>\n        </el-form-item>\n      </el-form>\n    </el-scrollbar>\n    <el-divider class=\"hime-el-divider\" />\n    <div class=\"display-option\">\n      <div class=\"display-option__state\">\n        <span>{{ $t(\"display.display-window-state\") }}</span>\n        <el-tag\n          effect=\"light\"\n          :type=\"appStore.displayWindowId === -1 ? 'warning' : 'primary'\"\n        >\n          {{\n            appStore.displayWindowId !== -1\n              ? $t(\"display.launched\")\n              : $t(\"display.not-launched\")\n          }}\n        </el-tag>\n      </div>\n      <div class=\"display-option__control\">\n        <el-button\n          @click=\"ipcAPI.screenshot\"\n          :disabled=\"appStore.displayWindowId === -1\"\n          plain\n        >\n          {{ $t(\"display.screenshot\") }}\n        </el-button>\n        <el-button @click=\"launchDisplayWindow\" plain>{{\n          appStore.displayWindowId !== -1\n            ? $t(\"display.reload\")\n            : $t(\"display.launch\")\n        }}</el-button>\n        <el-button\n          @click=\"closeDisplayWindow\"\n          type=\"danger\"\n          :disabled=\"appStore.displayWindowId === -1\"\n          plain\n          >{{ $t(\"display.close\") }}</el-button\n        >\n      </div>\n    </div>\n  </div>\n</template>\n\n<script setup>\nimport HimeTitleWithDivider from \"@control/components/Common/TitleWithDivider.vue\";\nimport ConfigItem from \"@control/components/Common/ConfigItem.vue\";\nimport { watch, toRaw } from \"vue\";\nimport { useAppStore } from \"@control/store/app\";\nconst appStore = useAppStore();\nconst ipcAPI = window.nodeAPI.ipc;\nwatch(appStore.config.display, (newValue) => {\n  window.nodeAPI.config.write(\"display\", toRaw(newValue));\n});\nfunction launchDisplayWindow() {\n  if (appStore.displayWindowId !== -1) {\n    ipcAPI.relaunchDisplayWindow();\n  } else {\n    ipcAPI.launchDisplayWindow();\n  }\n}\nfunction closeDisplayWindow() {\n  ipcAPI.closeDisplayWindow();\n}\n</script>\n\n<style lang=\"scss\">\n.hime-el-slider {\n  width: 80%;\n  margin-left: 12px;\n  margin-right: 12px;\n}\n.display-option {\n  display: flex;\n  margin: 0 20px;\n  // height: 30px;\n  .display-option__state {\n    display: flex;\n    flex: 1;\n    align-items: center;\n    > span:nth-child(1) {\n      margin-right: 10px;\n      font-size: var(--el-font-size-large);\n      font-weight: bold;\n    }\n  }\n}\n// 弃用布局方案\n// .display-option {\n//   position: relative;\n//   margin: 0 20px;\n//   // height: 30px;\n//   .display-option__state {\n//     display: flex;\n//     > span:nth-child(1) {\n//       margin-right: 10px;\n//       font-size: var(--el-font-size-large);\n//       font-weight: bold;\n//     }\n//   }\n//   .display-option__control {\n//     position: absolute;\n//     right: 0;\n//     top: 0;\n//   }\n// }\n</style>\n"
  },
  {
    "path": "src/renderer/control/components/Contents/General.vue",
    "content": "<template>\n  <div class=\"hime-content\">\n    <hime-title-with-divider>{{ $t(\"menu.general\") }}</hime-title-with-divider>\n    <el-scrollbar height=\"100%\">\n      <el-form label-width=\"170px\" class=\"hime-el-form--config\">\n        <el-form-item :label=\"$t('general.when-launch')\">\n          <config-item :label=\"$t('general.open-control-panel')\">\n            <el-switch\n              v-model=\"appStore.config.general['open-control-at-launch']\"\n            />\n          </config-item>\n          <config-item :label=\"$t('general.open-display-window')\">\n            <el-switch\n              v-model=\"appStore.config.general['open-display-at-launch']\"\n            />\n          </config-item>\n        </el-form-item>\n        <el-form-item :label=\"$t('general.language')\">\n          <config-item>\n            <el-select\n              v-model=\"appStore.config.general.language\"\n              @change=\"changeLanguage\"\n            >\n              <el-option\n                v-for=\"(value, label) in languageNames\"\n                :key=\"label\"\n                :label=\"label\"\n                :value=\"value\"\n              />\n            </el-select>\n          </config-item>\n        </el-form-item>\n        <el-form-item :label=\"$t('general.developer-tools')\">\n          <!-- 配置项的样式被调整过了，这里懒得拉样式，整个div框起来算了 -->\n          <config-item>\n            <el-button @click=\"openDevTool('control')\">\n              {{ $t(\"general.control-panel\") }}\n            </el-button>\n            <el-button\n              @click=\"openDevTool('display')\"\n              :disabled=\"appStore.displayWindowId === -1\"\n              >{{ $t(\"general.display-window\") }}</el-button\n            >\n          </config-item>\n          <config-item :label=\"$t('general.alert-error-info')\">\n            <el-switch v-model=\"appStore.config.general['error-report']\" />\n          </config-item>\n        </el-form-item>\n        <el-form-item :label=\"$t('general.restore')\">\n          <el-popconfirm\n            :title=\"$t('general.restore-all-config-confirm')\"\n            @confirm=\"resetAllConfig\"\n          >\n            <template #reference>\n              <el-button>{{ $t(\"general.restore-all-config\") }}</el-button>\n            </template>\n          </el-popconfirm>\n        </el-form-item>\n      </el-form>\n    </el-scrollbar>\n  </div>\n</template>\n\n<script setup>\nimport HimeTitleWithDivider from \"@control/components/Common/TitleWithDivider.vue\";\nimport ConfigItem from \"@control/components/Common/ConfigItem.vue\";\nimport { watch, toRaw } from \"vue\";\nimport { useAppStore } from \"@control/store/app\";\nimport languageNames from \"@shared/locales/languageNames\";\nimport { useTranslation } from \"i18next-vue\";\nconst ipcAPI = window.nodeAPI.ipc;\nconst { i18next } = useTranslation();\nconst appStore = useAppStore();\nwatch(appStore.config.general, (newValue) => {\n  window.nodeAPI.config.write(\"general\", toRaw(newValue));\n});\nfunction changeLanguage(language) {\n  ipcAPI.changeLanguage(language);\n  i18next.changeLanguage(language);\n}\nfunction openDevTool(type) {\n  ipcAPI.openDevTool(type);\n}\nfunction resetAllConfig() {\n  window.nodeAPI.config.resetAllConfig();\n  appStore.syncConfig();\n  // 手动触发语言更改\n  changeLanguage(appStore.config.general.language);\n}\n</script>\n\n<style lang=\"scss\"></style>\n"
  },
  {
    "path": "src/renderer/control/components/Contents/Model.vue",
    "content": "<template>\n  <div class=\"hime-content\">\n    <hime-title-with-divider>{{ $t(\"menu.model\") }}</hime-title-with-divider>\n    <el-form label-position=\"top\" class=\"hime-el-form--large-label\">\n      <el-form-item :label=\"$t('model.model-db')\">\n        <el-input\n          v-model=\"searchModelText\"\n          :placeholder=\"$t('model.search-model')\"\n          clearable\n          class=\"hime-el-input--model-search\"\n        />\n        <el-table\n          :data=\"filterModelData\"\n          @current-change=\"changeCurrentModelInfo\"\n          size=\"small\"\n          height=\"350\"\n          highlight-current-row\n          tooltip-effect=\"light\"\n          class=\"hime-current-row--adjust-bg-color hime-el-table--model\"\n        >\n          <el-table-column type=\"index\" width=\"60\" align=\"center\" />\n          <el-table-column\n            :label=\"$t('model.name')\"\n            prop=\"name\"\n            width=\"280\"\n            show-overflow-tooltip\n            sortable\n          />\n          <el-table-column\n            :label=\"$t('model.version')\"\n            prop=\"name\"\n            align=\"center\"\n          >\n            <template #default=\"props\">\n              {{ calcModelVersion(props.row) }}\n            </template>\n          </el-table-column>\n          <el-table-column\n            :label=\"$t('model.type')\"\n            :filters=\"[\n              { text: 'Live2D', value: 'Live2D' },\n              { text: 'MMD', value: 'MMD' },\n              { text: 'VRoid', value: 'VRoid' },\n              { text: 'Spine', value: 'Spine' },\n            ]\"\n            :filter-method=\"\n              (value, row) => {\n                return row.modelType === value;\n              }\n            \"\n            align=\"center\"\n          >\n            <template #default=\"props\">\n              <el-tag\n                effect=\"light\"\n                :color=\"props.row.themeColor + '22'\"\n                :style=\"{\n                  color: props.row.themeColor,\n                  'border-color': props.row.themeColor + '44',\n                }\"\n              >\n                {{ props.row.modelType }}\n              </el-tag>\n            </template>\n          </el-table-column>\n          <el-table-column\n            :label=\"$t('model.extension')\"\n            :filters=\"[\n              { text: 'moc', value: 'moc' },\n              { text: 'moc3', value: 'moc3' },\n              { text: 'pmx', value: 'pmx' },\n              { text: 'vrm', value: 'vrm' },\n              { text: 'json', value: 'json' },\n            ]\"\n            :filter-method=\"\n              (value, row) => {\n                return row.extensionName === value;\n              }\n            \"\n            align=\"center\"\n          >\n            <template #default=\"props\">\n              <el-tag effect=\"light\" type=\"info\">\n                {{ props.row.extensionName }}\n              </el-tag>\n            </template>\n          </el-table-column>\n        </el-table>\n        <el-button\n          @click=\"loadModelNow(currentModelInfo.value)\"\n          :disabled=\"appStore.displayWindowId === -1 || !modelTableSelected\"\n          >{{ $t(\"model.load-selected-model\") }}</el-button\n        >\n      </el-form-item>\n    </el-form>\n  </div>\n</template>\n\n<script setup>\nimport HimeTitleWithDivider from \"@control/components/Common/TitleWithDivider.vue\";\nimport { ref, toRaw, markRaw, reactive, computed, watch } from \"vue\";\nimport { useAppStore } from \"@control/store/app\";\nimport { useControlStore } from \"@control/store/control\";\nconst appStore = useAppStore();\nconst controlStore = useControlStore();\nconst currentModelInfo = reactive({ value: null });\nconst modelTableSelected = ref(false);\nconst ipcAPI = window.nodeAPI.ipc;\nfunction changeCurrentModelInfo(currentRow) {\n  modelTableSelected.value = true;\n  currentModelInfo.value = currentRow;\n}\nfunction loadModelNow(modelInfo) {\n  const rawModelInfo = toRaw(modelInfo);\n  controlStore.currentModelType = rawModelInfo.modelType;\n  controlStore.modelControlInfoLoading = true;\n  controlStore.modelControlInfo = null;\n  // 更新数据库中的当前模型信息\n  appStore.database.modelNow = rawModelInfo;\n  window.nodeAPI.database.write(\"modelNow\", rawModelInfo);\n  ipcAPI.loadModel(rawModelInfo);\n  console.log(\n    `[Hime Display] Load model: name:${rawModelInfo.name}, modelType:${rawModelInfo.modelType}`\n  );\n  ipcAPI.receiveModelControlInfo((event, modelControlInfo) => {\n    // 关键点，使用markRaw包装对象。一些模型，比如MMD的层级结构复杂的离谱，能往下嵌套十几级，涉及到四五百，甚至更多的骨骼，用成响应式对象会直接影响到性能\n    // 按现在这种写法，modelControlInfo在发生引用值改变时依旧可以响应式变化，例如设定controlStore.modelControlInfo={}是可以响应式改变UI的，只是改变modelControlInfo内部的东西不会触发UI变化\n    controlStore.modelControlInfo = markRaw(modelControlInfo);\n    controlStore.modelControlInfoLoading = false;\n  });\n}\n// 如果这个页面没有加载过，这里的watch就不会生效，导致无法在打开应用时自动加载上次的模型\n// 默认打开页面一直是这个Model页面，换了一个页面才发现这个问题，后来想了一下，还是就把默认的启动页面设定为model吧\nwatch(appStore.displayWindowOpened, (value) => {\n  console.log(\"[Hime Display] displayWindowId changed\", value.value);\n  if (value.value) {\n    ipcAPI.queryDisplayWindowState();\n    ipcAPI.handleDisplayWindowState((event, message) => {\n      console.log(\"[Hime Display] displayWindowState\", message);\n      if (\n        !message.modelLoaded &&\n        appStore.config.display[\"auto-load-last\"] &&\n        appStore.database.modelNow !== null\n      ) {\n        loadModelNow(appStore.database.modelNow);\n      }\n      // 下方代码用于处理控制面板重新后模型信息清空的问题，但是用这种机制来处理的话，模型控制的instant config难以被同步到控制面板上，目前该用不关闭控制面板，在主进程改为隐藏的操作来解决这个问题\n      // else  if (message.modelLoaded) {\n      //   controlStore.currentModelType = appStore.database.modelNow.modelType;\n      //   controlStore.modelControlInfo = markRaw(message.modelControlInfo);\n      //   controlStore.modelControlInfoLoading = false;\n      // }\n    });\n  }\n});\nconst searchModelText = ref(\"\");\nconst filterModelData = computed(() =>\n  appStore.database.model.filter(\n    (data) =>\n      !searchModelText.value ||\n      data.name.toLowerCase().includes(searchModelText.value.toLowerCase())\n  )\n);\nconst calcModelVersion = (modelInfo) => {\n  if (modelInfo.version) {\n    return modelInfo.version;\n  } else if (modelInfo.modelType === \"Live2D\") {\n    if (modelInfo.extensionName === \"moc\") {\n      return \"2.x\";\n    } else if (modelInfo.extensionName === \"moc3\") {\n      return \"3.x/4.x\";\n    }\n  } else {\n    return \"--\";\n  }\n};\n</script>\n\n<style lang=\"scss\">\n.hime-el-table--model {\n  margin-bottom: 10px;\n}\n.hime-current-row--adjust-bg-color {\n  // 同时:hover和current应该显示current的效果更合理\n  .el-table__body tr:hover.current-row > td.el-table__cell {\n    background-color: var(--el-table-current-row-bg-color);\n  }\n  // 考虑加深强调颜色\n  //   --el-table-current-row-bg-color: var(--el-color-primary-light-8);\n  // tr {\n  //   --el-table-row-hover-bg-color: var(--el-color-primary-light-9);\n  // }\n}\n.hime-el-input--model-search {\n  margin-bottom: 8px;\n}\n</style>\n"
  },
  {
    "path": "src/renderer/control/components/Contents/Source.vue",
    "content": "<template>\n  <div class=\"hime-content\">\n    <hime-title-with-divider>{{ $t(\"menu.source\") }}</hime-title-with-divider>\n    <el-form label-position=\"top\" class=\"hime-el-form--large-label\">\n      <el-form-item :label=\"$t('source.data-source')\">\n        <!-- row-key用于辨识row，解决expand输入内容后自动折叠，以及一旦展开就变成全部展开的问题 -->\n        <el-table\n          :data=\"appStore.database.sourcePathInfo\"\n          :border=\"true\"\n          row-key=\"sourcePath\"\n          ref=\"sourceTable\"\n          class=\"hime-el-table--source-path\"\n          size=\"small\"\n          tooltip-effect=\"light\"\n          max-height=\"160\"\n        >\n          <!-- 使用width=\"1\"隐藏默认小箭头 -->\n          <el-table-column type=\"expand\" width=\"1\">\n            <template #default=\"props\">\n              <div class=\"hime-el-table__expanded-container\">\n                <el-form\n                  label-position=\"top\"\n                  class=\"hime-el-form--expanded\"\n                  :inline=\"true\"\n                >\n                  <el-form-item :label=\"$t('source.search-type')\">\n                    <!-- 官方文档里面没有说el-checkbox-button有change事件，但是经过实际测试是有的，然后就拿来用了 -->\n                    <el-checkbox-button\n                      v-for=\"sourceType in sourceTypes\"\n                      v-model=\"props.row.sourceTypes[sourceType]\"\n                      :key=\"sourceType\"\n                      :label=\"sourceType\"\n                      @change=\"writeSourcePathInfo\"\n                    />\n                  </el-form-item>\n                </el-form>\n              </div>\n            </template>\n          </el-table-column>\n          <el-table-column\n            :label=\"$t('source.source-path')\"\n            prop=\"sourcePath\"\n            show-overflow-tooltip\n          />\n          <!-- 备选方案：通过滚动展示过长的路径名\n        <el-table-column label=\"路径\" prop=\"path\">\n          <template #default=\"props\">\n            <el-scrollbar>\n              <div style=\"padding: 0 10px\">\n                {{ props.row.path }}\n              </div>\n            </el-scrollbar>\n          </template>\n        </el-table-column> -->\n          <el-table-column\n            :label=\"$t('source.operate')\"\n            width=\"210\"\n            align=\"center\"\n          >\n            <template #default=\"props\">\n              <el-tooltip :show-after=\"600\" effect=\"light\">\n                <template #default>\n                  <!-- 发现props里有个文档里没说的expanded属性，正好可以拿来用 -->\n                  <svg-icon-el-button\n                    size=\"small\"\n                    :name=\"'sf-' + (props.expanded ? 'close' : 'edit')\"\n                    @click=\"expandRow(props.row)\"\n                  ></svg-icon-el-button>\n                </template>\n                <template #content>\n                  {{\n                    props.expanded\n                      ? $t(\"source.end-edit-search-type\")\n                      : $t(\"source.edit-search-type\")\n                  }}\n                </template>\n              </el-tooltip>\n              <el-tooltip :show-after=\"600\" effect=\"light\">\n                <template #default>\n                  <svg-icon-el-button\n                    size=\"small\"\n                    name=\"sf-source\"\n                    @click=\"showInFolder(props.row.sourcePath)\"\n                  ></svg-icon-el-button>\n                </template>\n                <template #content>\n                  {{ $t(\"source.show-in-file-browser\") }}</template\n                >\n              </el-tooltip>\n              <el-tooltip :show-after=\"600\" effect=\"light\">\n                <template #default>\n                  <svg-icon-el-button\n                    size=\"small\"\n                    name=\"sf-refresh\"\n                    @click=\"loadFromSourcePath(props.row)\"\n                  ></svg-icon-el-button>\n                </template>\n                <template #content> {{ $t(\"source.refresh\") }} </template>\n              </el-tooltip>\n              <el-popconfirm\n                :title=\"$t('source.delete-source-confirm')\"\n                @confirm=\"deleteSourcePath(props.$index)\"\n              >\n                <template #reference>\n                  <!-- 嵌套使用el-popconfirm和el-tooltip需要加一层div包裹，但这会导致样式变化 -->\n                  <div style=\"display: inline-block; margin-left: 12px\">\n                    <el-tooltip :show-after=\"600\" effect=\"light\">\n                      <template #default>\n                        <svg-icon-el-button\n                          size=\"small\"\n                          name=\"sf-delete\"\n                        ></svg-icon-el-button>\n                      </template>\n                      <template #content>\n                        {{ $t(\"source.delete-source\") }}\n                      </template>\n                    </el-tooltip>\n                  </div>\n                </template>\n              </el-popconfirm>\n            </template>\n          </el-table-column>\n        </el-table>\n        <el-button @click=\"addSourePath\">{{\n          $t(\"source.add-source\")\n        }}</el-button>\n        <el-button @click=\"loadFromSourcePathAll\">{{\n          $t(\"source.search-all-source\")\n        }}</el-button>\n      </el-form-item>\n      <el-form-item :label=\"$t('source.statistic-info')\">\n        <el-table :data=\"totalInfo\" size=\"small\" :border=\"true\">\n          <el-table-column\n            v-for=\"(totalCount, totalName) in totalInfo[0]\"\n            :prop=\"totalName\"\n            :label=\"totalName\"\n            align=\"center\"\n          >\n          </el-table-column>\n        </el-table>\n      </el-form-item>\n    </el-form>\n  </div>\n</template>\n\n<script setup>\nimport { ref, toRaw, computed } from \"vue\";\nimport SvgIconElButton from \"@control/components/Common/SvgIconElButton.vue\";\nimport HimeTitleWithDivider from \"@control/components/Common/TitleWithDivider.vue\";\nimport { useAppStore } from \"@control/store/app\";\nconst appStore = useAppStore();\nconst sourceTypes = [\"Live2D\", \"Spine\", \"VRoid\", \"MMD\", \"motion3D\", \"audio3D\"];\nconst sourceTable = ref();\nconst totalInfo = computed(() => [\n  {\n    Live2D: appStore.database.model.filter((item) => {\n      return item.modelType === \"Live2D\";\n    }).length,\n    Spine: appStore.database.model.filter((item) => {\n      return item.modelType === \"Spine\";\n    }).length,\n    VRoid: appStore.database.model.filter((item) => {\n      return item.modelType === \"VRoid\";\n    }).length,\n    MMD: appStore.database.model.filter((item) => {\n      return item.modelType === \"MMD\";\n    }).length,\n    motion3D: appStore.database.motion3D.length,\n    audio3D: appStore.database.audio3D.length,\n  },\n]);\n// 不能watch了，我人要废了……因为同步数据库也会触发watch的，需要的时候我还是手动写入数据吧\n// // 实时更新数据库\n// watch(appStore.database.sourcePathInfo, (newValue) => {\n//   // 这里没办法只有把整个source数据传过去\n//   window.nodeAPI.database.write(\"sourcePathInfo\", toRaw(newValue));\n// });\nfunction writeSourcePathInfo() {\n  window.nodeAPI.database.write(\n    \"sourcePathInfo\",\n    toRaw(appStore.database.sourcePathInfo)\n  );\n}\nfunction expandRow(row) {\n  sourceTable.value.toggleRowExpansion(row);\n  // 这不是script setup里的用法\n  // console.log(this.$refs);\n  // this.$refs.sourceTable.toggleRowExpansion(row);\n}\nfunction showInFolder(path) {\n  window.nodeAPI.showInFolder(path);\n}\nfunction deleteSourcePath(index) {\n  // 移除数据源相关的数据条目\n  const sourcePath = appStore.database.sourcePathInfo[index].sourcePath;\n  window.nodeAPI.database.removeDataFromSourcePath(sourcePath);\n  appStore.syncDatabase();\n  // 千万别在这条语句下方同步数据库，不然直接把preload里面的旧sourcePathInfo数据弄过来了\n  appStore.database.sourcePathInfo.splice(index, 1);\n  writeSourcePathInfo();\n}\nfunction addSourePath() {\n  window.nodeAPI.ipc.selectPath().then((path) => {\n    if (path.length > 0) {\n      // 这里不自动执行loadFromSourcePath是有深刻原因的，用户或许并不希望载入所有的sourceTypes，因此应当等到筛选sourceTypes后再手动载入\n      appStore.database.sourcePathInfo.push({\n        sourcePath: path[0],\n        tagName: \"\",\n        sourceTypes: {\n          Live2D: true,\n          Spine: true,\n          MMD: true,\n          VRoid: true,\n          motion3D: true,\n          audio3D: true,\n        },\n      });\n      writeSourcePathInfo();\n    }\n  });\n}\nfunction loadFromSourcePath(sourcePathInfo) {\n  window.nodeAPI.database\n    .loadDataFromSourcePathInfo(toRaw(sourcePathInfo))\n    .then(() => {\n      appStore.syncDatabase();\n    });\n}\nfunction loadFromSourcePathAll() {\n  const promises = [];\n  appStore.database.sourcePathInfo.forEach((sourcePathInfo) => {\n    promises.push(\n      window.nodeAPI.database.loadDataFromSourcePathInfo(toRaw(sourcePathInfo))\n    );\n  });\n  Promise.all(promises).then(() => {\n    appStore.syncDatabase();\n  });\n}\n</script>\n\n<style lang=\"scss\">\n.hime-el-table--source-path {\n  margin-bottom: 10px;\n  .el-table__expand-icon {\n    // 配合上方的width=\"1\"使用，可以隐藏默认的小箭头\n    color: transparent;\n  }\n  .el-table__expanded-cell {\n    .hime-el-table__expanded-container {\n      padding: 5px 0 5px 20px;\n    }\n    .hime-el-table__expanded-input--tag {\n      width: 75px;\n      margin-top: 2px;\n    }\n  }\n}\n\n// 直接将size设为small就行了\n// .el-table .el-table__cell {\n//   padding: 6px 0;\n// }\n//element plus的样式里有一个.el-form-item .el-form-item选择器会把margin-bottom设为0，这里覆盖一下\n// .el-form-item .source--form .el-form-item {\n//   margin-bottom: 18px;\n// }\n// .hime-el-form--expanded input {\n//   width: 80px;\n// }\n</style>\n"
  },
  {
    "path": "src/renderer/control/components/Main.vue",
    "content": "<template>\n  <el-main\n    v-loading=\"\n      controlStore.modelControlInfoLoading &&\n      contentComponentNow === HimeControl\n    \"\n  >\n    <!-- 之前也考虑过采用vue的路由方案，但配置起来较为麻烦，而且似乎做不到保存组件缓存的操作，所以还是采用了动态组件的方案。 -->\n    <!-- 使用keep-alive保存组件的缓存，没必要每次都加载 -->\n    <!-- 使用了<script setup>后，动态组件的is参数似乎无法直接接收字符串，只能使用组件对象 -->\n    <keep-alive>\n      <component :is=\"contentComponentNow\"></component>\n    </keep-alive>\n  </el-main>\n</template>\n\n<script setup>\nimport capitalize from \"lodash/capitalize\";\nimport HimeGeneral from \"@control/components/Contents/General.vue\";\nimport HimeDisplay from \"@control/components/Contents/Display.vue\";\nimport HimeControl from \"@control/components/Contents/Control/index.vue\";\nimport HimeModel from \"@control/components/Contents/Model.vue\";\nimport HimeSource from \"@control/components/Contents/Source.vue\";\nimport HimeAbout from \"@control/components/Contents/About.vue\";\nimport { computed } from \"vue\";\nimport { useAppStore } from \"@control/store/app\";\nimport { useControlStore } from \"@control/store/control\";\nconst appStore = useAppStore();\nconst controlStore = useControlStore();\n// 借助对象完成字符串到组件的映射\nconst contentComponents = {\n  HimeGeneral,\n  HimeDisplay,\n  HimeControl,\n  HimeModel,\n  HimeSource,\n  HimeAbout,\n};\nconst contentComponentNow = computed(() => {\n  return contentComponents[\"Hime\" + capitalize(appStore.ui.activeMenuItem)];\n});\n</script>\n\n<style lang=\"scss\">\n.el-main {\n  background-color: var(--el-fill-color-lighter);\n}\n.hime-content {\n  width: 100%;\n  // 限住高度，让el-scrollbar生效\n  height: 100%;\n  display: flex;\n  flex-direction: column;\n}\n\n// 调节config的页面样式，即display页面和general页面\n\n.hime-el-form--config {\n  .el-form-item {\n    margin-bottom: 12px;\n    .el-form-item__label {\n      font-size: var(--el-font-size-medium);\n      font-weight: bold;\n    }\n    .el-form-item__content {\n      flex-direction: column;\n      align-items: flex-start;\n      .hime-el-slicder--with-label {\n        display: flex;\n        width: 300px;\n      }\n    }\n  }\n}\n.hime-el-form--large-label > .el-form-item > .el-form-item__label {\n  font-size: var(--el-font-size-extra-large);\n  line-height: initial;\n}\n</style>\n"
  },
  {
    "path": "src/renderer/control/components/Menu/Index.vue",
    "content": "<template>\n  <el-aside>\n    <div class=\"menu\">\n      <hime-menu-item\n        v-for=\"menuItem in menuItems\"\n        :menu-item=\"menuItem\"\n      ></hime-menu-item>\n    </div>\n  </el-aside>\n</template>\n\n<script setup>\nimport HimeMenuItem from \"./MenuItem.vue\";\nconst menuItems = [\"general\", \"display\", \"control\", \"model\", \"source\", \"about\"];\n</script>\n\n<style lang=\"scss\">\n.el-aside {\n  width: 72px;\n  padding: 40px 8px;\n}\n</style>\n"
  },
  {
    "path": "src/renderer/control/components/Menu/MenuItem.vue",
    "content": "<template>\n  <div\n    class=\"menu-item\"\n    :class=\"{ active: appStore.ui.activeMenuItem === menuItem }\"\n    @click=\"appStore.ui.activeMenuItem = menuItem\"\n  >\n    <svg-icon :name=\"'sf-' + menuItem\"></svg-icon>\n    <div :style=\"{ 'font-size': itemNameFontSize }\">\n      {{ $t(\"menu.\" + menuItem) }}\n    </div>\n  </div>\n</template>\n\n<script setup>\nimport SvgIcon from \"@control/components/Common/SvgIcon.vue\";\nimport { useAppStore } from \"@control/store/app\";\nimport { useTranslation } from \"i18next-vue\";\nconst { i18next } = useTranslation();\n// 日语的菜单有部分片假名过长导致折行，本想采用计算是否换行以对字体进行缩小，但是这东西意外的难以获取，所以暂时改为直接判断文本内容的方式吧\n// import { ref, onMounted } from \"vue\";\n// const itemNameRef = ref();\n// onMounted(() => {\n//   console.log(itemNameRef.value.scrollHeight);\n// });\nimport { computed } from \"vue\";\nconst props = defineProps({\n  menuItem: String,\n});\nconst itemNameFontSize = computed(() => {\n  if (\n    [\"ディスプレイ\", \"コントロール\"].includes(\n      i18next.t(\"menu.\" + props.menuItem)\n    )\n  ) {\n    return \"0.6rem\";\n  }\n  return \"0.85rem\";\n});\nconst appStore = useAppStore();\n</script>\n\n<style lang=\"scss\">\n.menu-item {\n  display: flex;\n  align-items: center;\n  flex-direction: column;\n  font-weight: bold;\n  // font-size: 0.7rem;兼容日语，已改为动态判断\n  border-radius: 10px;\n  padding: 8px 0;\n  div {\n    color: var(--el-text-color-regular);\n  }\n  svg {\n    width: 24px;\n    height: 24px;\n    margin-bottom: 3px;\n    use {\n      fill: var(--el-text-color-regular);\n    }\n  }\n}\n.menu-item.active {\n  div {\n    color: var(--el-color-primary);\n  }\n  svg {\n    use {\n      fill: var(--el-color-primary);\n    }\n  }\n  background-color: $menu-background-color-active;\n}\n</style>\n"
  },
  {
    "path": "src/renderer/control/i18n.js",
    "content": "import i18next from \"@shared/locales/i18next\";\nimport I18NextVue from \"i18next-vue\";\n\nexport default function (app) {\n  app.use(I18NextVue, { i18next });\n  return app;\n}\n"
  },
  {
    "path": "src/renderer/control/main.js",
    "content": "import { createApp } from \"vue\";\nimport { createPinia } from \"pinia\";\nimport App from \"./App.vue\";\nimport i18n from \"./i18n\";\nimport \"virtual:svg-icons-register\";\n// 在App.vue中采用了手动引入ElMessage的方式后，ElMessage的样式不会被自动加载，只能在这里手动引入一下\nimport \"element-plus/theme-chalk/src/message.scss\";\n// 以下操作全寄……\n// import \"element-plus/theme-chalk/src/dark/css-vars.scss\";\n// import \"@control/styles/dark.scss\";\n// import \"@control/styles/el-theme.scss\";\n// import \"element-plus/theme-chalk/dark/css-vars.css\";\nconst app = createApp(App);\napp.use(createPinia());\ni18n(app);\napp.mount(\"#app\");\n"
  },
  {
    "path": "src/renderer/control/store/app.js",
    "content": "import { defineStore } from \"pinia\";\nexport const useAppStore = defineStore(\"app\", {\n  state: () => ({\n    // initialized: false,\n    ui: {\n      activeMenuItem: \"model\",\n    },\n    database: {\n      // 防止下方的splice爆炸\n      // sourcePathInfo: [],\n    },\n    config: {},\n    displayWindowId: -1,\n    // 上方的原始值无法直接进行监听，此属性用于响应式监听展示器状态\n    displayWindowOpened: {\n      value: false,\n    },\n  }),\n  actions: {\n    syncDatabase() {\n      // database直接赋值会失去响应性，如果watch监视了这里的this.database.sourcePathInfo，对this.database直接赋值，watch将直接失效。现在看来pinia对数据的封装应该是等效于reactive的\n      // const database = window.nodeAPI.database.value();\n      // this.database.sourcePathInfo.splice(0);\n      // sourcePathInfo也不能直接赋值，因为到时候是监视sourcePathInfo，反正说来说去就是sourcePathInfo的指向不能变，看到一种方法是在对象下再封装一层数据，但是这样依赖database的结构都变了，因此这里就一点一点的往里面填数据吧\n      // database.sourcePathInfo.forEach((source) => {\n      //   this.database.sourcePathInfo.push(source);\n      // });\n      // this.database.model = database.model;\n      // this.database.motion3D = database.motion3D;\n      // this.database.audio3D = database.audio3D;\n\n      // 好吧目前不用watch了以后，这么搞似乎问题也不大\n      this.database = window.nodeAPI.database.value();\n    },\n    syncConfig() {\n      const confingValue = window.nodeAPI.config.value();\n      this.config.general = confingValue.general;\n      this.config.display = confingValue.display;\n    },\n  },\n});\n// export const useAppStore = function () {\n//   const appStore = defineAppStore();\n//   if (!appStore.initialized) {\n//     appStore.initialized = true;\n//     appStore.syncDatabase();\n//   }\n//   return appStore;\n// };\n"
  },
  {
    "path": "src/renderer/control/store/control.js",
    "content": "// 对模型进行控制的Store\nimport { defineStore } from \"pinia\";\nexport const useControlStore = defineStore(\"control\", {\n  state: () => ({\n    currentModelType: \"\",\n    modelControlInfoLoading: false,\n    modelControlInfo: null,\n  }),\n});\n"
  },
  {
    "path": "src/renderer/control/styles/el-theme.scss",
    "content": "// 颜色主题配置预留\n// $--colors: (\n//   \"primary\": (\n//     \"base\": purple,\n//   ),\n//   \"success\": (\n//     \"base\": #21ba45,\n//   ),\n//   \"warning\": (\n//     \"base\": #f2711c,\n//   ),\n//   \"danger\": (\n//     \"base\": #db2828,\n//   ),\n//   \"error\": (\n//     \"base\": #db2828,\n//   ),\n//   \"info\": (\n//     \"base\": #42b8dd,\n//   ),\n// );\n\n// @forward \"element-plus/theme-chalk/src/common/var.scss\" with (\n//   // do not use same name, it will override.\n//   $colors: $--colors,\n// );\n$menu-background-color-active:#9993;\n@forward 'element-plus/theme-chalk/src/common/var.scss' with (\n  $colors: (\n    'primary': (\n      'base': #20d7cb,\n    ),\n  ),\n);\n// 这都什么坑啊，给我坑死了，之前一直无法正确的配置深色模式的主题色，研究了好久\n// 本来就对scss和element-plus，以及vite对scss的解析机制不是很熟悉，然后人就直接傻了\n// 之前跟着element-plus文档尝试使用@forward更改element-plus/theme-chalk/src/dark/var.scss主题色一直在报错\n// [vite] Internal server error: This variable is available from multiple global modules.\n// 大概能猜到是变量冲突了，但是根本就不知道该怎么做\n\n// 目前大概理解了element-plus深色模式的文件安排：\n// element-plus/theme-chalk/dark/css-vars.css：使用scss生成的样式表，显然无法使用scss变量进行配置\n// element-plus/theme-chalk/src/dark/var.scss：用于生成深色模式使用的scss变量\n// element-plus/theme-chalk/src/dark/css-vars.scss：真正生成深色模式css样式表的文件\n\n// 而且在main.js里面使用import导入scss的话，好像此文件的配置无法对其产生影响，vite里面是怎么做的就不得而知了\n@use \"element-plus/theme-chalk/src/dark/css-vars.scss\" as *;\n\n// 错误操作如下：\n// @use \"./dark.scss\" as *;\n// @forward 'element-plus/theme-chalk/src/dark/var.scss' with (\n//   $colors: (\n//     'primary': (\n//       'base': purple,\n//     ),\n//   ),\n// );\n// @use \"element-plus/theme-chalk/dark/css-vars.css\" as *;"
  },
  {
    "path": "src/renderer/control.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n\t<meta charset=\"UTF-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n\t<!-- <title>electron-vite</title> -->\n</head>\n\n<body>\n\t<div id=\"app\"></div>\n\t<script type=\"module\" src=\"./control/main.js\"></script>\n</body>\n\n</html>"
  },
  {
    "path": "src/renderer/display/Application.js",
    "content": "import { Live2dManager } from \"@display/modelManagers/Live2dManager\";\nimport { MmdManager } from \"@display/modelManagers/MmdManager\";\nimport { VroidManager } from \"@display/modelManagers/VroidManager\";\nimport { SpineManager } from \"@display/modelManagers/SpineManager\";\nimport { SpineManager42 } from \"@display/modelManagers/SpineManager42\";\nimport { RecordManager } from \"@display/utils/record/RecordManager\";\n\nexport class Application {\n  constructor() {\n    this.init();\n  }\n  async init() {\n    this.nodeAPI = window.nodeAPI;\n    // 来自控制面板的配置项\n    const configData = await this.nodeAPI.ipc.queryConfig();\n    this.config = configData.config;\n    this.windowName = configData.windowName;\n    this.resetCanvas();\n    const pixelRatioConfig = this.config.display[\"pixel-ratio\"];\n    this.resolution =\n      pixelRatioConfig === \"system\"\n        ? window.devicePixelRatio\n        : pixelRatioConfig === \"retina\"\n        ? 2\n        : 1;\n    this.antialias = this.config.display[\"antialias\"];\n    this.state = {\n      modelLoaded: false,\n      // 由于控制面板不会关闭，缓存不会清除，模型的基础信息就不必在这里发过去了\n      // modelControlInfo: null,\n    };\n    this.currentModelInfo = null;\n    this.recordManager = new RecordManager(this);\n    this.setBackgroundColor();\n    this.initStats();\n    this.initModelManagers();\n    this.handleWindowResize();\n    // 在发送windowsID之前处理好其他的事情才能实现启动时加载模型\n    this.initControlWindowId();\n    // 通信处理必须在windowID处理之后再开启\n    this.handleIpcMessages();\n  }\n  initControlWindowId() {\n    this.controlWindowId = -1;\n    this.nodeAPI.ipc.queryWindowIds().then((windowIds) => {\n      console.log(\"[Hime Display] queryWindowIds:\", windowIds);\n      this.controlWindowId = windowIds.control;\n    });\n    // 忘记加event，脑瘫行为！！！坑了我不下五次，合着之前控制器一直都不知道控制面板的id了是吧\n    this.nodeAPI.ipc.handleUpdateWindowIds((event, windowIds) => {\n      console.log(\"[Hime Display] handleUpdateWindowIds:\", windowIds);\n      this.controlWindowId = windowIds.control;\n    });\n  }\n  initModelManagers() {\n    this.modelManagers = {\n      now: null,\n    };\n    this.modelManagers.Live2D = new Live2dManager(this);\n    this.modelManagers.MMD = new MmdManager(this);\n    this.modelManagers.VRoid = new VroidManager(this);\n    this.modelManagers.Spine = new SpineManager(this);\n    this.modelManagers.Spine42 = new SpineManager42(this);\n  }\n  handleIpcMessages() {\n    this.nodeAPI.ipc.handleLoadModel((event, modelInfo) => {\n      console.log(\n        `[Hime Display] Load model: name:${modelInfo.name}, modelType:${modelInfo.modelType}`\n      );\n      this.currentModelInfo = modelInfo;\n      let managerType;\n      if (modelInfo.modelType === \"Spine\") {\n        const version = modelInfo.version;\n        if (version === undefined) {\n          managerType = \"Spine\";\n        } else {\n          const versionNumber = version.split(\".\").slice(0, 2).join(\".\");\n          switch (versionNumber) {\n            case \"3.7\":\n            case \"3.8\":\n            case \"4.0\":\n            case \"4.1\":\n              managerType = \"Spine\";\n              break;\n            case \"4.2\":\n              managerType = \"Spine42\";\n              break;\n            default:\n              throw new Error(\n                `不支持的Spine版本: ${versionNumber}，请使用3.8或4.2版本的模型`\n              );\n          }\n        }\n      } else {\n        managerType = modelInfo.modelType;\n      }\n      // 通过managers.now切换的一大优势就是，事件监听无需手动切换\n      if (this.modelManagers.now?.modelType !== managerType) {\n        this.modelManagers.now?.switchOut();\n        this.resetCanvas();\n        this.modelManagers.now = this.modelManagers[managerType];\n        this.modelManagers.now.switchIn();\n        this.modelManagers.now.onSendToModelControl((message) => {\n          this.nodeAPI.ipc.sendToModelControl(message);\n        });\n      }\n      this.modelManagers.now.loadModel(modelInfo).then((modelControlInfo) => {\n        this.state.modelLoaded = true;\n        // this.state.modelControlInfo = modelControlInfo;\n        this.nodeAPI.ipc.sendModelControlInfo(modelControlInfo);\n      });\n    });\n    this.nodeAPI.ipc.handleSendToModelManager((event, message) => {\n      console.log(\n        `[Hime Display] Receive message from control: ${message.channel}, data:`,\n        message.data\n      );\n      this.modelManagers.now.handleMessage(message);\n    });\n    this.nodeAPI.ipc.handleQueryDisplayWindowState(() => {\n      this.nodeAPI.ipc.sendDisplayWindowState(this.state);\n    });\n    this.nodeAPI.ipc.handleScreenshot((event) => {\n      console.log(\"[Hime Display] Screenshot\");\n      this.recordManager.takeScreenshot();\n    });\n  }\n  setBackgroundColor() {\n    // 在全屏状态下设定背景颜色要出大问题啊\n    if (this.windowName === \"displayWindowed\") {\n      document.body.style.background = this.config.display[\"background\"];\n    }\n  }\n  initStats() {\n    this.stats = null;\n    if (this.config.display[\"show-fps\"]) {\n      this.stats = new Stats();\n      document.body.appendChild(this.stats.domElement);\n    }\n  }\n  handleWindowResize() {\n    window.addEventListener(\"resize\", () => {\n      if (\n        this.modelManagers.now !== null &&\n        this.modelManagers.now.onWindowResize\n      ) {\n        this.modelManagers.now.onWindowResize();\n      }\n    });\n  }\n  resetCanvas() {\n    // 加载spine4.2采用了pixi v8，不知道在destry进行了什么阴间操作，会导致gl上下文报废\n    // 此时重新用pixi初始化app的话会报错Invalid value of `0` passed to `checkMaxIfStatementsInShader`\n    // three也无法成功初始化\n    // 懒得深究原理，直接每次切出时销毁canvas，重新创建一个新的canvas\n    this.canvas?.remove();\n    this.canvas = document.createElement(\"canvas\");\n    this.canvas.id = \"display-canvas\";\n    document.body.insertBefore(this.canvas, document.body.firstChild);\n    // Windows7获取不到webgl2的上下文，因此获取webgl，如果获取了一种type的上下文，再获取其他上下文会报错，但是获取webgl2失败并不影响\n    // 无论是pixi.js还是three.js都会有现获取webgl2的上下文，找不到再切换到webgl，因此我这里的操作即使在启动渲染进程之前操作也不会有问题\n    // 但要是在渲染启动之前获取过webgl的上下文，那webgl2就没戏了\n    // 我怎么又栽在这个该死的参数preserveDrawingBuffer上了？？？？？？\n    // 说实话我感觉这webgl的接口做的是真的阴间，文档找不到多少，也没有谁告诉我抠个像素要把preserveDrawingBuffer设为true啊，（虽然我之前弄过一次了，忘了……）\n    // 然后关于获取上下文，相当于是第一次获取时进行一个初始化，之后全是返回第一次获取到的实例，换句话说，如果运行了this.canvas.getContext(\"webgl2\")后再运行this.canvas.getContext(\"webgl2\", { preserveDrawingBuffer: true })的话，这个preserveDrawingBuffer根本就没有被正确配置，而且一点提示都没有\n    this.context =\n      this.canvas.getContext(\"webgl2\", { preserveDrawingBuffer: true }) ||\n      this.canvas.getContext(\"webgl\", { preserveDrawingBuffer: true });\n    if (\n      this.windowName === \"displayFullScreen\" &&\n      this.config.display[\"click-through\"] === \"transparent\"\n    ) {\n      this.rgba = new Uint8Array(4);\n      this.ignoreFlag = true;\n      this.detectClickThrough();\n    }\n  }\n  detectClickThrough() {\n    const detect = (event) => {\n      this.context.readPixels(\n        event.clientX * this.resolution,\n        this.canvas.height - event.clientY * this.resolution, //2d坐标系和3d坐标系的转换，坐标原点由左上角变为屏幕左下角\n        1,\n        1,\n        this.context.RGBA,\n        this.context.UNSIGNED_BYTE,\n        this.rgba\n      );\n      if (this.rgba[3] != 0 && this.ignoreFlag == true) {\n        console.log(\"[Hime Display] Click through detected\", false);\n        this.nodeAPI.ipc.setIgnoreMouseEvents(false);\n        this.ignoreFlag = false;\n      } else if (this.rgba[3] == 0 && this.ignoreFlag == false) {\n        console.log(\"[Hime Display] Click through detected\", true);\n        this.nodeAPI.ipc.setIgnoreMouseEvents(true, { forward: true });\n        this.ignoreFlag = true;\n      }\n    };\n    // 对比之下，pointermove事件返回的坐标带有小数\n    this.canvas.addEventListener(\"mousemove\", detect);\n  }\n}\n"
  },
  {
    "path": "src/renderer/display/main.js",
    "content": "import { Application } from \"@display/Application\";\nwindow.app = new Application();\nconst ipcAPI = window.nodeAPI.ipc;\nwindow.onerror = function (message) {\n  //   console.log(message, source, lineno, colno, error);\n  ipcAPI.throwError(message);\n};\n// 上方法的操作无法捕获异步函数里面的错误\nwindow.addEventListener(\"unhandledrejection\", function (event) {\n  ipcAPI.throwError(event.reason.message);\n});\n"
  },
  {
    "path": "src/renderer/display/modelManagers/Live2dManager.js",
    "content": "import { ModelManager } from \"./ModelManager\";\nimport { ParameterMonitor, PartMonitor } from \"@display/utils/live2d/Monitor\";\nimport { Live2DFaceMeshCaptureManager as FaceMeshCaptureManager } from \"@display/utils/capture/Live2DFaceMeshCaptureManager\";\nimport { setModelBaseTransfrom, draggable } from \"@display/utils/2d/utils\";\nimport {\n  LIVE2D_VERSION,\n  AddCubism2Shim,\n} from \"@display/utils/live2d/Cubism2Shim\";\nexport class Live2dManager extends ModelManager {\n  constructor(parentApp) {\n    super(parentApp);\n    this.modelType = \"Live2D\";\n    this._sendToModelControl = null;\n    this.instantConfig = null;\n    this.shouldRender = false;\n    this.parameterMonitor = null;\n    this.partMonitor = null;\n    this.captureManagerNow = null;\n    this.focusPosition = null;\n\n    this.app = null;\n    this.model = null;\n  }\n  switchIn() {\n    this.app = new PIXI.Application({\n      autoStart: true,\n      view: document.getElementById(\"display-canvas\"),\n      // 即使canvas已经通过CSS配置占满全屏，不做这一影响设置依旧会使得画面拉伸\n      resizeTo: window,\n      antialias: this.antialias,\n      autoDensity: true,\n      transparent: true,\n      resolution: this.resolution,\n    });\n    this.parameterMonitor = new ParameterMonitor();\n    this.partMonitor = new PartMonitor();\n    this._addEventListeners();\n  }\n  switchOut() {\n    this._clearModel();\n    // 移除事件监听放到了this.focusPosition=null之前，不然我感觉有可能focusPosition又被初始化了，不过照理说是同步代码的话应该不会出现这个问题，反正switchOut的顺序无所谓，就这么安排了\n    this._removeEventListeners();\n    this._sendToModelControl = null;\n    this.shouldRender = false;\n    this.instantConfig = null;\n    this.partMonitor = null;\n    this.parameterMonitor = null;\n    this.captureManagerNow = null;\n    this.focusPosition = null;\n\n    // destroy以后无法直接获得这个上下文了\n    const gl = this.app.renderer.context.gl;\n    this.app.destroy();\n    gl.clear(gl.COLOR_BUFFER_BIT);\n    gl.clear(gl.DEPTH_BUFFER_BIT);\n    gl.clear(gl.STENCIL_BUFFER_BIT);\n    this.app = null;\n  }\n  async loadModel(modelInfo) {\n    this._initInstantConfig();\n    this._clearModel();\n    this.model = await PIXI.live2d.Live2DModel.from(modelInfo.entranceFile, {\n      // 更新和交互都交由之后手动控制\n      autoUpdate: false,\n      autoInteract: false,\n      // 阻止默认动作加载，在不更改库的情况下，只能传递一个基本不可能的group名进去了……\n      idleMotionGroup: \"[永遠に$null]\",\n      // idleMotionGroup: \"motion\",\n    });\n    if (this.model.internalModel instanceof PIXI.live2d.Cubism2InternalModel) {\n      this.model.sdkVersion = LIVE2D_VERSION.CUBISM2;\n      AddCubism2Shim(this.model.internalModel.coreModel);\n    } else if (\n      this.model.internalModel instanceof PIXI.live2d.Cubism4InternalModel\n    ) {\n      this.model.sdkVersion = LIVE2D_VERSION.CUBISM4;\n    }\n    this.model.pose = function () {\n      const coreModel = this.internalModel.coreModel;\n      coreModel._model.parameters.defaultValues.forEach((value, index) => {\n        coreModel.setParameterValueByIndex(index, value);\n      });\n    };\n    this.app.stage.addChild(this.model);\n    setModelBaseTransfrom(this.model, this.config.display, \"live2d\");\n    // 折磨死我了，终于找到了问题所在，之前使用pixi-live2d-display都是直接用自动的interact，现在加载模型时设定为autoInteract: false就不一样了，本以为这个参数也就控制了个hit事件和鼠标跟踪，结果一看源码发现这也给模型的interactive设定为true了，进一步追溯，发现这是一个pixi.js的属性，设定为true才能正常响应事件，若为false，即使模型的_events可以看到事件，依旧是无法正常响应的。然后spine那边根本就没有对这个属性进行操作，所以自然也不能响应事件\n    this.model.interactive = true;\n    if (this.config.display[\"live2d-draggable\"]) {\n      draggable(this.model);\n    }\n    this.model.on(\"dragging\", this._updateModelTransform.bind(this));\n    this._bindEventAnimation();\n    this._startRender();\n    return this._buildModelControlInfo(modelInfo);\n  }\n  _initInstantConfig() {\n    const manager = this;\n    this.instantConfig = {\n      _autoBreath: true,\n      get autoBreath() {\n        return this._autoBreath;\n      },\n      set autoBreath(value) {\n        this._autoBreath = value;\n        if (value) {\n          manager.model.internalModel.breath = this.store.breath;\n        } else {\n          if (this.store.breath === null) {\n            this.store.breath = manager.model.internalModel.breath;\n          }\n          manager.model.internalModel.breath = null;\n        }\n      },\n      _autoEyeBlink: true,\n      get autoEyeBlink() {\n        return this._autoEyeBlink;\n      },\n      set autoEyeBlink(value) {\n        this._autoEyeBlink = value;\n        if (value) {\n          manager.model.internalModel.eyeBlink = this.store.eyeBlink;\n        } else {\n          if (this.store.eyeBlink === null) {\n            this.store.eyeBlink = manager.model.internalModel.eyeBlink;\n          }\n          manager.model.internalModel.eyeBlink = null;\n        }\n      },\n      _trackMouse: true,\n      get trackMouse() {\n        return this._trackMouse;\n      },\n      set trackMouse(value) {\n        this._trackMouse = value;\n        if (!value) {\n          manager.model.internalModel.focusController.targetX = 0;\n          manager.model.internalModel.focusController.targetY = 0;\n        }\n      },\n      clickAnimation: \"random\",\n      dragAnimation: \"none\",\n      store: {\n        breath: null,\n        eyeBlink: null,\n      },\n    };\n  }\n  _clearModel() {\n    this._quitCapture();\n    if (this.model !== null && !this.model.destroied) {\n      this.model.destroy();\n    }\n    this.model = null;\n    this.parameterMonitor.clear();\n    this.partMonitor.clear();\n  }\n  _updateModelTransform() {\n    this._sendToModelControl({\n      channel: \"manager:update-model-transform\",\n      data: {\n        x: this.model.x,\n        y: this.model.y,\n        // 目前缩放不提供xy方向的分别缩放\n        scale: this.model.scale.x,\n      },\n    });\n  }\n  _bindEventAnimation() {\n    this.model.on(\"click\", () => {\n      // 防止拖拽过程连带触发点击事件，只要dragEmitted为true，说明pointermove事件绝对被触发过\n      // 这里有一个很巧妙的地方，如果不调用draggable函数，dragEmitted只能是undefined，下方判断依旧能正确触发，因此不需要手动判断是否启动了拖拽\n      if (!this.model.dragEmitted) {\n        this._loadMotionByPath(this.instantConfig.clickAnimation);\n      }\n    });\n    this.model.on(\"dragstart\", () => {\n      this._loadMotionByPath(this.instantConfig.dragAnimation);\n    });\n  }\n  _startRender() {\n    this.then = performance.now();\n    this.shouldRender = true;\n    requestAnimationFrame(this._render.bind(this));\n  }\n  _buildModelControlInfo(modelInfo) {\n    const internalModel = this.model.internalModel;\n    const coreModel = internalModel.coreModel;\n    const modelControlInfo = {\n      description: [\n        { label: \"name\", value: modelInfo.name },\n        { label: \"sdk-version\", value: this.model.sdkVersion },\n        { label: \"extension-name\", value: modelInfo.extensionName },\n        {\n          label: \"group-count\",\n          value: internalModel.settings.groups\n            ? Object.keys(internalModel.settings.groups).length\n            : console.warn(\n                `Model ${modelInfo.name} has not group count info.`\n              ) && null,\n        },\n        {\n          label: \"hit-area-count\",\n          value: Object.keys(internalModel.hitAreas).length,\n        },\n        {\n          label: \"motion-group-count\",\n          value: internalModel.settings.motions\n            ? Object.keys(internalModel.settings.motions).length\n            : console.warn(\n                `Model ${modelInfo.name} has not motion group count info.`\n              ) && null,\n        },\n        {\n          label: \"motion-count\",\n          value: internalModel.settings.motions\n            ? Object.keys(internalModel.settings.motions).reduce(\n                (acc, cur) => acc + internalModel.settings.motions[cur].length,\n                0\n              )\n            : console.warn(\n                `Model ${modelInfo.name} has not motion count info.`\n              ) && null,\n        },\n        { label: \"part-count\", value: coreModel._partIds.length },\n        { label: \"parameter-count\", value: coreModel._parameterIds.length },\n      ],\n      parameter: {\n        // live2d的parameter没有固定值域\n        _parameterIds: coreModel._parameterIds,\n        _parameterMinimumValues: coreModel._parameterMinimumValues,\n        _parameterMaximumValues: coreModel._parameterMaximumValues,\n      },\n      part: coreModel._partIds,\n      // 如果没有motion，得到的是undefined，正好触发控制器的提示信息\n      motion: internalModel.settings.motions,\n    };\n    return modelControlInfo;\n  }\n  _render(now) {\n    if (this.model === null || !this.shouldRender) {\n      return;\n    }\n    if (this.stats !== null) {\n      this.stats.begin();\n      this.stats.end();\n    }\n    // 如果正在进行面部捕捉，鼠标跟踪会将捕捉结果覆盖掉\n    if (\n      this.instantConfig?.trackMouse &&\n      this.focusPosition !== null &&\n      this.captureManagerNow === null\n    ) {\n      // 不像文档（https://guansss.github.io/pixi-live2d-display/interactions/）这样直接将focus函数写在事件监听里，而是在渲染时调用，应该能减少非必要的focus运行次数\n      this.model.focus(this.focusPosition.x, this.focusPosition.y);\n    }\n    // 销毁模型后不再调用\n    // 经过实际测试，发现使用pixi官方的app.ticker.add操作（https://pixijs.io/guides/basics/getting-started.html）似乎会丢失自动鼠标跟踪（虽然现在也不用自动跟踪了……）\n    if (!this.model.destroyed) {\n      this.model.update(now - this.then);\n      this.then = now;\n      requestAnimationFrame(this._render.bind(this));\n    }\n    if (this.parameterMonitor.checkUpdate()) {\n      this._sendToModelControl({\n        channel: \"manager:update-parameter\",\n        data: {\n          value: this.parameterMonitor.value,\n        },\n      });\n    }\n    if (this.partMonitor.checkUpdate()) {\n      this._sendToModelControl({\n        channel: \"manager:update-part\",\n        data: {\n          value: this.partMonitor.value,\n        },\n      });\n    }\n  }\n  handleMessage(message) {\n    switch (message.channel) {\n      case \"control:bind-parameter\": {\n        this._bindParameter(message.data.parameterId);\n        break;\n      }\n      case \"control:set-parameter\": {\n        this._setParameter(message.data);\n        break;\n      }\n      case \"control:bind-part\": {\n        this._bindPart(message.data.partId);\n        break;\n      }\n      case \"control:set-part\": {\n        this._setPart(message.data);\n        break;\n      }\n      case \"control:play-motion\": {\n        this._loadMotion(message.data.motion);\n        break;\n      }\n      // 目前看来，面部捕捉和动画播放并不冲突，所以可以同时进行，动画播放的优先级高于面部捕捉\n      case \"control:launch-capture\": {\n        // 先把focus位置转正了，不然rig结果头可能是偏的\n        this.model.internalModel.focusController.targetX = 0;\n        this.model.internalModel.focusController.targetY = 0;\n        this.captureManagerNow = new FaceMeshCaptureManager();\n        this.captureManagerNow.setTarget(this.model);\n        this.captureManagerNow.start();\n        break;\n      }\n      case \"control:quit-capture\": {\n        this._quitCapture();\n        this.model.pose();\n        break;\n      }\n      case \"control:change-instant-config\": {\n        const { name, value } = message.data;\n        this.instantConfig[name] = value;\n        break;\n      }\n      case \"control:set-model-transform\": {\n        this.model.x = message.data.x;\n        this.model.y = message.data.y;\n        this.model.scale.set(message.data.scale);\n        break;\n      }\n      case \"control:query-model-transform\": {\n        this._updateModelTransform();\n        break;\n      }\n    }\n  }\n  _bindParameter(parameterId) {\n    this.parameterMonitor.bind(parameterId, this.model);\n  }\n  _setParameter({ parameterId, value }) {\n    this.model.internalModel.coreModel.setParameterValueById(\n      parameterId,\n      value\n    );\n    // 直接手动更新Monitor的数值，防止checkUpdate机制循环发送更新消息\n    this.parameterMonitor.value = value;\n  }\n  _bindPart(partId) {\n    this.partMonitor.bind(partId, this.model);\n  }\n  _setPart({ partId, value }) {\n    this.model.internalModel.coreModel.setPartOpacityById(partId, value);\n    // 直接手动更新Monitor的数值，防止checkUpdate机制循环发送更新消息\n    this.partMonitor.value = value;\n  }\n  _loadMotion(motionInfo) {\n    const motionIndex = this.model.internalModel.settings.motions[\n      motionInfo.group\n    ].findIndex((motion) =>\n      // moc与moc3的入口文件属性名不同\n      motionInfo.File\n        ? motion.File === motionInfo.File\n        : motionInfo.file\n        ? motion.file === motionInfo.file\n        : false\n    );\n    this.model.motion(motionInfo.group, motionIndex);\n  }\n  _quitCapture() {\n    this.captureManagerNow?.quitCapture();\n    this.captureManagerNow = null;\n  }\n  _addEventListeners() {\n    document.addEventListener(\"pointermove\", this._onPointerMove);\n  }\n  _removeEventListeners() {\n    document.removeEventListener(\"pointermove\", this._onPointerMove);\n  }\n  _loadMotionByPath(motionPath) {\n    // 自定义的两个正常不会出现的路径名，方便统一的进行载入\n    if (motionPath === \"none\") {\n      return;\n    } else if (motionPath === \"random\") {\n      const motionGroups = Object.keys(\n        this.model.internalModel.settings.motions\n      );\n      const randomGruoup =\n        motionGroups[Math.floor(Math.random() * motionGroups.length)];\n      this.model.motion(randomGruoup);\n    } else {\n      const motions = this.model.internalModel.settings.motions;\n      let motionIndex, motionGroup;\n      for (let groupName of Object.keys(motions)) {\n        motionIndex = motions[groupName].findIndex((motion) =>\n          motion.File\n            ? motion.File === motionPath\n            : motion.file\n            ? motion.file === motionPath\n            : false\n        );\n        if (motionIndex !== -1) {\n          motionGroup = groupName;\n          break;\n        }\n      }\n      if (motionIndex === -1) {\n        // 一般来讲不可能触发\n        throw new Error(\n          \"Model Event Animation: Can't find motion file: \" + motionPath\n        );\n      } else {\n        this.model.motion(motionGroup, motionIndex);\n      }\n    }\n  }\n  // 不使用箭头函数会导致this的指向出错，若使用bind更改this指向，会导致返回的function和原函数不同，无法移出事件监听器\n  _onPointerMove = (event) => {\n    if (this.focusPosition === null) {\n      // 初次检测，初始化focusPosition\n      this.focusPosition = {};\n    }\n    this.focusPosition.x = event.clientX;\n    this.focusPosition.y = event.clientY;\n  };\n}\n"
  },
  {
    "path": "src/renderer/display/modelManagers/MmdManager.js",
    "content": "import { ModelManager3D } from \"./ModelManager3D\";\nimport * as THREE from \"three\";\nimport { MMDLoader } from \"three/examples/jsm/loaders/MMDLoader.js\";\nimport { OutlineEffect } from \"three/examples/jsm/effects/OutlineEffect.js\";\nimport { MouseFocusHelper } from \"@display/utils/3d/MouseFocusHelper.js\";\nimport { buildNodeInfoTreeAndList } from \"@display/utils/3d/NodeInfo\";\nimport { TransformMonitor } from \"@display/utils/3d/Monitor\";\nimport { MorphMonitor } from \"@display/utils/mmd/Monitor\";\nimport { AnimationManager } from \"@display/utils/mmd/AnimationManager\";\nimport { MMDFaceMeshCaptureManager as FaceMeshCaptureManager } from \"@display/utils/capture/MMDFaceMeshCaptureManager\";\nimport { MMDHolisticCaptureManager as HolisticCaptureManager } from \"@display/utils/capture/MMDHolisticCaptureManager\";\nexport class MmdManager extends ModelManager3D {\n  constructor(parentApp) {\n    super(parentApp);\n    this.modelType = \"MMD\";\n    this._initObjects();\n  }\n  switchIn() {\n    this.ModelLoader = new MMDLoader();\n    this.transformMonitor = new TransformMonitor();\n    this.morphMonitor = new MorphMonitor();\n    // scene\n    this.scene = new THREE.Scene();\n    this._addLight();\n    // 由于要在整个屏幕上展示，刻意将视锥体垂直视野角度改为了30度，以减小模型的屏幕边缘时产生的画面畸变\n    //camera\n    this.camera = new THREE.PerspectiveCamera(\n      30,\n      window.innerWidth / window.innerHeight,\n      1,\n      2000\n    );\n    this.camera.position.set(0, 10, 70);\n    // 这是一步立足长远，顾全大局的操作，在之后主要有两个作用：\n    // 其一，在构建节点树的时候会连着Camera进去，这样相机的位置就能和其他对象统一控制了\n    // 其二，之后要载入音频的时候，会把AudioListener加到camera下，这样一来，相机的移动就可以连带着listener移动，就像给相机挂了个耳机一样（然而目前用的不是THREE的PositionalAudio，这波操作似乎什么用都没有……）\n    this.scene.add(this.camera);\n    //renderer\n    this.renderer = new THREE.WebGLRenderer({\n      antialias: this.antialias,\n      aplpha: true,\n      canvas: document.getElementById(\"display-canvas\"),\n    });\n    this.renderer.setClearColor(0x000000, 0);\n    this.renderer.setPixelRatio(this.resolution);\n    this.renderer.setSize(window.innerWidth, window.innerHeight);\n    //effect\n    this.effect = new OutlineEffect(this.renderer);\n    this.effect.enabled = this.config.display[\"mmd-outline-effect\"];\n    this.config.display[\"mmd-orbit-controls\"] && this._initOrbitControls();\n    this._addEventListeners();\n  }\n  _addLight() {\n    // 旧版exmaple的光照\n    // const ambient = new THREE.AmbientLight(0x666666);\n    // this.scene.add(ambient);\n    // const directionalLight = new THREE.DirectionalLight(0x887766);\n    // directionalLight.position.z = 100;\n    // this.scene.add(directionalLight);\n\n    // Three.js的r155版貌似对光照系统进行了大改，这里将r169的mmd example光照复制了过来，和之前有区别，不过看着效果还行，要较劲也是之后再来吧\n    // https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733\n    const ambient = new THREE.AmbientLight(0xaaaaaa, 3);\n    this.scene.add(ambient);\n\n    const directionalLight = new THREE.DirectionalLight(0xffffff, 2);\n    directionalLight.position.set(-1, 1, 1).normalize();\n    this.scene.add(directionalLight);\n  }\n  loadModel(modelInfo) {\n    return new Promise((resolve, reject) => {\n      this._initInstantConfig();\n      this.ModelLoader.load(\n        modelInfo.entranceFile,\n        (mmd) => {\n          console.log(\"[Hime Display] MMD Loaded\");\n          this._clearModel();\n          this.model = mmd;\n          // 世界未解之谜，只要载入mmd模型，直接在这里调用this.scene.add(mmd)，WebGL上下文就会有一定概率渲染着渲染着就弄丢了，然后整个程序直接卡死…\n          // 然后在程序卡一阵子自动退出后，主进程会报出两条报错信息：\n          // ERROR:command_buffer_proxy_impl.cc(293)] GPU state invalid after WaitForTokenInRange.\n          // ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=512\n          // 经过各种瞎尝试，设个延时（大概1000ms，延时设短了也不行，如0，100也有几率卡死）函数后，就不会有问题了，别问我解决的原理是什么，问就是不知道\n\n          // 1.这个问题在脱离Electron，直接在Chrome（后已证实同样会在Chrome出现），Firefox中测试时都不会出现\n          // 2.该问题与ESM模块系统无直接关联，全换成iife模块它也崩\n          // 3.该问题与跨域使用file:// 加载模型无直接关联，之后也进一步验证了，虽然在file://的协议下，资源相应头没有Content-Length导致无法在OnProgress回调中检查加载进度，但是这并没有影响资源的正常加载\n          // 4.顺带一提，展示器在崩坏重载后的报错信息为：\n          // THREE.WebGLProgram: Shader Error 0 - VALIDATE_STATUS false\n          // WebGL: INVALID_OPERATION: useProgram: program not valid\n          // THREE.WebGLProgram: Shader Error 1282 - VALIDATE_STATUS false\n          // INVALID_OPERATION: useProgram: program not valid\n          // INVALID_OPERATION: useProgram: program not valid\n          // INVALID_OPERATION: useProgram: program not valid\n          // WebGL: CONTEXT_LOST_WEBGL: loseContext: context lost\n          // THREE.WebGLRenderer: Context Lost.\n          // 5.推测此问题可能比较单纯，就是在Electron环境下THREE的渲染在一些情况下会导致GPU错误。出现的第一个报错为Shader Error，推测深层次可能跟THREE的MMDToonShader的渲染有关，反正这已经到我无法解决的领域了\n          // 6.通过各种打断点判断，这玩意儿和资源加载似乎就没什么关系\n          // 7.MMD加载资源的时候，本来纹理的加载的就是异步的，他会先创建material再加载图片，图片未加载时在场景中呈现为透明状态，这没什么问题，从时间线的分析上来看，模型是加载完成和图片加载完成的顺序和软件崩不崩没有直接联系\n          // 8.测试发现，只要有一次载入成功，之后的几次模型载入必定成功，由此推测这很可能是跟某个东西的初始化或缓存什么的相关\n          // 9.测试发现，如果先让renderer渲染着，再让模型加载，甚至在ModelLoader调用回调函数之前软件就已经崩了，这说明这个问题甚至跟把mmd模型丢scene渲染都没有直接关系\n          // 10.接第8条，发现不单单是之后几次必定成功，只要主进程不退出，重启展示器页面也必定不崩，而且之前崩的状态是直接波及到主进程和渲染器进程，是整个应用全部卡死，由此推测，这个问题或许已经超出了前端的范畴了，是Electron内部对Chromium处理的什么问题\n          // 现在得出的不触发问题的方法，在render之前一段时间（大概要一秒多）就载入MMD模型\n          // 目前我感觉比较好的解决方案，要求不就是要加载第一个MMD模型隔一段时间后才能调用渲染器进程嘛，那我一上来就加载个模型，加载完后什么事都不干，之后不久什么问题都没有了？实践证明真的是这样，不过对这个模型也有要求，我试过直接放一根骨头的模型，无效；拿着Blender随便造了个MMD立方体，带个基础材质，还是无效；把材质弄成纹理贴图，依旧无效……合着和材质半点关系没有是吧，好吧管你问题出在哪儿，那只能直接上真模型了。顺带一提，这个问题还仅仅在pmx模型出现，pmd一点问题也没有\n          // 不过目前在渲染前加个一秒多的延时一般来讲也没什么问题了，之后具体怎么弄再看吧\n          // 新的进展：经过后来的测试发现，这其实不是Electron的问题，单纯的是Chrome的问题，只是之前的测试用例载入了动作文件，导致mmd载入和启动渲染间隔时间较长，因此在Chrome里没有触发bug，做出错误判断。经过目前的测试，引发Chrome崩溃的条件较为苛刻，如下：macOS系统，Chrome浏览器（实测Edge都没问题），载入模型格式为pmx，打开浏览器后第一次启动渲染，启动渲染在启动浏览器后第一个pmx模型载入的约1000ms内。测试机型为Intel的Mac，在M系列的Mac中情况未知\n\n          // 震惊！！！setImmediate居然不是标准特性……\n          // https://developer.mozilla.org/zh-CN/docs/Web/API/Window/setImmediate\n          // 直接给我来个ReferenceError: setImmediate is not defined\n          this.scene.add(this.model);\n          // 后来发现又个windows下的cancelAnimationFrame的API，但这是一个这是一个实验中的功能，所以还是不用了\n          if (!this.shouldRender) {\n            this.shouldRender = true;\n            // 这里说的加载问题仅限于macOS\n            if (/macintosh|mac os x/i.test(navigator.userAgent)) {\n              setTimeout(() => {\n                this._render();\n              }, 1000);\n            } else {\n              this._render();\n            }\n          }\n          this._initMouceFocusHelper();\n          resolve(this._buildModelControlInfo(modelInfo));\n        },\n        null,\n        (error) => {\n          console.error(`[Hime Display] MMD Load Error: ${error}`);\n        }\n      );\n    });\n  }\n  _initInstantConfig() {\n    // 放给下方的setter，使用\n    const manager = this;\n    // 载入模型时初始化即时配置\n    // 由于没有存数据库，这就要求这里的初始配置和控制面板那边的默认值保持一致\n    this.instantConfig = {\n      _physicsSimulation: true,\n      get physicsSimulation() {\n        return this._physicsSimulation;\n      },\n      set physicsSimulation(physicsSimulation) {\n        this._physicsSimulation = physicsSimulation;\n        manager.animationManager?.helper.enable(\"physics\", physicsSimulation);\n      },\n      mixamoLegTranslateMode: \"ik\",\n      _trackMouse: true,\n      get trackMouse() {\n        return this._trackMouse;\n      },\n      set trackMouse(value) {\n        this._trackMouse = value;\n        if (!value) {\n          manager.mouseFocusHelper.object.rotation.set(0, 0, 0);\n        }\n      },\n    };\n  }\n  _initMouceFocusHelper() {\n    this.mouseFocusHelper = new MouseFocusHelper(\n      this.model.skeleton.bones.find((bone) => bone.name === \"頭\"),\n      this.camera\n    );\n  }\n  _buildModelControlInfo(modelInfo) {\n    const mmdUserData = this.model.geometry.userData.MMD;\n    const modelControlInfo = {\n      description: [\n        { label: \"name\", value: modelInfo.name },\n        { label: \"extension-name\", value: modelInfo.extensionName },\n        {\n          label: \"vertex-count\",\n          value: this.model.geometry.attributes.normal.count,\n        },\n        { label: \"triangle-count\", value: this.model.geometry.index.count / 3 },\n        { label: \"bone-count\", value: mmdUserData.bones.length },\n        { label: \"ik-count\", value: mmdUserData.iks.length },\n        { label: \"rigid-body-count\", value: mmdUserData.rigidBodies.length },\n        { label: \"constraint-count\", value: mmdUserData.constraints.length },\n        { label: \"grant-count\", value: mmdUserData.grants.length },\n        {\n          label: \"morph-count\",\n          value: this.model.geometry.morphTargets.length,\n        },\n      ],\n      morph: Object.keys(this.model.morphTargetDictionary),\n      // 必须在添加上模型后再构建信息\n      transform: buildNodeInfoTreeAndList(this.scene),\n    };\n    return modelControlInfo;\n  }\n\n  // 渲染时需要更新的各种对象\n  _updateObjects() {\n    if (this.stats !== null) {\n      this.stats.begin();\n      this.stats.end();\n    }\n    if (this._sendToModelControl !== null) {\n      if (this.transformMonitor.checkUpdate()) {\n        this._sendToModelControl({\n          channel: \"manager:update-node-transform\",\n          data: this.transformMonitor.transform,\n        });\n      }\n      if (this.morphMonitor.checkUpdate()) {\n        this._sendToModelControl({\n          channel: \"manager:update-node-morph\",\n          data: {\n            weight: this.morphMonitor.value,\n          },\n        });\n      }\n    }\n    if (this.animationManager?.ready && this.animationManager?.clock.running) {\n      this.animationManager.update();\n    }\n    // 播放动画的时候模型还盯着鼠标看，转身都不带扭头的那效果……我实在是看不下去了\n    if (\n      this.instantConfig?.trackMouse &&\n      this.animationManager === null &&\n      this.captureManagerNow === null\n    ) {\n      this.mouseFocusHelper?.focus();\n    }\n  }\n  handleMessage(message) {\n    switch (message.channel) {\n      case \"control:bind-node-transform\": {\n        this._bindNodeTransform(message.data.nodeId);\n        break;\n      }\n      case \"control:set-node-transform\": {\n        this._setNodeTransform(message.data);\n        break;\n      }\n      case \"control:play-motion\": {\n        const { motionFilePath, animationLoop } = message.data;\n        console.log(`[Hime Diplsay] Load Motion: ${motionFilePath}`);\n        this._resetAnimationManager();\n        this.animationManager = new AnimationManager(\n          this.ModelLoader,\n          this.instantConfig.mixamoLegTranslateMode\n        );\n        this.animationManager\n          .loadAnimation(this.model, motionFilePath)\n          .then(() => {\n            // 感觉如果animationLoop放到载入动画后即时会出现各种奇妙的情况，比如我设定只播放一遍，都放完了，然后这时突然改成要循环播放，那我究竟如何是好呢？因此这里没有使用及时更新的操作，而是在每一次载入动画的时候读取\n            this.animationManager.setLoop(animationLoop);\n            this.animationManager.helper.enable(\n              \"physics\",\n              this.instantConfig.physicsSimulation\n            );\n            this._sendToModelControl({\n              channel: \"manager:update-motion-info\",\n              data: { durantion: this.animationManager.clip.duration },\n            });\n          });\n        break;\n      }\n      case \"control:play-motion-with-audio\": {\n        const { motionFilePath, audioFilePath, delayTime, animationLoop } =\n          message.data;\n        console.log(\n          `[Hime Diplsay] Load Motion: ${motionFilePath} With Audio: ${audioFilePath}`\n        );\n        this._resetAnimationManager();\n        this.animationManager = new AnimationManager(\n          this.ModelLoader,\n          this.instantConfig.mixamoLegTranslateMode\n        );\n        this.animationManager\n          .loadAnimationWithAudio(\n            this.model,\n            motionFilePath,\n            audioFilePath,\n            delayTime\n          )\n          .then(() => {\n            this.animationManager.setLoop(animationLoop);\n            this.animationManager.helper.enable(\n              \"physics\",\n              this.instantConfig.physicsSimulation\n            );\n            this._sendToModelControl({\n              channel: \"manager:update-motion-info\",\n              data: { durantion: this.animationManager.clip.duration },\n            });\n          });\n        this.camera.add(this.animationManager.listener);\n        break;\n      }\n      case \"control:set-motion-state\": {\n        const { state } = message.data;\n        if (state === \"play\") {\n          this.animationManager.play();\n        } else if (state === \"pause\") {\n          this.animationManager.pause();\n        }\n        break;\n      }\n      case \"control:quit-motion\": {\n        this._resetAnimationManager();\n        break;\n      }\n      case \"control:launch-capture\": {\n        const { type } = message.data;\n        if (type === \"faceMesh\") {\n          this.captureManagerNow = new FaceMeshCaptureManager();\n        } else if (type === \"holistic\") {\n          this.captureManagerNow = new HolisticCaptureManager();\n        }\n        this.captureManagerNow.setTarget(this.model);\n        this.captureManagerNow.start();\n        break;\n      }\n      case \"control:quit-capture\": {\n        this._quitCapture();\n        this.model.pose();\n        break;\n      }\n      case \"control:bind-morph-target\": {\n        const { morphName } = message.data;\n        this.morphMonitor.bind(morphName, this.model);\n        break;\n      }\n      case \"control:set-morph-weight\": {\n        this._setMorphWeight(message.data);\n        break;\n      }\n      // 这波是通信逐渐套娃化啊……这都弄出通信下的通信下的通信来了，不过这样的设计我感觉挺合理\n      case \"control:change-instant-config\": {\n        const { name, value } = message.data;\n        this.instantConfig[name] = value;\n        break;\n      }\n    }\n  }\n  _setMorphWeight({ morphName, weight }) {\n    const morphIndex = this.model.morphTargetDictionary[morphName];\n    if (morphIndex === undefined) {\n      throw new Error(`MmdManager: Morph ${morphName} not found in the model`);\n    }\n    this.model.morphTargetInfluences[morphIndex] = weight;\n    // 直接手动更新Monitor的数值，防止checkUpdate机制循环发送更新消息\n    this.morphMonitor.value = weight;\n  }\n  _resetAnimationManager() {\n    this.animationManager?.destroy();\n    this.animationManager = null;\n    this.model.pose();\n    for (let i = 0; i < this.model.morphTargetInfluences.length; i++) {\n      this.model.morphTargetInfluences[i] = 0;\n    }\n  }\n  // 不使用箭头函数会导致this的指向出错，若使用bind更改this指向，会导致返回的function和原函数不同，无法移出事件监听器\n  _onPointerMove = (event) => {\n    // 加上?，防止没载入模型时出错\n    this.mouseFocusHelper?.update(event.clientX, event.clientY);\n  };\n}\n"
  },
  {
    "path": "src/renderer/display/modelManagers/ModelManager.js",
    "content": "// 所有管理器的祖先\nexport class ModelManager {\n  constructor(parentApp) {\n    this.config = parentApp.config;\n    this.stats = parentApp.stats;\n    this.resolution = parentApp.resolution;\n    this.antialias = parentApp.antialias;\n  }\n  onSendToModelControl(callback) {\n    this._sendToModelControl = callback;\n  }\n}\n"
  },
  {
    "path": "src/renderer/display/modelManagers/ModelManager3D.js",
    "content": "// 统筹两个3D模型公用的功能\nimport { ModelManager } from \"./ModelManager\";\nimport { OrbitControls } from \"three/examples/jsm/controls/OrbitControls.js\";\nimport { VRMUtils } from \"@pixiv/three-vrm\";\nclass ModelManager3D extends ModelManager {\n  _initOrbitControls() {\n    this.orbitControls = new OrbitControls(\n      this.camera,\n      this.renderer.domElement\n    );\n    // 将控制目标点抬高至和相机平齐，不然刚启动时位置不对\n    this.orbitControls.target.y = this.camera.position.y;\n    this.orbitControls.update();\n  }\n  switchOut() {\n    this._removeEventListeners();\n    this._clearModel();\n    this._disposeChildren(this.scene);\n    this.renderer.clear();\n    this.renderer.dispose();\n    this._initObjects();\n  }\n\n  // 初始化各种对象\n  _initObjects() {\n    this._sendToModelControl = null;\n    this.shouldRender = false;\n\n    // 控制面板那边对展示器由两种类型的控制，一个是config数据库中存储的配置，需要重启展示器生效，还有一种是不存储数据库的临时配置，只对当前的模型生效，也就是这里instantConfig内部存放的东西\n    this.instantConfig = null;\n    this.ModelLoader = null;\n    this.transformMonitor = null;\n    this.morphMonitor = null;\n    this.captureManagerNow = null;\n    this.animationManager = null;\n    // 人查麻了，搞了半天MMD模型没被垃圾回收是mouseFocusHelper的问题，由一个脑袋开始揪住整个模型死活不放手是吧\n    this.mouseFocusHelper = null;\n    this.orbitControls = null;\n\n    this.scene = null;\n    this.camera = null;\n    this.renderer = null;\n    this.effect = null;\n    this.model = null;\n    // MMD并未使用时钟，这里为了统一，均赋值为null\n    this.clock = null;\n  }\n  _bindNodeTransform(nodeId) {\n    this.transformMonitor.bind(this.scene.getObjectById(nodeId));\n  }\n  _setNodeTransform({ nodeId, transform }) {\n    const target = this.scene.getObjectById(nodeId);\n    for (let i of [\"position\", \"rotation\", \"scale\"]) {\n      for (let j of [\"x\", \"y\", \"z\"]) {\n        if (target[i][j] !== transform[i][j]) {\n          target[i][j] = transform[i][j];\n        }\n      }\n    }\n    // 直接手动更新Monitor的数值，防止checkUpdate机制循环发送更新消息（一般来讲会发送两次）\n    this.transformMonitor.transform = transform;\n  }\n  _render() {\n    if (!this.shouldRender) {\n      return;\n    }\n    this._updateObjects();\n    this.effect.render(this.scene, this.camera);\n    requestAnimationFrame(this._render.bind(this));\n  }\n  _clearModel() {\n    this._quitCapture();\n    if (this.model !== null) {\n      this._disposeChildren(this.model);\n      this.scene.remove(this.model);\n      // Vroid的材质和几何体不在这\n      this.model.geometry?.dispose();\n      this.model.material?.forEach((material) => {\n        // const mapNames=['map','gradientMap','lightMap','aoMap','emissiveMap','bumpMap','normalMap','displacemantMap','specularMap','alphaMap','envMap']\n        material.map?.dispose();\n        material.gradientMap?.dispose();\n        material.dispose();\n      });\n      // 针对VRM的清理\n      if (this.model.vrm !== undefined) {\n        VRMUtils.deepDispose(this.model.vrm.scene);\n      }\n      this.model = null;\n    }\n  }\n  _quitCapture() {\n    this.captureManagerNow?.quitCapture();\n    this.captureManagerNow = null;\n  }\n  _disposeChildren(parent) {\n    parent.traverse((obj) => {\n      if (obj.isMesh) {\n        // 这里本来应该除了mmd就没有mesh了，还是这么的写一下，但是其他的meshtexture就不知道是什么情况了，先不处理\n        // Vroid可能会没有\n        if (obj.material.dispose !== undefined) {\n          obj.material?.dispose();\n        }\n        if (obj.geometry.dispose !== undefined) {\n          obj.geometry?.dispose();\n        }\n      }\n      if (obj.dispose !== undefined) {\n        // 看了一下THREE.Light类是有dispose方法的，默认是个预留空函数，这里用的平行光和环境光都没有对此函数进行覆盖，但为了之后考虑还是调用一下\n        obj.dispose();\n      }\n    });\n    // 上方遍历函数中调用用改变children数组，导致错误，此处处理也是使用Object.values做了浅层克隆\n    Object.values(parent.children).forEach((obj) => {\n      parent.remove(obj);\n    });\n  }\n  _addEventListeners() {\n    document.addEventListener(\"pointermove\", this._onPointerMove);\n  }\n  _removeEventListeners() {\n    document.removeEventListener(\"pointermove\", this._onPointerMove);\n  }\n  // resize由上级的Application触发\n  onWindowResize() {\n    this.camera.aspect = window.innerWidth / window.innerHeight;\n    this.camera.updateProjectionMatrix();\n    this.effect.setSize(window.innerWidth, window.innerHeight);\n  }\n}\nexport { ModelManager3D };\n"
  },
  {
    "path": "src/renderer/display/modelManagers/SpineManager.js",
    "content": "import { ModelManager } from \"./ModelManager\";\nimport { setModelBaseTransfrom, draggable } from \"@display/utils/2d/utils\";\nimport imageLoaderAdapter from \"@display/utils/spine/premultipliedImageLoader\";\n// 由于live2d的特殊需求，没用模块系统载入pixi.js，pixi-spine模块的载入依赖于模块化pixi.js，因此暂时用成umd版本吧\n// import { Spine } from \"pixi-spine\";\nexport class SpineManager extends ModelManager {\n  constructor(parentApp) {\n    super(parentApp);\n    this.modelType = \"Spine\";\n    this.instantConfig = null;\n\n    this.app = null;\n    this.model = null;\n    this.internalModel = null;\n    this.PIXI = window.PIXI;\n  }\n  getApplicationConfig() {\n    return {\n      // 之后手动触发渲染\n      autoStart: false,\n      view: document.getElementById(\"display-canvas\"),\n      // 即使canvas已经通过CSS配置占满全屏，不做这一影响设置依旧会使得画面拉伸\n      resizeTo: window,\n      antialias: this.antialias,\n      autoDensity: true,\n      transparent: true,\n      resolution: this.resolution,\n    };\n  }\n\n  switchIn() {\n    this.app = new this.PIXI.Application(this.getApplicationConfig());\n  }\n  switchOut() {\n    // this._removeEventListeners();\n    // this._sendToModelControl = null;\n    this.shouldRender = false;\n    this.instantConfig = null;\n    // destroy以后无法直接获得这个上下文了\n    const gl = this.app.renderer.context.gl;\n    this.app.destroy();\n    gl.clear(gl.COLOR_BUFFER_BIT);\n    gl.clear(gl.DEPTH_BUFFER_BIT);\n    gl.clear(gl.STENCIL_BUFFER_BIT);\n    this.app = null;\n    this.model?.destroy();\n    this.model = null;\n    this.internalModel = null;\n  }\n  loadModel(modelInfo) {\n    return new Promise((resolve, reject) => {\n      this._initInstantConfig();\n      this._clearModel();\n      const modelFile = modelInfo.entranceFile;\n      this.app.loader\n        .add(\n          \"spineCharacter\",\n          modelFile,\n          this.config.display[\"spine-premultiply-alpha\"]\n            ? {\n                metadata: { imageLoader: imageLoaderAdapter },\n              }\n            : undefined\n        )\n        .load((loader, resources) => {\n          // 不清除缓存的话，重复加载时天天报warn看着不舒服\n          this.PIXI.utils.clearTextureCache();\n          // 学着pixi-live2d-display开始套娃……\n          this.internalModel = new this.PIXI.spine.Spine(\n            resources.spineCharacter.spineData\n          );\n          this._setupModel();\n          resolve(this._buildModelControlInfo(modelInfo));\n        });\n    });\n  }\n  _setupModel() {\n    // 官方的setSkinByName函数有点问题，自己重新写了一个强制切换皮肤的函数\n    this.internalModel.skeleton.setSkinByNameForce =\n      function setSkinByNameForce(name) {\n        for (let i = 0; i < this.slots.length; i++) {\n          this.slots[i].attachment = null;\n        }\n        this.skin = undefined;\n        this.setSkinByName(name);\n      };\n    const localRect = this.internalModel.getLocalBounds();\n    this.internalModel.position.set(-localRect.x, -localRect.y);\n    this.model = new this.PIXI.Container();\n    this.model.addChild(this.internalModel);\n    this.app.stage.addChild(this.model);\n    setModelBaseTransfrom(this.model, this.config.display, \"spine\");\n    this.model.interactive = true;\n    if (this.config.display[\"spine-draggable\"]) {\n      draggable(this.model);\n    }\n    this.model.on(\"dragging\", this._updateModelTransform.bind(this));\n    this._bindEventAnimation();\n    if (!this.shouldRender) {\n      this._startRender();\n    }\n  }\n  _initInstantConfig() {\n    this.instantConfig = {\n      clickAnimation: \"random\",\n      dragAnimation: \"none\",\n    };\n  }\n  _clearModel() {\n    if (this.model !== null && !this.model.destroied) {\n      this.model.destroy();\n      this.app.loader.reset();\n    }\n  }\n  _updateModelTransform() {\n    this._sendToModelControl({\n      channel: \"manager:update-model-transform\",\n      data: {\n        x: this.model.x,\n        y: this.model.y,\n        // 目前缩放不提供xy方向的分别缩放\n        scale: this.model.scale.x,\n      },\n    });\n  }\n  _bindEventAnimation() {\n    // 对于Spine，点击动画默认播放一次，拖拽动画循环播放\n    this.model.on(\"click\", () => {\n      // 防止拖拽过程连带触发点击事件，只要dragEmitted为true，说明pointermove事件绝对被触发过\n      // 这里有一个很巧妙的地方，如果不调用draggable函数，dragEmitted只能是undefined，下方判断依旧能正确触发，因此不需要手动判断是否启动了拖拽\n      if (!this.model.dragEmitted) {\n        this._loadMotionByPath(this.instantConfig.clickAnimation, false);\n      }\n    });\n    this.model.on(\"dragstart\", () => {\n      this._loadMotionByPath(this.instantConfig.dragAnimation, true);\n    });\n    // 拖拽结束后置空动画对于一些模型会导致问题，因为模型的默认姿态很诡异……\n    this.model.on(\"dragend\", () => {\n      // 对于没有设定事件动画的情况，不进行动作清除\n      if (this.instantConfig.dragAnimation !== \"none\") {\n        this.internalModel.state.setEmptyAnimations(0.3);\n      }\n    });\n  }\n  _startRender() {\n    this.shouldRender = true;\n    this._render();\n  }\n  _buildModelControlInfo(modelInfo) {\n    const motionInfo = [];\n    this.internalModel.spineData.animations.forEach((animation) => {\n      motionInfo.push({\n        name: animation.name,\n        duration: Number(animation.duration.toFixed(2)),\n      });\n    });\n    const modelControlInfo = {\n      description: [\n        { label: \"name\", value: modelInfo.name },\n        { label: \"extension-name\", value: modelInfo.extensionName },\n        {\n          label: \"version-number\",\n          value: this.internalModel.spineData.version,\n        },\n        {\n          label: \"motion-count\",\n          value: this.internalModel.spineData.animations.length,\n        },\n        {\n          label: \"bone-count\",\n          value: this.internalModel.spineData.bones.length,\n        },\n        {\n          label: \"slot-count\",\n          value: this.internalModel.spineData.slots.length,\n        },\n        {\n          label: \"ik-count\",\n          value: this.internalModel.spineData.ikConstraints.length,\n        },\n        {\n          label: \"skin-count\",\n          value: this.internalModel.spineData.skins.length,\n        },\n      ],\n      motion: motionInfo,\n      skin: this.internalModel.spineData.skins.map((skin) => skin.name),\n    };\n    return modelControlInfo;\n  }\n  _render() {\n    this.app.ticker.start();\n    this.app.ticker.add((delta) => {\n      if (!this.shouldRender) {\n        this.app.ticker.stop();\n        return;\n      }\n      if (this.stats !== null) {\n        this.stats.begin();\n        this.stats.end();\n      }\n      this.app.render();\n    });\n  }\n  handleMessage(message) {\n    switch (message.channel) {\n      case \"control:play-motion\": {\n        const {\n          motion: { name },\n          animationLoop,\n        } = message.data;\n        this.internalModel.state.setAnimation(0, name, animationLoop);\n        break;\n      }\n      case \"control:quit-motion\": {\n        // 需要提供一个动画转换为空轨道的时长，这里直接设定为1秒了\n        this.internalModel.state.setEmptyAnimations(1);\n        // 下方的方法会导致模型维持在当前动作的最后一帧\n        // this.internalModel.state.clearTracks();\n        break;\n      }\n      case \"control:change-instant-config\": {\n        const { name, value } = message.data;\n        this.instantConfig[name] = value;\n        break;\n      }\n      case \"control:set-model-transform\": {\n        this.model.x = message.data.x;\n        this.model.y = message.data.y;\n        this.model.scale.set(message.data.scale);\n        break;\n      }\n      case \"control:query-model-transform\": {\n        this._updateModelTransform();\n        break;\n      }\n      case \"control:set-skin\": {\n        this.internalModel.skeleton.setSkinByNameForce(message.data.skin);\n        break;\n      }\n    }\n  }\n  _loadMotionByPath(motionPath, loop) {\n    if (motionPath === \"none\") {\n      return;\n    } else if (motionPath === \"random\") {\n      const animationNames = this.internalModel.spineData.animations.map(\n        (a) => a.name\n      );\n      this.internalModel.state.setAnimation(\n        0,\n        animationNames[Math.floor(Math.random() * animationNames.length)],\n        loop\n      );\n    } else {\n      this.internalModel.state.setAnimation(0, motionPath, loop);\n    }\n  }\n}\n"
  },
  {
    "path": "src/renderer/display/modelManagers/SpineManager42.js",
    "content": "import * as PIXI from \"pixi.js\";\nimport { Spine } from \"@esotericsoftware/spine-pixi-v8\";\nimport { SpineManager } from \"./SpineManager\";\nexport class SpineManager42 extends SpineManager {\n  constructor(parentApp) {\n    super(parentApp);\n    this.modelType = \"Spine42\";\n    this.PIXI = PIXI;\n  }\n  switchIn() {\n    this.app = new this.PIXI.Application();\n    this.app.init({\n      ...this.getApplicationConfig(),\n      backgroundAlpha: 0,\n    });\n  }\n  switchOut() {\n    // this._removeEventListeners();\n    // this._sendToModelControl = null;\n    this.shouldRender = false;\n    this.instantConfig = null;\n    // destroy以后无法直接获得这个上下文了\n    const gl = this.app.renderer.context.gl;\n    this.app.destroy(true, true);\n    gl.clear(gl.COLOR_BUFFER_BIT);\n    gl.clear(gl.DEPTH_BUFFER_BIT);\n    gl.clear(gl.STENCIL_BUFFER_BIT);\n    gl.getExtension(\"WEBGL_lose_context\")?.loseContext();\n    this.app = null;\n    this.model?.destroy();\n    this.model = null;\n    this.internalModel = null;\n  }\n\n  loadModel(modelInfo) {\n    return new Promise(async (resolve, reject) => {\n      try {\n        this._initInstantConfig();\n        this._clearModel();\n        const modelFile = modelInfo.entranceFile;\n        // 将modelFile中的扩展名(skel或json)替换为atlas\n        const atlasFile = modelFile.replace(/\\.(skel|json)$/, \".atlas\");\n\n        this.PIXI.Assets.setPreferences({\n          preferWorkers: false,\n        });\n        this.PIXI.Assets.add({ alias: \"spineData\", src: modelFile });\n        this.PIXI.Assets.add({ alias: \"spineAtlas\", src: atlasFile });\n        await this.PIXI.Assets.load(\"spineData\");\n        await this.PIXI.Assets.load(\"spineAtlas\");\n\n        this.internalModel = Spine.from({\n          skeleton: \"spineData\",\n          atlas: \"spineAtlas\",\n          scale: 1.0,\n        });\n        this.internalModel.spineData = this.internalModel.skeleton.data;\n\n        this._setupModel();\n        resolve(this._buildModelControlInfo(modelInfo));\n      } catch (error) {\n        reject(error);\n      }\n    });\n  }\n  _clearModel() {\n    if (this.model !== null && !this.model.destroied) {\n      this.model.destroy();\n      // this.app.loader.reset();\n      this.PIXI.Assets.reset();\n    }\n  }\n}\n"
  },
  {
    "path": "src/renderer/display/modelManagers/VroidManager.js",
    "content": "import { ModelManager3D } from \"./ModelManager3D\";\nimport * as THREE from \"three\";\nimport { GLTFLoader } from \"three/examples/jsm/loaders/GLTFLoader.js\";\nimport { OutlineEffect } from \"three/examples/jsm/effects/OutlineEffect.js\";\nimport { MouseFocusHelper } from \"@display/utils/3d/MouseFocusHelper.js\";\nimport { buildNodeInfoTreeAndList } from \"@display/utils/3d/NodeInfo\";\nimport { TransformMonitor } from \"@display/utils/3d/Monitor\";\nimport { MorphMonitor } from \"@display/utils/vroid/Monitor\";\nimport { VRoidFaceMeshCaptureManager as FaceMeshCaptureManager } from \"@display/utils/capture/VRoidFaceMeshCaptureManager\";\nimport { VRoidHolisticCaptureManager as HolisticCaptureManager } from \"@display/utils/capture/VRoidHolisticCaptureManager\";\nimport {\n  VRMHumanBoneName,\n  VRMExpressionPresetName,\n  VRMLoaderPlugin,\n} from \"@pixiv/three-vrm\";\n\n// 用于转头……VRM使用的坐标系和THREE是反的，不转的话模型永远是后脑勺对着你\nconst turnHeadQuaternion = new THREE.Quaternion().setFromEuler(\n  new THREE.Euler(0, Math.PI, 0)\n);\nexport class VroidManager extends ModelManager3D {\n  constructor(parentApp) {\n    super(parentApp);\n    this._initObjects();\n  }\n  switchIn() {\n    this.clock = new THREE.Clock();\n    this.ModelLoader = new GLTFLoader();\n    this.ModelLoader.register((parser) => new VRMLoaderPlugin(parser));\n    this.transformMonitor = new TransformMonitor();\n    this.morphMonitor = new MorphMonitor();\n    // scene\n    this.scene = new THREE.Scene();\n    this._addLight();\n    //camera\n    this.camera = new THREE.PerspectiveCamera(\n      30,\n      window.innerWidth / window.innerHeight,\n      0.1,\n      200\n    );\n    this.camera.position.set(0.0, 1.0, 5.0);\n    this.scene.add(this.camera);\n    //renderer\n    this.renderer = new THREE.WebGLRenderer({\n      antialias: this.antialias,\n      aplpha: true,\n      canvas: document.getElementById(\"display-canvas\"),\n    });\n    this.renderer.setClearColor(0x000000, 0);\n    this.renderer.setPixelRatio(this.resolution);\n    this.renderer.setSize(window.innerWidth, window.innerHeight);\n    //effect\n    this.effect = new OutlineEffect(this.renderer);\n    this.effect.enabled = this.config.display[\"vroid-outline-effect\"];\n    this.config.display[\"vroid-orbit-controls\"] && this._initOrbitControls();\n    this._addEventListeners();\n  }\n  _addLight() {\n    const directionalLight = new THREE.DirectionalLight(0xffffff, Math.PI);\n    directionalLight.position.set(1.0, 1.0, 1.0).normalize();\n    this.scene.add(directionalLight);\n  }\n  loadModel(modelInfo) {\n    return new Promise((resolve, reject) => {\n      this._initInstantConfig();\n      const modelFile = modelInfo.entranceFile;\n      this.ModelLoader.load(modelFile, (gltf) => {\n        const vrm = gltf.userData.vrm;\n        console.log(\"[Hime Display] VRM Loaded\");\n        this._clearModel();\n        this.model = vrm.scene;\n        // 为了保证3D控制的通用性，将顶部的vrm对象挂载到了内部的模型上\n        this.model.vrm = vrm;\n        // VRM1.0新机制，默认使用代理骨骼(Normalized Human Bones)控制模型，这里是开关\n        // https://github.com/pixiv/three-vrm/blob/dev/guides/migration-guide-1.0.md#normalized-human-bones\n        // this.model.vrm.humanoid.autoUpdateHumanBones = false;\n        // 手动添加一个模型复位函数\n        this.model.pose = function () {\n          this.vrm.humanoid.resetNormalizedPose();\n        };\n        // 模型绕Y轴旋转180度\n        this.model.rotateY(Math.PI);\n        this.scene.add(this.model);\n        if (!this.shouldRender) {\n          this.shouldRender = true;\n          this._render();\n        }\n        this._initMouceFocusHelper();\n        resolve(this._buildModelControlInfo(modelInfo));\n      });\n    });\n  }\n  _initInstantConfig() {\n    const manager = this;\n    // 由于没有存数据库，这就要求这里的初始配置和控制面板那边的默认值保持一致\n    this.instantConfig = {\n      vrmUpdate: true,\n      _trackMouse: true,\n      get trackMouse() {\n        return this._trackMouse;\n      },\n      set trackMouse(value) {\n        this._trackMouse = value;\n        if (!value) {\n          manager.mouseFocusHelper.object.rotation.set(0, 0, 0);\n        }\n      },\n    };\n  }\n  _initMouceFocusHelper() {\n    this.mouseFocusHelper = new MouseFocusHelper(\n      this.model.vrm.humanoid.getNormalizedBoneNode(VRMHumanBoneName.Head),\n      // this.model.vrm.humanoid.getBoneNode(VRMHumanBoneName.Head),\n      this.camera\n    );\n  }\n  _buildModelControlInfo(modelInfo) {\n    const modelControlInfo = {\n      description: [\n        { label: \"name\", value: modelInfo.name },\n        { label: \"extension-name\", value: modelInfo.extensionName },\n        { label: \"model-version\", value: this.model.vrm.meta.version },\n        { label: \"author\", value: this.model.vrm.meta.author },\n        {\n          label: \"sexual-ussage-name\",\n          value: this.model.vrm.meta.sexualUssageName,\n        },\n        {\n          label: \"violent-ussage-name\",\n          value: this.model.vrm.meta.violentUssageName,\n        },\n      ],\n      morph: Object.values(VRMExpressionPresetName),\n      // 必须在添加上模型后再构建信息\n      transform: buildNodeInfoTreeAndList(this.scene),\n    };\n    return modelControlInfo;\n  }\n  _updateObjects() {\n    if (this.stats !== null) {\n      this.stats.begin();\n      this.stats.end();\n    }\n    if (this._sendToModelControl !== null) {\n      if (this.transformMonitor.checkUpdate()) {\n        this._sendToModelControl({\n          channel: \"manager:update-node-transform\",\n          data: this.transformMonitor.transform,\n        });\n      }\n      if (this.morphMonitor.checkUpdate()) {\n        this._sendToModelControl({\n          channel: \"manager:update-node-morph\",\n          data: {\n            weight: this.morphMonitor.value,\n          },\n        });\n      }\n    }\n    // 播放动画的时候模型还盯着鼠标看，转身都不带扭头的那效果……我实在是看不下去了\n    if (\n      this.instantConfig?.trackMouse &&\n      this.animationManager === null &&\n      this.captureManagerNow === null\n    ) {\n      this.mouseFocusHelper?.focus();\n      // 解决VRoid的Y轴反转问题\n      this.mouseFocusHelper?.object.quaternion.multiply(turnHeadQuaternion);\n    }\n    if (this.instantConfig.vrmUpdate) {\n      // 此项更新一个是物理模拟，另一个是morph\n      this.model.vrm.update(this.clock.getDelta());\n    }\n  }\n  handleMessage(message) {\n    switch (message.channel) {\n      case \"control:bind-node-transform\": {\n        this._bindNodeTransform(message.data.nodeId);\n        break;\n      }\n      case \"control:set-node-transform\": {\n        this._setNodeTransform(message.data);\n        break;\n      }\n      case \"control:launch-capture\": {\n        const { type } = message.data;\n        if (type === \"faceMesh\") {\n          this.captureManagerNow = new FaceMeshCaptureManager();\n        } else if (type === \"holistic\") {\n          this.captureManagerNow = new HolisticCaptureManager();\n        }\n        this.captureManagerNow.setTarget(this.model);\n        this.captureManagerNow.start();\n        break;\n      }\n      case \"control:quit-capture\": {\n        this._quitCapture();\n        this.model.pose();\n        break;\n      }\n      case \"control:bind-morph-target\": {\n        const { morphName } = message.data;\n        this.morphMonitor.bind(morphName, this.model);\n        break;\n      }\n      case \"control:set-morph-weight\": {\n        this._setMorphWeight(message.data);\n        break;\n      }\n      case \"control:change-instant-config\": {\n        const { name, value } = message.data;\n        this.instantConfig[name] = value;\n        break;\n      }\n    }\n  }\n  _setMorphWeight({ morphName, weight }) {\n    this.model.vrm.expressionManager.setValue(morphName, weight);\n  }\n  // 不使用箭头函数会导致this的指向出错，若使用bind更改this指向，会导致返回的function和原函数不同，无法移出事件监听器\n  _onPointerMove = (event) => {\n    // 加上?，防止没载入模型时出错\n    this.mouseFocusHelper?.update(event.clientX, event.clientY);\n  };\n}\n"
  },
  {
    "path": "src/renderer/display/utils/2d/utils.js",
    "content": "export function setModelBaseTransfrom(model, displayConfig, type) {\n  const configWidth =\n    (innerWidth *\n      (displayConfig[type + \"-initial-width-range\"][1] -\n        displayConfig[type + \"-initial-width-range\"][0])) /\n    100;\n  const configHeight =\n    (innerHeight *\n      (displayConfig[type + \"-initial-height-range\"][1] -\n        displayConfig[type + \"-initial-height-range\"][0])) /\n    100;\n  const scaleX = configWidth / model.width;\n  const scaleY = configHeight / model.height;\n  model.scale.set(Math.min(scaleX, scaleY));\n  // model.x = app.renderer.view.width / this.resolution - model.width;\n  // model.y = app.renderer.view.height / this.resolution - model.height;\n  model.x =\n    (innerWidth * displayConfig[type + \"-initial-width-range\"][0]) / 100;\n  model.y =\n    (innerHeight * displayConfig[type + \"-initial-height-range\"][0]) / 100;\n}\nexport function draggable(model) {\n  // 别看就是一点一按，这指针事件的判断复杂程度超乎想象，来梳理一下事件触发顺序：\n  // 点按：pointerdown,click,pointerup\n  // 拖拽：pointerdown,pointermove,dragstart,(pointermove,dragging)*N,click,pointerup,dragend\n  model.on(\"pointerdown\", (e) => {\n    // console.log(\"pointerdown\");\n    //防止右键触发移动事件\n    if (e.data.button === 0) {\n      model._pointerX = e.data.global.x - model.x;\n      model._pointerY = e.data.global.y - model.y;\n      // 不单单是一时的事件响应，pointerdown需要成为一个持续的状态\n      model.afterPointerDown = true;\n      // model.dragEmitted有两个作用，一个是用于给pointermove提供判断，在第一次移动是触发drag事件；另一个是交给click事件判断该事件是单纯的click还是拖拽了\n      model.dragEmitted = false;\n    }\n  });\n  model.on(\"pointermove\", (e) => {\n    if (model.afterPointerDown) {\n      // console.log(\"pointermove\");\n      if (!model.dragEmitted) {\n        // 初次在点按拖拽前提下触发移动事件时触发自己一拍脑袋想出来的拖拽事件\n        model.emit(\"dragstart\");\n        model.dragEmitted = true;\n      }\n      model.position.x = e.data.global.x - model._pointerX;\n      model.position.y = e.data.global.y - model._pointerY;\n      model.emit(\"dragging\");\n    }\n  });\n  model.on(\"pointerupoutside\", () => {\n    // console.log(\"pointerupoutside\");\n    if (model.dragEmitted) {\n      model.emit(\"dragend\");\n    }\n    model.afterPointerDown = false;\n  });\n  model.on(\"pointerup\", () => {\n    // console.log(\"pointerup\");\n    // 只有真正拖动过模型才能触发dragend事件\n    if (model.dragEmitted) {\n      model.emit(\"dragend\");\n    }\n    model.afterPointerDown = false;\n  });\n}\n"
  },
  {
    "path": "src/renderer/display/utils/3d/AudioManager.js",
    "content": "// MMDAnimationHelper里面自带那个AudioManager……实在是不太行，中途暂停，定位播放之类的直接不可能实现，于是我还是自己写一个吧\nexport class AudioManager {\n  constructor(audio, params) {\n    this.audio = audio;\n    this.delayTime = params.delayTime !== undefined ? params.delayTime : 0.0;\n    // 若延时为正，使用setTimeOut实现，若延时为负，为audio设定offset\n    this.hasPlayed = false;\n    if (this.delayTime < 0) {\n      this.audio.offset = -this.delayTime;\n    }\n  }\n  destroy() {\n    this.pause();\n    this.audio = null;\n  }\n  play() {\n    if (!this.hasPlayed && this.delayTime > 0) {\n      setTimeout(() => {\n        this.audio.play();\n        this.hasPlayed = true;\n      }, this.delayTime * 1000);\n    } else {\n      !this.audio.isPlaying && this.audio.play();\n    }\n  }\n  pause() {\n    this.audio.isPlaying && this.audio.pause();\n  }\n  // 尚未使用的函数\n  getCurrentTime() {}\n  setCurrentTime(time) {}\n}\n"
  },
  {
    "path": "src/renderer/display/utils/3d/Monitor.js",
    "content": "class TransformMonitor {\n  constructor() {\n    this.transform = null;\n    this.isJustBined = false;\n  }\n  bind(target) {\n    this.target = target;\n    // 下方的transform数值是大多数节点的默认状态，此情况下，下方检查时不会由于transform数值不同而触发changed\n    // 此布尔值用于强制更新参数，覆盖控制面板中上一个节点的参数\n    this.isJustBined = true;\n    this.transform = {\n      position: { x: 0, y: 0, z: 0 },\n      rotation: { x: 0, y: 0, z: 0 },\n      scale: { x: 1, y: 1, z: 1 },\n    };\n  }\n  checkUpdate() {\n    let changed = false;\n    if (this.isJustBined) {\n      this.isJustBined = false;\n      changed = true;\n    }\n    // 即使由isJustBined改变了changed，也应当由下方函数更新Monitor的数值，isJustBined存在的意义是，防止切换bind时新参数和默认值相同，导致没有触发changed，使得控制面板那边还显示上一个参数的值\n    if (this.transform !== null) {\n      for (let i of [\"position\", \"rotation\", \"scale\"]) {\n        for (let j of [\"x\", \"y\", \"z\"]) {\n          if (this.transform[i][j] !== this.target[i][j]) {\n            this.transform[i][j] = this.target[i][j];\n            changed = true;\n          }\n        }\n      }\n    }\n    return changed;\n  }\n}\n\nexport { TransformMonitor };\n"
  },
  {
    "path": "src/renderer/display/utils/3d/MouseFocusHelper.js",
    "content": "// Author: TSKI433\nimport { Vector3 } from \"three\";\n// 相机绝对坐标\nconst cameraAbsolutePosition = new Vector3();\n// object 绝对坐标\nconst objectAbsolutePosition = new Vector3();\nconst cameraToObject = new Vector3();\n// 相机方向向量\nconst cameraDirection = new Vector3();\n// 相机投射object平面的中心点与相机的距离，作为lookAt目标点计算的比例之一\nlet lambda;\nclass MouseFocusHelper {\n  constructor(object, camera, ratio = 0.6) {\n    // object.userData.focusPosition = focusPosition;\n    // eventDOM.addEventListener(\"pointermove\", (event) => {\n    // });\n    this.object = object;\n    this.camera = camera;\n    this.ratio = ratio;\n    this.focusPosition = new Vector3();\n    // 防止由于focusPosition默认在(0,0,0)导致刚载入模型时出现头拧断了也要看脚底的情况\n    this.object.getWorldPosition(this.focusPosition);\n  }\n  update(x, y) {\n    // 传入屏幕指针坐标，计算聚焦目标坐标\n    this.camera.getWorldPosition(cameraAbsolutePosition);\n    this.object.getWorldPosition(objectAbsolutePosition);\n    cameraToObject.subVectors(objectAbsolutePosition, cameraAbsolutePosition);\n    this.camera.getWorldDirection(cameraDirection);\n    lambda = Math.abs(\n      cameraToObject.length() *\n        Math.cos(cameraToObject.angleTo(cameraDirection))\n    );\n    // 将focusPosition作为两向量插值结果\n    this.focusPosition.lerpVectors(\n      this.camera.position,\n      // 将此向量(坐标)从目标相机的标准化设备坐标 (NDC) 空间投影到世界空间的最后方，再用插值运算提到前面来。可参考https://blog.csdn.net/qq_18229381/article/details/77941325\n      // 屏幕坐标系的原点在左上角，对应到NDC中的值为(-1,1,1)，注意NDC用的是左手坐标系，Z轴正方向为相机前方，因此z轴的值为1\n      new Vector3(\n        -1 + (2 * x) / window.innerWidth,\n        1 - (2 * y) / window.innerHeight,\n        1\n      ).unproject(this.camera),\n      // 朝着相机的偏移权重，设为0将导致目标点和相机重合，设为1的话，模仿埃及壁画的你可能会期待这个效果（头部始终看向相机投射object的平面）……\n      (this.ratio * lambda) / this.camera.far\n    );\n  }\n  focus() {\n    this.object.lookAt(this.focusPosition);\n  }\n}\nexport { MouseFocusHelper };\n"
  },
  {
    "path": "src/renderer/display/utils/3d/NodeInfo.js",
    "content": "function buildNodeInfoTree(node, tree = {}) {\n  let additionalInfo = \"\";\n  if (node.name !== \"\") {\n    additionalInfo += `(${node.name})`;\n  }\n  //   加入附加信息用于辨识MMD模型\n  if (tree.type === \"SkinnedMesh\" && node.geometry.userData.MMD !== undefined) {\n    additionalInfo += \"(MMD)\";\n  }\n  //   方便element plus接入\n  tree.value = node.id;\n  tree.label = `${node.type}${additionalInfo}`;\n  tree.children = [];\n  node.children.forEach((child) => {\n    tree.children.push(buildNodeInfoTree(child));\n  });\n  return tree;\n}\n// 遍历一次，同时生成一个树结构和一个列表结构，算是一小点性能优化吧，方便UI那边提供两种选择模式\nfunction buildNodeInfoTreeAndList(node, tree = {}, list = []) {\n  let additionalInfo = \"\";\n  if (node.name !== \"\") {\n    additionalInfo += `(${node.name})`;\n  }\n  //   加入附加信息用于辨识MMD模型\n  if (node.type === \"SkinnedMesh\" && node.geometry.userData.MMD !== undefined) {\n    additionalInfo += \"(MMD)\";\n  }\n  //   方便element plus接入\n  const nodeValue = node.id;\n  const nodeLabel = `${node.type}${additionalInfo}`;\n  tree.value = nodeValue;\n  tree.label = nodeLabel;\n  list.push({ label: nodeLabel, value: nodeValue });\n  tree.children = [];\n  node.children.forEach((child) => {\n    const { tree: childInfo } = buildNodeInfoTreeAndList(child, {}, list);\n    tree.children.push(childInfo);\n  });\n  return { tree, list };\n}\n\nexport { buildNodeInfoTree, buildNodeInfoTreeAndList };\n"
  },
  {
    "path": "src/renderer/display/utils/animation/Mixamo2MMDAnimationConverter.js",
    "content": "import {\n  Quaternion,\n  Euler,\n  PropertyBinding,\n  Matrix4,\n  Vector3,\n  VectorKeyframeTrack,\n  QuaternionKeyframeTrack,\n} from \"three\";\nimport {\n  trackRotateQuaternion,\n  trackRotateQuaternionAxis,\n  buildNodeStack,\n} from \"./utils.js\";\nconst boneDictWithD = {\n  mixamorigHips: \"センター\",\n  mixamorigSpine: \"上半身\",\n  // 经过实际对比，发现上半身骨骼的确应该这么对应\n  mixamorigSpine1: \"上半身3\",\n  mixamorigSpine2: \"上半身2\",\n  mixamorigNeck: \"首\",\n  mixamorigHead: \"頭\",\n  // mixamorigHeadTop_End: \"\",\n  mixamorigLeftShoulder: \"左肩\",\n  mixamorigLeftArm: \"左腕\",\n  mixamorigLeftForeArm: \"左ひじ\",\n  mixamorigLeftHand: \"左手首\",\n  mixamorigLeftHandThumb1: \"左親指０\",\n  mixamorigLeftHandThumb2: \"左親指１\",\n  mixamorigLeftHandThumb3: \"左親指２\",\n  // mixamorigLeftHandThumb4: \"\",\n  mixamorigLeftHandIndex1: \"左人指１\",\n  mixamorigLeftHandIndex2: \"左人指２\",\n  mixamorigLeftHandIndex3: \"左人指３\",\n  // mixamorigLeftHandIndex4: \"\",\n  mixamorigLeftHandMiddle1: \"左中指１\",\n  mixamorigLeftHandMiddle2: \"左中指２\",\n  mixamorigLeftHandMiddle3: \"左中指３\",\n  // mixamorigLeftHandMiddle4: \"\",\n  mixamorigLeftHandRing1: \"左薬指１\",\n  mixamorigLeftHandRing2: \"左薬指２\",\n  mixamorigLeftHandRing3: \"左薬指３\",\n  // mixamorigLeftHandRing4: \"\",\n  mixamorigLeftHandPinky1: \"左小指１\",\n  mixamorigLeftHandPinky2: \"左小指２\",\n  mixamorigLeftHandPinky3: \"左小指３\",\n  // mixamorigLeftHandPinky4: \"\",\n  mixamorigRightShoulder: \"右肩\",\n  mixamorigRightArm: \"右腕\",\n  mixamorigRightForeArm: \"右ひじ\",\n  mixamorigRightHand: \"右手首\",\n  mixamorigRightHandThumb1: \"右親指０\",\n  mixamorigRightHandThumb2: \"右親指１\",\n  mixamorigRightHandThumb3: \"右親指２\",\n  // mixamorigRightHandThumb4: \"\",\n  mixamorigRightHandIndex1: \"右人指１\",\n  mixamorigRightHandIndex2: \"右人指２\",\n  mixamorigRightHandIndex3: \"右人指３\",\n  // mixamorigRightHandIndex4: \"\",\n  mixamorigRightHandMiddle1: \"右中指１\",\n  mixamorigRightHandMiddle2: \"右中指２\",\n  mixamorigRightHandMiddle3: \"右中指３\",\n  // mixamorigRightHandMiddle4: \"\",\n  mixamorigRightHandRing1: \"右薬指１\",\n  mixamorigRightHandRing2: \"右薬指２\",\n  mixamorigRightHandRing3: \"右薬指３\",\n  // mixamorigRightHandRing4: \"\",\n  mixamorigRightHandPinky1: \"右小指１\",\n  mixamorigRightHandPinky2: \"右小指２\",\n  mixamorigRightHandPinky3: \"右小指３\",\n  // mixamorigRightHandPinky4: \"\",\n  mixamorigLeftUpLeg: \"左足D\",\n  mixamorigLeftLeg: \"左ひざD\",\n  mixamorigLeftFoot: \"左足首D\",\n  mixamorigLeftToeBase: \"左足先EX\",\n  // mixamorigLeftToe_End: \"\",\n  mixamorigRightUpLeg: \"右足D\",\n  mixamorigRightLeg: \"右ひざD\",\n  mixamorigRightFoot: \"右足首D\",\n  mixamorigRightToeBase: \"右足先EX\",\n  // mixamorigRightToe_End: \"\",\n};\n// 骨骼的对应词典\nconst boneDictWithIK = {\n  mixamorigHips: \"センター\",\n  mixamorigSpine: \"上半身\",\n  // 经过实际对比，发现上半身骨骼的确应该这么对应\n  mixamorigSpine1: \"上半身3\",\n  mixamorigSpine2: \"上半身2\",\n  mixamorigNeck: \"首\",\n  mixamorigHead: \"頭\",\n  // mixamorigHeadTop_End: \"\",\n  mixamorigLeftShoulder: \"左肩\",\n  mixamorigLeftArm: \"左腕\",\n  mixamorigLeftForeArm: \"左ひじ\",\n  mixamorigLeftHand: \"左手首\",\n  mixamorigLeftHandThumb1: \"左親指０\",\n  mixamorigLeftHandThumb2: \"左親指１\",\n  mixamorigLeftHandThumb3: \"左親指２\",\n  // mixamorigLeftHandThumb4: \"\",\n  mixamorigLeftHandIndex1: \"左人指１\",\n  mixamorigLeftHandIndex2: \"左人指２\",\n  mixamorigLeftHandIndex3: \"左人指３\",\n  // mixamorigLeftHandIndex4: \"\",\n  mixamorigLeftHandMiddle1: \"左中指１\",\n  mixamorigLeftHandMiddle2: \"左中指２\",\n  mixamorigLeftHandMiddle3: \"左中指３\",\n  // mixamorigLeftHandMiddle4: \"\",\n  mixamorigLeftHandRing1: \"左薬指１\",\n  mixamorigLeftHandRing2: \"左薬指２\",\n  mixamorigLeftHandRing3: \"左薬指３\",\n  // mixamorigLeftHandRing4: \"\",\n  mixamorigLeftHandPinky1: \"左小指１\",\n  mixamorigLeftHandPinky2: \"左小指２\",\n  mixamorigLeftHandPinky3: \"左小指３\",\n  // mixamorigLeftHandPinky4: \"\",\n  mixamorigRightShoulder: \"右肩\",\n  mixamorigRightArm: \"右腕\",\n  mixamorigRightForeArm: \"右ひじ\",\n  mixamorigRightHand: \"右手首\",\n  mixamorigRightHandThumb1: \"右親指０\",\n  mixamorigRightHandThumb2: \"右親指１\",\n  mixamorigRightHandThumb3: \"右親指２\",\n  // mixamorigRightHandThumb4: \"\",\n  mixamorigRightHandIndex1: \"右人指１\",\n  mixamorigRightHandIndex2: \"右人指２\",\n  mixamorigRightHandIndex3: \"右人指３\",\n  // mixamorigRightHandIndex4: \"\",\n  mixamorigRightHandMiddle1: \"右中指１\",\n  mixamorigRightHandMiddle2: \"右中指２\",\n  mixamorigRightHandMiddle3: \"右中指３\",\n  // mixamorigRightHandMiddle4: \"\",\n  mixamorigRightHandRing1: \"右薬指１\",\n  mixamorigRightHandRing2: \"右薬指２\",\n  mixamorigRightHandRing3: \"右薬指３\",\n  // mixamorigRightHandRing4: \"\",\n  mixamorigRightHandPinky1: \"右小指１\",\n  mixamorigRightHandPinky2: \"右小指２\",\n  mixamorigRightHandPinky3: \"右小指３\",\n  // mixamorigRightHandPinky4: \"\",\n  mixamorigLeftUpLeg: \"左足\",\n  mixamorigLeftLeg: \"左ひざ\",\n  mixamorigLeftFoot: \"左足首\",\n  mixamorigLeftToeBase: \"左足先EX\",\n  mixamorigLeftToe_End: \"\",\n  mixamorigRightUpLeg: \"右足\",\n  mixamorigRightLeg: \"右ひざ\",\n  mixamorigRightFoot: \"右足首\",\n  mixamorigRightToeBase: \"右足先EX\",\n  // mixamorigRightToe_End: \"\",\n};\n\n// 直接将动画转换成非IK的数据\n/**\n * @param {THREE.AnimationClip} animationClip\n * @param {Number} positionScale\n * @return {THREE.AnimationClip}\n */\nfunction convertAnimation(\n  animationClip,\n  positionScale = 1,\n  boneDict = boneDictWithD\n) {\n  const newAnimationClip = animationClip.clone();\n  // 找不到的骨骼动画会被直接赋值到SkinnedMesh上，造成动画混乱，因此需要做一次筛选\n  newAnimationClip.tracks = newAnimationClip.tracks.filter((track) => {\n    // 使用THREE的库解析轨道名称\n    const trackInfo = PropertyBinding.parseTrackName(track.name);\n    const boneName = trackInfo.nodeName || trackInfo.objectIndex;\n    const trackType = trackInfo.propertyName;\n    // 非所需轨道直接舍弃\n    if (!boneDict[boneName]) {\n      return false;\n    }\n    // 对轨道数据进行一些预处理\n    if (trackType === \"quaternion\") {\n      switch (boneName) {\n        // 手臂有45度的差距\n        case \"mixamorigLeftArm\": {\n          track.values = new Float32Array(\n            trackRotateQuaternion(track.values, new Euler(0, 0, Math.PI / 4))\n          );\n          break;\n        }\n        case \"mixamorigRightArm\": {\n          track.values = new Float32Array(\n            trackRotateQuaternion(track.values, new Euler(0, 0, -Math.PI / 4))\n          );\n          break;\n        }\n        // 手臂调整后，手臂的子级旋转数据也有问题\n        case \"mixamorigLeftForeArm\":\n        case \"mixamorigLeftHand\": {\n          track.values = new Float32Array(\n            trackRotateQuaternionAxis(\n              track.values,\n              new Euler(0, 0, -Math.PI / 4)\n            )\n          );\n          break;\n        }\n        case \"mixamorigRightForeArm\":\n        case \"mixamorigRightHand\": {\n          track.values = new Float32Array(\n            trackRotateQuaternionAxis(\n              track.values,\n              new Euler(0, 0, Math.PI / 4)\n            )\n          );\n          break;\n        }\n      }\n    } else if (trackType === \"position\") {\n      // 对position动画进行缩放\n      track.values.forEach((value, index) => {\n        track.values[index] = track.values[index] / positionScale;\n      });\n    }\n    // 修改骨骼名称\n\n    track.name = `.bones[${boneDict[boneName]}].${trackType}`;\n\n    return true;\n  });\n  for (const clearPostionBoneName of [\n    \"腰\",\n    // 究极打脸操作，在这里给\"左足ＩＫ\"和\"右足ＩＫ\"加还原动画轨道的话，three的播放系统会自动等比例个真正的动画按1:1的比例混合，导致双腿的张开角度变为预计值的一半\n    // \"左足ＩＫ\",\n    // \"右足ＩＫ\",\n    \"左足IK親\",\n    \"右足IK親\",\n  ]) {\n    newAnimationClip.tracks.push(\n      new VectorKeyframeTrack(\n        `.bones[${clearPostionBoneName}].position`,\n        [0],\n        new Float32Array([0, 0, 0])\n      )\n    );\n  }\n\n  return newAnimationClip;\n}\n\nfunction convertAnimationWithIK(\n  animationClip,\n  positionScale = 1,\n  originRootBone\n) {\n  const depth = 4;\n  // 先得到基础的动画轨道，在进行二次转换\n  const newAnimationClip = convertAnimation(\n    animationClip,\n    positionScale,\n    boneDictWithIK\n  );\n  const originBoneStack = buildNodeStack(originRootBone, \"dfs\");\n  const ikLinkDataList = [\n    {\n      sourceBoneName: \"mixamorigRightFoot\",\n      baseBoneName: \"mixamorigHips\",\n      targetIkBoneName: \"右足ＩＫ\",\n    },\n    {\n      sourceBoneName: \"mixamorigLeftFoot\",\n      baseBoneName: \"mixamorigHips\",\n      targetIkBoneName: \"左足ＩＫ\",\n    },\n  ];\n  for (const ikLinkData of ikLinkDataList) {\n    // 要对foot至hips的骨骼层级进行多次访问，干脆创建一个数组\n    const objectNodes = [];\n    const parentMatrix = new Matrix4();\n    const childMatrix = new Matrix4();\n    const rebasedQuaternion = new Quaternion();\n    const rebasedPosition = new Vector3();\n    const sourceBone = originBoneStack.find((bone) => {\n      return bone.name === ikLinkData.sourceBoneName;\n    });\n    let tempNode = sourceBone;\n    // 循环次数为上行的深度，最大限度设为了4\n    for (let i = 0; i < depth; i++) {\n      objectNodes.push(tempNode);\n      addAnimationTrakInfoToNode(tempNode, animationClip);\n      tempNode = tempNode.parent;\n    }\n    const trackTimes = originRootBone.userData.keyframeTracks.position.times;\n    const ikQuaternionTrackValues = [];\n    const ikPositionTrackValues = [];\n    // 遍历时间，生成IK动画的轨道数据\n    for (const time of trackTimes) {\n      for (let i = 0; i < depth; i++) {\n        if (i === 0) {\n          getMatrixSomeTime(objectNodes[i], time, childMatrix);\n        } else {\n          getMatrixSomeTime(objectNodes[i], time, parentMatrix);\n          childMatrix.premultiply(parentMatrix);\n        }\n      }\n      rebasedQuaternion.setFromRotationMatrix(childMatrix);\n      rebasedPosition.setFromMatrixPosition(childMatrix);\n      for (const value of rebasedQuaternion.toArray()) {\n        ikQuaternionTrackValues.push(value);\n      }\n      for (const value of rebasedPosition.toArray()) {\n        ikPositionTrackValues.push(value / positionScale);\n      }\n    }\n    const ikPositionTrack = new VectorKeyframeTrack(\n      `.bones[${ikLinkData.targetIkBoneName}].position`,\n      trackTimes,\n      new Float32Array(ikPositionTrackValues)\n    );\n    const ikQuaternionTrack = new QuaternionKeyframeTrack(\n      `.bones[${ikLinkData.targetIkBoneName}].quaternion`,\n      trackTimes,\n      new Float32Array(ikQuaternionTrackValues)\n    );\n    newAnimationClip.tracks.push(ikQuaternionTrack);\n    newAnimationClip.tracks.push(ikPositionTrack);\n    // 排除使用IK后会对动画播放产生影响的轨道\n    newAnimationClip.tracks = newAnimationClip.tracks.filter((track) => {\n      const trackInfo = PropertyBinding.parseTrackName(track.name);\n      const boneName = trackInfo.nodeName || trackInfo.objectIndex;\n      return ![\n        \"左足\",\n        \"左ひざ\",\n        \"右足\",\n        \"右ひざ\",\n        \"右足先EX\",\n        \"左足先EX\",\n        // \"センター\",\n      ].includes(boneName);\n    });\n  }\n  return newAnimationClip;\n}\n// 获取某个节点某时刻相对于父级的矩阵\nconst _q1 = new Quaternion();\nconst _v1 = new Vector3();\nconst _v2 = new Vector3();\nfunction getMatrixSomeTime(object, time, matrix) {\n  if (object.userData.keyframeTracks) {\n    const positionTrack = object.userData.keyframeTracks.position;\n    if (positionTrack.hasKeyframes) {\n      _v1.fromArray(positionTrack.interpolant.evaluate(time));\n    } else {\n      // 考虑到可能涉及到没有预处理的骨骼\n      _v1.fromArray(positionTrack.data);\n    }\n    const quaternionTrack = object.userData.keyframeTracks.quaternion;\n    if (quaternionTrack.hasKeyframes) {\n      _q1.fromArray(quaternionTrack.interpolant.evaluate(time));\n    } else {\n      _q1.fromArray(quaternionTrack.data);\n    }\n    const scaleTrack = object.userData.keyframeTracks.scale;\n    if (scaleTrack.hasKeyframes) {\n      _v2.fromArray(scaleTrack.interpolant.evaluate(time));\n    } else {\n      _v2.fromArray(scaleTrack.data);\n    }\n  } else {\n    _v1.copy(object.position);\n    _q1.copy(object.quaternion);\n    _v2.copy(object.scale);\n  }\n  matrix.compose(_v1, _q1, _v2);\n}\n// 将动画数据关联至骨骼用于之后解析，和上方的函数配合使用\nfunction addAnimationTrakInfoToNode(node, animationClip) {\n  node.userData.keyframeTracks = {};\n  for (const track of animationClip.tracks) {\n    const trackInfo = PropertyBinding.parseTrackName(track.name);\n    const targetBone = trackInfo.nodeName || trackInfo.objectIndex;\n    if (targetBone === node.name) {\n      const trackItem = {};\n      // trackItem.type = trackInfo.propertyName;\n      trackItem.hasKeyframes = true;\n      trackItem.times = track.times;\n      trackItem.values = track.values;\n      // 之后会用到这个东西计算插值\n      trackItem.interpolant = track.createInterpolant();\n      node.userData.keyframeTracks[trackInfo.propertyName] = trackItem;\n    }\n  }\n  // 统一规范，为没有关键帧的数据创建轨道\n  for (const tranfromPropertyName of [\"position\", \"quaternion\", \"scale\"]) {\n    if (!node.userData.keyframeTracks[tranfromPropertyName]) {\n      const trackItem = {};\n      // trackItem.type = tranfromPropertyName;\n      trackItem.hasKeyframes = false;\n      trackItem.data = node[tranfromPropertyName].toArray();\n      node.userData.keyframeTracks[tranfromPropertyName] = trackItem;\n    }\n  }\n}\nexport { convertAnimation, convertAnimationWithIK };\n"
  },
  {
    "path": "src/renderer/display/utils/animation/Mixamo2MMDAnimationConverterNew.js",
    "content": "import {\n  Quaternion,\n  Euler,\n  PropertyBinding,\n  Matrix4,\n  Vector3,\n  VectorKeyframeTrack,\n  QuaternionKeyframeTrack,\n} from \"three\";\nimport {\n  trackRotateQuaternion,\n  trackPreRotateQuaternion,\n  trackRotateQuaternionAxis,\n  buildNodeStack,\n} from \"./utils.js\";\nconst boneDictWithD = {\n  mixamorigHips: \"センター\",\n  mixamorigSpine: \"上半身\",\n  // 经过实际对比，发现上半身骨骼的确应该这么对应\n  mixamorigSpine1: \"上半身3\",\n  mixamorigSpine2: \"上半身2\",\n  mixamorigNeck: \"首\",\n  mixamorigHead: \"頭\",\n  // mixamorigHeadTop_End: \"\",\n  mixamorigLeftShoulder: \"左肩\",\n  mixamorigLeftArm: \"左腕\",\n  mixamorigLeftForeArm: \"左ひじ\",\n  mixamorigLeftHand: \"左手首\",\n  mixamorigLeftHandThumb1: \"左親指０\",\n  mixamorigLeftHandThumb2: \"左親指１\",\n  mixamorigLeftHandThumb3: \"左親指２\",\n  // mixamorigLeftHandThumb4: \"\",\n  mixamorigLeftHandIndex1: \"左人指１\",\n  mixamorigLeftHandIndex2: \"左人指２\",\n  mixamorigLeftHandIndex3: \"左人指３\",\n  // mixamorigLeftHandIndex4: \"\",\n  mixamorigLeftHandMiddle1: \"左中指１\",\n  mixamorigLeftHandMiddle2: \"左中指２\",\n  mixamorigLeftHandMiddle3: \"左中指３\",\n  // mixamorigLeftHandMiddle4: \"\",\n  mixamorigLeftHandRing1: \"左薬指１\",\n  mixamorigLeftHandRing2: \"左薬指２\",\n  mixamorigLeftHandRing3: \"左薬指３\",\n  // mixamorigLeftHandRing4: \"\",\n  mixamorigLeftHandPinky1: \"左小指１\",\n  mixamorigLeftHandPinky2: \"左小指２\",\n  mixamorigLeftHandPinky3: \"左小指３\",\n  // mixamorigLeftHandPinky4: \"\",\n  mixamorigRightShoulder: \"右肩\",\n  mixamorigRightArm: \"右腕\",\n  mixamorigRightForeArm: \"右ひじ\",\n  mixamorigRightHand: \"右手首\",\n  mixamorigRightHandThumb1: \"右親指０\",\n  mixamorigRightHandThumb2: \"右親指１\",\n  mixamorigRightHandThumb3: \"右親指２\",\n  // mixamorigRightHandThumb4: \"\",\n  mixamorigRightHandIndex1: \"右人指１\",\n  mixamorigRightHandIndex2: \"右人指２\",\n  mixamorigRightHandIndex3: \"右人指３\",\n  // mixamorigRightHandIndex4: \"\",\n  mixamorigRightHandMiddle1: \"右中指１\",\n  mixamorigRightHandMiddle2: \"右中指２\",\n  mixamorigRightHandMiddle3: \"右中指３\",\n  // mixamorigRightHandMiddle4: \"\",\n  mixamorigRightHandRing1: \"右薬指１\",\n  mixamorigRightHandRing2: \"右薬指２\",\n  mixamorigRightHandRing3: \"右薬指３\",\n  // mixamorigRightHandRing4: \"\",\n  mixamorigRightHandPinky1: \"右小指１\",\n  mixamorigRightHandPinky2: \"右小指２\",\n  mixamorigRightHandPinky3: \"右小指３\",\n  // mixamorigRightHandPinky4: \"\",\n  mixamorigLeftUpLeg: \"左足D\",\n  mixamorigLeftLeg: \"左ひざD\",\n  mixamorigLeftFoot: \"左足首D\",\n  mixamorigLeftToeBase: \"左足先EX\",\n  // mixamorigLeftToe_End: \"\",\n  mixamorigRightUpLeg: \"右足D\",\n  mixamorigRightLeg: \"右ひざD\",\n  mixamorigRightFoot: \"右足首D\",\n  mixamorigRightToeBase: \"右足先EX\",\n  // mixamorigRightToe_End: \"\",\n};\n// 骨骼的对应词典\nconst boneDictWithIK = {\n  mixamorigHips: \"センター\",\n  mixamorigSpine: \"上半身\",\n  // 经过实际对比，发现上半身骨骼的确应该这么对应\n  mixamorigSpine1: \"上半身3\",\n  mixamorigSpine2: \"上半身2\",\n  mixamorigNeck: \"首\",\n  mixamorigHead: \"頭\",\n  // mixamorigHeadTop_End: \"\",\n  mixamorigLeftShoulder: \"左肩\",\n  mixamorigLeftArm: \"左腕\",\n  mixamorigLeftForeArm: \"左ひじ\",\n  mixamorigLeftHand: \"左手首\",\n  mixamorigLeftHandThumb1: \"左親指０\",\n  mixamorigLeftHandThumb2: \"左親指１\",\n  mixamorigLeftHandThumb3: \"左親指２\",\n  // mixamorigLeftHandThumb4: \"\",\n  mixamorigLeftHandIndex1: \"左人指１\",\n  mixamorigLeftHandIndex2: \"左人指２\",\n  mixamorigLeftHandIndex3: \"左人指３\",\n  // mixamorigLeftHandIndex4: \"\",\n  mixamorigLeftHandMiddle1: \"左中指１\",\n  mixamorigLeftHandMiddle2: \"左中指２\",\n  mixamorigLeftHandMiddle3: \"左中指３\",\n  // mixamorigLeftHandMiddle4: \"\",\n  mixamorigLeftHandRing1: \"左薬指１\",\n  mixamorigLeftHandRing2: \"左薬指２\",\n  mixamorigLeftHandRing3: \"左薬指３\",\n  // mixamorigLeftHandRing4: \"\",\n  mixamorigLeftHandPinky1: \"左小指１\",\n  mixamorigLeftHandPinky2: \"左小指２\",\n  mixamorigLeftHandPinky3: \"左小指３\",\n  // mixamorigLeftHandPinky4: \"\",\n  mixamorigRightShoulder: \"右肩\",\n  mixamorigRightArm: \"右腕\",\n  mixamorigRightForeArm: \"右ひじ\",\n  mixamorigRightHand: \"右手首\",\n  mixamorigRightHandThumb1: \"右親指０\",\n  mixamorigRightHandThumb2: \"右親指１\",\n  mixamorigRightHandThumb3: \"右親指２\",\n  // mixamorigRightHandThumb4: \"\",\n  mixamorigRightHandIndex1: \"右人指１\",\n  mixamorigRightHandIndex2: \"右人指２\",\n  mixamorigRightHandIndex3: \"右人指３\",\n  // mixamorigRightHandIndex4: \"\",\n  mixamorigRightHandMiddle1: \"右中指１\",\n  mixamorigRightHandMiddle2: \"右中指２\",\n  mixamorigRightHandMiddle3: \"右中指３\",\n  // mixamorigRightHandMiddle4: \"\",\n  mixamorigRightHandRing1: \"右薬指１\",\n  mixamorigRightHandRing2: \"右薬指２\",\n  mixamorigRightHandRing3: \"右薬指３\",\n  // mixamorigRightHandRing4: \"\",\n  mixamorigRightHandPinky1: \"右小指１\",\n  mixamorigRightHandPinky2: \"右小指２\",\n  mixamorigRightHandPinky3: \"右小指３\",\n  // mixamorigRightHandPinky4: \"\",\n  mixamorigLeftUpLeg: \"左足\",\n  mixamorigLeftLeg: \"左ひざ\",\n  mixamorigLeftFoot: \"左足首\",\n  mixamorigLeftToeBase: \"左足先EX\",\n  mixamorigLeftToe_End: \"\",\n  mixamorigRightUpLeg: \"右足\",\n  mixamorigRightLeg: \"右ひざ\",\n  mixamorigRightFoot: \"右足首\",\n  mixamorigRightToeBase: \"右足先EX\",\n  // mixamorigRightToe_End: \"\",\n};\nfunction counteractRotation(targetBone, track, direction) {\n  track.values = new Float32Array(\n    trackPreRotateQuaternion(\n      track.values,\n      new Euler(\n        direction * targetBone.rotation.x,\n        direction * targetBone.rotation.y,\n        direction * targetBone.rotation.z\n      ),\n      targetBone.name === \"mixamorigLeftShoulder\" ||\n        targetBone.name === \"mixamorigRightShoulder\"\n    )\n  );\n}\n// 直接将动画转换成非IK的数据\n/**\n * @param {THREE.AnimationClip} animationClip\n * @param {Number} positionScale\n * @return {THREE.AnimationClip}\n */\nfunction convertAnimation(\n  animationClip,\n  positionScale = 1,\n  originRootBone,\n  boneDict = boneDictWithD\n) {\n  const newAnimationClip = animationClip.clone();\n  const originBoneStack = buildNodeStack(originRootBone, \"dfs\");\n  // 找不到的骨骼动画会被直接赋值到SkinnedMesh上，造成动画混乱，因此需要做一次筛选\n  newAnimationClip.tracks = newAnimationClip.tracks.filter((track) => {\n    // 使用THREE的库解析轨道名称\n    const trackInfo = PropertyBinding.parseTrackName(track.name);\n    const boneName = trackInfo.nodeName || trackInfo.objectIndex;\n    const trackType = trackInfo.propertyName;\n    // 非所需轨道直接舍弃\n    if (!boneDict[boneName]) {\n      return false;\n    }\n\n    // 对轨道数据进行一些预处理\n    if (trackType === \"quaternion\") {\n      const targetBone = originBoneStack.find((bone) => bone.name === boneName);\n      const worldQuaternion = new Quaternion();\n      const worldRotation = new Euler();\n      targetBone.getWorldQuaternion(worldQuaternion);\n      worldRotation.setFromQuaternion(worldQuaternion);\n      // worldRotation.x *= -1;\n      // worldRotation.y *= -1;\n      // worldRotation.z *= -1;\n      track.values = new Float32Array(\n        trackRotateQuaternionAxis(track.values, worldRotation)\n      );\n      switch (boneName) {\n        case \"mixamorigLeftUpLeg\": {\n          counteractRotation(targetBone, track, -1);\n          break;\n        }\n        case \"mixamorigLeftLeg\": {\n          counteractRotation(targetBone, track, 1);\n          break;\n        }\n        case \"mixamorigLeftFoot\": {\n          counteractRotation(targetBone, track, 1);\n          break;\n        }\n        case \"mixamorigLeftToeBase\": {\n          counteractRotation(targetBone, track, -1);\n          break;\n        }\n        case \"mixamorigRightUpLeg\": {\n          counteractRotation(targetBone, track, -1);\n          break;\n        }\n        case \"mixamorigRightLeg\": {\n          counteractRotation(targetBone, track, 1);\n          break;\n        }\n        case \"mixamorigRightFoot\": {\n          counteractRotation(targetBone, track, 1);\n          break;\n        }\n        case \"mixamorigRightToeBase\": {\n          counteractRotation(targetBone, track, -1);\n          break;\n        }\n        case \"mixamorigLeftShoulder\": {\n          counteractRotation(targetBone, track, 1);\n          break;\n        }\n        case \"mixamorigLeftArm\": {\n          counteractRotation(targetBone, track, -1);\n          break;\n        }\n        case \"mixamorigLeftForeArm\": {\n          counteractRotation(targetBone, track, -1);\n          break;\n        }\n        case \"mixamorigLeftHand\": {\n          counteractRotation(targetBone, track, -1);\n          break;\n        }\n        case \"mixamorigRightShoulder\": {\n          counteractRotation(targetBone, track, 1);\n          break;\n        }\n        case \"mixamorigRightArm\": {\n          counteractRotation(targetBone, track, -1);\n          break;\n        }\n        case \"mixamorigRightForeArm\": {\n          counteractRotation(targetBone, track, -1);\n          break;\n        }\n        case \"mixamorigRightHand\": {\n          counteractRotation(targetBone, track, -1);\n          break;\n        }\n      }\n      switch (boneName) {\n        // 手臂有45度的差距\n        case \"mixamorigLeftArm\": {\n          track.values = new Float32Array(\n            trackRotateQuaternion(track.values, new Euler(0, 0, Math.PI / 4))\n          );\n          break;\n        }\n        case \"mixamorigRightArm\": {\n          track.values = new Float32Array(\n            trackRotateQuaternion(track.values, new Euler(0, 0, -Math.PI / 4))\n          );\n          break;\n        }\n        // 手臂调整后，手臂的子级旋转数据也有问题\n        case \"mixamorigLeftForeArm\":\n        case \"mixamorigLeftHand\": {\n          track.values = new Float32Array(\n            trackRotateQuaternionAxis(\n              track.values,\n              new Euler(0, 0, -Math.PI / 4)\n            )\n          );\n          break;\n        }\n        case \"mixamorigRightForeArm\":\n        case \"mixamorigRightHand\": {\n          track.values = new Float32Array(\n            trackRotateQuaternionAxis(\n              track.values,\n              new Euler(0, 0, Math.PI / 4)\n            )\n          );\n          break;\n        }\n      }\n    } else if (trackType === \"position\") {\n      // 对position动画进行缩放\n      track.values.forEach((value, index) => {\n        track.values[index] = track.values[index] / positionScale;\n      });\n    }\n    // 修改骨骼名称\n\n    track.name = `.bones[${boneDict[boneName]}].${trackType}`;\n\n    return true;\n  });\n  for (const clearPostionBoneName of [\n    \"腰\",\n    // 究极打脸操作，在这里给\"左足ＩＫ\"和\"右足ＩＫ\"加还原动画轨道的话，three的播放系统会自动等比例个真正的动画按1:1的比例混合，导致双腿的张开角度变为预计值的一半\n    // \"左足ＩＫ\",\n    // \"右足ＩＫ\",\n    \"左足IK親\",\n    \"右足IK親\",\n  ]) {\n    newAnimationClip.tracks.push(\n      new VectorKeyframeTrack(\n        `.bones[${clearPostionBoneName}].position`,\n        [0],\n        new Float32Array([0, 0, 0])\n      )\n    );\n  }\n\n  return newAnimationClip;\n}\n\nfunction convertAnimationWithIK(\n  animationClip,\n  positionScale = 1,\n  originRootBone\n) {\n  const depth = 4;\n  // 先得到基础的动画轨道，在进行二次转换\n  const newAnimationClip = convertAnimation(\n    animationClip,\n    positionScale,\n    originRootBone,\n    boneDictWithIK\n  );\n  const originBoneStack = buildNodeStack(originRootBone, \"dfs\");\n  const ikLinkDataList = [\n    {\n      sourceBoneName: \"mixamorigRightFoot\",\n      baseBoneName: \"mixamorigHips\",\n      targetIkBoneName: \"右足ＩＫ\",\n    },\n    {\n      sourceBoneName: \"mixamorigLeftFoot\",\n      baseBoneName: \"mixamorigHips\",\n      targetIkBoneName: \"左足ＩＫ\",\n    },\n  ];\n  for (const ikLinkData of ikLinkDataList) {\n    // 要对foot至hips的骨骼层级进行多次访问，干脆创建一个数组\n    const objectNodes = [];\n    const parentMatrix = new Matrix4();\n    const childMatrix = new Matrix4();\n    const rebasedQuaternion = new Quaternion();\n    const rebasedPosition = new Vector3();\n    const sourceBone = originBoneStack.find((bone) => {\n      return bone.name === ikLinkData.sourceBoneName;\n    });\n    let tempNode = sourceBone;\n    // 循环次数为上行的深度，最大限度设为了4\n    for (let i = 0; i < depth; i++) {\n      objectNodes.push(tempNode);\n      addAnimationTrakInfoToNode(tempNode, animationClip);\n      tempNode = tempNode.parent;\n    }\n    const trackTimes = originRootBone.userData.keyframeTracks.position.times;\n    const ikQuaternionTrackValues = [];\n    const ikPositionTrackValues = [];\n    // 遍历时间，生成IK动画的轨道数据\n    for (const time of trackTimes) {\n      for (let i = 0; i < depth; i++) {\n        if (i === 0) {\n          getMatrixSomeTime(objectNodes[i], time, childMatrix);\n        } else {\n          getMatrixSomeTime(objectNodes[i], time, parentMatrix);\n          childMatrix.premultiply(parentMatrix);\n        }\n      }\n      rebasedQuaternion.setFromRotationMatrix(childMatrix);\n      // 对IK骨的旋转进行四元数抵消\n      const worldQuaternion = new Quaternion();\n      sourceBone.getWorldQuaternion(worldQuaternion);\n      // const worldRotation = new Euler();\n      // worldRotation.setFromQuaternion(worldQuaternion);\n      // worldRotation.x *= -1;\n      // worldRotation.y *= -1;\n      // worldRotation.z *= -1;\n      // worldQuaternion.setFromEuler(worldRotation);\n      rebasedQuaternion.multiply(worldQuaternion);\n      rebasedPosition.setFromMatrixPosition(childMatrix);\n      for (const value of rebasedQuaternion.toArray()) {\n        ikQuaternionTrackValues.push(value);\n      }\n      for (const value of rebasedPosition.toArray()) {\n        ikPositionTrackValues.push(value / positionScale);\n      }\n    }\n    const ikPositionTrack = new VectorKeyframeTrack(\n      `.bones[${ikLinkData.targetIkBoneName}].position`,\n      trackTimes,\n      new Float32Array(ikPositionTrackValues)\n    );\n    const ikQuaternionTrack = new QuaternionKeyframeTrack(\n      `.bones[${ikLinkData.targetIkBoneName}].quaternion`,\n      trackTimes,\n      new Float32Array(ikQuaternionTrackValues)\n    );\n    newAnimationClip.tracks.push(ikQuaternionTrack);\n    newAnimationClip.tracks.push(ikPositionTrack);\n    // 排除使用IK后会对动画播放产生影响的轨道\n    newAnimationClip.tracks = newAnimationClip.tracks.filter((track) => {\n      const trackInfo = PropertyBinding.parseTrackName(track.name);\n      const boneName = trackInfo.nodeName || trackInfo.objectIndex;\n      return ![\n        \"左足\",\n        \"左ひざ\",\n        \"右足\",\n        \"右ひざ\",\n        \"右足先EX\",\n        \"左足先EX\",\n        // \"センター\",\n      ].includes(boneName);\n    });\n  }\n  return newAnimationClip;\n}\n// 获取某个节点某时刻相对于父级的矩阵\nconst _q1 = new Quaternion();\nconst _v1 = new Vector3();\nconst _v2 = new Vector3();\nfunction getMatrixSomeTime(object, time, matrix) {\n  if (object.userData.keyframeTracks) {\n    const positionTrack = object.userData.keyframeTracks.position;\n    if (positionTrack.hasKeyframes) {\n      _v1.fromArray(positionTrack.interpolant.evaluate(time));\n    } else {\n      // 考虑到可能涉及到没有预处理的骨骼\n      _v1.fromArray(positionTrack.data);\n    }\n    const quaternionTrack = object.userData.keyframeTracks.quaternion;\n    if (quaternionTrack.hasKeyframes) {\n      _q1.fromArray(quaternionTrack.interpolant.evaluate(time));\n    } else {\n      _q1.fromArray(quaternionTrack.data);\n    }\n    const scaleTrack = object.userData.keyframeTracks.scale;\n    if (scaleTrack.hasKeyframes) {\n      _v2.fromArray(scaleTrack.interpolant.evaluate(time));\n    } else {\n      _v2.fromArray(scaleTrack.data);\n    }\n  } else {\n    _v1.copy(object.position);\n    _q1.copy(object.quaternion);\n    _v2.copy(object.scale);\n  }\n  matrix.compose(_v1, _q1, _v2);\n}\n// 将动画数据关联至骨骼用于之后解析，和上方的函数配合使用\nfunction addAnimationTrakInfoToNode(node, animationClip) {\n  node.userData.keyframeTracks = {};\n  for (const track of animationClip.tracks) {\n    const trackInfo = PropertyBinding.parseTrackName(track.name);\n    const targetBone = trackInfo.nodeName || trackInfo.objectIndex;\n    if (targetBone === node.name) {\n      const trackItem = {};\n      // trackItem.type = trackInfo.propertyName;\n      trackItem.hasKeyframes = true;\n      trackItem.times = track.times;\n      trackItem.values = track.values;\n      // 之后会用到这个东西计算插值\n      trackItem.interpolant = track.createInterpolant();\n      node.userData.keyframeTracks[trackInfo.propertyName] = trackItem;\n    }\n  }\n  // 统一规范，为没有关键帧的数据创建轨道\n  for (const tranfromPropertyName of [\"position\", \"quaternion\", \"scale\"]) {\n    if (!node.userData.keyframeTracks[tranfromPropertyName]) {\n      const trackItem = {};\n      // trackItem.type = tranfromPropertyName;\n      trackItem.hasKeyframes = false;\n      trackItem.data = node[tranfromPropertyName].toArray();\n      node.userData.keyframeTracks[tranfromPropertyName] = trackItem;\n    }\n  }\n}\nexport { convertAnimation, convertAnimationWithIK };\n"
  },
  {
    "path": "src/renderer/display/utils/animation/utils.js",
    "content": "import {\n  VectorKeyframeTrack,\n  Quaternion,\n  Vector3,\n  Matrix4,\n  Euler,\n} from \"three\";\nconst _q1 = new Quaternion();\nconst _q2 = new Quaternion();\nconst _v1 = new Vector3();\nconst _e = new Euler();\n// 创建清除父子级间所有初始位置的轨道\n/**\n * @param {THREE.Object3D} childNode\n * @param {THREE.Object3D} parentNode\n */\nfunction createClearPositionTrack(childNode, parentNode) {\n  const tracks = [];\n  let tmpNode = childNode;\n  //   防止使用while进入死循环\n  for (let i = 0; i < 5; i++) {\n    if (tmpNode === parentNode) {\n      break;\n    } else {\n      tracks.push(\n        new VectorKeyframeTrack(\n          `${nameData.ikName}.position`,\n          [0],\n          new Float32Array([0, 0, 0])\n        )\n      );\n      if (tmpNode.parent === null) {\n        break;\n      }\n      tmpNode = tmpNode.parent;\n    }\n  }\n  return tracks;\n}\n// 以根骨骼为入口，构建骨骼列表\n/**\n * @param {THREE.Object3D} rootNode\n * @param {String} mode\n */\nfunction buildNodeStack(rootNode, mode = \"dfs\") {\n  // 深度优先\n  if (mode === \"dfs\") {\n    if (!rootNode.isObject3D) {\n      throw new Error(\"buildNodeStack: input rootNode is not THREE.Object3D.\");\n    }\n    const nodes = [];\n    if (rootNode != null) {\n      const stack = [];\n      stack.push(rootNode);\n      while (stack.length != 0) {\n        const item = stack.pop();\n        nodes.push(item);\n        const children = item.children;\n        for (let i = children.length - 1; i >= 0; i--) stack.push(children[i]);\n      }\n    }\n\n    return nodes;\n  } else if (mode === \"bfs\") {\n    // 广度优先\n    if (!rootNode.isObject3D) {\n      throw new Error(\"buildNodeStack: input rootNode is not THREE.Object3D.\");\n    }\n    const nodes = [];\n    const queue = [];\n    queue.unshift(rootNode);\n    while (queue.length !== 0) {\n      const node = queue.shift();\n      nodes.push(node);\n      node.children.forEach((child) => {\n        queue.push(child);\n      });\n    }\n    return nodes;\n  } else {\n    throw new Error(\"buildNodeStack: Unsupported build mode.\");\n  }\n}\n/**\n * @param {THREE.KeyframeTrack} quaternionList\n * @param {THREE.Euler} eulerAngle\n */\n// 为旋转动画轨道添加预旋转\n// 主要用于处理手臂默认姿态相差45度的问题\nfunction trackRotateQuaternion(quaternionList, eulerAngle, invert = false) {\n  _q1.setFromEuler(eulerAngle);\n  _q1.normalize();\n  const convertedList = [];\n  for (let i = 0, l = quaternionList.length / 4; i < l; i++) {\n    _q2.fromArray(quaternionList, 4 * i);\n    if (invert) {\n      _q2.multiply(_q1.clone().invert());\n    } else {\n      _q2.multiply(_q1);\n    }\n    for (const value of _q2.toArray()) {\n      convertedList.push(value);\n    }\n  }\n  return convertedList;\n}\nfunction trackPreRotateQuaternion(quaternionList, eulerAngle, invert = false) {\n  _q1.setFromEuler(eulerAngle);\n  _q1.normalize();\n  const convertedList = [];\n  for (let i = 0, l = quaternionList.length / 4; i < l; i++) {\n    _q2.fromArray(quaternionList, 4 * i);\n    if (invert) {\n      _q2.premultiply(_q1.clone().invert());\n    } else {\n      _q2.premultiply(_q1);\n    }\n\n    for (const value of _q2.toArray()) {\n      convertedList.push(value);\n    }\n  }\n  return convertedList;\n}\n\n// 为旋转动画轨道旋转四元数转轴\n// 主要用于处理手臂相差45度后，手臂子级旋转错误的问题\n/**\n * @param {THREE.KeyframeTrack} quaternionList\n * @param {THREE.Euler} eulerAngle\n */\nfunction trackRotateQuaternionAxis(quaternionList, eulerAngle) {\n  const convertedList = [];\n  for (let i = 0, l = quaternionList.length / 4; i < l; i++) {\n    _v1.fromArray(quaternionList, 4 * i);\n    _v1.applyEuler(eulerAngle);\n    for (const value of _v1.toArray()) {\n      convertedList.push(value);\n    }\n    convertedList.push(quaternionList[4 * i + 3]);\n  }\n  return convertedList;\n}\n// VRM模型导入后Y轴有180度旋转，需要重新调整动画\nfunction trackRevertXZ(quaternionList) {\n  const convertedList = [];\n  for (let i = 0, l = quaternionList.length / 4; i < l; i++) {\n    // 对轨道数据进行Z轴旋转变换\n    _q1.fromArray(quaternionList, 4 * i);\n    _e.setFromQuaternion(_q1);\n    _e.x *= -1;\n    _e.z *= -1;\n    _q1.setFromEuler(_e);\n    for (const value of _q1.toArray()) {\n      convertedList.push(value);\n    }\n  }\n  return convertedList;\n}\n//   新增函数，获取相对某父级的变换矩阵\nfunction getRelativeMatrix(node, targetParentName) {\n  const relativeMatrix = new Matrix4();\n  relativeMatrix.copy(node.matrix);\n  let tempNode = node;\n  //   不用while，防止因意外情况陷入死循环\n  for (let i = 0; i < 7; i++) {\n    if (tempNode.name === targetParentName || tempNode.parent === null) {\n      break;\n    }\n    relativeMatrix.premultiply(tempNode.parent.matrix);\n    tempNode = tempNode.parent;\n  }\n  return relativeMatrix;\n}\n// 获取模型中心位置的高度\nfunction getBaseCenterHeight(obj, type) {\n  switch (type) {\n    case \"mixamo\": {\n      // mixamo网站导出动画可以选择是否包含Skin，下方这种写法无论是否包含skin都没有问题\n      return obj.children.find((bone) => bone.name === \"mixamorigHips\").position\n        .y;\n    }\n    case \"mmd\": {\n      // mmd模型在腰部到顶级的好几个层级上都可能有高度数据\n      return _v1.setFromMatrixPosition(\n        getRelativeMatrix(\n          obj.skeleton.bones.find((bone) => bone.name === \"腰\"),\n          \"全ての親\"\n        )\n      ).y;\n    }\n    case \"vrm\": {\n      return obj.humanoid.humanBones.hips[0].node.position.y;\n    }\n  }\n}\nexport {\n  createClearPositionTrack,\n  buildNodeStack,\n  trackRotateQuaternion,\n  trackPreRotateQuaternion,\n  trackRotateQuaternionAxis,\n  trackRevertXZ,\n  getRelativeMatrix,\n  getBaseCenterHeight,\n};\n"
  },
  {
    "path": "src/renderer/display/utils/capture/FaceMeshCaptureManager.js",
    "content": "import { Face } from \"kalidokit\";\nimport {\n  setTarget,\n  createVideo,\n  onResults,\n  askForMediaAccess,\n} from \"./parents/parents.js\";\n// 经过测试发现，build后对mediapipe的打包存在问题，因此改为html引入\n// import * as faceMeshRoot from \"@mediapipe/face_mesh\";\n// import { Camera } from \"@mediapipe/camera_utils\";\n// import { drawConnectors, drawLandmarks } from \"@mediapipe/drawing_utils\";\nconst faceMeshRoot = window;\nconst Camera = window.Camera;\nconst drawConnectors = window.drawConnectors;\nconst drawLandmarks = window.drawLandmarks;\n// 虽然在node_modules中有训练好的数据，然而我根本不知道应该如何写路径引入，于是先复制粘贴了一份到项目目录下\nconst solutionPath = \"./lib/@mediapipe/face_mesh/\";\nexport class FaceMeshCaptureManager {\n  constructor() {\n    this.model = null;\n    this.onRiggedFaceCallback = null;\n    this.running = false;\n  }\n\n  async start() {\n    if (!(await this.askForMediaAccess())) {\n      // i18n也是不存在的……为一个提示引入整个i18next实在是划不来\n      alert(\"Can't access camera.\");\n      return;\n    }\n    if (this.readyToRig !== undefined) {\n      this.readyToRig();\n    }\n    this.createVideo();\n    this.faceMesh = new faceMeshRoot.FaceMesh({\n      locateFile: (file) => {\n        return `${solutionPath}${file}`;\n      },\n    });\n    this.faceMesh.setOptions({\n      maxNumFaces: 1,\n      refineLandmarks: true,\n      minDetectionConfidence: 0.5,\n      minTrackingConfidence: 0.5,\n    });\n    this.faceMesh.onResults(this.onResults.bind(this));\n\n    this.camera = new Camera(this.video, {\n      onFrame: async () => {\n        // 异步函数，可能在this.faceMesh为null后执行\n        await this.faceMesh?.send({ image: this.video });\n      },\n      width: 640,\n      height: 480,\n    });\n    this.camera.start();\n    this.running = true;\n  }\n  async quitCapture() {\n    // 由于Google的Mediapipe的文档有给了跟没给一样，只有个demo，以及连源代码也找不到，尝试了各种方法，依旧无法实现全面的垃圾回收，即使退出捕捉内存也无法释放，但目前只能这样了\n    await this.camera.stop();\n    await this.faceMesh?.close();\n    this.faceMesh.onResults(null);\n    this.faceMesh = null;\n    this.camera = null;\n    this.running = false;\n    document.body.removeChild(this.videoContainer);\n  }\n  drawResults(results) {\n    if (results.multiFaceLandmarks.length < 1) {\n      return;\n    }\n    const points = results.multiFaceLandmarks[0];\n    this.canvas.width = this.video.videoWidth;\n    this.canvas.height = this.video.videoHeight;\n    this.canvasCtx.save();\n    this.canvasCtx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n    // Use `Mediapipe` drawing functions\n    drawConnectors(this.canvasCtx, points, faceMeshRoot.FACEMESH_TESSELATION, {\n      color: \"#C0C0C070\",\n      lineWidth: 1,\n    });\n    if (points && points.length === 478) {\n      //draw pupils\n      drawLandmarks(this.canvasCtx, [points[468], points[468 + 5]], {\n        color: \"#ffe603\",\n        lineWidth: 2,\n      });\n    }\n    this.canvasCtx.restore();\n  }\n  animateModel(results) {\n    if (results.multiFaceLandmarks.length < 1) {\n      return;\n    }\n    const riggedFace = Face.solve(results.multiFaceLandmarks[0], {\n      runtime: \"mediapipe\",\n      video: this.video,\n    });\n    if (this.onRiggedFaceCallback !== null) {\n      this.onRiggedFaceCallback(riggedFace);\n    }\n    if (this.model !== null) {\n      this.rigFace(riggedFace);\n    }\n  }\n  onRiggedFace(callback) {\n    this.onRiggedFaceCallback = callback;\n  }\n}\nFaceMeshCaptureManager.prototype.setTarget = setTarget;\nFaceMeshCaptureManager.prototype.createVideo = createVideo;\nFaceMeshCaptureManager.prototype.onResults = onResults;\nFaceMeshCaptureManager.prototype.askForMediaAccess = askForMediaAccess;\n"
  },
  {
    "path": "src/renderer/display/utils/capture/HolisticCaptureManager.js",
    "content": "import { Face, Pose, Hand } from \"kalidokit\";\nimport {\n  setTarget,\n  createVideo,\n  onResults,\n  askForMediaAccess,\n} from \"./parents/parents.js\";\n// 经过测试发现，build后对mediapipe的打包存在问题，因此改为html引入\n// import * as holisticRoot from \"@mediapipe/holistic\";\n// import { Camera } from \"@mediapipe/camera_utils\";\n// import { drawConnectors, drawLandmarks } from \"@mediapipe/drawing_utils\";\nconst holisticRoot = window;\nconst Camera = window.Camera;\nconst drawConnectors = window.drawConnectors;\nconst drawLandmarks = window.drawLandmarks;\nconst solutionPath = \"./lib/@mediapipe/holistic/\";\nexport class HolisticCaptureManager {\n  constructor() {\n    this.model = null;\n    this.onRiggedHolisticCallback = null;\n    this.running = false;\n  }\n  async start() {\n    if (!(await this.askForMediaAccess())) {\n      // i18n也是不存在的……为一个提示引入整个i18next实在是划不来\n      alert(\"Can't access camera.\");\n      return;\n    }\n    if (this.readyToRig !== undefined) {\n      this.readyToRig();\n    }\n    this.createVideo();\n    this.holistic = new holisticRoot.Holistic({\n      locateFile: (file) => {\n        return `${solutionPath}${file}`;\n      },\n    });\n    this.holistic.setOptions({\n      modelComplexity: 1,\n      refineLandmarks: true,\n      minDetectionConfidence: 0.5,\n      minTrackingConfidence: 0.5,\n    });\n    this.holistic.onResults(this.onResults.bind(this));\n\n    this.camera = new Camera(this.video, {\n      onFrame: async () => {\n        // 异步函数，可能在this.faceMesh为null后执行\n        await this.holistic?.send({ image: this.video });\n      },\n      width: 640,\n      height: 480,\n    });\n    this.camera.start();\n    this.running = true;\n  }\n  async quitCapture() {\n    // 由于Google的Mediapipe的文档有给了跟没给一样，只有个demo，以及连源代码也找不到，尝试了各种方法，依旧无法实现全面的垃圾回收，即使退出捕捉内存也无法释放，但目前只能这样了\n    await this.camera.stop();\n    await this.holistic?.close();\n    this.holistic.onResults(null);\n    this.holistic = null;\n    this.camera = null;\n    this.running = false;\n    document.body.removeChild(this.videoContainer);\n  }\n  drawResults(results) {\n    this.canvas.width = this.video.videoWidth;\n    this.canvas.height = this.video.videoHeight;\n    this.canvasCtx.save();\n    this.canvasCtx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n    // Use `Mediapipe` drawing functions\n    drawConnectors(\n      this.canvasCtx,\n      results.poseLandmarks,\n      holisticRoot.POSE_CONNECTIONS,\n      {\n        color: \"#00cff7\",\n        lineWidth: 4,\n      }\n    );\n    drawLandmarks(this.canvasCtx, results.poseLandmarks, {\n      color: \"#ff0364\",\n      lineWidth: 2,\n    });\n    drawConnectors(\n      this.canvasCtx,\n      results.faceLandmarks,\n      holisticRoot.FACEMESH_TESSELATION,\n      {\n        color: \"#C0C0C070\",\n        lineWidth: 1,\n      }\n    );\n    if (results.faceLandmarks && results.faceLandmarks.length === 478) {\n      //draw pupils\n      drawLandmarks(\n        this.canvasCtx,\n        [results.faceLandmarks[468], results.faceLandmarks[468 + 5]],\n        {\n          color: \"#ffe603\",\n          lineWidth: 2,\n        }\n      );\n    }\n    drawConnectors(\n      this.canvasCtx,\n      results.leftHandLandmarks,\n      holisticRoot.HAND_CONNECTIONS,\n      {\n        color: \"#eb1064\",\n        lineWidth: 5,\n      }\n    );\n    drawLandmarks(this.canvasCtx, results.leftHandLandmarks, {\n      color: \"#00cff7\",\n      lineWidth: 2,\n    });\n    drawConnectors(\n      this.canvasCtx,\n      results.rightHandLandmarks,\n      holisticRoot.HAND_CONNECTIONS,\n      {\n        color: \"#22c3e3\",\n        lineWidth: 5,\n      }\n    );\n    drawLandmarks(this.canvasCtx, results.rightHandLandmarks, {\n      color: \"#ff0364\",\n      lineWidth: 2,\n    });\n  }\n  animateModel(results) {\n    const faceLandmarks = results.faceLandmarks;\n    const pose3DLandmarks = results.ea;\n    const pose2DLandmarks = results.poseLandmarks;\n    const leftHandLandmarks = results.rightHandLandmarks;\n    const rightHandLandmarks = results.leftHandLandmarks;\n    const rigResults = {};\n    if (faceLandmarks) {\n      const riggedFace = Face.solve(faceLandmarks, {\n        runtime: \"mediapipe\",\n        video: this.video,\n      });\n      rigResults.riggedFace = riggedFace;\n      this.rigFace(riggedFace);\n    }\n    if (pose2DLandmarks && pose3DLandmarks) {\n      const riggedPose = Pose.solve(pose3DLandmarks, pose2DLandmarks, {\n        runtime: \"mediapipe\",\n        video: this.video,\n      });\n      rigResults.riggedPose = riggedPose;\n      this.rigPose(riggedPose);\n    }\n    if (leftHandLandmarks) {\n      const riggedLeftHand = Hand.solve(leftHandLandmarks, \"Left\");\n      rigResults.riggedLeftHand = riggedLeftHand;\n      this.rigLeftHand(riggedLeftHand);\n    }\n    if (rightHandLandmarks) {\n      const riggedRightHand = Hand.solve(rightHandLandmarks, \"Right\");\n      rigResults.riggedRightHand = riggedRightHand;\n      this.rigRightHand(riggedRightHand);\n    }\n    if (this.onRiggedHolisticCallback !== null) {\n      this.onRiggedHolisticCallback(rigResults);\n    }\n  }\n  onRiggedHolistic(callback) {\n    this.onRiggedHolisticCallback = callback;\n  }\n}\nHolisticCaptureManager.prototype.setTarget = setTarget;\nHolisticCaptureManager.prototype.createVideo = createVideo;\nHolisticCaptureManager.prototype.onResults = onResults;\nHolisticCaptureManager.prototype.askForMediaAccess = askForMediaAccess;\n"
  },
  {
    "path": "src/renderer/display/utils/capture/Live2DFaceMeshCaptureManager.js",
    "content": "import { FaceMeshCaptureManager } from \"./FaceMeshCaptureManager.js\";\nimport { Vector, Face } from \"kalidokit\";\nconst { lerp } = Vector;\nexport class Live2DFaceMeshCaptureManager extends FaceMeshCaptureManager {\n  rigFace(riggedFace, lerpRatio = 0.5) {\n    // rigFace下方的rig逻辑直接迁移自Kalidokit开发者提供的demo：https://glitch.com/edit/#!/kalidokit-live2d\n    const coreModel = this.model.internalModel.coreModel;\n    coreModel.setParameterValueById(\n      \"ParamEyeBallX\",\n      lerp(\n        riggedFace.pupil.x,\n        coreModel.getParameterValueById(\"ParamEyeBallX\"),\n        lerpRatio\n      )\n    );\n    coreModel.setParameterValueById(\n      \"ParamEyeBallY\",\n      lerp(\n        riggedFace.pupil.y,\n        coreModel.getParameterValueById(\"ParamEyeBallY\"),\n        lerpRatio\n      )\n    );\n    // X and Y axis rotations are swapped for Live2D parameters\n    // because it is a 2D system and KalidoKit is a 3D system\n    coreModel.setParameterValueById(\n      \"ParamAngleX\",\n      lerp(\n        riggedFace.head.degrees.y,\n        coreModel.getParameterValueById(\"ParamAngleX\"),\n        lerpRatio\n      )\n    );\n    coreModel.setParameterValueById(\n      \"ParamAngleY\",\n      lerp(\n        riggedFace.head.degrees.x,\n        coreModel.getParameterValueById(\"ParamAngleY\"),\n        lerpRatio\n      )\n    );\n    coreModel.setParameterValueById(\n      \"ParamAngleZ\",\n      lerp(\n        riggedFace.head.degrees.z,\n        coreModel.getParameterValueById(\"ParamAngleZ\"),\n        lerpRatio\n      )\n    );\n    // update body params for models without head/body param sync\n    const dampener = 0.3;\n    coreModel.setParameterValueById(\n      \"ParamBodyAngleX\",\n      lerp(\n        riggedFace.head.degrees.y * dampener,\n        coreModel.getParameterValueById(\"ParamBodyAngleX\"),\n        lerpRatio\n      )\n    );\n    coreModel.setParameterValueById(\n      \"ParamBodyAngleY\",\n      lerp(\n        riggedFace.head.degrees.x * dampener,\n        coreModel.getParameterValueById(\"ParamBodyAngleY\"),\n        lerpRatio\n      )\n    );\n    coreModel.setParameterValueById(\n      \"ParamBodyAngleZ\",\n      lerp(\n        riggedFace.head.degrees.z * dampener,\n        coreModel.getParameterValueById(\"ParamBodyAngleZ\"),\n        lerpRatio\n      )\n    );\n    // Simple example without winking.\n    // Interpolate based on old blendshape, then stabilize blink with `Kalidokit` helper function.\n    //  这里采用的计算方式和MMD那边一样，目前也是不考虑wink的\n    let stabilizedEyes = Face.stabilizeBlink(\n      {\n        l: lerp(\n          riggedFace.eye.l,\n          coreModel.getParameterValueById(\"ParamEyeLOpen\"),\n          0.7\n        ),\n        r: lerp(\n          riggedFace.eye.r,\n          coreModel.getParameterValueById(\"ParamEyeROpen\"),\n          0.7\n        ),\n      },\n      riggedFace.head.y\n    );\n    // eye blink\n    coreModel.setParameterValueById(\"ParamEyeLOpen\", stabilizedEyes.l);\n    coreModel.setParameterValueById(\"ParamEyeROpen\", stabilizedEyes.r);\n    // mouth\n    coreModel.setParameterValueById(\n      \"ParamMouthOpenY\",\n      lerp(\n        riggedFace.mouth.y,\n        coreModel.getParameterValueById(\"ParamMouthOpenY\"),\n        0.3\n      )\n    );\n    // Adding 0.3 to ParamMouthForm to make default more of a \"smile\"\n    coreModel.setParameterValueById(\n      \"ParamMouthForm\",\n      0.3 +\n        lerp(\n          riggedFace.mouth.x,\n          coreModel.getParameterValueById(\"ParamMouthForm\"),\n          0.3\n        )\n    );\n  }\n}\n"
  },
  {
    "path": "src/renderer/display/utils/capture/MMDFaceMeshCaptureManager.js",
    "content": "import { FaceMeshCaptureManager } from \"./FaceMeshCaptureManager.js\";\n\nimport {\n  rigFace,\n  lerpMorphTargetByName,\n  lerpBoneRotationByBone,\n  getBoneNode,\n} from \"./rig/MMDRig.js\";\n\nexport class MMDFaceMeshCaptureManager extends FaceMeshCaptureManager {\n  constructor() {\n    super();\n    this.boneStore = {};\n  }\n  readyToRig() {\n    this.model.pose();\n    // 让手臂放得更自然一点\n    this.getBoneNode(\"右腕\").rotation.z = 0.5;\n    this.getBoneNode(\"左腕\").rotation.z = -0.5;\n  }\n\n  rigHead(rotation, lerpRatio, bodyLinkRatio = 0.2) {\n    // 让上半身会跟着头部联动，由于头部为上半身的子节点，因此上半身已完成的旋转要从头部除掉\n    this.lerpBoneRotationByBone(\n      this.getBoneNode(\"頭\"),\n      rotation,\n      lerpRatio,\n      1 - bodyLinkRatio\n    );\n    this.lerpBoneRotationByBone(\n      this.getBoneNode(\"上半身\"),\n      rotation,\n      lerpRatio,\n      bodyLinkRatio\n    );\n  }\n  // lerpBoneRotationByName(boneName, rotation, lerpRatio = 0.5) {\n  //   const bone = this.getBoneNode(boneName);\n  //   if (bone === null) {\n  //     return;\n  //   }\n  //   bone.rotation.set(\n  //     lerp(-rotation.x, bone.rotation.x, lerpRatio),\n  //     lerp(rotation.y, bone.rotation.y, lerpRatio),\n  //     lerp(-rotation.z, bone.rotation.z, lerpRatio)\n  //   );\n  // }\n}\nMMDFaceMeshCaptureManager.prototype.rigFace = rigFace;\nMMDFaceMeshCaptureManager.prototype.lerpMorphTargetByName =\n  lerpMorphTargetByName;\nMMDFaceMeshCaptureManager.prototype.lerpBoneRotationByBone =\n  lerpBoneRotationByBone;\nMMDFaceMeshCaptureManager.prototype.getBoneNode = getBoneNode;\n"
  },
  {
    "path": "src/renderer/display/utils/capture/MMDHolisticCaptureManager.js",
    "content": "import { HolisticCaptureManager } from \"./HolisticCaptureManager.js\";\nimport {\n  rigFace,\n  lerpMorphTargetByName,\n  lerpBoneRotationByBone,\n  lerpBonePositionByBone,\n  getBoneNode,\n} from \"./rig/MMDRig.js\";\nconst poseRigList = [\n  { boneName: \"上半身\", rigName: \"Spine\" },\n  { boneName: \"左腕\", rigName: \"LeftUpperArm\" },\n  { boneName: \"左ひじ\", rigName: \"LeftLowerArm\" },\n  { boneName: \"右腕\", rigName: \"RightUpperArm\" },\n  { boneName: \"右ひじ\", rigName: \"RightLowerArm\" },\n  { boneName: \"左足\", rigName: \"LeftUpperLeg\" },\n  { boneName: \"左ひざ\", rigName: \"LeftLowerLeg\" },\n  { boneName: \"右足\", rigName: \"RightUpperLeg\" },\n  { boneName: \"右ひざ\", rigName: \"RightLowerLeg\" },\n];\nconst leftHandRigList = [\n  { boneName: \"左手首\", rigName: \"LeftWrist\" },\n  { boneName: \"左親指０\", rigName: \"LeftThumbProximal\" },\n  { boneName: \"左親指１\", rigName: \"LeftThumbIntermediate\" },\n  { boneName: \"左親指２\", rigName: \"LeftThumbDistal\" },\n  { boneName: \"左人指１\", rigName: \"LeftIndexProximal\" },\n  { boneName: \"左人指２\", rigName: \"LeftIndexIntermediate\" },\n  { boneName: \"左人指３\", rigName: \"LeftIndexDistal\" },\n  { boneName: \"左中指１\", rigName: \"LeftMiddleProximal\" },\n  { boneName: \"左中指２\", rigName: \"LeftMiddleIntermediate\" },\n  { boneName: \"左中指３\", rigName: \"LeftMiddleDistal\" },\n  { boneName: \"左薬指１\", rigName: \"LeftRingProximal\" },\n  { boneName: \"左薬指２\", rigName: \"LeftRingIntermediate\" },\n  { boneName: \"左薬指３\", rigName: \"LeftRingDistal\" },\n  { boneName: \"左小指１\", rigName: \"LeftLittleProximal\" },\n  { boneName: \"左小指２\", rigName: \"LeftLittleIntermediate\" },\n  { boneName: \"左小指３\", rigName: \"LeftLittleDistal\" },\n];\nconst rightHandRigList = [\n  { boneName: \"右手首\", rigName: \"RightWrist\" },\n  { boneName: \"右親指０\", rigName: \"RightThumbProximal\" },\n  { boneName: \"右親指１\", rigName: \"RightThumbIntermediate\" },\n  { boneName: \"右親指２\", rigName: \"RightThumbDistal\" },\n  { boneName: \"右人指１\", rigName: \"RightIndexProximal\" },\n  { boneName: \"右人指２\", rigName: \"RightIndexIntermediate\" },\n  { boneName: \"右人指３\", rigName: \"RightIndexDistal\" },\n  { boneName: \"右中指１\", rigName: \"RightMiddleProximal\" },\n  { boneName: \"右中指２\", rigName: \"RightMiddleIntermediate\" },\n  { boneName: \"右中指３\", rigName: \"RightMiddleDistal\" },\n  { boneName: \"右薬指１\", rigName: \"RightRingProximal\" },\n  { boneName: \"右薬指２\", rigName: \"RightRingIntermediate\" },\n  { boneName: \"右薬指３\", rigName: \"RightRingDistal\" },\n  { boneName: \"右小指１\", rigName: \"RightLittleProximal\" },\n  { boneName: \"右小指２\", rigName: \"RightLittleIntermediate\" },\n  { boneName: \"右小指３\", rigName: \"RightLittleDistal\" },\n];\nexport class MMDHolisticCaptureManager extends HolisticCaptureManager {\n  constructor() {\n    super();\n    this.boneStore = {};\n  }\n  readyToRig() {\n    this.model.pose();\n  }\n  // 全身捕捉不需要进行上半身的连带旋转操作\n  rigHead(rotation, lerpRatio) {\n    this.lerpBoneRotationByBone(this.getBoneNode(\"頭\"), rotation, lerpRatio);\n  }\n  rigPose(riggedPose, lerpRatio = 0.5) {\n    riggedPose.LeftUpperArm.z -= Math.PI / 4;\n    riggedPose.RightUpperArm.z += Math.PI / 4;\n    riggedPose.Hips.position.x *= 10;\n    riggedPose.Hips.position.y *= 10;\n    riggedPose.Hips.position.y += this.getBoneNode(\"センター\").position.y;\n    riggedPose.Hips.position.z *= 10;\n    this.lerpBoneRotationByBone(\n      this.getBoneNode(\"センター\"),\n      riggedPose.Hips.rotation,\n      lerpRatio\n    );\n    this.lerpBonePositionByBone(\n      this.getBoneNode(\"センター\"),\n      riggedPose.Hips.position,\n      lerpRatio\n    );\n    for (const rigItem of poseRigList) {\n      this.lerpBoneRotationByBone(\n        this.getBoneNode(rigItem.boneName),\n        riggedPose[rigItem.rigName],\n        lerpRatio\n      );\n    }\n  }\n  rigLeftHand(riggedLeftHand, lerpRatio = 0.5) {\n    for (const rigItem of leftHandRigList) {\n      this.lerpBoneRotationByBone(\n        this.getBoneNode(rigItem.boneName),\n        riggedLeftHand[rigItem.rigName],\n        lerpRatio\n      );\n    }\n  }\n  rigRightHand(riggedRightHand, lerpRatio = 0.5) {\n    for (const rigItem of rightHandRigList) {\n      this.lerpBoneRotationByBone(\n        this.getBoneNode(rigItem.boneName),\n        riggedRightHand[rigItem.rigName],\n        lerpRatio\n      );\n    }\n  }\n}\nMMDHolisticCaptureManager.prototype.rigFace = rigFace;\nMMDHolisticCaptureManager.prototype.lerpMorphTargetByName =\n  lerpMorphTargetByName;\nMMDHolisticCaptureManager.prototype.lerpBoneRotationByBone =\n  lerpBoneRotationByBone;\nMMDHolisticCaptureManager.prototype.lerpBonePositionByBone =\n  lerpBonePositionByBone;\nMMDHolisticCaptureManager.prototype.getBoneNode = getBoneNode;\n"
  },
  {
    "path": "src/renderer/display/utils/capture/VRoidFaceMeshCaptureManager.js",
    "content": "import { FaceMeshCaptureManager } from \"./FaceMeshCaptureManager.js\";\nimport {\n  rigFace,\n  lerpMorphTargetByName,\n  lerpBoneRotationByBone,\n  getBoneNode,\n} from \"./rig/VRoidRig.js\";\nexport class VRoidFaceMeshCaptureManager extends FaceMeshCaptureManager {\n  constructor() {\n    super();\n    // VRM内部有一套骨骼获取体系，这里无需再做引用缓存\n  }\n  readyToRig() {\n    //   这个pose方法是为了统一规范手动添加的\n    this.model.pose();\n    // 让手臂放得更自然一点\n    this.getBoneNode(\"rightUpperArm\").rotation.z = -1;\n    this.getBoneNode(\"leftUpperArm\").rotation.z = 1;\n  }\n  rigHead(rotation, lerpRatio, bodyLinkRatio = 0.2) {\n    // 让上半身会跟着头部联动，由于头部为上半身的子节点，因此上半身已完成的旋转要从头部除掉\n    // 解决VRoid的Y轴反转问题\n    rotation.x *= -1;\n    rotation.z *= -1;\n    this.lerpBoneRotationByBone(\n      this.getBoneNode(\"head\"),\n      rotation,\n      lerpRatio,\n      1 - bodyLinkRatio\n    );\n    this.lerpBoneRotationByBone(\n      this.getBoneNode(\"spine\"),\n      rotation,\n      lerpRatio,\n      bodyLinkRatio\n    );\n  }\n}\nVRoidFaceMeshCaptureManager.prototype.rigFace = rigFace;\nVRoidFaceMeshCaptureManager.prototype.lerpMorphTargetByName =\n  lerpMorphTargetByName;\nVRoidFaceMeshCaptureManager.prototype.lerpBoneRotationByBone =\n  lerpBoneRotationByBone;\nVRoidFaceMeshCaptureManager.prototype.getBoneNode = getBoneNode;\n"
  },
  {
    "path": "src/renderer/display/utils/capture/VRoidHolisticCaptureManager.js",
    "content": "import { HolisticCaptureManager } from \"./HolisticCaptureManager.js\";\nimport {\n  rigFace,\n  lerpMorphTargetByName,\n  lerpBoneRotationByBone,\n  lerpBonePositionByBone,\n  getBoneNode,\n} from \"./rig/VRoidRig.js\";\n\nconst poseRigList = [\n  { boneName: \"leftUpperArm\", rigName: \"LeftUpperArm\" },\n  { boneName: \"leftLowerArm\", rigName: \"LeftLowerArm\" },\n  { boneName: \"leftUpperLeg\", rigName: \"LeftUpperLeg\" },\n  { boneName: \"leftLowerLeg\", rigName: \"LeftLowerLeg\" },\n  { boneName: \"rightUpperArm\", rigName: \"RightUpperArm\" },\n  { boneName: \"rightLowerArm\", rigName: \"RightLowerArm\" },\n  { boneName: \"rightUpperLeg\", rigName: \"RightUpperLeg\" },\n  { boneName: \"rightLowerLeg\", rigName: \"RightLowerLeg\" },\n];\nconst leftHandRigList = [\n  { boneName: \"leftHand\", rigName: \"LeftWrist\" },\n  { boneName: \"leftThumbProximal\", rigName: \"LeftThumbProximal\" },\n  /* 抽象，VRM1.0怎么开始跟骨架结构较劲起来了，vrm.humanoid.normalizedHumanBones中，leftThumbIntermediate消失了，多了个leftThumbMetacarpal\n   Metacarpal：最靠近手腕的，掌骨\n   Proximal：第一节指骨\n   Intermediate：第二节指骨\n   Distal：第三节指骨，即指尖\n   我也不是很了解，但貌似拇指的确没有第二节的Intermediate\n   那从这个道理上来讲可能需要这么对应：\n   | 从手腕数起 | 拇指rigName  | VRM1.0拇指boneName |\n   | :--------: | :----------: | :----------------: |\n   |   第一节   |   Proximal   |     Metacarpal     |\n   |   第二节   | Intermediate |      Proximal      |\n   |   第三节   |    Distal    |       Distal       |\n   没学过人体，上方纯瞎猜，但现在反正全身捕捉效果很炸裂，姑且先将leftThumbIntermediate更名为leftThumbMetacarpal，右手同理\n   */\n  { boneName: \"leftThumbMetacarpal\", rigName: \"LeftThumbIntermediate\" },\n  { boneName: \"leftThumbDistal\", rigName: \"LeftThumbDistal\" },\n  { boneName: \"leftIndexProximal\", rigName: \"LeftIndexProximal\" },\n  { boneName: \"leftIndexIntermediate\", rigName: \"LeftIndexIntermediate\" },\n  { boneName: \"leftIndexDistal\", rigName: \"LeftIndexDistal\" },\n  { boneName: \"leftMiddleProximal\", rigName: \"LeftMiddleProximal\" },\n  { boneName: \"leftMiddleIntermediate\", rigName: \"LeftMiddleIntermediate\" },\n  { boneName: \"leftMiddleDistal\", rigName: \"LeftMiddleDistal\" },\n  { boneName: \"leftRingProximal\", rigName: \"LeftRingProximal\" },\n  { boneName: \"leftRingIntermediate\", rigName: \"LeftRingIntermediate\" },\n  { boneName: \"leftRingDistal\", rigName: \"LeftRingDistal\" },\n  { boneName: \"leftLittleProximal\", rigName: \"LeftLittleProximal\" },\n  { boneName: \"leftLittleIntermediate\", rigName: \"LeftLittleIntermediate\" },\n  { boneName: \"leftLittleDistal\", rigName: \"LeftLittleDistal\" },\n];\nconst rightHandRigList = [\n  { boneName: \"rightHand\", rigName: \"RightWrist\" },\n  { boneName: \"rightThumbProximal\", rigName: \"RightThumbProximal\" },\n  { boneName: \"rightThumbMetacarpal\", rigName: \"RightThumbIntermediate\" },\n  { boneName: \"rightThumbDistal\", rigName: \"RightThumbDistal\" },\n  { boneName: \"rightIndexProximal\", rigName: \"RightIndexProximal\" },\n  { boneName: \"rightIndexIntermediate\", rigName: \"RightIndexIntermediate\" },\n  { boneName: \"rightIndexDistal\", rigName: \"RightIndexDistal\" },\n  { boneName: \"rightMiddleProximal\", rigName: \"RightMiddleProximal\" },\n  { boneName: \"rightMiddleIntermediate\", rigName: \"RightMiddleIntermediate\" },\n  { boneName: \"rightMiddleDistal\", rigName: \"RightMiddleDistal\" },\n  { boneName: \"rightRingProximal\", rigName: \"RightRingProximal\" },\n  { boneName: \"rightRingIntermediate\", rigName: \"RightRingIntermediate\" },\n  { boneName: \"rightRingDistal\", rigName: \"RightRingDistal\" },\n  { boneName: \"rightLittleProximal\", rigName: \"RightLittleProximal\" },\n  { boneName: \"rightLittleIntermediate\", rigName: \"RightLittleIntermediate\" },\n  { boneName: \"rightLittleDistal\", rigName: \"RightLittleDistal\" },\n];\nexport class VRoidHolisticCaptureManager extends HolisticCaptureManager {\n  constructor() {\n    super();\n  }\n  readyToRig() {\n    this.model.pose();\n  }\n  // 全身捕捉不需要进行上半身的连带旋转操作\n  rigHead(rotation, lerpRatio) {\n    rotation.x *= -1;\n    rotation.z *= -1;\n    this.lerpBoneRotationByBone(this.getBoneNode(\"head\"), rotation, lerpRatio);\n  }\n  rigPose(riggedPose, lerpRatio = 0.5) {\n    riggedPose.Hips.position.y += this.getBoneNode(\"hips\").position.y;\n    this.lerpBoneRotationByBone(\n      this.getBoneNode(\"hips\"),\n      riggedPose.Hips.rotation,\n      lerpRatio\n    );\n    this.lerpBonePositionByBone(\n      this.getBoneNode(\"hips\"),\n      riggedPose.Hips.position,\n      lerpRatio\n    );\n    for (const rigItem of poseRigList) {\n      // 针对VRoid的角度反转\n      riggedPose[rigItem.rigName].x *= -1;\n      riggedPose[rigItem.rigName].z *= -1;\n      this.lerpBoneRotationByBone(\n        this.getBoneNode(rigItem.boneName),\n        riggedPose[rigItem.rigName],\n        lerpRatio\n      );\n    }\n  }\n  rigLeftHand(riggedLeftHand, lerpRatio = 0.5) {\n    for (const rigItem of leftHandRigList) {\n      riggedLeftHand[rigItem.rigName].x *= -1;\n      riggedLeftHand[rigItem.rigName].z *= -1;\n      this.lerpBoneRotationByBone(\n        this.getBoneNode(rigItem.boneName),\n        riggedLeftHand[rigItem.rigName],\n        lerpRatio\n      );\n    }\n  }\n  rigRightHand(riggedRightHand, lerpRatio = 0.5) {\n    for (const rigItem of rightHandRigList) {\n      riggedRightHand[rigItem.rigName].x *= -1;\n      riggedRightHand[rigItem.rigName].z *= -1;\n      this.lerpBoneRotationByBone(\n        this.getBoneNode(rigItem.boneName),\n        riggedRightHand[rigItem.rigName],\n        lerpRatio\n      );\n    }\n  }\n}\nVRoidHolisticCaptureManager.prototype.rigFace = rigFace;\nVRoidHolisticCaptureManager.prototype.lerpMorphTargetByName =\n  lerpMorphTargetByName;\nVRoidHolisticCaptureManager.prototype.lerpBoneRotationByBone =\n  lerpBoneRotationByBone;\nVRoidHolisticCaptureManager.prototype.lerpBonePositionByBone =\n  lerpBonePositionByBone;\nVRoidHolisticCaptureManager.prototype.getBoneNode = getBoneNode;\n"
  },
  {
    "path": "src/renderer/display/utils/capture/parents/parents.js",
    "content": "// 我时候来才知道，原来自己这里在毫不知情的情况下手动实现了mixin……我之前都没听说过这个概念啊，只是想了半天，为了防止不必要的重复，然后就这么写出来了\nfunction setTarget(target) {\n  this.model = target;\n}\nfunction createVideo() {\n  this.videoContainer = document.createElement(\"div\");\n  this.videoContainer.classList.add(\"capture__container\");\n  this.video = document.createElement(\"video\");\n  this.videoContainer.appendChild(this.video);\n  this.video.classList.add(\"capture__video\");\n  this.canvas = document.createElement(\"canvas\");\n  this.canvasCtx = this.canvas.getContext(\"2d\");\n  this.videoContainer.appendChild(this.canvas);\n  this.canvas.classList.add(\"capture__canvas\");\n  document.body.appendChild(this.videoContainer);\n}\nfunction onResults(results) {\n  this.drawResults(results);\n  this.animateModel(results);\n}\nfunction askForMediaAccess() {\n  // 这个函数属于是返回promise但本身并不异步，同步返回异步结果……因此不用加async\n  return window.nodeAPI.ipc.askForMediaAccess();\n}\nexport { setTarget, createVideo, onResults, askForMediaAccess };\n"
  },
  {
    "path": "src/renderer/display/utils/capture/rig/3DRig.js",
    "content": "import { Vector } from \"kalidokit\";\nconst { lerp } = Vector;\nfunction lerpBoneRotationByBone(bone, rotation, lerpRatio, dampener = 1) {\n  bone.rotation.set(\n    lerp(-rotation.x * dampener, bone.rotation.x, lerpRatio),\n    lerp(rotation.y * dampener, bone.rotation.y, lerpRatio),\n    lerp(-rotation.z * dampener, bone.rotation.z, lerpRatio)\n  );\n}\nfunction lerpBonePositionByBone(bone, position, lerpRatio, dampener = 1) {\n  bone.position.set(\n    lerp(position.x * dampener, bone.position.x, lerpRatio),\n    lerp(position.y * dampener, bone.position.y, lerpRatio),\n    lerp(position.z * dampener, bone.position.z, lerpRatio)\n  );\n}\nexport { lerpBoneRotationByBone, lerpBonePositionByBone };\n"
  },
  {
    "path": "src/renderer/display/utils/capture/rig/MMDRig.js",
    "content": "import { Vector, Face } from \"kalidokit\";\nconst { lerp } = Vector;\nfunction rigFace(riggedFace, lerpRatio = 0.5) {\n  // 使用Kalidokit提供的stabilizeBlink对眨眼进行进一步优化，还有得进一步考虑wink的启动机制，ウィンク与まばたき变形的关系有待考虑，目前先全部改用まばたき变形\n  const BlinkMorphIndex = this.model.morphTargetDictionary[\"まばたき\"];\n  if (BlinkMorphIndex === undefined) {\n    console.warn(\n      `MotionCaptureManager: morph target まばたき not found in the skinned mesh`\n    );\n  } else {\n    const lerpedEye = {\n      l: lerp(\n        riggedFace.eye.l,\n        1 - this.model.morphTargetInfluences[BlinkMorphIndex],\n        lerpRatio\n      ),\n      r: lerp(\n        riggedFace.eye.r,\n        1 - this.model.morphTargetInfluences[BlinkMorphIndex],\n        lerpRatio\n      ),\n    };\n    // 我认为这里不需要用headY做一道判断，就直接将其赋值为0了\n    const stabilizedEye = Face.stabilizeBlink(lerpedEye, 0);\n    this.model.morphTargetInfluences[BlinkMorphIndex] =\n      1 - (stabilizedEye.l + stabilizedEye.r) / 2;\n  }\n\n  // this.lerpMorphTargetByName(\"ウィンク２\", 1 - riggedFace.eye.l, lerpRatio);\n  // this.lerpMorphTargetByName(\"ウィンク２右\", 1 - riggedFace.eye.r, lerpRatio);\n  this.lerpMorphTargetByName(\"あ\", riggedFace.mouth.shape.A, lerpRatio);\n  this.lerpMorphTargetByName(\"い\", riggedFace.mouth.shape.I, lerpRatio);\n  this.lerpMorphTargetByName(\"う\", riggedFace.mouth.shape.U, lerpRatio);\n  this.lerpMorphTargetByName(\"え\", riggedFace.mouth.shape.E, lerpRatio);\n  this.lerpMorphTargetByName(\"お\", riggedFace.mouth.shape.O, lerpRatio);\n  this.rigHead(riggedFace.head, lerpRatio);\n}\nfunction lerpMorphTargetByName(name, value, lerpRatio) {\n  const morphTargetIndex = this.model.morphTargetDictionary[name];\n  if (morphTargetIndex === undefined) {\n    console.warn(\n      `MotionCaptureManager: morph target ${name} not found in the skinned mesh`\n    );\n    return;\n  }\n  this.model.morphTargetInfluences[morphTargetIndex] = lerp(\n    value,\n    this.model.morphTargetInfluences[morphTargetIndex],\n    lerpRatio\n  );\n}\n\nfunction getBoneNode(boneName) {\n  if (this.boneStore[boneName] === undefined) {\n    const bone = this.model.skeleton.bones.find((b) => b.name === boneName);\n    if (bone === undefined) {\n      console.warn(\n        `MotionCaptureManager: bone ${boneName} not found in the skinned mesh`\n      );\n      return null;\n    }\n    this.boneStore[boneName] = bone;\n    return bone;\n  } else {\n    return this.boneStore[boneName];\n  }\n}\nexport { rigFace, lerpMorphTargetByName, getBoneNode };\nexport { lerpBoneRotationByBone, lerpBonePositionByBone } from \"./3DRig.js\";\n"
  },
  {
    "path": "src/renderer/display/utils/capture/rig/VRoidRig.js",
    "content": "import { Vector, Face } from \"kalidokit\";\nconst { lerp } = Vector;\nfunction rigFace(riggedFace, lerpRatio = 0.5) {\n  const lerpedEye = {\n    l: lerp(\n      riggedFace.eye.l,\n      1 - this.model.vrm.expressionManager.getValue(\"blink\"),\n      lerpRatio\n    ),\n    r: lerp(\n      riggedFace.eye.r,\n      1 - this.model.vrm.expressionManager.getValue(\"blink\"),\n      lerpRatio\n    ),\n  };\n  // 我认为这里不需要用headY做一道判断，就直接将其赋值为0了\n  const stabilizedEye = Face.stabilizeBlink(lerpedEye, 0);\n  this.model.vrm.expressionManager.setValue(\n    \"blink\",\n    1 - (stabilizedEye.l + stabilizedEye.r) / 2\n  );\n  this.lerpMorphTargetByName(\"aa\", riggedFace.mouth.shape.A, lerpRatio);\n  this.lerpMorphTargetByName(\"ih\", riggedFace.mouth.shape.I, lerpRatio);\n  this.lerpMorphTargetByName(\"ou\", riggedFace.mouth.shape.U, lerpRatio);\n  this.lerpMorphTargetByName(\"ee\", riggedFace.mouth.shape.E, lerpRatio);\n  this.lerpMorphTargetByName(\"oh\", riggedFace.mouth.shape.O, lerpRatio);\n  this.rigHead(riggedFace.head, lerpRatio);\n}\nfunction lerpMorphTargetByName(name, value, lerpRatio) {\n  this.model.vrm.expressionManager.setValue(\n    name,\n    lerp(value, this.model.vrm.expressionManager.getValue(name), lerpRatio)\n  );\n}\nfunction getBoneNode(boneName) {\n  // 搞不懂three-vrm的那个VRMSchema.HumanoidBoneName想干什么，官方提供的驼峰大小写转换器是吧……\n  // this.model.vrm.humanoid.getBoneNode()\n  const bone = this.model.vrm.humanoid.normalizedHumanBones[boneName];\n  if (bone === undefined) {\n    console.warn(\n      `MotionCaptureManager: bone ${boneName} not found in the skinned mesh`\n    );\n    return null;\n  }\n  return bone.node;\n}\n\nexport { rigFace, lerpMorphTargetByName, getBoneNode };\nexport { lerpBoneRotationByBone, lerpBonePositionByBone } from \"./3DRig.js\";\n"
  },
  {
    "path": "src/renderer/display/utils/common.js",
    "content": "export function getCurrentDateString() {\n  const date = new Date();\n  const year = date.getFullYear();\n  const month = String(date.getMonth() + 1).padStart(2, \"0\");\n  const day = String(date.getDate()).padStart(2, \"0\");\n  const hours = String(date.getHours()).padStart(2, \"0\");\n  const minutes = String(date.getMinutes()).padStart(2, \"0\");\n  const seconds = String(date.getSeconds()).padStart(2, \"0\");\n  return `${year}-${month}-${day} ${hours}.${minutes}.${seconds}`;\n}\n"
  },
  {
    "path": "src/renderer/display/utils/live2d/Cubism2Shim.js",
    "content": "export const LIVE2D_VERSION = {\n  CUBISM2: \"Cubism2\",\n  CUBISM4: \"Cubism4\",\n};\n\n// Cubism2只能搞到一个经过混淆的js文件，要想直接控制内部的参数需要费点劲，这里对其混淆的结构进行了部分的分析\n// {\n//   _model: {\n//     parts: [\n//       {\n//         partID: {\n//           id: \"PARTS_01_EYE_001\",\n//         },\n//       },\n//     ];\n//     parameters: {\n//       parametersInner: [\n//         {\n//           parameterDefaultValue: 0,\n//           parameteMaxValue: 30,\n//           parameteMinValue: -30,\n//           parameteID: { id: \"PARAM_ANGLE_X\" },\n//         },\n//       ];\n//     }\n//   }\n// }\n\n// {\n//   _parameterIds: [];\n//   _parameterMaximumValues: [];\n//   _parameterMinimumValues: [];\n//   _partIds: [];\n// getParameterValueByIndex()\n// setParameterValueByIndex()\n// getParameterValueById()\n// setParameterValueById()\n// getPartOpacityByIndex()\n// }\n// live2d旧版cubism2的SDK只能搞到混淆以后的代码，且core的结构和cubism4的结构差别较大\n// 之前的控制逻辑是针对cubism4的，cubism2内部API差距较大，下游一个个适配太费劲了，为了实现对cubism2的控制支持，硬生生去拿着混淆后的结构去读取数据，并仿照cubism4的结构进行了部分API的实现\nconst Cubism2ConfusionDict = {\n  _model: \"_$MT\",\n  parts: \"_$F2\",\n  partID: \"_$NL\",\n  parameters: \"_$vo\",\n  parametersInner: \"_$4S\",\n  parameterDefaultValue: \"_$FS\",\n  parameterMaxValue: \"_$LT\",\n  parameterMinValue: \"_$TT\",\n  parameterID: \"_$wL\",\n};\n// 缩写方便引用\nconst C2C = Cubism2ConfusionDict;\nfunction camelToUpperSnake(str) {\n  return str\n    .replace(/([a-z])([A-Z])/g, \"$1_$2\")\n    .replace(/([A-Z])([A-Z])/g, \"$1_$2\")\n    .toUpperCase();\n}\nexport function AddCubism2Shim(coreModel) {\n  coreModel._parameterIds = coreModel[C2C._model][C2C.parameters][\n    C2C.parametersInner\n  ].map((param) => param[C2C.parameterID].id);\n  coreModel._parameterMaximumValues = coreModel[C2C._model][C2C.parameters][\n    C2C.parametersInner\n  ].map((param) => param[C2C.parameterMaxValue]);\n  coreModel._parameterMinimumValues = coreModel[C2C._model][C2C.parameters][\n    C2C.parametersInner\n  ].map((param) => param[C2C.parameterMinValue]);\n  coreModel._partIds = coreModel[C2C._model][C2C.parts].map(\n    (part) => part[C2C.partID].id\n  );\n  coreModel.fixID = function (id) {\n    if (id.startsWith(\"Param\")) {\n      return camelToUpperSnake(id);\n    } else {\n      return id;\n    }\n  };\n  // cubism2的core会自动检测你传递的是索引还是ID，所以内部都在调用统一函数\n  coreModel.getParameterValueByIndex = function (index) {\n    return this.getParamFloat(index);\n  };\n  coreModel.setParameterValueByIndex = function (index, value) {\n    this.setParamFloat(index, value);\n  };\n  coreModel.getParameterValueById = function (id) {\n    id = this.fixID(id);\n    return this.getParamFloat(id);\n  };\n  coreModel.setParameterValueById = function (id, value) {\n    id = this.fixID(id);\n    this.setParamFloat(id, value);\n  };\n  coreModel.getPartOpacityByIndex = function (index) {\n    return this.getPartOpacity(index);\n  };\n  coreModel.setPartOpacityByIndex = function (index, value) {\n    this.setPartsOpacity(index, value);\n  };\n}\n"
  },
  {
    "path": "src/renderer/display/utils/live2d/Monitor.js",
    "content": "// 绝了，不知道是谁的锅，这里的live2d渲染系统设定_parameterValues和_partOpacities会发生小数偏移，例如设为0.3，他可能自动变成0.3000078397489这样的，导致我设定的参数变化监测系统直接疯狂更新，这里采用toFixed限制小数位\nclass ParameterMonitor {\n  constructor() {\n    this.value = 0;\n    this.model = null;\n    this.isJustBined = false;\n  }\n  bind(target, model = null) {\n    this.model = model;\n    this.parameterId = target;\n    if (\n      !this.model.internalModel.coreModel._parameterIds.includes(\n        this.parameterId\n      )\n    ) {\n      throw new Error(\n        `ParameterMonitor: parameter ${this.parameterId} not found in the model`\n      );\n    }\n    this.isJustBined = true;\n    this.parameterIndex =\n      this.model.internalModel.coreModel._parameterIds.indexOf(\n        this.parameterId\n      );\n    this.value = 0;\n  }\n  checkUpdate() {\n    let changed = false;\n    if (this.isJustBined) {\n      this.isJustBined = false;\n      changed = true;\n    }\n    if (this.value !== null && this.model !== null) {\n      const newParameterValue = Number(\n        this.model.internalModel.coreModel\n          .getParameterValueByIndex(this.parameterIndex)\n          .toFixed(2)\n      );\n      if (this.value !== newParameterValue) {\n        this.value = newParameterValue;\n        changed = true;\n      }\n    }\n    return changed;\n  }\n  clear() {\n    this.value = 0;\n    this.model = null;\n    this.isJustBined = false;\n  }\n}\nclass PartMonitor {\n  constructor() {\n    this.value = 0;\n    this.model = null;\n    this.isJustBined = false;\n  }\n  bind(target, model = null) {\n    this.model = model;\n    this.partId = target;\n    if (!this.model.internalModel.coreModel._partIds.includes(this.partId)) {\n      throw new Error(\n        `PartMonitor: part ${this.parameterId} not found in the model`\n      );\n    }\n    this.isJustBined = true;\n    this.partIndex = this.model.internalModel.coreModel._partIds.indexOf(\n      this.partId\n    );\n    this.value = 0;\n  }\n  checkUpdate() {\n    let changed = false;\n    if (this.isJustBined) {\n      this.isJustBined = false;\n      changed = true;\n    }\n    if (this.value !== null && this.model !== null) {\n      const newPartOpacity = Number(\n        this.model.internalModel.coreModel\n          .getPartOpacityByIndex(this.partIndex)\n          .toFixed(2)\n      );\n      if (this.value !== newPartOpacity) {\n        this.value = newPartOpacity;\n        changed = true;\n      }\n    }\n    return changed;\n  }\n  clear() {\n    this.value = 0;\n    this.model = null;\n    this.isJustBined = false;\n  }\n}\nexport { ParameterMonitor, PartMonitor };\n"
  },
  {
    "path": "src/renderer/display/utils/mmd/AnimationManager.js",
    "content": "import { MMDAnimationHelper } from \"three/examples/jsm/animation/MMDAnimationHelper.js\";\nimport { AudioManager } from \"@display/utils/3d/AudioManager\";\nimport { Clock, AudioLoader, Audio, AudioListener, LoopOnce } from \"three\";\nimport { FBXLoader } from \"three/examples/jsm/loaders/FBXLoader.js\";\nimport {\n  convertAnimation as mixamoConvertAnimation,\n  convertAnimationWithIK as mixamoConvertAnimationWithIK,\n} from \"@display/utils/animation/Mixamo2MMDAnimationConverterNew.js\";\nimport { getBaseCenterHeight } from \"@display/utils/animation/utils.js\";\nexport class AnimationManager {\n  // 直接从上级获取MMDLoader，省得重新搞个实例\n  constructor(MMDLoader, mixamoLegTranslateMode = \"ik\") {\n    this.MMDLoader = MMDLoader;\n    this.FBXLoader = new FBXLoader();\n    this.clock = new Clock();\n    this.helper = new MMDAnimationHelper();\n    this.ready = false;\n    this.totalDuration = 0;\n    this.mixer = null;\n    this.action = null;\n    this.clip = null;\n    this.physics = null;\n    this.ikSolver = null;\n    this.model = null;\n    this.audioLoader = null;\n    this.audio = null;\n    this.audioManager = null;\n    this.listener = null;\n    this.mixamoLegTranslateMode = mixamoLegTranslateMode;\n  }\n  destroy() {\n    this.audioManager?.destroy();\n    this.MMDLoader = null;\n    this.FBXLoader = null;\n    this.clock = null;\n    this.mixer = null;\n    this.action = null;\n    this.clip = null;\n    this.physics = null;\n    this.ikSolver = null;\n    this.model = null;\n    this.audioLoader = null;\n    this.audio = null;\n    this.audioManager = null;\n    this.listener = null;\n  }\n  _MMDLoadAnimation(model, motionFilePath) {\n    return new Promise((resolve, reject) => {\n      this.model = model;\n      // 防止之前的对象变换和模型播放对模型姿态造成影响\n      this.pause();\n      const extname = motionFilePath.split(\".\").pop();\n      if (extname === \"vmd\") {\n        this.MMDLoader.loadAnimation(motionFilePath, model, (vmd) => {\n          this._initAnimation(vmd);\n          resolve();\n        });\n      } else if (extname === \"fbx\") {\n        this.FBXLoader.load(motionFilePath, (fbx) => {\n          const mixamoAnimation = fbx.animations.find(\n            (animation) => animation.name === \"mixamo.com\"\n          );\n          if (fbx.animations.length === 0 || !mixamoAnimation) {\n            reject();\n            throw new Error(\n              \"AnimationManager: Loaded fbx file is not exported from www.mixamo.com\"\n            );\n          }\n          // 为了获取正确的缩放参数，从mixamo载入的fbx必须包含模型数据\n          const scale =\n            getBaseCenterHeight(fbx, \"mixamo\") /\n            getBaseCenterHeight(model, \"mmd\");\n          if (this.mixamoLegTranslateMode === \"rotate\") {\n            this._initAnimation(\n              mixamoConvertAnimation(\n                mixamoAnimation,\n                scale,\n                fbx.children.find((bone) => bone.name === \"mixamorigHips\")\n              ),\n              // 关闭IK解算\n              false\n            );\n          } else if (this.mixamoLegTranslateMode == \"ik\") {\n            this._initAnimation(\n              mixamoConvertAnimationWithIK(\n                mixamoAnimation,\n                scale,\n                fbx.children.find((bone) => bone.name === \"mixamorigHips\")\n              )\n            );\n          }\n\n          resolve();\n        });\n      }\n    });\n  }\n  _initAnimation(animation, useIK = true) {\n    this.helper.add(this.model, { animation, physics: true });\n    // 对于mixamo的旋转解算模式，需要关闭IK解算，否则腿部直接爆炸\n    this.helper.enable(\"ik\", useIK);\n    const helperMeshObject = this.helper.objects.get(this.model);\n    //   付与(grant)？？算了吧，做个寂寞\n    this.mixer = helperMeshObject.mixer;\n    this.ikSolver = helperMeshObject.ikSolver;\n    this.action = this.mixer._actions[0];\n    this.clip = this.action.getClip();\n    this.physics = helperMeshObject.physics;\n    this.totalDuration = this.clip.duration;\n  }\n  _MMDLoadAudio(audioFilePath, delayTime) {\n    return new Promise((resolve, reject) => {\n      this.audioLoader.load(audioFilePath, (audioBuffer) => {\n        this.audio = new Audio(this.listener).setBuffer(audioBuffer);\n        //   MMDAnimationHelper内部的AudioManager无法解析负数延时\n        //   THREE中的Audio对象的延时底层好像是转接到Web API的AudioBufferSourceNode的offset的，也无法设定为负数\n        //   若想要实现负数延时，可以尝试调整AudioManager内部的audio：\n        //   if (this.delayTime < 0) {\n        // \tthis.audio._progress = -this.delayTime;\n        //   }\n        // 目前已重写AudioManager，可以设定负数延时\n        this.audioManager = new AudioManager(this.audio, { delayTime });\n        // 算出动作和音频二者的最长时长\n        this.totalDuration = Math.max(\n          this.totalDuration,\n          this.audio.buffer.duration\n        );\n        resolve();\n      });\n    });\n  }\n  async loadAnimation(model, motionFilePath) {\n    await this._MMDLoadAnimation(model, motionFilePath);\n    this.play();\n    this.ready = true;\n  }\n  async loadAnimationWithAudio(\n    model,\n    motionFilePath,\n    audioFilePath,\n    delayTime = 0\n  ) {\n    this.audioLoader = new AudioLoader();\n    this.listener = new AudioListener();\n    await Promise.all([\n      this._MMDLoadAnimation(model, motionFilePath),\n      this._MMDLoadAudio(audioFilePath, delayTime),\n    ]);\n    //   这里要在完成载入音频再播放动作，不然会因音频的异步加载导致时间轴对不上\n    this.play();\n    this.ready = true;\n  }\n  update() {\n    // 突然发现暂停时死命执行helper.update(delta)还是很消耗性能的，毕竟一次update要涉及到mixer更新，IK更新，grant更新，physic更新……通过running来判断是否更新吧\n    if (this.clock.running) {\n      const delta = this.clock.getDelta();\n      this.helper.update(delta);\n      if (\n        this.action.loop === LoopOnce &&\n        this.mixer.time >= this.totalDuration\n      ) {\n        this.pause();\n        // 防止炸毛\n        this.pose();\n      }\n    }\n  }\n  pose() {\n    this.model.pose();\n  }\n  play() {\n    this.clock.start();\n    this.audioManager?.play();\n  }\n  pause() {\n    this.clock.stop();\n    this.audioManager?.pause();\n  }\n  setLoop(loop) {\n    if (this.action === null) {\n      console.error(\"AnimationManager: action is null\");\n    }\n    if (!loop) {\n      // 让整个动作只播放一次\n      this.action.setLoop(LoopOnce, Infinity);\n    }\n  }\n  // 尚未使用的函数\n  setTime() {\n    // MMDAnimationHelper根本就没有指定到一个时间点的方法，只能变相拿着内部的mixer实现，下方的两个update是为了防止IK，Physics，Grant爆炸\n    // 目前这里还没有处理音频，现在找到的方法是暂停音频硬生生拿着Audio的_progress属性来设置时间，然后再回复播放\n    this.mixer.setTime(time);\n    this.helper.update(1);\n    this.helper.update(-1);\n  }\n  // 手动更新IK解算\n  updateIK() {\n    this.ikSolver.update();\n  }\n  // 专门应对特殊情况导致物理演算炸毛\n  // MMDPhysics目前始终会存在一些奇怪的情况，感觉是内部设计上有点问题，MMD的刚体结构感觉怎么有点像古代士兵铠甲……有时会出现很诡异的抖动，现在尚无解决方案\n  fixPhysics() {\n    // this.model.pose();\n    // this.helper.update(0);\n    this.physics?.warmup(60);\n    // MMDPhysics里有个reset函数，但实际使用下来感觉作用不是很大\n  }\n}\n"
  },
  {
    "path": "src/renderer/display/utils/mmd/Monitor.js",
    "content": "class MorphMonitor {\n  constructor() {\n    this.value = 0;\n    this.model = null;\n    this.isJustBined = false;\n  }\n  bind(target, model = null) {\n    this.model = model;\n    this.morpName = target;\n    if (\n      !Object.keys(this.model.morphTargetDictionary).includes(this.morpName)\n    ) {\n      throw new Error(\n        `MorphMonitor: morph target ${this.morpName} not found in the model`\n      );\n    }\n    this.isJustBined = true;\n    this.value = 0;\n  }\n  checkUpdate() {\n    let changed = false;\n    if (this.isJustBined) {\n      this.isJustBined = false;\n      changed = true;\n    }\n\n    if (this.value !== null && this.model !== null) {\n      const newMorphValue =\n        this.model.morphTargetInfluences[\n          this.model.morphTargetDictionary[this.morpName]\n        ];\n      if (this.value !== newMorphValue) {\n        this.value = newMorphValue;\n        changed = true;\n      }\n    }\n    return changed;\n  }\n}\nexport { MorphMonitor };\n"
  },
  {
    "path": "src/renderer/display/utils/record/RecordManager.js",
    "content": "import { getCurrentDateString } from \"@display/utils/common\";\n// 尝试过实现录屏\n// 浏览器直接录制出来的webm没有时长信息，要想录制gif之类的更是麻烦，而且原始数据的最开始几毫秒超级的糊\n// 尝试把ffmpeg.wasm弄进来，发现转码速度很慢（虽然可以-c copy），但占用三四十MB实现个这种功能，感觉没有必要\n// 截图的话可以获取具有alpha通道的png，录屏就让用户使用专门的软件的录制吧\nexport class RecordManager {\n  constructor(app) {\n    this.app = app;\n  }\n  takeScreenshot() {\n    const app = this.app;\n    console.log(\"[Hime Display] Screenshot\");\n    app.canvas.toBlob((blob) => {\n      this.saveFile(blob, `${this.getFileName()}.png`);\n    }, \"image/png\");\n  }\n  getFileName() {\n    return `HimeDisplay ${app.currentModelInfo.name} ${getCurrentDateString()}`;\n  }\n  saveFile(blob, name) {\n    const a = document.createElement(\"a\");\n    const url = URL.createObjectURL(blob);\n    a.href = url;\n    a.download = name;\n    document.body.appendChild(a);\n    a.click();\n    document.body.removeChild(a);\n    URL.revokeObjectURL(url);\n  }\n}\n"
  },
  {
    "path": "src/renderer/display/utils/spine/premultipliedImageLoader.js",
    "content": "// 此图片载入的预乘程序遵循GPL协议来源于https://github.com/HuiDesktop/huidesktop-ng-spine/blob/main/src/premultipliedImageLoader.ts\nexport default function imageLoaderAdapter(\n  loader,\n  namePrefix,\n  baseUrl,\n  imageOptions\n) {\n  if (\n    typeof baseUrl === \"string\" &&\n    baseUrl.lastIndexOf(\"/\") !== baseUrl.length - 1\n  ) {\n    baseUrl += \"/\";\n  }\n  return function (line, callback) {\n    const name = namePrefix + line;\n    const url = baseUrl + line;\n\n    const cachedResource = loader.resources[name];\n    if (typeof cachedResource === \"object\") {\n      const done = () => {\n        cachedResource.texture.baseTexture.alphaMode =\n          PIXI.ALPHA_MODES.PREMULTIPLIED_ALPHA; /* !! PIXI.ALPHA_MODES.PREMULTIPLY_ALPHA */\n        callback(cachedResource.texture.baseTexture);\n      };\n      if (typeof cachedResource.texture === \"object\") {\n        done();\n      } else {\n        cachedResource.onAfterMiddleware.add(done);\n      }\n    } else {\n      loader.add(name, url, imageOptions, (resource) => {\n        if (resource.error === undefined || resource.error === null) {\n          resource.texture.baseTexture.alphaMode = 2;\n          callback(resource.texture.baseTexture);\n        } else {\n          callback(undefined);\n        }\n      });\n    }\n  };\n}\n"
  },
  {
    "path": "src/renderer/display/utils/vroid/Monitor.js",
    "content": "import { VRMExpressionPresetName } from \"@pixiv/three-vrm\";\nclass MorphMonitor {\n  constructor() {\n    this.value = 0;\n    this.model = null;\n    this.isJustBined = false;\n  }\n  bind(target, model = null) {\n    this.model = model;\n    this.morpName = target;\n    if (!Object.values(VRMExpressionPresetName).includes(this.morpName)) {\n      throw new Error(\n        `MorphMonitor: morph target ${this.morpName} not found in the model`\n      );\n    }\n    this.isJustBined = true;\n    this.value = 0;\n  }\n  checkUpdate() {\n    let changed = false;\n    if (this.isJustBined) {\n      this.isJustBined = false;\n      changed = true;\n    }\n\n    if (this.value !== null && this.model !== null) {\n      const newMorphValue = this.model.vrm.expressionManager.getValue(\n        this.morpName\n      );\n      if (this.value !== newMorphValue) {\n        this.value = newMorphValue;\n        changed = true;\n      }\n    }\n    return changed;\n  }\n}\nexport { MorphMonitor };\n"
  },
  {
    "path": "src/renderer/display.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n\t<meta charset=\"UTF-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n\t<!-- <title>electron-vite</title> -->\n\t<style>\n\t\thtml,\n\t\tbody,\n\t\t#display-canvas {\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\theight: 100%;\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t#display-canvas {\n\t\t\t/* canvas默认的display为inline，会导致滚动条出现 */\n\t\t\tdisplay: block;\n\t\t}\n\n\t\t.capture__container {\n\t\t\tposition: absolute;\n\t\t\tbottom: 24px;\n\t\t\tright: 24px;\n\t\t\tborder-radius: 10px;\n\t\t\tbackground: black;\n\t\t\toverflow: hidden;\n\t\t}\n\n\t\t/* 靠video元素撑开容器高度 */\n\t\t.capture__video {\n\t\t\tmax-width: 300px;\n\t\t\theight: auto;\n\t\t\ttransform: scale(-1, 1);\n\t\t\tdisplay: block;\n\t\t}\n\n\t\t.capture__canvas {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\ttransform: scale(-1, 1);\n\n\t\t}\n\t</style>\n</head>\n\n<body>\n\t<!-- 放弃希望了，我感觉做不到让vite能够正确引入pixi-live2d-display的了\n\tpixi-live2d-display的自动载入依赖于window下的PIXI对象，这意味着一定要在import pixi.js后将其挂到window后再引入pixi-live2d-display\n\t参考文档中防止import被提升，通过require的特性，使用webpack打包实现，然而，vite的开发服务器使用的是真的ESM……require直接无法解析\n\t直接import pixi-live2d-display会爆炸的很惨\n\t异步import也试过，反正没成功\n\t然后我尝试了一下直接通过electron的这个页面引入node环境，的确成功require了，依旧会出现各种问题，而且安全性进一步没有保证了\n\t最终发现，还是直接引入js文件最管用，你们随意往window下面挂对象吧，我不管了，打包个寂寞…… -->\n\t<script src=\"./lib/common/stats.min.js\"></script>\n\t<script src=\"./lib/three/ammo.wasm.js\"></script>\n\t<script>\n\t\t// 初始化物理引擎\n\t\tAmmo().then(function (AmmoLib) {\n\t\t\tAmmo = AmmoLib;\n\t\t});\n\t</script>\n\t<!-- 构建出了问题，改为在此引入mediapipe-->\n\t<script src=\"./lib/@mediapipe/cdn/holistic.js\"></script>\n\t<script src=\"./lib/@mediapipe/cdn/face_mesh.js\"></script>\n\t<script src=\"./lib/@mediapipe/cdn/camera_utils.js\"></script>\n\t<script src=\"./lib/@mediapipe/cdn/drawing_utils.js\"></script>\n\t<script src=\"./lib/live2d/live2dcubismcore.min.js\"></script>\n\t<script src=\"./lib/live2d/live2d.min.js\"></script>\n\t<script src=\"./lib/live2d/pixi.min.js\"></script>\n\t<script src=\"./lib/live2d/index.min.js\"></script>\n\t<script src=\"./lib/spine/pixi-spine.umd.js\"></script>\n\t<script type=\"module\" src=\"./display/main.js\"></script>\n\t<!-- <video src=\"\" class=\"capture-video\"></video> -->\n</body>\n\n</html>"
  },
  {
    "path": "src/renderer/package.json",
    "content": "{\n  \"name\": \"@app/renderer\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\"\n  },\n  \"dependencies\": {\n    \"@esotericsoftware/spine-pixi-v8\": \"^4.2.80\",\n    \"@pixiv/three-vrm\": \"^3.4.0\",\n    \"element-plus\": \"2.9.8\",\n    \"i18next\": \"^25.0.1\",\n    \"i18next-vue\": \"^5.2.0\",\n    \"kalidokit\": \"^1.1.5\",\n    \"lodash\": \"^4.17.21\",\n    \"pinia\": \"^3.0.2\",\n    \"pixi.js\": \"^8.9.1\",\n    \"three\": \"^0.169.0\",\n    \"vue\": \"^3.2.37\"\n  },\n  \"devDependencies\": {\n    \"@vitejs/plugin-vue\": \"^5.2.3\",\n    \"fast-glob\": \"^3.3.3\",\n    \"sass\": \"^1.53.0\",\n    \"unplugin-auto-import\": \"^19.1.2\",\n    \"unplugin-vue-components\": \"^28.5.0\",\n    \"vite\": \"^6.3.3\",\n    \"vite-plugin-svg-icons\": \"^2.0.1\"\n  }\n}\n"
  },
  {
    "path": "src/renderer/public/lib/@mediapipe/cdn/camera_utils.js",
    "content": "(function(){/*\n\n Copyright The Closure Library Authors.\n SPDX-License-Identifier: Apache-2.0\n*/\n'use strict';function n(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var q=\"function\"==typeof Object.defineProperties?Object.defineProperty:function(a,b,e){if(a==Array.prototype||a==Object.prototype)return a;a[b]=e.value;return a};\nfunction t(a){a=[\"object\"==typeof globalThis&&globalThis,a,\"object\"==typeof window&&window,\"object\"==typeof self&&self,\"object\"==typeof global&&global];for(var b=0;b<a.length;++b){var e=a[b];if(e&&e.Math==Math)return e}throw Error(\"Cannot find global object\");}var u=t(this);function v(a,b){if(b)a:{var e=u;a=a.split(\".\");for(var f=0;f<a.length-1;f++){var h=a[f];if(!(h in e))break a;e=e[h]}a=a[a.length-1];f=e[a];b=b(f);b!=f&&null!=b&&q(e,a,{configurable:!0,writable:!0,value:b})}}\nv(\"Symbol\",function(a){function b(l){if(this instanceof b)throw new TypeError(\"Symbol is not a constructor\");return new e(f+(l||\"\")+\"_\"+h++,l)}function e(l,c){this.g=l;q(this,\"description\",{configurable:!0,writable:!0,value:c})}if(a)return a;e.prototype.toString=function(){return this.g};var f=\"jscomp_symbol_\"+(1E9*Math.random()>>>0)+\"_\",h=0;return b});\nv(\"Symbol.iterator\",function(a){if(a)return a;a=Symbol(\"Symbol.iterator\");for(var b=\"Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array\".split(\" \"),e=0;e<b.length;e++){var f=u[b[e]];\"function\"===typeof f&&\"function\"!=typeof f.prototype[a]&&q(f.prototype,a,{configurable:!0,writable:!0,value:function(){return w(n(this))}})}return a});function w(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}\nfunction x(a){var b=\"undefined\"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:n(a)}}function y(){this.i=!1;this.g=null;this.o=void 0;this.j=1;this.m=0;this.h=null}function z(a){if(a.i)throw new TypeError(\"Generator is already running\");a.i=!0}y.prototype.l=function(a){this.o=a};function A(a,b){a.h={F:b,G:!0};a.j=a.m}y.prototype.return=function(a){this.h={return:a};this.j=this.m};function B(a){this.g=new y;this.h=a}\nfunction C(a,b){z(a.g);var e=a.g.g;if(e)return D(a,\"return\"in e?e[\"return\"]:function(f){return{value:f,done:!0}},b,a.g.return);a.g.return(b);return H(a)}function D(a,b,e,f){try{var h=b.call(a.g.g,e);if(!(h instanceof Object))throw new TypeError(\"Iterator result \"+h+\" is not an object\");if(!h.done)return a.g.i=!1,h;var l=h.value}catch(c){return a.g.g=null,A(a.g,c),H(a)}a.g.g=null;f.call(a.g,l);return H(a)}\nfunction H(a){for(;a.g.j;)try{var b=a.h(a.g);if(b)return a.g.i=!1,{value:b.value,done:!1}}catch(e){a.g.o=void 0,A(a.g,e)}a.g.i=!1;if(a.g.h){b=a.g.h;a.g.h=null;if(b.G)throw b.F;return{value:b.return,done:!0}}return{value:void 0,done:!0}}\nfunction I(a){this.next=function(b){z(a.g);a.g.g?b=D(a,a.g.g.next,b,a.g.l):(a.g.l(b),b=H(a));return b};this.throw=function(b){z(a.g);a.g.g?b=D(a,a.g.g[\"throw\"],b,a.g.l):(A(a.g,b),b=H(a));return b};this.return=function(b){return C(a,b)};this[Symbol.iterator]=function(){return this}}function J(a){function b(f){return a.next(f)}function e(f){return a.throw(f)}return new Promise(function(f,h){function l(c){c.done?f(c.value):Promise.resolve(c.value).then(b,e).then(l,h)}l(a.next())})}\nv(\"Promise\",function(a){function b(c){this.h=0;this.i=void 0;this.g=[];this.o=!1;var d=this.j();try{c(d.resolve,d.reject)}catch(g){d.reject(g)}}function e(){this.g=null}function f(c){return c instanceof b?c:new b(function(d){d(c)})}if(a)return a;e.prototype.h=function(c){if(null==this.g){this.g=[];var d=this;this.i(function(){d.l()})}this.g.push(c)};var h=u.setTimeout;e.prototype.i=function(c){h(c,0)};e.prototype.l=function(){for(;this.g&&this.g.length;){var c=this.g;this.g=[];for(var d=0;d<c.length;++d){var g=\nc[d];c[d]=null;try{g()}catch(k){this.j(k)}}}this.g=null};e.prototype.j=function(c){this.i(function(){throw c;})};b.prototype.j=function(){function c(k){return function(m){g||(g=!0,k.call(d,m))}}var d=this,g=!1;return{resolve:c(this.A),reject:c(this.l)}};b.prototype.A=function(c){if(c===this)this.l(new TypeError(\"A Promise cannot resolve to itself\"));else if(c instanceof b)this.C(c);else{a:switch(typeof c){case \"object\":var d=null!=c;break a;case \"function\":d=!0;break a;default:d=!1}d?this.v(c):this.m(c)}};\nb.prototype.v=function(c){var d=void 0;try{d=c.then}catch(g){this.l(g);return}\"function\"==typeof d?this.D(d,c):this.m(c)};b.prototype.l=function(c){this.u(2,c)};b.prototype.m=function(c){this.u(1,c)};b.prototype.u=function(c,d){if(0!=this.h)throw Error(\"Cannot settle(\"+c+\", \"+d+\"): Promise already settled in state\"+this.h);this.h=c;this.i=d;2===this.h&&this.B();this.H()};b.prototype.B=function(){var c=this;h(function(){if(c.I()){var d=u.console;\"undefined\"!==typeof d&&d.error(c.i)}},1)};b.prototype.I=\nfunction(){if(this.o)return!1;var c=u.CustomEvent,d=u.Event,g=u.dispatchEvent;if(\"undefined\"===typeof g)return!0;\"function\"===typeof c?c=new c(\"unhandledrejection\",{cancelable:!0}):\"function\"===typeof d?c=new d(\"unhandledrejection\",{cancelable:!0}):(c=u.document.createEvent(\"CustomEvent\"),c.initCustomEvent(\"unhandledrejection\",!1,!0,c));c.promise=this;c.reason=this.i;return g(c)};b.prototype.H=function(){if(null!=this.g){for(var c=0;c<this.g.length;++c)l.h(this.g[c]);this.g=null}};var l=new e;b.prototype.C=\nfunction(c){var d=this.j();c.s(d.resolve,d.reject)};b.prototype.D=function(c,d){var g=this.j();try{c.call(d,g.resolve,g.reject)}catch(k){g.reject(k)}};b.prototype.then=function(c,d){function g(p,r){return\"function\"==typeof p?function(E){try{k(p(E))}catch(F){m(F)}}:r}var k,m,G=new b(function(p,r){k=p;m=r});this.s(g(c,k),g(d,m));return G};b.prototype.catch=function(c){return this.then(void 0,c)};b.prototype.s=function(c,d){function g(){switch(k.h){case 1:c(k.i);break;case 2:d(k.i);break;default:throw Error(\"Unexpected state: \"+\nk.h);}}var k=this;null==this.g?l.h(g):this.g.push(g);this.o=!0};b.resolve=f;b.reject=function(c){return new b(function(d,g){g(c)})};b.race=function(c){return new b(function(d,g){for(var k=x(c),m=k.next();!m.done;m=k.next())f(m.value).s(d,g)})};b.all=function(c){var d=x(c),g=d.next();return g.done?f([]):new b(function(k,m){function G(E){return function(F){p[E]=F;r--;0==r&&k(p)}}var p=[],r=0;do p.push(void 0),r++,f(g.value).s(G(p.length-1),m),g=d.next();while(!g.done)})};return b});\nvar K=\"function\"==typeof Object.assign?Object.assign:function(a,b){for(var e=1;e<arguments.length;e++){var f=arguments[e];if(f)for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(a[h]=f[h])}return a};v(\"Object.assign\",function(a){return a||K});var L=this||self;var M={facingMode:\"user\",width:640,height:480};function N(a,b){this.video=a;this.i=0;this.h=Object.assign(Object.assign({},M),b)}N.prototype.stop=function(){var a=this,b,e,f,h;return J(new I(new B(function(l){if(a.g){b=a.g.getTracks();e=x(b);for(f=e.next();!f.done;f=e.next())h=f.value,h.stop();a.g=void 0}l.j=0})))};\nN.prototype.start=function(){var a=this,b;return J(new I(new B(function(e){navigator.mediaDevices&&navigator.mediaDevices.getUserMedia||alert(\"No navigator.mediaDevices.getUserMedia exists.\");b=a.h;return e.return(navigator.mediaDevices.getUserMedia({video:{facingMode:b.facingMode,width:b.width,height:b.height}}).then(function(f){O(a,f)}).catch(function(f){var h=\"Failed to acquire camera feed: \"+f;console.error(h);alert(h);throw f;}))})))};\nfunction P(a){window.requestAnimationFrame(function(){Q(a)})}function O(a,b){a.g=b;a.video.srcObject=b;a.video.onloadedmetadata=function(){a.video.play();P(a)}}function Q(a){var b=null;a.video.paused||a.video.currentTime===a.i||(a.i=a.video.currentTime,b=a.h.onFrame());b?b.then(function(){P(a)}):P(a)}var R=[\"Camera\"],S=L;R[0]in S||\"undefined\"==typeof S.execScript||S.execScript(\"var \"+R[0]);\nfor(var T;R.length&&(T=R.shift());)R.length||void 0===N?S[T]&&S[T]!==Object.prototype[T]?S=S[T]:S=S[T]={}:S[T]=N;}).call(this);\n"
  },
  {
    "path": "src/renderer/public/lib/@mediapipe/cdn/drawing_utils.js",
    "content": "(function(){/*\n\n Copyright The Closure Library Authors.\n SPDX-License-Identifier: Apache-2.0\n*/\n'use strict';function h(a){var c=0;return function(){return c<a.length?{done:!1,value:a[c++]}:{done:!0}}}var l=\"function\"==typeof Object.defineProperties?Object.defineProperty:function(a,c,b){if(a==Array.prototype||a==Object.prototype)return a;a[c]=b.value;return a};\nfunction m(a){a=[\"object\"==typeof globalThis&&globalThis,a,\"object\"==typeof window&&window,\"object\"==typeof self&&self,\"object\"==typeof global&&global];for(var c=0;c<a.length;++c){var b=a[c];if(b&&b.Math==Math)return b}throw Error(\"Cannot find global object\");}var n=m(this);function p(a,c){if(c)a:{var b=n;a=a.split(\".\");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in b))break a;b=b[e]}a=a[a.length-1];d=b[a];c=c(d);c!=d&&null!=c&&l(b,a,{configurable:!0,writable:!0,value:c})}}\nfunction q(a){var c=\"undefined\"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return c?c.call(a):{next:h(a)}}var r=\"function\"==typeof Object.assign?Object.assign:function(a,c){for(var b=1;b<arguments.length;b++){var d=arguments[b];if(d)for(var e in d)Object.prototype.hasOwnProperty.call(d,e)&&(a[e]=d[e])}return a};p(\"Object.assign\",function(a){return a||r});\np(\"Array.prototype.fill\",function(a){return a?a:function(c,b,d){var e=this.length||0;0>b&&(b=Math.max(0,e+b));if(null==d||d>e)d=e;d=Number(d);0>d&&(d=Math.max(0,e+d));for(b=Number(b||0);b<d;b++)this[b]=c;return this}});function t(a){return a?a:Array.prototype.fill}p(\"Int8Array.prototype.fill\",t);p(\"Uint8Array.prototype.fill\",t);p(\"Uint8ClampedArray.prototype.fill\",t);p(\"Int16Array.prototype.fill\",t);p(\"Uint16Array.prototype.fill\",t);p(\"Int32Array.prototype.fill\",t);\np(\"Uint32Array.prototype.fill\",t);p(\"Float32Array.prototype.fill\",t);p(\"Float64Array.prototype.fill\",t);var u=this||self;function v(a,c){a=a.split(\".\");var b=u;a[0]in b||\"undefined\"==typeof b.execScript||b.execScript(\"var \"+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===c?b[d]&&b[d]!==Object.prototype[d]?b=b[d]:b=b[d]={}:b[d]=c};var w={color:\"white\",lineWidth:4,radius:6,visibilityMin:.5};function x(a){a=a||{};return Object.assign(Object.assign(Object.assign({},w),{fillColor:a.color}),a)}function y(a,c){return a instanceof Function?a(c):a}function z(a,c,b){return Math.max(Math.min(c,b),Math.min(Math.max(c,b),a))}v(\"clamp\",z);\nv(\"drawLandmarks\",function(a,c,b){if(c){b=x(b);a.save();var d=a.canvas,e=0;c=q(c);for(var f=c.next();!f.done;f=c.next())if(f=f.value,void 0!==f&&(void 0===f.visibility||f.visibility>b.visibilityMin)){a.fillStyle=y(b.fillColor,{index:e,from:f});a.strokeStyle=y(b.color,{index:e,from:f});a.lineWidth=y(b.lineWidth,{index:e,from:f});var g=new Path2D;g.arc(f.x*d.width,f.y*d.height,y(b.radius,{index:e,from:f}),0,2*Math.PI);a.fill(g);a.stroke(g);++e}a.restore()}});\nv(\"drawConnectors\",function(a,c,b,d){if(c&&b){d=x(d);a.save();var e=a.canvas,f=0;b=q(b);for(var g=b.next();!g.done;g=b.next()){var k=g.value;a.beginPath();g=c[k[0]];k=c[k[1]];g&&k&&(void 0===g.visibility||g.visibility>d.visibilityMin)&&(void 0===k.visibility||k.visibility>d.visibilityMin)&&(a.strokeStyle=y(d.color,{index:f,from:g,to:k}),a.lineWidth=y(d.lineWidth,{index:f,from:g,to:k}),a.moveTo(g.x*e.width,g.y*e.height),a.lineTo(k.x*e.width,k.y*e.height));++f;a.stroke()}a.restore()}});\nv(\"drawRectangle\",function(a,c,b){b=x(b);a.save();var d=a.canvas;a.beginPath();a.lineWidth=y(b.lineWidth,{});a.strokeStyle=y(b.color,{});a.fillStyle=y(b.fillColor,{});a.translate(c.xCenter*d.width,c.yCenter*d.height);a.rotate(c.rotation*Math.PI/180);a.rect(-c.width/2*d.width,-c.height/2*d.height,c.width*d.width,c.height*d.height);a.translate(-c.xCenter*d.width,-c.yCenter*d.height);a.stroke();a.fill();a.restore()});v(\"lerp\",function(a,c,b,d,e){return z(d*(1-(a-c)/(b-c))+e*(1-(b-a)/(b-c)),d,e)});}).call(this);\n"
  },
  {
    "path": "src/renderer/public/lib/@mediapipe/cdn/face_mesh.js",
    "content": "(function(){/*\n\n Copyright The Closure Library Authors.\n SPDX-License-Identifier: Apache-2.0\n*/\n'use strict';var v;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ba=\"function\"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};\nfunction ca(a){a=[\"object\"==typeof globalThis&&globalThis,a,\"object\"==typeof window&&window,\"object\"==typeof self&&self,\"object\"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error(\"Cannot find global object\");}var G=ca(this);function J(a,b){if(b)a:{var c=G;a=a.split(\".\");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ba(c,a,{configurable:!0,writable:!0,value:b})}}\nJ(\"Symbol\",function(a){function b(g){if(this instanceof b)throw new TypeError(\"Symbol is not a constructor\");return new c(d+(g||\"\")+\"_\"+e++,g)}function c(g,f){this.g=g;ba(this,\"description\",{configurable:!0,writable:!0,value:f})}if(a)return a;c.prototype.toString=function(){return this.g};var d=\"jscomp_symbol_\"+(1E9*Math.random()>>>0)+\"_\",e=0;return b});\nJ(\"Symbol.iterator\",function(a){if(a)return a;a=Symbol(\"Symbol.iterator\");for(var b=\"Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array\".split(\" \"),c=0;c<b.length;c++){var d=G[b[c]];\"function\"===typeof d&&\"function\"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return da(aa(this))}})}return a});function da(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}\nfunction K(a){var b=\"undefined\"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function L(a){if(!(a instanceof Array)){a=K(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ea=\"function\"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},fa;\nif(\"function\"==typeof Object.setPrototypeOf)fa=Object.setPrototypeOf;else{var ha;a:{var ia={a:!0},ja={};try{ja.__proto__=ia;ha=ja.a;break a}catch(a){}ha=!1}fa=ha?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+\" is not extensible\");return a}:null}var ka=fa;\nfunction M(a,b){a.prototype=ea(b.prototype);a.prototype.constructor=a;if(ka)ka(a,b);else for(var c in b)if(\"prototype\"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.ea=b.prototype}function ma(){this.l=!1;this.i=null;this.h=void 0;this.g=1;this.s=this.m=0;this.j=null}function na(a){if(a.l)throw new TypeError(\"Generator is already running\");a.l=!0}ma.prototype.o=function(a){this.h=a};\nfunction oa(a,b){a.j={U:b,V:!0};a.g=a.m||a.s}ma.prototype.return=function(a){this.j={return:a};this.g=this.s};function N(a,b,c){a.g=c;return{value:b}}function pa(a){this.g=new ma;this.h=a}function qa(a,b){na(a.g);var c=a.g.i;if(c)return ra(a,\"return\"in c?c[\"return\"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return sa(a)}\nfunction ra(a,b,c,d){try{var e=b.call(a.g.i,c);if(!(e instanceof Object))throw new TypeError(\"Iterator result \"+e+\" is not an object\");if(!e.done)return a.g.l=!1,e;var g=e.value}catch(f){return a.g.i=null,oa(a.g,f),sa(a)}a.g.i=null;d.call(a.g,g);return sa(a)}function sa(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.l=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,oa(a.g,c)}a.g.l=!1;if(a.g.j){b=a.g.j;a.g.j=null;if(b.V)throw b.U;return{value:b.return,done:!0}}return{value:void 0,done:!0}}\nfunction ta(a){this.next=function(b){na(a.g);a.g.i?b=ra(a,a.g.i.next,b,a.g.o):(a.g.o(b),b=sa(a));return b};this.throw=function(b){na(a.g);a.g.i?b=ra(a,a.g.i[\"throw\"],b,a.g.o):(oa(a.g,b),b=sa(a));return b};this.return=function(b){return qa(a,b)};this[Symbol.iterator]=function(){return this}}function O(a,b){b=new ta(new pa(b));ka&&a.prototype&&ka(b,a.prototype);return b}\nfunction ua(a,b){a instanceof String&&(a+=\"\");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var g=c++;return{value:b(g,a[g]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}var va=\"function\"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Object.prototype.hasOwnProperty.call(d,e)&&(a[e]=d[e])}return a};J(\"Object.assign\",function(a){return a||va});\nJ(\"Promise\",function(a){function b(f){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{f(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(f){return f instanceof b?f:new b(function(h){h(f)})}if(a)return a;c.prototype.h=function(f){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(f)};var e=G.setTimeout;c.prototype.i=function(f){e(f,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var f=this.g;this.g=[];for(var h=0;h<f.length;++h){var k=\nf[h];f[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(f){this.i(function(){throw f;})};b.prototype.j=function(){function f(l){return function(n){k||(k=!0,l.call(h,n))}}var h=this,k=!1;return{resolve:f(this.C),reject:f(this.l)}};b.prototype.C=function(f){if(f===this)this.l(new TypeError(\"A Promise cannot resolve to itself\"));else if(f instanceof b)this.F(f);else{a:switch(typeof f){case \"object\":var h=null!=f;break a;case \"function\":h=!0;break a;default:h=!1}h?this.u(f):this.m(f)}};\nb.prototype.u=function(f){var h=void 0;try{h=f.then}catch(k){this.l(k);return}\"function\"==typeof h?this.G(h,f):this.m(f)};b.prototype.l=function(f){this.s(2,f)};b.prototype.m=function(f){this.s(1,f)};b.prototype.s=function(f,h){if(0!=this.h)throw Error(\"Cannot settle(\"+f+\", \"+h+\"): Promise already settled in state\"+this.h);this.h=f;this.i=h;2===this.h&&this.D();this.A()};b.prototype.D=function(){var f=this;e(function(){if(f.B()){var h=G.console;\"undefined\"!==typeof h&&h.error(f.i)}},1)};b.prototype.B=\nfunction(){if(this.o)return!1;var f=G.CustomEvent,h=G.Event,k=G.dispatchEvent;if(\"undefined\"===typeof k)return!0;\"function\"===typeof f?f=new f(\"unhandledrejection\",{cancelable:!0}):\"function\"===typeof h?f=new h(\"unhandledrejection\",{cancelable:!0}):(f=G.document.createEvent(\"CustomEvent\"),f.initCustomEvent(\"unhandledrejection\",!1,!0,f));f.promise=this;f.reason=this.i;return k(f)};b.prototype.A=function(){if(null!=this.g){for(var f=0;f<this.g.length;++f)g.h(this.g[f]);this.g=null}};var g=new c;b.prototype.F=\nfunction(f){var h=this.j();f.J(h.resolve,h.reject)};b.prototype.G=function(f,h){var k=this.j();try{f.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(f,h){function k(w,r){return\"function\"==typeof w?function(y){try{l(w(y))}catch(m){n(m)}}:r}var l,n,u=new b(function(w,r){l=w;n=r});this.J(k(f,l),k(h,n));return u};b.prototype.catch=function(f){return this.then(void 0,f)};b.prototype.J=function(f,h){function k(){switch(l.h){case 1:f(l.i);break;case 2:h(l.i);break;default:throw Error(\"Unexpected state: \"+\nl.h);}}var l=this;null==this.g?g.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(f){return new b(function(h,k){k(f)})};b.race=function(f){return new b(function(h,k){for(var l=K(f),n=l.next();!n.done;n=l.next())d(n.value).J(h,k)})};b.all=function(f){var h=K(f),k=h.next();return k.done?d([]):new b(function(l,n){function u(y){return function(m){w[y]=m;r--;0==r&&l(w)}}var w=[],r=0;do w.push(void 0),r++,d(k.value).J(u(w.length-1),n),k=h.next();while(!k.done)})};return b});\nJ(\"Object.is\",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});J(\"Array.prototype.includes\",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var g=d[c];if(g===b||Object.is(g,b))return!0}return!1}});\nJ(\"String.prototype.includes\",function(a){return a?a:function(b,c){if(null==this)throw new TypeError(\"The 'this' value for String.prototype.includes must not be null or undefined\");if(b instanceof RegExp)throw new TypeError(\"First argument to String.prototype.includes must not be a regular expression\");return-1!==this.indexOf(b,c||0)}});J(\"Array.prototype.keys\",function(a){return a?a:function(){return ua(this,function(b){return b})}});var wa=this||self;\nfunction P(a,b){a=a.split(\".\");var c=wa;a[0]in c||\"undefined\"==typeof c.execScript||c.execScript(\"var \"+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};function xa(a,b){b=String.fromCharCode.apply(null,b);return null==a?b:a+b}var ya,za=\"undefined\"!==typeof TextDecoder,Aa,Ba=\"undefined\"!==typeof TextEncoder;\nfunction Ca(a){if(Ba)a=(Aa||(Aa=new TextEncoder)).encode(a);else{var b=void 0;b=void 0===b?!1:b;for(var c=0,d=new Uint8Array(3*a.length),e=0;e<a.length;e++){var g=a.charCodeAt(e);if(128>g)d[c++]=g;else{if(2048>g)d[c++]=g>>6|192;else{if(55296<=g&&57343>=g){if(56319>=g&&e<a.length){var f=a.charCodeAt(++e);if(56320<=f&&57343>=f){g=1024*(g-55296)+f-56320+65536;d[c++]=g>>18|240;d[c++]=g>>12&63|128;d[c++]=g>>6&63|128;d[c++]=g&63|128;continue}else e--}if(b)throw Error(\"Found an unpaired surrogate\");g=65533}d[c++]=\ng>>12|224;d[c++]=g>>6&63|128}d[c++]=g&63|128}}a=d.subarray(0,c)}return a};var Da={},Ea=null;function Fa(a,b){void 0===b&&(b=0);Ga();b=Da[b];for(var c=Array(Math.floor(a.length/3)),d=b[64]||\"\",e=0,g=0;e<a.length-2;e+=3){var f=a[e],h=a[e+1],k=a[e+2],l=b[f>>2];f=b[(f&3)<<4|h>>4];h=b[(h&15)<<2|k>>6];k=b[k&63];c[g++]=l+f+h+k}l=0;k=d;switch(a.length-e){case 2:l=a[e+1],k=b[(l&15)<<2]||d;case 1:a=a[e],c[g]=b[a>>2]+b[(a&3)<<4|l>>4]+k+d}return c.join(\"\")}\nfunction Ha(a){var b=a.length,c=3*b/4;c%3?c=Math.floor(c):-1!=\"=.\".indexOf(a[b-1])&&(c=-1!=\"=.\".indexOf(a[b-2])?c-2:c-1);var d=new Uint8Array(c),e=0;Ia(a,function(g){d[e++]=g});return d.subarray(0,e)}\nfunction Ia(a,b){function c(k){for(;d<a.length;){var l=a.charAt(d++),n=Ea[l];if(null!=n)return n;if(!/^[\\s\\xa0]*$/.test(l))throw Error(\"Unknown base64 encoding at char: \"+l);}return k}Ga();for(var d=0;;){var e=c(-1),g=c(0),f=c(64),h=c(64);if(64===h&&-1===e)break;b(e<<2|g>>4);64!=f&&(b(g<<4&240|f>>2),64!=h&&b(f<<6&192|h))}}\nfunction Ga(){if(!Ea){Ea={};for(var a=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\".split(\"\"),b=[\"+/=\",\"+/\",\"-_=\",\"-_.\",\"-_\"],c=0;5>c;c++){var d=a.concat(b[c].split(\"\"));Da[c]=d;for(var e=0;e<d.length;e++){var g=d[e];void 0===Ea[g]&&(Ea[g]=e)}}}};var Ja=\"function\"===typeof Uint8Array.prototype.slice,Ka;function La(a,b,c){return b===c?Ka||(Ka=new Uint8Array(0)):Ja?a.slice(b,c):new Uint8Array(a.subarray(b,c))}var Q=0,R=0;function Ma(a,b){b=void 0===b?{}:b;b=void 0===b.v?!1:b.v;this.h=null;this.g=this.j=this.l=0;this.m=!1;this.v=b;a&&Na(this,a)}function Na(a,b){b=b.constructor===Uint8Array?b:b.constructor===ArrayBuffer?new Uint8Array(b):b.constructor===Array?new Uint8Array(b):b.constructor===String?Ha(b):b instanceof Uint8Array?new Uint8Array(b.buffer,b.byteOffset,b.byteLength):new Uint8Array(0);a.h=b;a.l=0;a.j=a.h.length;a.g=a.l}Ma.prototype.reset=function(){this.g=this.l};\nfunction Oa(a){for(var b=128,c=0,d=0,e=0;4>e&&128<=b;e++)b=a.h[a.g++],c|=(b&127)<<7*e;128<=b&&(b=a.h[a.g++],c|=(b&127)<<28,d|=(b&127)>>4);if(128<=b)for(e=0;5>e&&128<=b;e++)b=a.h[a.g++],d|=(b&127)<<7*e+3;if(128>b){a=c>>>0;b=d>>>0;if(d=b&2147483648)a=~a+1>>>0,b=~b>>>0,0==a&&(b=b+1>>>0);a=4294967296*b+(a>>>0);return d?-a:a}a.m=!0}\nMa.prototype.i=function(){var a=this.h,b=a[this.g],c=b&127;if(128>b)return this.g+=1,c;b=a[this.g+1];c|=(b&127)<<7;if(128>b)return this.g+=2,c;b=a[this.g+2];c|=(b&127)<<14;if(128>b)return this.g+=3,c;b=a[this.g+3];c|=(b&127)<<21;if(128>b)return this.g+=4,c;b=a[this.g+4];c|=(b&15)<<28;if(128>b)return this.g+=5,c>>>0;this.g+=5;128<=a[this.g++]&&128<=a[this.g++]&&128<=a[this.g++]&&128<=a[this.g++]&&this.g++;return c};\nMa.prototype.o=function(){var a=this.h[this.g],b=this.h[this.g+1];var c=this.h[this.g+2];var d=this.h[this.g+3];this.g+=4;c=(a<<0|b<<8|c<<16|d<<24)>>>0;a=2*(c>>31)+1;b=c>>>23&255;c&=8388607;return 255==b?c?NaN:Infinity*a:0==b?a*Math.pow(2,-149)*c:a*Math.pow(2,b-150)*(c+Math.pow(2,23))};var Pa=[];function Qa(){this.g=new Uint8Array(64);this.h=0}Qa.prototype.push=function(a){if(!(this.h+1<this.g.length)){var b=this.g;this.g=new Uint8Array(Math.ceil(1+2*this.g.length));this.g.set(b)}this.g[this.h++]=a};Qa.prototype.length=function(){return this.h};Qa.prototype.end=function(){var a=this.g,b=this.h;this.h=0;return La(a,0,b)};function Ra(a,b){for(;127<b;)a.push(b&127|128),b>>>=7;a.push(b)};function Sa(a){var b={},c=void 0===b.N?!1:b.N;this.o={v:void 0===b.v?!1:b.v};this.N=c;b=this.o;Pa.length?(c=Pa.pop(),b&&(c.v=b.v),a&&Na(c,a),a=c):a=new Ma(a,b);this.g=a;this.m=this.g.g;this.h=this.i=this.l=-1;this.j=!1}Sa.prototype.reset=function(){this.g.reset();this.h=this.l=-1};function S(a){var b=a.g;(b=b.g==b.j)||(b=a.j)||(b=a.g,b=b.m||0>b.g||b.g>b.j);if(b)return!1;a.m=a.g.g;b=a.g.i();var c=b&7;if(0!=c&&5!=c&&1!=c&&2!=c&&3!=c&&4!=c)return a.j=!0,!1;a.i=b;a.l=b>>>3;a.h=c;return!0}\nfunction Ta(a){switch(a.h){case 0:if(0!=a.h)Ta(a);else{for(a=a.g;a.h[a.g]&128;)a.g++;a.g++}break;case 1:1!=a.h?Ta(a):(a=a.g,a.g+=8);break;case 2:if(2!=a.h)Ta(a);else{var b=a.g.i();a=a.g;a.g+=b}break;case 5:5!=a.h?Ta(a):(a=a.g,a.g+=4);break;case 3:b=a.l;do{if(!S(a)){a.j=!0;break}if(4==a.h){a.l!=b&&(a.j=!0);break}Ta(a)}while(1);break;default:a.j=!0}}\nfunction Ua(a,b,c){var d=a.g.j,e=a.g.i(),g=a.g.g+e;a.g.j=g;c(b,a);c=g-a.g.g;if(0!==c)throw Error(\"Message parsing ended unexpectedly. Expected to read \"+e+\" bytes, instead read \"+(e-c)+\" bytes, either the data ended unexpectedly or the message misreported its own length\");a.g.g=g;a.g.j=d;return b}function T(a){return a.g.o()}\nfunction Va(a){var b=a.g.i();a=a.g;var c=a.g;a.g+=b;a=a.h;var d;if(za)(d=ya)||(d=ya=new TextDecoder(\"utf-8\",{fatal:!1})),d=d.decode(a.subarray(c,c+b));else{b=c+b;for(var e=[],g=null,f,h,k;c<b;)f=a[c++],128>f?e.push(f):224>f?c>=b?e.push(65533):(h=a[c++],194>f||128!==(h&192)?(c--,e.push(65533)):e.push((f&31)<<6|h&63)):240>f?c>=b-1?e.push(65533):(h=a[c++],128!==(h&192)||224===f&&160>h||237===f&&160<=h||128!==((d=a[c++])&192)?(c--,e.push(65533)):e.push((f&15)<<12|(h&63)<<6|d&63)):244>=f?c>=b-2?e.push(65533):\n(h=a[c++],128!==(h&192)||0!==(f<<28)+(h-144)>>30||128!==((d=a[c++])&192)||128!==((k=a[c++])&192)?(c--,e.push(65533)):(f=(f&7)<<18|(h&63)<<12|(d&63)<<6|k&63,f-=65536,e.push((f>>10&1023)+55296,(f&1023)+56320))):e.push(65533),8192<=e.length&&(g=xa(g,e),e.length=0);d=xa(g,e)}return d}function Wa(a,b,c){var d=a.g.i();for(d=a.g.g+d;a.g.g<d;)c.push(b.call(a.g))}function Xa(a,b){2==a.h?Wa(a,Ma.prototype.o,b):b.push(T(a))};function Ya(){this.h=[];this.i=0;this.g=new Qa}function Za(a,b){0!==b.length&&(a.h.push(b),a.i+=b.length)}function $a(a){var b=a.i+a.g.length();if(0===b)return new Uint8Array(0);b=new Uint8Array(b);for(var c=a.h,d=c.length,e=0,g=0;g<d;g++){var f=c[g];0!==f.length&&(b.set(f,e),e+=f.length)}c=a.g;d=c.h;0!==d&&(b.set(c.g.subarray(0,d),e),c.h=0);a.h=[b];return b}\nfunction U(a,b,c){if(null!=c){Ra(a.g,8*b+5);a=a.g;var d=c;d=(c=0>d?1:0)?-d:d;0===d?0<1/d?Q=R=0:(R=0,Q=2147483648):isNaN(d)?(R=0,Q=2147483647):3.4028234663852886E38<d?(R=0,Q=(c<<31|2139095040)>>>0):1.1754943508222875E-38>d?(d=Math.round(d/Math.pow(2,-149)),R=0,Q=(c<<31|d)>>>0):(b=Math.floor(Math.log(d)/Math.LN2),d*=Math.pow(2,-b),d=Math.round(8388608*d),16777216<=d&&++b,R=0,Q=(c<<31|b+127<<23|d&8388607)>>>0);c=Q;a.push(c>>>0&255);a.push(c>>>8&255);a.push(c>>>16&255);a.push(c>>>24&255)}};var ab=\"function\"===typeof Uint8Array;function bb(a,b,c){if(null!=a)return\"object\"===typeof a?ab&&a instanceof Uint8Array?c(a):cb(a,b,c):b(a)}function cb(a,b,c){if(Array.isArray(a)){for(var d=Array(a.length),e=0;e<a.length;e++)d[e]=bb(a[e],b,c);Array.isArray(a)&&a.W&&db(d);return d}d={};for(e in a)d[e]=bb(a[e],b,c);return d}function eb(a){return\"number\"===typeof a?isFinite(a)?a:String(a):a}var fb={W:{value:!0,configurable:!0}};\nfunction db(a){Array.isArray(a)&&!Object.isFrozen(a)&&Object.defineProperties(a,fb);return a};var gb;function V(a,b,c){var d=gb;gb=null;a||(a=d);d=this.constructor.ca;a||(a=d?[d]:[]);this.j=d?0:-1;this.m=this.g=null;this.h=a;a:{d=this.h.length;a=d-1;if(d&&(d=this.h[a],!(null===d||\"object\"!=typeof d||Array.isArray(d)||ab&&d instanceof Uint8Array))){this.l=a-this.j;this.i=d;break a}void 0!==b&&-1<b?(this.l=Math.max(b,a+1-this.j),this.i=null):this.l=Number.MAX_VALUE}if(c)for(b=0;b<c.length;b++)a=c[b],a<this.l?(a+=this.j,(d=this.h[a])?db(d):this.h[a]=hb):(ib(this),(d=this.i[a])?db(d):this.i[a]=hb)}\nvar hb=Object.freeze(db([]));function ib(a){var b=a.l+a.j;a.h[b]||(a.i=a.h[b]={})}function W(a,b,c){return-1===b?null:(void 0===c?0:c)||b>=a.l?a.i?a.i[b]:void 0:a.h[b+a.j]}function jb(a,b){var c=void 0===c?!1:c;var d=W(a,b,c);null==d&&(d=hb);d===hb&&(d=db([]),X(a,b,d,c));return d}function kb(a){var b=jb(a,3);a.m||(a.m={});if(!a.m[3]){for(var c=0;c<b.length;c++)b[c]=+b[c];a.m[3]=!0}return b}function lb(a,b,c){a=W(a,b);return null==a?c:a}\nfunction Y(a,b,c){a=W(a,b);a=null==a?a:+a;return null==a?void 0===c?0:c:a}function X(a,b,c,d){(void 0===d?0:d)||b>=a.l?(ib(a),a.i[b]=c):a.h[b+a.j]=c}function mb(a,b,c){if(-1===c)return null;a.g||(a.g={});if(!a.g[c]){var d=W(a,c,!1);d&&(a.g[c]=new b(d))}return a.g[c]}function nb(a,b){a.g||(a.g={});var c=a.g[1];if(!c){var d=jb(a,1);c=[];for(var e=0;e<d.length;e++)c[e]=new b(d[e]);a.g[1]=c}return c}function ob(a,b,c){var d=void 0===d?!1:d;a.g||(a.g={});var e=c?pb(c,!1):c;a.g[b]=c;X(a,b,e,d)}\nfunction qb(a,b,c,d){var e=nb(a,c);b=b?b:new c;a=jb(a,1);void 0!=d?(e.splice(d,0,b),a.splice(d,0,pb(b,!1))):(e.push(b),a.push(pb(b,!1)))}V.prototype.toJSON=function(){var a=pb(this,!1);return cb(a,eb,Fa)};function pb(a,b){if(a.g)for(var c in a.g){var d=a.g[c];if(Array.isArray(d))for(var e=0;e<d.length;e++)d[e]&&pb(d[e],b);else d&&pb(d,b)}return a.h}V.prototype.toString=function(){return pb(this,!1).toString()};function rb(a,b){if(a=a.o){Za(b,b.g.end());for(var c=0;c<a.length;c++)Za(b,a[c])}}function sb(a,b){if(4==b.h)return!1;var c=b.m;Ta(b);b.N||(b=La(b.g.h,c,b.g.g),(c=a.o)?c.push(b):a.o=[b]);return!0};function tb(a){V.call(this,a,-1,ub)}M(tb,V);tb.prototype.getRows=function(){return W(this,1)};tb.prototype.getCols=function(){return W(this,2)};tb.prototype.getPackedDataList=function(){return kb(this)};tb.prototype.getLayout=function(){return lb(this,4,0)};function vb(a,b){for(;S(b);)switch(b.i){case 8:var c=b.g.i();X(a,1,c);break;case 16:c=b.g.i();X(a,2,c);break;case 29:case 26:Xa(b,a.getPackedDataList());break;case 32:c=Oa(b.g);X(a,4,c);break;default:if(!sb(a,b))return a}return a}var ub=[3];function Z(a,b){var c=void 0;return new (c||(c=Promise))(function(d,e){function g(k){try{h(b.next(k))}catch(l){e(l)}}function f(k){try{h(b[\"throw\"](k))}catch(l){e(l)}}function h(k){k.done?d(k.value):(new c(function(l){l(k.value)})).then(g,f)}h((b=b.apply(a,void 0)).next())})};function wb(a){V.call(this,a)}M(wb,V);function xb(a,b){for(;S(b);)switch(b.i){case 8:var c=b.g.i();X(a,1,c);break;case 21:c=T(b);X(a,2,c);break;case 26:c=Va(b);X(a,3,c);break;case 34:c=Va(b);X(a,4,c);break;default:if(!sb(a,b))return a}return a};function yb(a){V.call(this,a,-1,zb)}M(yb,V);yb.prototype.addClassification=function(a,b){qb(this,a,wb,b);return this};var zb=[1];function Ab(a){V.call(this,a)}M(Ab,V);function Bb(a,b){for(;S(b);)switch(b.i){case 13:var c=T(b);X(a,1,c);break;case 21:c=T(b);X(a,2,c);break;case 29:c=T(b);X(a,3,c);break;case 37:c=T(b);X(a,4,c);break;case 45:c=T(b);X(a,5,c);break;default:if(!sb(a,b))return a}return a};function Cb(a){V.call(this,a,-1,Db)}M(Cb,V);function Eb(a){a:{var b=new Cb;for(a=new Sa(a);S(a);)switch(a.i){case 10:var c=Ua(a,new Ab,Bb);qb(b,c,Ab,void 0);break;default:if(!sb(b,a))break a}}return b}var Db=[1];function Fb(a){V.call(this,a)}M(Fb,V);function Gb(a){V.call(this,a,-1,Hb)}M(Gb,V);Gb.prototype.getVertexType=function(){return lb(this,1,0)};Gb.prototype.getPrimitiveType=function(){return lb(this,2,0)};Gb.prototype.getVertexBufferList=function(){return kb(this)};Gb.prototype.getIndexBufferList=function(){return jb(this,4)};\nfunction Ib(a,b){for(;S(b);)switch(b.i){case 8:var c=Oa(b.g);X(a,1,c);break;case 16:c=Oa(b.g);X(a,2,c);break;case 29:case 26:Xa(b,a.getVertexBufferList());break;case 32:case 34:c=b;var d=a.getIndexBufferList();2==c.h?Wa(c,Ma.prototype.i,d):d.push(c.g.i());break;default:if(!sb(a,b))return a}return a}var Hb=[3,4];function Jb(a){V.call(this,a)}M(Jb,V);Jb.prototype.getMesh=function(){return mb(this,Gb,1)};Jb.prototype.getPoseTransformMatrix=function(){return mb(this,tb,2)};function Kb(a){a:{var b=new Jb;for(a=new Sa(a);S(a);)switch(a.i){case 10:var c=Ua(a,new Gb,Ib);ob(b,1,c);break;case 18:c=Ua(a,new tb,vb);ob(b,2,c);break;default:if(!sb(b,a))break a}}return b};function Lb(a,b,c){c=a.createShader(0===c?a.VERTEX_SHADER:a.FRAGMENT_SHADER);a.shaderSource(c,b);a.compileShader(c);if(!a.getShaderParameter(c,a.COMPILE_STATUS))throw Error(\"Could not compile WebGL shader.\\n\\n\"+a.getShaderInfoLog(c));return c};function Mb(a){return nb(a,wb).map(function(b){return{index:lb(b,1,0),Y:Y(b,2),label:null!=W(b,3)?lb(b,3,\"\"):void 0,displayName:null!=W(b,4)?lb(b,4,\"\"):void 0}})};function Nb(a){return{x:Y(a,1),y:Y(a,2),z:Y(a,3),visibility:null!=W(a,4)?Y(a,4):void 0}};function Ob(a,b){this.h=a;this.g=b;this.l=0}\nfunction Pb(a,b,c){Qb(a,b);if(\"function\"===typeof a.g.canvas.transferToImageBitmap)return Promise.resolve(a.g.canvas.transferToImageBitmap());if(c)return Promise.resolve(a.g.canvas);if(\"function\"===typeof createImageBitmap)return createImageBitmap(a.g.canvas);void 0===a.i&&(a.i=document.createElement(\"canvas\"));return new Promise(function(d){a.i.height=a.g.canvas.height;a.i.width=a.g.canvas.width;a.i.getContext(\"2d\",{}).drawImage(a.g.canvas,0,0,a.g.canvas.width,a.g.canvas.height);d(a.i)})}\nfunction Qb(a,b){var c=a.g;if(void 0===a.m){var d=Lb(c,\"\\n  attribute vec2 aVertex;\\n  attribute vec2 aTex;\\n  varying vec2 vTex;\\n  void main(void) {\\n    gl_Position = vec4(aVertex, 0.0, 1.0);\\n    vTex = aTex;\\n  }\",0),e=Lb(c,\"\\n  precision mediump float;\\n  varying vec2 vTex;\\n  uniform sampler2D sampler0;\\n  void main(){\\n    gl_FragColor = texture2D(sampler0, vTex);\\n  }\",1),g=c.createProgram();c.attachShader(g,d);c.attachShader(g,e);c.linkProgram(g);if(!c.getProgramParameter(g,c.LINK_STATUS))throw Error(\"Could not compile WebGL program.\\n\\n\"+\nc.getProgramInfoLog(g));d=a.m=g;c.useProgram(d);e=c.getUniformLocation(d,\"sampler0\");a.j={I:c.getAttribLocation(d,\"aVertex\"),H:c.getAttribLocation(d,\"aTex\"),da:e};a.s=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,a.s);c.enableVertexAttribArray(a.j.I);c.vertexAttribPointer(a.j.I,2,c.FLOAT,!1,0,0);c.bufferData(c.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),c.STATIC_DRAW);c.bindBuffer(c.ARRAY_BUFFER,null);a.o=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,a.o);c.enableVertexAttribArray(a.j.H);c.vertexAttribPointer(a.j.H,\n2,c.FLOAT,!1,0,0);c.bufferData(c.ARRAY_BUFFER,new Float32Array([0,1,0,0,1,0,1,1]),c.STATIC_DRAW);c.bindBuffer(c.ARRAY_BUFFER,null);c.uniform1i(e,0)}d=a.j;c.useProgram(a.m);c.canvas.width=b.width;c.canvas.height=b.height;c.viewport(0,0,b.width,b.height);c.activeTexture(c.TEXTURE0);a.h.bindTexture2d(b.glName);c.enableVertexAttribArray(d.I);c.bindBuffer(c.ARRAY_BUFFER,a.s);c.vertexAttribPointer(d.I,2,c.FLOAT,!1,0,0);c.enableVertexAttribArray(d.H);c.bindBuffer(c.ARRAY_BUFFER,a.o);c.vertexAttribPointer(d.H,\n2,c.FLOAT,!1,0,0);c.bindFramebuffer(c.DRAW_FRAMEBUFFER?c.DRAW_FRAMEBUFFER:c.FRAMEBUFFER,null);c.clearColor(0,0,0,0);c.clear(c.COLOR_BUFFER_BIT);c.colorMask(!0,!0,!0,!0);c.drawArrays(c.TRIANGLE_FAN,0,4);c.disableVertexAttribArray(d.I);c.disableVertexAttribArray(d.H);c.bindBuffer(c.ARRAY_BUFFER,null);a.h.bindTexture2d(0)}function Rb(a){this.g=a};var Sb=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]);function Tb(a,b){return b+a}function Ub(a,b){window[a]=b}function Vb(a){var b=document.createElement(\"script\");b.setAttribute(\"src\",a);b.setAttribute(\"crossorigin\",\"anonymous\");return new Promise(function(c){b.addEventListener(\"load\",function(){c()},!1);b.addEventListener(\"error\",function(){c()},!1);document.body.appendChild(b)})}\nfunction Wb(){return Z(this,function b(){return O(b,function(c){switch(c.g){case 1:return c.m=2,N(c,WebAssembly.instantiate(Sb),4);case 4:c.g=3;c.m=0;break;case 2:return c.m=0,c.j=null,c.return(!1);case 3:return c.return(!0)}})})}\nfunction Xb(a){this.g=a;this.listeners={};this.j={};this.F={};this.m={};this.s={};this.G=this.o=this.R=!0;this.C=Promise.resolve();this.P=\"\";this.B={};this.locateFile=a&&a.locateFile||Tb;if(\"object\"===typeof window)var b=window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf(\"/\"))+\"/\";else if(\"undefined\"!==typeof location)b=location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf(\"/\"))+\"/\";else throw Error(\"solutions can only be loaded on a web page or in a web worker\");\nthis.S=b;if(a.options){b=K(Object.keys(a.options));for(var c=b.next();!c.done;c=b.next()){c=c.value;var d=a.options[c].default;void 0!==d&&(this.j[c]=\"function\"===typeof d?d():d)}}}v=Xb.prototype;v.close=function(){this.i&&this.i.delete();return Promise.resolve()};function Yb(a,b){return void 0===a.g.files?[]:\"function\"===typeof a.g.files?a.g.files(b):a.g.files}\nfunction Zb(a){return Z(a,function c(){var d=this,e,g,f,h,k,l,n,u,w,r,y;return O(c,function(m){switch(m.g){case 1:e=d;if(!d.R)return m.return();g=Yb(d,d.j);return N(m,Wb(),2);case 2:f=m.h;if(\"object\"===typeof window)return Ub(\"createMediapipeSolutionsWasm\",{locateFile:d.locateFile}),Ub(\"createMediapipeSolutionsPackedAssets\",{locateFile:d.locateFile}),l=g.filter(function(t){return void 0!==t.data}),n=g.filter(function(t){return void 0===t.data}),u=Promise.all(l.map(function(t){var x=$b(e,t.url);if(void 0!==\nt.path){var z=t.path;x=x.then(function(E){e.overrideFile(z,E);return Promise.resolve(E)})}return x})),w=Promise.all(n.map(function(t){return void 0===t.simd||t.simd&&f||!t.simd&&!f?Vb(e.locateFile(t.url,e.S)):Promise.resolve()})).then(function(){return Z(e,function x(){var z,E,F=this;return O(x,function(I){if(1==I.g)return z=window.createMediapipeSolutionsWasm,E=window.createMediapipeSolutionsPackedAssets,N(I,z(E),2);F.h=I.h;I.g=0})})}),r=function(){return Z(e,function x(){var z=this;return O(x,function(E){z.g.graph&&\nz.g.graph.url?E=N(E,$b(z,z.g.graph.url),0):(E.g=0,E=void 0);return E})})}(),N(m,Promise.all([w,u,r]),7);if(\"function\"!==typeof importScripts)throw Error(\"solutions can only be loaded on a web page or in a web worker\");h=g.filter(function(t){return void 0===t.simd||t.simd&&f||!t.simd&&!f}).map(function(t){return e.locateFile(t.url,e.S)});importScripts.apply(null,L(h));return N(m,createMediapipeSolutionsWasm(Module),6);case 6:d.h=m.h;d.l=new OffscreenCanvas(1,1);d.h.canvas=d.l;k=d.h.GL.createContext(d.l,\n{antialias:!1,alpha:!1,ba:\"undefined\"!==typeof WebGL2RenderingContext?2:1});d.h.GL.makeContextCurrent(k);m.g=4;break;case 7:d.l=document.createElement(\"canvas\");y=d.l.getContext(\"webgl2\",{});if(!y&&(y=d.l.getContext(\"webgl\",{}),!y))return alert(\"Failed to create WebGL canvas context when passing video frame.\"),m.return();d.D=y;d.h.canvas=d.l;d.h.createContext(d.l,!0,!0,{});case 4:d.i=new d.h.SolutionWasm,d.R=!1,m.g=0}})})}\nfunction ac(a){return Z(a,function c(){var d=this,e,g,f,h,k,l,n,u;return O(c,function(w){if(1==w.g){if(d.g.graph&&d.g.graph.url&&d.P===d.g.graph.url)return w.return();d.o=!0;if(!d.g.graph||!d.g.graph.url){w.g=2;return}d.P=d.g.graph.url;return N(w,$b(d,d.g.graph.url),3)}2!=w.g&&(e=w.h,d.i.loadGraph(e));g=K(Object.keys(d.B));for(f=g.next();!f.done;f=g.next())h=f.value,d.i.overrideFile(h,d.B[h]);d.B={};if(d.g.listeners)for(k=K(d.g.listeners),l=k.next();!l.done;l=k.next())n=l.value,bc(d,n);u=d.j;d.j=\n{};d.setOptions(u);w.g=0})})}v.reset=function(){return Z(this,function b(){var c=this;return O(b,function(d){c.i&&(c.i.reset(),c.m={},c.s={});d.g=0})})};\nv.setOptions=function(a,b){var c=this;if(b=b||this.g.options){for(var d=[],e=[],g={},f=K(Object.keys(a)),h=f.next();!h.done;g={K:g.K,L:g.L},h=f.next()){var k=h.value;k in this.j&&this.j[k]===a[k]||(this.j[k]=a[k],h=b[k],void 0!==h&&(h.onChange&&(g.K=h.onChange,g.L=a[k],d.push(function(l){return function(){return Z(c,function u(){var w,r=this;return O(u,function(y){if(1==y.g)return N(y,l.K(l.L),2);w=y.h;!0===w&&(r.o=!0);y.g=0})})}}(g))),h.graphOptionXref&&(k={valueNumber:1===h.type?a[k]:0,valueBoolean:0===\nh.type?a[k]:!1,valueString:2===h.type?a[k]:\"\"},h=Object.assign(Object.assign(Object.assign({},{calculatorName:\"\",calculatorIndex:0}),h.graphOptionXref),k),e.push(h))))}if(0!==d.length||0!==e.length)this.o=!0,this.A=(void 0===this.A?[]:this.A).concat(e),this.u=(void 0===this.u?[]:this.u).concat(d)}};\nfunction cc(a){return Z(a,function c(){var d=this,e,g,f,h,k,l,n;return O(c,function(u){switch(u.g){case 1:if(!d.o)return u.return();if(!d.u){u.g=2;break}e=K(d.u);g=e.next();case 3:if(g.done){u.g=5;break}f=g.value;return N(u,f(),4);case 4:g=e.next();u.g=3;break;case 5:d.u=void 0;case 2:if(d.A){h=new d.h.GraphOptionChangeRequestList;k=K(d.A);for(l=k.next();!l.done;l=k.next())n=l.value,h.push_back(n);d.i.changeOptions(h);h.delete();d.A=void 0}d.o=!1;u.g=0}})})}\nv.initialize=function(){return Z(this,function b(){var c=this;return O(b,function(d){return 1==d.g?N(d,Zb(c),2):3!=d.g?N(d,ac(c),3):N(d,cc(c),0)})})};function $b(a,b){return Z(a,function d(){var e=this,g,f;return O(d,function(h){if(b in e.F)return h.return(e.F[b]);g=e.locateFile(b,\"\");f=fetch(g).then(function(k){return k.arrayBuffer()});e.F[b]=f;return h.return(f)})})}v.overrideFile=function(a,b){this.i?this.i.overrideFile(a,b):this.B[a]=b};v.clearOverriddenFiles=function(){this.B={};this.i&&this.i.clearOverriddenFiles()};\nv.send=function(a,b){return Z(this,function d(){var e=this,g,f,h,k,l,n,u,w,r;return O(d,function(y){switch(y.g){case 1:if(!e.g.inputs)return y.return();g=1E3*(void 0===b||null===b?performance.now():b);return N(y,e.C,2);case 2:return N(y,e.initialize(),3);case 3:f=new e.h.PacketDataList;h=K(Object.keys(a));for(k=h.next();!k.done;k=h.next())if(l=k.value,n=e.g.inputs[l]){a:{var m=e;var t=a[l];switch(n.type){case \"video\":var x=m.m[n.stream];x||(x=new Ob(m.h,m.D),m.m[n.stream]=x);m=x;0===m.l&&(m.l=m.h.createTexture());\nif(\"undefined\"!==typeof HTMLVideoElement&&t instanceof HTMLVideoElement){var z=t.videoWidth;x=t.videoHeight}else\"undefined\"!==typeof HTMLImageElement&&t instanceof HTMLImageElement?(z=t.naturalWidth,x=t.naturalHeight):(z=t.width,x=t.height);x={glName:m.l,width:z,height:x};z=m.g;z.canvas.width=x.width;z.canvas.height=x.height;z.activeTexture(z.TEXTURE0);m.h.bindTexture2d(m.l);z.texImage2D(z.TEXTURE_2D,0,z.RGBA,z.RGBA,z.UNSIGNED_BYTE,t);m.h.bindTexture2d(0);m=x;break a;case \"detections\":x=m.m[n.stream];\nx||(x=new Rb(m.h),m.m[n.stream]=x);m=x;m.data||(m.data=new m.g.DetectionListData);m.data.reset(t.length);for(x=0;x<t.length;++x){z=t[x];var E=m.data,F=E.setBoundingBox,I=x;var H=z.T;var p=new Fb;X(p,1,H.Z);X(p,2,H.$);X(p,3,H.height);X(p,4,H.width);X(p,5,H.rotation);X(p,6,H.X);var A=H=new Ya;U(A,1,W(p,1));U(A,2,W(p,2));U(A,3,W(p,3));U(A,4,W(p,4));U(A,5,W(p,5));var C=W(p,6);if(null!=C&&null!=C){Ra(A.g,48);var q=A.g,B=C;C=0>B;B=Math.abs(B);var D=B>>>0;B=Math.floor((B-D)/4294967296);B>>>=0;C&&(B=~B>>>\n0,D=(~D>>>0)+1,4294967295<D&&(D=0,B++,4294967295<B&&(B=0)));Q=D;R=B;C=Q;for(D=R;0<D||127<C;)q.push(C&127|128),C=(C>>>7|D<<25)>>>0,D>>>=7;q.push(C)}rb(p,A);H=$a(H);F.call(E,I,H);if(z.O)for(E=0;E<z.O.length;++E)p=z.O[E],A=p.visibility?!0:!1,F=m.data,I=F.addNormalizedLandmark,H=x,p=Object.assign(Object.assign({},p),{visibility:A?p.visibility:0}),A=new Ab,X(A,1,p.x),X(A,2,p.y),X(A,3,p.z),p.visibility&&X(A,4,p.visibility),q=p=new Ya,U(q,1,W(A,1)),U(q,2,W(A,2)),U(q,3,W(A,3)),U(q,4,W(A,4)),U(q,5,W(A,5)),\nrb(A,q),p=$a(p),I.call(F,H,p);if(z.M)for(E=0;E<z.M.length;++E){F=m.data;I=F.addClassification;H=x;p=z.M[E];A=new wb;X(A,2,p.Y);p.index&&X(A,1,p.index);p.label&&X(A,3,p.label);p.displayName&&X(A,4,p.displayName);q=p=new Ya;D=W(A,1);if(null!=D&&null!=D)if(Ra(q.g,8),C=q.g,0<=D)Ra(C,D);else{for(B=0;9>B;B++)C.push(D&127|128),D>>=7;C.push(1)}U(q,2,W(A,2));C=W(A,3);null!=C&&(C=Ca(C),Ra(q.g,26),Ra(q.g,C.length),Za(q,q.g.end()),Za(q,C));C=W(A,4);null!=C&&(C=Ca(C),Ra(q.g,34),Ra(q.g,C.length),Za(q,q.g.end()),\nZa(q,C));rb(A,q);p=$a(p);I.call(F,H,p)}}m=m.data;break a;default:m={}}}u=m;w=n.stream;switch(n.type){case \"video\":f.pushTexture2d(Object.assign(Object.assign({},u),{stream:w,timestamp:g}));break;case \"detections\":r=u;r.stream=w;r.timestamp=g;f.pushDetectionList(r);break;default:throw Error(\"Unknown input config type: '\"+n.type+\"'\");}}e.i.send(f);return N(y,e.C,4);case 4:f.delete(),y.g=0}})})};\nfunction dc(a,b,c){return Z(a,function e(){var g,f,h,k,l,n,u=this,w,r,y,m,t,x,z,E;return O(e,function(F){switch(F.g){case 1:if(!c)return F.return(b);g={};f=0;h=K(Object.keys(c));for(k=h.next();!k.done;k=h.next())l=k.value,n=c[l],\"string\"!==typeof n&&\"texture\"===n.type&&void 0!==b[n.stream]&&++f;1<f&&(u.G=!1);w=K(Object.keys(c));k=w.next();case 2:if(k.done){F.g=4;break}r=k.value;y=c[r];if(\"string\"===typeof y)return z=g,E=r,N(F,ec(u,r,b[y]),14);m=b[y.stream];if(\"detection_list\"===y.type){if(m){var I=\nm.getRectList();for(var H=m.getLandmarksList(),p=m.getClassificationsList(),A=[],C=0;C<I.size();++C){var q=I.get(C);a:{var B=new Fb;for(q=new Sa(q);S(q);)switch(q.i){case 13:var D=T(q);X(B,1,D);break;case 21:D=T(q);X(B,2,D);break;case 29:D=T(q);X(B,3,D);break;case 37:D=T(q);X(B,4,D);break;case 45:D=T(q);X(B,5,D);break;case 48:D=Oa(q.g);X(B,6,D);break;default:if(!sb(B,q))break a}}B={Z:Y(B,1),$:Y(B,2),height:Y(B,3),width:Y(B,4),rotation:Y(B,5,0),X:lb(B,6,0)};q=nb(Eb(H.get(C)),Ab).map(Nb);var la=p.get(C);\na:for(D=new yb,la=new Sa(la);S(la);)switch(la.i){case 10:D.addClassification(Ua(la,new wb,xb));break;default:if(!sb(D,la))break a}B={T:B,O:q,M:Mb(D)};A.push(B)}I=A}else I=[];g[r]=I;F.g=7;break}if(\"proto_list\"===y.type){if(m){I=Array(m.size());for(H=0;H<m.size();H++)I[H]=m.get(H);m.delete()}else I=[];g[r]=I;F.g=7;break}if(void 0===m){F.g=3;break}if(\"float_list\"===y.type){g[r]=m;F.g=7;break}if(\"proto\"===y.type){g[r]=m;F.g=7;break}if(\"texture\"!==y.type)throw Error(\"Unknown output config type: '\"+y.type+\n\"'\");t=u.s[r];t||(t=new Ob(u.h,u.D),u.s[r]=t);return N(F,Pb(t,m,u.G),13);case 13:x=F.h,g[r]=x;case 7:y.transform&&g[r]&&(g[r]=y.transform(g[r]));F.g=3;break;case 14:z[E]=F.h;case 3:k=w.next();F.g=2;break;case 4:return F.return(g)}})})}\nfunction ec(a,b,c){return Z(a,function e(){var g=this,f;return O(e,function(h){return\"number\"===typeof c||c instanceof Uint8Array||c instanceof g.h.Uint8BlobList?h.return(c):c instanceof g.h.Texture2dDataOut?(f=g.s[b],f||(f=new Ob(g.h,g.D),g.s[b]=f),h.return(Pb(f,c,g.G))):h.return(void 0)})})}\nfunction bc(a,b){for(var c=b.name||\"$\",d=[].concat(L(b.wants)),e=new a.h.StringList,g=K(b.wants),f=g.next();!f.done;f=g.next())e.push_back(f.value);g=a.h.PacketListener.implement({onResults:function(h){for(var k={},l=0;l<b.wants.length;++l)k[d[l]]=h.get(l);var n=a.listeners[c];n&&(a.C=dc(a,k,b.outs).then(function(u){u=n(u);for(var w=0;w<b.wants.length;++w){var r=k[d[w]];\"object\"===typeof r&&r.hasOwnProperty&&r.hasOwnProperty(\"delete\")&&r.delete()}u&&(a.C=u)}))}});a.i.attachMultiListener(e,g);e.delete()}\nv.onResults=function(a,b){this.listeners[b||\"$\"]=a};P(\"Solution\",Xb);P(\"OptionType\",{BOOL:0,NUMBER:1,aa:2,0:\"BOOL\",1:\"NUMBER\",2:\"STRING\"});function fc(a){a=Kb(a);var b=a.getMesh();if(!b)return a;var c=new Float32Array(b.getVertexBufferList());b.getVertexBufferList=function(){return c};var d=new Uint32Array(b.getIndexBufferList());b.getIndexBufferList=function(){return d};return a};var gc={files:[{url:\"face_mesh_solution_packed_assets_loader.js\"},{simd:!0,url:\"face_mesh_solution_simd_wasm_bin.js\"},{simd:!1,url:\"face_mesh_solution_wasm_bin.js\"}],graph:{url:\"face_mesh.binarypb\"},listeners:[{wants:[\"multi_face_geometry\",\"image_transformed\",\"multi_face_landmarks\"],outs:{image:\"image_transformed\",multiFaceGeometry:{type:\"proto_list\",stream:\"multi_face_geometry\",transform:function(a){return a.map(fc)}},multiFaceLandmarks:{type:\"proto_list\",stream:\"multi_face_landmarks\",transform:function(a){return a.map(function(b){return nb(Eb(b),\nAb).map(Nb)})}}}}],inputs:{image:{type:\"video\",stream:\"input_frames_gpu\"}},options:{useCpuInference:{type:0,graphOptionXref:{calculatorType:\"InferenceCalculator\",fieldName:\"use_cpu_inference\"},default:\"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod\".split(\";\").includes(navigator.platform)||navigator.userAgent.includes(\"Mac\")&&\"ontouchend\"in document},enableFaceGeometry:{type:0,graphOptionXref:{calculatorName:\"EnableFaceGeometryConstant\",calculatorType:\"ConstantSidePacketCalculator\",\nfieldName:\"bool_value\"}},selfieMode:{type:0,graphOptionXref:{calculatorType:\"GlScalerCalculator\",calculatorIndex:1,fieldName:\"flip_horizontal\"}},maxNumFaces:{type:1,graphOptionXref:{calculatorType:\"ConstantSidePacketCalculator\",calculatorName:\"ConstantSidePacketCalculatorNumFaces\",fieldName:\"int_value\"}},refineLandmarks:{type:0,graphOptionXref:{calculatorType:\"ConstantSidePacketCalculator\",calculatorName:\"ConstantSidePacketCalculatorRefineLandmarks\",fieldName:\"bool_value\"}},minDetectionConfidence:{type:1,\ngraphOptionXref:{calculatorType:\"TensorsToDetectionsCalculator\",calculatorName:\"facelandmarkfrontgpu__facedetectionshortrangegpu__facedetectionshortrangecommon__TensorsToDetectionsCalculator\",fieldName:\"min_score_thresh\"}},minTrackingConfidence:{type:1,graphOptionXref:{calculatorType:\"ThresholdingCalculator\",calculatorName:\"facelandmarkfrontgpu__facelandmarkgpu__ThresholdingCalculator\",fieldName:\"threshold\"}},cameraNear:{type:1,graphOptionXref:{calculatorType:\"FaceGeometryEnvGeneratorCalculator\",\nfieldName:\"near\"}},cameraFar:{type:1,graphOptionXref:{calculatorType:\"FaceGeometryEnvGeneratorCalculator\",fieldName:\"far\"}},cameraVerticalFovDegrees:{type:1,graphOptionXref:{calculatorType:\"FaceGeometryEnvGeneratorCalculator\",fieldName:\"vertical_fov_degrees\"}}}};var hc=[[61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]],ic=[[263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,\n385],[385,384],[384,398],[398,362]],jc=[[276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]],kc=[[33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]],lc=[[46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]],mc=[[10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],\n[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]],nc=[].concat(L(hc),L(ic),L(jc),L(kc),L(lc),L(mc));function oc(a){a=a||{};a=Object.assign(Object.assign({},gc),a);this.g=new Xb(a)}v=oc.prototype;v.close=function(){this.g.close();return Promise.resolve()};v.onResults=function(a){this.g.onResults(a)};v.initialize=function(){return Z(this,function b(){var c=this;return O(b,function(d){return N(d,c.g.initialize(),0)})})};v.reset=function(){this.g.reset()};v.send=function(a){return Z(this,function c(){var d=this;return O(c,function(e){return N(e,d.g.send(a),0)})})};v.setOptions=function(a){this.g.setOptions(a)};\nP(\"FACE_GEOMETRY\",{Layout:{COLUMN_MAJOR:0,ROW_MAJOR:1,0:\"COLUMN_MAJOR\",1:\"ROW_MAJOR\"},PrimitiveType:{TRIANGLE:0,0:\"TRIANGLE\"},VertexType:{VERTEX_PT:0,0:\"VERTEX_PT\"},DEFAULT_CAMERA_PARAMS:{verticalFovDegrees:63,near:1,far:1E4}});P(\"FaceMesh\",oc);P(\"FACEMESH_LIPS\",hc);P(\"FACEMESH_LEFT_EYE\",ic);P(\"FACEMESH_LEFT_EYEBROW\",jc);P(\"FACEMESH_LEFT_IRIS\",[[474,475],[475,476],[476,477],[477,474]]);P(\"FACEMESH_RIGHT_EYE\",kc);P(\"FACEMESH_RIGHT_EYEBROW\",lc);\nP(\"FACEMESH_RIGHT_IRIS\",[[469,470],[470,471],[471,472],[472,469]]);P(\"FACEMESH_FACE_OVAL\",mc);P(\"FACEMESH_CONTOURS\",nc);\nP(\"FACEMESH_TESSELATION\",[[127,34],[34,139],[139,127],[11,0],[0,37],[37,11],[232,231],[231,120],[120,232],[72,37],[37,39],[39,72],[128,121],[121,47],[47,128],[232,121],[121,128],[128,232],[104,69],[69,67],[67,104],[175,171],[171,148],[148,175],[118,50],[50,101],[101,118],[73,39],[39,40],[40,73],[9,151],[151,108],[108,9],[48,115],[115,131],[131,48],[194,204],[204,211],[211,194],[74,40],[40,185],[185,74],[80,42],[42,183],[183,80],[40,92],[92,186],[186,40],[230,229],[229,118],[118,230],[202,212],[212,\n214],[214,202],[83,18],[18,17],[17,83],[76,61],[61,146],[146,76],[160,29],[29,30],[30,160],[56,157],[157,173],[173,56],[106,204],[204,194],[194,106],[135,214],[214,192],[192,135],[203,165],[165,98],[98,203],[21,71],[71,68],[68,21],[51,45],[45,4],[4,51],[144,24],[24,23],[23,144],[77,146],[146,91],[91,77],[205,50],[50,187],[187,205],[201,200],[200,18],[18,201],[91,106],[106,182],[182,91],[90,91],[91,181],[181,90],[85,84],[84,17],[17,85],[206,203],[203,36],[36,206],[148,171],[171,140],[140,148],[92,\n40],[40,39],[39,92],[193,189],[189,244],[244,193],[159,158],[158,28],[28,159],[247,246],[246,161],[161,247],[236,3],[3,196],[196,236],[54,68],[68,104],[104,54],[193,168],[168,8],[8,193],[117,228],[228,31],[31,117],[189,193],[193,55],[55,189],[98,97],[97,99],[99,98],[126,47],[47,100],[100,126],[166,79],[79,218],[218,166],[155,154],[154,26],[26,155],[209,49],[49,131],[131,209],[135,136],[136,150],[150,135],[47,126],[126,217],[217,47],[223,52],[52,53],[53,223],[45,51],[51,134],[134,45],[211,170],[170,\n140],[140,211],[67,69],[69,108],[108,67],[43,106],[106,91],[91,43],[230,119],[119,120],[120,230],[226,130],[130,247],[247,226],[63,53],[53,52],[52,63],[238,20],[20,242],[242,238],[46,70],[70,156],[156,46],[78,62],[62,96],[96,78],[46,53],[53,63],[63,46],[143,34],[34,227],[227,143],[123,117],[117,111],[111,123],[44,125],[125,19],[19,44],[236,134],[134,51],[51,236],[216,206],[206,205],[205,216],[154,153],[153,22],[22,154],[39,37],[37,167],[167,39],[200,201],[201,208],[208,200],[36,142],[142,100],[100,\n36],[57,212],[212,202],[202,57],[20,60],[60,99],[99,20],[28,158],[158,157],[157,28],[35,226],[226,113],[113,35],[160,159],[159,27],[27,160],[204,202],[202,210],[210,204],[113,225],[225,46],[46,113],[43,202],[202,204],[204,43],[62,76],[76,77],[77,62],[137,123],[123,116],[116,137],[41,38],[38,72],[72,41],[203,129],[129,142],[142,203],[64,98],[98,240],[240,64],[49,102],[102,64],[64,49],[41,73],[73,74],[74,41],[212,216],[216,207],[207,212],[42,74],[74,184],[184,42],[169,170],[170,211],[211,169],[170,\n149],[149,176],[176,170],[105,66],[66,69],[69,105],[122,6],[6,168],[168,122],[123,147],[147,187],[187,123],[96,77],[77,90],[90,96],[65,55],[55,107],[107,65],[89,90],[90,180],[180,89],[101,100],[100,120],[120,101],[63,105],[105,104],[104,63],[93,137],[137,227],[227,93],[15,86],[86,85],[85,15],[129,102],[102,49],[49,129],[14,87],[87,86],[86,14],[55,8],[8,9],[9,55],[100,47],[47,121],[121,100],[145,23],[23,22],[22,145],[88,89],[89,179],[179,88],[6,122],[122,196],[196,6],[88,95],[95,96],[96,88],[138,172],\n[172,136],[136,138],[215,58],[58,172],[172,215],[115,48],[48,219],[219,115],[42,80],[80,81],[81,42],[195,3],[3,51],[51,195],[43,146],[146,61],[61,43],[171,175],[175,199],[199,171],[81,82],[82,38],[38,81],[53,46],[46,225],[225,53],[144,163],[163,110],[110,144],[52,65],[65,66],[66,52],[229,228],[228,117],[117,229],[34,127],[127,234],[234,34],[107,108],[108,69],[69,107],[109,108],[108,151],[151,109],[48,64],[64,235],[235,48],[62,78],[78,191],[191,62],[129,209],[209,126],[126,129],[111,35],[35,143],[143,\n111],[117,123],[123,50],[50,117],[222,65],[65,52],[52,222],[19,125],[125,141],[141,19],[221,55],[55,65],[65,221],[3,195],[195,197],[197,3],[25,7],[7,33],[33,25],[220,237],[237,44],[44,220],[70,71],[71,139],[139,70],[122,193],[193,245],[245,122],[247,130],[130,33],[33,247],[71,21],[21,162],[162,71],[170,169],[169,150],[150,170],[188,174],[174,196],[196,188],[216,186],[186,92],[92,216],[2,97],[97,167],[167,2],[141,125],[125,241],[241,141],[164,167],[167,37],[37,164],[72,38],[38,12],[12,72],[38,82],\n[82,13],[13,38],[63,68],[68,71],[71,63],[226,35],[35,111],[111,226],[101,50],[50,205],[205,101],[206,92],[92,165],[165,206],[209,198],[198,217],[217,209],[165,167],[167,97],[97,165],[220,115],[115,218],[218,220],[133,112],[112,243],[243,133],[239,238],[238,241],[241,239],[214,135],[135,169],[169,214],[190,173],[173,133],[133,190],[171,208],[208,32],[32,171],[125,44],[44,237],[237,125],[86,87],[87,178],[178,86],[85,86],[86,179],[179,85],[84,85],[85,180],[180,84],[83,84],[84,181],[181,83],[201,83],\n[83,182],[182,201],[137,93],[93,132],[132,137],[76,62],[62,183],[183,76],[61,76],[76,184],[184,61],[57,61],[61,185],[185,57],[212,57],[57,186],[186,212],[214,207],[207,187],[187,214],[34,143],[143,156],[156,34],[79,239],[239,237],[237,79],[123,137],[137,177],[177,123],[44,1],[1,4],[4,44],[201,194],[194,32],[32,201],[64,102],[102,129],[129,64],[213,215],[215,138],[138,213],[59,166],[166,219],[219,59],[242,99],[99,97],[97,242],[2,94],[94,141],[141,2],[75,59],[59,235],[235,75],[24,110],[110,228],[228,\n24],[25,130],[130,226],[226,25],[23,24],[24,229],[229,23],[22,23],[23,230],[230,22],[26,22],[22,231],[231,26],[112,26],[26,232],[232,112],[189,190],[190,243],[243,189],[221,56],[56,190],[190,221],[28,56],[56,221],[221,28],[27,28],[28,222],[222,27],[29,27],[27,223],[223,29],[30,29],[29,224],[224,30],[247,30],[30,225],[225,247],[238,79],[79,20],[20,238],[166,59],[59,75],[75,166],[60,75],[75,240],[240,60],[147,177],[177,215],[215,147],[20,79],[79,166],[166,20],[187,147],[147,213],[213,187],[112,233],\n[233,244],[244,112],[233,128],[128,245],[245,233],[128,114],[114,188],[188,128],[114,217],[217,174],[174,114],[131,115],[115,220],[220,131],[217,198],[198,236],[236,217],[198,131],[131,134],[134,198],[177,132],[132,58],[58,177],[143,35],[35,124],[124,143],[110,163],[163,7],[7,110],[228,110],[110,25],[25,228],[356,389],[389,368],[368,356],[11,302],[302,267],[267,11],[452,350],[350,349],[349,452],[302,303],[303,269],[269,302],[357,343],[343,277],[277,357],[452,453],[453,357],[357,452],[333,332],[332,\n297],[297,333],[175,152],[152,377],[377,175],[347,348],[348,330],[330,347],[303,304],[304,270],[270,303],[9,336],[336,337],[337,9],[278,279],[279,360],[360,278],[418,262],[262,431],[431,418],[304,408],[408,409],[409,304],[310,415],[415,407],[407,310],[270,409],[409,410],[410,270],[450,348],[348,347],[347,450],[422,430],[430,434],[434,422],[313,314],[314,17],[17,313],[306,307],[307,375],[375,306],[387,388],[388,260],[260,387],[286,414],[414,398],[398,286],[335,406],[406,418],[418,335],[364,367],[367,\n416],[416,364],[423,358],[358,327],[327,423],[251,284],[284,298],[298,251],[281,5],[5,4],[4,281],[373,374],[374,253],[253,373],[307,320],[320,321],[321,307],[425,427],[427,411],[411,425],[421,313],[313,18],[18,421],[321,405],[405,406],[406,321],[320,404],[404,405],[405,320],[315,16],[16,17],[17,315],[426,425],[425,266],[266,426],[377,400],[400,369],[369,377],[322,391],[391,269],[269,322],[417,465],[465,464],[464,417],[386,257],[257,258],[258,386],[466,260],[260,388],[388,466],[456,399],[399,419],\n[419,456],[284,332],[332,333],[333,284],[417,285],[285,8],[8,417],[346,340],[340,261],[261,346],[413,441],[441,285],[285,413],[327,460],[460,328],[328,327],[355,371],[371,329],[329,355],[392,439],[439,438],[438,392],[382,341],[341,256],[256,382],[429,420],[420,360],[360,429],[364,394],[394,379],[379,364],[277,343],[343,437],[437,277],[443,444],[444,283],[283,443],[275,440],[440,363],[363,275],[431,262],[262,369],[369,431],[297,338],[338,337],[337,297],[273,375],[375,321],[321,273],[450,451],[451,\n349],[349,450],[446,342],[342,467],[467,446],[293,334],[334,282],[282,293],[458,461],[461,462],[462,458],[276,353],[353,383],[383,276],[308,324],[324,325],[325,308],[276,300],[300,293],[293,276],[372,345],[345,447],[447,372],[352,345],[345,340],[340,352],[274,1],[1,19],[19,274],[456,248],[248,281],[281,456],[436,427],[427,425],[425,436],[381,256],[256,252],[252,381],[269,391],[391,393],[393,269],[200,199],[199,428],[428,200],[266,330],[330,329],[329,266],[287,273],[273,422],[422,287],[250,462],[462,\n328],[328,250],[258,286],[286,384],[384,258],[265,353],[353,342],[342,265],[387,259],[259,257],[257,387],[424,431],[431,430],[430,424],[342,353],[353,276],[276,342],[273,335],[335,424],[424,273],[292,325],[325,307],[307,292],[366,447],[447,345],[345,366],[271,303],[303,302],[302,271],[423,266],[266,371],[371,423],[294,455],[455,460],[460,294],[279,278],[278,294],[294,279],[271,272],[272,304],[304,271],[432,434],[434,427],[427,432],[272,407],[407,408],[408,272],[394,430],[430,431],[431,394],[395,369],\n[369,400],[400,395],[334,333],[333,299],[299,334],[351,417],[417,168],[168,351],[352,280],[280,411],[411,352],[325,319],[319,320],[320,325],[295,296],[296,336],[336,295],[319,403],[403,404],[404,319],[330,348],[348,349],[349,330],[293,298],[298,333],[333,293],[323,454],[454,447],[447,323],[15,16],[16,315],[315,15],[358,429],[429,279],[279,358],[14,15],[15,316],[316,14],[285,336],[336,9],[9,285],[329,349],[349,350],[350,329],[374,380],[380,252],[252,374],[318,402],[402,403],[403,318],[6,197],[197,\n419],[419,6],[318,319],[319,325],[325,318],[367,364],[364,365],[365,367],[435,367],[367,397],[397,435],[344,438],[438,439],[439,344],[272,271],[271,311],[311,272],[195,5],[5,281],[281,195],[273,287],[287,291],[291,273],[396,428],[428,199],[199,396],[311,271],[271,268],[268,311],[283,444],[444,445],[445,283],[373,254],[254,339],[339,373],[282,334],[334,296],[296,282],[449,347],[347,346],[346,449],[264,447],[447,454],[454,264],[336,296],[296,299],[299,336],[338,10],[10,151],[151,338],[278,439],[439,\n455],[455,278],[292,407],[407,415],[415,292],[358,371],[371,355],[355,358],[340,345],[345,372],[372,340],[346,347],[347,280],[280,346],[442,443],[443,282],[282,442],[19,94],[94,370],[370,19],[441,442],[442,295],[295,441],[248,419],[419,197],[197,248],[263,255],[255,359],[359,263],[440,275],[275,274],[274,440],[300,383],[383,368],[368,300],[351,412],[412,465],[465,351],[263,467],[467,466],[466,263],[301,368],[368,389],[389,301],[395,378],[378,379],[379,395],[412,351],[351,419],[419,412],[436,426],\n[426,322],[322,436],[2,164],[164,393],[393,2],[370,462],[462,461],[461,370],[164,0],[0,267],[267,164],[302,11],[11,12],[12,302],[268,12],[12,13],[13,268],[293,300],[300,301],[301,293],[446,261],[261,340],[340,446],[330,266],[266,425],[425,330],[426,423],[423,391],[391,426],[429,355],[355,437],[437,429],[391,327],[327,326],[326,391],[440,457],[457,438],[438,440],[341,382],[382,362],[362,341],[459,457],[457,461],[461,459],[434,430],[430,394],[394,434],[414,463],[463,362],[362,414],[396,369],[369,262],\n[262,396],[354,461],[461,457],[457,354],[316,403],[403,402],[402,316],[315,404],[404,403],[403,315],[314,405],[405,404],[404,314],[313,406],[406,405],[405,313],[421,418],[418,406],[406,421],[366,401],[401,361],[361,366],[306,408],[408,407],[407,306],[291,409],[409,408],[408,291],[287,410],[410,409],[409,287],[432,436],[436,410],[410,432],[434,416],[416,411],[411,434],[264,368],[368,383],[383,264],[309,438],[438,457],[457,309],[352,376],[376,401],[401,352],[274,275],[275,4],[4,274],[421,428],[428,\n262],[262,421],[294,327],[327,358],[358,294],[433,416],[416,367],[367,433],[289,455],[455,439],[439,289],[462,370],[370,326],[326,462],[2,326],[326,370],[370,2],[305,460],[460,455],[455,305],[254,449],[449,448],[448,254],[255,261],[261,446],[446,255],[253,450],[450,449],[449,253],[252,451],[451,450],[450,252],[256,452],[452,451],[451,256],[341,453],[453,452],[452,341],[413,464],[464,463],[463,413],[441,413],[413,414],[414,441],[258,442],[442,441],[441,258],[257,443],[443,442],[442,257],[259,444],\n[444,443],[443,259],[260,445],[445,444],[444,260],[467,342],[342,445],[445,467],[459,458],[458,250],[250,459],[289,392],[392,290],[290,289],[290,328],[328,460],[460,290],[376,433],[433,435],[435,376],[250,290],[290,392],[392,250],[411,416],[416,433],[433,411],[341,463],[463,464],[464,341],[453,464],[464,465],[465,453],[357,465],[465,412],[412,357],[343,412],[412,399],[399,343],[360,363],[363,440],[440,360],[437,399],[399,456],[456,437],[420,456],[456,363],[363,420],[401,435],[435,288],[288,401],[372,\n383],[383,353],[353,372],[339,255],[255,249],[249,339],[448,261],[261,255],[255,448],[133,243],[243,190],[190,133],[133,155],[155,112],[112,133],[33,246],[246,247],[247,33],[33,130],[130,25],[25,33],[398,384],[384,286],[286,398],[362,398],[398,414],[414,362],[362,463],[463,341],[341,362],[263,359],[359,467],[467,263],[263,249],[249,255],[255,263],[466,467],[467,260],[260,466],[75,60],[60,166],[166,75],[238,239],[239,79],[79,238],[162,127],[127,139],[139,162],[72,11],[11,37],[37,72],[121,232],[232,\n120],[120,121],[73,72],[72,39],[39,73],[114,128],[128,47],[47,114],[233,232],[232,128],[128,233],[103,104],[104,67],[67,103],[152,175],[175,148],[148,152],[119,118],[118,101],[101,119],[74,73],[73,40],[40,74],[107,9],[9,108],[108,107],[49,48],[48,131],[131,49],[32,194],[194,211],[211,32],[184,74],[74,185],[185,184],[191,80],[80,183],[183,191],[185,40],[40,186],[186,185],[119,230],[230,118],[118,119],[210,202],[202,214],[214,210],[84,83],[83,17],[17,84],[77,76],[76,146],[146,77],[161,160],[160,30],\n[30,161],[190,56],[56,173],[173,190],[182,106],[106,194],[194,182],[138,135],[135,192],[192,138],[129,203],[203,98],[98,129],[54,21],[21,68],[68,54],[5,51],[51,4],[4,5],[145,144],[144,23],[23,145],[90,77],[77,91],[91,90],[207,205],[205,187],[187,207],[83,201],[201,18],[18,83],[181,91],[91,182],[182,181],[180,90],[90,181],[181,180],[16,85],[85,17],[17,16],[205,206],[206,36],[36,205],[176,148],[148,140],[140,176],[165,92],[92,39],[39,165],[245,193],[193,244],[244,245],[27,159],[159,28],[28,27],[30,\n247],[247,161],[161,30],[174,236],[236,196],[196,174],[103,54],[54,104],[104,103],[55,193],[193,8],[8,55],[111,117],[117,31],[31,111],[221,189],[189,55],[55,221],[240,98],[98,99],[99,240],[142,126],[126,100],[100,142],[219,166],[166,218],[218,219],[112,155],[155,26],[26,112],[198,209],[209,131],[131,198],[169,135],[135,150],[150,169],[114,47],[47,217],[217,114],[224,223],[223,53],[53,224],[220,45],[45,134],[134,220],[32,211],[211,140],[140,32],[109,67],[67,108],[108,109],[146,43],[43,91],[91,146],\n[231,230],[230,120],[120,231],[113,226],[226,247],[247,113],[105,63],[63,52],[52,105],[241,238],[238,242],[242,241],[124,46],[46,156],[156,124],[95,78],[78,96],[96,95],[70,46],[46,63],[63,70],[116,143],[143,227],[227,116],[116,123],[123,111],[111,116],[1,44],[44,19],[19,1],[3,236],[236,51],[51,3],[207,216],[216,205],[205,207],[26,154],[154,22],[22,26],[165,39],[39,167],[167,165],[199,200],[200,208],[208,199],[101,36],[36,100],[100,101],[43,57],[57,202],[202,43],[242,20],[20,99],[99,242],[56,28],[28,\n157],[157,56],[124,35],[35,113],[113,124],[29,160],[160,27],[27,29],[211,204],[204,210],[210,211],[124,113],[113,46],[46,124],[106,43],[43,204],[204,106],[96,62],[62,77],[77,96],[227,137],[137,116],[116,227],[73,41],[41,72],[72,73],[36,203],[203,142],[142,36],[235,64],[64,240],[240,235],[48,49],[49,64],[64,48],[42,41],[41,74],[74,42],[214,212],[212,207],[207,214],[183,42],[42,184],[184,183],[210,169],[169,211],[211,210],[140,170],[170,176],[176,140],[104,105],[105,69],[69,104],[193,122],[122,168],\n[168,193],[50,123],[123,187],[187,50],[89,96],[96,90],[90,89],[66,65],[65,107],[107,66],[179,89],[89,180],[180,179],[119,101],[101,120],[120,119],[68,63],[63,104],[104,68],[234,93],[93,227],[227,234],[16,15],[15,85],[85,16],[209,129],[129,49],[49,209],[15,14],[14,86],[86,15],[107,55],[55,9],[9,107],[120,100],[100,121],[121,120],[153,145],[145,22],[22,153],[178,88],[88,179],[179,178],[197,6],[6,196],[196,197],[89,88],[88,96],[96,89],[135,138],[138,136],[136,135],[138,215],[215,172],[172,138],[218,\n115],[115,219],[219,218],[41,42],[42,81],[81,41],[5,195],[195,51],[51,5],[57,43],[43,61],[61,57],[208,171],[171,199],[199,208],[41,81],[81,38],[38,41],[224,53],[53,225],[225,224],[24,144],[144,110],[110,24],[105,52],[52,66],[66,105],[118,229],[229,117],[117,118],[227,34],[34,234],[234,227],[66,107],[107,69],[69,66],[10,109],[109,151],[151,10],[219,48],[48,235],[235,219],[183,62],[62,191],[191,183],[142,129],[129,126],[126,142],[116,111],[111,143],[143,116],[118,117],[117,50],[50,118],[223,222],[222,\n52],[52,223],[94,19],[19,141],[141,94],[222,221],[221,65],[65,222],[196,3],[3,197],[197,196],[45,220],[220,44],[44,45],[156,70],[70,139],[139,156],[188,122],[122,245],[245,188],[139,71],[71,162],[162,139],[149,170],[170,150],[150,149],[122,188],[188,196],[196,122],[206,216],[216,92],[92,206],[164,2],[2,167],[167,164],[242,141],[141,241],[241,242],[0,164],[164,37],[37,0],[11,72],[72,12],[12,11],[12,38],[38,13],[13,12],[70,63],[63,71],[71,70],[31,226],[226,111],[111,31],[36,101],[101,205],[205,36],\n[203,206],[206,165],[165,203],[126,209],[209,217],[217,126],[98,165],[165,97],[97,98],[237,220],[220,218],[218,237],[237,239],[239,241],[241,237],[210,214],[214,169],[169,210],[140,171],[171,32],[32,140],[241,125],[125,237],[237,241],[179,86],[86,178],[178,179],[180,85],[85,179],[179,180],[181,84],[84,180],[180,181],[182,83],[83,181],[181,182],[194,201],[201,182],[182,194],[177,137],[137,132],[132,177],[184,76],[76,183],[183,184],[185,61],[61,184],[184,185],[186,57],[57,185],[185,186],[216,212],[212,\n186],[186,216],[192,214],[214,187],[187,192],[139,34],[34,156],[156,139],[218,79],[79,237],[237,218],[147,123],[123,177],[177,147],[45,44],[44,4],[4,45],[208,201],[201,32],[32,208],[98,64],[64,129],[129,98],[192,213],[213,138],[138,192],[235,59],[59,219],[219,235],[141,242],[242,97],[97,141],[97,2],[2,141],[141,97],[240,75],[75,235],[235,240],[229,24],[24,228],[228,229],[31,25],[25,226],[226,31],[230,23],[23,229],[229,230],[231,22],[22,230],[230,231],[232,26],[26,231],[231,232],[233,112],[112,232],\n[232,233],[244,189],[189,243],[243,244],[189,221],[221,190],[190,189],[222,28],[28,221],[221,222],[223,27],[27,222],[222,223],[224,29],[29,223],[223,224],[225,30],[30,224],[224,225],[113,247],[247,225],[225,113],[99,60],[60,240],[240,99],[213,147],[147,215],[215,213],[60,20],[20,166],[166,60],[192,187],[187,213],[213,192],[243,112],[112,244],[244,243],[244,233],[233,245],[245,244],[245,128],[128,188],[188,245],[188,114],[114,174],[174,188],[134,131],[131,220],[220,134],[174,217],[217,236],[236,174],\n[236,198],[198,134],[134,236],[215,177],[177,58],[58,215],[156,143],[143,124],[124,156],[25,110],[110,7],[7,25],[31,228],[228,25],[25,31],[264,356],[356,368],[368,264],[0,11],[11,267],[267,0],[451,452],[452,349],[349,451],[267,302],[302,269],[269,267],[350,357],[357,277],[277,350],[350,452],[452,357],[357,350],[299,333],[333,297],[297,299],[396,175],[175,377],[377,396],[280,347],[347,330],[330,280],[269,303],[303,270],[270,269],[151,9],[9,337],[337,151],[344,278],[278,360],[360,344],[424,418],[418,\n431],[431,424],[270,304],[304,409],[409,270],[272,310],[310,407],[407,272],[322,270],[270,410],[410,322],[449,450],[450,347],[347,449],[432,422],[422,434],[434,432],[18,313],[313,17],[17,18],[291,306],[306,375],[375,291],[259,387],[387,260],[260,259],[424,335],[335,418],[418,424],[434,364],[364,416],[416,434],[391,423],[423,327],[327,391],[301,251],[251,298],[298,301],[275,281],[281,4],[4,275],[254,373],[373,253],[253,254],[375,307],[307,321],[321,375],[280,425],[425,411],[411,280],[200,421],[421,\n18],[18,200],[335,321],[321,406],[406,335],[321,320],[320,405],[405,321],[314,315],[315,17],[17,314],[423,426],[426,266],[266,423],[396,377],[377,369],[369,396],[270,322],[322,269],[269,270],[413,417],[417,464],[464,413],[385,386],[386,258],[258,385],[248,456],[456,419],[419,248],[298,284],[284,333],[333,298],[168,417],[417,8],[8,168],[448,346],[346,261],[261,448],[417,413],[413,285],[285,417],[326,327],[327,328],[328,326],[277,355],[355,329],[329,277],[309,392],[392,438],[438,309],[381,382],[382,\n256],[256,381],[279,429],[429,360],[360,279],[365,364],[364,379],[379,365],[355,277],[277,437],[437,355],[282,443],[443,283],[283,282],[281,275],[275,363],[363,281],[395,431],[431,369],[369,395],[299,297],[297,337],[337,299],[335,273],[273,321],[321,335],[348,450],[450,349],[349,348],[359,446],[446,467],[467,359],[283,293],[293,282],[282,283],[250,458],[458,462],[462,250],[300,276],[276,383],[383,300],[292,308],[308,325],[325,292],[283,276],[276,293],[293,283],[264,372],[372,447],[447,264],[346,352],\n[352,340],[340,346],[354,274],[274,19],[19,354],[363,456],[456,281],[281,363],[426,436],[436,425],[425,426],[380,381],[381,252],[252,380],[267,269],[269,393],[393,267],[421,200],[200,428],[428,421],[371,266],[266,329],[329,371],[432,287],[287,422],[422,432],[290,250],[250,328],[328,290],[385,258],[258,384],[384,385],[446,265],[265,342],[342,446],[386,387],[387,257],[257,386],[422,424],[424,430],[430,422],[445,342],[342,276],[276,445],[422,273],[273,424],[424,422],[306,292],[292,307],[307,306],[352,\n366],[366,345],[345,352],[268,271],[271,302],[302,268],[358,423],[423,371],[371,358],[327,294],[294,460],[460,327],[331,279],[279,294],[294,331],[303,271],[271,304],[304,303],[436,432],[432,427],[427,436],[304,272],[272,408],[408,304],[395,394],[394,431],[431,395],[378,395],[395,400],[400,378],[296,334],[334,299],[299,296],[6,351],[351,168],[168,6],[376,352],[352,411],[411,376],[307,325],[325,320],[320,307],[285,295],[295,336],[336,285],[320,319],[319,404],[404,320],[329,330],[330,349],[349,329],\n[334,293],[293,333],[333,334],[366,323],[323,447],[447,366],[316,15],[15,315],[315,316],[331,358],[358,279],[279,331],[317,14],[14,316],[316,317],[8,285],[285,9],[9,8],[277,329],[329,350],[350,277],[253,374],[374,252],[252,253],[319,318],[318,403],[403,319],[351,6],[6,419],[419,351],[324,318],[318,325],[325,324],[397,367],[367,365],[365,397],[288,435],[435,397],[397,288],[278,344],[344,439],[439,278],[310,272],[272,311],[311,310],[248,195],[195,281],[281,248],[375,273],[273,291],[291,375],[175,396],\n[396,199],[199,175],[312,311],[311,268],[268,312],[276,283],[283,445],[445,276],[390,373],[373,339],[339,390],[295,282],[282,296],[296,295],[448,449],[449,346],[346,448],[356,264],[264,454],[454,356],[337,336],[336,299],[299,337],[337,338],[338,151],[151,337],[294,278],[278,455],[455,294],[308,292],[292,415],[415,308],[429,358],[358,355],[355,429],[265,340],[340,372],[372,265],[352,346],[346,280],[280,352],[295,442],[442,282],[282,295],[354,19],[19,370],[370,354],[285,441],[441,295],[295,285],[195,\n248],[248,197],[197,195],[457,440],[440,274],[274,457],[301,300],[300,368],[368,301],[417,351],[351,465],[465,417],[251,301],[301,389],[389,251],[394,395],[395,379],[379,394],[399,412],[412,419],[419,399],[410,436],[436,322],[322,410],[326,2],[2,393],[393,326],[354,370],[370,461],[461,354],[393,164],[164,267],[267,393],[268,302],[302,12],[12,268],[312,268],[268,13],[13,312],[298,293],[293,301],[301,298],[265,446],[446,340],[340,265],[280,330],[330,425],[425,280],[322,426],[426,391],[391,322],[420,\n429],[429,437],[437,420],[393,391],[391,326],[326,393],[344,440],[440,438],[438,344],[458,459],[459,461],[461,458],[364,434],[434,394],[394,364],[428,396],[396,262],[262,428],[274,354],[354,457],[457,274],[317,316],[316,402],[402,317],[316,315],[315,403],[403,316],[315,314],[314,404],[404,315],[314,313],[313,405],[405,314],[313,421],[421,406],[406,313],[323,366],[366,361],[361,323],[292,306],[306,407],[407,292],[306,291],[291,408],[408,306],[291,287],[287,409],[409,291],[287,432],[432,410],[410,287],\n[427,434],[434,411],[411,427],[372,264],[264,383],[383,372],[459,309],[309,457],[457,459],[366,352],[352,401],[401,366],[1,274],[274,4],[4,1],[418,421],[421,262],[262,418],[331,294],[294,358],[358,331],[435,433],[433,367],[367,435],[392,289],[289,439],[439,392],[328,462],[462,326],[326,328],[94,2],[2,370],[370,94],[289,305],[305,455],[455,289],[339,254],[254,448],[448,339],[359,255],[255,446],[446,359],[254,253],[253,449],[449,254],[253,252],[252,450],[450,253],[252,256],[256,451],[451,252],[256,\n341],[341,452],[452,256],[414,413],[413,463],[463,414],[286,441],[441,414],[414,286],[286,258],[258,441],[441,286],[258,257],[257,442],[442,258],[257,259],[259,443],[443,257],[259,260],[260,444],[444,259],[260,467],[467,445],[445,260],[309,459],[459,250],[250,309],[305,289],[289,290],[290,305],[305,290],[290,460],[460,305],[401,376],[376,435],[435,401],[309,250],[250,392],[392,309],[376,411],[411,433],[433,376],[453,341],[341,464],[464,453],[357,453],[453,465],[465,357],[343,357],[357,412],[412,343],\n[437,343],[343,399],[399,437],[344,360],[360,440],[440,344],[420,437],[437,456],[456,420],[360,420],[420,363],[363,360],[361,401],[401,288],[288,361],[265,372],[372,353],[353,265],[390,339],[339,249],[249,390],[339,448],[448,255],[255,339]]);P(\"matrixDataToMatrix\",function(a){for(var b=a.getCols(),c=a.getRows(),d=a.getPackedDataList(),e=[],g=0;g<c;g++)e.push(Array(b));for(g=0;g<c;g++)for(var f=0;f<b;f++){var h=1===a.getLayout()?g*b+f:f*c+g;e[g][f]=d[h]}return e});P(\"VERSION\",\"0.4.1633559619\");}).call(this);\n"
  },
  {
    "path": "src/renderer/public/lib/@mediapipe/cdn/holistic.js",
    "content": "(function(){/*\n\n Copyright The Closure Library Authors.\n SPDX-License-Identifier: Apache-2.0\n*/\n'use strict';var x;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ba=\"function\"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};\nfunction ca(a){a=[\"object\"==typeof globalThis&&globalThis,a,\"object\"==typeof window&&window,\"object\"==typeof self&&self,\"object\"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error(\"Cannot find global object\");}var y=ca(this);function z(a,b){if(b)a:{var c=y;a=a.split(\".\");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ba(c,a,{configurable:!0,writable:!0,value:b})}}\nz(\"Symbol\",function(a){function b(g){if(this instanceof b)throw new TypeError(\"Symbol is not a constructor\");return new c(d+(g||\"\")+\"_\"+e++,g)}function c(g,f){this.g=g;ba(this,\"description\",{configurable:!0,writable:!0,value:f})}if(a)return a;c.prototype.toString=function(){return this.g};var d=\"jscomp_symbol_\"+(1E9*Math.random()>>>0)+\"_\",e=0;return b});\nz(\"Symbol.iterator\",function(a){if(a)return a;a=Symbol(\"Symbol.iterator\");for(var b=\"Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array\".split(\" \"),c=0;c<b.length;c++){var d=y[b[c]];\"function\"===typeof d&&\"function\"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return da(aa(this))}})}return a});function da(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}\nfunction B(a){var b=\"undefined\"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function D(a){if(!(a instanceof Array)){a=B(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ea=\"function\"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},fa;\nif(\"function\"==typeof Object.setPrototypeOf)fa=Object.setPrototypeOf;else{var ha;a:{var ia={a:!0},ja={};try{ja.__proto__=ia;ha=ja.a;break a}catch(a){}ha=!1}fa=ha?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+\" is not extensible\");return a}:null}var ka=fa;\nfunction E(a,b){a.prototype=ea(b.prototype);a.prototype.constructor=a;if(ka)ka(a,b);else for(var c in b)if(\"prototype\"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.da=b.prototype}function la(){this.l=!1;this.i=null;this.h=void 0;this.g=1;this.s=this.m=0;this.j=null}function ma(a){if(a.l)throw new TypeError(\"Generator is already running\");a.l=!0}la.prototype.o=function(a){this.h=a};\nfunction na(a,b){a.j={U:b,V:!0};a.g=a.m||a.s}la.prototype.return=function(a){this.j={return:a};this.g=this.s};function F(a,b,c){a.g=c;return{value:b}}function oa(a){this.g=new la;this.h=a}function pa(a,b){ma(a.g);var c=a.g.i;if(c)return qa(a,\"return\"in c?c[\"return\"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return ra(a)}\nfunction qa(a,b,c,d){try{var e=b.call(a.g.i,c);if(!(e instanceof Object))throw new TypeError(\"Iterator result \"+e+\" is not an object\");if(!e.done)return a.g.l=!1,e;var g=e.value}catch(f){return a.g.i=null,na(a.g,f),ra(a)}a.g.i=null;d.call(a.g,g);return ra(a)}function ra(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.l=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,na(a.g,c)}a.g.l=!1;if(a.g.j){b=a.g.j;a.g.j=null;if(b.V)throw b.U;return{value:b.return,done:!0}}return{value:void 0,done:!0}}\nfunction sa(a){this.next=function(b){ma(a.g);a.g.i?b=qa(a,a.g.i.next,b,a.g.o):(a.g.o(b),b=ra(a));return b};this.throw=function(b){ma(a.g);a.g.i?b=qa(a,a.g.i[\"throw\"],b,a.g.o):(na(a.g,b),b=ra(a));return b};this.return=function(b){return pa(a,b)};this[Symbol.iterator]=function(){return this}}function ta(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function g(f){f.done?d(f.value):Promise.resolve(f.value).then(b,c).then(g,e)}g(a.next())})}\nfunction H(a){return ta(new sa(new oa(a)))}\nz(\"Promise\",function(a){function b(f){this.h=0;this.i=void 0;this.g=[];this.o=!1;var k=this.j();try{f(k.resolve,k.reject)}catch(h){k.reject(h)}}function c(){this.g=null}function d(f){return f instanceof b?f:new b(function(k){k(f)})}if(a)return a;c.prototype.h=function(f){if(null==this.g){this.g=[];var k=this;this.i(function(){k.l()})}this.g.push(f)};var e=y.setTimeout;c.prototype.i=function(f){e(f,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var f=this.g;this.g=[];for(var k=0;k<f.length;++k){var h=\nf[k];f[k]=null;try{h()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(f){this.i(function(){throw f;})};b.prototype.j=function(){function f(l){return function(n){h||(h=!0,l.call(k,n))}}var k=this,h=!1;return{resolve:f(this.C),reject:f(this.l)}};b.prototype.C=function(f){if(f===this)this.l(new TypeError(\"A Promise cannot resolve to itself\"));else if(f instanceof b)this.F(f);else{a:switch(typeof f){case \"object\":var k=null!=f;break a;case \"function\":k=!0;break a;default:k=!1}k?this.v(f):this.m(f)}};\nb.prototype.v=function(f){var k=void 0;try{k=f.then}catch(h){this.l(h);return}\"function\"==typeof k?this.G(k,f):this.m(f)};b.prototype.l=function(f){this.s(2,f)};b.prototype.m=function(f){this.s(1,f)};b.prototype.s=function(f,k){if(0!=this.h)throw Error(\"Cannot settle(\"+f+\", \"+k+\"): Promise already settled in state\"+this.h);this.h=f;this.i=k;2===this.h&&this.D();this.A()};b.prototype.D=function(){var f=this;e(function(){if(f.B()){var k=y.console;\"undefined\"!==typeof k&&k.error(f.i)}},1)};b.prototype.B=\nfunction(){if(this.o)return!1;var f=y.CustomEvent,k=y.Event,h=y.dispatchEvent;if(\"undefined\"===typeof h)return!0;\"function\"===typeof f?f=new f(\"unhandledrejection\",{cancelable:!0}):\"function\"===typeof k?f=new k(\"unhandledrejection\",{cancelable:!0}):(f=y.document.createEvent(\"CustomEvent\"),f.initCustomEvent(\"unhandledrejection\",!1,!0,f));f.promise=this;f.reason=this.i;return h(f)};b.prototype.A=function(){if(null!=this.g){for(var f=0;f<this.g.length;++f)g.h(this.g[f]);this.g=null}};var g=new c;b.prototype.F=\nfunction(f){var k=this.j();f.J(k.resolve,k.reject)};b.prototype.G=function(f,k){var h=this.j();try{f.call(k,h.resolve,h.reject)}catch(l){h.reject(l)}};b.prototype.then=function(f,k){function h(p,m){return\"function\"==typeof p?function(q){try{l(p(q))}catch(t){n(t)}}:m}var l,n,r=new b(function(p,m){l=p;n=m});this.J(h(f,l),h(k,n));return r};b.prototype.catch=function(f){return this.then(void 0,f)};b.prototype.J=function(f,k){function h(){switch(l.h){case 1:f(l.i);break;case 2:k(l.i);break;default:throw Error(\"Unexpected state: \"+\nl.h);}}var l=this;null==this.g?g.h(h):this.g.push(h);this.o=!0};b.resolve=d;b.reject=function(f){return new b(function(k,h){h(f)})};b.race=function(f){return new b(function(k,h){for(var l=B(f),n=l.next();!n.done;n=l.next())d(n.value).J(k,h)})};b.all=function(f){var k=B(f),h=k.next();return h.done?d([]):new b(function(l,n){function r(q){return function(t){p[q]=t;m--;0==m&&l(p)}}var p=[],m=0;do p.push(void 0),m++,d(h.value).J(r(p.length-1),n),h=k.next();while(!h.done)})};return b});\nfunction ua(a,b){a instanceof String&&(a+=\"\");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var g=c++;return{value:b(g,a[g]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}var va=\"function\"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Object.prototype.hasOwnProperty.call(d,e)&&(a[e]=d[e])}return a};z(\"Object.assign\",function(a){return a||va});\nz(\"Object.is\",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});z(\"Array.prototype.includes\",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var g=d[c];if(g===b||Object.is(g,b))return!0}return!1}});\nz(\"String.prototype.includes\",function(a){return a?a:function(b,c){if(null==this)throw new TypeError(\"The 'this' value for String.prototype.includes must not be null or undefined\");if(b instanceof RegExp)throw new TypeError(\"First argument to String.prototype.includes must not be a regular expression\");return-1!==this.indexOf(b,c||0)}});z(\"Array.prototype.keys\",function(a){return a?a:function(){return ua(this,function(b){return b})}});var wa=this||self;\nfunction I(a,b){a=a.split(\".\");var c=wa;a[0]in c||\"undefined\"==typeof c.execScript||c.execScript(\"var \"+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};function xa(a){wa.setTimeout(function(){throw a;},0)};function ya(a){xa(a);return;throw Error(\"invalid error level: 1\");}function za(a,b){ya(Error(\"Invalid wire type: \"+a+\" (at position \"+b+\")\"))}function Aa(){ya(Error(\"Failed to read varint, encoding is invalid.\"))};function Ba(a,b){b=String.fromCharCode.apply(null,b);return null==a?b:a+b}var Ca,Da=\"undefined\"!==typeof TextDecoder,Ea,Fa=\"undefined\"!==typeof TextEncoder;\nfunction Ga(a){if(Fa)a=(Ea||(Ea=new TextEncoder)).encode(a);else{var b=void 0;b=void 0===b?!1:b;for(var c=0,d=new Uint8Array(3*a.length),e=0;e<a.length;e++){var g=a.charCodeAt(e);if(128>g)d[c++]=g;else{if(2048>g)d[c++]=g>>6|192;else{if(55296<=g&&57343>=g){if(56319>=g&&e<a.length){var f=a.charCodeAt(++e);if(56320<=f&&57343>=f){g=1024*(g-55296)+f-56320+65536;d[c++]=g>>18|240;d[c++]=g>>12&63|128;d[c++]=g>>6&63|128;d[c++]=g&63|128;continue}else e--}if(b)throw Error(\"Found an unpaired surrogate\");g=65533}d[c++]=\ng>>12|224;d[c++]=g>>6&63|128}d[c++]=g&63|128}}a=d.subarray(0,c)}return a};var Ha={},Ia=null;function Ja(a){var b;void 0===b&&(b=0);Ka();b=Ha[b];for(var c=Array(Math.floor(a.length/3)),d=b[64]||\"\",e=0,g=0;e<a.length-2;e+=3){var f=a[e],k=a[e+1],h=a[e+2],l=b[f>>2];f=b[(f&3)<<4|k>>4];k=b[(k&15)<<2|h>>6];h=b[h&63];c[g++]=l+f+k+h}l=0;h=d;switch(a.length-e){case 2:l=a[e+1],h=b[(l&15)<<2]||d;case 1:a=a[e],c[g]=b[a>>2]+b[(a&3)<<4|l>>4]+h+d}return c.join(\"\")}\nfunction La(a){var b=a.length,c=3*b/4;c%3?c=Math.floor(c):-1!=\"=.\".indexOf(a[b-1])&&(c=-1!=\"=.\".indexOf(a[b-2])?c-2:c-1);var d=new Uint8Array(c),e=0;Ma(a,function(g){d[e++]=g});return d.subarray(0,e)}\nfunction Ma(a,b){function c(h){for(;d<a.length;){var l=a.charAt(d++),n=Ia[l];if(null!=n)return n;if(!/^[\\s\\xa0]*$/.test(l))throw Error(\"Unknown base64 encoding at char: \"+l);}return h}Ka();for(var d=0;;){var e=c(-1),g=c(0),f=c(64),k=c(64);if(64===k&&-1===e)break;b(e<<2|g>>4);64!=f&&(b(g<<4&240|f>>2),64!=k&&b(f<<6&192|k))}}\nfunction Ka(){if(!Ia){Ia={};for(var a=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\".split(\"\"),b=[\"+/=\",\"+/\",\"-_=\",\"-_.\",\"-_\"],c=0;5>c;c++){var d=a.concat(b[c].split(\"\"));Ha[c]=d;for(var e=0;e<d.length;e++){var g=d[e];void 0===Ia[g]&&(Ia[g]=e)}}}};var Na=\"function\"===typeof Uint8Array,Oa;function Pa(a){this.g=a;if(null!==a&&0===a.length)throw Error(\"ByteString should be constructed with non-empty values\");}Pa.prototype.toJSON=function(){if(null==this.g)var a=\"\";else a=this.g,a=this.g=null==a||\"string\"===typeof a?a:Na&&a instanceof Uint8Array?Ja(a):null;return a};var Qa=\"function\"===typeof Uint8Array.prototype.slice;function Ra(a,b,c){return b===c?Oa||(Oa=new Uint8Array(0)):Qa?a.slice(b,c):new Uint8Array(a.subarray(b,c))}var K=0,L=0;\nfunction Sa(a){if(a.constructor===Uint8Array)return a;if(a.constructor===ArrayBuffer)return new Uint8Array(a);if(a.constructor===Array)return new Uint8Array(a);if(a.constructor===String)return La(a);if(a.constructor===Pa){if(null==a.g)var b=Oa||(Oa=new Uint8Array(0));else{b=Uint8Array;var c=a.g;c=null==c||Na&&null!=c&&c instanceof Uint8Array?c:\"string\"===typeof c?La(c):null;a=a.g=c;b=new b(a)}return b}if(a instanceof Uint8Array)return new Uint8Array(a.buffer,a.byteOffset,a.byteLength);throw Error(\"Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, or Array of numbers\");\n};function Ta(a,b){b=void 0===b?{}:b;b=void 0===b.u?!1:b.u;this.h=null;this.g=this.i=this.m=0;this.l=!1;this.u=b;a&&Ua(this,a)}function Ua(a,b){a.h=Sa(b);a.m=0;a.i=a.h.length;a.g=a.m}Ta.prototype.reset=function(){this.g=this.m};\nfunction Va(a){for(var b=128,c=0,d=0,e=0;4>e&&128<=b;e++)b=a.h[a.g++],c|=(b&127)<<7*e;128<=b&&(b=a.h[a.g++],c|=(b&127)<<28,d|=(b&127)>>4);if(128<=b)for(e=0;5>e&&128<=b;e++)b=a.h[a.g++],d|=(b&127)<<7*e+3;if(128>b){a=c>>>0;b=d>>>0;if(d=b&2147483648)a=~a+1>>>0,b=~b>>>0,0==a&&(b=b+1>>>0);a=4294967296*b+(a>>>0);return d?-a:a}a.l=!0;Aa()}function M(a){a.g>a.i&&(a.l=!0,ya(Error(\"Tried to read past the end of the data \"+a.g+\" > \"+a.i)))}\nTa.prototype.j=function(){var a=this.h,b=a[this.g],c=b&127;if(128>b)return this.g+=1,M(this),c;b=a[this.g+1];c|=(b&127)<<7;if(128>b)return this.g+=2,M(this),c;b=a[this.g+2];c|=(b&127)<<14;if(128>b)return this.g+=3,M(this),c;b=a[this.g+3];c|=(b&127)<<21;if(128>b)return this.g+=4,M(this),c;b=a[this.g+4];c|=(b&15)<<28;if(128>b)return this.g+=5,M(this),c>>>0;this.g+=5;if(128<=a[this.g++]&&128<=a[this.g++]&&128<=a[this.g++]&&128<=a[this.g++]&&128<=a[this.g++])return this.l=!0,Aa(),c;M(this);return c};\nTa.prototype.o=function(){var a=this.h[this.g],b=this.h[this.g+1];var c=this.h[this.g+2];var d=this.h[this.g+3];this.g+=4;M(this);c=(a<<0|b<<8|c<<16|d<<24)>>>0;a=2*(c>>31)+1;b=c>>>23&255;c&=8388607;return 255==b?c?NaN:Infinity*a:0==b?a*Math.pow(2,-149)*c:a*Math.pow(2,b-150)*(c+Math.pow(2,23))};var Wa=[];function Xa(){this.g=new Uint8Array(64);this.h=0}function N(a,b){if(!(a.h+1<a.g.length)){var c=a.g;a.g=new Uint8Array(Math.ceil(1+2*a.g.length));a.g.set(c)}a.g[a.h++]=b}Xa.prototype.length=function(){return this.h};Xa.prototype.end=function(){var a=this.g,b=this.h;this.h=0;return Ra(a,0,b)};function Ya(a,b){for(;127<b;)N(a,b&127|128),b>>>=7;N(a,b)};function Za(a){var b={},c=void 0===b.N?!1:b.N;this.m={u:void 0===b.u?!1:b.u};this.N=c;b=this.m;Wa.length?(c=Wa.pop(),b&&(c.u=b.u),a&&Ua(c,a),a=c):a=new Ta(a,b);this.g=a;this.l=this.g.g;this.h=this.i=-1;this.j=!1}Za.prototype.reset=function(){this.g.reset();this.h=this.i=-1};function $a(a){var b=a.g;(b=b.g==b.i)||(b=a.j)||(b=a.g,b=b.l||0>b.g||b.g>b.i);if(b)return!1;a.l=a.g.g;var c=a.g.j();b=c>>>3;c&=7;if(!(0<=c&&5>=c))return a.j=!0,za(c,a.l),!1;a.i=b;a.h=c;return!0}\nfunction ab(a){switch(a.h){case 0:if(0!=a.h)ab(a);else a:{a=a.g;for(var b=a.g,c=0;10>c;c++){if(0===(a.h[b]&128)){a.g=b+1;M(a);break a}b++}a.l=!0;Aa()}break;case 1:a=a.g;a.g+=8;M(a);break;case 2:2!=a.h?ab(a):(b=a.g.j(),a=a.g,a.g+=b,M(a));break;case 5:a=a.g;a.g+=4;M(a);break;case 3:b=a.i;do{if(!$a(a)){a.j=!0;ya(Error(\"Unmatched start-group tag: stream EOF\"));break}if(4==a.h){a.i!=b&&(a.j=!0,ya(Error(\"Unmatched end-group tag\")));break}ab(a)}while(1);break;default:a.j=!0,za(a.h,a.l)}}\nfunction bb(a,b,c){a.N||(a=Ra(a.g.h,c,a.g.g),(c=b.o)?c.push(a):b.o=[a])}function cb(a,b,c){var d=a.g.i,e=a.g.j(),g=a.g.g+e;a.g.i=g;c(b,a);c=g-a.g.g;if(0!==c)throw Error(\"Message parsing ended unexpectedly. Expected to read \"+(e+\" bytes, instead read \"+(e-c)+\" bytes, either the data ended unexpectedly or the message misreported its own length\"));a.g.g=g;a.g.i=d;return b}function db(a,b,c){var d=a.g.j();for(d=a.g.g+d;a.g.g<d;)c.push(b.call(a.g))}var eb=[];function fb(){this.h=[];this.i=0;this.g=new Xa}function gb(a,b){0!==b.length&&(a.h.push(b),a.i+=b.length)}function hb(a,b,c){Ya(a.g,8*b+2);Ya(a.g,c.length);gb(a,a.g.end());gb(a,c)};var ib=\"function\"===typeof Symbol&&\"symbol\"===typeof Symbol()?Symbol(void 0):void 0;function jb(a,b){Object.isFrozen(a)||(ib?a[ib]|=b:void 0!==a.g?a.g|=b:Object.defineProperties(a,{g:{value:b,configurable:!0,writable:!0,enumerable:!1}}))}function kb(a){if(!a)return 0;var b;ib?b=a[ib]:b=a.g;return null==b?0:b}function lb(a){if(!Array.isArray(a))return a;jb(a,1);return a}function mb(a){if(!Array.isArray(a))throw Error(\"cannot mark non-array as immutable\");jb(a,2)};function nb(a){return null!==a&&\"object\"===typeof a&&a.constructor===Object}function ob(a){switch(typeof a){case \"number\":return isFinite(a)?a:String(a);case \"object\":return Na&&null!=a&&a instanceof Uint8Array?Ja(a):a;default:return a}};function pb(a,b){if(null!=a)return Array.isArray(a)||nb(a)?qb(a,b):b(a)}function qb(a,b){if(Array.isArray(a)){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=pb(a[d],b);kb(a)&1&&lb(c);return c}c={};for(d in a)c[d]=pb(a[d],b);return c};var rb;function O(a,b,c){var d=rb;rb=null;a||(a=d);d=this.constructor.ba;a||(a=d?[d]:[]);this.j=(d?0:-1)-(this.constructor.$||0);this.m=this.g=null;this.h=a;a:{d=this.h.length;a=d-1;if(d&&(d=this.h[a],nb(d))){this.l=a-this.j;this.i=d;break a}void 0!==b&&-1<b?(this.l=Math.max(b,a+1-this.j),this.i=null):this.l=Number.MAX_VALUE}if(c)for(b=0;b<c.length;b++)a=c[b],a<this.l?(a+=this.j,(d=this.h[a])?lb(d):this.h[a]=sb):(tb(this),(d=this.i[a])?lb(d):this.i[a]=sb)}var sb=Object.freeze(lb([]));\nfunction tb(a){var b=a.l+a.j;a.h[b]||(a.i=a.h[b]={})}function P(a,b,c){return-1===b?null:(void 0===c?0:c)||b>=a.l?a.i?a.i[b]:void 0:a.h[b+a.j]}function ub(a,b,c){c=void 0===c?!0:c;var d=void 0===d?!1:d;var e=P(a,b,d);null==e&&(e=sb);e===sb?(e=lb([]),Q(a,b,e,d)):c&&Array.isArray(e)&&kb(e)&2&&(e=e.slice(),Q(a,b,e,d));return e}function vb(a){var b=ub(a,3,!1);a.m||(a.m={});if(!a.m[3]){for(var c=0;c<b.length;c++)b[c]=+b[c];a.m[3]=!0}return b}function R(a,b,c){a=P(a,b);return null==a?c:a}\nfunction S(a,b,c){a=P(a,b);a=null==a?a:+a;return null==a?void 0===c?0:c:a}function Q(a,b,c,d){(void 0===d?0:d)||b>=a.l?(tb(a),a.i[b]=c):a.h[b+a.j]=c}function wb(a,b,c){if(-1===c)return null;a.g||(a.g={});var d=a.g[c];if(d)return d;var e=P(a,c,!1);if(null==e)return d;b=new b(e);return a.g[c]=b}\nfunction xb(a,b,c){a.g||(a.g={});var d=a.g[c];if(!d){var e=ub(a,c,!1);d=[];for(var g=Array.isArray(e)?!!(kb(e)&2):!1,f=0;f<e.length;f++)d[f]=new b(e[f]),g&&mb(d[f].h);g&&(mb(d),Object.freeze(d));a.g[c]=d}return d}function yb(a,b,c,d,e){var g=xb(a,d,b);c=c?c:new d;a=ub(a,b);void 0!=e?(g.splice(e,0,c),a.splice(e,0,T(c))):(g.push(c),a.push(T(c)))}O.prototype.toJSON=function(){var a=T(this);return qb(a,ob)};\nfunction T(a){if(a.g)for(var b in a.g){var c=a.g[b];if(Array.isArray(c))for(var d=0;d<c.length;d++)c[d]&&T(c[d]);else c&&T(c)}return a.h}O.prototype.toString=function(){return T(this).toString()};function zb(a,b){if(a=a.o){gb(b,b.g.end());for(var c=0;c<a.length;c++)gb(b,a[c])}}function Ab(a){var b=a[0];switch(a.length){case 2:var c=a[1];return function(h,l,n){return b(h,l,n,c)};case 3:var d=a[1],e=a[2];return function(h,l,n){return b(h,l,n,d,e)};case 4:var g=a[1],f=a[2],k=a[3];return function(h,l,n){return b(h,l,n,g,f,k)};default:throw Error(\"unsupported number of parameters, expected [2-4], got \"+a.length);}}\nfunction U(a,b,c){for(;$a(b)&&4!=b.h;){var d=b.i,e=c[d];if(e){if(Array.isArray(e)&&(e=c[d]=Ab(e)),!e(b,a,d)){d=b;e=a;var g=d.l;ab(d);bb(d,e,g)}}else d=b,e=a,g=d.l,ab(d),bb(d,e,g)}return a}function Bb(a,b){var c=new fb;b(a,c);a=c.i+c.g.length();if(0===a)c=new Uint8Array(0);else{a=new Uint8Array(a);for(var d=c.h,e=d.length,g=b=0;g<e;g++){var f=d[g];0!==f.length&&(a.set(f,b),b+=f.length)}d=c.g;e=d.h;0!==e&&(a.set(d.g.subarray(0,e),b),d.h=0);c.h=[a];c=a}return c}\nfunction Cb(a,b,c){if(eb.length){var d=eb.pop();a&&(Ua(d.g,a),d.i=-1,d.h=-1);a=d}else a=new Za(a);try{return c(new b,a)}finally{b=a.g,b.h=null,b.m=0,b.i=0,b.g=0,b.l=!1,b.u=!1,a.i=-1,a.h=-1,a.j=!1,100>eb.length&&eb.push(a)}}\nfunction W(a,b,c){b=P(b,c);if(null!=b){Ya(a.g,8*c+5);a=a.g;var d=b;d=(c=0>d?1:0)?-d:d;0===d?0<1/d?K=L=0:(L=0,K=2147483648):isNaN(d)?(L=0,K=2147483647):3.4028234663852886E38<d?(L=0,K=(c<<31|2139095040)>>>0):1.1754943508222875E-38>d?(d=Math.round(d/Math.pow(2,-149)),L=0,K=(c<<31|d)>>>0):(b=Math.floor(Math.log(d)/Math.LN2),d*=Math.pow(2,-b),d=Math.round(8388608*d),16777216<=d&&++b,L=0,K=(c<<31|b+127<<23|d&8388607)>>>0);c=K;N(a,c>>>0&255);N(a,c>>>8&255);N(a,c>>>16&255);N(a,c>>>24&255)}}\nfunction X(a,b,c){if(5!==a.h)return!1;Q(b,c,a.g.o());return!0}function Db(a,b,c){if(5!==a.h&&2!==a.h)return!1;b=ub(b,c);2==a.h?db(a,Ta.prototype.o,b):b.push(a.g.o());return!0}function Eb(a,b,c){if(0!==a.h)return!1;Q(b,c,Va(a.g));return!0}function Fb(a,b,c){if(0!==a.h)return!1;Q(b,c,a.g.j());return!0}\nfunction Gb(a,b,c){if(2!==a.h)return!1;var d=a.g.j();a=a.g;var e=a.g;a.g+=d;M(a);a=a.h;var g;if(Da)(g=Ca)||(g=Ca=new TextDecoder(\"utf-8\",{fatal:!1})),g=g.decode(a.subarray(e,e+d));else{d=e+d;for(var f=[],k=null,h,l,n;e<d;)h=a[e++],128>h?f.push(h):224>h?e>=d?f.push(65533):(l=a[e++],194>h||128!==(l&192)?(e--,f.push(65533)):f.push((h&31)<<6|l&63)):240>h?e>=d-1?f.push(65533):(l=a[e++],128!==(l&192)||224===h&&160>l||237===h&&160<=l||128!==((g=a[e++])&192)?(e--,f.push(65533)):f.push((h&15)<<12|(l&63)<<\n6|g&63)):244>=h?e>=d-2?f.push(65533):(l=a[e++],128!==(l&192)||0!==(h<<28)+(l-144)>>30||128!==((g=a[e++])&192)||128!==((n=a[e++])&192)?(e--,f.push(65533)):(h=(h&7)<<18|(l&63)<<12|(g&63)<<6|n&63,h-=65536,f.push((h>>10&1023)+55296,(h&1023)+56320))):f.push(65533),8192<=f.length&&(k=Ba(k,f),f.length=0);g=Ba(k,f)}Q(b,c,g);return!0}function Hb(a,b,c,d,e){if(2!==a.h)return!1;a=cb(a,new d,e);var g=void 0===g?!1:g;b.g||(b.g={});d=a?T(a):a;b.g[c]=a;Q(b,c,d,g);return!0}\nfunction Ib(a,b,c,d,e){if(2!==a.h)return!1;a=cb(a,new d,e);yb(b,c,a,d,void 0);return!0}function Jb(a,b,c){if(0!==a.h&&2!==a.h)return!1;b=ub(b,c);2==a.h?db(a,Ta.prototype.j,b):b.push(a.g.j());return!0}function Kb(a,b,c){if(0!==a.h)return!1;Q(b,c,Va(a.g));return!0};function Y(a){O.call(this,a,-1,Lb)}var Mb;E(Y,O);Y.prototype.getRows=function(){return P(this,1)};Y.prototype.getCols=function(){return P(this,2)};Y.prototype.getPackedDataList=function(){return vb(this)};Y.prototype.getLayout=function(){return R(this,4,0)};function Nb(a,b){return U(a,b,Mb||(Mb={1:Fb,2:Fb,3:Db,4:Kb}))}var Lb=[3];function Ob(a){O.call(this,a)}var Pb;E(Ob,O);function Qb(a,b){var c=P(a,1);if(null!=c&&null!=c){Ya(b.g,8);var d=b.g;if(0<=c)Ya(d,c);else{for(var e=0;9>e;e++)N(d,c&127|128),c>>=7;N(d,1)}}W(b,a,2);d=P(a,3);null!=d&&hb(b,3,Ga(d));d=P(a,4);null!=d&&hb(b,4,Ga(d));zb(a,b)}function Rb(a,b){return U(a,b,Pb||(Pb={1:Fb,2:X,3:Gb,4:Gb}))};function Sb(a){O.call(this,a,-1,Tb)}var Ub;E(Sb,O);Sb.prototype.addClassification=function(a,b){yb(this,1,a,Ob,b);return this};function Vb(a,b){return U(a,b,Ub||(Ub={1:[Ib,Ob,Rb]}))}var Tb=[1];function Wb(a){O.call(this,a)}var Xb;E(Wb,O);function Yb(a,b){W(b,a,1);W(b,a,2);W(b,a,3);W(b,a,4);W(b,a,5);zb(a,b)}function Zb(a,b){return U(a,b,Xb||(Xb={1:X,2:X,3:X,4:X,5:X}))};function $b(a){O.call(this,a,-1,ac)}var bc;E($b,O);function cc(a,b){return U(a,b,bc||(bc={1:[Ib,Wb,Zb]}))}var ac=[1];function dc(a){O.call(this,a)}var ec;E(dc,O);function fc(a,b){W(b,a,1);W(b,a,2);W(b,a,3);W(b,a,4);W(b,a,5);var c=P(a,6);if(null!=c&&null!=c){Ya(b.g,48);var d=b.g,e=c;c=0>e;e=Math.abs(e);var g=e>>>0;e=Math.floor((e-g)/4294967296);e>>>=0;c&&(e=~e>>>0,g=(~g>>>0)+1,4294967295<g&&(g=0,e++,4294967295<e&&(e=0)));K=g;L=e;c=K;for(g=L;0<g||127<c;)N(d,c&127|128),c=(c>>>7|g<<25)>>>0,g>>>=7;N(d,c)}zb(a,b)}function gc(a,b){return U(a,b,ec||(ec={1:X,2:X,3:X,4:X,5:X,6:Eb}))};function Z(a){O.call(this,a,-1,hc)}var ic;E(Z,O);Z.prototype.getVertexType=function(){return R(this,1,0)};Z.prototype.getPrimitiveType=function(){return R(this,2,0)};Z.prototype.getVertexBufferList=function(){return vb(this)};Z.prototype.getIndexBufferList=function(){return ub(this,4)};function jc(a,b){return U(a,b,ic||(ic={1:Kb,2:Kb,3:Db,4:Jb}))}var hc=[3,4];function kc(a){O.call(this,a)}var lc;E(kc,O);kc.prototype.getMesh=function(){return wb(this,Z,1)};kc.prototype.getPoseTransformMatrix=function(){return wb(this,Y,2)};function mc(a,b){return U(a,b,lc||(lc={1:[Hb,Z,jc],2:[Hb,Y,Nb]}))};var nc=[[61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]],oc=[[263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,\n385],[385,384],[384,398],[398,362]],pc=[[276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]],qc=[[33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]],rc=[[46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]],sc=[[10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],\n[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]],tc=[].concat(D(nc),D(oc),D(pc),D(qc),D(rc),D(sc));function uc(a,b,c){c=a.createShader(0===c?a.VERTEX_SHADER:a.FRAGMENT_SHADER);a.shaderSource(c,b);a.compileShader(c);if(!a.getShaderParameter(c,a.COMPILE_STATUS))throw Error(\"Could not compile WebGL shader.\\n\\n\"+a.getShaderInfoLog(c));return c};function vc(a){return xb(a,Ob,1).map(function(b){return{index:R(b,1,0),score:S(b,2),label:null!=P(b,3)?R(b,3,\"\"):void 0,displayName:null!=P(b,4)?R(b,4,\"\"):void 0}})};function wc(a){return{x:S(a,1),y:S(a,2),z:S(a,3),visibility:null!=P(a,4)?S(a,4):void 0}}function xc(a){return xb(Cb(a,$b,cc),Wb,1).map(wc)};function yc(a,b){this.h=a;this.g=b;this.l=0}\nfunction zc(a,b,c){Ac(a,b);if(\"function\"===typeof a.g.canvas.transferToImageBitmap)return Promise.resolve(a.g.canvas.transferToImageBitmap());if(c)return Promise.resolve(a.g.canvas);if(\"function\"===typeof createImageBitmap)return createImageBitmap(a.g.canvas);void 0===a.i&&(a.i=document.createElement(\"canvas\"));return new Promise(function(d){a.i.height=a.g.canvas.height;a.i.width=a.g.canvas.width;a.i.getContext(\"2d\",{}).drawImage(a.g.canvas,0,0,a.g.canvas.width,a.g.canvas.height);d(a.i)})}\nfunction Ac(a,b){var c=a.g;if(void 0===a.m){var d=uc(c,\"\\n  attribute vec2 aVertex;\\n  attribute vec2 aTex;\\n  varying vec2 vTex;\\n  void main(void) {\\n    gl_Position = vec4(aVertex, 0.0, 1.0);\\n    vTex = aTex;\\n  }\",0),e=uc(c,\"\\n  precision mediump float;\\n  varying vec2 vTex;\\n  uniform sampler2D sampler0;\\n  void main(){\\n    gl_FragColor = texture2D(sampler0, vTex);\\n  }\",1),g=c.createProgram();c.attachShader(g,d);c.attachShader(g,e);c.linkProgram(g);if(!c.getProgramParameter(g,c.LINK_STATUS))throw Error(\"Could not compile WebGL program.\\n\\n\"+\nc.getProgramInfoLog(g));d=a.m=g;c.useProgram(d);e=c.getUniformLocation(d,\"sampler0\");a.j={I:c.getAttribLocation(d,\"aVertex\"),H:c.getAttribLocation(d,\"aTex\"),ca:e};a.s=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,a.s);c.enableVertexAttribArray(a.j.I);c.vertexAttribPointer(a.j.I,2,c.FLOAT,!1,0,0);c.bufferData(c.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),c.STATIC_DRAW);c.bindBuffer(c.ARRAY_BUFFER,null);a.o=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,a.o);c.enableVertexAttribArray(a.j.H);c.vertexAttribPointer(a.j.H,\n2,c.FLOAT,!1,0,0);c.bufferData(c.ARRAY_BUFFER,new Float32Array([0,1,0,0,1,0,1,1]),c.STATIC_DRAW);c.bindBuffer(c.ARRAY_BUFFER,null);c.uniform1i(e,0)}d=a.j;c.useProgram(a.m);c.canvas.width=b.width;c.canvas.height=b.height;c.viewport(0,0,b.width,b.height);c.activeTexture(c.TEXTURE0);a.h.bindTexture2d(b.glName);c.enableVertexAttribArray(d.I);c.bindBuffer(c.ARRAY_BUFFER,a.s);c.vertexAttribPointer(d.I,2,c.FLOAT,!1,0,0);c.enableVertexAttribArray(d.H);c.bindBuffer(c.ARRAY_BUFFER,a.o);c.vertexAttribPointer(d.H,\n2,c.FLOAT,!1,0,0);c.bindFramebuffer(c.DRAW_FRAMEBUFFER?c.DRAW_FRAMEBUFFER:c.FRAMEBUFFER,null);c.clearColor(0,0,0,0);c.clear(c.COLOR_BUFFER_BIT);c.colorMask(!0,!0,!0,!0);c.drawArrays(c.TRIANGLE_FAN,0,4);c.disableVertexAttribArray(d.I);c.disableVertexAttribArray(d.H);c.bindBuffer(c.ARRAY_BUFFER,null);a.h.bindTexture2d(0)}function Bc(a){this.g=a};var Cc=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]);function Dc(a,b){return b+a}function Ec(a,b){window[a]=b}function Fc(a){var b=document.createElement(\"script\");b.setAttribute(\"src\",a);b.setAttribute(\"crossorigin\",\"anonymous\");return new Promise(function(c){b.addEventListener(\"load\",function(){c()},!1);b.addEventListener(\"error\",function(){c()},!1);document.body.appendChild(b)})}\nfunction Gc(){return H(function(a){switch(a.g){case 1:return a.m=2,F(a,WebAssembly.instantiate(Cc),4);case 4:a.g=3;a.m=0;break;case 2:return a.m=0,a.j=null,a.return(!1);case 3:return a.return(!0)}})}\nfunction Hc(a){this.g=a;this.listeners={};this.j={};this.F={};this.m={};this.s={};this.G=this.o=this.R=!0;this.C=Promise.resolve();this.P=\"\";this.B={};this.locateFile=a&&a.locateFile||Dc;if(\"object\"===typeof window)var b=window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf(\"/\"))+\"/\";else if(\"undefined\"!==typeof location)b=location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf(\"/\"))+\"/\";else throw Error(\"solutions can only be loaded on a web page or in a web worker\");\nthis.S=b;if(a.options){b=B(Object.keys(a.options));for(var c=b.next();!c.done;c=b.next()){c=c.value;var d=a.options[c].default;void 0!==d&&(this.j[c]=\"function\"===typeof d?d():d)}}}x=Hc.prototype;x.close=function(){this.i&&this.i.delete();return Promise.resolve()};\nfunction Ic(a){var b,c,d,e,g,f,k,h,l,n,r;return H(function(p){switch(p.g){case 1:if(!a.R)return p.return();b=void 0===a.g.files?[]:\"function\"===typeof a.g.files?a.g.files(a.j):a.g.files;return F(p,Gc(),2);case 2:c=p.h;if(\"object\"===typeof window)return Ec(\"createMediapipeSolutionsWasm\",{locateFile:a.locateFile}),Ec(\"createMediapipeSolutionsPackedAssets\",{locateFile:a.locateFile}),f=b.filter(function(m){return void 0!==m.data}),k=b.filter(function(m){return void 0===m.data}),h=Promise.all(f.map(function(m){var q=\nJc(a,m.url);if(void 0!==m.path){var t=m.path;q=q.then(function(w){a.overrideFile(t,w);return Promise.resolve(w)})}return q})),l=Promise.all(k.map(function(m){return void 0===m.simd||m.simd&&c||!m.simd&&!c?Fc(a.locateFile(m.url,a.S)):Promise.resolve()})).then(function(){var m,q,t;return H(function(w){if(1==w.g)return m=window.createMediapipeSolutionsWasm,q=window.createMediapipeSolutionsPackedAssets,t=a,F(w,m(q),2);t.h=w.h;w.g=0})}),n=function(){return H(function(m){a.g.graph&&a.g.graph.url?m=F(m,\nJc(a,a.g.graph.url),0):(m.g=0,m=void 0);return m})}(),F(p,Promise.all([l,h,n]),7);if(\"function\"!==typeof importScripts)throw Error(\"solutions can only be loaded on a web page or in a web worker\");d=b.filter(function(m){return void 0===m.simd||m.simd&&c||!m.simd&&!c}).map(function(m){return a.locateFile(m.url,a.S)});importScripts.apply(null,D(d));e=a;return F(p,createMediapipeSolutionsWasm(Module),6);case 6:e.h=p.h;a.l=new OffscreenCanvas(1,1);a.h.canvas=a.l;g=a.h.GL.createContext(a.l,{antialias:!1,\nalpha:!1,aa:\"undefined\"!==typeof WebGL2RenderingContext?2:1});a.h.GL.makeContextCurrent(g);p.g=4;break;case 7:a.l=document.createElement(\"canvas\");r=a.l.getContext(\"webgl2\",{});if(!r&&(r=a.l.getContext(\"webgl\",{}),!r))return alert(\"Failed to create WebGL canvas context when passing video frame.\"),p.return();a.D=r;a.h.canvas=a.l;a.h.createContext(a.l,!0,!0,{});case 4:a.i=new a.h.SolutionWasm,a.R=!1,p.g=0}})}\nfunction Kc(a){var b,c,d,e,g,f,k,h;return H(function(l){if(1==l.g){if(a.g.graph&&a.g.graph.url&&a.P===a.g.graph.url)return l.return();a.o=!0;if(!a.g.graph||!a.g.graph.url){l.g=2;return}a.P=a.g.graph.url;return F(l,Jc(a,a.g.graph.url),3)}2!=l.g&&(b=l.h,a.i.loadGraph(b));c=B(Object.keys(a.B));for(d=c.next();!d.done;d=c.next())e=d.value,a.i.overrideFile(e,a.B[e]);a.B={};if(a.g.listeners)for(g=B(a.g.listeners),f=g.next();!f.done;f=g.next())k=f.value,Lc(a,k);h=a.j;a.j={};a.setOptions(h);l.g=0})}\nx.reset=function(){var a=this;return H(function(b){a.i&&(a.i.reset(),a.m={},a.s={});b.g=0})};\nx.setOptions=function(a,b){var c=this;if(b=b||this.g.options){for(var d=[],e=[],g={},f=B(Object.keys(a)),k=f.next();!k.done;g={K:g.K,L:g.L},k=f.next()){var h=k.value;h in this.j&&this.j[h]===a[h]||(this.j[h]=a[h],k=b[h],void 0!==k&&(k.onChange&&(g.K=k.onChange,g.L=a[h],d.push(function(l){return function(){var n;return H(function(r){if(1==r.g)return F(r,l.K(l.L),2);n=r.h;!0===n&&(c.o=!0);r.g=0})}}(g))),k.graphOptionXref&&(h={valueNumber:1===k.type?a[h]:0,valueBoolean:0===k.type?a[h]:!1,valueString:2===\nk.type?a[h]:\"\"},k=Object.assign(Object.assign(Object.assign({},{calculatorName:\"\",calculatorIndex:0}),k.graphOptionXref),h),e.push(k))))}if(0!==d.length||0!==e.length)this.o=!0,this.A=(void 0===this.A?[]:this.A).concat(e),this.v=(void 0===this.v?[]:this.v).concat(d)}};\nfunction Mc(a){var b,c,d,e,g,f,k;return H(function(h){switch(h.g){case 1:if(!a.o)return h.return();if(!a.v){h.g=2;break}b=B(a.v);c=b.next();case 3:if(c.done){h.g=5;break}d=c.value;return F(h,d(),4);case 4:c=b.next();h.g=3;break;case 5:a.v=void 0;case 2:if(a.A){e=new a.h.GraphOptionChangeRequestList;g=B(a.A);for(f=g.next();!f.done;f=g.next())k=f.value,e.push_back(k);a.i.changeOptions(e);e.delete();a.A=void 0}a.o=!1;h.g=0}})}\nx.initialize=function(){var a=this;return H(function(b){return 1==b.g?F(b,Ic(a),2):3!=b.g?F(b,Kc(a),3):F(b,Mc(a),0)})};function Jc(a,b){var c,d;return H(function(e){if(b in a.F)return e.return(a.F[b]);c=a.locateFile(b,\"\");d=fetch(c).then(function(g){return g.arrayBuffer()});a.F[b]=d;return e.return(d)})}x.overrideFile=function(a,b){this.i?this.i.overrideFile(a,b):this.B[a]=b};x.clearOverriddenFiles=function(){this.B={};this.i&&this.i.clearOverriddenFiles()};\nx.send=function(a,b){var c=this,d,e,g,f,k,h,l,n,r;return H(function(p){switch(p.g){case 1:if(!c.g.inputs)return p.return();d=1E3*(void 0===b||null===b?performance.now():b);return F(p,c.C,2);case 2:return F(p,c.initialize(),3);case 3:e=new c.h.PacketDataList;g=B(Object.keys(a));for(f=g.next();!f.done;f=g.next())if(k=f.value,h=c.g.inputs[k]){a:{var m=a[k];switch(h.type){case \"video\":var q=c.m[h.stream];q||(q=new yc(c.h,c.D),c.m[h.stream]=q);0===q.l&&(q.l=q.h.createTexture());if(\"undefined\"!==typeof HTMLVideoElement&&\nm instanceof HTMLVideoElement){var t=m.videoWidth;var w=m.videoHeight}else\"undefined\"!==typeof HTMLImageElement&&m instanceof HTMLImageElement?(t=m.naturalWidth,w=m.naturalHeight):(t=m.width,w=m.height);w={glName:q.l,width:t,height:w};t=q.g;t.canvas.width=w.width;t.canvas.height=w.height;t.activeTexture(t.TEXTURE0);q.h.bindTexture2d(q.l);t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,m);q.h.bindTexture2d(0);q=w;break a;case \"detections\":q=c.m[h.stream];q||(q=new Bc(c.h),c.m[h.stream]=q);\nq.data||(q.data=new q.g.DetectionListData);q.data.reset(m.length);for(w=0;w<m.length;++w){t=m[w];var v=q.data,C=v.setBoundingBox,J=w;var G=t.T;var u=new dc;Q(u,1,G.X);Q(u,2,G.Y);Q(u,3,G.height);Q(u,4,G.width);Q(u,5,G.rotation);Q(u,6,G.W);G=Bb(u,fc);C.call(v,J,G);if(t.O)for(v=0;v<t.O.length;++v){u=t.O[v];var A=u.visibility?!0:!1;C=q.data;J=C.addNormalizedLandmark;G=w;u=Object.assign(Object.assign({},u),{visibility:A?u.visibility:0});A=new Wb;Q(A,1,u.x);Q(A,2,u.y);Q(A,3,u.z);u.visibility&&Q(A,4,u.visibility);\nu=Bb(A,Yb);J.call(C,G,u)}if(t.M)for(v=0;v<t.M.length;++v)C=q.data,J=C.addClassification,G=w,u=t.M[v],A=new Ob,Q(A,2,u.score),u.index&&Q(A,1,u.index),u.label&&Q(A,3,u.label),u.displayName&&Q(A,4,u.displayName),u=Bb(A,Qb),J.call(C,G,u)}q=q.data;break a;default:q={}}}l=q;n=h.stream;switch(h.type){case \"video\":e.pushTexture2d(Object.assign(Object.assign({},l),{stream:n,timestamp:d}));break;case \"detections\":r=l;r.stream=n;r.timestamp=d;e.pushDetectionList(r);break;default:throw Error(\"Unknown input config type: '\"+\nh.type+\"'\");}}c.i.send(e);return F(p,c.C,4);case 4:e.delete(),p.g=0}})};\nfunction Nc(a,b,c){var d,e,g,f,k,h,l,n,r,p,m,q,t,w;return H(function(v){switch(v.g){case 1:if(!c)return v.return(b);d={};e=0;g=B(Object.keys(c));for(f=g.next();!f.done;f=g.next())k=f.value,h=c[k],\"string\"!==typeof h&&\"texture\"===h.type&&void 0!==b[h.stream]&&++e;1<e&&(a.G=!1);l=B(Object.keys(c));f=l.next();case 2:if(f.done){v.g=4;break}n=f.value;r=c[n];if(\"string\"===typeof r)return t=d,w=n,F(v,Oc(a,n,b[r]),14);p=b[r.stream];if(\"detection_list\"===r.type){if(p){var C=p.getRectList();for(var J=p.getLandmarksList(),\nG=p.getClassificationsList(),u=[],A=0;A<C.size();++A){var V=Cb(C.get(A),dc,gc);V={T:{X:S(V,1),Y:S(V,2),height:S(V,3),width:S(V,4),rotation:S(V,5,0),W:R(V,6,0)},O:xc(J.get(A)),M:vc(Cb(G.get(A),Sb,Vb))};u.push(V)}C=u}else C=[];d[n]=C;v.g=7;break}if(\"proto_list\"===r.type){if(p){C=Array(p.size());for(J=0;J<p.size();J++)C[J]=p.get(J);p.delete()}else C=[];d[n]=C;v.g=7;break}if(void 0===p){v.g=3;break}if(\"float_list\"===r.type){d[n]=p;v.g=7;break}if(\"proto\"===r.type){d[n]=p;v.g=7;break}if(\"texture\"!==r.type)throw Error(\"Unknown output config type: '\"+\nr.type+\"'\");m=a.s[n];m||(m=new yc(a.h,a.D),a.s[n]=m);return F(v,zc(m,p,a.G),13);case 13:q=v.h,d[n]=q;case 7:r.transform&&d[n]&&(d[n]=r.transform(d[n]));v.g=3;break;case 14:t[w]=v.h;case 3:f=l.next();v.g=2;break;case 4:return v.return(d)}})}function Oc(a,b,c){var d;return H(function(e){return\"number\"===typeof c||c instanceof Uint8Array||c instanceof a.h.Uint8BlobList?e.return(c):c instanceof a.h.Texture2dDataOut?(d=a.s[b],d||(d=new yc(a.h,a.D),a.s[b]=d),e.return(zc(d,c,a.G))):e.return(void 0)})}\nfunction Lc(a,b){for(var c=b.name||\"$\",d=[].concat(D(b.wants)),e=new a.h.StringList,g=B(b.wants),f=g.next();!f.done;f=g.next())e.push_back(f.value);g=a.h.PacketListener.implement({onResults:function(k){for(var h={},l=0;l<b.wants.length;++l)h[d[l]]=k.get(l);var n=a.listeners[c];n&&(a.C=Nc(a,h,b.outs).then(function(r){r=n(r);for(var p=0;p<b.wants.length;++p){var m=h[d[p]];\"object\"===typeof m&&m.hasOwnProperty&&m.hasOwnProperty(\"delete\")&&m.delete()}r&&(a.C=r)}))}});a.i.attachMultiListener(e,g);e.delete()}\nx.onResults=function(a,b){this.listeners[b||\"$\"]=a};I(\"Solution\",Hc);I(\"OptionType\",{BOOL:0,NUMBER:1,Z:2,0:\"BOOL\",1:\"NUMBER\",2:\"STRING\"});function Pc(a){return a.map(Qc)}function Qc(a){a=Cb(a,kc,mc);var b=a.getMesh();if(!b)return a;var c=new Float32Array(b.getVertexBufferList());b.getVertexBufferList=function(){return c};var d=new Uint32Array(b.getIndexBufferList());b.getIndexBufferList=function(){return d};return a};function Rc(a){var b=this;a=a||{};this.g=new Hc({locateFile:a.locateFile,files:[{url:\"holistic_solution_packed_assets_loader.js\"},{simd:!1,url:\"holistic_solution_wasm_bin.js\"},{simd:!0,url:\"holistic_solution_simd_wasm_bin.js\"}],graph:{url:\"holistic.binarypb\"},inputs:{image:{type:\"video\",stream:\"input_frames_gpu\"}},listeners:[{wants:\"left_hand_landmarks right_hand_landmarks face_landmarks pose_landmarks world_landmarks segmentation_mask image_transformed multi_face_geometry\".split(\" \"),outs:{image:{type:\"texture\",\nstream:\"image_transformed\"},leftHandLandmarks:{type:\"proto\",stream:\"left_hand_landmarks\",transform:xc},rightHandLandmarks:{type:\"proto\",stream:\"right_hand_landmarks\",transform:xc},faceLandmarks:{type:\"proto\",stream:\"face_landmarks\",transform:xc},poseLandmarks:{type:\"proto\",stream:\"pose_landmarks\",transform:xc},ea:{type:\"proto\",stream:\"world_landmarks\",transform:xc},segmentationMask:{type:\"texture\",stream:\"segmentation_mask\"},multiFaceGeometry:{type:\"proto_list\",stream:\"multi_face_geometry\",transform:Pc}}}],\noptions:{useCpuInference:{type:0,graphOptionXref:{calculatorType:\"InferenceCalculator\",fieldName:\"use_cpu_inference\"},default:\"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod\".split(\";\").includes(navigator.platform)||navigator.userAgent.includes(\"Mac\")&&\"ontouchend\"in document},enableFaceGeometry:{type:0,graphOptionXref:{calculatorName:\"EnableFaceGeometryConstant\",calculatorType:\"ConstantSidePacketCalculator\",fieldName:\"bool_value\"}},selfieMode:{type:0,graphOptionXref:{calculatorType:\"GlScalerCalculator\",\ncalculatorIndex:1,fieldName:\"flip_horizontal\"}},modelComplexity:{type:1,default:1,graphOptionXref:{calculatorType:\"ConstantSidePacketCalculator\",calculatorName:\"ConstantSidePacketCalculatorModelComplexity\",fieldName:\"int_value\"},onChange:function(c){var d,e,g,f;return H(function(k){if(1==k.g){d=\"\";switch(c){case 1:d=\"pose_landmark_full.tflite\";break;case 2:d=\"pose_landmark_heavy.tflite\";break;default:d=\"pose_landmark_lite.tflite\"}e=\"third_party/mediapipe/modules/pose_landmark/\"+d;g=b.g.locateFile(d,\n\"\");return F(k,fetch(g),3)}if(2!=k.g)return F(k,k.h.arrayBuffer(),2);f=k.h;b.g.overrideFile(e,f);return F(k,b.g.reset(),0)})}},smoothLandmarks:{type:0,graphOptionXref:{calculatorType:\"ConstantSidePacketCalculator\",calculatorName:\"ConstantSidePacketCalculatorSmoothLandmarks\",fieldName:\"bool_value\"}},enableSegmentation:{type:0,graphOptionXref:{calculatorType:\"ConstantSidePacketCalculator\",calculatorName:\"ConstantSidePacketCalculatorEnableSegmentation\",fieldName:\"bool_value\"}},smoothSegmentation:{type:0,\ngraphOptionXref:{calculatorType:\"ConstantSidePacketCalculator\",calculatorName:\"ConstantSidePacketCalculatorSmoothSegmentation\",fieldName:\"bool_value\"}},refineFaceLandmarks:{type:0,graphOptionXref:{calculatorType:\"ConstantSidePacketCalculator\",calculatorName:\"ConstantSidePacketCalculatorRefineFaceLandmarks\",fieldName:\"bool_value\"}},minDetectionConfidence:{type:1,graphOptionXref:{calculatorType:\"TensorsToDetectionsCalculator\",calculatorName:\"holisticlandmarkgpu__poselandmarkgpu__posedetectiongpu__TensorsToDetectionsCalculator\",\nfieldName:\"min_score_thresh\"}},minTrackingConfidence:{type:1,graphOptionXref:{calculatorType:\"ThresholdingCalculator\",calculatorName:\"holisticlandmarkgpu__poselandmarkgpu__poselandmarkbyroigpu__tensorstoposelandmarksandsegmentation__ThresholdingCalculator\",fieldName:\"threshold\"}},cameraNear:{type:1,graphOptionXref:{calculatorType:\"FaceGeometryEnvGeneratorCalculator\",fieldName:\"near\"}},cameraFar:{type:1,graphOptionXref:{calculatorType:\"FaceGeometryEnvGeneratorCalculator\",fieldName:\"far\"}},cameraVerticalFovDegrees:{type:1,\ngraphOptionXref:{calculatorType:\"FaceGeometryEnvGeneratorCalculator\",fieldName:\"vertical_fov_degrees\"}}}})}x=Rc.prototype;x.close=function(){this.g.close();return Promise.resolve()};x.onResults=function(a){this.g.onResults(a)};x.initialize=function(){var a=this;return H(function(b){return F(b,a.g.initialize(),0)})};x.reset=function(){this.g.reset()};x.send=function(a){var b=this;return H(function(c){return F(c,b.g.send(a),0)})};x.setOptions=function(a){this.g.setOptions(a)};I(\"Holistic\",Rc);\nI(\"FACE_GEOMETRY\",{Layout:{COLUMN_MAJOR:0,ROW_MAJOR:1,0:\"COLUMN_MAJOR\",1:\"ROW_MAJOR\"},PrimitiveType:{TRIANGLE:0,0:\"TRIANGLE\"},VertexType:{VERTEX_PT:0,0:\"VERTEX_PT\"},DEFAULT_CAMERA_PARAMS:{verticalFovDegrees:63,near:1,far:1E4}});I(\"FACEMESH_LIPS\",nc);I(\"FACEMESH_LEFT_EYE\",oc);I(\"FACEMESH_LEFT_EYEBROW\",pc);I(\"FACEMESH_LEFT_IRIS\",[[474,475],[475,476],[476,477],[477,474]]);I(\"FACEMESH_RIGHT_EYE\",qc);I(\"FACEMESH_RIGHT_EYEBROW\",rc);I(\"FACEMESH_RIGHT_IRIS\",[[469,470],[470,471],[471,472],[472,469]]);\nI(\"FACEMESH_FACE_OVAL\",sc);I(\"FACEMESH_CONTOURS\",tc);\nI(\"FACEMESH_TESSELATION\",[[127,34],[34,139],[139,127],[11,0],[0,37],[37,11],[232,231],[231,120],[120,232],[72,37],[37,39],[39,72],[128,121],[121,47],[47,128],[232,121],[121,128],[128,232],[104,69],[69,67],[67,104],[175,171],[171,148],[148,175],[118,50],[50,101],[101,118],[73,39],[39,40],[40,73],[9,151],[151,108],[108,9],[48,115],[115,131],[131,48],[194,204],[204,211],[211,194],[74,40],[40,185],[185,74],[80,42],[42,183],[183,80],[40,92],[92,186],[186,40],[230,229],[229,118],[118,230],[202,212],[212,\n214],[214,202],[83,18],[18,17],[17,83],[76,61],[61,146],[146,76],[160,29],[29,30],[30,160],[56,157],[157,173],[173,56],[106,204],[204,194],[194,106],[135,214],[214,192],[192,135],[203,165],[165,98],[98,203],[21,71],[71,68],[68,21],[51,45],[45,4],[4,51],[144,24],[24,23],[23,144],[77,146],[146,91],[91,77],[205,50],[50,187],[187,205],[201,200],[200,18],[18,201],[91,106],[106,182],[182,91],[90,91],[91,181],[181,90],[85,84],[84,17],[17,85],[206,203],[203,36],[36,206],[148,171],[171,140],[140,148],[92,\n40],[40,39],[39,92],[193,189],[189,244],[244,193],[159,158],[158,28],[28,159],[247,246],[246,161],[161,247],[236,3],[3,196],[196,236],[54,68],[68,104],[104,54],[193,168],[168,8],[8,193],[117,228],[228,31],[31,117],[189,193],[193,55],[55,189],[98,97],[97,99],[99,98],[126,47],[47,100],[100,126],[166,79],[79,218],[218,166],[155,154],[154,26],[26,155],[209,49],[49,131],[131,209],[135,136],[136,150],[150,135],[47,126],[126,217],[217,47],[223,52],[52,53],[53,223],[45,51],[51,134],[134,45],[211,170],[170,\n140],[140,211],[67,69],[69,108],[108,67],[43,106],[106,91],[91,43],[230,119],[119,120],[120,230],[226,130],[130,247],[247,226],[63,53],[53,52],[52,63],[238,20],[20,242],[242,238],[46,70],[70,156],[156,46],[78,62],[62,96],[96,78],[46,53],[53,63],[63,46],[143,34],[34,227],[227,143],[123,117],[117,111],[111,123],[44,125],[125,19],[19,44],[236,134],[134,51],[51,236],[216,206],[206,205],[205,216],[154,153],[153,22],[22,154],[39,37],[37,167],[167,39],[200,201],[201,208],[208,200],[36,142],[142,100],[100,\n36],[57,212],[212,202],[202,57],[20,60],[60,99],[99,20],[28,158],[158,157],[157,28],[35,226],[226,113],[113,35],[160,159],[159,27],[27,160],[204,202],[202,210],[210,204],[113,225],[225,46],[46,113],[43,202],[202,204],[204,43],[62,76],[76,77],[77,62],[137,123],[123,116],[116,137],[41,38],[38,72],[72,41],[203,129],[129,142],[142,203],[64,98],[98,240],[240,64],[49,102],[102,64],[64,49],[41,73],[73,74],[74,41],[212,216],[216,207],[207,212],[42,74],[74,184],[184,42],[169,170],[170,211],[211,169],[170,\n149],[149,176],[176,170],[105,66],[66,69],[69,105],[122,6],[6,168],[168,122],[123,147],[147,187],[187,123],[96,77],[77,90],[90,96],[65,55],[55,107],[107,65],[89,90],[90,180],[180,89],[101,100],[100,120],[120,101],[63,105],[105,104],[104,63],[93,137],[137,227],[227,93],[15,86],[86,85],[85,15],[129,102],[102,49],[49,129],[14,87],[87,86],[86,14],[55,8],[8,9],[9,55],[100,47],[47,121],[121,100],[145,23],[23,22],[22,145],[88,89],[89,179],[179,88],[6,122],[122,196],[196,6],[88,95],[95,96],[96,88],[138,172],\n[172,136],[136,138],[215,58],[58,172],[172,215],[115,48],[48,219],[219,115],[42,80],[80,81],[81,42],[195,3],[3,51],[51,195],[43,146],[146,61],[61,43],[171,175],[175,199],[199,171],[81,82],[82,38],[38,81],[53,46],[46,225],[225,53],[144,163],[163,110],[110,144],[52,65],[65,66],[66,52],[229,228],[228,117],[117,229],[34,127],[127,234],[234,34],[107,108],[108,69],[69,107],[109,108],[108,151],[151,109],[48,64],[64,235],[235,48],[62,78],[78,191],[191,62],[129,209],[209,126],[126,129],[111,35],[35,143],[143,\n111],[117,123],[123,50],[50,117],[222,65],[65,52],[52,222],[19,125],[125,141],[141,19],[221,55],[55,65],[65,221],[3,195],[195,197],[197,3],[25,7],[7,33],[33,25],[220,237],[237,44],[44,220],[70,71],[71,139],[139,70],[122,193],[193,245],[245,122],[247,130],[130,33],[33,247],[71,21],[21,162],[162,71],[170,169],[169,150],[150,170],[188,174],[174,196],[196,188],[216,186],[186,92],[92,216],[2,97],[97,167],[167,2],[141,125],[125,241],[241,141],[164,167],[167,37],[37,164],[72,38],[38,12],[12,72],[38,82],\n[82,13],[13,38],[63,68],[68,71],[71,63],[226,35],[35,111],[111,226],[101,50],[50,205],[205,101],[206,92],[92,165],[165,206],[209,198],[198,217],[217,209],[165,167],[167,97],[97,165],[220,115],[115,218],[218,220],[133,112],[112,243],[243,133],[239,238],[238,241],[241,239],[214,135],[135,169],[169,214],[190,173],[173,133],[133,190],[171,208],[208,32],[32,171],[125,44],[44,237],[237,125],[86,87],[87,178],[178,86],[85,86],[86,179],[179,85],[84,85],[85,180],[180,84],[83,84],[84,181],[181,83],[201,83],\n[83,182],[182,201],[137,93],[93,132],[132,137],[76,62],[62,183],[183,76],[61,76],[76,184],[184,61],[57,61],[61,185],[185,57],[212,57],[57,186],[186,212],[214,207],[207,187],[187,214],[34,143],[143,156],[156,34],[79,239],[239,237],[237,79],[123,137],[137,177],[177,123],[44,1],[1,4],[4,44],[201,194],[194,32],[32,201],[64,102],[102,129],[129,64],[213,215],[215,138],[138,213],[59,166],[166,219],[219,59],[242,99],[99,97],[97,242],[2,94],[94,141],[141,2],[75,59],[59,235],[235,75],[24,110],[110,228],[228,\n24],[25,130],[130,226],[226,25],[23,24],[24,229],[229,23],[22,23],[23,230],[230,22],[26,22],[22,231],[231,26],[112,26],[26,232],[232,112],[189,190],[190,243],[243,189],[221,56],[56,190],[190,221],[28,56],[56,221],[221,28],[27,28],[28,222],[222,27],[29,27],[27,223],[223,29],[30,29],[29,224],[224,30],[247,30],[30,225],[225,247],[238,79],[79,20],[20,238],[166,59],[59,75],[75,166],[60,75],[75,240],[240,60],[147,177],[177,215],[215,147],[20,79],[79,166],[166,20],[187,147],[147,213],[213,187],[112,233],\n[233,244],[244,112],[233,128],[128,245],[245,233],[128,114],[114,188],[188,128],[114,217],[217,174],[174,114],[131,115],[115,220],[220,131],[217,198],[198,236],[236,217],[198,131],[131,134],[134,198],[177,132],[132,58],[58,177],[143,35],[35,124],[124,143],[110,163],[163,7],[7,110],[228,110],[110,25],[25,228],[356,389],[389,368],[368,356],[11,302],[302,267],[267,11],[452,350],[350,349],[349,452],[302,303],[303,269],[269,302],[357,343],[343,277],[277,357],[452,453],[453,357],[357,452],[333,332],[332,\n297],[297,333],[175,152],[152,377],[377,175],[347,348],[348,330],[330,347],[303,304],[304,270],[270,303],[9,336],[336,337],[337,9],[278,279],[279,360],[360,278],[418,262],[262,431],[431,418],[304,408],[408,409],[409,304],[310,415],[415,407],[407,310],[270,409],[409,410],[410,270],[450,348],[348,347],[347,450],[422,430],[430,434],[434,422],[313,314],[314,17],[17,313],[306,307],[307,375],[375,306],[387,388],[388,260],[260,387],[286,414],[414,398],[398,286],[335,406],[406,418],[418,335],[364,367],[367,\n416],[416,364],[423,358],[358,327],[327,423],[251,284],[284,298],[298,251],[281,5],[5,4],[4,281],[373,374],[374,253],[253,373],[307,320],[320,321],[321,307],[425,427],[427,411],[411,425],[421,313],[313,18],[18,421],[321,405],[405,406],[406,321],[320,404],[404,405],[405,320],[315,16],[16,17],[17,315],[426,425],[425,266],[266,426],[377,400],[400,369],[369,377],[322,391],[391,269],[269,322],[417,465],[465,464],[464,417],[386,257],[257,258],[258,386],[466,260],[260,388],[388,466],[456,399],[399,419],\n[419,456],[284,332],[332,333],[333,284],[417,285],[285,8],[8,417],[346,340],[340,261],[261,346],[413,441],[441,285],[285,413],[327,460],[460,328],[328,327],[355,371],[371,329],[329,355],[392,439],[439,438],[438,392],[382,341],[341,256],[256,382],[429,420],[420,360],[360,429],[364,394],[394,379],[379,364],[277,343],[343,437],[437,277],[443,444],[444,283],[283,443],[275,440],[440,363],[363,275],[431,262],[262,369],[369,431],[297,338],[338,337],[337,297],[273,375],[375,321],[321,273],[450,451],[451,\n349],[349,450],[446,342],[342,467],[467,446],[293,334],[334,282],[282,293],[458,461],[461,462],[462,458],[276,353],[353,383],[383,276],[308,324],[324,325],[325,308],[276,300],[300,293],[293,276],[372,345],[345,447],[447,372],[352,345],[345,340],[340,352],[274,1],[1,19],[19,274],[456,248],[248,281],[281,456],[436,427],[427,425],[425,436],[381,256],[256,252],[252,381],[269,391],[391,393],[393,269],[200,199],[199,428],[428,200],[266,330],[330,329],[329,266],[287,273],[273,422],[422,287],[250,462],[462,\n328],[328,250],[258,286],[286,384],[384,258],[265,353],[353,342],[342,265],[387,259],[259,257],[257,387],[424,431],[431,430],[430,424],[342,353],[353,276],[276,342],[273,335],[335,424],[424,273],[292,325],[325,307],[307,292],[366,447],[447,345],[345,366],[271,303],[303,302],[302,271],[423,266],[266,371],[371,423],[294,455],[455,460],[460,294],[279,278],[278,294],[294,279],[271,272],[272,304],[304,271],[432,434],[434,427],[427,432],[272,407],[407,408],[408,272],[394,430],[430,431],[431,394],[395,369],\n[369,400],[400,395],[334,333],[333,299],[299,334],[351,417],[417,168],[168,351],[352,280],[280,411],[411,352],[325,319],[319,320],[320,325],[295,296],[296,336],[336,295],[319,403],[403,404],[404,319],[330,348],[348,349],[349,330],[293,298],[298,333],[333,293],[323,454],[454,447],[447,323],[15,16],[16,315],[315,15],[358,429],[429,279],[279,358],[14,15],[15,316],[316,14],[285,336],[336,9],[9,285],[329,349],[349,350],[350,329],[374,380],[380,252],[252,374],[318,402],[402,403],[403,318],[6,197],[197,\n419],[419,6],[318,319],[319,325],[325,318],[367,364],[364,365],[365,367],[435,367],[367,397],[397,435],[344,438],[438,439],[439,344],[272,271],[271,311],[311,272],[195,5],[5,281],[281,195],[273,287],[287,291],[291,273],[396,428],[428,199],[199,396],[311,271],[271,268],[268,311],[283,444],[444,445],[445,283],[373,254],[254,339],[339,373],[282,334],[334,296],[296,282],[449,347],[347,346],[346,449],[264,447],[447,454],[454,264],[336,296],[296,299],[299,336],[338,10],[10,151],[151,338],[278,439],[439,\n455],[455,278],[292,407],[407,415],[415,292],[358,371],[371,355],[355,358],[340,345],[345,372],[372,340],[346,347],[347,280],[280,346],[442,443],[443,282],[282,442],[19,94],[94,370],[370,19],[441,442],[442,295],[295,441],[248,419],[419,197],[197,248],[263,255],[255,359],[359,263],[440,275],[275,274],[274,440],[300,383],[383,368],[368,300],[351,412],[412,465],[465,351],[263,467],[467,466],[466,263],[301,368],[368,389],[389,301],[395,378],[378,379],[379,395],[412,351],[351,419],[419,412],[436,426],\n[426,322],[322,436],[2,164],[164,393],[393,2],[370,462],[462,461],[461,370],[164,0],[0,267],[267,164],[302,11],[11,12],[12,302],[268,12],[12,13],[13,268],[293,300],[300,301],[301,293],[446,261],[261,340],[340,446],[330,266],[266,425],[425,330],[426,423],[423,391],[391,426],[429,355],[355,437],[437,429],[391,327],[327,326],[326,391],[440,457],[457,438],[438,440],[341,382],[382,362],[362,341],[459,457],[457,461],[461,459],[434,430],[430,394],[394,434],[414,463],[463,362],[362,414],[396,369],[369,262],\n[262,396],[354,461],[461,457],[457,354],[316,403],[403,402],[402,316],[315,404],[404,403],[403,315],[314,405],[405,404],[404,314],[313,406],[406,405],[405,313],[421,418],[418,406],[406,421],[366,401],[401,361],[361,366],[306,408],[408,407],[407,306],[291,409],[409,408],[408,291],[287,410],[410,409],[409,287],[432,436],[436,410],[410,432],[434,416],[416,411],[411,434],[264,368],[368,383],[383,264],[309,438],[438,457],[457,309],[352,376],[376,401],[401,352],[274,275],[275,4],[4,274],[421,428],[428,\n262],[262,421],[294,327],[327,358],[358,294],[433,416],[416,367],[367,433],[289,455],[455,439],[439,289],[462,370],[370,326],[326,462],[2,326],[326,370],[370,2],[305,460],[460,455],[455,305],[254,449],[449,448],[448,254],[255,261],[261,446],[446,255],[253,450],[450,449],[449,253],[252,451],[451,450],[450,252],[256,452],[452,451],[451,256],[341,453],[453,452],[452,341],[413,464],[464,463],[463,413],[441,413],[413,414],[414,441],[258,442],[442,441],[441,258],[257,443],[443,442],[442,257],[259,444],\n[444,443],[443,259],[260,445],[445,444],[444,260],[467,342],[342,445],[445,467],[459,458],[458,250],[250,459],[289,392],[392,290],[290,289],[290,328],[328,460],[460,290],[376,433],[433,435],[435,376],[250,290],[290,392],[392,250],[411,416],[416,433],[433,411],[341,463],[463,464],[464,341],[453,464],[464,465],[465,453],[357,465],[465,412],[412,357],[343,412],[412,399],[399,343],[360,363],[363,440],[440,360],[437,399],[399,456],[456,437],[420,456],[456,363],[363,420],[401,435],[435,288],[288,401],[372,\n383],[383,353],[353,372],[339,255],[255,249],[249,339],[448,261],[261,255],[255,448],[133,243],[243,190],[190,133],[133,155],[155,112],[112,133],[33,246],[246,247],[247,33],[33,130],[130,25],[25,33],[398,384],[384,286],[286,398],[362,398],[398,414],[414,362],[362,463],[463,341],[341,362],[263,359],[359,467],[467,263],[263,249],[249,255],[255,263],[466,467],[467,260],[260,466],[75,60],[60,166],[166,75],[238,239],[239,79],[79,238],[162,127],[127,139],[139,162],[72,11],[11,37],[37,72],[121,232],[232,\n120],[120,121],[73,72],[72,39],[39,73],[114,128],[128,47],[47,114],[233,232],[232,128],[128,233],[103,104],[104,67],[67,103],[152,175],[175,148],[148,152],[119,118],[118,101],[101,119],[74,73],[73,40],[40,74],[107,9],[9,108],[108,107],[49,48],[48,131],[131,49],[32,194],[194,211],[211,32],[184,74],[74,185],[185,184],[191,80],[80,183],[183,191],[185,40],[40,186],[186,185],[119,230],[230,118],[118,119],[210,202],[202,214],[214,210],[84,83],[83,17],[17,84],[77,76],[76,146],[146,77],[161,160],[160,30],\n[30,161],[190,56],[56,173],[173,190],[182,106],[106,194],[194,182],[138,135],[135,192],[192,138],[129,203],[203,98],[98,129],[54,21],[21,68],[68,54],[5,51],[51,4],[4,5],[145,144],[144,23],[23,145],[90,77],[77,91],[91,90],[207,205],[205,187],[187,207],[83,201],[201,18],[18,83],[181,91],[91,182],[182,181],[180,90],[90,181],[181,180],[16,85],[85,17],[17,16],[205,206],[206,36],[36,205],[176,148],[148,140],[140,176],[165,92],[92,39],[39,165],[245,193],[193,244],[244,245],[27,159],[159,28],[28,27],[30,\n247],[247,161],[161,30],[174,236],[236,196],[196,174],[103,54],[54,104],[104,103],[55,193],[193,8],[8,55],[111,117],[117,31],[31,111],[221,189],[189,55],[55,221],[240,98],[98,99],[99,240],[142,126],[126,100],[100,142],[219,166],[166,218],[218,219],[112,155],[155,26],[26,112],[198,209],[209,131],[131,198],[169,135],[135,150],[150,169],[114,47],[47,217],[217,114],[224,223],[223,53],[53,224],[220,45],[45,134],[134,220],[32,211],[211,140],[140,32],[109,67],[67,108],[108,109],[146,43],[43,91],[91,146],\n[231,230],[230,120],[120,231],[113,226],[226,247],[247,113],[105,63],[63,52],[52,105],[241,238],[238,242],[242,241],[124,46],[46,156],[156,124],[95,78],[78,96],[96,95],[70,46],[46,63],[63,70],[116,143],[143,227],[227,116],[116,123],[123,111],[111,116],[1,44],[44,19],[19,1],[3,236],[236,51],[51,3],[207,216],[216,205],[205,207],[26,154],[154,22],[22,26],[165,39],[39,167],[167,165],[199,200],[200,208],[208,199],[101,36],[36,100],[100,101],[43,57],[57,202],[202,43],[242,20],[20,99],[99,242],[56,28],[28,\n157],[157,56],[124,35],[35,113],[113,124],[29,160],[160,27],[27,29],[211,204],[204,210],[210,211],[124,113],[113,46],[46,124],[106,43],[43,204],[204,106],[96,62],[62,77],[77,96],[227,137],[137,116],[116,227],[73,41],[41,72],[72,73],[36,203],[203,142],[142,36],[235,64],[64,240],[240,235],[48,49],[49,64],[64,48],[42,41],[41,74],[74,42],[214,212],[212,207],[207,214],[183,42],[42,184],[184,183],[210,169],[169,211],[211,210],[140,170],[170,176],[176,140],[104,105],[105,69],[69,104],[193,122],[122,168],\n[168,193],[50,123],[123,187],[187,50],[89,96],[96,90],[90,89],[66,65],[65,107],[107,66],[179,89],[89,180],[180,179],[119,101],[101,120],[120,119],[68,63],[63,104],[104,68],[234,93],[93,227],[227,234],[16,15],[15,85],[85,16],[209,129],[129,49],[49,209],[15,14],[14,86],[86,15],[107,55],[55,9],[9,107],[120,100],[100,121],[121,120],[153,145],[145,22],[22,153],[178,88],[88,179],[179,178],[197,6],[6,196],[196,197],[89,88],[88,96],[96,89],[135,138],[138,136],[136,135],[138,215],[215,172],[172,138],[218,\n115],[115,219],[219,218],[41,42],[42,81],[81,41],[5,195],[195,51],[51,5],[57,43],[43,61],[61,57],[208,171],[171,199],[199,208],[41,81],[81,38],[38,41],[224,53],[53,225],[225,224],[24,144],[144,110],[110,24],[105,52],[52,66],[66,105],[118,229],[229,117],[117,118],[227,34],[34,234],[234,227],[66,107],[107,69],[69,66],[10,109],[109,151],[151,10],[219,48],[48,235],[235,219],[183,62],[62,191],[191,183],[142,129],[129,126],[126,142],[116,111],[111,143],[143,116],[118,117],[117,50],[50,118],[223,222],[222,\n52],[52,223],[94,19],[19,141],[141,94],[222,221],[221,65],[65,222],[196,3],[3,197],[197,196],[45,220],[220,44],[44,45],[156,70],[70,139],[139,156],[188,122],[122,245],[245,188],[139,71],[71,162],[162,139],[149,170],[170,150],[150,149],[122,188],[188,196],[196,122],[206,216],[216,92],[92,206],[164,2],[2,167],[167,164],[242,141],[141,241],[241,242],[0,164],[164,37],[37,0],[11,72],[72,12],[12,11],[12,38],[38,13],[13,12],[70,63],[63,71],[71,70],[31,226],[226,111],[111,31],[36,101],[101,205],[205,36],\n[203,206],[206,165],[165,203],[126,209],[209,217],[217,126],[98,165],[165,97],[97,98],[237,220],[220,218],[218,237],[237,239],[239,241],[241,237],[210,214],[214,169],[169,210],[140,171],[171,32],[32,140],[241,125],[125,237],[237,241],[179,86],[86,178],[178,179],[180,85],[85,179],[179,180],[181,84],[84,180],[180,181],[182,83],[83,181],[181,182],[194,201],[201,182],[182,194],[177,137],[137,132],[132,177],[184,76],[76,183],[183,184],[185,61],[61,184],[184,185],[186,57],[57,185],[185,186],[216,212],[212,\n186],[186,216],[192,214],[214,187],[187,192],[139,34],[34,156],[156,139],[218,79],[79,237],[237,218],[147,123],[123,177],[177,147],[45,44],[44,4],[4,45],[208,201],[201,32],[32,208],[98,64],[64,129],[129,98],[192,213],[213,138],[138,192],[235,59],[59,219],[219,235],[141,242],[242,97],[97,141],[97,2],[2,141],[141,97],[240,75],[75,235],[235,240],[229,24],[24,228],[228,229],[31,25],[25,226],[226,31],[230,23],[23,229],[229,230],[231,22],[22,230],[230,231],[232,26],[26,231],[231,232],[233,112],[112,232],\n[232,233],[244,189],[189,243],[243,244],[189,221],[221,190],[190,189],[222,28],[28,221],[221,222],[223,27],[27,222],[222,223],[224,29],[29,223],[223,224],[225,30],[30,224],[224,225],[113,247],[247,225],[225,113],[99,60],[60,240],[240,99],[213,147],[147,215],[215,213],[60,20],[20,166],[166,60],[192,187],[187,213],[213,192],[243,112],[112,244],[244,243],[244,233],[233,245],[245,244],[245,128],[128,188],[188,245],[188,114],[114,174],[174,188],[134,131],[131,220],[220,134],[174,217],[217,236],[236,174],\n[236,198],[198,134],[134,236],[215,177],[177,58],[58,215],[156,143],[143,124],[124,156],[25,110],[110,7],[7,25],[31,228],[228,25],[25,31],[264,356],[356,368],[368,264],[0,11],[11,267],[267,0],[451,452],[452,349],[349,451],[267,302],[302,269],[269,267],[350,357],[357,277],[277,350],[350,452],[452,357],[357,350],[299,333],[333,297],[297,299],[396,175],[175,377],[377,396],[280,347],[347,330],[330,280],[269,303],[303,270],[270,269],[151,9],[9,337],[337,151],[344,278],[278,360],[360,344],[424,418],[418,\n431],[431,424],[270,304],[304,409],[409,270],[272,310],[310,407],[407,272],[322,270],[270,410],[410,322],[449,450],[450,347],[347,449],[432,422],[422,434],[434,432],[18,313],[313,17],[17,18],[291,306],[306,375],[375,291],[259,387],[387,260],[260,259],[424,335],[335,418],[418,424],[434,364],[364,416],[416,434],[391,423],[423,327],[327,391],[301,251],[251,298],[298,301],[275,281],[281,4],[4,275],[254,373],[373,253],[253,254],[375,307],[307,321],[321,375],[280,425],[425,411],[411,280],[200,421],[421,\n18],[18,200],[335,321],[321,406],[406,335],[321,320],[320,405],[405,321],[314,315],[315,17],[17,314],[423,426],[426,266],[266,423],[396,377],[377,369],[369,396],[270,322],[322,269],[269,270],[413,417],[417,464],[464,413],[385,386],[386,258],[258,385],[248,456],[456,419],[419,248],[298,284],[284,333],[333,298],[168,417],[417,8],[8,168],[448,346],[346,261],[261,448],[417,413],[413,285],[285,417],[326,327],[327,328],[328,326],[277,355],[355,329],[329,277],[309,392],[392,438],[438,309],[381,382],[382,\n256],[256,381],[279,429],[429,360],[360,279],[365,364],[364,379],[379,365],[355,277],[277,437],[437,355],[282,443],[443,283],[283,282],[281,275],[275,363],[363,281],[395,431],[431,369],[369,395],[299,297],[297,337],[337,299],[335,273],[273,321],[321,335],[348,450],[450,349],[349,348],[359,446],[446,467],[467,359],[283,293],[293,282],[282,283],[250,458],[458,462],[462,250],[300,276],[276,383],[383,300],[292,308],[308,325],[325,292],[283,276],[276,293],[293,283],[264,372],[372,447],[447,264],[346,352],\n[352,340],[340,346],[354,274],[274,19],[19,354],[363,456],[456,281],[281,363],[426,436],[436,425],[425,426],[380,381],[381,252],[252,380],[267,269],[269,393],[393,267],[421,200],[200,428],[428,421],[371,266],[266,329],[329,371],[432,287],[287,422],[422,432],[290,250],[250,328],[328,290],[385,258],[258,384],[384,385],[446,265],[265,342],[342,446],[386,387],[387,257],[257,386],[422,424],[424,430],[430,422],[445,342],[342,276],[276,445],[422,273],[273,424],[424,422],[306,292],[292,307],[307,306],[352,\n366],[366,345],[345,352],[268,271],[271,302],[302,268],[358,423],[423,371],[371,358],[327,294],[294,460],[460,327],[331,279],[279,294],[294,331],[303,271],[271,304],[304,303],[436,432],[432,427],[427,436],[304,272],[272,408],[408,304],[395,394],[394,431],[431,395],[378,395],[395,400],[400,378],[296,334],[334,299],[299,296],[6,351],[351,168],[168,6],[376,352],[352,411],[411,376],[307,325],[325,320],[320,307],[285,295],[295,336],[336,285],[320,319],[319,404],[404,320],[329,330],[330,349],[349,329],\n[334,293],[293,333],[333,334],[366,323],[323,447],[447,366],[316,15],[15,315],[315,316],[331,358],[358,279],[279,331],[317,14],[14,316],[316,317],[8,285],[285,9],[9,8],[277,329],[329,350],[350,277],[253,374],[374,252],[252,253],[319,318],[318,403],[403,319],[351,6],[6,419],[419,351],[324,318],[318,325],[325,324],[397,367],[367,365],[365,397],[288,435],[435,397],[397,288],[278,344],[344,439],[439,278],[310,272],[272,311],[311,310],[248,195],[195,281],[281,248],[375,273],[273,291],[291,375],[175,396],\n[396,199],[199,175],[312,311],[311,268],[268,312],[276,283],[283,445],[445,276],[390,373],[373,339],[339,390],[295,282],[282,296],[296,295],[448,449],[449,346],[346,448],[356,264],[264,454],[454,356],[337,336],[336,299],[299,337],[337,338],[338,151],[151,337],[294,278],[278,455],[455,294],[308,292],[292,415],[415,308],[429,358],[358,355],[355,429],[265,340],[340,372],[372,265],[352,346],[346,280],[280,352],[295,442],[442,282],[282,295],[354,19],[19,370],[370,354],[285,441],[441,295],[295,285],[195,\n248],[248,197],[197,195],[457,440],[440,274],[274,457],[301,300],[300,368],[368,301],[417,351],[351,465],[465,417],[251,301],[301,389],[389,251],[394,395],[395,379],[379,394],[399,412],[412,419],[419,399],[410,436],[436,322],[322,410],[326,2],[2,393],[393,326],[354,370],[370,461],[461,354],[393,164],[164,267],[267,393],[268,302],[302,12],[12,268],[312,268],[268,13],[13,312],[298,293],[293,301],[301,298],[265,446],[446,340],[340,265],[280,330],[330,425],[425,280],[322,426],[426,391],[391,322],[420,\n429],[429,437],[437,420],[393,391],[391,326],[326,393],[344,440],[440,438],[438,344],[458,459],[459,461],[461,458],[364,434],[434,394],[394,364],[428,396],[396,262],[262,428],[274,354],[354,457],[457,274],[317,316],[316,402],[402,317],[316,315],[315,403],[403,316],[315,314],[314,404],[404,315],[314,313],[313,405],[405,314],[313,421],[421,406],[406,313],[323,366],[366,361],[361,323],[292,306],[306,407],[407,292],[306,291],[291,408],[408,306],[291,287],[287,409],[409,291],[287,432],[432,410],[410,287],\n[427,434],[434,411],[411,427],[372,264],[264,383],[383,372],[459,309],[309,457],[457,459],[366,352],[352,401],[401,366],[1,274],[274,4],[4,1],[418,421],[421,262],[262,418],[331,294],[294,358],[358,331],[435,433],[433,367],[367,435],[392,289],[289,439],[439,392],[328,462],[462,326],[326,328],[94,2],[2,370],[370,94],[289,305],[305,455],[455,289],[339,254],[254,448],[448,339],[359,255],[255,446],[446,359],[254,253],[253,449],[449,254],[253,252],[252,450],[450,253],[252,256],[256,451],[451,252],[256,\n341],[341,452],[452,256],[414,413],[413,463],[463,414],[286,441],[441,414],[414,286],[286,258],[258,441],[441,286],[258,257],[257,442],[442,258],[257,259],[259,443],[443,257],[259,260],[260,444],[444,259],[260,467],[467,445],[445,260],[309,459],[459,250],[250,309],[305,289],[289,290],[290,305],[305,290],[290,460],[460,305],[401,376],[376,435],[435,401],[309,250],[250,392],[392,309],[376,411],[411,433],[433,376],[453,341],[341,464],[464,453],[357,453],[453,465],[465,357],[343,357],[357,412],[412,343],\n[437,343],[343,399],[399,437],[344,360],[360,440],[440,344],[420,437],[437,456],[456,420],[360,420],[420,363],[363,360],[361,401],[401,288],[288,361],[265,372],[372,353],[353,265],[390,339],[339,249],[249,390],[339,448],[448,255],[255,339]]);I(\"HAND_CONNECTIONS\",[[0,1],[1,2],[2,3],[3,4],[0,5],[5,6],[6,7],[7,8],[5,9],[9,10],[10,11],[11,12],[9,13],[13,14],[14,15],[15,16],[13,17],[0,17],[17,18],[18,19],[19,20]]);\nI(\"POSE_CONNECTIONS\",[[0,1],[1,2],[2,3],[3,7],[0,4],[4,5],[5,6],[6,8],[9,10],[11,12],[11,13],[13,15],[15,17],[15,19],[15,21],[17,19],[12,14],[14,16],[16,18],[16,20],[16,22],[18,20],[11,23],[12,24],[23,24],[23,25],[24,26],[25,27],[26,28],[27,29],[28,30],[29,31],[30,32],[27,31],[28,32]]);\nI(\"POSE_LANDMARKS\",{NOSE:0,LEFT_EYE_INNER:1,LEFT_EYE:2,LEFT_EYE_OUTER:3,RIGHT_EYE_INNER:4,RIGHT_EYE:5,RIGHT_EYE_OUTER:6,LEFT_EAR:7,RIGHT_EAR:8,LEFT_RIGHT:9,RIGHT_LEFT:10,LEFT_SHOULDER:11,RIGHT_SHOULDER:12,LEFT_ELBOW:13,RIGHT_ELBOW:14,LEFT_WRIST:15,RIGHT_WRIST:16,LEFT_PINKY:17,RIGHT_PINKY:18,LEFT_INDEX:19,RIGHT_INDEX:20,LEFT_THUMB:21,RIGHT_THUMB:22,LEFT_HIP:23,RIGHT_HIP:24,LEFT_KNEE:25,RIGHT_KNEE:26,LEFT_ANKLE:27,RIGHT_ANKLE:28,LEFT_HEEL:29,RIGHT_HEEL:30,LEFT_FOOT_INDEX:31,RIGHT_FOOT_INDEX:32});\nI(\"POSE_LANDMARKS_LEFT\",{LEFT_EYE_INNER:1,LEFT_EYE:2,LEFT_EYE_OUTER:3,LEFT_EAR:7,LEFT_RIGHT:9,LEFT_SHOULDER:11,LEFT_ELBOW:13,LEFT_WRIST:15,LEFT_PINKY:17,LEFT_INDEX:19,LEFT_THUMB:21,LEFT_HIP:23,LEFT_KNEE:25,LEFT_ANKLE:27,LEFT_HEEL:29,LEFT_FOOT_INDEX:31});\nI(\"POSE_LANDMARKS_RIGHT\",{RIGHT_EYE_INNER:4,RIGHT_EYE:5,RIGHT_EYE_OUTER:6,RIGHT_EAR:8,RIGHT_LEFT:10,RIGHT_SHOULDER:12,RIGHT_ELBOW:14,RIGHT_WRIST:16,RIGHT_PINKY:18,RIGHT_INDEX:20,RIGHT_THUMB:22,RIGHT_HIP:24,RIGHT_KNEE:26,RIGHT_ANKLE:28,RIGHT_HEEL:30,RIGHT_FOOT_INDEX:32});I(\"POSE_LANDMARKS_NEUTRAL\",{NOSE:0});\nI(\"matrixDataToMatrix\",function(a){for(var b=a.getCols(),c=a.getRows(),d=a.getPackedDataList(),e=[],g=0;g<c;g++)e.push(Array(b));for(g=0;g<c;g++)for(var f=0;f<b;f++){var k=1===a.getLayout()?g*b+f:f*c+g;e[g][f]=d[k]}return e});I(\"VERSION\",\"0.5.1635989137\");}).call(this);\n"
  },
  {
    "path": "src/renderer/public/lib/@mediapipe/face_mesh/face_mesh_solution_packed_assets_loader.js",
    "content": "\n  var Module = typeof createMediapipeSolutionsPackedAssets !== 'undefined' ? createMediapipeSolutionsPackedAssets : {};\n  \n  if (!Module.expectedDataFileDownloads) {\n    Module.expectedDataFileDownloads = 0;\n  }\n  Module.expectedDataFileDownloads++;\n  (function() {\n   var loadPackage = function(metadata) {\n  \n      var PACKAGE_PATH = '';\n      if (typeof window === 'object') {\n        PACKAGE_PATH = window['encodeURIComponent'](window.location.pathname.toString().substring(0, window.location.pathname.toString().lastIndexOf('/')) + '/');\n      } else if (typeof process === 'undefined' && typeof location !== 'undefined') {\n        // web worker\n        PACKAGE_PATH = encodeURIComponent(location.pathname.toString().substring(0, location.pathname.toString().lastIndexOf('/')) + '/');\n      }\n      var PACKAGE_NAME = 'blaze-out/k8-opt/genfiles/third_party/mediapipe/web/solutions/face_mesh/face_mesh_solution_packed_assets.data';\n      var REMOTE_PACKAGE_BASE = 'face_mesh_solution_packed_assets.data';\n      if (typeof Module['locateFilePackage'] === 'function' && !Module['locateFile']) {\n        Module['locateFile'] = Module['locateFilePackage'];\n        err('warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)');\n      }\n      var REMOTE_PACKAGE_NAME = Module['locateFile'] ? Module['locateFile'](REMOTE_PACKAGE_BASE, '') : REMOTE_PACKAGE_BASE;\n    \n      var REMOTE_PACKAGE_SIZE = metadata['remote_package_size'];\n      var PACKAGE_UUID = metadata['package_uuid'];\n    \n      function fetchRemotePackage(packageName, packageSize, callback, errback) {\n        \n        if (typeof process === 'object' && typeof process.versions === 'object' && typeof process.versions.node === 'string') {\n          require('fs').readFile(packageName, function(err, contents) {\n            if (err) {\n              errback(err);\n            } else {\n              callback(contents.buffer);\n            }\n          });\n          return;\n        }\n      \n        var xhr = new XMLHttpRequest();\n        xhr.open('GET', packageName, true);\n        xhr.responseType = 'arraybuffer';\n        xhr.onprogress = function(event) {\n          var url = packageName;\n          var size = packageSize;\n          if (event.total) size = event.total;\n          if (event.loaded) {\n            if (!xhr.addedTotal) {\n              xhr.addedTotal = true;\n              if (!Module.dataFileDownloads) Module.dataFileDownloads = {};\n              Module.dataFileDownloads[url] = {\n                loaded: event.loaded,\n                total: size\n              };\n            } else {\n              Module.dataFileDownloads[url].loaded = event.loaded;\n            }\n            var total = 0;\n            var loaded = 0;\n            var num = 0;\n            for (var download in Module.dataFileDownloads) {\n            var data = Module.dataFileDownloads[download];\n              total += data.total;\n              loaded += data.loaded;\n              num++;\n            }\n            total = Math.ceil(total * Module.expectedDataFileDownloads/num);\n            if (Module['setStatus']) Module['setStatus']('Downloading data... (' + loaded + '/' + total + ')');\n          } else if (!Module.dataFileDownloads) {\n            if (Module['setStatus']) Module['setStatus']('Downloading data...');\n          }\n        };\n        xhr.onerror = function(event) {\n          throw new Error(\"NetworkError for: \" + packageName);\n        }\n        xhr.onload = function(event) {\n          if (xhr.status == 200 || xhr.status == 304 || xhr.status == 206 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0\n            var packageData = xhr.response;\n            callback(packageData);\n          } else {\n            throw new Error(xhr.statusText + \" : \" + xhr.responseURL);\n          }\n        };\n        xhr.send(null);\n      };\n\n      function handleError(error) {\n        console.error('package error:', error);\n      };\n    \n        var fetchedCallback = null;\n        var fetched = Module['getPreloadedPackage'] ? Module['getPreloadedPackage'](REMOTE_PACKAGE_NAME, REMOTE_PACKAGE_SIZE) : null;\n\n        if (!fetched) fetchRemotePackage(REMOTE_PACKAGE_NAME, REMOTE_PACKAGE_SIZE, function(data) {\n          if (fetchedCallback) {\n            fetchedCallback(data);\n            fetchedCallback = null;\n          } else {\n            fetched = data;\n          }\n        }, handleError);\n      \n    function runWithFS() {\n  \n      function assert(check, msg) {\n        if (!check) throw msg + new Error().stack;\n      }\n  Module['FS_createPath'](\"/\", \"third_party\", true, true);\nModule['FS_createPath'](\"/third_party\", \"mediapipe\", true, true);\nModule['FS_createPath'](\"/third_party/mediapipe\", \"modules\", true, true);\nModule['FS_createPath'](\"/third_party/mediapipe/modules\", \"face_landmark\", true, true);\nModule['FS_createPath'](\"/third_party/mediapipe/modules\", \"face_geometry\", true, true);\nModule['FS_createPath'](\"/third_party/mediapipe/modules/face_geometry\", \"data\", true, true);\nModule['FS_createPath'](\"/third_party/mediapipe/modules\", \"face_detection\", true, true);\n\n          /** @constructor */\n          function DataRequest(start, end, audio) {\n            this.start = start;\n            this.end = end;\n            this.audio = audio;\n          }\n          DataRequest.prototype = {\n            requests: {},\n            open: function(mode, name) {\n              this.name = name;\n              this.requests[name] = this;\n              Module['addRunDependency']('fp ' + this.name);\n            },\n            send: function() {},\n            onload: function() {\n              var byteArray = this.byteArray.subarray(this.start, this.end);\n              this.finish(byteArray);\n            },\n            finish: function(byteArray) {\n              var that = this;\n      \n          Module['FS_createPreloadedFile'](this.name, null, byteArray, true, true, function() {\n            Module['removeRunDependency']('fp ' + that.name);\n          }, function() {\n            if (that.audio) {\n              Module['removeRunDependency']('fp ' + that.name); // workaround for chromium bug 124926 (still no audio with this, but at least we don't hang)\n            } else {\n              err('Preloading file ' + that.name + ' failed');\n            }\n          }, false, true); // canOwn this data in the filesystem, it is a slide into the heap that will never change\n  \n              this.requests[this.name] = null;\n            }\n          };\n      \n              var files = metadata['files'];\n              for (var i = 0; i < files.length; ++i) {\n                new DataRequest(files[i]['start'], files[i]['end'], files[i]['audio']).open('GET', files[i]['filename']);\n              }\n      \n        \n      function processPackageData(arrayBuffer) {\n        assert(arrayBuffer, 'Loading data file failed.');\n        assert(arrayBuffer instanceof ArrayBuffer, 'bad input to processPackageData');\n        var byteArray = new Uint8Array(arrayBuffer);\n        var curr;\n        \n          // Reuse the bytearray from the XHR as the source for file reads.\n          DataRequest.prototype.byteArray = byteArray;\n    \n            var files = metadata['files'];\n            for (var i = 0; i < files.length; ++i) {\n              DataRequest.prototype.requests[files[i].filename].onload();\n            }\n                Module['removeRunDependency']('datafile_blaze-out/k8-opt/genfiles/third_party/mediapipe/web/solutions/face_mesh/face_mesh_solution_packed_assets.data');\n\n      };\n      Module['addRunDependency']('datafile_blaze-out/k8-opt/genfiles/third_party/mediapipe/web/solutions/face_mesh/face_mesh_solution_packed_assets.data');\n    \n      if (!Module.preloadResults) Module.preloadResults = {};\n    \n        Module.preloadResults[PACKAGE_NAME] = {fromCache: false};\n        if (fetched) {\n          processPackageData(fetched);\n          fetched = null;\n        } else {\n          fetchedCallback = processPackageData;\n        }\n      \n    }\n    if (Module['calledRun']) {\n      runWithFS();\n    } else {\n      if (!Module['preRun']) Module['preRun'] = [];\n      Module[\"preRun\"].push(runWithFS); // FS is not initialized yet, wait for it\n    }\n  \n   }\n   loadPackage({\"files\": [{\"filename\": \"/third_party/mediapipe/modules/face_landmark/face_landmark_with_attention.tflite\", \"start\": 0, \"end\": 2495952, \"audio\": 0}, {\"filename\": \"/third_party/mediapipe/modules/face_landmark/face_landmark.tflite\", \"start\": 2495952, \"end\": 3737848, \"audio\": 0}, {\"filename\": \"/third_party/mediapipe/modules/face_geometry/data/geometry_pipeline_metadata_landmarks.binarypb\", \"start\": 3737848, \"end\": 3757224, \"audio\": 0}, {\"filename\": \"/third_party/mediapipe/modules/face_detection/face_detection_short_range.tflite\", \"start\": 3757224, \"end\": 3986256, \"audio\": 0}], \"remote_package_size\": 3986256, \"package_uuid\": \"f5f855ab-ba1b-4fdf-8b0a-77c2c611502f\"});\n  \n  })();\n  "
  },
  {
    "path": "src/renderer/public/lib/@mediapipe/face_mesh/face_mesh_solution_simd_wasm_bin.data",
    "content": ""
  },
  {
    "path": "src/renderer/public/lib/@mediapipe/face_mesh/face_mesh_solution_simd_wasm_bin.js",
    "content": "\nvar createMediapipeSolutionsWasm = (function() {\n  var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;\n  if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;\n  return (\nfunction(createMediapipeSolutionsWasm) {\n  createMediapipeSolutionsWasm = createMediapipeSolutionsWasm || {};\n\nvar Module=typeof createMediapipeSolutionsWasm!==\"undefined\"?createMediapipeSolutionsWasm:{};var readyPromiseResolve,readyPromiseReject;Module[\"ready\"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_main\")){Object.defineProperty(Module[\"ready\"],\"_main\",{configurable:true,get:function(){abort(\"You are getting _main on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_main\",{configurable:true,set:function(){abort(\"You are setting _main on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_stack_get_end\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_get_end\",{configurable:true,get:function(){abort(\"You are getting _emscripten_stack_get_end on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_get_end\",{configurable:true,set:function(){abort(\"You are setting _emscripten_stack_get_end on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_stack_get_free\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_get_free\",{configurable:true,get:function(){abort(\"You are getting _emscripten_stack_get_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_get_free\",{configurable:true,set:function(){abort(\"You are setting _emscripten_stack_get_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_stack_init\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_init\",{configurable:true,get:function(){abort(\"You are getting _emscripten_stack_init on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_init\",{configurable:true,set:function(){abort(\"You are setting _emscripten_stack_init on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_stackSave\")){Object.defineProperty(Module[\"ready\"],\"_stackSave\",{configurable:true,get:function(){abort(\"You are getting _stackSave on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_stackSave\",{configurable:true,set:function(){abort(\"You are setting _stackSave on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_stackRestore\")){Object.defineProperty(Module[\"ready\"],\"_stackRestore\",{configurable:true,get:function(){abort(\"You are getting _stackRestore on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_stackRestore\",{configurable:true,set:function(){abort(\"You are setting _stackRestore on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_stackAlloc\")){Object.defineProperty(Module[\"ready\"],\"_stackAlloc\",{configurable:true,get:function(){abort(\"You are getting _stackAlloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_stackAlloc\",{configurable:true,set:function(){abort(\"You are setting _stackAlloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___wasm_call_ctors\")){Object.defineProperty(Module[\"ready\"],\"___wasm_call_ctors\",{configurable:true,get:function(){abort(\"You are getting ___wasm_call_ctors on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___wasm_call_ctors\",{configurable:true,set:function(){abort(\"You are setting ___wasm_call_ctors on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_fflush\")){Object.defineProperty(Module[\"ready\"],\"_fflush\",{configurable:true,get:function(){abort(\"You are getting _fflush on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_fflush\",{configurable:true,set:function(){abort(\"You are setting _fflush on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___errno_location\")){Object.defineProperty(Module[\"ready\"],\"___errno_location\",{configurable:true,get:function(){abort(\"You are getting ___errno_location on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___errno_location\",{configurable:true,set:function(){abort(\"You are setting ___errno_location on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_malloc\")){Object.defineProperty(Module[\"ready\"],\"_malloc\",{configurable:true,get:function(){abort(\"You are getting _malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_malloc\",{configurable:true,set:function(){abort(\"You are setting _malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_free\")){Object.defineProperty(Module[\"ready\"],\"_free\",{configurable:true,get:function(){abort(\"You are getting _free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_free\",{configurable:true,set:function(){abort(\"You are setting _free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_setThrew\")){Object.defineProperty(Module[\"ready\"],\"_setThrew\",{configurable:true,get:function(){abort(\"You are getting _setThrew on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_setThrew\",{configurable:true,set:function(){abort(\"You are setting _setThrew on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___cxa_is_pointer_type\")){Object.defineProperty(Module[\"ready\"],\"___cxa_is_pointer_type\",{configurable:true,get:function(){abort(\"You are getting ___cxa_is_pointer_type on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___cxa_is_pointer_type\",{configurable:true,set:function(){abort(\"You are setting ___cxa_is_pointer_type on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___cxa_can_catch\")){Object.defineProperty(Module[\"ready\"],\"___cxa_can_catch\",{configurable:true,get:function(){abort(\"You are getting ___cxa_can_catch on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___cxa_can_catch\",{configurable:true,set:function(){abort(\"You are setting ___cxa_can_catch on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_saveSetjmp\")){Object.defineProperty(Module[\"ready\"],\"_saveSetjmp\",{configurable:true,get:function(){abort(\"You are getting _saveSetjmp on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_saveSetjmp\",{configurable:true,set:function(){abort(\"You are setting _saveSetjmp on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_memalign\")){Object.defineProperty(Module[\"ready\"],\"_memalign\",{configurable:true,get:function(){abort(\"You are getting _memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_memalign\",{configurable:true,set:function(){abort(\"You are setting _memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_main_thread_process_queued_calls\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_main_thread_process_queued_calls\",{configurable:true,get:function(){abort(\"You are getting _emscripten_main_thread_process_queued_calls on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_main_thread_process_queued_calls\",{configurable:true,set:function(){abort(\"You are setting _emscripten_main_thread_process_queued_calls on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_webgl_make_context_current\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_webgl_make_context_current\",{configurable:true,get:function(){abort(\"You are getting _emscripten_webgl_make_context_current on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_webgl_make_context_current\",{configurable:true,set:function(){abort(\"You are setting _emscripten_webgl_make_context_current on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_webgl_get_current_context\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_webgl_get_current_context\",{configurable:true,get:function(){abort(\"You are getting _emscripten_webgl_get_current_context on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_webgl_get_current_context\",{configurable:true,set:function(){abort(\"You are setting _emscripten_webgl_get_current_context on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"__get_tzname\")){Object.defineProperty(Module[\"ready\"],\"__get_tzname\",{configurable:true,get:function(){abort(\"You are getting __get_tzname on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"__get_tzname\",{configurable:true,set:function(){abort(\"You are setting __get_tzname on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"__get_daylight\")){Object.defineProperty(Module[\"ready\"],\"__get_daylight\",{configurable:true,get:function(){abort(\"You are getting __get_daylight on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"__get_daylight\",{configurable:true,set:function(){abort(\"You are setting __get_daylight on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"__get_timezone\")){Object.defineProperty(Module[\"ready\"],\"__get_timezone\",{configurable:true,get:function(){abort(\"You are getting __get_timezone on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"__get_timezone\",{configurable:true,set:function(){abort(\"You are setting __get_timezone on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_builtin_malloc\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_malloc\",{configurable:true,get:function(){abort(\"You are getting _emscripten_builtin_malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_malloc\",{configurable:true,set:function(){abort(\"You are setting _emscripten_builtin_malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_builtin_free\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_free\",{configurable:true,get:function(){abort(\"You are getting _emscripten_builtin_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_free\",{configurable:true,set:function(){abort(\"You are setting _emscripten_builtin_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_builtin_memalign\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_memalign\",{configurable:true,get:function(){abort(\"You are getting _emscripten_builtin_memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_memalign\",{configurable:true,set:function(){abort(\"You are setting _emscripten_builtin_memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___getTypeName\")){Object.defineProperty(Module[\"ready\"],\"___getTypeName\",{configurable:true,get:function(){abort(\"You are getting ___getTypeName on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___getTypeName\",{configurable:true,set:function(){abort(\"You are setting ___getTypeName on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___embind_register_native_and_builtin_types\")){Object.defineProperty(Module[\"ready\"],\"___embind_register_native_and_builtin_types\",{configurable:true,get:function(){abort(\"You are getting ___embind_register_native_and_builtin_types on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___embind_register_native_and_builtin_types\",{configurable:true,set:function(){abort(\"You are setting ___embind_register_native_and_builtin_types on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"onRuntimeInitialized\")){Object.defineProperty(Module[\"ready\"],\"onRuntimeInitialized\",{configurable:true,get:function(){abort(\"You are getting onRuntimeInitialized on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"onRuntimeInitialized\",{configurable:true,set:function(){abort(\"You are setting onRuntimeInitialized on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var arguments_=[];var thisProgram=\"./this.program\";var quit_=function(status,toThrow){throw toThrow};var ENVIRONMENT_IS_WEB=typeof window===\"object\";var ENVIRONMENT_IS_WORKER=typeof importScripts===\"function\";var ENVIRONMENT_IS_NODE=typeof process===\"object\"&&typeof process.versions===\"object\"&&typeof process.versions.node===\"string\";var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(Module[\"ENVIRONMENT\"]){throw new Error(\"Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)\")}var scriptDirectory=\"\";function locateFile(path){if(Module[\"locateFile\"]){return Module[\"locateFile\"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;var nodeFS;var nodePath;if(ENVIRONMENT_IS_NODE){if(!(typeof process===\"object\"&&typeof require===\"function\"))throw new Error(\"not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)\");if(ENVIRONMENT_IS_WORKER){scriptDirectory=require(\"path\").dirname(scriptDirectory)+\"/\"}else{scriptDirectory=__dirname+\"/\"}read_=function shell_read(filename,binary){if(!nodeFS)nodeFS=require(\"fs\");if(!nodePath)nodePath=require(\"path\");filename=nodePath[\"normalize\"](filename);return nodeFS[\"readFileSync\"](filename,binary?null:\"utf8\")};readBinary=function readBinary(filename){var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};readAsync=function readAsync(filename,onload,onerror){if(!nodeFS)nodeFS=require(\"fs\");if(!nodePath)nodePath=require(\"path\");filename=nodePath[\"normalize\"](filename);nodeFS[\"readFile\"](filename,function(err,data){if(err)onerror(err);else onload(data.buffer)})};if(process[\"argv\"].length>1){thisProgram=process[\"argv\"][1].replace(/\\\\/g,\"/\")}arguments_=process[\"argv\"].slice(2);process[\"on\"](\"uncaughtException\",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process[\"on\"](\"unhandledRejection\",abort);quit_=function(status,toThrow){if(keepRuntimeAlive()){process[\"exitCode\"]=status;throw toThrow}process[\"exit\"](status)};Module[\"inspect\"]=function(){return\"[Emscripten Module object]\"}}else if(ENVIRONMENT_IS_SHELL){if(typeof process===\"object\"&&typeof require===\"function\"||typeof window===\"object\"||typeof importScripts===\"function\")throw new Error(\"not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)\");if(typeof read!=\"undefined\"){read_=function shell_read(f){return read(f)}}readBinary=function readBinary(f){var data;if(typeof readbuffer===\"function\"){return new Uint8Array(readbuffer(f))}data=read(f,\"binary\");assert(typeof data===\"object\");return data};readAsync=function readAsync(f,onload,onerror){setTimeout(function(){onload(readBinary(f))},0)};if(typeof scriptArgs!=\"undefined\"){arguments_=scriptArgs}else if(typeof arguments!=\"undefined\"){arguments_=arguments}if(typeof quit===\"function\"){quit_=function(status){quit(status)}}if(typeof print!==\"undefined\"){if(typeof console===\"undefined\")console={};console.log=print;console.warn=console.error=typeof printErr!==\"undefined\"?printErr:print}}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(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf(\"blob:\")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf(\"/\")+1)}else{scriptDirectory=\"\"}if(!(typeof window===\"object\"||typeof importScripts===\"function\"))throw new Error(\"not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)\");{read_=function(url){var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=function(url){var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.responseType=\"arraybuffer\";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=function(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,true);xhr.responseType=\"arraybuffer\";xhr.onload=function(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=function(title){document.title=title}}else{throw new Error(\"environment detection error\")}var out=Module[\"print\"]||console.log.bind(console);var err=Module[\"printErr\"]||console.warn.bind(console);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=null;if(Module[\"arguments\"])arguments_=Module[\"arguments\"];if(!Object.getOwnPropertyDescriptor(Module,\"arguments\")){Object.defineProperty(Module,\"arguments\",{configurable:true,get:function(){abort(\"Module.arguments has been replaced with plain arguments_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(Module[\"thisProgram\"])thisProgram=Module[\"thisProgram\"];if(!Object.getOwnPropertyDescriptor(Module,\"thisProgram\")){Object.defineProperty(Module,\"thisProgram\",{configurable:true,get:function(){abort(\"Module.thisProgram has been replaced with plain thisProgram (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(Module[\"quit\"])quit_=Module[\"quit\"];if(!Object.getOwnPropertyDescriptor(Module,\"quit\")){Object.defineProperty(Module,\"quit\",{configurable:true,get:function(){abort(\"Module.quit has been replaced with plain quit_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}assert(typeof Module[\"memoryInitializerPrefixURL\"]===\"undefined\",\"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead\");assert(typeof Module[\"pthreadMainPrefixURL\"]===\"undefined\",\"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead\");assert(typeof Module[\"cdInitializerPrefixURL\"]===\"undefined\",\"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead\");assert(typeof Module[\"filePackagePrefixURL\"]===\"undefined\",\"Module.filePackagePrefixURL option was removed, use Module.locateFile instead\");assert(typeof Module[\"read\"]===\"undefined\",\"Module.read option was removed (modify read_ in JS)\");assert(typeof Module[\"readAsync\"]===\"undefined\",\"Module.readAsync option was removed (modify readAsync in JS)\");assert(typeof Module[\"readBinary\"]===\"undefined\",\"Module.readBinary option was removed (modify readBinary in JS)\");assert(typeof Module[\"setWindowTitle\"]===\"undefined\",\"Module.setWindowTitle option was removed (modify setWindowTitle in JS)\");assert(typeof Module[\"TOTAL_MEMORY\"]===\"undefined\",\"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY\");if(!Object.getOwnPropertyDescriptor(Module,\"read\")){Object.defineProperty(Module,\"read\",{configurable:true,get:function(){abort(\"Module.read has been replaced with plain read_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(!Object.getOwnPropertyDescriptor(Module,\"readAsync\")){Object.defineProperty(Module,\"readAsync\",{configurable:true,get:function(){abort(\"Module.readAsync has been replaced with plain readAsync (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(!Object.getOwnPropertyDescriptor(Module,\"readBinary\")){Object.defineProperty(Module,\"readBinary\",{configurable:true,get:function(){abort(\"Module.readBinary has been replaced with plain readBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(!Object.getOwnPropertyDescriptor(Module,\"setWindowTitle\")){Object.defineProperty(Module,\"setWindowTitle\",{configurable:true,get:function(){abort(\"Module.setWindowTitle has been replaced with plain setWindowTitle (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}assert(!ENVIRONMENT_IS_SHELL,\"shell environment detected but not enabled at build time.  Add 'shell' to `-s ENVIRONMENT` to enable.\");function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text)}}function convertJsFunctionToWasm(func,sig){if(typeof WebAssembly.Function===\"function\"){var typeNames={\"i\":\"i32\",\"j\":\"i64\",\"f\":\"f32\",\"d\":\"f64\"};var type={parameters:[],results:sig[0]==\"v\"?[]:[typeNames[sig[0]]]};for(var i=1;i<sig.length;++i){type.parameters.push(typeNames[sig[i]])}return new WebAssembly.Function(type,func)}var typeSection=[1,0,1,96];var sigRet=sig.slice(0,1);var sigParam=sig.slice(1);var typeCodes={\"i\":127,\"j\":126,\"f\":125,\"d\":124};typeSection.push(sigParam.length);for(var i=0;i<sigParam.length;++i){typeSection.push(typeCodes[sigParam[i]])}if(sigRet==\"v\"){typeSection.push(0)}else{typeSection=typeSection.concat([1,typeCodes[sigRet]])}typeSection[1]=typeSection.length-2;var bytes=new Uint8Array([0,97,115,109,1,0,0,0].concat(typeSection,[2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0]));var module=new WebAssembly.Module(bytes);var instance=new WebAssembly.Instance(module,{\"e\":{\"f\":func}});var wrappedFunc=instance.exports[\"f\"];return wrappedFunc}var freeTableIndexes=[];var functionsInTableMap;function getEmptyTableSlot(){if(freeTableIndexes.length){return freeTableIndexes.pop()}try{wasmTable.grow(1)}catch(err){if(!(err instanceof RangeError)){throw err}throw\"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.\"}return wasmTable.length-1}function addFunctionWasm(func,sig){if(!functionsInTableMap){functionsInTableMap=new WeakMap;for(var i=0;i<wasmTable.length;i++){var item=wasmTable.get(i);if(item){functionsInTableMap.set(item,i)}}}if(functionsInTableMap.has(func)){return functionsInTableMap.get(func)}var ret=getEmptyTableSlot();try{wasmTable.set(ret,func)}catch(err){if(!(err instanceof TypeError)){throw err}assert(typeof sig!==\"undefined\",\"Missing signature argument to addFunction: \"+func);var wrapped=convertJsFunctionToWasm(func,sig);wasmTable.set(ret,wrapped)}functionsInTableMap.set(func,ret);return ret}var tempRet0=0;var setTempRet0=function(value){tempRet0=value};var getTempRet0=function(){return tempRet0};var wasmBinary;if(Module[\"wasmBinary\"])wasmBinary=Module[\"wasmBinary\"];if(!Object.getOwnPropertyDescriptor(Module,\"wasmBinary\")){Object.defineProperty(Module,\"wasmBinary\",{configurable:true,get:function(){abort(\"Module.wasmBinary has been replaced with plain wasmBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}var noExitRuntime=Module[\"noExitRuntime\"]||true;if(!Object.getOwnPropertyDescriptor(Module,\"noExitRuntime\")){Object.defineProperty(Module,\"noExitRuntime\",{configurable:true,get:function(){abort(\"Module.noExitRuntime has been replaced with plain noExitRuntime (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(typeof WebAssembly!==\"object\"){abort(\"no native wasm support detected\")}var wasmMemory;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort(\"Assertion failed: \"+text)}}function getCFunc(ident){var func=Module[\"_\"+ident];assert(func,\"Cannot call unknown function \"+ident+\", make sure it is exported\");return func}function ccall(ident,returnType,argTypes,args,opts){var toC={\"string\":function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret},\"array\":function(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;assert(returnType!==\"array\",'Return type should not be \"array\".');if(args){for(var i=0;i<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0)stack=stackSave();cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var ret=func.apply(null,cArgs);function onDone(ret){if(stack!==0)stackRestore(stack);return convertReturnValue(ret)}ret=onDone(ret);return ret}var ALLOC_STACK=1;var UTF8Decoder=typeof TextDecoder!==\"undefined\"?new TextDecoder(\"utf8\"):undefined;function UTF8ArrayToString(heap,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heap[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heap.subarray&&UTF8Decoder){return UTF8Decoder.decode(heap.subarray(idx,endPtr))}else{var str=\"\";while(idx<endPtr){var u0=heap[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heap[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heap[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{if((u0&248)!=240)warnOnce(\"Invalid UTF-8 leading byte 0x\"+u0.toString(16)+\" encountered when deserializing a UTF-8 string in wasm memory to a JS string!\");u0=(u0&7)<<18|u1<<12|u2<<6|heap[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):\"\"}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=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;if(u>=2097152)warnOnce(\"Invalid Unicode code point 0x\"+u.toString(16)+\" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x1FFFFF).\");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 stringToUTF8(str,outPtr,maxBytesToWrite){assert(typeof maxBytesToWrite==\"number\",\"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!\");return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}var UTF16Decoder=typeof TextDecoder!==\"undefined\"?new TextDecoder(\"utf-16le\"):undefined;function UTF16ToString(ptr,maxBytesToRead){assert(ptr%2==0,\"Pointer passed to UTF16ToString must be aligned to two bytes!\");var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder){return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr))}else{var str=\"\";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str}}function stringToUTF16(str,outPtr,maxBytesToWrite){assert(outPtr%2==0,\"Pointer passed to stringToUTF16 must be aligned to two bytes!\");assert(typeof maxBytesToWrite==\"number\",\"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!\");if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite<str.length*2?maxBytesToWrite/2:str.length;for(var i=0;i<numCharsToWrite;++i){var codeUnit=str.charCodeAt(i);HEAP16[outPtr>>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr}function lengthBytesUTF16(str){return str.length*2}function UTF32ToString(ptr,maxBytesToRead){assert(ptr%4==0,\"Pointer passed to UTF32ToString must be aligned to four bytes!\");var i=0;var str=\"\";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str}function stringToUTF32(str,outPtr,maxBytesToWrite){assert(outPtr%4==0,\"Pointer passed to stringToUTF32 must be aligned to four bytes!\");assert(typeof maxBytesToWrite==\"number\",\"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!\");if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i<str.length;++i){var codeUnit=str.charCodeAt(i);if(codeUnit>=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr}function lengthBytesUTF32(str){var len=0;for(var i=0;i<str.length;++i){var codeUnit=str.charCodeAt(i);if(codeUnit>=55296&&codeUnit<=57343)++i;len+=4}return len}function allocateUTF8(str){var size=lengthBytesUTF8(str)+1;var ret=_malloc(size);if(ret)stringToUTF8Array(str,HEAP8,ret,size);return ret}function writeArrayToMemory(array,buffer){assert(array.length>=0,\"writeArrayToMemory array must have a length (should be an array or typed array)\");HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i<str.length;++i){assert(str.charCodeAt(i)===str.charCodeAt(i)&255);HEAP8[buffer++>>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module[\"HEAP8\"]=HEAP8=new Int8Array(buf);Module[\"HEAP16\"]=HEAP16=new Int16Array(buf);Module[\"HEAP32\"]=HEAP32=new Int32Array(buf);Module[\"HEAPU8\"]=HEAPU8=new Uint8Array(buf);Module[\"HEAPU16\"]=HEAPU16=new Uint16Array(buf);Module[\"HEAPU32\"]=HEAPU32=new Uint32Array(buf);Module[\"HEAPF32\"]=HEAPF32=new Float32Array(buf);Module[\"HEAPF64\"]=HEAPF64=new Float64Array(buf)}var TOTAL_STACK=5242880;if(Module[\"TOTAL_STACK\"])assert(TOTAL_STACK===Module[\"TOTAL_STACK\"],\"the stack size can no longer be determined at runtime\");var INITIAL_MEMORY=Module[\"INITIAL_MEMORY\"]||16777216;if(!Object.getOwnPropertyDescriptor(Module,\"INITIAL_MEMORY\")){Object.defineProperty(Module,\"INITIAL_MEMORY\",{configurable:true,get:function(){abort(\"Module.INITIAL_MEMORY has been replaced with plain INITIAL_MEMORY (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}assert(INITIAL_MEMORY>=TOTAL_STACK,\"INITIAL_MEMORY should be larger than TOTAL_STACK, was \"+INITIAL_MEMORY+\"! (TOTAL_STACK=\"+TOTAL_STACK+\")\");assert(typeof Int32Array!==\"undefined\"&&typeof Float64Array!==\"undefined\"&&Int32Array.prototype.subarray!==undefined&&Int32Array.prototype.set!==undefined,\"JS engine does not provide full typed array support\");assert(!Module[\"wasmMemory\"],\"Use of `wasmMemory` detected.  Use -s IMPORTED_MEMORY to define wasmMemory externally\");assert(INITIAL_MEMORY==16777216,\"Detected runtime INITIAL_MEMORY setting.  Use -s IMPORTED_MEMORY to define wasmMemory dynamically\");var wasmTable;function writeStackCookie(){var max=_emscripten_stack_get_end();assert((max&3)==0);HEAPU32[(max>>2)+1]=34821223;HEAPU32[(max>>2)+2]=2310721022;HEAP32[0]=1668509029}function checkStackCookie(){if(ABORT)return;var max=_emscripten_stack_get_end();var cookie1=HEAPU32[(max>>2)+1];var cookie2=HEAPU32[(max>>2)+2];if(cookie1!=34821223||cookie2!=2310721022){abort(\"Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x\"+cookie2.toString(16)+\" \"+cookie1.toString(16))}if(HEAP32[0]!==1668509029)abort(\"Runtime error: The application has corrupted its heap memory area (address zero)!\")}(function(){var h16=new Int16Array(1);var h8=new Int8Array(h16.buffer);h16[0]=25459;if(h8[0]!==115||h8[1]!==99)throw\"Runtime error: expected the system to be little-endian! (Run with -s SUPPORT_BIG_ENDIAN=1 to bypass)\"})();var __ATPRERUN__=[];var __ATINIT__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;var runtimeKeepaliveCounter=0;function keepRuntimeAlive(){return noExitRuntime||runtimeKeepaliveCounter>0}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(){checkStackCookie();assert(!runtimeInitialized);runtimeInitialized=true;if(!Module[\"noFSInit\"]&&!FS.init.initialized)FS.init();FS.ignorePermissions=false;TTY.init();callRuntimeCallbacks(__ATINIT__)}function exitRuntime(){checkStackCookie();runtimeExited=true}function postRun(){checkStackCookie();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)}assert(Math.imul,\"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill\");assert(Math.fround,\"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill\");assert(Math.clz32,\"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill\");assert(Math.trunc,\"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill\");var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;var runDependencyTracking={};function getUniqueRunDependency(id){var orig=id;while(1){if(!runDependencyTracking[id])return id;id=orig+Math.random()}}function addRunDependency(id){runDependencies++;if(Module[\"monitorRunDependencies\"]){Module[\"monitorRunDependencies\"](runDependencies)}if(id){assert(!runDependencyTracking[id]);runDependencyTracking[id]=1;if(runDependencyWatcher===null&&typeof setInterval!==\"undefined\"){runDependencyWatcher=setInterval(function(){if(ABORT){clearInterval(runDependencyWatcher);runDependencyWatcher=null;return}var shown=false;for(var dep in runDependencyTracking){if(!shown){shown=true;err(\"still waiting on run dependencies:\")}err(\"dependency: \"+dep)}if(shown){err(\"(end of list)\")}},1e4)}}else{err(\"warning: run dependency added without ID\")}}function removeRunDependency(id){runDependencies--;if(Module[\"monitorRunDependencies\"]){Module[\"monitorRunDependencies\"](runDependencies)}if(id){assert(runDependencyTracking[id]);delete runDependencyTracking[id]}else{err(\"warning: run dependency removed without ID\")}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module[\"preloadedImages\"]={};Module[\"preloadedAudios\"]={};function abort(what){if(Module[\"onAbort\"]){Module[\"onAbort\"](what)}what+=\"\";err(what);ABORT=true;EXITSTATUS=1;var output=\"abort(\"+what+\") at \"+stackTrace();what=output;var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix=\"data:application/octet-stream;base64,\";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}function isFileURI(filename){return filename.startsWith(\"file://\")}function createExportWrapper(name,fixedasm){return function(){var displayName=name;var asm=fixedasm;if(!fixedasm){asm=Module[\"asm\"]}assert(runtimeInitialized,\"native function `\"+displayName+\"` called before runtime initialization\");assert(!runtimeExited,\"native function `\"+displayName+\"` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)\");if(!asm[name]){assert(asm[name],\"exported native function `\"+displayName+\"` not found\")}return asm[name].apply(null,arguments)}}var wasmBinaryFile;wasmBinaryFile=\"face_mesh_solution_simd_wasm_bin.wasm\";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}else{throw\"both async and sync fetching of the wasm failed\"}}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch===\"function\"&&!isFileURI(wasmBinaryFile)){return fetch(wasmBinaryFile,{credentials:\"same-origin\"}).then(function(response){if(!response[\"ok\"]){throw\"failed to load wasm binary file at '\"+wasmBinaryFile+\"'\"}return response[\"arrayBuffer\"]()}).catch(function(){return getBinary(wasmBinaryFile)})}else{if(readAsync){return new Promise(function(resolve,reject){readAsync(wasmBinaryFile,function(response){resolve(new Uint8Array(response))},reject)})}}}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile)})}function createWasm(){var info={\"env\":asmLibraryArg,\"wasi_snapshot_preview1\":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module[\"asm\"]=exports;wasmMemory=Module[\"asm\"][\"memory\"];assert(wasmMemory,\"memory not found in wasm exports\");updateGlobalBufferAndViews(wasmMemory.buffer);wasmTable=Module[\"asm\"][\"__indirect_function_table\"];assert(wasmTable,\"table not found in wasm exports\");addOnInit(Module[\"asm\"][\"__wasm_call_ctors\"]);removeRunDependency(\"wasm-instantiate\")}addRunDependency(\"wasm-instantiate\");var trueModule=Module;function receiveInstantiationResult(result){assert(Module===trueModule,\"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?\");trueModule=null;receiveInstance(result[\"instance\"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){var result=WebAssembly.instantiate(binary,info);return result}).then(receiver,function(reason){err(\"failed to asynchronously prepare wasm: \"+reason);if(isFileURI(wasmBinaryFile)){err(\"warning: Loading from a file URI (\"+wasmBinaryFile+\") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing\")}abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming===\"function\"&&!isDataURI(wasmBinaryFile)&&!isFileURI(wasmBinaryFile)&&typeof fetch===\"function\"){return fetch(wasmBinaryFile,{credentials:\"same-origin\"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiationResult,function(reason){err(\"wasm streaming compile failed: \"+reason);err(\"falling back to ArrayBuffer instantiation\");return instantiateArrayBuffer(receiveInstantiationResult)})})}else{return instantiateArrayBuffer(receiveInstantiationResult)}}if(Module[\"instantiateWasm\"]){try{var exports=Module[\"instantiateWasm\"](info,receiveInstance);return exports}catch(e){err(\"Module.instantiateWasm callback failed with error: \"+e);return false}}instantiateAsync().catch(readyPromiseReject);return{}}var tempDouble;var tempI64;var ASM_CONSTS={547944:function(){let init_once=true;if(init_once){const cachedFindCanvasEventTarget=findCanvasEventTarget;if(typeof cachedFindCanvasEventTarget!==\"function\"){if(typeof console!==\"undefined\"){console.error(\"Expected Emscripten global function \"+'\"findCanvasEventTarget\" not found. WebGL context creation '+\"may fail.\")}return}findCanvasEventTarget=function(target){if(target==0){if(Module&&Module.canvas){return Module.canvas}else if(Module&&Module.canvasCssSelector){return cachedFindCanvasEventTarget(Module.canvasCssSelector)}if(typeof console!==\"undefined\"){console.warn(\"Module properties canvas and canvasCssSelector not \"+\"found during WebGL context creation.\")}}return cachedFindCanvasEventTarget(target)};init_once=false}},548729:function(){return typeof wasmOffsetConverter!==\"undefined\"}};function HaveOffsetConverter(){return typeof wasmOffsetConverter!==\"undefined\"}function _emscripten_set_main_loop_timing(mode,value){Browser.mainLoop.timingMode=mode;Browser.mainLoop.timingValue=value;if(!Browser.mainLoop.func){err(\"emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up.\");return 1}if(!Browser.mainLoop.running){Browser.mainLoop.running=true}if(mode==0){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setTimeout(){var timeUntilNextTick=Math.max(0,Browser.mainLoop.tickStartTime+value-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,timeUntilNextTick)};Browser.mainLoop.method=\"timeout\"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_rAF(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method=\"rAF\"}else if(mode==2){if(typeof setImmediate===\"undefined\"){var setImmediates=[];var emscriptenMainLoopMessageId=\"setimmediate\";var Browser_setImmediate_messageHandler=function(event){if(event.data===emscriptenMainLoopMessageId||event.data.target===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}};addEventListener(\"message\",Browser_setImmediate_messageHandler,true);setImmediate=function Browser_emulated_setImmediate(func){setImmediates.push(func);if(ENVIRONMENT_IS_WORKER){if(Module[\"setImmediates\"]===undefined)Module[\"setImmediates\"]=[];Module[\"setImmediates\"].push(func);postMessage({target:emscriptenMainLoopMessageId})}else postMessage(emscriptenMainLoopMessageId,\"*\")}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){setImmediate(Browser.mainLoop.runner)};Browser.mainLoop.method=\"immediate\"}return 0}var _emscripten_get_now;if(ENVIRONMENT_IS_NODE){_emscripten_get_now=function(){var t=process[\"hrtime\"]();return t[0]*1e3+t[1]/1e6}}else _emscripten_get_now=function(){return performance.now()};function _emscripten_webgl_do_commit_frame(){if(!GL.currentContext||!GL.currentContext.GLctx){return-3}if(GL.currentContext.defaultFbo){GL.blitOffscreenFramebuffer(GL.currentContext);return 0}if(!GL.currentContext.attributes.explicitSwapControl){return-3}return 0}function _exit(status){exit(status)}function maybeExit(){if(!keepRuntimeAlive()){try{_exit(EXITSTATUS)}catch(e){if(e instanceof ExitStatus){return}throw e}}}function setMainLoop(browserIterationFunc,fps,simulateInfiniteLoop,arg,noSetTiming){assert(!Browser.mainLoop.func,\"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.\");Browser.mainLoop.func=browserIterationFunc;Browser.mainLoop.arg=arg;var thisMainLoopId=Browser.mainLoop.currentlyRunningMainloop;function checkIsRunning(){if(thisMainLoopId<Browser.mainLoop.currentlyRunningMainloop){maybeExit();return false}return true}Browser.mainLoop.running=false;Browser.mainLoop.runner=function Browser_mainLoop_runner(){if(ABORT)return;if(Browser.mainLoop.queue.length>0){var start=Date.now();var blocker=Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if(Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){Browser.mainLoop.remainingBlockers=next}else{next=next+.5;Browser.mainLoop.remainingBlockers=(8*remaining+next)/9}}out('main loop blocker \"'+blocker.name+'\" took '+(Date.now()-start)+\" ms\");Browser.mainLoop.updateStatus();if(!checkIsRunning())return;setTimeout(Browser.mainLoop.runner,0);return}if(!checkIsRunning())return;Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0;if(Browser.mainLoop.timingMode==1&&Browser.mainLoop.timingValue>1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else if(Browser.mainLoop.timingMode==0){Browser.mainLoop.tickStartTime=_emscripten_get_now()}GL.newRenderingFrameStarted();if(typeof GL!==\"undefined\"&&GL.currentContext&&!GL.currentContextIsProxied&&!GL.currentContext.attributes.explicitSwapControl&&GL.currentContext.GLctx.commit){GL.currentContext.GLctx.commit()}if(Browser.mainLoop.method===\"timeout\"&&Module.ctx){warnOnce(\"Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!\");Browser.mainLoop.method=\"\"}Browser.mainLoop.runIter(browserIterationFunc);checkStackCookie();if(!checkIsRunning())return;if(typeof SDL===\"object\"&&SDL.audio&&SDL.audio.queueNewAudioData)SDL.audio.queueNewAudioData();Browser.mainLoop.scheduler()};if(!noSetTiming){if(fps&&fps>0)_emscripten_set_main_loop_timing(0,1e3/fps);else _emscripten_set_main_loop_timing(1,1);Browser.mainLoop.scheduler()}if(simulateInfiniteLoop){throw\"unwind\"}}function callUserCallback(func,synchronous){if(ABORT){err(\"user callback triggered after application aborted.  Ignoring.\");return}if(synchronous){func();return}try{func()}catch(e){if(e instanceof ExitStatus){return}else if(e!==\"unwind\"){if(e&&typeof e===\"object\"&&e.stack)err(\"exception thrown: \"+[e,e.stack]);throw e}}}function safeSetTimeout(func,timeout){return setTimeout(function(){callUserCallback(func)},timeout)}var Browser={mainLoop:{running:false,scheduler:null,method:\"\",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;setMainLoop(func,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()},updateStatus:function(){if(Module[\"setStatus\"]){var message=Module[\"statusMessage\"]||\"Please wait...\";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining<expected){Module[\"setStatus\"](message+\" (\"+(expected-remaining)+\"/\"+expected+\")\")}else{Module[\"setStatus\"](message)}}else{Module[\"setStatus\"](\"\")}}},runIter:function(func){if(ABORT)return;if(Module[\"preMainLoop\"]){var preRet=Module[\"preMainLoop\"]();if(preRet===false){return}}callUserCallback(func);if(Module[\"postMainLoop\"])Module[\"postMainLoop\"]()}},isFullscreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(!Module[\"preloadPlugins\"])Module[\"preloadPlugins\"]=[];if(Browser.initted)return;Browser.initted=true;try{new Blob;Browser.hasBlobConstructor=true}catch(e){Browser.hasBlobConstructor=false;out(\"warning: no blob constructor, cannot create blobs with mimetypes\")}Browser.BlobBuilder=typeof MozBlobBuilder!=\"undefined\"?MozBlobBuilder:typeof WebKitBlobBuilder!=\"undefined\"?WebKitBlobBuilder:!Browser.hasBlobConstructor?out(\"warning: no BlobBuilder\"):null;Browser.URLObject=typeof window!=\"undefined\"?window.URL?window.URL:window.webkitURL:undefined;if(!Module.noImageDecoding&&typeof Browser.URLObject===\"undefined\"){out(\"warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available.\");Module.noImageDecoding=true}var imagePlugin={};imagePlugin[\"canHandle\"]=function imagePlugin_canHandle(name){return!Module.noImageDecoding&&/\\.(jpg|jpeg|png|bmp)$/i.test(name)};imagePlugin[\"handle\"]=function imagePlugin_handle(byteArray,name,onload,onerror){var b=null;if(Browser.hasBlobConstructor){try{b=new Blob([byteArray],{type:Browser.getMimetype(name)});if(b.size!==byteArray.length){b=new Blob([new Uint8Array(byteArray).buffer],{type:Browser.getMimetype(name)})}}catch(e){warnOnce(\"Blob constructor present but fails: \"+e+\"; falling back to blob builder\")}}if(!b){var bb=new Browser.BlobBuilder;bb.append(new Uint8Array(byteArray).buffer);b=bb.getBlob()}var url=Browser.URLObject.createObjectURL(b);assert(typeof url==\"string\",\"createObjectURL must return a url as a string\");var img=new Image;img.onload=function img_onload(){assert(img.complete,\"Image \"+name+\" could not be decoded\");var canvas=document.createElement(\"canvas\");canvas.width=img.width;canvas.height=img.height;var ctx=canvas.getContext(\"2d\");ctx.drawImage(img,0,0);Module[\"preloadedImages\"][name]=canvas;Browser.URLObject.revokeObjectURL(url);if(onload)onload(byteArray)};img.onerror=function img_onerror(event){out(\"Image \"+url+\" could not be decoded\");if(onerror)onerror()};img.src=url};Module[\"preloadPlugins\"].push(imagePlugin);var audioPlugin={};audioPlugin[\"canHandle\"]=function audioPlugin_canHandle(name){return!Module.noAudioDecoding&&name.substr(-4)in{\".ogg\":1,\".wav\":1,\".mp3\":1}};audioPlugin[\"handle\"]=function audioPlugin_handle(byteArray,name,onload,onerror){var done=false;function finish(audio){if(done)return;done=true;Module[\"preloadedAudios\"][name]=audio;if(onload)onload(byteArray)}function fail(){if(done)return;done=true;Module[\"preloadedAudios\"][name]=new Audio;if(onerror)onerror()}if(Browser.hasBlobConstructor){try{var b=new Blob([byteArray],{type:Browser.getMimetype(name)})}catch(e){return fail()}var url=Browser.URLObject.createObjectURL(b);assert(typeof url==\"string\",\"createObjectURL must return a url as a string\");var audio=new Audio;audio.addEventListener(\"canplaythrough\",function(){finish(audio)},false);audio.onerror=function audio_onerror(event){if(done)return;out(\"warning: browser could not fully decode audio \"+name+\", trying slower base64 approach\");function encode64(data){var BASE=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";var PAD=\"=\";var ret=\"\";var leftchar=0;var leftbits=0;for(var i=0;i<data.length;i++){leftchar=leftchar<<8|data[i];leftbits+=8;while(leftbits>=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src=\"data:audio/x-\"+name.substr(-3)+\";base64,\"+encode64(byteArray);finish(audio)};audio.src=url;safeSetTimeout(function(){finish(audio)},1e4)}else{return fail()}};Module[\"preloadPlugins\"].push(audioPlugin);function pointerLockChange(){Browser.pointerLock=document[\"pointerLockElement\"]===Module[\"canvas\"]||document[\"mozPointerLockElement\"]===Module[\"canvas\"]||document[\"webkitPointerLockElement\"]===Module[\"canvas\"]||document[\"msPointerLockElement\"]===Module[\"canvas\"]}var canvas=Module[\"canvas\"];if(canvas){canvas.requestPointerLock=canvas[\"requestPointerLock\"]||canvas[\"mozRequestPointerLock\"]||canvas[\"webkitRequestPointerLock\"]||canvas[\"msRequestPointerLock\"]||function(){};canvas.exitPointerLock=document[\"exitPointerLock\"]||document[\"mozExitPointerLock\"]||document[\"webkitExitPointerLock\"]||document[\"msExitPointerLock\"]||function(){};canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener(\"pointerlockchange\",pointerLockChange,false);document.addEventListener(\"mozpointerlockchange\",pointerLockChange,false);document.addEventListener(\"webkitpointerlockchange\",pointerLockChange,false);document.addEventListener(\"mspointerlockchange\",pointerLockChange,false);if(Module[\"elementPointerLock\"]){canvas.addEventListener(\"click\",function(ev){if(!Browser.pointerLock&&Module[\"canvas\"].requestPointerLock){Module[\"canvas\"].requestPointerLock();ev.preventDefault()}},false)}}},createContext:function(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx;var contextHandle;if(useWebGL){var contextAttributes={antialias:false,alpha:false,majorVersion:typeof WebGL2RenderingContext!==\"undefined\"?2:1};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}if(typeof GL!==\"undefined\"){contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}}}else{ctx=canvas.getContext(\"2d\")}if(!ctx)return null;if(setInModule){if(!useWebGL)assert(typeof GLctx===\"undefined\",\"cannot set in module if GLctx is used, but we are a non-GL context that would replace it\");Module.ctx=ctx;if(useWebGL)GL.makeContextCurrent(contextHandle);Module.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach(function(callback){callback()});Browser.init()}return ctx},destroyContext:function(canvas,useWebGL,setInModule){},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function(lockPointer,resizeCanvas){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;if(typeof Browser.lockPointer===\"undefined\")Browser.lockPointer=true;if(typeof Browser.resizeCanvas===\"undefined\")Browser.resizeCanvas=false;var canvas=Module[\"canvas\"];function fullscreenChange(){Browser.isFullscreen=false;var canvasContainer=canvas.parentNode;if((document[\"fullscreenElement\"]||document[\"mozFullScreenElement\"]||document[\"msFullscreenElement\"]||document[\"webkitFullscreenElement\"]||document[\"webkitCurrentFullScreenElement\"])===canvasContainer){canvas.exitFullscreen=Browser.exitFullscreen;if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullscreen=true;if(Browser.resizeCanvas){Browser.setFullscreenCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas){Browser.setWindowedCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}if(Module[\"onFullScreen\"])Module[\"onFullScreen\"](Browser.isFullscreen);if(Module[\"onFullscreen\"])Module[\"onFullscreen\"](Browser.isFullscreen)}if(!Browser.fullscreenHandlersInstalled){Browser.fullscreenHandlersInstalled=true;document.addEventListener(\"fullscreenchange\",fullscreenChange,false);document.addEventListener(\"mozfullscreenchange\",fullscreenChange,false);document.addEventListener(\"webkitfullscreenchange\",fullscreenChange,false);document.addEventListener(\"MSFullscreenChange\",fullscreenChange,false)}var canvasContainer=document.createElement(\"div\");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullscreen=canvasContainer[\"requestFullscreen\"]||canvasContainer[\"mozRequestFullScreen\"]||canvasContainer[\"msRequestFullscreen\"]||(canvasContainer[\"webkitRequestFullscreen\"]?function(){canvasContainer[\"webkitRequestFullscreen\"](Element[\"ALLOW_KEYBOARD_INPUT\"])}:null)||(canvasContainer[\"webkitRequestFullScreen\"]?function(){canvasContainer[\"webkitRequestFullScreen\"](Element[\"ALLOW_KEYBOARD_INPUT\"])}:null);canvasContainer.requestFullscreen()},requestFullScreen:function(){abort(\"Module.requestFullScreen has been replaced by Module.requestFullscreen (without a capital S)\")},exitFullscreen:function(){if(!Browser.isFullscreen){return false}var CFS=document[\"exitFullscreen\"]||document[\"cancelFullScreen\"]||document[\"mozCancelFullScreen\"]||document[\"msExitFullscreen\"]||document[\"webkitCancelFullScreen\"]||function(){};CFS.apply(document,[]);return true},nextRAF:0,fakeRequestAnimationFrame:function(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)},requestAnimationFrame:function(func){if(typeof requestAnimationFrame===\"function\"){requestAnimationFrame(func);return}var RAF=Browser.fakeRequestAnimationFrame;RAF(func)},safeSetTimeout:function(func){return safeSetTimeout(func)},safeRequestAnimationFrame:function(func){return Browser.requestAnimationFrame(function(){callUserCallback(func)})},getMimetype:function(name){return{\"jpg\":\"image/jpeg\",\"jpeg\":\"image/jpeg\",\"png\":\"image/png\",\"bmp\":\"image/bmp\",\"ogg\":\"audio/ogg\",\"wav\":\"audio/wav\",\"mp3\":\"audio/mpeg\"}[name.substr(name.lastIndexOf(\".\")+1)]},getUserMedia:function(func){if(!window.getUserMedia){window.getUserMedia=navigator[\"getUserMedia\"]||navigator[\"mozGetUserMedia\"]}window.getUserMedia(func)},getMovementX:function(event){return event[\"movementX\"]||event[\"mozMovementX\"]||event[\"webkitMovementX\"]||0},getMovementY:function(event){return event[\"movementY\"]||event[\"mozMovementY\"]||event[\"webkitMovementY\"]||0},getMouseWheelDelta:function(event){var delta=0;switch(event.type){case\"DOMMouseScroll\":delta=event.detail/3;break;case\"mousewheel\":delta=event.wheelDelta/120;break;case\"wheel\":delta=event.deltaY;switch(event.deltaMode){case 0:delta/=100;break;case 1:delta/=3;break;case 2:delta*=80;break;default:throw\"unrecognized mouse wheel delta mode: \"+event.deltaMode}break;default:throw\"unrecognized mouse wheel event: \"+event.type}return delta},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(event){if(Browser.pointerLock){if(event.type!=\"mousemove\"&&\"mozMovementX\"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}if(typeof SDL!=\"undefined\"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}}else{var rect=Module[\"canvas\"].getBoundingClientRect();var cw=Module[\"canvas\"].width;var ch=Module[\"canvas\"].height;var scrollX=typeof window.scrollX!==\"undefined\"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!==\"undefined\"?window.scrollY:window.pageYOffset;assert(typeof scrollX!==\"undefined\"&&typeof scrollY!==\"undefined\",\"Unable to retrieve scroll position, mouse positions likely broken.\");if(event.type===\"touchstart\"||event.type===\"touchend\"||event.type===\"touchmove\"){var touch=event.touch;if(touch===undefined){return}var adjustedX=touch.pageX-(scrollX+rect.left);var adjustedY=touch.pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);var coords={x:adjustedX,y:adjustedY};if(event.type===\"touchstart\"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type===\"touchend\"||event.type===\"touchmove\"){var last=Browser.touches[touch.identifier];if(!last)last=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}},resizeListeners:[],updateResizeListeners:function(){var canvas=Module[\"canvas\"];Browser.resizeListeners.forEach(function(listener){listener(canvas.width,canvas.height)})},setCanvasSize:function(width,height,noUpdates){var canvas=Module[\"canvas\"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!=\"undefined\"){var flags=HEAPU32[SDL.screen>>2];flags=flags|8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module[\"canvas\"]);Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!=\"undefined\"){var flags=HEAPU32[SDL.screen>>2];flags=flags&~8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module[\"canvas\"]);Browser.updateResizeListeners()},updateCanvasDimensions:function(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module[\"forcedAspectRatio\"]&&Module[\"forcedAspectRatio\"]>0){if(w/h<Module[\"forcedAspectRatio\"]){w=Math.round(h*Module[\"forcedAspectRatio\"])}else{h=Math.round(w/Module[\"forcedAspectRatio\"])}}if((document[\"fullscreenElement\"]||document[\"mozFullScreenElement\"]||document[\"msFullscreenElement\"]||document[\"webkitFullscreenElement\"]||document[\"webkitCurrentFullScreenElement\"])===canvas.parentNode&&typeof screen!=\"undefined\"){var factor=Math.min(screen.width/w,screen.height/h);w=Math.round(w*factor);h=Math.round(h*factor)}if(Browser.resizeCanvas){if(canvas.width!=w)canvas.width=w;if(canvas.height!=h)canvas.height=h;if(typeof canvas.style!=\"undefined\"){canvas.style.removeProperty(\"width\");canvas.style.removeProperty(\"height\")}}else{if(canvas.width!=wNative)canvas.width=wNative;if(canvas.height!=hNative)canvas.height=hNative;if(typeof canvas.style!=\"undefined\"){if(w!=wNative||h!=hNative){canvas.style.setProperty(\"width\",w+\"px\",\"important\");canvas.style.setProperty(\"height\",h+\"px\",\"important\")}else{canvas.style.removeProperty(\"width\");canvas.style.removeProperty(\"height\")}}}}};function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback==\"function\"){callback(Module);continue}var func=callback.func;if(typeof func===\"number\"){if(callback.arg===undefined){wasmTable.get(func)()}else{wasmTable.get(func)(callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}function demangle(func){warnOnce(\"warning: build with  -s DEMANGLE_SUPPORT=1  to link in libcxxabi demangling\");return func}function demangleAll(text){var regex=/\\b_Z[\\w\\d_]+/g;return text.replace(regex,function(x){var y=demangle(x);return x===y?x:y+\" [\"+x+\"]\"})}function jsStackTrace(){var error=new Error;if(!error.stack){try{throw new Error}catch(e){error=e}if(!error.stack){return\"(no stack trace available)\"}}return error.stack.toString()}function stackTrace(){var js=jsStackTrace();if(Module[\"extraStackTrace\"])js+=\"\\n\"+Module[\"extraStackTrace\"]();return demangleAll(js)}function ___cxa_allocate_exception(size){return _malloc(size+16)+16}function _atexit(func,arg){}function ___cxa_atexit(a0,a1){return _atexit(a0,a1)}function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-16;this.set_type=function(type){HEAP32[this.ptr+4>>2]=type};this.get_type=function(){return HEAP32[this.ptr+4>>2]};this.set_destructor=function(destructor){HEAP32[this.ptr+8>>2]=destructor};this.get_destructor=function(){return HEAP32[this.ptr+8>>2]};this.set_refcount=function(refcount){HEAP32[this.ptr>>2]=refcount};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>0]=caught};this.get_caught=function(){return HEAP8[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return HEAP8[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_type(type);this.set_destructor(destructor);this.set_refcount(0);this.set_caught(false);this.set_rethrown(false)};this.add_ref=function(){var value=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=value+1};this.release_ref=function(){var prev=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=prev-1;assert(prev>0);return prev===1}}function CatchInfo(ptr){this.free=function(){_free(this.ptr);this.ptr=0};this.set_base_ptr=function(basePtr){HEAP32[this.ptr>>2]=basePtr};this.get_base_ptr=function(){return HEAP32[this.ptr>>2]};this.set_adjusted_ptr=function(adjustedPtr){HEAP32[this.ptr+4>>2]=adjustedPtr};this.get_adjusted_ptr_addr=function(){return this.ptr+4};this.get_adjusted_ptr=function(){return HEAP32[this.ptr+4>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_exception_info().get_type());if(isPointer){return HEAP32[this.get_base_ptr()>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.get_base_ptr()};this.get_exception_info=function(){return new ExceptionInfo(this.get_base_ptr())};if(ptr===undefined){this.ptr=_malloc(8);this.set_adjusted_ptr(0)}else{this.ptr=ptr}}var exceptionCaught=[];function exception_addRef(info){info.add_ref()}var uncaughtExceptionCount=0;function ___cxa_begin_catch(ptr){var catchInfo=new CatchInfo(ptr);var info=catchInfo.get_exception_info();if(!info.get_caught()){info.set_caught(true);uncaughtExceptionCount--}info.set_rethrown(false);exceptionCaught.push(catchInfo);exception_addRef(info);return catchInfo.get_exception_ptr()}var exceptionLast=0;function ___cxa_free_exception(ptr){try{return _free(new ExceptionInfo(ptr).ptr)}catch(e){err(\"exception during cxa_free_exception: \"+e)}}function exception_decRef(info){if(info.release_ref()&&!info.get_rethrown()){var destructor=info.get_destructor();if(destructor){wasmTable.get(destructor)(info.excPtr)}___cxa_free_exception(info.excPtr)}}function ___cxa_end_catch(){_setThrew(0);assert(exceptionCaught.length>0);var catchInfo=exceptionCaught.pop();exception_decRef(catchInfo.get_exception_info());catchInfo.free();exceptionLast=0}function ___resumeException(catchInfoPtr){var catchInfo=new CatchInfo(catchInfoPtr);var ptr=catchInfo.get_base_ptr();if(!exceptionLast){exceptionLast=ptr}catchInfo.free();throw ptr+\" - Exception catching is disabled, this exception cannot be caught. Compile with -s NO_DISABLE_EXCEPTION_CATCHING or -s EXCEPTION_CATCHING_ALLOWED=[..] to catch.\"}function ___cxa_find_matching_catch_2(){var thrown=exceptionLast;if(!thrown){setTempRet0(0);return 0|0}var info=new ExceptionInfo(thrown);var thrownType=info.get_type();var catchInfo=new CatchInfo;catchInfo.set_base_ptr(thrown);catchInfo.set_adjusted_ptr(thrown);if(!thrownType){setTempRet0(0);return catchInfo.ptr|0}var typeArray=Array.prototype.slice.call(arguments);for(var i=0;i<typeArray.length;i++){var caughtType=typeArray[i];if(caughtType===0||caughtType===thrownType){break}if(___cxa_can_catch(caughtType,thrownType,catchInfo.get_adjusted_ptr_addr())){setTempRet0(caughtType);return catchInfo.ptr|0}}setTempRet0(thrownType);return catchInfo.ptr|0}function ___cxa_find_matching_catch_3(){var thrown=exceptionLast;if(!thrown){setTempRet0(0);return 0|0}var info=new ExceptionInfo(thrown);var thrownType=info.get_type();var catchInfo=new CatchInfo;catchInfo.set_base_ptr(thrown);catchInfo.set_adjusted_ptr(thrown);if(!thrownType){setTempRet0(0);return catchInfo.ptr|0}var typeArray=Array.prototype.slice.call(arguments);for(var i=0;i<typeArray.length;i++){var caughtType=typeArray[i];if(caughtType===0||caughtType===thrownType){break}if(___cxa_can_catch(caughtType,thrownType,catchInfo.get_adjusted_ptr_addr())){setTempRet0(caughtType);return catchInfo.ptr|0}}setTempRet0(thrownType);return catchInfo.ptr|0}function ___cxa_rethrow(){var catchInfo=exceptionCaught.pop();if(!catchInfo){abort(\"no exception to throw\")}var info=catchInfo.get_exception_info();var ptr=catchInfo.get_base_ptr();if(!info.get_rethrown()){exceptionCaught.push(catchInfo);info.set_rethrown(true);info.set_caught(false);uncaughtExceptionCount++}else{catchInfo.free()}exceptionLast=ptr;throw ptr+\" - Exception catching is disabled, this exception cannot be caught. Compile with -s NO_DISABLE_EXCEPTION_CATCHING or -s EXCEPTION_CATCHING_ALLOWED=[..] to catch.\"}function ___cxa_thread_atexit(a0,a1){return _atexit(a0,a1)}function ___cxa_throw(ptr,type,destructor){var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;throw ptr+\" - Exception catching is disabled, this exception cannot be caught. Compile with -s NO_DISABLE_EXCEPTION_CATCHING or -s EXCEPTION_CATCHING_ALLOWED=[..] to catch.\"}function setErrNo(value){HEAP32[___errno_location()>>2]=value;return value}var PATH={splitPath:function(filename){var splitPathRe=/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:function(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:function(path){var isAbsolute=path.charAt(0)===\"/\",trailingSlash=path.substr(-1)===\"/\";path=PATH.normalizeArray(path.split(\"/\").filter(function(p){return!!p}),!isAbsolute).join(\"/\");if(!path&&!isAbsolute){path=\".\"}if(path&&trailingSlash){path+=\"/\"}return(isAbsolute?\"/\":\"\")+path},dirname:function(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:function(path){if(path===\"/\")return\"/\";path=PATH.normalize(path);path=path.replace(/\\/$/,\"\");var lastSlash=path.lastIndexOf(\"/\");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},extname:function(path){return PATH.splitPath(path)[3]},join:function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join(\"/\"))},join2:function(l,r){return PATH.normalize(l+\"/\"+r)}};function getRandomDevice(){if(typeof crypto===\"object\"&&typeof crypto[\"getRandomValues\"]===\"function\"){var randomBuffer=new Uint8Array(1);return function(){crypto.getRandomValues(randomBuffer);return randomBuffer[0]}}else if(ENVIRONMENT_IS_NODE){try{var crypto_module=require(\"crypto\");return function(){return crypto_module[\"randomBytes\"](1)[0]}}catch(e){}}return function(){abort(\"no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };\")}}var PATH_FS={resolve:function(){var resolvedPath=\"\",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[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.charAt(0)===\"/\"}resolvedPath=PATH.normalizeArray(resolvedPath.split(\"/\").filter(function(p){return!!p}),!resolvedAbsolute).join(\"/\");return(resolvedAbsolute?\"/\":\"\")+resolvedPath||\".\"},relative:function(from,to){from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start<arr.length;start++){if(arr[start]!==\"\")break}var end=arr.length-1;for(;end>=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<length;i++){if(fromParts[i]!==toParts[i]){samePartsLength=i;break}}var outputParts=[];for(var i=samePartsLength;i<fromParts.length;i++){outputParts.push(\"..\")}outputParts=outputParts.concat(toParts.slice(samePartsLength));return outputParts.join(\"/\")}};var TTY={ttys:[],init:function(){},shutdown:function(){},register:function(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)},stream_ops:{open:function(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43)}stream.tty=tty;stream.seekable=false},close:function(stream){stream.tty.ops.flush(stream.tty)},flush:function(stream){stream.tty.ops.flush(stream.tty)},read:function(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;i<length;i++){var result;try{result=stream.tty.ops.get_char(stream.tty)}catch(e){throw new FS.ErrnoError(29)}if(result===undefined&&bytesRead===0){throw new FS.ErrnoError(6)}if(result===null||result===undefined)break;bytesRead++;buffer[offset+i]=result}if(bytesRead){stream.node.timestamp=Date.now()}return bytesRead},write:function(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.put_char){throw new FS.ErrnoError(60)}try{for(var i=0;i<length;i++){stream.tty.ops.put_char(stream.tty,buffer[offset+i])}}catch(e){throw new FS.ErrnoError(29)}if(length){stream.node.timestamp=Date.now()}return i}},default_tty_ops:{get_char:function(tty){if(!tty.input.length){var result=null;if(ENVIRONMENT_IS_NODE){var BUFSIZE=256;var buf=Buffer.alloc(BUFSIZE);var bytesRead=0;try{bytesRead=nodeFS.readSync(process.stdin.fd,buf,0,BUFSIZE,null)}catch(e){if(e.toString().includes(\"EOF\"))bytesRead=0;else throw e}if(bytesRead>0){result=buf.slice(0,bytesRead).toString(\"utf-8\")}else{result=null}}else if(typeof window!=\"undefined\"&&typeof window.prompt==\"function\"){result=window.prompt(\"Input: \");if(result!==null){result+=\"\\n\"}}else if(typeof readline==\"function\"){result=readline();if(result!==null){result+=\"\\n\"}}if(!result){return null}tty.input=intArrayFromString(result,true)}return tty.input.shift()},put_char:function(tty,val){if(val===null||val===10){out(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}}},default_tty1_ops:{put_char:function(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};function zeroMemory(address,size){HEAPU8.fill(0,address,address+size)}function alignMemory(size,alignment){assert(alignment,\"alignment argument is required\");return Math.ceil(size/alignment)*alignment}function mmapAlloc(size){size=alignMemory(size,65536);var ptr=_memalign(65536,size);if(!ptr)return 0;zeroMemory(ptr,size);return ptr}var MEMFS={ops_table:null,mount:function(mount){return MEMFS.createNode(null,\"/\",16384|511,0)},createNode:function(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}if(!MEMFS.ops_table){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.timestamp=Date.now();if(parent){parent.contents[name]=node;parent.timestamp=node.timestamp}return node},getFileDataAsTypedArray:function(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:function(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<CAPACITY_DOUBLING_MAX?2:1.125)>>>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:function(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:function(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.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr},setattr:function(node,attr){if(attr.mode!==undefined){node.mode=attr.mode}if(attr.timestamp!==undefined){node.timestamp=attr.timestamp}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}},lookup:function(parent,name){throw FS.genericErrors[44]},mknod:function(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename:function(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55)}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp;old_node.parent=new_dir},unlink:function(parent,name){delete parent.contents[name];parent.timestamp=Date.now()},rmdir:function(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55)}delete parent.contents[name];parent.timestamp=Date.now()},readdir:function(node){var entries=[\".\",\"..\"];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue}entries.push(key)}return entries},symlink:function(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink:function(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read:function(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);assert(size>=0);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i<size;i++)buffer[offset+i]=contents[position+i]}return size},write:function(stream,buffer,offset,length,position,canOwn){assert(!(buffer instanceof ArrayBuffer));if(buffer.buffer===HEAP8.buffer){canOwn=false}if(!length)return 0;var node=stream.node;node.timestamp=Date.now();if(buffer.subarray&&(!node.contents||node.contents.subarray)){if(canOwn){assert(position===0,\"canOwn must imply no weird position inside the file\");node.contents=buffer.subarray(offset,offset+length);node.usedBytes=length;return length}else if(node.usedBytes===0&&position===0){node.contents=buffer.slice(offset,offset+length);node.usedBytes=length;return length}else if(position+length<=node.usedBytes){node.contents.set(buffer.subarray(offset,offset+length),position);return length}}MEMFS.expandFileStorage(node,position+length);if(node.contents.subarray&&buffer.subarray){node.contents.set(buffer.subarray(offset,offset+length),position)}else{for(var i=0;i<length;i++){node.contents[position+i]=buffer[offset+i]}}node.usedBytes=Math.max(node.usedBytes,position+length);return length},llseek:function(stream,offset,whence){var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){position+=stream.node.usedBytes}}if(position<0){throw new FS.ErrnoError(28)}return position},allocate:function(stream,offset,length){MEMFS.expandFileStorage(stream.node,offset+length);stream.node.usedBytes=Math.max(stream.node.usedBytes,offset+length)},mmap:function(stream,address,length,position,prot,flags){if(address!==0){throw new FS.ErrnoError(28)}if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}var ptr;var allocated;var contents=stream.node.contents;if(!(flags&2)&&contents.buffer===buffer){allocated=false;ptr=contents.byteOffset}else{if(position>0||position+length<contents.length){if(contents.subarray){contents=contents.subarray(position,position+length)}else{contents=Array.prototype.slice.call(contents,position,position+length)}}allocated=true;ptr=mmapAlloc(length);if(!ptr){throw new FS.ErrnoError(48)}HEAP8.set(contents,ptr)}return{ptr:ptr,allocated:allocated}},msync:function(stream,buffer,offset,length,mmapFlags){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}if(mmapFlags&2){return 0}var bytesWritten=MEMFS.stream_ops.write(stream,buffer,0,length,offset,false);return 0}}};function asyncLoad(url,onload,onerror,noRunDep){var dep=!noRunDep?getUniqueRunDependency(\"al \"+url):\"\";readAsync(url,function(arrayBuffer){assert(arrayBuffer,'Loading data file \"'+url+'\" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},function(event){if(onerror){onerror()}else{throw'Loading data file \"'+url+'\" failed.'}});if(dep)addRunDependency(dep)}var ERRNO_MESSAGES={0:\"Success\",1:\"Arg list too long\",2:\"Permission denied\",3:\"Address already in use\",4:\"Address not available\",5:\"Address family not supported by protocol family\",6:\"No more processes\",7:\"Socket already connected\",8:\"Bad file number\",9:\"Trying to read unreadable message\",10:\"Mount device busy\",11:\"Operation canceled\",12:\"No children\",13:\"Connection aborted\",14:\"Connection refused\",15:\"Connection reset by peer\",16:\"File locking deadlock error\",17:\"Destination address required\",18:\"Math arg out of domain of func\",19:\"Quota exceeded\",20:\"File exists\",21:\"Bad address\",22:\"File too large\",23:\"Host is unreachable\",24:\"Identifier removed\",25:\"Illegal byte sequence\",26:\"Connection already in progress\",27:\"Interrupted system call\",28:\"Invalid argument\",29:\"I/O error\",30:\"Socket is already connected\",31:\"Is a directory\",32:\"Too many symbolic links\",33:\"Too many open files\",34:\"Too many links\",35:\"Message too long\",36:\"Multihop attempted\",37:\"File or path name too long\",38:\"Network interface is not configured\",39:\"Connection reset by network\",40:\"Network is unreachable\",41:\"Too many open files in system\",42:\"No buffer space available\",43:\"No such device\",44:\"No such file or directory\",45:\"Exec format error\",46:\"No record locks available\",47:\"The link has been severed\",48:\"Not enough core\",49:\"No message of desired type\",50:\"Protocol not available\",51:\"No space left on device\",52:\"Function not implemented\",53:\"Socket is not connected\",54:\"Not a directory\",55:\"Directory not empty\",56:\"State not recoverable\",57:\"Socket operation on non-socket\",59:\"Not a typewriter\",60:\"No such device or address\",61:\"Value too large for defined data type\",62:\"Previous owner died\",63:\"Not super-user\",64:\"Broken pipe\",65:\"Protocol error\",66:\"Unknown protocol\",67:\"Protocol wrong type for socket\",68:\"Math result not representable\",69:\"Read only file system\",70:\"Illegal seek\",71:\"No such process\",72:\"Stale file handle\",73:\"Connection timed out\",74:\"Text file busy\",75:\"Cross-device link\",100:\"Device not a stream\",101:\"Bad font file fmt\",102:\"Invalid slot\",103:\"Invalid request code\",104:\"No anode\",105:\"Block device required\",106:\"Channel number out of range\",107:\"Level 3 halted\",108:\"Level 3 reset\",109:\"Link number out of range\",110:\"Protocol driver not attached\",111:\"No CSI structure available\",112:\"Level 2 halted\",113:\"Invalid exchange\",114:\"Invalid request descriptor\",115:\"Exchange full\",116:\"No data (for no delay io)\",117:\"Timer expired\",118:\"Out of streams resources\",119:\"Machine is not on the network\",120:\"Package not installed\",121:\"The object is remote\",122:\"Advertise error\",123:\"Srmount error\",124:\"Communication error on send\",125:\"Cross mount point (not really error)\",126:\"Given log. name not unique\",127:\"f.d. invalid for this operation\",128:\"Remote address changed\",129:\"Can   access a needed shared lib\",130:\"Accessing a corrupted shared lib\",131:\".lib section in a.out corrupted\",132:\"Attempting to link in too many libs\",133:\"Attempting to exec a shared library\",135:\"Streams pipe error\",136:\"Too many users\",137:\"Socket type not supported\",138:\"Not supported\",139:\"Protocol family not supported\",140:\"Can't send after socket shutdown\",141:\"Too many references\",142:\"Host is down\",148:\"No medium (in tape drive)\",156:\"Level 2 not synchronized\"};var ERRNO_CODES={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:\"/\",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(path,opts){path=PATH_FS.resolve(FS.cwd(),path);opts=opts||{};if(!path)return{path:\"\",node:null};var defaults={follow_mount:true,recurse_count:0};for(var key in defaults){if(opts[key]===undefined){opts[key]=defaults[key]}}if(opts.recurse_count>8){throw new FS.ErrnoError(32)}var parts=PATH.normalizeArray(path.split(\"/\").filter(function(p){return!!p}),false);var current=FS.root;var current_path=\"/\";for(var i=0;i<parts.length;i++){var islast=i===parts.length-1;if(islast&&opts.parent){break}current=FS.lookupNode(current,parts[i]);current_path=PATH.join2(current_path,parts[i]);if(FS.isMountpoint(current)){if(!islast||islast&&opts.follow_mount){current=current.mounted.root}}if(!islast||opts.follow){var count=0;while(FS.isLink(current.mode)){var link=FS.readlink(current_path);current_path=PATH_FS.resolve(PATH.dirname(current_path),link);var lookup=FS.lookupPath(current_path,{recurse_count:opts.recurse_count});current=lookup.node;if(count++>40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath:function(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!==\"/\"?mount+\"/\"+path:mount+path}path=path?node.name+\"/\"+path:node.name;node=node.parent}},hashName:function(parentid,name){var hash=0;for(var i=0;i<name.length;i++){hash=(hash<<5)-hash+name.charCodeAt(i)|0}return(parentid+hash>>>0)%FS.nameTable.length},hashAddNode:function(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode:function(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:function(parent,name){var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode,parent)}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:function(parent,name,mode,rdev){assert(typeof parent===\"object\");var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode:function(node){FS.hashRemoveNode(node)},isRoot:function(node){return node===node.parent},isMountpoint:function(node){return!!node.mounted},isFile:function(mode){return(mode&61440)===32768},isDir:function(mode){return(mode&61440)===16384},isLink:function(mode){return(mode&61440)===40960},isChrdev:function(mode){return(mode&61440)===8192},isBlkdev:function(mode){return(mode&61440)===24576},isFIFO:function(mode){return(mode&61440)===4096},isSocket:function(mode){return(mode&49152)===49152},flagModes:{\"r\":0,\"r+\":2,\"w\":577,\"w+\":578,\"a\":1089,\"a+\":1090},modeStringToFlags:function(str){var flags=FS.flagModes[str];if(typeof flags===\"undefined\"){throw new Error(\"Unknown file open mode: \"+str)}return flags},flagsToPermissionString:function(flag){var perms=[\"r\",\"w\",\"rw\"][flag&3];if(flag&512){perms+=\"w\"}return perms},nodePermissions:function(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:function(dir){var errCode=FS.nodePermissions(dir,\"x\");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate:function(dir,name){try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,\"wx\")},mayDelete:function(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:function(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){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd:function(fd_start,fd_end){fd_start=fd_start||0;fd_end=fd_end||FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStream:function(fd){return FS.streams[fd]},createStream:function(stream,fd_start,fd_end){if(!FS.FSStream){FS.FSStream=function(){};FS.FSStream.prototype={object:{get:function(){return this.node},set:function(val){this.node=val}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}}}}var newStream=new FS.FSStream;for(var p in stream){newStream[p]=stream[p]}stream=newStream;var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream:function(fd){FS.streams[fd]=null},chrdev_stream_ops:{open:function(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek:function(){throw new FS.ErrnoError(70)}},major:function(dev){return dev>>8},minor:function(dev){return dev&255},makedev:function(ma,mi){return ma<<8|mi},registerDevice:function(dev,ops){FS.devices[dev]={stream_ops:ops}},getDevice:function(dev){return FS.devices[dev]},getMounts:function(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs:function(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){assert(FS.syncFSRequests>0);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(function(mount){if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount:function(type,opts,mountpoint){if(typeof type===\"string\"){throw type}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:type,opts:opts,mountpoint: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:function(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(function(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);assert(idx!==-1);node.mount.mounts.splice(idx,1)},lookup:function(parent,name){return parent.node_ops.lookup(parent,name)},mknod:function(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name===\".\"||name===\"..\"){throw new FS.ErrnoError(28)}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)},create:function(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir:function(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree:function(path,mode){var dirs=path.split(\"/\");var d=\"\";for(var i=0;i<dirs.length;++i){if(!dirs[i])continue;d+=\"/\"+dirs[i];try{FS.mkdir(d,mode)}catch(e){if(e.errno!=20)throw e}}},mkdev:function(path,mode,dev){if(typeof dev===\"undefined\"){dev=mode;mode=438}mode|=8192;return FS.mknod(path,mode,dev)},symlink:function(oldpath,newpath){if(!PATH_FS.resolve(oldpath)){throw new FS.ErrnoError(44)}var lookup=FS.lookupPath(newpath,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var newname=PATH.basename(newpath);var errCode=FS.mayCreate(parent,newname);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.symlink){throw new FS.ErrnoError(63)}return parent.node_ops.symlink(parent,newname,oldpath)},rename:function(old_path,new_path){var old_dirname=PATH.dirname(old_path);var new_dirname=PATH.dirname(new_path);var old_name=PATH.basename(old_path);var new_name=PATH.basename(new_path);var lookup,old_dir,new_dir;lookup=FS.lookupPath(old_path,{parent:true});old_dir=lookup.node;lookup=FS.lookupPath(new_path,{parent:true});new_dir=lookup.node;if(!old_dir||!new_dir)throw new FS.ErrnoError(44);if(old_dir.mount!==new_dir.mount){throw new FS.ErrnoError(75)}var old_node=FS.lookupNode(old_dir,old_name);var relative=PATH_FS.relative(old_path,new_dirname);if(relative.charAt(0)!==\".\"){throw new FS.ErrnoError(28)}relative=PATH_FS.relative(new_path,old_dirname);if(relative.charAt(0)!==\".\"){throw new FS.ErrnoError(55)}var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(old_node===new_node){return}var isdir=FS.isDir(old_node.mode);var errCode=FS.mayDelete(old_dir,old_name,isdir);if(errCode){throw new FS.ErrnoError(errCode)}errCode=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name);if(errCode){throw new FS.ErrnoError(errCode)}if(!old_dir.node_ops.rename){throw new FS.ErrnoError(63)}if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node)){throw new FS.ErrnoError(10)}if(new_dir!==old_dir){errCode=FS.nodePermissions(old_dir,\"w\");if(errCode){throw new FS.ErrnoError(errCode)}}try{if(FS.trackingDelegate[\"willMovePath\"]){FS.trackingDelegate[\"willMovePath\"](old_path,new_path)}}catch(e){err(\"FS.trackingDelegate['willMovePath']('\"+old_path+\"', '\"+new_path+\"') threw an exception: \"+e.message)}FS.hashRemoveNode(old_node);try{old_dir.node_ops.rename(old_node,new_dir,new_name)}catch(e){throw e}finally{FS.hashAddNode(old_node)}try{if(FS.trackingDelegate[\"onMovePath\"])FS.trackingDelegate[\"onMovePath\"](old_path,new_path)}catch(e){err(\"FS.trackingDelegate['onMovePath']('\"+old_path+\"', '\"+new_path+\"') threw an exception: \"+e.message)}},rmdir:function(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,true);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.rmdir){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}try{if(FS.trackingDelegate[\"willDeletePath\"]){FS.trackingDelegate[\"willDeletePath\"](path)}}catch(e){err(\"FS.trackingDelegate['willDeletePath']('\"+path+\"') threw an exception: \"+e.message)}parent.node_ops.rmdir(parent,name);FS.destroyNode(node);try{if(FS.trackingDelegate[\"onDeletePath\"])FS.trackingDelegate[\"onDeletePath\"](path)}catch(e){err(\"FS.trackingDelegate['onDeletePath']('\"+path+\"') threw an exception: \"+e.message)}},readdir:function(path){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node.node_ops.readdir){throw new FS.ErrnoError(54)}return node.node_ops.readdir(node)},unlink:function(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,false);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.unlink){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}try{if(FS.trackingDelegate[\"willDeletePath\"]){FS.trackingDelegate[\"willDeletePath\"](path)}}catch(e){err(\"FS.trackingDelegate['willDeletePath']('\"+path+\"') threw an exception: \"+e.message)}parent.node_ops.unlink(parent,name);FS.destroyNode(node);try{if(FS.trackingDelegate[\"onDeletePath\"])FS.trackingDelegate[\"onDeletePath\"](path)}catch(e){err(\"FS.trackingDelegate['onDeletePath']('\"+path+\"') threw an exception: \"+e.message)}},readlink:function(path){var lookup=FS.lookupPath(path);var link=lookup.node;if(!link){throw new FS.ErrnoError(44)}if(!link.node_ops.readlink){throw new FS.ErrnoError(28)}return PATH_FS.resolve(FS.getPath(link.parent),link.node_ops.readlink(link))},stat:function(path,dontFollow){var lookup=FS.lookupPath(path,{follow:!dontFollow});var node=lookup.node;if(!node){throw new FS.ErrnoError(44)}if(!node.node_ops.getattr){throw new FS.ErrnoError(63)}return node.node_ops.getattr(node)},lstat:function(path){return FS.stat(path,true)},chmod:function(path,mode,dontFollow){var node;if(typeof path===\"string\"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{mode:mode&4095|node.mode&~4095,timestamp:Date.now()})},lchmod:function(path,mode){FS.chmod(path,mode,true)},fchmod:function(fd,mode){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chmod(stream.node,mode)},chown:function(path,uid,gid,dontFollow){var node;if(typeof path===\"string\"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{timestamp:Date.now()})},lchown:function(path,uid,gid){FS.chown(path,uid,gid,true)},fchown:function(fd,uid,gid){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chown(stream.node,uid,gid)},truncate:function(path,len){if(len<0){throw new FS.ErrnoError(28)}var node;if(typeof path===\"string\"){var lookup=FS.lookupPath(path,{follow:true});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}if(FS.isDir(node.mode)){throw new FS.ErrnoError(31)}if(!FS.isFile(node.mode)){throw new FS.ErrnoError(28)}var errCode=FS.nodePermissions(node,\"w\");if(errCode){throw new FS.ErrnoError(errCode)}node.node_ops.setattr(node,{size:len,timestamp:Date.now()})},ftruncate:function(fd,len){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(28)}FS.truncate(stream.node,len)},utime:function(path,atime,mtime){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;node.node_ops.setattr(node,{timestamp:Math.max(atime,mtime)})},open:function(path,flags,mode,fd_start,fd_end){if(path===\"\"){throw new FS.ErrnoError(44)}flags=typeof flags===\"string\"?FS.modeStringToFlags(flags):flags;mode=typeof mode===\"undefined\"?438:mode;if(flags&64){mode=mode&4095|32768}else{mode=0}var node;if(typeof path===\"object\"){node=path}else{path=PATH.normalize(path);try{var lookup=FS.lookupPath(path,{follow:!(flags&131072)});node=lookup.node}catch(e){}}var created=false;if(flags&64){if(node){if(flags&128){throw new FS.ErrnoError(20)}}else{node=FS.mknod(path,mode,0);created=true}}if(!node){throw new FS.ErrnoError(44)}if(FS.isChrdev(node.mode)){flags&=~512}if(flags&65536&&!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}if(!created){var errCode=FS.mayOpen(node,flags);if(errCode){throw new FS.ErrnoError(errCode)}}if(flags&512){FS.truncate(node,0)}flags&=~(128|512|131072);var stream=FS.createStream({node:node,path:FS.getPath(node),flags:flags,seekable:true,position:0,stream_ops:node.stream_ops,ungotten:[],error:false},fd_start,fd_end);if(stream.stream_ops.open){stream.stream_ops.open(stream)}if(Module[\"logReadFiles\"]&&!(flags&1)){if(!FS.readFiles)FS.readFiles={};if(!(path in FS.readFiles)){FS.readFiles[path]=1;err(\"FS.trackingDelegate error on read file: \"+path)}}try{if(FS.trackingDelegate[\"onOpenFile\"]){var trackingFlags=0;if((flags&2097155)!==1){trackingFlags|=FS.tracking.openFlags.READ}if((flags&2097155)!==0){trackingFlags|=FS.tracking.openFlags.WRITE}FS.trackingDelegate[\"onOpenFile\"](path,trackingFlags)}}catch(e){err(\"FS.trackingDelegate['onOpenFile']('\"+path+\"', flags) threw an exception: \"+e.message)}return stream},close:function(stream){if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(stream.getdents)stream.getdents=null;try{if(stream.stream_ops.close){stream.stream_ops.close(stream)}}catch(e){throw e}finally{FS.closeStream(stream.fd)}stream.fd=null},isClosed:function(stream){return stream.fd===null},llseek:function(stream,offset,whence){if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(!stream.seekable||!stream.stream_ops.llseek){throw new FS.ErrnoError(70)}if(whence!=0&&whence!=1&&whence!=2){throw new FS.ErrnoError(28)}stream.position=stream.stream_ops.llseek(stream,offset,whence);stream.ungotten=[];return stream.position},read:function(stream,buffer,offset,length,position){if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.read){throw new FS.ErrnoError(28)}var seeking=typeof position!==\"undefined\";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead},write:function(stream,buffer,offset,length,position,canOwn){if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.write){throw new FS.ErrnoError(28)}if(stream.seekable&&stream.flags&1024){FS.llseek(stream,0,2)}var seeking=typeof position!==\"undefined\";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;try{if(stream.path&&FS.trackingDelegate[\"onWriteToFile\"])FS.trackingDelegate[\"onWriteToFile\"](stream.path)}catch(e){err(\"FS.trackingDelegate['onWriteToFile']('\"+stream.path+\"') threw an exception: \"+e.message)}return bytesWritten},allocate:function(stream,offset,length){if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(offset<0||length<=0){throw new FS.ErrnoError(28)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(!FS.isFile(stream.node.mode)&&!FS.isDir(stream.node.mode)){throw new FS.ErrnoError(43)}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(138)}stream.stream_ops.allocate(stream,offset,length)},mmap:function(stream,address,length,position,prot,flags){if((prot&2)!==0&&(flags&2)===0&&(stream.flags&2097155)!==2){throw new FS.ErrnoError(2)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(2)}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(43)}return stream.stream_ops.mmap(stream,address,length,position,prot,flags)},msync:function(stream,buffer,offset,length,mmapFlags){if(!stream||!stream.stream_ops.msync){return 0}return stream.stream_ops.msync(stream,buffer,offset,length,mmapFlags)},munmap:function(stream){return 0},ioctl:function(stream,cmd,arg){if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(59)}return stream.stream_ops.ioctl(stream,cmd,arg)},readFile:function(path,opts){opts=opts||{};opts.flags=opts.flags||0;opts.encoding=opts.encoding||\"binary\";if(opts.encoding!==\"utf8\"&&opts.encoding!==\"binary\"){throw new Error('Invalid encoding type \"'+opts.encoding+'\"')}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding===\"utf8\"){ret=UTF8ArrayToString(buf,0)}else if(opts.encoding===\"binary\"){ret=buf}FS.close(stream);return ret},writeFile:function(path,data,opts){opts=opts||{};opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);if(typeof data===\"string\"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,undefined,opts.canOwn)}else if(ArrayBuffer.isView(data)){FS.write(stream,data,0,data.byteLength,undefined,opts.canOwn)}else{throw new Error(\"Unsupported data type\")}FS.close(stream)},cwd:function(){return FS.currentPath},chdir:function(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:function(){FS.mkdir(\"/tmp\");FS.mkdir(\"/home\");FS.mkdir(\"/home/web_user\")},createDefaultDevices:function(){FS.mkdir(\"/dev\");FS.registerDevice(FS.makedev(1,3),{read:function(){return 0},write:function(stream,buffer,offset,length,pos){return length}});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 random_device=getRandomDevice();FS.createDevice(\"/dev\",\"random\",random_device);FS.createDevice(\"/dev\",\"urandom\",random_device);FS.mkdir(\"/dev/shm\");FS.mkdir(\"/dev/shm/tmp\")},createSpecialDirectories:function(){FS.mkdir(\"/proc\");var proc_self=FS.mkdir(\"/proc/self\");FS.mkdir(\"/proc/self/fd\");FS.mount({mount:function(){var node=FS.createNode(proc_self,\"fd\",16384|511,73);node.node_ops={lookup:function(parent,name){var fd=+name;var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);var ret={parent:null,mount:{mountpoint:\"fake\"},node_ops:{readlink:function(){return stream.path}}};ret.parent=ret;return ret}};return node}},{},\"/proc/self/fd\")},createStandardStreams:function(){if(Module[\"stdin\"]){FS.createDevice(\"/dev\",\"stdin\",Module[\"stdin\"])}else{FS.symlink(\"/dev/tty\",\"/dev/stdin\")}if(Module[\"stdout\"]){FS.createDevice(\"/dev\",\"stdout\",null,Module[\"stdout\"])}else{FS.symlink(\"/dev/tty\",\"/dev/stdout\")}if(Module[\"stderr\"]){FS.createDevice(\"/dev\",\"stderr\",null,Module[\"stderr\"])}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);assert(stdin.fd===0,\"invalid handle for stdin (\"+stdin.fd+\")\");assert(stdout.fd===1,\"invalid handle for stdout (\"+stdout.fd+\")\");assert(stderr.fd===2,\"invalid handle for stderr (\"+stderr.fd+\")\")},ensureErrnoError:function(){if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.node=node;this.setErrno=function(errno){this.errno=errno;for(var key in ERRNO_CODES){if(ERRNO_CODES[key]===errno){this.code=key;break}}};this.setErrno(errno);this.message=ERRNO_MESSAGES[errno];if(this.stack){Object.defineProperty(this,\"stack\",{value:(new Error).stack,writable:true});this.stack=demangleAll(this.stack)}};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[44].forEach(function(code){FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=\"<generic error, no stack>\"})},staticInit:function(){FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},\"/\");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={\"MEMFS\":MEMFS}},init:function(input,output,error){assert(!FS.init.initialized,\"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)\");FS.init.initialized=true;FS.ensureErrnoError();Module[\"stdin\"]=input||Module[\"stdin\"];Module[\"stdout\"]=output||Module[\"stdout\"];Module[\"stderr\"]=error||Module[\"stderr\"];FS.createStandardStreams()},quit:function(){FS.init.initialized=false;var fflush=Module[\"_fflush\"];if(fflush)fflush(0);for(var i=0;i<FS.streams.length;i++){var stream=FS.streams[i];if(!stream){continue}FS.close(stream)}},getMode:function(canRead,canWrite){var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode},findObject:function(path,dontResolveLastLink){var ret=FS.analyzePath(path,dontResolveLastLink);if(ret.exists){return ret.object}else{return null}},analyzePath:function(path,dontResolveLastLink){try{var lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});path=lookup.path}catch(e){}var ret={isRoot:false,exists:false,error:0,name:null,path:null,object:null,parentExists:false,parentPath:null,parentObject:null};try{var lookup=FS.lookupPath(path,{parent:true});ret.parentExists=true;ret.parentPath=lookup.path;ret.parentObject=lookup.node;ret.name=PATH.basename(path);lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});ret.exists=true;ret.path=lookup.path;ret.object=lookup.node;ret.name=lookup.node.name;ret.isRoot=lookup.path===\"/\"}catch(e){ret.error=e.errno}return ret},createPath:function(parent,path,canRead,canWrite){parent=typeof parent===\"string\"?parent:FS.getPath(parent);var parts=path.split(\"/\").reverse();while(parts.length){var part=parts.pop();if(!part)continue;var current=PATH.join2(parent,part);try{FS.mkdir(current)}catch(e){}parent=current}return current},createFile:function(parent,name,properties,canRead,canWrite){var path=PATH.join2(typeof parent===\"string\"?parent:FS.getPath(parent),name);var mode=FS.getMode(canRead,canWrite);return FS.create(path,mode)},createDataFile:function(parent,name,data,canRead,canWrite,canOwn){var path=name?PATH.join2(typeof parent===\"string\"?parent:FS.getPath(parent),name):parent;var mode=FS.getMode(canRead,canWrite);var node=FS.create(path,mode);if(data){if(typeof data===\"string\"){var arr=new Array(data.length);for(var i=0,len=data.length;i<len;++i)arr[i]=data.charCodeAt(i);data=arr}FS.chmod(node,mode|146);var stream=FS.open(node,577);FS.write(stream,data,0,data.length,0,canOwn);FS.close(stream);FS.chmod(node,mode)}return node},createDevice:function(parent,name,input,output){var path=PATH.join2(typeof parent===\"string\"?parent:FS.getPath(parent),name);var mode=FS.getMode(!!input,!!output);if(!FS.createDevice.major)FS.createDevice.major=64;var dev=FS.makedev(FS.createDevice.major++,0);FS.registerDevice(dev,{open:function(stream){stream.seekable=false},close:function(stream){if(output&&output.buffer&&output.buffer.length){output(10)}},read:function(stream,buffer,offset,length,pos){var bytesRead=0;for(var i=0;i<length;i++){var result;try{result=input()}catch(e){throw new FS.ErrnoError(29)}if(result===undefined&&bytesRead===0){throw new FS.ErrnoError(6)}if(result===null||result===undefined)break;bytesRead++;buffer[offset+i]=result}if(bytesRead){stream.node.timestamp=Date.now()}return bytesRead},write:function(stream,buffer,offset,length,pos){for(var i=0;i<length;i++){try{output(buffer[offset+i])}catch(e){throw new FS.ErrnoError(29)}}if(length){stream.node.timestamp=Date.now()}return i}});return FS.mkdev(path,mode,dev)},forceLoadFile:function(obj){if(obj.isDevice||obj.isFolder||obj.link||obj.contents)return true;if(typeof XMLHttpRequest!==\"undefined\"){throw new Error(\"Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.\")}else if(read_){try{obj.contents=intArrayFromString(read_(obj.url),true);obj.usedBytes=obj.contents.length}catch(e){throw new FS.ErrnoError(29)}}else{throw new Error(\"Cannot load without read() or XMLHttpRequest.\")}},createLazyFile:function(parent,name,url,canRead,canWrite){function LazyUint8Array(){this.lengthKnown=false;this.chunks=[]}LazyUint8Array.prototype.get=function LazyUint8Array_get(idx){if(idx>this.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_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=function(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);if(typeof Uint8Array!=\"undefined\")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||[])}else{return intArrayFromString(xhr.responseText||\"\",true)}};var lazyArray=this;lazyArray.setDataGetter(function(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};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;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url: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(function(key){var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments)}});stream_ops.read=function stream_ops_read(stream,buffer,offset,length,position){FS.forceLoadFile(node);var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);assert(size>=0);if(contents.slice){for(var i=0;i<size;i++){buffer[offset+i]=contents[position+i]}}else{for(var i=0;i<size;i++){buffer[offset+i]=contents.get(position+i)}}return size};node.stream_ops=stream_ops;return node},createPreloadedFile:function(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn,preFinish){Browser.init();var fullname=name?PATH_FS.resolve(PATH.join2(parent,name)):parent;var dep=getUniqueRunDependency(\"cp \"+fullname);function processData(byteArray){function finish(byteArray){if(preFinish)preFinish();if(!dontCreateFile){FS.createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}if(onload)onload();removeRunDependency(dep)}var handled=false;Module[\"preloadPlugins\"].forEach(function(plugin){if(handled)return;if(plugin[\"canHandle\"](fullname)){plugin[\"handle\"](byteArray,fullname,finish,function(){if(onerror)onerror();removeRunDependency(dep)});handled=true}});if(!handled)finish(byteArray)}addRunDependency(dep);if(typeof url==\"string\"){asyncLoad(url,function(byteArray){processData(byteArray)},onerror)}else{processData(url)}},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return\"EM_FS_\"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:\"FILE_DATA\",saveFilesToDB:function(paths,onload,onerror){onload=onload||function(){};onerror=onerror||function(){};var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=function openRequest_onupgradeneeded(){out(\"creating db\");var db=openRequest.result;db.createObjectStore(FS.DB_STORE_NAME)};openRequest.onsuccess=function openRequest_onsuccess(){var db=openRequest.result;var transaction=db.transaction([FS.DB_STORE_NAME],\"readwrite\");var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach(function(path){var putRequest=files.put(FS.analyzePath(path).object.contents,path);putRequest.onsuccess=function putRequest_onsuccess(){ok++;if(ok+fail==total)finish()};putRequest.onerror=function putRequest_onerror(){fail++;if(ok+fail==total)finish()}});transaction.onerror=onerror};openRequest.onerror=onerror},loadFilesFromDB:function(paths,onload,onerror){onload=onload||function(){};onerror=onerror||function(){};var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=onerror;openRequest.onsuccess=function openRequest_onsuccess(){var db=openRequest.result;try{var transaction=db.transaction([FS.DB_STORE_NAME],\"readonly\")}catch(e){onerror(e);return}var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach(function(path){var getRequest=files.get(path);getRequest.onsuccess=function getRequest_onsuccess(){if(FS.analyzePath(path).exists){FS.unlink(path)}FS.createDataFile(PATH.dirname(path),PATH.basename(path),getRequest.result,true,true,true);ok++;if(ok+fail==total)finish()};getRequest.onerror=function getRequest_onerror(){fail++;if(ok+fail==total)finish()}});transaction.onerror=onerror};openRequest.onerror=onerror},absolutePath:function(){abort(\"FS.absolutePath has been removed; use PATH_FS.resolve instead\")},createFolder:function(){abort(\"FS.createFolder has been removed; use FS.mkdir instead\")},createLink:function(){abort(\"FS.createLink has been removed; use FS.symlink instead\")},joinPath:function(){abort(\"FS.joinPath has been removed; use PATH.join instead\")},mmapAlloc:function(){abort(\"FS.mmapAlloc has been replaced by the top level function mmapAlloc\")},standardizePath:function(){abort(\"FS.standardizePath has been removed; use PATH.normalize instead\")}};var SYSCALLS={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(dirfd,path,allowEmpty){if(path[0]===\"/\"){return path}var dir;if(dirfd===-100){dir=FS.cwd()}else{var dirstream=FS.getStream(dirfd);if(!dirstream)throw new FS.ErrnoError(8);dir=dirstream.path}if(path.length==0){if(!allowEmpty){throw new FS.ErrnoError(44)}return dir}return PATH.join2(dir,path)},doStat:function(func,path,buf){try{var stat=func(path)}catch(e){if(e&&e.node&&PATH.normalize(path)!==PATH.normalize(FS.getPath(e.node))){return-54}throw e}HEAP32[buf>>2]=stat.dev;HEAP32[buf+4>>2]=0;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAP32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;HEAP32[buf+32>>2]=0;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAP32[buf+48>>2]=4096;HEAP32[buf+52>>2]=stat.blocks;HEAP32[buf+56>>2]=stat.atime.getTime()/1e3|0;HEAP32[buf+60>>2]=0;HEAP32[buf+64>>2]=stat.mtime.getTime()/1e3|0;HEAP32[buf+68>>2]=0;HEAP32[buf+72>>2]=stat.ctime.getTime()/1e3|0;HEAP32[buf+76>>2]=0;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+80>>2]=tempI64[0],HEAP32[buf+84>>2]=tempI64[1];return 0},doMsync:function(addr,stream,len,flags,offset){var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},doMkdir:function(path,mode){path=PATH.normalize(path);if(path[path.length-1]===\"/\")path=path.substr(0,path.length-1);FS.mkdir(path,mode,0);return 0},doMknod:function(path,mode,dev){switch(mode&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}FS.mknod(path,mode,dev);return 0},doReadlink:function(path,buf,bufsize){if(bufsize<=0)return-28;var ret=FS.readlink(path);var len=Math.min(bufsize,lengthBytesUTF8(ret));var endChar=HEAP8[buf+len];stringToUTF8(ret,buf,bufsize+1);HEAP8[buf+len]=endChar;return len},doAccess:function(path,amode){if(amode&~7){return-28}var node;var lookup=FS.lookupPath(path,{follow:true});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},doDup:function(path,flags,suggestFD){var suggest=FS.getStream(suggestFD);if(suggest)FS.close(suggest);return FS.open(path,flags,0,suggestFD,suggestFD).fd},doReadv:function(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i<iovcnt;i++){var ptr=HEAP32[iov+i*8>>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr<len)break}return ret},doWritev:function(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i<iovcnt;i++){var ptr=HEAP32[iov+i*8>>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr}return ret},varargs:undefined,get:function(){assert(SYSCALLS.varargs!=undefined);SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret},getStreamFromFD:function(fd){var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);return stream},get64:function(low,high){if(low>=0)assert(high===0);else assert(high===-1);return low}};function ___sys_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-28}var newStream;newStream=FS.open(stream.path,stream.flags,0,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0}case 12:{var arg=SYSCALLS.get();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 13:case 14:return 0;case 16:case 8:return-28;case 9:setErrNo(28);return-1;default:{return-28}}}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(op){case 21509:case 21505:{if(!stream.tty)return-59;return 0}case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:{if(!stream.tty)return-59;return 0}case 21519:{if(!stream.tty)return-59;var argp=SYSCALLS.get();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-59;return-28}case 21531:{var argp=SYSCALLS.get();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-59;return 0}case 21524:{if(!stream.tty)return-59;return 0}default:abort(\"bad ioctl syscall \"+op)}}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function syscallMmap2(addr,len,prot,flags,fd,off){off<<=12;var ptr;var allocated=false;if((flags&16)!==0&&addr%65536!==0){return-28}if((flags&32)!==0){ptr=mmapAlloc(len);if(!ptr)return-48;allocated=true}else{var info=FS.getStream(fd);if(!info)return-8;var res=FS.mmap(info,addr,len,off,prot,flags);ptr=res.ptr;allocated=res.allocated}SYSCALLS.mappings[ptr]={malloc:ptr,len:len,allocated:allocated,fd:fd,prot:prot,flags:flags,offset:off};return ptr}function ___sys_mmap2(addr,len,prot,flags,fd,off){try{return syscallMmap2(addr,len,prot,flags,fd,off)}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_open(path,flags,varargs){SYSCALLS.varargs=varargs;try{var pathname=SYSCALLS.getStr(path);var mode=varargs?SYSCALLS.get():0;var stream=FS.open(pathname,flags,mode);return stream.fd}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_stat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.stat,path,buf)}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}var char_0=48;var char_9=57;function makeLegalFunctionName(name){if(undefined===name){return\"_unknown\"}name=name.replace(/[^a-zA-Z0-9_]/g,\"$\");var f=name.charCodeAt(0);if(f>=char_0&&f<=char_9){return\"_\"+name}else{return name}}function createNamedFunction(name,body){name=makeLegalFunctionName(name);return new Function(\"body\",\"return function \"+name+\"() {\\n\"+'    \"use strict\";'+\"    return body.apply(this, arguments);\\n\"+\"};\\n\")(body)}var emval_free_list=[];var emval_handle_array=[{},{value:undefined},{value:null},{value:true},{value:false}];function count_emval_handles(){var count=0;for(var i=5;i<emval_handle_array.length;++i){if(emval_handle_array[i]!==undefined){++count}}return count}function get_first_emval(){for(var i=5;i<emval_handle_array.length;++i){if(emval_handle_array[i]!==undefined){return emval_handle_array[i]}}return null}function init_emval(){Module[\"count_emval_handles\"]=count_emval_handles;Module[\"get_first_emval\"]=get_first_emval}function __emval_register(value){switch(value){case undefined:{return 1}case null:{return 2}case true:{return 3}case false:{return 4}default:{var handle=emval_free_list.length?emval_free_list.pop():emval_handle_array.length;emval_handle_array[handle]={refcount:1,value:value};return handle}}}function extendError(baseErrorType,errorName){var errorClass=createNamedFunction(errorName,function(message){this.name=errorName;this.message=message;var stack=new Error(message).stack;if(stack!==undefined){this.stack=this.toString()+\"\\n\"+stack.replace(/^Error(:[^\\n]*)?\\n/,\"\")}});errorClass.prototype=Object.create(baseErrorType.prototype);errorClass.prototype.constructor=errorClass;errorClass.prototype.toString=function(){if(this.message===undefined){return this.name}else{return this.name+\": \"+this.message}};return errorClass}var PureVirtualError=undefined;function embind_init_charCodes(){var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes}var embind_charCodes=undefined;function readLatin1String(ptr){var ret=\"\";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret}function getInheritedInstanceCount(){return Object.keys(registeredInstances).length}function getLiveInheritedInstances(){var rv=[];for(var k in registeredInstances){if(registeredInstances.hasOwnProperty(k)){rv.push(registeredInstances[k])}}return rv}var deletionQueue=[];function flushPendingDeletes(){while(deletionQueue.length){var obj=deletionQueue.pop();obj.$$.deleteScheduled=false;obj[\"delete\"]()}}var delayFunction=undefined;function setDelayFunction(fn){delayFunction=fn;if(deletionQueue.length&&delayFunction){delayFunction(flushPendingDeletes)}}function init_embind(){Module[\"getInheritedInstanceCount\"]=getInheritedInstanceCount;Module[\"getLiveInheritedInstances\"]=getLiveInheritedInstances;Module[\"flushPendingDeletes\"]=flushPendingDeletes;Module[\"setDelayFunction\"]=setDelayFunction}var registeredInstances={};var BindingError=undefined;function throwBindingError(message){throw new BindingError(message)}function getBasestPointer(class_,ptr){if(ptr===undefined){throwBindingError(\"ptr should not be undefined\")}while(class_.baseClass){ptr=class_.upcast(ptr);class_=class_.baseClass}return ptr}function registerInheritedInstance(class_,ptr,instance){ptr=getBasestPointer(class_,ptr);if(registeredInstances.hasOwnProperty(ptr)){throwBindingError(\"Tried to register registered instance: \"+ptr)}else{registeredInstances[ptr]=instance}}function requireHandle(handle){if(!handle){throwBindingError(\"Cannot use deleted val. handle = \"+handle)}return emval_handle_array[handle].value}var registeredTypes={};function getTypeName(type){var ptr=___getTypeName(type);var rv=readLatin1String(ptr);_free(ptr);return rv}function requireRegisteredType(rawType,humanName){var impl=registeredTypes[rawType];if(undefined===impl){throwBindingError(humanName+\" has unknown type \"+getTypeName(rawType))}return impl}function unregisterInheritedInstance(class_,ptr){ptr=getBasestPointer(class_,ptr);if(registeredInstances.hasOwnProperty(ptr)){delete registeredInstances[ptr]}else{throwBindingError(\"Tried to unregister unregistered instance: \"+ptr)}}function detachFinalizer(handle){}var finalizationGroup=false;function runDestructor($$){if($$.smartPtr){$$.smartPtrType.rawDestructor($$.smartPtr)}else{$$.ptrType.registeredClass.rawDestructor($$.ptr)}}function releaseClassHandle($$){$$.count.value-=1;var toDelete=0===$$.count.value;if(toDelete){runDestructor($$)}}function attachFinalizer(handle){if(\"undefined\"===typeof FinalizationGroup){attachFinalizer=function(handle){return handle};return handle}finalizationGroup=new FinalizationGroup(function(iter){for(var result=iter.next();!result.done;result=iter.next()){var $$=result.value;if(!$$.ptr){console.warn(\"object already deleted: \"+$$.ptr)}else{releaseClassHandle($$)}}});attachFinalizer=function(handle){finalizationGroup.register(handle,handle.$$,handle.$$);return handle};detachFinalizer=function(handle){finalizationGroup.unregister(handle.$$)};return attachFinalizer(handle)}function __embind_create_inheriting_constructor(constructorName,wrapperType,properties){constructorName=readLatin1String(constructorName);wrapperType=requireRegisteredType(wrapperType,\"wrapper\");properties=requireHandle(properties);var arraySlice=[].slice;var registeredClass=wrapperType.registeredClass;var wrapperPrototype=registeredClass.instancePrototype;var baseClass=registeredClass.baseClass;var baseClassPrototype=baseClass.instancePrototype;var baseConstructor=registeredClass.baseClass.constructor;var ctor=createNamedFunction(constructorName,function(){registeredClass.baseClass.pureVirtualFunctions.forEach(function(name){if(this[name]===baseClassPrototype[name]){throw new PureVirtualError(\"Pure virtual function \"+name+\" must be implemented in JavaScript\")}}.bind(this));Object.defineProperty(this,\"__parent\",{value:wrapperPrototype});this[\"__construct\"].apply(this,arraySlice.call(arguments))});wrapperPrototype[\"__construct\"]=function __construct(){if(this===wrapperPrototype){throwBindingError(\"Pass correct 'this' to __construct\")}var inner=baseConstructor[\"implement\"].apply(undefined,[this].concat(arraySlice.call(arguments)));detachFinalizer(inner);var $$=inner.$$;inner[\"notifyOnDestruction\"]();$$.preservePointerOnDelete=true;Object.defineProperties(this,{$$:{value:$$}});attachFinalizer(this);registerInheritedInstance(registeredClass,$$.ptr,this)};wrapperPrototype[\"__destruct\"]=function __destruct(){if(this===wrapperPrototype){throwBindingError(\"Pass correct 'this' to __destruct\")}detachFinalizer(this);unregisterInheritedInstance(registeredClass,this.$$.ptr)};ctor.prototype=Object.create(wrapperPrototype);for(var p in properties){ctor.prototype[p]=properties[p]}return __emval_register(ctor)}var structRegistrations={};function runDestructors(destructors){while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr)}}function simpleReadValueFromPointer(pointer){return this[\"fromWireType\"](HEAPU32[pointer>>2])}var awaitingDependencies={};var typeDependencies={};var InternalError=undefined;function throwInternalError(message){throw new InternalError(message)}function whenDependentTypesAreResolved(myTypes,dependentTypes,getTypeConverters){myTypes.forEach(function(type){typeDependencies[type]=dependentTypes});function onComplete(typeConverters){var myTypeConverters=getTypeConverters(typeConverters);if(myTypeConverters.length!==myTypes.length){throwInternalError(\"Mismatched type converter count\")}for(var i=0;i<myTypes.length;++i){registerType(myTypes[i],myTypeConverters[i])}}var typeConverters=new Array(dependentTypes.length);var unregisteredTypes=[];var registered=0;dependentTypes.forEach(function(dt,i){if(registeredTypes.hasOwnProperty(dt)){typeConverters[i]=registeredTypes[dt]}else{unregisteredTypes.push(dt);if(!awaitingDependencies.hasOwnProperty(dt)){awaitingDependencies[dt]=[]}awaitingDependencies[dt].push(function(){typeConverters[i]=registeredTypes[dt];++registered;if(registered===unregisteredTypes.length){onComplete(typeConverters)}})}});if(0===unregisteredTypes.length){onComplete(typeConverters)}}function __embind_finalize_value_object(structType){var reg=structRegistrations[structType];delete structRegistrations[structType];var rawConstructor=reg.rawConstructor;var rawDestructor=reg.rawDestructor;var fieldRecords=reg.fields;var fieldTypes=fieldRecords.map(function(field){return field.getterReturnType}).concat(fieldRecords.map(function(field){return field.setterArgumentType}));whenDependentTypesAreResolved([structType],fieldTypes,function(fieldTypes){var fields={};fieldRecords.forEach(function(field,i){var fieldName=field.fieldName;var getterReturnType=fieldTypes[i];var getter=field.getter;var getterContext=field.getterContext;var setterArgumentType=fieldTypes[i+fieldRecords.length];var setter=field.setter;var setterContext=field.setterContext;fields[fieldName]={read:function(ptr){return getterReturnType[\"fromWireType\"](getter(getterContext,ptr))},write:function(ptr,o){var destructors=[];setter(setterContext,ptr,setterArgumentType[\"toWireType\"](destructors,o));runDestructors(destructors)}}});return[{name:reg.name,\"fromWireType\":function(ptr){var rv={};for(var i in fields){rv[i]=fields[i].read(ptr)}rawDestructor(ptr);return rv},\"toWireType\":function(destructors,o){for(var fieldName in fields){if(!(fieldName in o)){throw new TypeError('Missing field:  \"'+fieldName+'\"')}}var ptr=rawConstructor();for(fieldName in fields){fields[fieldName].write(ptr,o[fieldName])}if(destructors!==null){destructors.push(rawDestructor,ptr)}return ptr},\"argPackAdvance\":8,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction:rawDestructor}]})}function __embind_register_bigint(primitiveType,name,size,minRange,maxRange){}function getShiftFromSize(size){switch(size){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(\"Unknown type size: \"+size)}}function registerType(rawType,registeredInstance,options){options=options||{};if(!(\"argPackAdvance\"in registeredInstance)){throw new TypeError(\"registerType registeredInstance requires argPackAdvance\")}var name=registeredInstance.name;if(!rawType){throwBindingError('type \"'+name+'\" must have a positive integer typeid pointer')}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError(\"Cannot register type '\"+name+\"' twice\")}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(function(cb){cb()})}}function __embind_register_bool(rawType,name,size,trueValue,falseValue){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":function(wt){return!!wt},\"toWireType\":function(destructors,o){return o?trueValue:falseValue},\"argPackAdvance\":8,\"readValueFromPointer\":function(pointer){var heap;if(size===1){heap=HEAP8}else if(size===2){heap=HEAP16}else if(size===4){heap=HEAP32}else{throw new TypeError(\"Unknown boolean type size: \"+name)}return this[\"fromWireType\"](heap[pointer>>shift])},destructorFunction:null})}function ClassHandle_isAliasOf(other){if(!(this instanceof ClassHandle)){return false}if(!(other instanceof ClassHandle)){return false}var leftClass=this.$$.ptrType.registeredClass;var left=this.$$.ptr;var rightClass=other.$$.ptrType.registeredClass;var right=other.$$.ptr;while(leftClass.baseClass){left=leftClass.upcast(left);leftClass=leftClass.baseClass}while(rightClass.baseClass){right=rightClass.upcast(right);rightClass=rightClass.baseClass}return leftClass===rightClass&&left===right}function shallowCopyInternalPointer(o){return{count:o.count,deleteScheduled:o.deleteScheduled,preservePointerOnDelete:o.preservePointerOnDelete,ptr:o.ptr,ptrType:o.ptrType,smartPtr:o.smartPtr,smartPtrType:o.smartPtrType}}function throwInstanceAlreadyDeleted(obj){function getInstanceTypeName(handle){return handle.$$.ptrType.registeredClass.name}throwBindingError(getInstanceTypeName(obj)+\" instance already deleted\")}function ClassHandle_clone(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.preservePointerOnDelete){this.$$.count.value+=1;return this}else{var clone=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));clone.$$.count.value+=1;clone.$$.deleteScheduled=false;return clone}}function ClassHandle_delete(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError(\"Object already scheduled for deletion\")}detachFinalizer(this);releaseClassHandle(this.$$);if(!this.$$.preservePointerOnDelete){this.$$.smartPtr=undefined;this.$$.ptr=undefined}}function ClassHandle_isDeleted(){return!this.$$.ptr}function ClassHandle_deleteLater(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError(\"Object already scheduled for deletion\")}deletionQueue.push(this);if(deletionQueue.length===1&&delayFunction){delayFunction(flushPendingDeletes)}this.$$.deleteScheduled=true;return this}function init_ClassHandle(){ClassHandle.prototype[\"isAliasOf\"]=ClassHandle_isAliasOf;ClassHandle.prototype[\"clone\"]=ClassHandle_clone;ClassHandle.prototype[\"delete\"]=ClassHandle_delete;ClassHandle.prototype[\"isDeleted\"]=ClassHandle_isDeleted;ClassHandle.prototype[\"deleteLater\"]=ClassHandle_deleteLater}function ClassHandle(){}var registeredPointers={};function ensureOverloadTable(proto,methodName,humanName){if(undefined===proto[methodName].overloadTable){var prevFunc=proto[methodName];proto[methodName]=function(){if(!proto[methodName].overloadTable.hasOwnProperty(arguments.length)){throwBindingError(\"Function '\"+humanName+\"' called with an invalid number of arguments (\"+arguments.length+\") - expects one of (\"+proto[methodName].overloadTable+\")!\")}return proto[methodName].overloadTable[arguments.length].apply(this,arguments)};proto[methodName].overloadTable=[];proto[methodName].overloadTable[prevFunc.argCount]=prevFunc}}function exposePublicSymbol(name,value,numArguments){if(Module.hasOwnProperty(name)){if(undefined===numArguments||undefined!==Module[name].overloadTable&&undefined!==Module[name].overloadTable[numArguments]){throwBindingError(\"Cannot register public name '\"+name+\"' twice\")}ensureOverloadTable(Module,name,name);if(Module.hasOwnProperty(numArguments)){throwBindingError(\"Cannot register multiple overloads of a function with the same number of arguments (\"+numArguments+\")!\")}Module[name].overloadTable[numArguments]=value}else{Module[name]=value;if(undefined!==numArguments){Module[name].numArguments=numArguments}}}function RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast){this.name=name;this.constructor=constructor;this.instancePrototype=instancePrototype;this.rawDestructor=rawDestructor;this.baseClass=baseClass;this.getActualType=getActualType;this.upcast=upcast;this.downcast=downcast;this.pureVirtualFunctions=[]}function upcastPointer(ptr,ptrClass,desiredClass){while(ptrClass!==desiredClass){if(!ptrClass.upcast){throwBindingError(\"Expected null or instance of \"+desiredClass.name+\", got an instance of \"+ptrClass.name)}ptr=ptrClass.upcast(ptr);ptrClass=ptrClass.baseClass}return ptr}function constNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError(\"null is not a valid \"+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass \"'+_embind_repr(handle)+'\" as a '+this.name)}if(!handle.$$.ptr){throwBindingError(\"Cannot pass deleted object as a pointer of type \"+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function genericPointerToWireType(destructors,handle){var ptr;if(handle===null){if(this.isReference){throwBindingError(\"null is not a valid \"+this.name)}if(this.isSmartPointer){ptr=this.rawConstructor();if(destructors!==null){destructors.push(this.rawDestructor,ptr)}return ptr}else{return 0}}if(!handle.$$){throwBindingError('Cannot pass \"'+_embind_repr(handle)+'\" as a '+this.name)}if(!handle.$$.ptr){throwBindingError(\"Cannot pass deleted object as a pointer of type \"+this.name)}if(!this.isConst&&handle.$$.ptrType.isConst){throwBindingError(\"Cannot convert argument of type \"+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+\" to parameter type \"+this.name)}var handleClass=handle.$$.ptrType.registeredClass;ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);if(this.isSmartPointer){if(undefined===handle.$$.smartPtr){throwBindingError(\"Passing raw pointer to smart pointer is illegal\")}switch(this.sharingPolicy){case 0:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{throwBindingError(\"Cannot convert argument of type \"+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+\" to parameter type \"+this.name)}break;case 1:ptr=handle.$$.smartPtr;break;case 2:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{var clonedHandle=handle[\"clone\"]();ptr=this.rawShare(ptr,__emval_register(function(){clonedHandle[\"delete\"]()}));if(destructors!==null){destructors.push(this.rawDestructor,ptr)}}break;default:throwBindingError(\"Unsupporting sharing policy\")}}return ptr}function nonConstNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError(\"null is not a valid \"+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass \"'+_embind_repr(handle)+'\" as a '+this.name)}if(!handle.$$.ptr){throwBindingError(\"Cannot pass deleted object as a pointer of type \"+this.name)}if(handle.$$.ptrType.isConst){throwBindingError(\"Cannot convert argument of type \"+handle.$$.ptrType.name+\" to parameter type \"+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function RegisteredPointer_getPointee(ptr){if(this.rawGetPointee){ptr=this.rawGetPointee(ptr)}return ptr}function RegisteredPointer_destructor(ptr){if(this.rawDestructor){this.rawDestructor(ptr)}}function RegisteredPointer_deleteObject(handle){if(handle!==null){handle[\"delete\"]()}}function downcastPointer(ptr,ptrClass,desiredClass){if(ptrClass===desiredClass){return ptr}if(undefined===desiredClass.baseClass){return null}var rv=downcastPointer(ptr,ptrClass,desiredClass.baseClass);if(rv===null){return null}return desiredClass.downcast(rv)}function getInheritedInstance(class_,ptr){ptr=getBasestPointer(class_,ptr);return registeredInstances[ptr]}function makeClassHandle(prototype,record){if(!record.ptrType||!record.ptr){throwInternalError(\"makeClassHandle requires ptr and ptrType\")}var hasSmartPtrType=!!record.smartPtrType;var hasSmartPtr=!!record.smartPtr;if(hasSmartPtrType!==hasSmartPtr){throwInternalError(\"Both smartPtrType and smartPtr must be specified\")}record.count={value:1};return attachFinalizer(Object.create(prototype,{$$:{value:record}}))}function RegisteredPointer_fromWireType(ptr){var rawPointer=this.getPointee(ptr);if(!rawPointer){this.destructor(ptr);return null}var registeredInstance=getInheritedInstance(this.registeredClass,rawPointer);if(undefined!==registeredInstance){if(0===registeredInstance.$$.count.value){registeredInstance.$$.ptr=rawPointer;registeredInstance.$$.smartPtr=ptr;return registeredInstance[\"clone\"]()}else{var rv=registeredInstance[\"clone\"]();this.destructor(ptr);return rv}}function makeDefaultHandle(){if(this.isSmartPointer){return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rawPointer,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:ptr})}}var actualType=this.registeredClass.getActualType(rawPointer);var registeredPointerRecord=registeredPointers[actualType];if(!registeredPointerRecord){return makeDefaultHandle.call(this)}var toType;if(this.isConst){toType=registeredPointerRecord.constPointerType}else{toType=registeredPointerRecord.pointerType}var dp=downcastPointer(rawPointer,this.registeredClass,toType.registeredClass);if(dp===null){return makeDefaultHandle.call(this)}if(this.isSmartPointer){return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp})}}function init_RegisteredPointer(){RegisteredPointer.prototype.getPointee=RegisteredPointer_getPointee;RegisteredPointer.prototype.destructor=RegisteredPointer_destructor;RegisteredPointer.prototype[\"argPackAdvance\"]=8;RegisteredPointer.prototype[\"readValueFromPointer\"]=simpleReadValueFromPointer;RegisteredPointer.prototype[\"deleteObject\"]=RegisteredPointer_deleteObject;RegisteredPointer.prototype[\"fromWireType\"]=RegisteredPointer_fromWireType}function RegisteredPointer(name,registeredClass,isReference,isConst,isSmartPointer,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor){this.name=name;this.registeredClass=registeredClass;this.isReference=isReference;this.isConst=isConst;this.isSmartPointer=isSmartPointer;this.pointeeType=pointeeType;this.sharingPolicy=sharingPolicy;this.rawGetPointee=rawGetPointee;this.rawConstructor=rawConstructor;this.rawShare=rawShare;this.rawDestructor=rawDestructor;if(!isSmartPointer&&registeredClass.baseClass===undefined){if(isConst){this[\"toWireType\"]=constNoSmartPtrRawPointerToWireType;this.destructorFunction=null}else{this[\"toWireType\"]=nonConstNoSmartPtrRawPointerToWireType;this.destructorFunction=null}}else{this[\"toWireType\"]=genericPointerToWireType}}function replacePublicSymbol(name,value,numArguments){if(!Module.hasOwnProperty(name)){throwInternalError(\"Replacing nonexistant public symbol\")}if(undefined!==Module[name].overloadTable&&undefined!==numArguments){Module[name].overloadTable[numArguments]=value}else{Module[name]=value;Module[name].argCount=numArguments}}function dynCallLegacy(sig,ptr,args){assert(\"dynCall_\"+sig in Module,\"bad function pointer type - no table for sig '\"+sig+\"'\");if(args&&args.length){assert(args.length===sig.substring(1).replace(/j/g,\"--\").length)}else{assert(sig.length==1)}var f=Module[\"dynCall_\"+sig];return args&&args.length?f.apply(null,[ptr].concat(args)):f.call(null,ptr)}function dynCall(sig,ptr,args){if(sig.includes(\"j\")){return dynCallLegacy(sig,ptr,args)}assert(wasmTable.get(ptr),\"missing table entry in dynCall: \"+ptr);return wasmTable.get(ptr).apply(null,args)}function getDynCaller(sig,ptr){assert(sig.includes(\"j\"),\"getDynCaller should only be called with i64 sigs\");var argCache=[];return function(){argCache.length=arguments.length;for(var i=0;i<arguments.length;i++){argCache[i]=arguments[i]}return dynCall(sig,ptr,argCache)}}function embind__requireFunction(signature,rawFunction){signature=readLatin1String(signature);function makeDynCaller(){if(signature.includes(\"j\")){return getDynCaller(signature,rawFunction)}return wasmTable.get(rawFunction)}var fp=makeDynCaller();if(typeof fp!==\"function\"){throwBindingError(\"unknown function pointer with signature \"+signature+\": \"+rawFunction)}return fp}var UnboundTypeError=undefined;function throwUnboundTypeError(message,types){var unboundTypes=[];var seen={};function visit(type){if(seen[type]){return}if(registeredTypes[type]){return}if(typeDependencies[type]){typeDependencies[type].forEach(visit);return}unboundTypes.push(type);seen[type]=true}types.forEach(visit);throw new UnboundTypeError(message+\": \"+unboundTypes.map(getTypeName).join([\", \"]))}function __embind_register_class(rawType,rawPointerType,rawConstPointerType,baseClassRawType,getActualTypeSignature,getActualType,upcastSignature,upcast,downcastSignature,downcast,name,destructorSignature,rawDestructor){name=readLatin1String(name);getActualType=embind__requireFunction(getActualTypeSignature,getActualType);if(upcast){upcast=embind__requireFunction(upcastSignature,upcast)}if(downcast){downcast=embind__requireFunction(downcastSignature,downcast)}rawDestructor=embind__requireFunction(destructorSignature,rawDestructor);var legalFunctionName=makeLegalFunctionName(name);exposePublicSymbol(legalFunctionName,function(){throwUnboundTypeError(\"Cannot construct \"+name+\" due to unbound types\",[baseClassRawType])});whenDependentTypesAreResolved([rawType,rawPointerType,rawConstPointerType],baseClassRawType?[baseClassRawType]:[],function(base){base=base[0];var baseClass;var basePrototype;if(baseClassRawType){baseClass=base.registeredClass;basePrototype=baseClass.instancePrototype}else{basePrototype=ClassHandle.prototype}var constructor=createNamedFunction(legalFunctionName,function(){if(Object.getPrototypeOf(this)!==instancePrototype){throw new BindingError(\"Use 'new' to construct \"+name)}if(undefined===registeredClass.constructor_body){throw new BindingError(name+\" has no accessible constructor\")}var body=registeredClass.constructor_body[arguments.length];if(undefined===body){throw new BindingError(\"Tried to invoke ctor of \"+name+\" with invalid number of parameters (\"+arguments.length+\") - expected (\"+Object.keys(registeredClass.constructor_body).toString()+\") parameters instead!\")}return body.apply(this,arguments)});var instancePrototype=Object.create(basePrototype,{constructor:{value:constructor}});constructor.prototype=instancePrototype;var registeredClass=new RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast);var referenceConverter=new RegisteredPointer(name,registeredClass,true,false,false);var pointerConverter=new RegisteredPointer(name+\"*\",registeredClass,false,false,false);var constPointerConverter=new RegisteredPointer(name+\" const*\",registeredClass,false,true,false);registeredPointers[rawType]={pointerType:pointerConverter,constPointerType:constPointerConverter};replacePublicSymbol(legalFunctionName,constructor);return[referenceConverter,pointerConverter,constPointerConverter]})}function new_(constructor,argumentList){if(!(constructor instanceof Function)){throw new TypeError(\"new_ called with constructor type \"+typeof constructor+\" which is not a function\")}var dummy=createNamedFunction(constructor.name||\"unknownFunctionName\",function(){});dummy.prototype=constructor.prototype;var obj=new dummy;var r=constructor.apply(obj,argumentList);return r instanceof Object?r:obj}function craftInvokerFunction(humanName,argTypes,classType,cppInvokerFunc,cppTargetFunc){var argCount=argTypes.length;if(argCount<2){throwBindingError(\"argTypes array size mismatch! Must at least get return value and 'this' types!\")}var isClassMethodFunc=argTypes[1]!==null&&classType!==null;var needsDestructorStack=false;for(var i=1;i<argTypes.length;++i){if(argTypes[i]!==null&&argTypes[i].destructorFunction===undefined){needsDestructorStack=true;break}}var returns=argTypes[0].name!==\"void\";var argsList=\"\";var argsListWired=\"\";for(var i=0;i<argCount-2;++i){argsList+=(i!==0?\", \":\"\")+\"arg\"+i;argsListWired+=(i!==0?\", \":\"\")+\"arg\"+i+\"Wired\"}var invokerFnBody=\"return function \"+makeLegalFunctionName(humanName)+\"(\"+argsList+\") {\\n\"+\"if (arguments.length !== \"+(argCount-2)+\") {\\n\"+\"throwBindingError('function \"+humanName+\" called with ' + arguments.length + ' arguments, expected \"+(argCount-2)+\" args!');\\n\"+\"}\\n\";if(needsDestructorStack){invokerFnBody+=\"var destructors = [];\\n\"}var dtorStack=needsDestructorStack?\"destructors\":\"null\";var args1=[\"throwBindingError\",\"invoker\",\"fn\",\"runDestructors\",\"retType\",\"classParam\"];var args2=[throwBindingError,cppInvokerFunc,cppTargetFunc,runDestructors,argTypes[0],argTypes[1]];if(isClassMethodFunc){invokerFnBody+=\"var thisWired = classParam.toWireType(\"+dtorStack+\", this);\\n\"}for(var i=0;i<argCount-2;++i){invokerFnBody+=\"var arg\"+i+\"Wired = argType\"+i+\".toWireType(\"+dtorStack+\", arg\"+i+\"); // \"+argTypes[i+2].name+\"\\n\";args1.push(\"argType\"+i);args2.push(argTypes[i+2])}if(isClassMethodFunc){argsListWired=\"thisWired\"+(argsListWired.length>0?\", \":\"\")+argsListWired}invokerFnBody+=(returns?\"var rv = \":\"\")+\"invoker(fn\"+(argsListWired.length>0?\", \":\"\")+argsListWired+\");\\n\";if(needsDestructorStack){invokerFnBody+=\"runDestructors(destructors);\\n\"}else{for(var i=isClassMethodFunc?1:2;i<argTypes.length;++i){var paramName=i===1?\"thisWired\":\"arg\"+(i-2)+\"Wired\";if(argTypes[i].destructorFunction!==null){invokerFnBody+=paramName+\"_dtor(\"+paramName+\"); // \"+argTypes[i].name+\"\\n\";args1.push(paramName+\"_dtor\");args2.push(argTypes[i].destructorFunction)}}}if(returns){invokerFnBody+=\"var ret = retType.fromWireType(rv);\\n\"+\"return ret;\\n\"}else{}invokerFnBody+=\"}\\n\";args1.push(invokerFnBody);var invokerFunction=new_(Function,args1).apply(null,args2);return invokerFunction}function heap32VectorToArray(count,firstElement){var array=[];for(var i=0;i<count;i++){array.push(HEAP32[(firstElement>>2)+i])}return array}function __embind_register_class_class_function(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,fn){var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=classType.name+\".\"+methodName;function unboundTypesHandler(){throwUnboundTypeError(\"Cannot call \"+humanName+\" due to unbound types\",rawArgTypes)}if(methodName.startsWith(\"@@\")){methodName=Symbol[methodName.substring(2)]}var proto=classType.registeredClass.constructor;if(undefined===proto[methodName]){unboundTypesHandler.argCount=argCount-1;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-1]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var invokerArgsArray=[argTypes[0],null].concat(argTypes.slice(1));var func=craftInvokerFunction(humanName,invokerArgsArray,null,rawInvoker,fn);if(undefined===proto[methodName].overloadTable){func.argCount=argCount-1;proto[methodName]=func}else{proto[methodName].overloadTable[argCount-1]=func}return[]});return[]})}function __embind_register_class_constructor(rawClassType,argCount,rawArgTypesAddr,invokerSignature,invoker,rawConstructor){assert(argCount>0);var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);invoker=embind__requireFunction(invokerSignature,invoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=\"constructor \"+classType.name;if(undefined===classType.registeredClass.constructor_body){classType.registeredClass.constructor_body=[]}if(undefined!==classType.registeredClass.constructor_body[argCount-1]){throw new BindingError(\"Cannot register multiple constructors with identical number of parameters (\"+(argCount-1)+\") for class '\"+classType.name+\"'! Overload resolution is currently only performed using the parameter count, not actual type info!\")}classType.registeredClass.constructor_body[argCount-1]=function unboundTypeHandler(){throwUnboundTypeError(\"Cannot construct \"+classType.name+\" due to unbound types\",rawArgTypes)};whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){argTypes.splice(1,0,null);classType.registeredClass.constructor_body[argCount-1]=craftInvokerFunction(humanName,argTypes,null,invoker,rawConstructor);return[]});return[]})}function __embind_register_class_function(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,context,isPureVirtual){var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=classType.name+\".\"+methodName;if(methodName.startsWith(\"@@\")){methodName=Symbol[methodName.substring(2)]}if(isPureVirtual){classType.registeredClass.pureVirtualFunctions.push(methodName)}function unboundTypesHandler(){throwUnboundTypeError(\"Cannot call \"+humanName+\" due to unbound types\",rawArgTypes)}var proto=classType.registeredClass.instancePrototype;var method=proto[methodName];if(undefined===method||undefined===method.overloadTable&&method.className!==classType.name&&method.argCount===argCount-2){unboundTypesHandler.argCount=argCount-2;unboundTypesHandler.className=classType.name;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-2]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var memberFunction=craftInvokerFunction(humanName,argTypes,classType,rawInvoker,context);if(undefined===proto[methodName].overloadTable){memberFunction.argCount=argCount-2;proto[methodName]=memberFunction}else{proto[methodName].overloadTable[argCount-2]=memberFunction}return[]});return[]})}function validateThis(this_,classType,humanName){if(!(this_ instanceof Object)){throwBindingError(humanName+' with invalid \"this\": '+this_)}if(!(this_ instanceof classType.registeredClass.constructor)){throwBindingError(humanName+' incompatible with \"this\" of type '+this_.constructor.name)}if(!this_.$$.ptr){throwBindingError(\"cannot call emscripten binding method \"+humanName+\" on deleted object\")}return upcastPointer(this_.$$.ptr,this_.$$.ptrType.registeredClass,classType.registeredClass)}function __embind_register_class_property(classType,fieldName,getterReturnType,getterSignature,getter,getterContext,setterArgumentType,setterSignature,setter,setterContext){fieldName=readLatin1String(fieldName);getter=embind__requireFunction(getterSignature,getter);whenDependentTypesAreResolved([],[classType],function(classType){classType=classType[0];var humanName=classType.name+\".\"+fieldName;var desc={get:function(){throwUnboundTypeError(\"Cannot access \"+humanName+\" due to unbound types\",[getterReturnType,setterArgumentType])},enumerable:true,configurable:true};if(setter){desc.set=function(){throwUnboundTypeError(\"Cannot access \"+humanName+\" due to unbound types\",[getterReturnType,setterArgumentType])}}else{desc.set=function(v){throwBindingError(humanName+\" is a read-only property\")}}Object.defineProperty(classType.registeredClass.instancePrototype,fieldName,desc);whenDependentTypesAreResolved([],setter?[getterReturnType,setterArgumentType]:[getterReturnType],function(types){var getterReturnType=types[0];var desc={get:function(){var ptr=validateThis(this,classType,humanName+\" getter\");return getterReturnType[\"fromWireType\"](getter(getterContext,ptr))},enumerable:true};if(setter){setter=embind__requireFunction(setterSignature,setter);var setterArgumentType=types[1];desc.set=function(v){var ptr=validateThis(this,classType,humanName+\" setter\");var destructors=[];setter(setterContext,ptr,setterArgumentType[\"toWireType\"](destructors,v));runDestructors(destructors)}}Object.defineProperty(classType.registeredClass.instancePrototype,fieldName,desc);return[]});return[]})}function __emval_decref(handle){if(handle>4&&0===--emval_handle_array[handle].refcount){emval_handle_array[handle]=undefined;emval_free_list.push(handle)}}function __embind_register_emval(rawType,name){name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":function(handle){var rv=emval_handle_array[handle].value;__emval_decref(handle);return rv},\"toWireType\":function(destructors,value){return __emval_register(value)},\"argPackAdvance\":8,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction:null})}function _embind_repr(v){if(v===null){return\"null\"}var t=typeof v;if(t===\"object\"||t===\"array\"||t===\"function\"){return v.toString()}else{return\"\"+v}}function floatReadValueFromPointer(name,shift){switch(shift){case 2:return function(pointer){return this[\"fromWireType\"](HEAPF32[pointer>>2])};case 3:return function(pointer){return this[\"fromWireType\"](HEAPF64[pointer>>3])};default:throw new TypeError(\"Unknown float type: \"+name)}}function __embind_register_float(rawType,name,size){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":function(value){return value},\"toWireType\":function(destructors,value){if(typeof value!==\"number\"&&typeof value!==\"boolean\"){throw new TypeError('Cannot convert \"'+_embind_repr(value)+'\" to '+this.name)}return value},\"argPackAdvance\":8,\"readValueFromPointer\":floatReadValueFromPointer(name,shift),destructorFunction:null})}function __embind_register_function(name,argCount,rawArgTypesAddr,signature,rawInvoker,fn){var argTypes=heap32VectorToArray(argCount,rawArgTypesAddr);name=readLatin1String(name);rawInvoker=embind__requireFunction(signature,rawInvoker);exposePublicSymbol(name,function(){throwUnboundTypeError(\"Cannot call \"+name+\" due to unbound types\",argTypes)},argCount-1);whenDependentTypesAreResolved([],argTypes,function(argTypes){var invokerArgsArray=[argTypes[0],null].concat(argTypes.slice(1));replacePublicSymbol(name,craftInvokerFunction(name,invokerArgsArray,null,rawInvoker,fn),argCount-1);return[]})}function integerReadValueFromPointer(name,shift,signed){switch(shift){case 0:return signed?function readS8FromPointer(pointer){return HEAP8[pointer]}:function readU8FromPointer(pointer){return HEAPU8[pointer]};case 1:return signed?function readS16FromPointer(pointer){return HEAP16[pointer>>1]}:function readU16FromPointer(pointer){return HEAPU16[pointer>>1]};case 2:return signed?function readS32FromPointer(pointer){return HEAP32[pointer>>2]}:function readU32FromPointer(pointer){return HEAPU32[pointer>>2]};default:throw new TypeError(\"Unknown integer type: \"+name)}}function __embind_register_integer(primitiveType,name,size,minRange,maxRange){name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var shift=getShiftFromSize(size);var fromWireType=function(value){return value};if(minRange===0){var bitshift=32-8*size;fromWireType=function(value){return value<<bitshift>>>bitshift}}var isUnsignedType=name.includes(\"unsigned\");registerType(primitiveType,{name:name,\"fromWireType\":fromWireType,\"toWireType\":function(destructors,value){if(typeof value!==\"number\"&&typeof value!==\"boolean\"){throw new TypeError('Cannot convert \"'+_embind_repr(value)+'\" to '+this.name)}if(value<minRange||value>maxRange){throw new TypeError('Passing a number \"'+_embind_repr(value)+'\" from JS side to C/C++ side to an argument of type \"'+name+'\", which is outside the valid range ['+minRange+\", \"+maxRange+\"]!\")}return isUnsignedType?value>>>0:value|0},\"argPackAdvance\":8,\"readValueFromPointer\":integerReadValueFromPointer(name,shift,minRange!==0),destructorFunction:null})}function __embind_register_memory_view(rawType,dataTypeIndex,name){var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){handle=handle>>2;var heap=HEAPU32;var size=heap[handle];var data=heap[handle+1];return new TA(buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":decodeMemoryView,\"argPackAdvance\":8,\"readValueFromPointer\":decodeMemoryView},{ignoreDuplicateRegistrations:true})}function __embind_register_std_string(rawType,name){name=readLatin1String(name);var stdStringIsUTF8=name===\"std::string\";registerType(rawType,{name:name,\"fromWireType\":function(value){var length=HEAPU32[value>>2];var str;if(stdStringIsUTF8){var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i<length;++i){a[i]=String.fromCharCode(HEAPU8[value+4+i])}str=a.join(\"\")}_free(value);return str},\"toWireType\":function(destructors,value){if(value instanceof ArrayBuffer){value=new Uint8Array(value)}var getLength;var valueIsOfTypeString=typeof value===\"string\";if(!(valueIsOfTypeString||value instanceof Uint8Array||value instanceof Uint8ClampedArray||value instanceof Int8Array)){throwBindingError(\"Cannot pass non-string to std::string\")}if(stdStringIsUTF8&&valueIsOfTypeString){getLength=function(){return lengthBytesUTF8(value)}}else{getLength=function(){return value.length}}var length=getLength();var ptr=_malloc(4+length+1);HEAPU32[ptr>>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr+4,length+1)}else{if(valueIsOfTypeString){for(var i=0;i<length;++i){var charCode=value.charCodeAt(i);if(charCode>255){_free(ptr);throwBindingError(\"String has UTF-16 code units that do not fit in 8 bits\")}HEAPU8[ptr+4+i]=charCode}}else{for(var i=0;i<length;++i){HEAPU8[ptr+4+i]=value[i]}}}if(destructors!==null){destructors.push(_free,ptr)}return ptr},\"argPackAdvance\":8,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction:function(ptr){_free(ptr)}})}function __embind_register_std_wstring(rawType,charSize,name){name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=function(){return HEAPU16};shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=function(){return HEAPU32};shift=2}registerType(rawType,{name:name,\"fromWireType\":function(value){var length=HEAPU32[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},\"toWireType\":function(destructors,value){if(!(typeof value===\"string\")){throwBindingError(\"Cannot pass non-string to C++ string type \"+name)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},\"argPackAdvance\":8,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction:function(ptr){_free(ptr)}})}function __embind_register_value_object(rawType,name,constructorSignature,rawConstructor,destructorSignature,rawDestructor){structRegistrations[rawType]={name:readLatin1String(name),rawConstructor:embind__requireFunction(constructorSignature,rawConstructor),rawDestructor:embind__requireFunction(destructorSignature,rawDestructor),fields:[]}}function __embind_register_value_object_field(structType,fieldName,getterReturnType,getterSignature,getter,getterContext,setterArgumentType,setterSignature,setter,setterContext){structRegistrations[structType].fields.push({fieldName:readLatin1String(fieldName),getterReturnType:getterReturnType,getter:embind__requireFunction(getterSignature,getter),getterContext:getterContext,setterArgumentType:setterArgumentType,setter:embind__requireFunction(setterSignature,setter),setterContext:setterContext})}function __embind_register_void(rawType,name){name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,\"argPackAdvance\":0,\"fromWireType\":function(){return undefined},\"toWireType\":function(destructors,o){return undefined}})}var emval_symbols={};function getStringOrSymbol(address){var symbol=emval_symbols[address];if(symbol===undefined){return readLatin1String(address)}else{return symbol}}var emval_methodCallers=[];function __emval_call_void_method(caller,handle,methodName,args){caller=emval_methodCallers[caller];handle=requireHandle(handle);methodName=getStringOrSymbol(methodName);caller(handle,methodName,null,args)}function __emval_addMethodCaller(caller){var id=emval_methodCallers.length;emval_methodCallers.push(caller);return id}function __emval_lookupTypes(argCount,argTypes){var a=new Array(argCount);for(var i=0;i<argCount;++i){a[i]=requireRegisteredType(HEAP32[(argTypes>>2)+i],\"parameter \"+i)}return a}function __emval_get_method_caller(argCount,argTypes){var types=__emval_lookupTypes(argCount,argTypes);var retType=types[0];var signatureName=retType.name+\"_$\"+types.slice(1).map(function(t){return t.name}).join(\"_\")+\"$\";var params=[\"retType\"];var args=[retType];var argsList=\"\";for(var i=0;i<argCount-1;++i){argsList+=(i!==0?\", \":\"\")+\"arg\"+i;params.push(\"argType\"+i);args.push(types[1+i])}var functionName=makeLegalFunctionName(\"methodCaller_\"+signatureName);var functionBody=\"return function \"+functionName+\"(handle, name, destructors, args) {\\n\";var offset=0;for(var i=0;i<argCount-1;++i){functionBody+=\"    var arg\"+i+\" = argType\"+i+\".readValueFromPointer(args\"+(offset?\"+\"+offset:\"\")+\");\\n\";offset+=types[i+1][\"argPackAdvance\"]}functionBody+=\"    var rv = handle[name](\"+argsList+\");\\n\";for(var i=0;i<argCount-1;++i){if(types[i+1][\"deleteObject\"]){functionBody+=\"    argType\"+i+\".deleteObject(arg\"+i+\");\\n\"}}if(!retType.isVoid){functionBody+=\"    return retType.toWireType(destructors, rv);\\n\"}functionBody+=\"};\\n\";params.push(functionBody);var invokerFunction=new_(Function,params).apply(null,args);return __emval_addMethodCaller(invokerFunction)}function __emval_incref(handle){if(handle>4){emval_handle_array[handle].refcount+=1}}function __emval_take_value(type,argv){type=requireRegisteredType(type,\"_emval_take_value\");var v=type[\"readValueFromPointer\"](argv);return __emval_register(v)}function _abort(){abort()}var _emscripten_get_now_is_monotonic=true;function _clock_gettime(clk_id,tp){var now;if(clk_id===0){now=Date.now()}else if((clk_id===1||clk_id===4)&&_emscripten_get_now_is_monotonic){now=_emscripten_get_now()}else{setErrNo(28);return-1}HEAP32[tp>>2]=now/1e3|0;HEAP32[tp+4>>2]=now%1e3*1e3*1e3|0;return 0}function _dlopen(filename,flag){abort(\"To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking\")}function _dlsym(handle,symbol){abort(\"To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking\")}var readAsmConstArgsArray=[];function readAsmConstArgs(sigPtr,buf){assert(Array.isArray(readAsmConstArgsArray));assert(buf%16==0);readAsmConstArgsArray.length=0;var ch;buf>>=2;while(ch=HEAPU8[sigPtr++]){assert(ch===100||ch===102||ch===105);var double=ch<105;if(double&&buf&1)buf++;readAsmConstArgsArray.push(double?HEAPF64[buf++>>1]:HEAP32[buf]);++buf}return readAsmConstArgsArray}function _emscripten_asm_const_int(code,sigPtr,argbuf){var args=readAsmConstArgs(sigPtr,argbuf);if(!ASM_CONSTS.hasOwnProperty(code))abort(\"No EM_ASM constant found at address \"+code);return ASM_CONSTS[code].apply(null,args)}function _emscripten_get_heap_max(){return 2147483648}function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function _emscripten_pc_get_function(pc){abort(\"Cannot use emscripten_pc_get_function without -s USE_OFFSET_CONVERTER\")}function emscripten_realloc_buffer(size){try{wasmMemory.grow(size-buffer.byteLength+65535>>>16);updateGlobalBufferAndViews(wasmMemory.buffer);return 1}catch(e){err(\"emscripten_realloc_buffer: Attempted to grow heap from \"+buffer.byteLength+\" bytes to \"+size+\" bytes, but got error: \"+e)}}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;assert(requestedSize>oldSize);var maxHeapSize=2147483648;if(requestedSize>maxHeapSize){err(\"Cannot enlarge memory, asked to go up to \"+requestedSize+\" bytes, but the limit is \"+maxHeapSize+\" bytes!\");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,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}err(\"Failed to grow the heap from \"+oldSize+\" bytes to \"+newSize+\" bytes, not enough memory!\");return false}function _emscripten_generate_pc(frame){abort(\"Cannot use emscripten_generate_pc (needed by __builtin_return_address) without -s USE_OFFSET_CONVERTER\")}var UNWIND_CACHE={};function __emscripten_save_in_unwind_cache(callstack){callstack.forEach(function(frame){var pc=_emscripten_generate_pc(frame);if(pc){UNWIND_CACHE[pc]=frame}})}function _emscripten_stack_snapshot(){var callstack=(new Error).stack.split(\"\\n\");if(callstack[0]==\"Error\"){callstack.shift()}__emscripten_save_in_unwind_cache(callstack);UNWIND_CACHE.last_addr=_emscripten_generate_pc(callstack[2]);UNWIND_CACHE.last_stack=callstack;return UNWIND_CACHE.last_addr}function _emscripten_stack_unwind_buffer(addr,buffer,count){var stack;if(UNWIND_CACHE.last_addr==addr){stack=UNWIND_CACHE.last_stack}else{stack=(new Error).stack.split(\"\\n\");if(stack[0]==\"Error\"){stack.shift()}__emscripten_save_in_unwind_cache(stack)}var offset=2;while(stack[offset]&&_emscripten_generate_pc(stack[offset])!=addr){++offset}for(var i=0;i<count&&stack[i+offset];++i){HEAP32[buffer+i*4>>2]=_emscripten_generate_pc(stack[i+offset])}return i}function _emscripten_thread_sleep(msecs){var start=_emscripten_get_now();while(_emscripten_get_now()-start<msecs){}}function __webgl_enable_ANGLE_instanced_arrays(ctx){var ext=ctx.getExtension(\"ANGLE_instanced_arrays\");if(ext){ctx[\"vertexAttribDivisor\"]=function(index,divisor){ext[\"vertexAttribDivisorANGLE\"](index,divisor)};ctx[\"drawArraysInstanced\"]=function(mode,first,count,primcount){ext[\"drawArraysInstancedANGLE\"](mode,first,count,primcount)};ctx[\"drawElementsInstanced\"]=function(mode,count,type,indices,primcount){ext[\"drawElementsInstancedANGLE\"](mode,count,type,indices,primcount)};return 1}}function __webgl_enable_OES_vertex_array_object(ctx){var ext=ctx.getExtension(\"OES_vertex_array_object\");if(ext){ctx[\"createVertexArray\"]=function(){return ext[\"createVertexArrayOES\"]()};ctx[\"deleteVertexArray\"]=function(vao){ext[\"deleteVertexArrayOES\"](vao)};ctx[\"bindVertexArray\"]=function(vao){ext[\"bindVertexArrayOES\"](vao)};ctx[\"isVertexArray\"]=function(vao){return ext[\"isVertexArrayOES\"](vao)};return 1}}function __webgl_enable_WEBGL_draw_buffers(ctx){var ext=ctx.getExtension(\"WEBGL_draw_buffers\");if(ext){ctx[\"drawBuffers\"]=function(n,bufs){ext[\"drawBuffersWEBGL\"](n,bufs)};return 1}}function __webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(ctx){return!!(ctx.dibvbi=ctx.getExtension(\"WEBGL_draw_instanced_base_vertex_base_instance\"))}function __webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(ctx){return!!(ctx.mdibvbi=ctx.getExtension(\"WEBGL_multi_draw_instanced_base_vertex_base_instance\"))}function __webgl_enable_WEBGL_multi_draw(ctx){return!!(ctx.multiDrawWebgl=ctx.getExtension(\"WEBGL_multi_draw\"))}var GL={counter:1,buffers:[],mappedBuffers:{},programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],byteSizeByTypeRoot:5120,byteSizeByType:[1,1,2,2,4,4,4,2,3,4,8],stringCache:{},stringiCache:{},unpackAlignment:4,recordError:function recordError(errorCode){if(!GL.lastError){GL.lastError=errorCode}},getNewId:function(table){var ret=GL.counter++;for(var i=table.length;i<ret;i++){table[i]=null}return ret},MAX_TEMP_BUFFER_SIZE:2097152,numTempVertexBuffersPerSize:64,log2ceilLookup:function(i){return 32-Math.clz32(i===0?0:i-1)},generateTempBuffers:function(quads,context){var largestIndex=GL.log2ceilLookup(GL.MAX_TEMP_BUFFER_SIZE);context.tempVertexBufferCounters1=[];context.tempVertexBufferCounters2=[];context.tempVertexBufferCounters1.length=context.tempVertexBufferCounters2.length=largestIndex+1;context.tempVertexBuffers1=[];context.tempVertexBuffers2=[];context.tempVertexBuffers1.length=context.tempVertexBuffers2.length=largestIndex+1;context.tempIndexBuffers=[];context.tempIndexBuffers.length=largestIndex+1;for(var i=0;i<=largestIndex;++i){context.tempIndexBuffers[i]=null;context.tempVertexBufferCounters1[i]=context.tempVertexBufferCounters2[i]=0;var ringbufferLength=GL.numTempVertexBuffersPerSize;context.tempVertexBuffers1[i]=[];context.tempVertexBuffers2[i]=[];var ringbuffer1=context.tempVertexBuffers1[i];var ringbuffer2=context.tempVertexBuffers2[i];ringbuffer1.length=ringbuffer2.length=ringbufferLength;for(var j=0;j<ringbufferLength;++j){ringbuffer1[j]=ringbuffer2[j]=null}}if(quads){context.tempQuadIndexBuffer=GLctx.createBuffer();context.GLctx.bindBuffer(34963,context.tempQuadIndexBuffer);var numIndexes=GL.MAX_TEMP_BUFFER_SIZE>>1;var quadIndexes=new Uint16Array(numIndexes);var i=0,v=0;while(1){quadIndexes[i++]=v;if(i>=numIndexes)break;quadIndexes[i++]=v+1;if(i>=numIndexes)break;quadIndexes[i++]=v+2;if(i>=numIndexes)break;quadIndexes[i++]=v;if(i>=numIndexes)break;quadIndexes[i++]=v+2;if(i>=numIndexes)break;quadIndexes[i++]=v+3;if(i>=numIndexes)break;v+=4}context.GLctx.bufferData(34963,quadIndexes,35044);context.GLctx.bindBuffer(34963,null)}},getTempVertexBuffer:function getTempVertexBuffer(sizeBytes){var idx=GL.log2ceilLookup(sizeBytes);var ringbuffer=GL.currentContext.tempVertexBuffers1[idx];var nextFreeBufferIndex=GL.currentContext.tempVertexBufferCounters1[idx];GL.currentContext.tempVertexBufferCounters1[idx]=GL.currentContext.tempVertexBufferCounters1[idx]+1&GL.numTempVertexBuffersPerSize-1;var vbo=ringbuffer[nextFreeBufferIndex];if(vbo){return vbo}var prevVBO=GLctx.getParameter(34964);ringbuffer[nextFreeBufferIndex]=GLctx.createBuffer();GLctx.bindBuffer(34962,ringbuffer[nextFreeBufferIndex]);GLctx.bufferData(34962,1<<idx,35048);GLctx.bindBuffer(34962,prevVBO);return ringbuffer[nextFreeBufferIndex]},getTempIndexBuffer:function getTempIndexBuffer(sizeBytes){var idx=GL.log2ceilLookup(sizeBytes);var ibo=GL.currentContext.tempIndexBuffers[idx];if(ibo){return ibo}var prevIBO=GLctx.getParameter(34965);GL.currentContext.tempIndexBuffers[idx]=GLctx.createBuffer();GLctx.bindBuffer(34963,GL.currentContext.tempIndexBuffers[idx]);GLctx.bufferData(34963,1<<idx,35048);GLctx.bindBuffer(34963,prevIBO);return GL.currentContext.tempIndexBuffers[idx]},newRenderingFrameStarted:function newRenderingFrameStarted(){if(!GL.currentContext){return}var vb=GL.currentContext.tempVertexBuffers1;GL.currentContext.tempVertexBuffers1=GL.currentContext.tempVertexBuffers2;GL.currentContext.tempVertexBuffers2=vb;vb=GL.currentContext.tempVertexBufferCounters1;GL.currentContext.tempVertexBufferCounters1=GL.currentContext.tempVertexBufferCounters2;GL.currentContext.tempVertexBufferCounters2=vb;var largestIndex=GL.log2ceilLookup(GL.MAX_TEMP_BUFFER_SIZE);for(var i=0;i<=largestIndex;++i){GL.currentContext.tempVertexBufferCounters1[i]=0}},getSource:function(shader,count,string,length){var source=\"\";for(var i=0;i<count;++i){var len=length?HEAP32[length+i*4>>2]:-1;source+=UTF8ToString(HEAP32[string+i*4>>2],len<0?undefined:len)}return source},calcBufLength:function calcBufLength(size,type,stride,count){if(stride>0){return count*stride}var typeSize=GL.byteSizeByType[type-GL.byteSizeByTypeRoot];return size*typeSize*count},usedTempBuffers:[],preDrawHandleClientVertexAttribBindings:function preDrawHandleClientVertexAttribBindings(count){GL.resetBufferBinding=false;for(var i=0;i<GL.currentContext.maxVertexAttribs;++i){var cb=GL.currentContext.clientBuffers[i];if(!cb.clientside||!cb.enabled)continue;GL.resetBufferBinding=true;var size=GL.calcBufLength(cb.size,cb.type,cb.stride,count);var buf=GL.getTempVertexBuffer(size);GLctx.bindBuffer(34962,buf);GLctx.bufferSubData(34962,0,HEAPU8.subarray(cb.ptr,cb.ptr+size));cb.vertexAttribPointerAdaptor.call(GLctx,i,cb.size,cb.type,cb.normalized,cb.stride,0)}},postDrawHandleClientVertexAttribBindings:function postDrawHandleClientVertexAttribBindings(){if(GL.resetBufferBinding){GLctx.bindBuffer(34962,GL.buffers[GLctx.currentArrayBufferBinding])}},createContext:function(canvas,webGLContextAttributes){if(webGLContextAttributes.renderViaOffscreenBackBuffer)webGLContextAttributes[\"preserveDrawingBuffer\"]=true;if(!canvas.getContextSafariWebGL2Fixed){canvas.getContextSafariWebGL2Fixed=canvas.getContext;canvas.getContext=function(ver,attrs){var gl=canvas.getContextSafariWebGL2Fixed(ver,attrs);return ver==\"webgl\"==gl instanceof WebGLRenderingContext?gl:null}}var ctx=webGLContextAttributes.majorVersion>1?canvas.getContext(\"webgl2\",webGLContextAttributes):canvas.getContext(\"webgl\",webGLContextAttributes);if(!ctx)return 0;var handle=GL.registerContext(ctx,webGLContextAttributes);return handle},enableOffscreenFramebufferAttributes:function(webGLContextAttributes){webGLContextAttributes.renderViaOffscreenBackBuffer=true;webGLContextAttributes.preserveDrawingBuffer=true},createOffscreenFramebuffer:function(context){var gl=context.GLctx;var fbo=gl.createFramebuffer();gl.bindFramebuffer(36160,fbo);context.defaultFbo=fbo;context.defaultFboForbidBlitFramebuffer=false;if(gl.getContextAttributes().antialias){context.defaultFboForbidBlitFramebuffer=true}else{var firefoxMatch=navigator.userAgent.toLowerCase().match(/firefox\\/(\\d\\d)/);if(firefoxMatch!=null){var firefoxVersion=firefoxMatch[1];context.defaultFboForbidBlitFramebuffer=firefoxVersion<67}}context.defaultColorTarget=gl.createTexture();context.defaultDepthTarget=gl.createRenderbuffer();GL.resizeOffscreenFramebuffer(context);gl.bindTexture(3553,context.defaultColorTarget);gl.texParameteri(3553,10241,9728);gl.texParameteri(3553,10240,9728);gl.texParameteri(3553,10242,33071);gl.texParameteri(3553,10243,33071);gl.texImage2D(3553,0,6408,gl.canvas.width,gl.canvas.height,0,6408,5121,null);gl.framebufferTexture2D(36160,36064,3553,context.defaultColorTarget,0);gl.bindTexture(3553,null);var depthTarget=gl.createRenderbuffer();gl.bindRenderbuffer(36161,context.defaultDepthTarget);gl.renderbufferStorage(36161,33189,gl.canvas.width,gl.canvas.height);gl.framebufferRenderbuffer(36160,36096,36161,context.defaultDepthTarget);gl.bindRenderbuffer(36161,null);var vertices=[-1,-1,-1,1,1,-1,1,1];var vb=gl.createBuffer();gl.bindBuffer(34962,vb);gl.bufferData(34962,new Float32Array(vertices),35044);gl.bindBuffer(34962,null);context.blitVB=vb;var vsCode=\"attribute vec2 pos;\"+\"varying lowp vec2 tex;\"+\"void main() { tex = pos * 0.5 + vec2(0.5,0.5); gl_Position = vec4(pos, 0.0, 1.0); }\";var vs=gl.createShader(35633);gl.shaderSource(vs,vsCode);gl.compileShader(vs);var fsCode=\"varying lowp vec2 tex;\"+\"uniform sampler2D sampler;\"+\"void main() { gl_FragColor = texture2D(sampler, tex); }\";var fs=gl.createShader(35632);gl.shaderSource(fs,fsCode);gl.compileShader(fs);var blitProgram=gl.createProgram();gl.attachShader(blitProgram,vs);gl.attachShader(blitProgram,fs);gl.linkProgram(blitProgram);context.blitProgram=blitProgram;context.blitPosLoc=gl.getAttribLocation(blitProgram,\"pos\");gl.useProgram(blitProgram);gl.uniform1i(gl.getUniformLocation(blitProgram,\"sampler\"),0);gl.useProgram(null);context.defaultVao=undefined;if(gl.createVertexArray){context.defaultVao=gl.createVertexArray();gl.bindVertexArray(context.defaultVao);gl.enableVertexAttribArray(context.blitPosLoc);gl.bindVertexArray(null)}},resizeOffscreenFramebuffer:function(context){var gl=context.GLctx;if(context.defaultColorTarget){var prevTextureBinding=gl.getParameter(32873);gl.bindTexture(3553,context.defaultColorTarget);gl.texImage2D(3553,0,6408,gl.drawingBufferWidth,gl.drawingBufferHeight,0,6408,5121,null);gl.bindTexture(3553,prevTextureBinding)}if(context.defaultDepthTarget){var prevRenderBufferBinding=gl.getParameter(36007);gl.bindRenderbuffer(36161,context.defaultDepthTarget);gl.renderbufferStorage(36161,33189,gl.drawingBufferWidth,gl.drawingBufferHeight);gl.bindRenderbuffer(36161,prevRenderBufferBinding)}},blitOffscreenFramebuffer:function(context){var gl=context.GLctx;var prevScissorTest=gl.getParameter(3089);if(prevScissorTest)gl.disable(3089);var prevFbo=gl.getParameter(36006);if(gl.blitFramebuffer&&!context.defaultFboForbidBlitFramebuffer){gl.bindFramebuffer(36008,context.defaultFbo);gl.bindFramebuffer(36009,null);gl.blitFramebuffer(0,0,gl.canvas.width,gl.canvas.height,0,0,gl.canvas.width,gl.canvas.height,16384,9728)}else{gl.bindFramebuffer(36160,null);var prevProgram=gl.getParameter(35725);gl.useProgram(context.blitProgram);var prevVB=gl.getParameter(34964);gl.bindBuffer(34962,context.blitVB);var prevActiveTexture=gl.getParameter(34016);gl.activeTexture(33984);var prevTextureBinding=gl.getParameter(32873);gl.bindTexture(3553,context.defaultColorTarget);var prevBlend=gl.getParameter(3042);if(prevBlend)gl.disable(3042);var prevCullFace=gl.getParameter(2884);if(prevCullFace)gl.disable(2884);var prevDepthTest=gl.getParameter(2929);if(prevDepthTest)gl.disable(2929);var prevStencilTest=gl.getParameter(2960);if(prevStencilTest)gl.disable(2960);function draw(){gl.vertexAttribPointer(context.blitPosLoc,2,5126,false,0,0);gl.drawArrays(5,0,4)}if(context.defaultVao){var prevVAO=gl.getParameter(34229);gl.bindVertexArray(context.defaultVao);draw();gl.bindVertexArray(prevVAO)}else{var prevVertexAttribPointer={buffer:gl.getVertexAttrib(context.blitPosLoc,34975),size:gl.getVertexAttrib(context.blitPosLoc,34339),stride:gl.getVertexAttrib(context.blitPosLoc,34340),type:gl.getVertexAttrib(context.blitPosLoc,34341),normalized:gl.getVertexAttrib(context.blitPosLoc,34922),pointer:gl.getVertexAttribOffset(context.blitPosLoc,34373)};var maxVertexAttribs=gl.getParameter(34921);var prevVertexAttribEnables=[];for(var i=0;i<maxVertexAttribs;++i){var prevEnabled=gl.getVertexAttrib(i,34338);var wantEnabled=i==context.blitPosLoc;if(prevEnabled&&!wantEnabled){gl.disableVertexAttribArray(i)}if(!prevEnabled&&wantEnabled){gl.enableVertexAttribArray(i)}prevVertexAttribEnables[i]=prevEnabled}draw();for(var i=0;i<maxVertexAttribs;++i){var prevEnabled=prevVertexAttribEnables[i];var nowEnabled=i==context.blitPosLoc;if(prevEnabled&&!nowEnabled){gl.enableVertexAttribArray(i)}if(!prevEnabled&&nowEnabled){gl.disableVertexAttribArray(i)}}gl.bindBuffer(34962,prevVertexAttribPointer.buffer);gl.vertexAttribPointer(context.blitPosLoc,prevVertexAttribPointer.size,prevVertexAttribPointer.type,prevVertexAttribPointer.normalized,prevVertexAttribPointer.stride,prevVertexAttribPointer.offset)}if(prevStencilTest)gl.enable(2960);if(prevDepthTest)gl.enable(2929);if(prevCullFace)gl.enable(2884);if(prevBlend)gl.enable(3042);gl.bindTexture(3553,prevTextureBinding);gl.activeTexture(prevActiveTexture);gl.bindBuffer(34962,prevVB);gl.useProgram(prevProgram)}gl.bindFramebuffer(36160,prevFbo);if(prevScissorTest)gl.enable(3089)},registerContext:function(ctx,webGLContextAttributes){var handle=GL.getNewId(GL.contexts);var context={handle:handle,attributes:webGLContextAttributes,version:webGLContextAttributes.majorVersion,GLctx:ctx};if(ctx.canvas)ctx.canvas.GLctxObject=context;GL.contexts[handle]=context;if(typeof webGLContextAttributes.enableExtensionsByDefault===\"undefined\"||webGLContextAttributes.enableExtensionsByDefault){GL.initExtensions(context)}context.maxVertexAttribs=context.GLctx.getParameter(34921);context.clientBuffers=[];for(var i=0;i<context.maxVertexAttribs;i++){context.clientBuffers[i]={enabled:false,clientside:false,size:0,type:0,normalized:0,stride:0,ptr:0,vertexAttribPointerAdaptor:null}}GL.generateTempBuffers(false,context);if(webGLContextAttributes.renderViaOffscreenBackBuffer)GL.createOffscreenFramebuffer(context);return handle},makeContextCurrent:function(contextHandle){GL.currentContext=GL.contexts[contextHandle];Module.ctx=GLctx=GL.currentContext&&GL.currentContext.GLctx;return!(contextHandle&&!GLctx)},getContext:function(contextHandle){return GL.contexts[contextHandle]},deleteContext:function(contextHandle){if(GL.currentContext===GL.contexts[contextHandle])GL.currentContext=null;if(typeof JSEvents===\"object\")JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas);if(GL.contexts[contextHandle]&&GL.contexts[contextHandle].GLctx.canvas)GL.contexts[contextHandle].GLctx.canvas.GLctxObject=undefined;GL.contexts[contextHandle]=null},initExtensions:function(context){if(!context)context=GL.currentContext;if(context.initExtensionsDone)return;context.initExtensionsDone=true;var GLctx=context.GLctx;__webgl_enable_ANGLE_instanced_arrays(GLctx);__webgl_enable_OES_vertex_array_object(GLctx);__webgl_enable_WEBGL_draw_buffers(GLctx);__webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(GLctx);__webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(GLctx);if(context.version>=2){GLctx.disjointTimerQueryExt=GLctx.getExtension(\"EXT_disjoint_timer_query_webgl2\")}if(context.version<2||!GLctx.disjointTimerQueryExt){GLctx.disjointTimerQueryExt=GLctx.getExtension(\"EXT_disjoint_timer_query\")}__webgl_enable_WEBGL_multi_draw(GLctx);var exts=GLctx.getSupportedExtensions()||[];exts.forEach(function(ext){if(!ext.includes(\"lose_context\")&&!ext.includes(\"debug\")){GLctx.getExtension(ext)}})}};var JSEvents={inEventHandler:0,removeAllEventListeners:function(){for(var i=JSEvents.eventHandlers.length-1;i>=0;--i){JSEvents._removeHandler(i)}JSEvents.eventHandlers=[];JSEvents.deferredCalls=[]},registerRemoveEventListeners:function(){if(!JSEvents.removeEventListenersRegistered){__ATEXIT__.push(JSEvents.removeAllEventListeners);JSEvents.removeEventListenersRegistered=true}},deferredCalls:[],deferCall:function(targetFunction,precedence,argsList){function arraysHaveEqualContent(arrA,arrB){if(arrA.length!=arrB.length)return false;for(var i in arrA){if(arrA[i]!=arrB[i])return false}return true}for(var i in JSEvents.deferredCalls){var call=JSEvents.deferredCalls[i];if(call.targetFunction==targetFunction&&arraysHaveEqualContent(call.argsList,argsList)){return}}JSEvents.deferredCalls.push({targetFunction:targetFunction,precedence:precedence,argsList:argsList});JSEvents.deferredCalls.sort(function(x,y){return x.precedence<y.precedence})},removeDeferredCalls:function(targetFunction){for(var i=0;i<JSEvents.deferredCalls.length;++i){if(JSEvents.deferredCalls[i].targetFunction==targetFunction){JSEvents.deferredCalls.splice(i,1);--i}}},canPerformEventHandlerRequests:function(){return JSEvents.inEventHandler&&JSEvents.currentEventHandler.allowsDeferredCalls},runDeferredCalls:function(){if(!JSEvents.canPerformEventHandlerRequests()){return}for(var i=0;i<JSEvents.deferredCalls.length;++i){var call=JSEvents.deferredCalls[i];JSEvents.deferredCalls.splice(i,1);--i;call.targetFunction.apply(null,call.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:function(target,eventTypeString){for(var i=0;i<JSEvents.eventHandlers.length;++i){if(JSEvents.eventHandlers[i].target==target&&(!eventTypeString||eventTypeString==JSEvents.eventHandlers[i].eventTypeString)){JSEvents._removeHandler(i--)}}},_removeHandler:function(i){var h=JSEvents.eventHandlers[i];h.target.removeEventListener(h.eventTypeString,h.eventListenerFunc,h.useCapture);JSEvents.eventHandlers.splice(i,1)},registerOrRemoveHandler:function(eventHandler){var jsEventHandler=function jsEventHandler(event){++JSEvents.inEventHandler;JSEvents.currentEventHandler=eventHandler;JSEvents.runDeferredCalls();eventHandler.handlerFunc(event);JSEvents.runDeferredCalls();--JSEvents.inEventHandler};if(eventHandler.callbackfunc){eventHandler.eventListenerFunc=jsEventHandler;eventHandler.target.addEventListener(eventHandler.eventTypeString,jsEventHandler,eventHandler.useCapture);JSEvents.eventHandlers.push(eventHandler);JSEvents.registerRemoveEventListeners()}else{for(var i=0;i<JSEvents.eventHandlers.length;++i){if(JSEvents.eventHandlers[i].target==eventHandler.target&&JSEvents.eventHandlers[i].eventTypeString==eventHandler.eventTypeString){JSEvents._removeHandler(i--)}}}},getNodeNameForTarget:function(target){if(!target)return\"\";if(target==window)return\"#window\";if(target==screen)return\"#screen\";return target&&target.nodeName?target.nodeName:\"\"},fullscreenEnabled:function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled}};var __emscripten_webgl_power_preferences=[\"default\",\"low-power\",\"high-performance\"];var specialHTMLTargets=[0,typeof document!==\"undefined\"?document:0,typeof window!==\"undefined\"?window:0];function findEventTarget(target){warnOnce(\"Rules for selecting event targets in HTML5 API are changing: instead of using document.getElementById() that only can refer to elements by their DOM ID, new event target selection mechanism uses the more flexible function document.querySelector() that can look up element names, classes, and complex CSS selectors. Build with -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1 to change to the new lookup rules. See https://github.com/emscripten-core/emscripten/pull/7977 for more details.\");try{if(!target)return window;if(typeof target===\"number\")target=specialHTMLTargets[target]||UTF8ToString(target);if(target===\"#window\")return window;else if(target===\"#document\")return document;else if(target===\"#screen\")return screen;else if(target===\"#canvas\")return Module[\"canvas\"];return typeof target===\"string\"?document.getElementById(target):target}catch(e){return null}}function findCanvasEventTarget(target){if(typeof target===\"number\")target=UTF8ToString(target);if(!target||target===\"#canvas\"){if(typeof GL!==\"undefined\"&&GL.offscreenCanvases[\"canvas\"])return GL.offscreenCanvases[\"canvas\"];return Module[\"canvas\"]}if(typeof GL!==\"undefined\"&&GL.offscreenCanvases[target])return GL.offscreenCanvases[target];return findEventTarget(target)}function _emscripten_webgl_do_create_context(target,attributes){assert(attributes);var a=attributes>>2;var powerPreference=HEAP32[a+(24>>2)];var contextAttributes={\"alpha\":!!HEAP32[a+(0>>2)],\"depth\":!!HEAP32[a+(4>>2)],\"stencil\":!!HEAP32[a+(8>>2)],\"antialias\":!!HEAP32[a+(12>>2)],\"premultipliedAlpha\":!!HEAP32[a+(16>>2)],\"preserveDrawingBuffer\":!!HEAP32[a+(20>>2)],\"powerPreference\":__emscripten_webgl_power_preferences[powerPreference],\"failIfMajorPerformanceCaveat\":!!HEAP32[a+(28>>2)],majorVersion:HEAP32[a+(32>>2)],minorVersion:HEAP32[a+(36>>2)],enableExtensionsByDefault:HEAP32[a+(40>>2)],explicitSwapControl:HEAP32[a+(44>>2)],proxyContextToMainThread:HEAP32[a+(48>>2)],renderViaOffscreenBackBuffer:HEAP32[a+(52>>2)]};var canvas=findCanvasEventTarget(target);if(!canvas){return 0}if(canvas.offscreenCanvas)canvas=canvas.offscreenCanvas;if(contextAttributes.explicitSwapControl){var supportsOffscreenCanvas=canvas.transferControlToOffscreen||typeof OffscreenCanvas!==\"undefined\"&&canvas instanceof OffscreenCanvas;if(!supportsOffscreenCanvas){if(!contextAttributes.renderViaOffscreenBackBuffer){contextAttributes.renderViaOffscreenBackBuffer=true}}if(canvas.transferControlToOffscreen){if(!canvas.controlTransferredOffscreen){GL.offscreenCanvases[canvas.id]={canvas:canvas.transferControlToOffscreen(),canvasSharedPtr:_malloc(12),id:canvas.id};canvas.controlTransferredOffscreen=true}else if(!GL.offscreenCanvases[canvas.id]){return 0}canvas=GL.offscreenCanvases[canvas.id]}}var contextHandle=GL.createContext(canvas,contextAttributes);return contextHandle}function _emscripten_webgl_create_context(a0,a1){return _emscripten_webgl_do_create_context(a0,a1)}function _emscripten_webgl_do_get_current_context(){return GL.currentContext?GL.currentContext.handle:0}function _emscripten_webgl_get_current_context(){return _emscripten_webgl_do_get_current_context()}Module[\"_emscripten_webgl_get_current_context\"]=_emscripten_webgl_get_current_context;function _emscripten_webgl_make_context_current(contextHandle){var success=GL.makeContextCurrent(contextHandle);return success?0:-5}Module[\"_emscripten_webgl_make_context_current\"]=_emscripten_webgl_make_context_current;function _emscripten_webgl_destroy_context(contextHandle){if(GL.currentContext==contextHandle)GL.currentContext=0;GL.deleteContext(contextHandle)}function _emscripten_webgl_get_context_attributes(c,a){if(!a)return-5;c=GL.contexts[c];if(!c)return-3;var t=c.GLctx;if(!t)return-3;t=t.getContextAttributes();HEAP32[a>>2]=t.alpha;HEAP32[a+4>>2]=t.depth;HEAP32[a+8>>2]=t.stencil;HEAP32[a+12>>2]=t.antialias;HEAP32[a+16>>2]=t.premultipliedAlpha;HEAP32[a+20>>2]=t.preserveDrawingBuffer;var power=t[\"powerPreference\"]&&__emscripten_webgl_power_preferences.indexOf(t[\"powerPreference\"]);HEAP32[a+24>>2]=power;HEAP32[a+28>>2]=t.failIfMajorPerformanceCaveat;HEAP32[a+32>>2]=c.version;HEAP32[a+36>>2]=0;HEAP32[a+40>>2]=c.attributes.enableExtensionsByDefault;return 0}function _emscripten_webgl_init_context_attributes(attributes){assert(attributes);var a=attributes>>2;for(var i=0;i<56>>2;++i){HEAP32[a+i]=0}HEAP32[a+(0>>2)]=HEAP32[a+(4>>2)]=HEAP32[a+(12>>2)]=HEAP32[a+(16>>2)]=HEAP32[a+(32>>2)]=HEAP32[a+(40>>2)]=1}var ENV={};function getExecutableName(){return thisProgram||\"./this.program\"}function 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}function _environ_get(__environ,environ_buf){var bufSize=0;getEnvStrings().forEach(function(string,i){var ptr=environ_buf+bufSize;HEAP32[__environ+i*4>>2]=ptr;writeAsciiToMemory(string,ptr);bufSize+=string.length+1});return 0}function _environ_sizes_get(penviron_count,penviron_buf_size){var strings=getEnvStrings();HEAP32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1});HEAP32[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 instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_read(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=SYSCALLS.doReadv(stream,iov,iovcnt);HEAP32[pnum>>2]=num;return 0}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){try{var stream=SYSCALLS.getStreamFromFD(fd);var HIGH_OFFSET=4294967296;var offset=offset_high*HIGH_OFFSET+(offset_low>>>0);var DOUBLE_LIMIT=9007199254740992;if(offset<=-DOUBLE_LIMIT||offset>=DOUBLE_LIMIT){return-61}FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[newOffset>>2]=tempI64[0],HEAP32[newOffset+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_write(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=SYSCALLS.doWritev(stream,iov,iovcnt);HEAP32[pnum>>2]=num;return 0}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _getTempRet0(){return getTempRet0()}function _getentropy(buffer,size){if(!_getentropy.randomDevice){_getentropy.randomDevice=getRandomDevice()}for(var i=0;i<size;i++){HEAP8[buffer+i>>0]=_getentropy.randomDevice()}return 0}function _glActiveTexture(x0){GLctx[\"activeTexture\"](x0)}function _glAttachShader(program,shader){GLctx.attachShader(GL.programs[program],GL.shaders[shader])}function _glBindAttribLocation(program,index,name){GLctx.bindAttribLocation(GL.programs[program],index,UTF8ToString(name))}function _glBindBuffer(target,buffer){if(target==34962){GLctx.currentArrayBufferBinding=buffer}else if(target==34963){GLctx.currentElementArrayBufferBinding=buffer}if(target==35051){GLctx.currentPixelPackBufferBinding=buffer}else if(target==35052){GLctx.currentPixelUnpackBufferBinding=buffer}GLctx.bindBuffer(target,GL.buffers[buffer])}function _glBindBufferBase(target,index,buffer){GLctx[\"bindBufferBase\"](target,index,GL.buffers[buffer])}function _glBindFramebuffer(target,framebuffer){GLctx.bindFramebuffer(target,framebuffer?GL.framebuffers[framebuffer]:GL.currentContext.defaultFbo)}function _glBindTexture(target,texture){GLctx.bindTexture(target,GL.textures[texture])}function _glBindVertexArray(vao){GLctx[\"bindVertexArray\"](GL.vaos[vao]);var ibo=GLctx.getParameter(34965);GLctx.currentElementArrayBufferBinding=ibo?ibo.name|0:0}function _glBufferData(target,size,data,usage){if(GL.currentContext.version>=2){if(data){GLctx.bufferData(target,HEAPU8,usage,data,size)}else{GLctx.bufferData(target,size,usage)}}else{GLctx.bufferData(target,data?HEAPU8.subarray(data,data+size):size,usage)}}function convertI32PairToI53(lo,hi){assert(hi===(hi|0));return(lo>>>0)+hi*4294967296}function _glClientWaitSync(sync,flags,timeoutLo,timeoutHi){return GLctx.clientWaitSync(GL.syncs[sync],flags,convertI32PairToI53(timeoutLo,timeoutHi))}function _glCompileShader(shader){GLctx.compileShader(GL.shaders[shader])}function _glCreateProgram(){var id=GL.getNewId(GL.programs);var program=GLctx.createProgram();program.name=id;program.maxUniformLength=program.maxAttributeLength=program.maxUniformBlockNameLength=0;program.uniformIdCounter=1;GL.programs[id]=program;return id}function _glCreateShader(shaderType){var id=GL.getNewId(GL.shaders);GL.shaders[id]=GLctx.createShader(shaderType);return id}function _glDeleteBuffers(n,buffers){for(var i=0;i<n;i++){var id=HEAP32[buffers+i*4>>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GLctx.currentArrayBufferBinding)GLctx.currentArrayBufferBinding=0;if(id==GLctx.currentElementArrayBufferBinding)GLctx.currentElementArrayBufferBinding=0;if(id==GLctx.currentPixelPackBufferBinding)GLctx.currentPixelPackBufferBinding=0;if(id==GLctx.currentPixelUnpackBufferBinding)GLctx.currentPixelUnpackBufferBinding=0}}function _glDeleteFramebuffers(n,framebuffers){for(var i=0;i<n;++i){var id=HEAP32[framebuffers+i*4>>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}function _glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null}function _glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _glDeleteSync(id){if(!id)return;var sync=GL.syncs[id];if(!sync){GL.recordError(1281);return}GLctx.deleteSync(sync);sync.name=0;GL.syncs[id]=null}function _glDeleteTextures(n,textures){for(var i=0;i<n;i++){var id=HEAP32[textures+i*4>>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _glDeleteVertexArrays(n,vaos){for(var i=0;i<n;i++){var id=HEAP32[vaos+i*4>>2];GLctx[\"deleteVertexArray\"](GL.vaos[id]);GL.vaos[id]=null}}function _glDisable(x0){GLctx[\"disable\"](x0)}function _glDisableVertexAttribArray(index){var cb=GL.currentContext.clientBuffers[index];cb.enabled=false;GLctx.disableVertexAttribArray(index)}function _glDrawArrays(mode,first,count){GL.preDrawHandleClientVertexAttribBindings(first+count);GLctx.drawArrays(mode,first,count);GL.postDrawHandleClientVertexAttribBindings()}var tempFixedLengthArray=[];function _glDrawBuffers(n,bufs){var bufArray=tempFixedLengthArray[n];for(var i=0;i<n;i++){bufArray[i]=HEAP32[bufs+i*4>>2]}GLctx[\"drawBuffers\"](bufArray)}function _glEnableVertexAttribArray(index){var cb=GL.currentContext.clientBuffers[index];cb.enabled=true;GLctx.enableVertexAttribArray(index)}function _glFenceSync(condition,flags){var sync=GLctx.fenceSync(condition,flags);if(sync){var id=GL.getNewId(GL.syncs);sync.name=id;GL.syncs[id]=sync;return id}else{return 0}}function _glFinish(){GLctx[\"finish\"]()}function _glFlush(){GLctx[\"flush\"]()}function _glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}function _glFramebufferTextureLayer(target,attachment,texture,level,layer){GLctx.framebufferTextureLayer(target,attachment,GL.textures[texture],level,layer)}function __glGenObject(n,buffers,createFunction,objectTable){for(var i=0;i<n;i++){var buffer=GLctx[createFunction]();var id=buffer&&GL.getNewId(objectTable);if(buffer){buffer.name=id;objectTable[id]=buffer}else{GL.recordError(1282)}HEAP32[buffers+i*4>>2]=id}}function _glGenBuffers(n,buffers){__glGenObject(n,buffers,\"createBuffer\",GL.buffers)}function _glGenFramebuffers(n,ids){__glGenObject(n,ids,\"createFramebuffer\",GL.framebuffers)}function _glGenTextures(n,textures){__glGenObject(n,textures,\"createTexture\",GL.textures)}function _glGenVertexArrays(n,arrays){__glGenObject(n,arrays,\"createVertexArray\",GL.vaos)}function _glGetAttribLocation(program,name){return GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name))}function _glGetError(){var error=GLctx.getError()||GL.lastError;GL.lastError=0;return error}function readI53FromI64(ptr){return HEAPU32[ptr>>2]+HEAP32[ptr+4>>2]*4294967296}function readI53FromU64(ptr){return HEAPU32[ptr>>2]+HEAPU32[ptr+4>>2]*4294967296}function writeI53ToI64(ptr,num){HEAPU32[ptr>>2]=num;HEAPU32[ptr+4>>2]=(num-HEAPU32[ptr>>2])/4294967296;var deserialized=num>=0?readI53FromU64(ptr):readI53FromI64(ptr);if(deserialized!=num)warnOnce(\"writeI53ToI64() out of range: serialized JS Number \"+num+\" to Wasm heap as bytes lo=0x\"+HEAPU32[ptr>>2].toString(16)+\", hi=0x\"+HEAPU32[ptr+4>>2].toString(16)+\", which deserializes back to \"+deserialized+\" instead!\")}function emscriptenWebGLGet(name_,p,type){if(!p){GL.recordError(1281);return}var ret=undefined;switch(name_){case 36346:ret=1;break;case 36344:if(type!=0&&type!=1){GL.recordError(1280)}return;case 34814:case 36345:ret=0;break;case 34466:var formats=GLctx.getParameter(34467);ret=formats?formats.length:0;break;case 33309:if(GL.currentContext.version<2){GL.recordError(1282);return}var exts=GLctx.getSupportedExtensions()||[];ret=2*exts.length;break;case 33307:case 33308:if(GL.currentContext.version<2){GL.recordError(1280);return}ret=name_==33307?3:0;break}if(ret===undefined){var result=GLctx.getParameter(name_);switch(typeof result){case\"number\":ret=result;break;case\"boolean\":ret=result?1:0;break;case\"string\":GL.recordError(1280);return;case\"object\":if(result===null){switch(name_){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:{ret=0;break}default:{GL.recordError(1280);return}}}else if(result instanceof Float32Array||result instanceof Uint32Array||result instanceof Int32Array||result instanceof Array){for(var i=0;i<result.length;++i){switch(type){case 0:HEAP32[p+i*4>>2]=result[i];break;case 2:HEAPF32[p+i*4>>2]=result[i];break;case 4:HEAP8[p+i>>0]=result[i]?1:0;break}}return}else{try{ret=result.name|0}catch(e){GL.recordError(1280);err(\"GL_INVALID_ENUM in glGet\"+type+\"v: Unknown object returned from WebGL getParameter(\"+name_+\")! (error: \"+e+\")\");return}}break;default:GL.recordError(1280);err(\"GL_INVALID_ENUM in glGet\"+type+\"v: Native code calling glGet\"+type+\"v(\"+name_+\") and it returns \"+result+\" of type \"+typeof result+\"!\");return}}switch(type){case 1:writeI53ToI64(p,ret);break;case 0:HEAP32[p>>2]=ret;break;case 2:HEAPF32[p>>2]=ret;break;case 4:HEAP8[p>>0]=ret?1:0;break}}function _glGetIntegerv(name_,p){emscriptenWebGLGet(name_,p,0)}function stringToNewUTF8(jsString){var length=lengthBytesUTF8(jsString)+1;var cString=_malloc(length);stringToUTF8(jsString,cString,length);return cString}function _glGetString(name_){var ret=GL.stringCache[name_];if(!ret){switch(name_){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return\"GL_\"+e}));ret=stringToNewUTF8(exts.join(\" \"));break;case 7936:case 7937:case 37445:case 37446:var s=GLctx.getParameter(name_);if(!s){GL.recordError(1280)}ret=s&&stringToNewUTF8(s);break;case 7938:var glVersion=GLctx.getParameter(7938);if(GL.currentContext.version>=2)glVersion=\"OpenGL ES 3.0 (\"+glVersion+\")\";else{glVersion=\"OpenGL ES 2.0 (\"+glVersion+\")\"}ret=stringToNewUTF8(glVersion);break;case 35724:var glslVersion=GLctx.getParameter(35724);var ver_re=/^WebGL GLSL ES ([0-9]\\.[0-9][0-9]?)(?:$| .*)/;var ver_num=glslVersion.match(ver_re);if(ver_num!==null){if(ver_num[1].length==3)ver_num[1]=ver_num[1]+\"0\";glslVersion=\"OpenGL ES GLSL ES \"+ver_num[1]+\" (\"+glslVersion+\")\"}ret=stringToNewUTF8(glslVersion);break;default:GL.recordError(1280)}GL.stringCache[name_]=ret}return ret}function _glGetUniformBlockIndex(program,uniformBlockName){return GLctx[\"getUniformBlockIndex\"](GL.programs[program],UTF8ToString(uniformBlockName))}function jstoi_q(str){return parseInt(str)}function webglGetLeftBracePos(name){return name.slice(-1)==\"]\"&&name.lastIndexOf(\"[\")}function webglPrepareUniformLocationsBeforeFirstUse(program){var uniformLocsById=program.uniformLocsById,uniformSizeAndIdsByName=program.uniformSizeAndIdsByName,i,j;if(!uniformLocsById){program.uniformLocsById=uniformLocsById={};program.uniformArrayNamesById={};for(i=0;i<GLctx.getProgramParameter(program,35718);++i){var u=GLctx.getActiveUniform(program,i);var nm=u.name;var sz=u.size;var lb=webglGetLeftBracePos(nm);var arrayName=lb>0?nm.slice(0,lb):nm;var id=program.uniformIdCounter;program.uniformIdCounter+=sz;uniformSizeAndIdsByName[arrayName]=[sz,id];for(j=0;j<sz;++j){uniformLocsById[id]=j;program.uniformArrayNamesById[id++]=arrayName}}}}function _glGetUniformLocation(program,name){name=UTF8ToString(name);if(program=GL.programs[program]){webglPrepareUniformLocationsBeforeFirstUse(program);var uniformLocsById=program.uniformLocsById;var arrayIndex=0;var uniformBaseName=name;var leftBrace=webglGetLeftBracePos(name);if(leftBrace>0){arrayIndex=jstoi_q(name.slice(leftBrace+1))>>>0;uniformBaseName=name.slice(0,leftBrace)}var sizeAndId=program.uniformSizeAndIdsByName[uniformBaseName];if(sizeAndId&&arrayIndex<sizeAndId[0]){arrayIndex+=sizeAndId[1];if(uniformLocsById[arrayIndex]=uniformLocsById[arrayIndex]||GLctx.getUniformLocation(program,name)){return arrayIndex}}}else{GL.recordError(1281)}return-1}function _glLinkProgram(program){program=GL.programs[program];GLctx.linkProgram(program);program.uniformLocsById=0;program.uniformSizeAndIdsByName={}}function _glPixelStorei(pname,param){if(pname==3317){GL.unpackAlignment=param}GLctx.pixelStorei(pname,param)}function computeUnpackAlignedImageSize(width,height,sizePerPixel,alignment){function roundedToNextMultipleOf(x,y){return x+y-1&-y}var plainRowSize=width*sizePerPixel;var alignedRowSize=roundedToNextMultipleOf(plainRowSize,alignment);return height*alignedRowSize}function __colorChannelsInGlTextureFormat(format){var colorChannels={5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4};return colorChannels[format-6402]||1}function heapObjectForWebGLType(type){type-=5120;if(type==0)return HEAP8;if(type==1)return HEAPU8;if(type==2)return HEAP16;if(type==4)return HEAP32;if(type==6)return HEAPF32;if(type==5||type==28922||type==28520||type==30779||type==30782)return HEAPU32;return HEAPU16}function heapAccessShiftForWebGLHeap(heap){return 31-Math.clz32(heap.BYTES_PER_ELEMENT)}function emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat){var heap=heapObjectForWebGLType(type);var shift=heapAccessShiftForWebGLHeap(heap);var byteSize=1<<shift;var sizePerPixel=__colorChannelsInGlTextureFormat(format)*byteSize;var bytes=computeUnpackAlignedImageSize(width,height,sizePerPixel,GL.unpackAlignment);return heap.subarray(pixels>>shift,pixels+bytes>>shift)}function _glReadPixels(x,y,width,height,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelPackBufferBinding){GLctx.readPixels(x,y,width,height,format,type,pixels)}else{var heap=heapObjectForWebGLType(type);GLctx.readPixels(x,y,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}return}var pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,format);if(!pixelData){GL.recordError(1280);return}GLctx.readPixels(x,y,width,height,format,type,pixelData)}function _glShaderSource(shader,count,string,length){var source=GL.getSource(shader,count,string,length);GLctx.shaderSource(GL.shaders[shader],source)}function _glTexImage2D(target,level,internalFormat,width,height,border,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,null)}return}GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels?emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat):null)}function _glTexParameterfv(target,pname,params){var param=HEAPF32[params>>2];GLctx.texParameterf(target,pname,param)}function _glTexParameteri(x0,x1,x2){GLctx[\"texParameteri\"](x0,x1,x2)}function _glTexStorage2D(x0,x1,x2,x3,x4){GLctx[\"texStorage2D\"](x0,x1,x2,x3,x4)}function _glTexStorage3D(x0,x1,x2,x3,x4,x5){GLctx[\"texStorage3D\"](x0,x1,x2,x3,x4,x5)}function _glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,null)}return}var pixelData=null;if(pixels)pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,0);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixelData)}function _glTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx[\"texSubImage3D\"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx[\"texSubImage3D\"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx[\"texSubImage3D\"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,null)}}function webglGetUniformLocation(location){var p=GLctx.currentProgram;if(p){var webglLoc=p.uniformLocsById[location];if(typeof webglLoc===\"number\"){p.uniformLocsById[location]=webglLoc=GLctx.getUniformLocation(p,p.uniformArrayNamesById[location]+(webglLoc>0?\"[\"+webglLoc+\"]\":\"\"))}return webglLoc}else{GL.recordError(1282)}}function _glUniform1f(location,v0){GLctx.uniform1f(webglGetUniformLocation(location),v0)}function _glUniform1i(location,v0){GLctx.uniform1i(webglGetUniformLocation(location),v0)}var miniTempWebGLFloatBuffers=[];function _glUniform2fv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform2fv(webglGetUniformLocation(location),HEAPF32,value>>2,count*2);return}if(count<=144){var view=miniTempWebGLFloatBuffers[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2fv(webglGetUniformLocation(location),view)}function _glUniform4fv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform4fv(webglGetUniformLocation(location),HEAPF32,value>>2,count*4);return}if(count<=72){var view=miniTempWebGLFloatBuffers[4*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<4*count;i+=4){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4fv(webglGetUniformLocation(location),view)}var __miniTempWebGLIntBuffers=[];function _glUniform4iv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform4iv(webglGetUniformLocation(location),HEAP32,value>>2,count*4);return}if(count<=72){var view=__miniTempWebGLIntBuffers[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2];view[i+2]=HEAP32[value+(4*i+8)>>2];view[i+3]=HEAP32[value+(4*i+12)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4iv(webglGetUniformLocation(location),view)}function _glUniformBlockBinding(program,uniformBlockIndex,uniformBlockBinding){program=GL.programs[program];GLctx[\"uniformBlockBinding\"](program,uniformBlockIndex,uniformBlockBinding)}function _glUniformMatrix4fv(location,count,transpose,value){if(GL.currentContext.version>=2){GLctx.uniformMatrix4fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*16);return}if(count<=18){var view=miniTempWebGLFloatBuffers[16*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<16*count;i+=16){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3];view[i+4]=heap[dst+4];view[i+5]=heap[dst+5];view[i+6]=heap[dst+6];view[i+7]=heap[dst+7];view[i+8]=heap[dst+8];view[i+9]=heap[dst+9];view[i+10]=heap[dst+10];view[i+11]=heap[dst+11];view[i+12]=heap[dst+12];view[i+13]=heap[dst+13];view[i+14]=heap[dst+14];view[i+15]=heap[dst+15]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(webglGetUniformLocation(location),!!transpose,view)}function _glUseProgram(program){program=GL.programs[program];GLctx.useProgram(program);GLctx.currentProgram=program}function _glVertexAttribPointer(index,size,type,normalized,stride,ptr){var cb=GL.currentContext.clientBuffers[index];if(!GLctx.currentArrayBufferBinding){cb.size=size;cb.type=type;cb.normalized=normalized;cb.stride=stride;cb.ptr=ptr;cb.clientside=true;cb.vertexAttribPointerAdaptor=function(index,size,type,normalized,stride,ptr){this.vertexAttribPointer(index,size,type,normalized,stride,ptr)};return}cb.clientside=false;GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _glViewport(x0,x1,x2,x3){GLctx[\"viewport\"](x0,x1,x2,x3)}function _gmtime_r(time,tmPtr){var date=new Date(HEAP32[time>>2]*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();HEAP32[tmPtr+36>>2]=0;HEAP32[tmPtr+32>>2]=0;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;if(!_gmtime_r.GMTString)_gmtime_r.GMTString=allocateUTF8(\"GMT\");HEAP32[tmPtr+40>>2]=_gmtime_r.GMTString;return tmPtr}function _llvm_eh_typeid_for(type){return type}function _tzset(){if(_tzset.called)return;_tzset.called=true;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);HEAP32[__get_timezone()>>2]=stdTimezoneOffset*60;HEAP32[__get_daylight()>>2]=Number(winterOffset!=summerOffset);function extractZone(date){var match=date.toTimeString().match(/\\(([A-Za-z ]+)\\)$/);return match?match[1]:\"GMT\"}var winterName=extractZone(winter);var summerName=extractZone(summer);var winterNamePtr=allocateUTF8(winterName);var summerNamePtr=allocateUTF8(summerName);if(summerOffset<winterOffset){HEAP32[__get_tzname()>>2]=winterNamePtr;HEAP32[__get_tzname()+4>>2]=summerNamePtr}else{HEAP32[__get_tzname()>>2]=summerNamePtr;HEAP32[__get_tzname()+4>>2]=winterNamePtr}}function _localtime_r(time,tmPtr){_tzset();var date=new Date(HEAP32[time>>2]*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 start=new Date(date.getFullYear(),0,1);var yday=(date.getTime()-start.getTime())/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);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 zonePtr=HEAP32[__get_tzname()+(dst?4:0)>>2];HEAP32[tmPtr+40>>2]=zonePtr;return tmPtr}function _mktime(tmPtr){_tzset();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=(date.getTime()-start.getTime())/(1e3*60*60*24)|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();return date.getTime()/1e3|0}function _proc_exit(code){procExit(code)}function _setTempRet0(val){setTempRet0(val)}function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}function __arraySum(array,index){var sum=0;for(var i=0;i<=index;sum+=array[i++]){}return sum}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var __MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(date,days){var newDate=new Date(date.getTime());while(days>0){var leap=__isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate}function _strftime(s,maxsize,format,tm){var tm_zone=HEAP32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?UTF8ToString(tm_zone):\"\"};var pattern=UTF8ToString(format);var EXPANSION_RULES_1={\"%c\":\"%a %b %d %H:%M:%S %Y\",\"%D\":\"%m/%d/%y\",\"%F\":\"%Y-%m-%d\",\"%h\":\"%b\",\"%r\":\"%I:%M:%S %p\",\"%R\":\"%H:%M\",\"%T\":\"%H:%M:%S\",\"%x\":\"%m/%d/%y\",\"%X\":\"%H:%M:%S\",\"%Ec\":\"%c\",\"%EC\":\"%C\",\"%Ex\":\"%m/%d/%y\",\"%EX\":\"%H:%M:%S\",\"%Ey\":\"%y\",\"%EY\":\"%Y\",\"%Od\":\"%d\",\"%Oe\":\"%e\",\"%OH\":\"%H\",\"%OI\":\"%I\",\"%Om\":\"%m\",\"%OM\":\"%M\",\"%OS\":\"%S\",\"%Ou\":\"%u\",\"%OU\":\"%U\",\"%OV\":\"%V\",\"%Ow\":\"%w\",\"%OW\":\"%W\",\"%Oy\":\"%y\"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,\"g\"),EXPANSION_RULES_1[rule])}var WEEKDAYS=[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"];var MONTHS=[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"];function leadingSomething(value,digits,character){var str=typeof value===\"number\"?value.toString():value||\"\";while(str.length<digits){str=character[0]+str}return str}function leadingNulls(value,digits){return leadingSomething(value,digits,\"0\")}function compareByDay(date1,date2){function sgn(value){return value<0?-1:value>0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}else{return thisDate.getFullYear()}}else{return thisDate.getFullYear()-1}}var EXPANSION_RULES_2={\"%a\":function(date){return WEEKDAYS[date.tm_wday].substring(0,3)},\"%A\":function(date){return WEEKDAYS[date.tm_wday]},\"%b\":function(date){return MONTHS[date.tm_mon].substring(0,3)},\"%B\":function(date){return MONTHS[date.tm_mon]},\"%C\":function(date){var year=date.tm_year+1900;return leadingNulls(year/100|0,2)},\"%d\":function(date){return leadingNulls(date.tm_mday,2)},\"%e\":function(date){return leadingSomething(date.tm_mday,2,\" \")},\"%g\":function(date){return getWeekBasedYear(date).toString().substring(2)},\"%G\":function(date){return getWeekBasedYear(date)},\"%H\":function(date){return leadingNulls(date.tm_hour,2)},\"%I\":function(date){var twelveHour=date.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2)},\"%j\":function(date){return leadingNulls(date.tm_mday+__arraySum(__isLeapYear(date.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,date.tm_mon-1),3)},\"%m\":function(date){return leadingNulls(date.tm_mon+1,2)},\"%M\":function(date){return leadingNulls(date.tm_min,2)},\"%n\":function(){return\"\\n\"},\"%p\":function(date){if(date.tm_hour>=0&&date.tm_hour<12){return\"AM\"}else{return\"PM\"}},\"%S\":function(date){return leadingNulls(date.tm_sec,2)},\"%t\":function(){return\"\\t\"},\"%u\":function(date){return date.tm_wday||7},\"%U\":function(date){var janFirst=new Date(date.tm_year+1900,0,1);var firstSunday=janFirst.getDay()===0?janFirst:__addDays(janFirst,7-janFirst.getDay());var endDate=new Date(date.tm_year+1900,date.tm_mon,date.tm_mday);if(compareByDay(firstSunday,endDate)<0){var februaryFirstUntilEndMonth=__arraySum(__isLeapYear(endDate.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,endDate.getMonth()-1)-31;var firstSundayUntilEndJanuary=31-firstSunday.getDate();var days=firstSundayUntilEndJanuary+februaryFirstUntilEndMonth+endDate.getDate();return leadingNulls(Math.ceil(days/7),2)}return compareByDay(firstSunday,janFirst)===0?\"01\":\"00\"},\"%V\":function(date){var janFourthThisYear=new Date(date.tm_year+1900,0,4);var janFourthNextYear=new Date(date.tm_year+1901,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);var endDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);if(compareByDay(endDate,firstWeekStartThisYear)<0){return\"53\"}if(compareByDay(firstWeekStartNextYear,endDate)<=0){return\"01\"}var daysDifference;if(firstWeekStartThisYear.getFullYear()<date.tm_year+1900){daysDifference=date.tm_yday+32-firstWeekStartThisYear.getDate()}else{daysDifference=date.tm_yday+1-firstWeekStartThisYear.getDate()}return leadingNulls(Math.ceil(daysDifference/7),2)},\"%w\":function(date){return date.tm_wday},\"%W\":function(date){var janFirst=new Date(date.tm_year,0,1);var firstMonday=janFirst.getDay()===1?janFirst:__addDays(janFirst,janFirst.getDay()===0?1:7-janFirst.getDay()+1);var endDate=new Date(date.tm_year+1900,date.tm_mon,date.tm_mday);if(compareByDay(firstMonday,endDate)<0){var februaryFirstUntilEndMonth=__arraySum(__isLeapYear(endDate.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,endDate.getMonth()-1)-31;var firstMondayUntilEndJanuary=31-firstMonday.getDate();var days=firstMondayUntilEndJanuary+februaryFirstUntilEndMonth+endDate.getDate();return leadingNulls(Math.ceil(days/7),2)}return compareByDay(firstMonday,janFirst)===0?\"01\":\"00\"},\"%y\":function(date){return(date.tm_year+1900).toString().substring(2)},\"%Y\":function(date){return date.tm_year+1900},\"%z\":function(date){var off=date.tm_gmtoff;var ahead=off>=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?\"+\":\"-\")+String(\"0000\"+off).slice(-4)},\"%Z\":function(date){return date.tm_zone},\"%%\":function(){return\"%\"}};for(var rule in EXPANSION_RULES_2){if(pattern.includes(rule)){pattern=pattern.replace(new RegExp(rule,\"g\"),EXPANSION_RULES_2[rule](date))}}var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1}function _strftime_l(s,maxsize,format,tm){return _strftime(s,maxsize,format,tm)}Module[\"requestFullscreen\"]=function Module_requestFullscreen(lockPointer,resizeCanvas){Browser.requestFullscreen(lockPointer,resizeCanvas)};Module[\"requestFullScreen\"]=function Module_requestFullScreen(){Browser.requestFullScreen()};Module[\"requestAnimationFrame\"]=function Module_requestAnimationFrame(func){Browser.requestAnimationFrame(func)};Module[\"setCanvasSize\"]=function Module_setCanvasSize(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates)};Module[\"pauseMainLoop\"]=function Module_pauseMainLoop(){Browser.mainLoop.pause()};Module[\"resumeMainLoop\"]=function Module_resumeMainLoop(){Browser.mainLoop.resume()};Module[\"getUserMedia\"]=function Module_getUserMedia(){Browser.getUserMedia()};Module[\"createContext\"]=function Module_createContext(canvas,useWebGL,setInModule,webGLContextAttributes){return Browser.createContext(canvas,useWebGL,setInModule,webGLContextAttributes)};var FSNode=function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev};var readMode=292|73;var writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}});FS.FSNode=FSNode;FS.staticInit();Module[\"FS_createPath\"]=FS.createPath;Module[\"FS_createDataFile\"]=FS.createDataFile;Module[\"FS_createPreloadedFile\"]=FS.createPreloadedFile;Module[\"FS_createLazyFile\"]=FS.createLazyFile;Module[\"FS_createDevice\"]=FS.createDevice;Module[\"FS_unlink\"]=FS.unlink;init_emval();PureVirtualError=Module[\"PureVirtualError\"]=extendError(Error,\"PureVirtualError\");embind_init_charCodes();init_embind();BindingError=Module[\"BindingError\"]=extendError(Error,\"BindingError\");InternalError=Module[\"InternalError\"]=extendError(Error,\"InternalError\");init_ClassHandle();init_RegisteredPointer();UnboundTypeError=Module[\"UnboundTypeError\"]=extendError(Error,\"UnboundTypeError\");var GLctx;for(var i=0;i<32;++i)tempFixedLengthArray.push(new Array(i));var miniTempWebGLFloatBuffersStorage=new Float32Array(288);for(var i=0;i<288;++i){miniTempWebGLFloatBuffers[i]=miniTempWebGLFloatBuffersStorage.subarray(0,i+1)}var __miniTempWebGLIntBuffersStorage=new Int32Array(288);for(var i=0;i<288;++i){__miniTempWebGLIntBuffers[i]=__miniTempWebGLIntBuffersStorage.subarray(0,i+1)}var ASSERTIONS=true;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 decodeBase64=typeof atob===\"function\"?atob:function(input){var keyStr=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";var output=\"\";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\\+\\/\\=]/g,\"\");do{enc1=keyStr.indexOf(input.charAt(i++));enc2=keyStr.indexOf(input.charAt(i++));enc3=keyStr.indexOf(input.charAt(i++));enc4=keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2)}if(enc4!==64){output=output+String.fromCharCode(chr3)}}while(i<input.length);return output};function intArrayFromBase64(s){if(typeof ENVIRONMENT_IS_NODE===\"boolean\"&&ENVIRONMENT_IS_NODE){var buf=Buffer.from(s,\"base64\");return new Uint8Array(buf[\"buffer\"],buf[\"byteOffset\"],buf[\"byteLength\"])}try{var decoded=decodeBase64(s);var bytes=new Uint8Array(decoded.length);for(var i=0;i<decoded.length;++i){bytes[i]=decoded.charCodeAt(i)}return bytes}catch(_){throw new Error(\"Converting base64 string to bytes failed.\")}}var asmLibraryArg={\"HaveOffsetConverter\":HaveOffsetConverter,\"__cxa_allocate_exception\":___cxa_allocate_exception,\"__cxa_atexit\":___cxa_atexit,\"__cxa_begin_catch\":___cxa_begin_catch,\"__cxa_end_catch\":___cxa_end_catch,\"__cxa_find_matching_catch_2\":___cxa_find_matching_catch_2,\"__cxa_find_matching_catch_3\":___cxa_find_matching_catch_3,\"__cxa_free_exception\":___cxa_free_exception,\"__cxa_rethrow\":___cxa_rethrow,\"__cxa_thread_atexit\":___cxa_thread_atexit,\"__cxa_throw\":___cxa_throw,\"__resumeException\":___resumeException,\"__sys_fcntl64\":___sys_fcntl64,\"__sys_ioctl\":___sys_ioctl,\"__sys_mmap2\":___sys_mmap2,\"__sys_open\":___sys_open,\"__sys_stat64\":___sys_stat64,\"_embind_create_inheriting_constructor\":__embind_create_inheriting_constructor,\"_embind_finalize_value_object\":__embind_finalize_value_object,\"_embind_register_bigint\":__embind_register_bigint,\"_embind_register_bool\":__embind_register_bool,\"_embind_register_class\":__embind_register_class,\"_embind_register_class_class_function\":__embind_register_class_class_function,\"_embind_register_class_constructor\":__embind_register_class_constructor,\"_embind_register_class_function\":__embind_register_class_function,\"_embind_register_class_property\":__embind_register_class_property,\"_embind_register_emval\":__embind_register_emval,\"_embind_register_float\":__embind_register_float,\"_embind_register_function\":__embind_register_function,\"_embind_register_integer\":__embind_register_integer,\"_embind_register_memory_view\":__embind_register_memory_view,\"_embind_register_std_string\":__embind_register_std_string,\"_embind_register_std_wstring\":__embind_register_std_wstring,\"_embind_register_value_object\":__embind_register_value_object,\"_embind_register_value_object_field\":__embind_register_value_object_field,\"_embind_register_void\":__embind_register_void,\"_emval_call_void_method\":__emval_call_void_method,\"_emval_decref\":__emval_decref,\"_emval_get_method_caller\":__emval_get_method_caller,\"_emval_incref\":__emval_incref,\"_emval_take_value\":__emval_take_value,\"abort\":_abort,\"clock_gettime\":_clock_gettime,\"dlopen\":_dlopen,\"dlsym\":_dlsym,\"emscripten_asm_const_int\":_emscripten_asm_const_int,\"emscripten_get_heap_max\":_emscripten_get_heap_max,\"emscripten_memcpy_big\":_emscripten_memcpy_big,\"emscripten_pc_get_function\":_emscripten_pc_get_function,\"emscripten_resize_heap\":_emscripten_resize_heap,\"emscripten_stack_snapshot\":_emscripten_stack_snapshot,\"emscripten_stack_unwind_buffer\":_emscripten_stack_unwind_buffer,\"emscripten_thread_sleep\":_emscripten_thread_sleep,\"emscripten_webgl_create_context\":_emscripten_webgl_create_context,\"emscripten_webgl_destroy_context\":_emscripten_webgl_destroy_context,\"emscripten_webgl_get_context_attributes\":_emscripten_webgl_get_context_attributes,\"emscripten_webgl_get_current_context\":_emscripten_webgl_get_current_context,\"emscripten_webgl_init_context_attributes\":_emscripten_webgl_init_context_attributes,\"emscripten_webgl_make_context_current\":_emscripten_webgl_make_context_current,\"environ_get\":_environ_get,\"environ_sizes_get\":_environ_sizes_get,\"exit\":_exit,\"fd_close\":_fd_close,\"fd_read\":_fd_read,\"fd_seek\":_fd_seek,\"fd_write\":_fd_write,\"getTempRet0\":_getTempRet0,\"getentropy\":_getentropy,\"glActiveTexture\":_glActiveTexture,\"glAttachShader\":_glAttachShader,\"glBindAttribLocation\":_glBindAttribLocation,\"glBindBuffer\":_glBindBuffer,\"glBindBufferBase\":_glBindBufferBase,\"glBindFramebuffer\":_glBindFramebuffer,\"glBindTexture\":_glBindTexture,\"glBindVertexArray\":_glBindVertexArray,\"glBufferData\":_glBufferData,\"glClientWaitSync\":_glClientWaitSync,\"glCompileShader\":_glCompileShader,\"glCreateProgram\":_glCreateProgram,\"glCreateShader\":_glCreateShader,\"glDeleteBuffers\":_glDeleteBuffers,\"glDeleteFramebuffers\":_glDeleteFramebuffers,\"glDeleteProgram\":_glDeleteProgram,\"glDeleteShader\":_glDeleteShader,\"glDeleteSync\":_glDeleteSync,\"glDeleteTextures\":_glDeleteTextures,\"glDeleteVertexArrays\":_glDeleteVertexArrays,\"glDisable\":_glDisable,\"glDisableVertexAttribArray\":_glDisableVertexAttribArray,\"glDrawArrays\":_glDrawArrays,\"glDrawBuffers\":_glDrawBuffers,\"glEnableVertexAttribArray\":_glEnableVertexAttribArray,\"glFenceSync\":_glFenceSync,\"glFinish\":_glFinish,\"glFlush\":_glFlush,\"glFramebufferTexture2D\":_glFramebufferTexture2D,\"glFramebufferTextureLayer\":_glFramebufferTextureLayer,\"glGenBuffers\":_glGenBuffers,\"glGenFramebuffers\":_glGenFramebuffers,\"glGenTextures\":_glGenTextures,\"glGenVertexArrays\":_glGenVertexArrays,\"glGetAttribLocation\":_glGetAttribLocation,\"glGetError\":_glGetError,\"glGetIntegerv\":_glGetIntegerv,\"glGetString\":_glGetString,\"glGetUniformBlockIndex\":_glGetUniformBlockIndex,\"glGetUniformLocation\":_glGetUniformLocation,\"glLinkProgram\":_glLinkProgram,\"glPixelStorei\":_glPixelStorei,\"glReadPixels\":_glReadPixels,\"glShaderSource\":_glShaderSource,\"glTexImage2D\":_glTexImage2D,\"glTexParameterfv\":_glTexParameterfv,\"glTexParameteri\":_glTexParameteri,\"glTexStorage2D\":_glTexStorage2D,\"glTexStorage3D\":_glTexStorage3D,\"glTexSubImage2D\":_glTexSubImage2D,\"glTexSubImage3D\":_glTexSubImage3D,\"glUniform1f\":_glUniform1f,\"glUniform1i\":_glUniform1i,\"glUniform2fv\":_glUniform2fv,\"glUniform4fv\":_glUniform4fv,\"glUniform4iv\":_glUniform4iv,\"glUniformBlockBinding\":_glUniformBlockBinding,\"glUniformMatrix4fv\":_glUniformMatrix4fv,\"glUseProgram\":_glUseProgram,\"glVertexAttribPointer\":_glVertexAttribPointer,\"glViewport\":_glViewport,\"gmtime_r\":_gmtime_r,\"invoke_diii\":invoke_diii,\"invoke_i\":invoke_i,\"invoke_ii\":invoke_ii,\"invoke_iii\":invoke_iii,\"invoke_iiii\":invoke_iiii,\"invoke_iiiii\":invoke_iiiii,\"invoke_iiiiii\":invoke_iiiiii,\"invoke_iiiiiii\":invoke_iiiiiii,\"invoke_iiiiiiiddi\":invoke_iiiiiiiddi,\"invoke_iiiiiiii\":invoke_iiiiiiii,\"invoke_iiiiiiiii\":invoke_iiiiiiiii,\"invoke_v\":invoke_v,\"invoke_vdiii\":invoke_vdiii,\"invoke_vi\":invoke_vi,\"invoke_vididdii\":invoke_vididdii,\"invoke_vidii\":invoke_vidii,\"invoke_vii\":invoke_vii,\"invoke_viid\":invoke_viid,\"invoke_viidi\":invoke_viidi,\"invoke_viididii\":invoke_viididii,\"invoke_viii\":invoke_viii,\"invoke_viiid\":invoke_viiid,\"invoke_viiidd\":invoke_viiidd,\"invoke_viiiddi\":invoke_viiiddi,\"invoke_viiidi\":invoke_viiidi,\"invoke_viiii\":invoke_viiii,\"invoke_viiiid\":invoke_viiiid,\"invoke_viiiidi\":invoke_viiiidi,\"invoke_viiiidid\":invoke_viiiidid,\"invoke_viiiidiidiiiiiii\":invoke_viiiidiidiiiiiii,\"invoke_viiiifiifiiiiiii\":invoke_viiiifiifiiiiiii,\"invoke_viiiii\":invoke_viiiii,\"invoke_viiiiid\":invoke_viiiiid,\"invoke_viiiiif\":invoke_viiiiif,\"invoke_viiiiii\":invoke_viiiiii,\"invoke_viiiiiid\":invoke_viiiiiid,\"invoke_viiiiiif\":invoke_viiiiiif,\"invoke_viiiiiii\":invoke_viiiiiii,\"invoke_viiiiiiiddi\":invoke_viiiiiiiddi,\"invoke_viiiiiiidiiii\":invoke_viiiiiiidiiii,\"invoke_viiiiiiifiiii\":invoke_viiiiiiifiiii,\"invoke_viiiiiiii\":invoke_viiiiiiii,\"invoke_viiiiiiiidd\":invoke_viiiiiiiidd,\"invoke_viiiiiiiidf\":invoke_viiiiiiiidf,\"invoke_viiiiiiiii\":invoke_viiiiiiiii,\"invoke_viiiiiiiiii\":invoke_viiiiiiiiii,\"invoke_viiiiiiiiiiddi\":invoke_viiiiiiiiiiddi,\"invoke_viiiiiiiiiii\":invoke_viiiiiiiiiii,\"invoke_viiiiiiiiiiii\":invoke_viiiiiiiiiiii,\"invoke_viiiiiiiiiiiii\":invoke_viiiiiiiiiiiii,\"llvm_eh_typeid_for\":_llvm_eh_typeid_for,\"localtime_r\":_localtime_r,\"mktime\":_mktime,\"proc_exit\":_proc_exit,\"setTempRet0\":_setTempRet0,\"strftime\":_strftime,\"strftime_l\":_strftime_l};var asm=createWasm();var ___wasm_call_ctors=Module[\"___wasm_call_ctors\"]=createExportWrapper(\"__wasm_call_ctors\");var _free=Module[\"_free\"]=createExportWrapper(\"free\");var _malloc=Module[\"_malloc\"]=createExportWrapper(\"malloc\");var _fflush=Module[\"_fflush\"]=createExportWrapper(\"fflush\");var ___errno_location=Module[\"___errno_location\"]=createExportWrapper(\"__errno_location\");var ___getTypeName=Module[\"___getTypeName\"]=createExportWrapper(\"__getTypeName\");var ___embind_register_native_and_builtin_types=Module[\"___embind_register_native_and_builtin_types\"]=createExportWrapper(\"__embind_register_native_and_builtin_types\");var _emscripten_main_thread_process_queued_calls=Module[\"_emscripten_main_thread_process_queued_calls\"]=createExportWrapper(\"emscripten_main_thread_process_queued_calls\");var _emscripten_stack_get_end=Module[\"_emscripten_stack_get_end\"]=function(){return(_emscripten_stack_get_end=Module[\"_emscripten_stack_get_end\"]=Module[\"asm\"][\"emscripten_stack_get_end\"]).apply(null,arguments)};var __get_tzname=Module[\"__get_tzname\"]=createExportWrapper(\"_get_tzname\");var __get_daylight=Module[\"__get_daylight\"]=createExportWrapper(\"_get_daylight\");var __get_timezone=Module[\"__get_timezone\"]=createExportWrapper(\"_get_timezone\");var stackSave=Module[\"stackSave\"]=createExportWrapper(\"stackSave\");var stackRestore=Module[\"stackRestore\"]=createExportWrapper(\"stackRestore\");var stackAlloc=Module[\"stackAlloc\"]=createExportWrapper(\"stackAlloc\");var _emscripten_stack_init=Module[\"_emscripten_stack_init\"]=function(){return(_emscripten_stack_init=Module[\"_emscripten_stack_init\"]=Module[\"asm\"][\"emscripten_stack_init\"]).apply(null,arguments)};var _emscripten_stack_get_free=Module[\"_emscripten_stack_get_free\"]=function(){return(_emscripten_stack_get_free=Module[\"_emscripten_stack_get_free\"]=Module[\"asm\"][\"emscripten_stack_get_free\"]).apply(null,arguments)};var _saveSetjmp=Module[\"_saveSetjmp\"]=createExportWrapper(\"saveSetjmp\");var _setThrew=Module[\"_setThrew\"]=createExportWrapper(\"setThrew\");var ___cxa_can_catch=Module[\"___cxa_can_catch\"]=createExportWrapper(\"__cxa_can_catch\");var ___cxa_is_pointer_type=Module[\"___cxa_is_pointer_type\"]=createExportWrapper(\"__cxa_is_pointer_type\");var _memalign=Module[\"_memalign\"]=createExportWrapper(\"memalign\");var _emscripten_builtin_malloc=Module[\"_emscripten_builtin_malloc\"]=createExportWrapper(\"emscripten_builtin_malloc\");var _emscripten_builtin_free=Module[\"_emscripten_builtin_free\"]=createExportWrapper(\"emscripten_builtin_free\");var _emscripten_builtin_memalign=Module[\"_emscripten_builtin_memalign\"]=createExportWrapper(\"emscripten_builtin_memalign\");var dynCall_jii=Module[\"dynCall_jii\"]=createExportWrapper(\"dynCall_jii\");var dynCall_viji=Module[\"dynCall_viji\"]=createExportWrapper(\"dynCall_viji\");var dynCall_jjj=Module[\"dynCall_jjj\"]=createExportWrapper(\"dynCall_jjj\");var dynCall_iiiijj=Module[\"dynCall_iiiijj\"]=createExportWrapper(\"dynCall_iiiijj\");var dynCall_viijj=Module[\"dynCall_viijj\"]=createExportWrapper(\"dynCall_viijj\");var dynCall_viiijjjj=Module[\"dynCall_viiijjjj\"]=createExportWrapper(\"dynCall_viiijjjj\");var dynCall_ji=Module[\"dynCall_ji\"]=createExportWrapper(\"dynCall_ji\");var dynCall_vij=Module[\"dynCall_vij\"]=createExportWrapper(\"dynCall_vij\");var dynCall_viijii=Module[\"dynCall_viijii\"]=createExportWrapper(\"dynCall_viijii\");var dynCall_vj=Module[\"dynCall_vj\"]=createExportWrapper(\"dynCall_vj\");var dynCall_viij=Module[\"dynCall_viij\"]=createExportWrapper(\"dynCall_viij\");var dynCall_viiiiij=Module[\"dynCall_viiiiij\"]=createExportWrapper(\"dynCall_viiiiij\");var dynCall_iijjiiii=Module[\"dynCall_iijjiiii\"]=createExportWrapper(\"dynCall_iijjiiii\");var dynCall_jiji=Module[\"dynCall_jiji\"]=createExportWrapper(\"dynCall_jiji\");var dynCall_iiiiij=Module[\"dynCall_iiiiij\"]=createExportWrapper(\"dynCall_iiiiij\");var dynCall_iiiiijj=Module[\"dynCall_iiiiijj\"]=createExportWrapper(\"dynCall_iiiiijj\");var dynCall_iiiiiijj=Module[\"dynCall_iiiiiijj\"]=createExportWrapper(\"dynCall_iiiiiijj\");function invoke_viid(index,a1,a2,a3){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_vi(index,a1){var sp=stackSave();try{wasmTable.get(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iii(index,a1,a2){var sp=stackSave();try{return wasmTable.get(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_v(index){var sp=stackSave();try{wasmTable.get(index)()}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_vii(index,a1,a2){var sp=stackSave();try{wasmTable.get(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_ii(index,a1){var sp=stackSave();try{return wasmTable.get(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viii(index,a1,a2,a3){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiii(index,a1,a2,a3,a4){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiii(index,a1,a2,a3,a4){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiidd(index,a1,a2,a3,a4,a5){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiiiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_diii(index,a1,a2,a3){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiii(index,a1,a2,a3){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_i(index){var sp=stackSave();try{return wasmTable.get(index)()}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiidi(index,a1,a2,a3,a4,a5){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiidi(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viididii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiidf(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiidd(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiid(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiid(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiidiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiif(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiif(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiifiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiifiifiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiidiidiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_vididdii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiid(index,a1,a2,a3,a4){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_vidii(index,a1,a2,a3,a4){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiiddi(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiddi(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiiiiiddi(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiddi(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiid(index,a1,a2,a3,a4,a5){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiidid(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viidi(index,a1,a2,a3,a4){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_vdiii(index,a1,a2,a3,a4){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}if(!Object.getOwnPropertyDescriptor(Module,\"intArrayFromString\"))Module[\"intArrayFromString\"]=function(){abort(\"'intArrayFromString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"intArrayToString\"))Module[\"intArrayToString\"]=function(){abort(\"'intArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ccall\"))Module[\"ccall\"]=function(){abort(\"'ccall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"cwrap\"))Module[\"cwrap\"]=function(){abort(\"'cwrap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setValue\"))Module[\"setValue\"]=function(){abort(\"'setValue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getValue\"))Module[\"getValue\"]=function(){abort(\"'getValue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"allocate\"))Module[\"allocate\"]=function(){abort(\"'allocate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UTF8ArrayToString\"))Module[\"UTF8ArrayToString\"]=function(){abort(\"'UTF8ArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UTF8ToString\"))Module[\"UTF8ToString\"]=function(){abort(\"'UTF8ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToUTF8Array\"))Module[\"stringToUTF8Array\"]=function(){abort(\"'stringToUTF8Array' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToUTF8\"))Module[\"stringToUTF8\"]=function(){abort(\"'stringToUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"lengthBytesUTF8\"))Module[\"lengthBytesUTF8\"]=function(){abort(\"'lengthBytesUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stackTrace\"))Module[\"stackTrace\"]=function(){abort(\"'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addOnPreRun\"))Module[\"addOnPreRun\"]=function(){abort(\"'addOnPreRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addOnInit\"))Module[\"addOnInit\"]=function(){abort(\"'addOnInit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addOnPreMain\"))Module[\"addOnPreMain\"]=function(){abort(\"'addOnPreMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addOnExit\"))Module[\"addOnExit\"]=function(){abort(\"'addOnExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addOnPostRun\"))Module[\"addOnPostRun\"]=function(){abort(\"'addOnPostRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeStringToMemory\"))Module[\"writeStringToMemory\"]=function(){abort(\"'writeStringToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeArrayToMemory\"))Module[\"writeArrayToMemory\"]=function(){abort(\"'writeArrayToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeAsciiToMemory\"))Module[\"writeAsciiToMemory\"]=function(){abort(\"'writeAsciiToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};Module[\"addRunDependency\"]=addRunDependency;Module[\"removeRunDependency\"]=removeRunDependency;if(!Object.getOwnPropertyDescriptor(Module,\"FS_createFolder\"))Module[\"FS_createFolder\"]=function(){abort(\"'FS_createFolder' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};Module[\"FS_createPath\"]=FS.createPath;Module[\"FS_createDataFile\"]=FS.createDataFile;Module[\"FS_createPreloadedFile\"]=FS.createPreloadedFile;Module[\"FS_createLazyFile\"]=FS.createLazyFile;if(!Object.getOwnPropertyDescriptor(Module,\"FS_createLink\"))Module[\"FS_createLink\"]=function(){abort(\"'FS_createLink' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};Module[\"FS_createDevice\"]=FS.createDevice;Module[\"FS_unlink\"]=FS.unlink;if(!Object.getOwnPropertyDescriptor(Module,\"getLEB\"))Module[\"getLEB\"]=function(){abort(\"'getLEB' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getFunctionTables\"))Module[\"getFunctionTables\"]=function(){abort(\"'getFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"alignFunctionTables\"))Module[\"alignFunctionTables\"]=function(){abort(\"'alignFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerFunctions\"))Module[\"registerFunctions\"]=function(){abort(\"'registerFunctions' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addFunction\"))Module[\"addFunction\"]=function(){abort(\"'addFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"removeFunction\"))Module[\"removeFunction\"]=function(){abort(\"'removeFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getFuncWrapper\"))Module[\"getFuncWrapper\"]=function(){abort(\"'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"prettyPrint\"))Module[\"prettyPrint\"]=function(){abort(\"'prettyPrint' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"dynCall\"))Module[\"dynCall\"]=function(){abort(\"'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getCompilerSetting\"))Module[\"getCompilerSetting\"]=function(){abort(\"'getCompilerSetting' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"print\"))Module[\"print\"]=function(){abort(\"'print' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"printErr\"))Module[\"printErr\"]=function(){abort(\"'printErr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getTempRet0\"))Module[\"getTempRet0\"]=function(){abort(\"'getTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setTempRet0\"))Module[\"setTempRet0\"]=function(){abort(\"'setTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"callMain\"))Module[\"callMain\"]=function(){abort(\"'callMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"abort\"))Module[\"abort\"]=function(){abort(\"'abort' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"keepRuntimeAlive\"))Module[\"keepRuntimeAlive\"]=function(){abort(\"'keepRuntimeAlive' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"zeroMemory\"))Module[\"zeroMemory\"]=function(){abort(\"'zeroMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToNewUTF8\"))Module[\"stringToNewUTF8\"]=function(){abort(\"'stringToNewUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setFileTime\"))Module[\"setFileTime\"]=function(){abort(\"'setFileTime' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscripten_realloc_buffer\"))Module[\"emscripten_realloc_buffer\"]=function(){abort(\"'emscripten_realloc_buffer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ENV\"))Module[\"ENV\"]=function(){abort(\"'ENV' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ERRNO_CODES\"))Module[\"ERRNO_CODES\"]=function(){abort(\"'ERRNO_CODES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ERRNO_MESSAGES\"))Module[\"ERRNO_MESSAGES\"]=function(){abort(\"'ERRNO_MESSAGES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setErrNo\"))Module[\"setErrNo\"]=function(){abort(\"'setErrNo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"inetPton4\"))Module[\"inetPton4\"]=function(){abort(\"'inetPton4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"inetNtop4\"))Module[\"inetNtop4\"]=function(){abort(\"'inetNtop4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"inetPton6\"))Module[\"inetPton6\"]=function(){abort(\"'inetPton6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"inetNtop6\"))Module[\"inetNtop6\"]=function(){abort(\"'inetNtop6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readSockaddr\"))Module[\"readSockaddr\"]=function(){abort(\"'readSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeSockaddr\"))Module[\"writeSockaddr\"]=function(){abort(\"'writeSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"DNS\"))Module[\"DNS\"]=function(){abort(\"'DNS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getHostByName\"))Module[\"getHostByName\"]=function(){abort(\"'getHostByName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"GAI_ERRNO_MESSAGES\"))Module[\"GAI_ERRNO_MESSAGES\"]=function(){abort(\"'GAI_ERRNO_MESSAGES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"Protocols\"))Module[\"Protocols\"]=function(){abort(\"'Protocols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"Sockets\"))Module[\"Sockets\"]=function(){abort(\"'Sockets' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getRandomDevice\"))Module[\"getRandomDevice\"]=function(){abort(\"'getRandomDevice' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"traverseStack\"))Module[\"traverseStack\"]=function(){abort(\"'traverseStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UNWIND_CACHE\"))Module[\"UNWIND_CACHE\"]=function(){abort(\"'UNWIND_CACHE' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"withBuiltinMalloc\"))Module[\"withBuiltinMalloc\"]=function(){abort(\"'withBuiltinMalloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readAsmConstArgsArray\"))Module[\"readAsmConstArgsArray\"]=function(){abort(\"'readAsmConstArgsArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readAsmConstArgs\"))Module[\"readAsmConstArgs\"]=function(){abort(\"'readAsmConstArgs' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"mainThreadEM_ASM\"))Module[\"mainThreadEM_ASM\"]=function(){abort(\"'mainThreadEM_ASM' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"jstoi_q\"))Module[\"jstoi_q\"]=function(){abort(\"'jstoi_q' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"jstoi_s\"))Module[\"jstoi_s\"]=function(){abort(\"'jstoi_s' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getExecutableName\"))Module[\"getExecutableName\"]=function(){abort(\"'getExecutableName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"listenOnce\"))Module[\"listenOnce\"]=function(){abort(\"'listenOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"autoResumeAudioContext\"))Module[\"autoResumeAudioContext\"]=function(){abort(\"'autoResumeAudioContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"dynCallLegacy\"))Module[\"dynCallLegacy\"]=function(){abort(\"'dynCallLegacy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getDynCaller\"))Module[\"getDynCaller\"]=function(){abort(\"'getDynCaller' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"dynCall\"))Module[\"dynCall\"]=function(){abort(\"'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"callRuntimeCallbacks\"))Module[\"callRuntimeCallbacks\"]=function(){abort(\"'callRuntimeCallbacks' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"runtimeKeepalivePush\"))Module[\"runtimeKeepalivePush\"]=function(){abort(\"'runtimeKeepalivePush' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"runtimeKeepalivePop\"))Module[\"runtimeKeepalivePop\"]=function(){abort(\"'runtimeKeepalivePop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"callUserCallback\"))Module[\"callUserCallback\"]=function(){abort(\"'callUserCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"maybeExit\"))Module[\"maybeExit\"]=function(){abort(\"'maybeExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"safeSetTimeout\"))Module[\"safeSetTimeout\"]=function(){abort(\"'safeSetTimeout' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"asmjsMangle\"))Module[\"asmjsMangle\"]=function(){abort(\"'asmjsMangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"asyncLoad\"))Module[\"asyncLoad\"]=function(){abort(\"'asyncLoad' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"alignMemory\"))Module[\"alignMemory\"]=function(){abort(\"'alignMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"mmapAlloc\"))Module[\"mmapAlloc\"]=function(){abort(\"'mmapAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"reallyNegative\"))Module[\"reallyNegative\"]=function(){abort(\"'reallyNegative' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"unSign\"))Module[\"unSign\"]=function(){abort(\"'unSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"reSign\"))Module[\"reSign\"]=function(){abort(\"'reSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"formatString\"))Module[\"formatString\"]=function(){abort(\"'formatString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"PATH\"))Module[\"PATH\"]=function(){abort(\"'PATH' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"PATH_FS\"))Module[\"PATH_FS\"]=function(){abort(\"'PATH_FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SYSCALLS\"))Module[\"SYSCALLS\"]=function(){abort(\"'SYSCALLS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"syscallMmap2\"))Module[\"syscallMmap2\"]=function(){abort(\"'syscallMmap2' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"syscallMunmap\"))Module[\"syscallMunmap\"]=function(){abort(\"'syscallMunmap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getSocketFromFD\"))Module[\"getSocketFromFD\"]=function(){abort(\"'getSocketFromFD' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getSocketAddress\"))Module[\"getSocketAddress\"]=function(){abort(\"'getSocketAddress' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"JSEvents\"))Module[\"JSEvents\"]=function(){abort(\"'JSEvents' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerKeyEventCallback\"))Module[\"registerKeyEventCallback\"]=function(){abort(\"'registerKeyEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"specialHTMLTargets\"))Module[\"specialHTMLTargets\"]=function(){abort(\"'specialHTMLTargets' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"findEventTarget\"))Module[\"findEventTarget\"]=function(){abort(\"'findEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"findCanvasEventTarget\"))Module[\"findCanvasEventTarget\"]=function(){abort(\"'findCanvasEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getBoundingClientRect\"))Module[\"getBoundingClientRect\"]=function(){abort(\"'getBoundingClientRect' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillMouseEventData\"))Module[\"fillMouseEventData\"]=function(){abort(\"'fillMouseEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerMouseEventCallback\"))Module[\"registerMouseEventCallback\"]=function(){abort(\"'registerMouseEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerWheelEventCallback\"))Module[\"registerWheelEventCallback\"]=function(){abort(\"'registerWheelEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerUiEventCallback\"))Module[\"registerUiEventCallback\"]=function(){abort(\"'registerUiEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerFocusEventCallback\"))Module[\"registerFocusEventCallback\"]=function(){abort(\"'registerFocusEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillDeviceOrientationEventData\"))Module[\"fillDeviceOrientationEventData\"]=function(){abort(\"'fillDeviceOrientationEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerDeviceOrientationEventCallback\"))Module[\"registerDeviceOrientationEventCallback\"]=function(){abort(\"'registerDeviceOrientationEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillDeviceMotionEventData\"))Module[\"fillDeviceMotionEventData\"]=function(){abort(\"'fillDeviceMotionEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerDeviceMotionEventCallback\"))Module[\"registerDeviceMotionEventCallback\"]=function(){abort(\"'registerDeviceMotionEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"screenOrientation\"))Module[\"screenOrientation\"]=function(){abort(\"'screenOrientation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillOrientationChangeEventData\"))Module[\"fillOrientationChangeEventData\"]=function(){abort(\"'fillOrientationChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerOrientationChangeEventCallback\"))Module[\"registerOrientationChangeEventCallback\"]=function(){abort(\"'registerOrientationChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillFullscreenChangeEventData\"))Module[\"fillFullscreenChangeEventData\"]=function(){abort(\"'fillFullscreenChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerFullscreenChangeEventCallback\"))Module[\"registerFullscreenChangeEventCallback\"]=function(){abort(\"'registerFullscreenChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerRestoreOldStyle\"))Module[\"registerRestoreOldStyle\"]=function(){abort(\"'registerRestoreOldStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"hideEverythingExceptGivenElement\"))Module[\"hideEverythingExceptGivenElement\"]=function(){abort(\"'hideEverythingExceptGivenElement' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"restoreHiddenElements\"))Module[\"restoreHiddenElements\"]=function(){abort(\"'restoreHiddenElements' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setLetterbox\"))Module[\"setLetterbox\"]=function(){abort(\"'setLetterbox' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"currentFullscreenStrategy\"))Module[\"currentFullscreenStrategy\"]=function(){abort(\"'currentFullscreenStrategy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"restoreOldWindowedStyle\"))Module[\"restoreOldWindowedStyle\"]=function(){abort(\"'restoreOldWindowedStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"softFullscreenResizeWebGLRenderTarget\"))Module[\"softFullscreenResizeWebGLRenderTarget\"]=function(){abort(\"'softFullscreenResizeWebGLRenderTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"doRequestFullscreen\"))Module[\"doRequestFullscreen\"]=function(){abort(\"'doRequestFullscreen' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillPointerlockChangeEventData\"))Module[\"fillPointerlockChangeEventData\"]=function(){abort(\"'fillPointerlockChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerPointerlockChangeEventCallback\"))Module[\"registerPointerlockChangeEventCallback\"]=function(){abort(\"'registerPointerlockChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerPointerlockErrorEventCallback\"))Module[\"registerPointerlockErrorEventCallback\"]=function(){abort(\"'registerPointerlockErrorEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"requestPointerLock\"))Module[\"requestPointerLock\"]=function(){abort(\"'requestPointerLock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillVisibilityChangeEventData\"))Module[\"fillVisibilityChangeEventData\"]=function(){abort(\"'fillVisibilityChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerVisibilityChangeEventCallback\"))Module[\"registerVisibilityChangeEventCallback\"]=function(){abort(\"'registerVisibilityChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerTouchEventCallback\"))Module[\"registerTouchEventCallback\"]=function(){abort(\"'registerTouchEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillGamepadEventData\"))Module[\"fillGamepadEventData\"]=function(){abort(\"'fillGamepadEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerGamepadEventCallback\"))Module[\"registerGamepadEventCallback\"]=function(){abort(\"'registerGamepadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerBeforeUnloadEventCallback\"))Module[\"registerBeforeUnloadEventCallback\"]=function(){abort(\"'registerBeforeUnloadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillBatteryEventData\"))Module[\"fillBatteryEventData\"]=function(){abort(\"'fillBatteryEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"battery\"))Module[\"battery\"]=function(){abort(\"'battery' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerBatteryEventCallback\"))Module[\"registerBatteryEventCallback\"]=function(){abort(\"'registerBatteryEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setCanvasElementSize\"))Module[\"setCanvasElementSize\"]=function(){abort(\"'setCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getCanvasElementSize\"))Module[\"getCanvasElementSize\"]=function(){abort(\"'getCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"polyfillSetImmediate\"))Module[\"polyfillSetImmediate\"]=function(){abort(\"'polyfillSetImmediate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"demangle\"))Module[\"demangle\"]=function(){abort(\"'demangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"demangleAll\"))Module[\"demangleAll\"]=function(){abort(\"'demangleAll' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"jsStackTrace\"))Module[\"jsStackTrace\"]=function(){abort(\"'jsStackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stackTrace\"))Module[\"stackTrace\"]=function(){abort(\"'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getEnvStrings\"))Module[\"getEnvStrings\"]=function(){abort(\"'getEnvStrings' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"checkWasiClock\"))Module[\"checkWasiClock\"]=function(){abort(\"'checkWasiClock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeI53ToI64\"))Module[\"writeI53ToI64\"]=function(){abort(\"'writeI53ToI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeI53ToI64Clamped\"))Module[\"writeI53ToI64Clamped\"]=function(){abort(\"'writeI53ToI64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeI53ToI64Signaling\"))Module[\"writeI53ToI64Signaling\"]=function(){abort(\"'writeI53ToI64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeI53ToU64Clamped\"))Module[\"writeI53ToU64Clamped\"]=function(){abort(\"'writeI53ToU64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeI53ToU64Signaling\"))Module[\"writeI53ToU64Signaling\"]=function(){abort(\"'writeI53ToU64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readI53FromI64\"))Module[\"readI53FromI64\"]=function(){abort(\"'readI53FromI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readI53FromU64\"))Module[\"readI53FromU64\"]=function(){abort(\"'readI53FromU64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"convertI32PairToI53\"))Module[\"convertI32PairToI53\"]=function(){abort(\"'convertI32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"convertU32PairToI53\"))Module[\"convertU32PairToI53\"]=function(){abort(\"'convertU32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"uncaughtExceptionCount\"))Module[\"uncaughtExceptionCount\"]=function(){abort(\"'uncaughtExceptionCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"exceptionLast\"))Module[\"exceptionLast\"]=function(){abort(\"'exceptionLast' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"exceptionCaught\"))Module[\"exceptionCaught\"]=function(){abort(\"'exceptionCaught' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ExceptionInfo\"))Module[\"ExceptionInfo\"]=function(){abort(\"'ExceptionInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"CatchInfo\"))Module[\"CatchInfo\"]=function(){abort(\"'CatchInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"exception_addRef\"))Module[\"exception_addRef\"]=function(){abort(\"'exception_addRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"exception_decRef\"))Module[\"exception_decRef\"]=function(){abort(\"'exception_decRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"Browser\"))Module[\"Browser\"]=function(){abort(\"'Browser' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"funcWrappers\"))Module[\"funcWrappers\"]=function(){abort(\"'funcWrappers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getFuncWrapper\"))Module[\"getFuncWrapper\"]=function(){abort(\"'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setMainLoop\"))Module[\"setMainLoop\"]=function(){abort(\"'setMainLoop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"wget\"))Module[\"wget\"]=function(){abort(\"'wget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"FS\"))Module[\"FS\"]=function(){abort(\"'FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"MEMFS\"))Module[\"MEMFS\"]=function(){abort(\"'MEMFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"TTY\"))Module[\"TTY\"]=function(){abort(\"'TTY' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"PIPEFS\"))Module[\"PIPEFS\"]=function(){abort(\"'PIPEFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SOCKFS\"))Module[\"SOCKFS\"]=function(){abort(\"'SOCKFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"_setNetworkCallback\"))Module[\"_setNetworkCallback\"]=function(){abort(\"'_setNetworkCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"tempFixedLengthArray\"))Module[\"tempFixedLengthArray\"]=function(){abort(\"'tempFixedLengthArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"miniTempWebGLFloatBuffers\"))Module[\"miniTempWebGLFloatBuffers\"]=function(){abort(\"'miniTempWebGLFloatBuffers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"heapObjectForWebGLType\"))Module[\"heapObjectForWebGLType\"]=function(){abort(\"'heapObjectForWebGLType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"heapAccessShiftForWebGLHeap\"))Module[\"heapAccessShiftForWebGLHeap\"]=function(){abort(\"'heapAccessShiftForWebGLHeap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};Module[\"GL\"]=GL;if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGet\"))Module[\"emscriptenWebGLGet\"]=function(){abort(\"'emscriptenWebGLGet' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"computeUnpackAlignedImageSize\"))Module[\"computeUnpackAlignedImageSize\"]=function(){abort(\"'computeUnpackAlignedImageSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGetTexPixelData\"))Module[\"emscriptenWebGLGetTexPixelData\"]=function(){abort(\"'emscriptenWebGLGetTexPixelData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGetUniform\"))Module[\"emscriptenWebGLGetUniform\"]=function(){abort(\"'emscriptenWebGLGetUniform' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"webglGetUniformLocation\"))Module[\"webglGetUniformLocation\"]=function(){abort(\"'webglGetUniformLocation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"webglPrepareUniformLocationsBeforeFirstUse\"))Module[\"webglPrepareUniformLocationsBeforeFirstUse\"]=function(){abort(\"'webglPrepareUniformLocationsBeforeFirstUse' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"webglGetLeftBracePos\"))Module[\"webglGetLeftBracePos\"]=function(){abort(\"'webglGetLeftBracePos' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGetVertexAttrib\"))Module[\"emscriptenWebGLGetVertexAttrib\"]=function(){abort(\"'emscriptenWebGLGetVertexAttrib' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGetBufferBinding\"))Module[\"emscriptenWebGLGetBufferBinding\"]=function(){abort(\"'emscriptenWebGLGetBufferBinding' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLValidateMapBufferTarget\"))Module[\"emscriptenWebGLValidateMapBufferTarget\"]=function(){abort(\"'emscriptenWebGLValidateMapBufferTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeGLArray\"))Module[\"writeGLArray\"]=function(){abort(\"'writeGLArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"AL\"))Module[\"AL\"]=function(){abort(\"'AL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SDL_unicode\"))Module[\"SDL_unicode\"]=function(){abort(\"'SDL_unicode' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SDL_ttfContext\"))Module[\"SDL_ttfContext\"]=function(){abort(\"'SDL_ttfContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SDL_audio\"))Module[\"SDL_audio\"]=function(){abort(\"'SDL_audio' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SDL\"))Module[\"SDL\"]=function(){abort(\"'SDL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SDL_gfx\"))Module[\"SDL_gfx\"]=function(){abort(\"'SDL_gfx' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"GLUT\"))Module[\"GLUT\"]=function(){abort(\"'GLUT' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"EGL\"))Module[\"EGL\"]=function(){abort(\"'EGL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"GLFW_Window\"))Module[\"GLFW_Window\"]=function(){abort(\"'GLFW_Window' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"GLFW\"))Module[\"GLFW\"]=function(){abort(\"'GLFW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"GLEW\"))Module[\"GLEW\"]=function(){abort(\"'GLEW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"IDBStore\"))Module[\"IDBStore\"]=function(){abort(\"'IDBStore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"runAndAbortIfError\"))Module[\"runAndAbortIfError\"]=function(){abort(\"'runAndAbortIfError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_handle_array\"))Module[\"emval_handle_array\"]=function(){abort(\"'emval_handle_array' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_free_list\"))Module[\"emval_free_list\"]=function(){abort(\"'emval_free_list' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_symbols\"))Module[\"emval_symbols\"]=function(){abort(\"'emval_symbols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"init_emval\"))Module[\"init_emval\"]=function(){abort(\"'init_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"count_emval_handles\"))Module[\"count_emval_handles\"]=function(){abort(\"'count_emval_handles' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"get_first_emval\"))Module[\"get_first_emval\"]=function(){abort(\"'get_first_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getStringOrSymbol\"))Module[\"getStringOrSymbol\"]=function(){abort(\"'getStringOrSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"requireHandle\"))Module[\"requireHandle\"]=function(){abort(\"'requireHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_newers\"))Module[\"emval_newers\"]=function(){abort(\"'emval_newers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"craftEmvalAllocator\"))Module[\"craftEmvalAllocator\"]=function(){abort(\"'craftEmvalAllocator' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_get_global\"))Module[\"emval_get_global\"]=function(){abort(\"'emval_get_global' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_methodCallers\"))Module[\"emval_methodCallers\"]=function(){abort(\"'emval_methodCallers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"InternalError\"))Module[\"InternalError\"]=function(){abort(\"'InternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"BindingError\"))Module[\"BindingError\"]=function(){abort(\"'BindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UnboundTypeError\"))Module[\"UnboundTypeError\"]=function(){abort(\"'UnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"PureVirtualError\"))Module[\"PureVirtualError\"]=function(){abort(\"'PureVirtualError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"init_embind\"))Module[\"init_embind\"]=function(){abort(\"'init_embind' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"throwInternalError\"))Module[\"throwInternalError\"]=function(){abort(\"'throwInternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"throwBindingError\"))Module[\"throwBindingError\"]=function(){abort(\"'throwBindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"throwUnboundTypeError\"))Module[\"throwUnboundTypeError\"]=function(){abort(\"'throwUnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ensureOverloadTable\"))Module[\"ensureOverloadTable\"]=function(){abort(\"'ensureOverloadTable' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"exposePublicSymbol\"))Module[\"exposePublicSymbol\"]=function(){abort(\"'exposePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"replacePublicSymbol\"))Module[\"replacePublicSymbol\"]=function(){abort(\"'replacePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"extendError\"))Module[\"extendError\"]=function(){abort(\"'extendError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"createNamedFunction\"))Module[\"createNamedFunction\"]=function(){abort(\"'createNamedFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registeredInstances\"))Module[\"registeredInstances\"]=function(){abort(\"'registeredInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getBasestPointer\"))Module[\"getBasestPointer\"]=function(){abort(\"'getBasestPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerInheritedInstance\"))Module[\"registerInheritedInstance\"]=function(){abort(\"'registerInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"unregisterInheritedInstance\"))Module[\"unregisterInheritedInstance\"]=function(){abort(\"'unregisterInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getInheritedInstance\"))Module[\"getInheritedInstance\"]=function(){abort(\"'getInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getInheritedInstanceCount\"))Module[\"getInheritedInstanceCount\"]=function(){abort(\"'getInheritedInstanceCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getLiveInheritedInstances\"))Module[\"getLiveInheritedInstances\"]=function(){abort(\"'getLiveInheritedInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registeredTypes\"))Module[\"registeredTypes\"]=function(){abort(\"'registeredTypes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"awaitingDependencies\"))Module[\"awaitingDependencies\"]=function(){abort(\"'awaitingDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"typeDependencies\"))Module[\"typeDependencies\"]=function(){abort(\"'typeDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registeredPointers\"))Module[\"registeredPointers\"]=function(){abort(\"'registeredPointers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerType\"))Module[\"registerType\"]=function(){abort(\"'registerType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"whenDependentTypesAreResolved\"))Module[\"whenDependentTypesAreResolved\"]=function(){abort(\"'whenDependentTypesAreResolved' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"embind_charCodes\"))Module[\"embind_charCodes\"]=function(){abort(\"'embind_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"embind_init_charCodes\"))Module[\"embind_init_charCodes\"]=function(){abort(\"'embind_init_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readLatin1String\"))Module[\"readLatin1String\"]=function(){abort(\"'readLatin1String' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getTypeName\"))Module[\"getTypeName\"]=function(){abort(\"'getTypeName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"heap32VectorToArray\"))Module[\"heap32VectorToArray\"]=function(){abort(\"'heap32VectorToArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"requireRegisteredType\"))Module[\"requireRegisteredType\"]=function(){abort(\"'requireRegisteredType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getShiftFromSize\"))Module[\"getShiftFromSize\"]=function(){abort(\"'getShiftFromSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"integerReadValueFromPointer\"))Module[\"integerReadValueFromPointer\"]=function(){abort(\"'integerReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"enumReadValueFromPointer\"))Module[\"enumReadValueFromPointer\"]=function(){abort(\"'enumReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"floatReadValueFromPointer\"))Module[\"floatReadValueFromPointer\"]=function(){abort(\"'floatReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"simpleReadValueFromPointer\"))Module[\"simpleReadValueFromPointer\"]=function(){abort(\"'simpleReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"runDestructors\"))Module[\"runDestructors\"]=function(){abort(\"'runDestructors' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"new_\"))Module[\"new_\"]=function(){abort(\"'new_' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"craftInvokerFunction\"))Module[\"craftInvokerFunction\"]=function(){abort(\"'craftInvokerFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"embind__requireFunction\"))Module[\"embind__requireFunction\"]=function(){abort(\"'embind__requireFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"tupleRegistrations\"))Module[\"tupleRegistrations\"]=function(){abort(\"'tupleRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"structRegistrations\"))Module[\"structRegistrations\"]=function(){abort(\"'structRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"genericPointerToWireType\"))Module[\"genericPointerToWireType\"]=function(){abort(\"'genericPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"constNoSmartPtrRawPointerToWireType\"))Module[\"constNoSmartPtrRawPointerToWireType\"]=function(){abort(\"'constNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"nonConstNoSmartPtrRawPointerToWireType\"))Module[\"nonConstNoSmartPtrRawPointerToWireType\"]=function(){abort(\"'nonConstNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"init_RegisteredPointer\"))Module[\"init_RegisteredPointer\"]=function(){abort(\"'init_RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredPointer\"))Module[\"RegisteredPointer\"]=function(){abort(\"'RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredPointer_getPointee\"))Module[\"RegisteredPointer_getPointee\"]=function(){abort(\"'RegisteredPointer_getPointee' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredPointer_destructor\"))Module[\"RegisteredPointer_destructor\"]=function(){abort(\"'RegisteredPointer_destructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredPointer_deleteObject\"))Module[\"RegisteredPointer_deleteObject\"]=function(){abort(\"'RegisteredPointer_deleteObject' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredPointer_fromWireType\"))Module[\"RegisteredPointer_fromWireType\"]=function(){abort(\"'RegisteredPointer_fromWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"runDestructor\"))Module[\"runDestructor\"]=function(){abort(\"'runDestructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"releaseClassHandle\"))Module[\"releaseClassHandle\"]=function(){abort(\"'releaseClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"finalizationGroup\"))Module[\"finalizationGroup\"]=function(){abort(\"'finalizationGroup' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"detachFinalizer_deps\"))Module[\"detachFinalizer_deps\"]=function(){abort(\"'detachFinalizer_deps' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"detachFinalizer\"))Module[\"detachFinalizer\"]=function(){abort(\"'detachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"attachFinalizer\"))Module[\"attachFinalizer\"]=function(){abort(\"'attachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"makeClassHandle\"))Module[\"makeClassHandle\"]=function(){abort(\"'makeClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"init_ClassHandle\"))Module[\"init_ClassHandle\"]=function(){abort(\"'init_ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle\"))Module[\"ClassHandle\"]=function(){abort(\"'ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle_isAliasOf\"))Module[\"ClassHandle_isAliasOf\"]=function(){abort(\"'ClassHandle_isAliasOf' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"throwInstanceAlreadyDeleted\"))Module[\"throwInstanceAlreadyDeleted\"]=function(){abort(\"'throwInstanceAlreadyDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle_clone\"))Module[\"ClassHandle_clone\"]=function(){abort(\"'ClassHandle_clone' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle_delete\"))Module[\"ClassHandle_delete\"]=function(){abort(\"'ClassHandle_delete' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"deletionQueue\"))Module[\"deletionQueue\"]=function(){abort(\"'deletionQueue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle_isDeleted\"))Module[\"ClassHandle_isDeleted\"]=function(){abort(\"'ClassHandle_isDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle_deleteLater\"))Module[\"ClassHandle_deleteLater\"]=function(){abort(\"'ClassHandle_deleteLater' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"flushPendingDeletes\"))Module[\"flushPendingDeletes\"]=function(){abort(\"'flushPendingDeletes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"delayFunction\"))Module[\"delayFunction\"]=function(){abort(\"'delayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setDelayFunction\"))Module[\"setDelayFunction\"]=function(){abort(\"'setDelayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredClass\"))Module[\"RegisteredClass\"]=function(){abort(\"'RegisteredClass' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"shallowCopyInternalPointer\"))Module[\"shallowCopyInternalPointer\"]=function(){abort(\"'shallowCopyInternalPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"downcastPointer\"))Module[\"downcastPointer\"]=function(){abort(\"'downcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"upcastPointer\"))Module[\"upcastPointer\"]=function(){abort(\"'upcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"validateThis\"))Module[\"validateThis\"]=function(){abort(\"'validateThis' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"char_0\"))Module[\"char_0\"]=function(){abort(\"'char_0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"char_9\"))Module[\"char_9\"]=function(){abort(\"'char_9' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"makeLegalFunctionName\"))Module[\"makeLegalFunctionName\"]=function(){abort(\"'makeLegalFunctionName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGetIndexed\"))Module[\"emscriptenWebGLGetIndexed\"]=function(){abort(\"'emscriptenWebGLGetIndexed' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"warnOnce\"))Module[\"warnOnce\"]=function(){abort(\"'warnOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stackSave\"))Module[\"stackSave\"]=function(){abort(\"'stackSave' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stackRestore\"))Module[\"stackRestore\"]=function(){abort(\"'stackRestore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stackAlloc\"))Module[\"stackAlloc\"]=function(){abort(\"'stackAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"AsciiToString\"))Module[\"AsciiToString\"]=function(){abort(\"'AsciiToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToAscii\"))Module[\"stringToAscii\"]=function(){abort(\"'stringToAscii' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UTF16ToString\"))Module[\"UTF16ToString\"]=function(){abort(\"'UTF16ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToUTF16\"))Module[\"stringToUTF16\"]=function(){abort(\"'stringToUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"lengthBytesUTF16\"))Module[\"lengthBytesUTF16\"]=function(){abort(\"'lengthBytesUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UTF32ToString\"))Module[\"UTF32ToString\"]=function(){abort(\"'UTF32ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToUTF32\"))Module[\"stringToUTF32\"]=function(){abort(\"'stringToUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"lengthBytesUTF32\"))Module[\"lengthBytesUTF32\"]=function(){abort(\"'lengthBytesUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"allocateUTF8\"))Module[\"allocateUTF8\"]=function(){abort(\"'allocateUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"allocateUTF8OnStack\"))Module[\"allocateUTF8OnStack\"]=function(){abort(\"'allocateUTF8OnStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};Module[\"writeStackCookie\"]=writeStackCookie;Module[\"checkStackCookie\"]=checkStackCookie;if(!Object.getOwnPropertyDescriptor(Module,\"ALLOC_NORMAL\"))Object.defineProperty(Module,\"ALLOC_NORMAL\",{configurable:true,get:function(){abort(\"'ALLOC_NORMAL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")}});if(!Object.getOwnPropertyDescriptor(Module,\"ALLOC_STACK\"))Object.defineProperty(Module,\"ALLOC_STACK\",{configurable:true,get:function(){abort(\"'ALLOC_STACK' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")}});var calledRun;function ExitStatus(status){this.name=\"ExitStatus\";this.message=\"Program terminated with exit(\"+status+\")\";this.status=status}dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function stackCheckInit(){_emscripten_stack_init();writeStackCookie()}function run(args){args=args||arguments_;if(runDependencies>0){return}stackCheckInit();preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module[\"calledRun\"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module[\"onRuntimeInitialized\"])Module[\"onRuntimeInitialized\"]();assert(!Module[\"_main\"],'compiled without a main, but one is present. if you added it from JS, use Module[\"onRuntimeInitialized\"]');postRun()}if(Module[\"setStatus\"]){Module[\"setStatus\"](\"Running...\");setTimeout(function(){setTimeout(function(){Module[\"setStatus\"](\"\")},1);doRun()},1)}else{doRun()}checkStackCookie()}Module[\"run\"]=run;function checkUnflushedContent(){var oldOut=out;var oldErr=err;var has=false;out=err=function(x){has=true};try{var flush=Module[\"_fflush\"];if(flush)flush(0);[\"stdout\",\"stderr\"].forEach(function(name){var info=FS.analyzePath(\"/dev/\"+name);if(!info)return;var stream=info.object;var rdev=stream.rdev;var tty=TTY.ttys[rdev];if(tty&&tty.output&&tty.output.length){has=true}})}catch(e){}out=oldOut;err=oldErr;if(has){warnOnce(\"stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.\")}}function exit(status,implicit){EXITSTATUS=status;checkUnflushedContent();if(keepRuntimeAlive()){if(!implicit){var msg=\"program exited (with status: \"+status+\"), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)\";readyPromiseReject(msg);err(msg)}}else{exitRuntime()}procExit(status)}function procExit(code){EXITSTATUS=code;if(!keepRuntimeAlive()){if(Module[\"onExit\"])Module[\"onExit\"](code);ABORT=true}quit_(code,new ExitStatus(code))}if(Module[\"preInit\"]){if(typeof Module[\"preInit\"]==\"function\")Module[\"preInit\"]=[Module[\"preInit\"]];while(Module[\"preInit\"].length>0){Module[\"preInit\"].pop()()}}run();\n\n\n  return createMediapipeSolutionsWasm.ready\n}\n);\n})();\nif (typeof exports === 'object' && typeof module === 'object')\n  module.exports = createMediapipeSolutionsWasm;\nelse if (typeof define === 'function' && define['amd'])\n  define([], function() { return createMediapipeSolutionsWasm; });\nelse if (typeof exports === 'object')\n  exports[\"createMediapipeSolutionsWasm\"] = createMediapipeSolutionsWasm;\n"
  },
  {
    "path": "src/renderer/public/lib/@mediapipe/face_mesh/face_mesh_solution_wasm_bin.js",
    "content": "\nvar createMediapipeSolutionsWasm = (function() {\n  var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;\n  if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;\n  return (\nfunction(createMediapipeSolutionsWasm) {\n  createMediapipeSolutionsWasm = createMediapipeSolutionsWasm || {};\n\nvar Module=typeof createMediapipeSolutionsWasm!==\"undefined\"?createMediapipeSolutionsWasm:{};var readyPromiseResolve,readyPromiseReject;Module[\"ready\"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_main\")){Object.defineProperty(Module[\"ready\"],\"_main\",{configurable:true,get:function(){abort(\"You are getting _main on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_main\",{configurable:true,set:function(){abort(\"You are setting _main on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_stack_get_end\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_get_end\",{configurable:true,get:function(){abort(\"You are getting _emscripten_stack_get_end on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_get_end\",{configurable:true,set:function(){abort(\"You are setting _emscripten_stack_get_end on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_stack_get_free\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_get_free\",{configurable:true,get:function(){abort(\"You are getting _emscripten_stack_get_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_get_free\",{configurable:true,set:function(){abort(\"You are setting _emscripten_stack_get_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_stack_init\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_init\",{configurable:true,get:function(){abort(\"You are getting _emscripten_stack_init on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_init\",{configurable:true,set:function(){abort(\"You are setting _emscripten_stack_init on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_stackSave\")){Object.defineProperty(Module[\"ready\"],\"_stackSave\",{configurable:true,get:function(){abort(\"You are getting _stackSave on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_stackSave\",{configurable:true,set:function(){abort(\"You are setting _stackSave on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_stackRestore\")){Object.defineProperty(Module[\"ready\"],\"_stackRestore\",{configurable:true,get:function(){abort(\"You are getting _stackRestore on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_stackRestore\",{configurable:true,set:function(){abort(\"You are setting _stackRestore on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_stackAlloc\")){Object.defineProperty(Module[\"ready\"],\"_stackAlloc\",{configurable:true,get:function(){abort(\"You are getting _stackAlloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_stackAlloc\",{configurable:true,set:function(){abort(\"You are setting _stackAlloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___wasm_call_ctors\")){Object.defineProperty(Module[\"ready\"],\"___wasm_call_ctors\",{configurable:true,get:function(){abort(\"You are getting ___wasm_call_ctors on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___wasm_call_ctors\",{configurable:true,set:function(){abort(\"You are setting ___wasm_call_ctors on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_fflush\")){Object.defineProperty(Module[\"ready\"],\"_fflush\",{configurable:true,get:function(){abort(\"You are getting _fflush on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_fflush\",{configurable:true,set:function(){abort(\"You are setting _fflush on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___errno_location\")){Object.defineProperty(Module[\"ready\"],\"___errno_location\",{configurable:true,get:function(){abort(\"You are getting ___errno_location on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___errno_location\",{configurable:true,set:function(){abort(\"You are setting ___errno_location on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_malloc\")){Object.defineProperty(Module[\"ready\"],\"_malloc\",{configurable:true,get:function(){abort(\"You are getting _malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_malloc\",{configurable:true,set:function(){abort(\"You are setting _malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_free\")){Object.defineProperty(Module[\"ready\"],\"_free\",{configurable:true,get:function(){abort(\"You are getting _free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_free\",{configurable:true,set:function(){abort(\"You are setting _free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_setThrew\")){Object.defineProperty(Module[\"ready\"],\"_setThrew\",{configurable:true,get:function(){abort(\"You are getting _setThrew on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_setThrew\",{configurable:true,set:function(){abort(\"You are setting _setThrew on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___cxa_is_pointer_type\")){Object.defineProperty(Module[\"ready\"],\"___cxa_is_pointer_type\",{configurable:true,get:function(){abort(\"You are getting ___cxa_is_pointer_type on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___cxa_is_pointer_type\",{configurable:true,set:function(){abort(\"You are setting ___cxa_is_pointer_type on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___cxa_can_catch\")){Object.defineProperty(Module[\"ready\"],\"___cxa_can_catch\",{configurable:true,get:function(){abort(\"You are getting ___cxa_can_catch on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___cxa_can_catch\",{configurable:true,set:function(){abort(\"You are setting ___cxa_can_catch on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_saveSetjmp\")){Object.defineProperty(Module[\"ready\"],\"_saveSetjmp\",{configurable:true,get:function(){abort(\"You are getting _saveSetjmp on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_saveSetjmp\",{configurable:true,set:function(){abort(\"You are setting _saveSetjmp on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_memalign\")){Object.defineProperty(Module[\"ready\"],\"_memalign\",{configurable:true,get:function(){abort(\"You are getting _memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_memalign\",{configurable:true,set:function(){abort(\"You are setting _memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_main_thread_process_queued_calls\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_main_thread_process_queued_calls\",{configurable:true,get:function(){abort(\"You are getting _emscripten_main_thread_process_queued_calls on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_main_thread_process_queued_calls\",{configurable:true,set:function(){abort(\"You are setting _emscripten_main_thread_process_queued_calls on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_webgl_make_context_current\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_webgl_make_context_current\",{configurable:true,get:function(){abort(\"You are getting _emscripten_webgl_make_context_current on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_webgl_make_context_current\",{configurable:true,set:function(){abort(\"You are setting _emscripten_webgl_make_context_current on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_webgl_get_current_context\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_webgl_get_current_context\",{configurable:true,get:function(){abort(\"You are getting _emscripten_webgl_get_current_context on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_webgl_get_current_context\",{configurable:true,set:function(){abort(\"You are setting _emscripten_webgl_get_current_context on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"__get_tzname\")){Object.defineProperty(Module[\"ready\"],\"__get_tzname\",{configurable:true,get:function(){abort(\"You are getting __get_tzname on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"__get_tzname\",{configurable:true,set:function(){abort(\"You are setting __get_tzname on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"__get_daylight\")){Object.defineProperty(Module[\"ready\"],\"__get_daylight\",{configurable:true,get:function(){abort(\"You are getting __get_daylight on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"__get_daylight\",{configurable:true,set:function(){abort(\"You are setting __get_daylight on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"__get_timezone\")){Object.defineProperty(Module[\"ready\"],\"__get_timezone\",{configurable:true,get:function(){abort(\"You are getting __get_timezone on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"__get_timezone\",{configurable:true,set:function(){abort(\"You are setting __get_timezone on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_builtin_malloc\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_malloc\",{configurable:true,get:function(){abort(\"You are getting _emscripten_builtin_malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_malloc\",{configurable:true,set:function(){abort(\"You are setting _emscripten_builtin_malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_builtin_free\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_free\",{configurable:true,get:function(){abort(\"You are getting _emscripten_builtin_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_free\",{configurable:true,set:function(){abort(\"You are setting _emscripten_builtin_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_builtin_memalign\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_memalign\",{configurable:true,get:function(){abort(\"You are getting _emscripten_builtin_memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_memalign\",{configurable:true,set:function(){abort(\"You are setting _emscripten_builtin_memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___getTypeName\")){Object.defineProperty(Module[\"ready\"],\"___getTypeName\",{configurable:true,get:function(){abort(\"You are getting ___getTypeName on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___getTypeName\",{configurable:true,set:function(){abort(\"You are setting ___getTypeName on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___embind_register_native_and_builtin_types\")){Object.defineProperty(Module[\"ready\"],\"___embind_register_native_and_builtin_types\",{configurable:true,get:function(){abort(\"You are getting ___embind_register_native_and_builtin_types on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___embind_register_native_and_builtin_types\",{configurable:true,set:function(){abort(\"You are setting ___embind_register_native_and_builtin_types on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"onRuntimeInitialized\")){Object.defineProperty(Module[\"ready\"],\"onRuntimeInitialized\",{configurable:true,get:function(){abort(\"You are getting onRuntimeInitialized on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"onRuntimeInitialized\",{configurable:true,set:function(){abort(\"You are setting onRuntimeInitialized on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var arguments_=[];var thisProgram=\"./this.program\";var quit_=function(status,toThrow){throw toThrow};var ENVIRONMENT_IS_WEB=typeof window===\"object\";var ENVIRONMENT_IS_WORKER=typeof importScripts===\"function\";var ENVIRONMENT_IS_NODE=typeof process===\"object\"&&typeof process.versions===\"object\"&&typeof process.versions.node===\"string\";var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(Module[\"ENVIRONMENT\"]){throw new Error(\"Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)\")}var scriptDirectory=\"\";function locateFile(path){if(Module[\"locateFile\"]){return Module[\"locateFile\"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;var nodeFS;var nodePath;if(ENVIRONMENT_IS_NODE){if(!(typeof process===\"object\"&&typeof require===\"function\"))throw new Error(\"not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)\");if(ENVIRONMENT_IS_WORKER){scriptDirectory=require(\"path\").dirname(scriptDirectory)+\"/\"}else{scriptDirectory=__dirname+\"/\"}read_=function shell_read(filename,binary){if(!nodeFS)nodeFS=require(\"fs\");if(!nodePath)nodePath=require(\"path\");filename=nodePath[\"normalize\"](filename);return nodeFS[\"readFileSync\"](filename,binary?null:\"utf8\")};readBinary=function readBinary(filename){var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};readAsync=function readAsync(filename,onload,onerror){if(!nodeFS)nodeFS=require(\"fs\");if(!nodePath)nodePath=require(\"path\");filename=nodePath[\"normalize\"](filename);nodeFS[\"readFile\"](filename,function(err,data){if(err)onerror(err);else onload(data.buffer)})};if(process[\"argv\"].length>1){thisProgram=process[\"argv\"][1].replace(/\\\\/g,\"/\")}arguments_=process[\"argv\"].slice(2);process[\"on\"](\"uncaughtException\",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process[\"on\"](\"unhandledRejection\",abort);quit_=function(status,toThrow){if(keepRuntimeAlive()){process[\"exitCode\"]=status;throw toThrow}process[\"exit\"](status)};Module[\"inspect\"]=function(){return\"[Emscripten Module object]\"}}else if(ENVIRONMENT_IS_SHELL){if(typeof process===\"object\"&&typeof require===\"function\"||typeof window===\"object\"||typeof importScripts===\"function\")throw new Error(\"not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)\");if(typeof read!=\"undefined\"){read_=function shell_read(f){return read(f)}}readBinary=function readBinary(f){var data;if(typeof readbuffer===\"function\"){return new Uint8Array(readbuffer(f))}data=read(f,\"binary\");assert(typeof data===\"object\");return data};readAsync=function readAsync(f,onload,onerror){setTimeout(function(){onload(readBinary(f))},0)};if(typeof scriptArgs!=\"undefined\"){arguments_=scriptArgs}else if(typeof arguments!=\"undefined\"){arguments_=arguments}if(typeof quit===\"function\"){quit_=function(status){quit(status)}}if(typeof print!==\"undefined\"){if(typeof console===\"undefined\")console={};console.log=print;console.warn=console.error=typeof printErr!==\"undefined\"?printErr:print}}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(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf(\"blob:\")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf(\"/\")+1)}else{scriptDirectory=\"\"}if(!(typeof window===\"object\"||typeof importScripts===\"function\"))throw new Error(\"not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)\");{read_=function(url){var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=function(url){var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.responseType=\"arraybuffer\";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=function(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,true);xhr.responseType=\"arraybuffer\";xhr.onload=function(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=function(title){document.title=title}}else{throw new Error(\"environment detection error\")}var out=Module[\"print\"]||console.log.bind(console);var err=Module[\"printErr\"]||console.warn.bind(console);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=null;if(Module[\"arguments\"])arguments_=Module[\"arguments\"];if(!Object.getOwnPropertyDescriptor(Module,\"arguments\")){Object.defineProperty(Module,\"arguments\",{configurable:true,get:function(){abort(\"Module.arguments has been replaced with plain arguments_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(Module[\"thisProgram\"])thisProgram=Module[\"thisProgram\"];if(!Object.getOwnPropertyDescriptor(Module,\"thisProgram\")){Object.defineProperty(Module,\"thisProgram\",{configurable:true,get:function(){abort(\"Module.thisProgram has been replaced with plain thisProgram (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(Module[\"quit\"])quit_=Module[\"quit\"];if(!Object.getOwnPropertyDescriptor(Module,\"quit\")){Object.defineProperty(Module,\"quit\",{configurable:true,get:function(){abort(\"Module.quit has been replaced with plain quit_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}assert(typeof Module[\"memoryInitializerPrefixURL\"]===\"undefined\",\"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead\");assert(typeof Module[\"pthreadMainPrefixURL\"]===\"undefined\",\"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead\");assert(typeof Module[\"cdInitializerPrefixURL\"]===\"undefined\",\"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead\");assert(typeof Module[\"filePackagePrefixURL\"]===\"undefined\",\"Module.filePackagePrefixURL option was removed, use Module.locateFile instead\");assert(typeof Module[\"read\"]===\"undefined\",\"Module.read option was removed (modify read_ in JS)\");assert(typeof Module[\"readAsync\"]===\"undefined\",\"Module.readAsync option was removed (modify readAsync in JS)\");assert(typeof Module[\"readBinary\"]===\"undefined\",\"Module.readBinary option was removed (modify readBinary in JS)\");assert(typeof Module[\"setWindowTitle\"]===\"undefined\",\"Module.setWindowTitle option was removed (modify setWindowTitle in JS)\");assert(typeof Module[\"TOTAL_MEMORY\"]===\"undefined\",\"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY\");if(!Object.getOwnPropertyDescriptor(Module,\"read\")){Object.defineProperty(Module,\"read\",{configurable:true,get:function(){abort(\"Module.read has been replaced with plain read_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(!Object.getOwnPropertyDescriptor(Module,\"readAsync\")){Object.defineProperty(Module,\"readAsync\",{configurable:true,get:function(){abort(\"Module.readAsync has been replaced with plain readAsync (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(!Object.getOwnPropertyDescriptor(Module,\"readBinary\")){Object.defineProperty(Module,\"readBinary\",{configurable:true,get:function(){abort(\"Module.readBinary has been replaced with plain readBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(!Object.getOwnPropertyDescriptor(Module,\"setWindowTitle\")){Object.defineProperty(Module,\"setWindowTitle\",{configurable:true,get:function(){abort(\"Module.setWindowTitle has been replaced with plain setWindowTitle (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}assert(!ENVIRONMENT_IS_SHELL,\"shell environment detected but not enabled at build time.  Add 'shell' to `-s ENVIRONMENT` to enable.\");function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text)}}function convertJsFunctionToWasm(func,sig){if(typeof WebAssembly.Function===\"function\"){var typeNames={\"i\":\"i32\",\"j\":\"i64\",\"f\":\"f32\",\"d\":\"f64\"};var type={parameters:[],results:sig[0]==\"v\"?[]:[typeNames[sig[0]]]};for(var i=1;i<sig.length;++i){type.parameters.push(typeNames[sig[i]])}return new WebAssembly.Function(type,func)}var typeSection=[1,0,1,96];var sigRet=sig.slice(0,1);var sigParam=sig.slice(1);var typeCodes={\"i\":127,\"j\":126,\"f\":125,\"d\":124};typeSection.push(sigParam.length);for(var i=0;i<sigParam.length;++i){typeSection.push(typeCodes[sigParam[i]])}if(sigRet==\"v\"){typeSection.push(0)}else{typeSection=typeSection.concat([1,typeCodes[sigRet]])}typeSection[1]=typeSection.length-2;var bytes=new Uint8Array([0,97,115,109,1,0,0,0].concat(typeSection,[2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0]));var module=new WebAssembly.Module(bytes);var instance=new WebAssembly.Instance(module,{\"e\":{\"f\":func}});var wrappedFunc=instance.exports[\"f\"];return wrappedFunc}var freeTableIndexes=[];var functionsInTableMap;function getEmptyTableSlot(){if(freeTableIndexes.length){return freeTableIndexes.pop()}try{wasmTable.grow(1)}catch(err){if(!(err instanceof RangeError)){throw err}throw\"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.\"}return wasmTable.length-1}function addFunctionWasm(func,sig){if(!functionsInTableMap){functionsInTableMap=new WeakMap;for(var i=0;i<wasmTable.length;i++){var item=wasmTable.get(i);if(item){functionsInTableMap.set(item,i)}}}if(functionsInTableMap.has(func)){return functionsInTableMap.get(func)}var ret=getEmptyTableSlot();try{wasmTable.set(ret,func)}catch(err){if(!(err instanceof TypeError)){throw err}assert(typeof sig!==\"undefined\",\"Missing signature argument to addFunction: \"+func);var wrapped=convertJsFunctionToWasm(func,sig);wasmTable.set(ret,wrapped)}functionsInTableMap.set(func,ret);return ret}var tempRet0=0;var setTempRet0=function(value){tempRet0=value};var getTempRet0=function(){return tempRet0};var wasmBinary;if(Module[\"wasmBinary\"])wasmBinary=Module[\"wasmBinary\"];if(!Object.getOwnPropertyDescriptor(Module,\"wasmBinary\")){Object.defineProperty(Module,\"wasmBinary\",{configurable:true,get:function(){abort(\"Module.wasmBinary has been replaced with plain wasmBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}var noExitRuntime=Module[\"noExitRuntime\"]||true;if(!Object.getOwnPropertyDescriptor(Module,\"noExitRuntime\")){Object.defineProperty(Module,\"noExitRuntime\",{configurable:true,get:function(){abort(\"Module.noExitRuntime has been replaced with plain noExitRuntime (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(typeof WebAssembly!==\"object\"){abort(\"no native wasm support detected\")}var wasmMemory;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort(\"Assertion failed: \"+text)}}function getCFunc(ident){var func=Module[\"_\"+ident];assert(func,\"Cannot call unknown function \"+ident+\", make sure it is exported\");return func}function ccall(ident,returnType,argTypes,args,opts){var toC={\"string\":function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret},\"array\":function(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;assert(returnType!==\"array\",'Return type should not be \"array\".');if(args){for(var i=0;i<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0)stack=stackSave();cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var ret=func.apply(null,cArgs);function onDone(ret){if(stack!==0)stackRestore(stack);return convertReturnValue(ret)}ret=onDone(ret);return ret}var ALLOC_STACK=1;var UTF8Decoder=typeof TextDecoder!==\"undefined\"?new TextDecoder(\"utf8\"):undefined;function UTF8ArrayToString(heap,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heap[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heap.subarray&&UTF8Decoder){return UTF8Decoder.decode(heap.subarray(idx,endPtr))}else{var str=\"\";while(idx<endPtr){var u0=heap[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heap[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heap[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{if((u0&248)!=240)warnOnce(\"Invalid UTF-8 leading byte 0x\"+u0.toString(16)+\" encountered when deserializing a UTF-8 string in wasm memory to a JS string!\");u0=(u0&7)<<18|u1<<12|u2<<6|heap[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):\"\"}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=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;if(u>=2097152)warnOnce(\"Invalid Unicode code point 0x\"+u.toString(16)+\" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x1FFFFF).\");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 stringToUTF8(str,outPtr,maxBytesToWrite){assert(typeof maxBytesToWrite==\"number\",\"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!\");return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}var UTF16Decoder=typeof TextDecoder!==\"undefined\"?new TextDecoder(\"utf-16le\"):undefined;function UTF16ToString(ptr,maxBytesToRead){assert(ptr%2==0,\"Pointer passed to UTF16ToString must be aligned to two bytes!\");var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder){return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr))}else{var str=\"\";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str}}function stringToUTF16(str,outPtr,maxBytesToWrite){assert(outPtr%2==0,\"Pointer passed to stringToUTF16 must be aligned to two bytes!\");assert(typeof maxBytesToWrite==\"number\",\"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!\");if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite<str.length*2?maxBytesToWrite/2:str.length;for(var i=0;i<numCharsToWrite;++i){var codeUnit=str.charCodeAt(i);HEAP16[outPtr>>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr}function lengthBytesUTF16(str){return str.length*2}function UTF32ToString(ptr,maxBytesToRead){assert(ptr%4==0,\"Pointer passed to UTF32ToString must be aligned to four bytes!\");var i=0;var str=\"\";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str}function stringToUTF32(str,outPtr,maxBytesToWrite){assert(outPtr%4==0,\"Pointer passed to stringToUTF32 must be aligned to four bytes!\");assert(typeof maxBytesToWrite==\"number\",\"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!\");if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i<str.length;++i){var codeUnit=str.charCodeAt(i);if(codeUnit>=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr}function lengthBytesUTF32(str){var len=0;for(var i=0;i<str.length;++i){var codeUnit=str.charCodeAt(i);if(codeUnit>=55296&&codeUnit<=57343)++i;len+=4}return len}function allocateUTF8(str){var size=lengthBytesUTF8(str)+1;var ret=_malloc(size);if(ret)stringToUTF8Array(str,HEAP8,ret,size);return ret}function writeArrayToMemory(array,buffer){assert(array.length>=0,\"writeArrayToMemory array must have a length (should be an array or typed array)\");HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i<str.length;++i){assert(str.charCodeAt(i)===str.charCodeAt(i)&255);HEAP8[buffer++>>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module[\"HEAP8\"]=HEAP8=new Int8Array(buf);Module[\"HEAP16\"]=HEAP16=new Int16Array(buf);Module[\"HEAP32\"]=HEAP32=new Int32Array(buf);Module[\"HEAPU8\"]=HEAPU8=new Uint8Array(buf);Module[\"HEAPU16\"]=HEAPU16=new Uint16Array(buf);Module[\"HEAPU32\"]=HEAPU32=new Uint32Array(buf);Module[\"HEAPF32\"]=HEAPF32=new Float32Array(buf);Module[\"HEAPF64\"]=HEAPF64=new Float64Array(buf)}var TOTAL_STACK=5242880;if(Module[\"TOTAL_STACK\"])assert(TOTAL_STACK===Module[\"TOTAL_STACK\"],\"the stack size can no longer be determined at runtime\");var INITIAL_MEMORY=Module[\"INITIAL_MEMORY\"]||16777216;if(!Object.getOwnPropertyDescriptor(Module,\"INITIAL_MEMORY\")){Object.defineProperty(Module,\"INITIAL_MEMORY\",{configurable:true,get:function(){abort(\"Module.INITIAL_MEMORY has been replaced with plain INITIAL_MEMORY (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}assert(INITIAL_MEMORY>=TOTAL_STACK,\"INITIAL_MEMORY should be larger than TOTAL_STACK, was \"+INITIAL_MEMORY+\"! (TOTAL_STACK=\"+TOTAL_STACK+\")\");assert(typeof Int32Array!==\"undefined\"&&typeof Float64Array!==\"undefined\"&&Int32Array.prototype.subarray!==undefined&&Int32Array.prototype.set!==undefined,\"JS engine does not provide full typed array support\");assert(!Module[\"wasmMemory\"],\"Use of `wasmMemory` detected.  Use -s IMPORTED_MEMORY to define wasmMemory externally\");assert(INITIAL_MEMORY==16777216,\"Detected runtime INITIAL_MEMORY setting.  Use -s IMPORTED_MEMORY to define wasmMemory dynamically\");var wasmTable;function writeStackCookie(){var max=_emscripten_stack_get_end();assert((max&3)==0);HEAPU32[(max>>2)+1]=34821223;HEAPU32[(max>>2)+2]=2310721022;HEAP32[0]=1668509029}function checkStackCookie(){if(ABORT)return;var max=_emscripten_stack_get_end();var cookie1=HEAPU32[(max>>2)+1];var cookie2=HEAPU32[(max>>2)+2];if(cookie1!=34821223||cookie2!=2310721022){abort(\"Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x\"+cookie2.toString(16)+\" \"+cookie1.toString(16))}if(HEAP32[0]!==1668509029)abort(\"Runtime error: The application has corrupted its heap memory area (address zero)!\")}(function(){var h16=new Int16Array(1);var h8=new Int8Array(h16.buffer);h16[0]=25459;if(h8[0]!==115||h8[1]!==99)throw\"Runtime error: expected the system to be little-endian! (Run with -s SUPPORT_BIG_ENDIAN=1 to bypass)\"})();var __ATPRERUN__=[];var __ATINIT__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;var runtimeKeepaliveCounter=0;function keepRuntimeAlive(){return noExitRuntime||runtimeKeepaliveCounter>0}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(){checkStackCookie();assert(!runtimeInitialized);runtimeInitialized=true;if(!Module[\"noFSInit\"]&&!FS.init.initialized)FS.init();FS.ignorePermissions=false;TTY.init();callRuntimeCallbacks(__ATINIT__)}function exitRuntime(){checkStackCookie();runtimeExited=true}function postRun(){checkStackCookie();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)}assert(Math.imul,\"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill\");assert(Math.fround,\"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill\");assert(Math.clz32,\"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill\");assert(Math.trunc,\"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill\");var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;var runDependencyTracking={};function getUniqueRunDependency(id){var orig=id;while(1){if(!runDependencyTracking[id])return id;id=orig+Math.random()}}function addRunDependency(id){runDependencies++;if(Module[\"monitorRunDependencies\"]){Module[\"monitorRunDependencies\"](runDependencies)}if(id){assert(!runDependencyTracking[id]);runDependencyTracking[id]=1;if(runDependencyWatcher===null&&typeof setInterval!==\"undefined\"){runDependencyWatcher=setInterval(function(){if(ABORT){clearInterval(runDependencyWatcher);runDependencyWatcher=null;return}var shown=false;for(var dep in runDependencyTracking){if(!shown){shown=true;err(\"still waiting on run dependencies:\")}err(\"dependency: \"+dep)}if(shown){err(\"(end of list)\")}},1e4)}}else{err(\"warning: run dependency added without ID\")}}function removeRunDependency(id){runDependencies--;if(Module[\"monitorRunDependencies\"]){Module[\"monitorRunDependencies\"](runDependencies)}if(id){assert(runDependencyTracking[id]);delete runDependencyTracking[id]}else{err(\"warning: run dependency removed without ID\")}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module[\"preloadedImages\"]={};Module[\"preloadedAudios\"]={};function abort(what){if(Module[\"onAbort\"]){Module[\"onAbort\"](what)}what+=\"\";err(what);ABORT=true;EXITSTATUS=1;var output=\"abort(\"+what+\") at \"+stackTrace();what=output;var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix=\"data:application/octet-stream;base64,\";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}function isFileURI(filename){return filename.startsWith(\"file://\")}function createExportWrapper(name,fixedasm){return function(){var displayName=name;var asm=fixedasm;if(!fixedasm){asm=Module[\"asm\"]}assert(runtimeInitialized,\"native function `\"+displayName+\"` called before runtime initialization\");assert(!runtimeExited,\"native function `\"+displayName+\"` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)\");if(!asm[name]){assert(asm[name],\"exported native function `\"+displayName+\"` not found\")}return asm[name].apply(null,arguments)}}var wasmBinaryFile;wasmBinaryFile=\"face_mesh_solution_wasm_bin.wasm\";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}else{throw\"both async and sync fetching of the wasm failed\"}}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch===\"function\"&&!isFileURI(wasmBinaryFile)){return fetch(wasmBinaryFile,{credentials:\"same-origin\"}).then(function(response){if(!response[\"ok\"]){throw\"failed to load wasm binary file at '\"+wasmBinaryFile+\"'\"}return response[\"arrayBuffer\"]()}).catch(function(){return getBinary(wasmBinaryFile)})}else{if(readAsync){return new Promise(function(resolve,reject){readAsync(wasmBinaryFile,function(response){resolve(new Uint8Array(response))},reject)})}}}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile)})}function createWasm(){var info={\"env\":asmLibraryArg,\"wasi_snapshot_preview1\":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module[\"asm\"]=exports;wasmMemory=Module[\"asm\"][\"memory\"];assert(wasmMemory,\"memory not found in wasm exports\");updateGlobalBufferAndViews(wasmMemory.buffer);wasmTable=Module[\"asm\"][\"__indirect_function_table\"];assert(wasmTable,\"table not found in wasm exports\");addOnInit(Module[\"asm\"][\"__wasm_call_ctors\"]);removeRunDependency(\"wasm-instantiate\")}addRunDependency(\"wasm-instantiate\");var trueModule=Module;function receiveInstantiationResult(result){assert(Module===trueModule,\"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?\");trueModule=null;receiveInstance(result[\"instance\"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){var result=WebAssembly.instantiate(binary,info);return result}).then(receiver,function(reason){err(\"failed to asynchronously prepare wasm: \"+reason);if(isFileURI(wasmBinaryFile)){err(\"warning: Loading from a file URI (\"+wasmBinaryFile+\") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing\")}abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming===\"function\"&&!isDataURI(wasmBinaryFile)&&!isFileURI(wasmBinaryFile)&&typeof fetch===\"function\"){return fetch(wasmBinaryFile,{credentials:\"same-origin\"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiationResult,function(reason){err(\"wasm streaming compile failed: \"+reason);err(\"falling back to ArrayBuffer instantiation\");return instantiateArrayBuffer(receiveInstantiationResult)})})}else{return instantiateArrayBuffer(receiveInstantiationResult)}}if(Module[\"instantiateWasm\"]){try{var exports=Module[\"instantiateWasm\"](info,receiveInstance);return exports}catch(e){err(\"Module.instantiateWasm callback failed with error: \"+e);return false}}instantiateAsync().catch(readyPromiseReject);return{}}var tempDouble;var tempI64;var ASM_CONSTS={548264:function(){let init_once=true;if(init_once){const cachedFindCanvasEventTarget=findCanvasEventTarget;if(typeof cachedFindCanvasEventTarget!==\"function\"){if(typeof console!==\"undefined\"){console.error(\"Expected Emscripten global function \"+'\"findCanvasEventTarget\" not found. WebGL context creation '+\"may fail.\")}return}findCanvasEventTarget=function(target){if(target==0){if(Module&&Module.canvas){return Module.canvas}else if(Module&&Module.canvasCssSelector){return cachedFindCanvasEventTarget(Module.canvasCssSelector)}if(typeof console!==\"undefined\"){console.warn(\"Module properties canvas and canvasCssSelector not \"+\"found during WebGL context creation.\")}}return cachedFindCanvasEventTarget(target)};init_once=false}},549049:function(){return typeof wasmOffsetConverter!==\"undefined\"}};function HaveOffsetConverter(){return typeof wasmOffsetConverter!==\"undefined\"}function _emscripten_set_main_loop_timing(mode,value){Browser.mainLoop.timingMode=mode;Browser.mainLoop.timingValue=value;if(!Browser.mainLoop.func){err(\"emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up.\");return 1}if(!Browser.mainLoop.running){Browser.mainLoop.running=true}if(mode==0){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setTimeout(){var timeUntilNextTick=Math.max(0,Browser.mainLoop.tickStartTime+value-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,timeUntilNextTick)};Browser.mainLoop.method=\"timeout\"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_rAF(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method=\"rAF\"}else if(mode==2){if(typeof setImmediate===\"undefined\"){var setImmediates=[];var emscriptenMainLoopMessageId=\"setimmediate\";var Browser_setImmediate_messageHandler=function(event){if(event.data===emscriptenMainLoopMessageId||event.data.target===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}};addEventListener(\"message\",Browser_setImmediate_messageHandler,true);setImmediate=function Browser_emulated_setImmediate(func){setImmediates.push(func);if(ENVIRONMENT_IS_WORKER){if(Module[\"setImmediates\"]===undefined)Module[\"setImmediates\"]=[];Module[\"setImmediates\"].push(func);postMessage({target:emscriptenMainLoopMessageId})}else postMessage(emscriptenMainLoopMessageId,\"*\")}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){setImmediate(Browser.mainLoop.runner)};Browser.mainLoop.method=\"immediate\"}return 0}var _emscripten_get_now;if(ENVIRONMENT_IS_NODE){_emscripten_get_now=function(){var t=process[\"hrtime\"]();return t[0]*1e3+t[1]/1e6}}else _emscripten_get_now=function(){return performance.now()};function _emscripten_webgl_do_commit_frame(){if(!GL.currentContext||!GL.currentContext.GLctx){return-3}if(GL.currentContext.defaultFbo){GL.blitOffscreenFramebuffer(GL.currentContext);return 0}if(!GL.currentContext.attributes.explicitSwapControl){return-3}return 0}function _exit(status){exit(status)}function maybeExit(){if(!keepRuntimeAlive()){try{_exit(EXITSTATUS)}catch(e){if(e instanceof ExitStatus){return}throw e}}}function setMainLoop(browserIterationFunc,fps,simulateInfiniteLoop,arg,noSetTiming){assert(!Browser.mainLoop.func,\"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.\");Browser.mainLoop.func=browserIterationFunc;Browser.mainLoop.arg=arg;var thisMainLoopId=Browser.mainLoop.currentlyRunningMainloop;function checkIsRunning(){if(thisMainLoopId<Browser.mainLoop.currentlyRunningMainloop){maybeExit();return false}return true}Browser.mainLoop.running=false;Browser.mainLoop.runner=function Browser_mainLoop_runner(){if(ABORT)return;if(Browser.mainLoop.queue.length>0){var start=Date.now();var blocker=Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if(Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){Browser.mainLoop.remainingBlockers=next}else{next=next+.5;Browser.mainLoop.remainingBlockers=(8*remaining+next)/9}}out('main loop blocker \"'+blocker.name+'\" took '+(Date.now()-start)+\" ms\");Browser.mainLoop.updateStatus();if(!checkIsRunning())return;setTimeout(Browser.mainLoop.runner,0);return}if(!checkIsRunning())return;Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0;if(Browser.mainLoop.timingMode==1&&Browser.mainLoop.timingValue>1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else if(Browser.mainLoop.timingMode==0){Browser.mainLoop.tickStartTime=_emscripten_get_now()}GL.newRenderingFrameStarted();if(typeof GL!==\"undefined\"&&GL.currentContext&&!GL.currentContextIsProxied&&!GL.currentContext.attributes.explicitSwapControl&&GL.currentContext.GLctx.commit){GL.currentContext.GLctx.commit()}if(Browser.mainLoop.method===\"timeout\"&&Module.ctx){warnOnce(\"Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!\");Browser.mainLoop.method=\"\"}Browser.mainLoop.runIter(browserIterationFunc);checkStackCookie();if(!checkIsRunning())return;if(typeof SDL===\"object\"&&SDL.audio&&SDL.audio.queueNewAudioData)SDL.audio.queueNewAudioData();Browser.mainLoop.scheduler()};if(!noSetTiming){if(fps&&fps>0)_emscripten_set_main_loop_timing(0,1e3/fps);else _emscripten_set_main_loop_timing(1,1);Browser.mainLoop.scheduler()}if(simulateInfiniteLoop){throw\"unwind\"}}function callUserCallback(func,synchronous){if(ABORT){err(\"user callback triggered after application aborted.  Ignoring.\");return}if(synchronous){func();return}try{func()}catch(e){if(e instanceof ExitStatus){return}else if(e!==\"unwind\"){if(e&&typeof e===\"object\"&&e.stack)err(\"exception thrown: \"+[e,e.stack]);throw e}}}function safeSetTimeout(func,timeout){return setTimeout(function(){callUserCallback(func)},timeout)}var Browser={mainLoop:{running:false,scheduler:null,method:\"\",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;setMainLoop(func,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()},updateStatus:function(){if(Module[\"setStatus\"]){var message=Module[\"statusMessage\"]||\"Please wait...\";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining<expected){Module[\"setStatus\"](message+\" (\"+(expected-remaining)+\"/\"+expected+\")\")}else{Module[\"setStatus\"](message)}}else{Module[\"setStatus\"](\"\")}}},runIter:function(func){if(ABORT)return;if(Module[\"preMainLoop\"]){var preRet=Module[\"preMainLoop\"]();if(preRet===false){return}}callUserCallback(func);if(Module[\"postMainLoop\"])Module[\"postMainLoop\"]()}},isFullscreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(!Module[\"preloadPlugins\"])Module[\"preloadPlugins\"]=[];if(Browser.initted)return;Browser.initted=true;try{new Blob;Browser.hasBlobConstructor=true}catch(e){Browser.hasBlobConstructor=false;out(\"warning: no blob constructor, cannot create blobs with mimetypes\")}Browser.BlobBuilder=typeof MozBlobBuilder!=\"undefined\"?MozBlobBuilder:typeof WebKitBlobBuilder!=\"undefined\"?WebKitBlobBuilder:!Browser.hasBlobConstructor?out(\"warning: no BlobBuilder\"):null;Browser.URLObject=typeof window!=\"undefined\"?window.URL?window.URL:window.webkitURL:undefined;if(!Module.noImageDecoding&&typeof Browser.URLObject===\"undefined\"){out(\"warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available.\");Module.noImageDecoding=true}var imagePlugin={};imagePlugin[\"canHandle\"]=function imagePlugin_canHandle(name){return!Module.noImageDecoding&&/\\.(jpg|jpeg|png|bmp)$/i.test(name)};imagePlugin[\"handle\"]=function imagePlugin_handle(byteArray,name,onload,onerror){var b=null;if(Browser.hasBlobConstructor){try{b=new Blob([byteArray],{type:Browser.getMimetype(name)});if(b.size!==byteArray.length){b=new Blob([new Uint8Array(byteArray).buffer],{type:Browser.getMimetype(name)})}}catch(e){warnOnce(\"Blob constructor present but fails: \"+e+\"; falling back to blob builder\")}}if(!b){var bb=new Browser.BlobBuilder;bb.append(new Uint8Array(byteArray).buffer);b=bb.getBlob()}var url=Browser.URLObject.createObjectURL(b);assert(typeof url==\"string\",\"createObjectURL must return a url as a string\");var img=new Image;img.onload=function img_onload(){assert(img.complete,\"Image \"+name+\" could not be decoded\");var canvas=document.createElement(\"canvas\");canvas.width=img.width;canvas.height=img.height;var ctx=canvas.getContext(\"2d\");ctx.drawImage(img,0,0);Module[\"preloadedImages\"][name]=canvas;Browser.URLObject.revokeObjectURL(url);if(onload)onload(byteArray)};img.onerror=function img_onerror(event){out(\"Image \"+url+\" could not be decoded\");if(onerror)onerror()};img.src=url};Module[\"preloadPlugins\"].push(imagePlugin);var audioPlugin={};audioPlugin[\"canHandle\"]=function audioPlugin_canHandle(name){return!Module.noAudioDecoding&&name.substr(-4)in{\".ogg\":1,\".wav\":1,\".mp3\":1}};audioPlugin[\"handle\"]=function audioPlugin_handle(byteArray,name,onload,onerror){var done=false;function finish(audio){if(done)return;done=true;Module[\"preloadedAudios\"][name]=audio;if(onload)onload(byteArray)}function fail(){if(done)return;done=true;Module[\"preloadedAudios\"][name]=new Audio;if(onerror)onerror()}if(Browser.hasBlobConstructor){try{var b=new Blob([byteArray],{type:Browser.getMimetype(name)})}catch(e){return fail()}var url=Browser.URLObject.createObjectURL(b);assert(typeof url==\"string\",\"createObjectURL must return a url as a string\");var audio=new Audio;audio.addEventListener(\"canplaythrough\",function(){finish(audio)},false);audio.onerror=function audio_onerror(event){if(done)return;out(\"warning: browser could not fully decode audio \"+name+\", trying slower base64 approach\");function encode64(data){var BASE=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";var PAD=\"=\";var ret=\"\";var leftchar=0;var leftbits=0;for(var i=0;i<data.length;i++){leftchar=leftchar<<8|data[i];leftbits+=8;while(leftbits>=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src=\"data:audio/x-\"+name.substr(-3)+\";base64,\"+encode64(byteArray);finish(audio)};audio.src=url;safeSetTimeout(function(){finish(audio)},1e4)}else{return fail()}};Module[\"preloadPlugins\"].push(audioPlugin);function pointerLockChange(){Browser.pointerLock=document[\"pointerLockElement\"]===Module[\"canvas\"]||document[\"mozPointerLockElement\"]===Module[\"canvas\"]||document[\"webkitPointerLockElement\"]===Module[\"canvas\"]||document[\"msPointerLockElement\"]===Module[\"canvas\"]}var canvas=Module[\"canvas\"];if(canvas){canvas.requestPointerLock=canvas[\"requestPointerLock\"]||canvas[\"mozRequestPointerLock\"]||canvas[\"webkitRequestPointerLock\"]||canvas[\"msRequestPointerLock\"]||function(){};canvas.exitPointerLock=document[\"exitPointerLock\"]||document[\"mozExitPointerLock\"]||document[\"webkitExitPointerLock\"]||document[\"msExitPointerLock\"]||function(){};canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener(\"pointerlockchange\",pointerLockChange,false);document.addEventListener(\"mozpointerlockchange\",pointerLockChange,false);document.addEventListener(\"webkitpointerlockchange\",pointerLockChange,false);document.addEventListener(\"mspointerlockchange\",pointerLockChange,false);if(Module[\"elementPointerLock\"]){canvas.addEventListener(\"click\",function(ev){if(!Browser.pointerLock&&Module[\"canvas\"].requestPointerLock){Module[\"canvas\"].requestPointerLock();ev.preventDefault()}},false)}}},createContext:function(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx;var contextHandle;if(useWebGL){var contextAttributes={antialias:false,alpha:false,majorVersion:typeof WebGL2RenderingContext!==\"undefined\"?2:1};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}if(typeof GL!==\"undefined\"){contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}}}else{ctx=canvas.getContext(\"2d\")}if(!ctx)return null;if(setInModule){if(!useWebGL)assert(typeof GLctx===\"undefined\",\"cannot set in module if GLctx is used, but we are a non-GL context that would replace it\");Module.ctx=ctx;if(useWebGL)GL.makeContextCurrent(contextHandle);Module.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach(function(callback){callback()});Browser.init()}return ctx},destroyContext:function(canvas,useWebGL,setInModule){},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function(lockPointer,resizeCanvas){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;if(typeof Browser.lockPointer===\"undefined\")Browser.lockPointer=true;if(typeof Browser.resizeCanvas===\"undefined\")Browser.resizeCanvas=false;var canvas=Module[\"canvas\"];function fullscreenChange(){Browser.isFullscreen=false;var canvasContainer=canvas.parentNode;if((document[\"fullscreenElement\"]||document[\"mozFullScreenElement\"]||document[\"msFullscreenElement\"]||document[\"webkitFullscreenElement\"]||document[\"webkitCurrentFullScreenElement\"])===canvasContainer){canvas.exitFullscreen=Browser.exitFullscreen;if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullscreen=true;if(Browser.resizeCanvas){Browser.setFullscreenCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas){Browser.setWindowedCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}if(Module[\"onFullScreen\"])Module[\"onFullScreen\"](Browser.isFullscreen);if(Module[\"onFullscreen\"])Module[\"onFullscreen\"](Browser.isFullscreen)}if(!Browser.fullscreenHandlersInstalled){Browser.fullscreenHandlersInstalled=true;document.addEventListener(\"fullscreenchange\",fullscreenChange,false);document.addEventListener(\"mozfullscreenchange\",fullscreenChange,false);document.addEventListener(\"webkitfullscreenchange\",fullscreenChange,false);document.addEventListener(\"MSFullscreenChange\",fullscreenChange,false)}var canvasContainer=document.createElement(\"div\");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullscreen=canvasContainer[\"requestFullscreen\"]||canvasContainer[\"mozRequestFullScreen\"]||canvasContainer[\"msRequestFullscreen\"]||(canvasContainer[\"webkitRequestFullscreen\"]?function(){canvasContainer[\"webkitRequestFullscreen\"](Element[\"ALLOW_KEYBOARD_INPUT\"])}:null)||(canvasContainer[\"webkitRequestFullScreen\"]?function(){canvasContainer[\"webkitRequestFullScreen\"](Element[\"ALLOW_KEYBOARD_INPUT\"])}:null);canvasContainer.requestFullscreen()},requestFullScreen:function(){abort(\"Module.requestFullScreen has been replaced by Module.requestFullscreen (without a capital S)\")},exitFullscreen:function(){if(!Browser.isFullscreen){return false}var CFS=document[\"exitFullscreen\"]||document[\"cancelFullScreen\"]||document[\"mozCancelFullScreen\"]||document[\"msExitFullscreen\"]||document[\"webkitCancelFullScreen\"]||function(){};CFS.apply(document,[]);return true},nextRAF:0,fakeRequestAnimationFrame:function(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)},requestAnimationFrame:function(func){if(typeof requestAnimationFrame===\"function\"){requestAnimationFrame(func);return}var RAF=Browser.fakeRequestAnimationFrame;RAF(func)},safeSetTimeout:function(func){return safeSetTimeout(func)},safeRequestAnimationFrame:function(func){return Browser.requestAnimationFrame(function(){callUserCallback(func)})},getMimetype:function(name){return{\"jpg\":\"image/jpeg\",\"jpeg\":\"image/jpeg\",\"png\":\"image/png\",\"bmp\":\"image/bmp\",\"ogg\":\"audio/ogg\",\"wav\":\"audio/wav\",\"mp3\":\"audio/mpeg\"}[name.substr(name.lastIndexOf(\".\")+1)]},getUserMedia:function(func){if(!window.getUserMedia){window.getUserMedia=navigator[\"getUserMedia\"]||navigator[\"mozGetUserMedia\"]}window.getUserMedia(func)},getMovementX:function(event){return event[\"movementX\"]||event[\"mozMovementX\"]||event[\"webkitMovementX\"]||0},getMovementY:function(event){return event[\"movementY\"]||event[\"mozMovementY\"]||event[\"webkitMovementY\"]||0},getMouseWheelDelta:function(event){var delta=0;switch(event.type){case\"DOMMouseScroll\":delta=event.detail/3;break;case\"mousewheel\":delta=event.wheelDelta/120;break;case\"wheel\":delta=event.deltaY;switch(event.deltaMode){case 0:delta/=100;break;case 1:delta/=3;break;case 2:delta*=80;break;default:throw\"unrecognized mouse wheel delta mode: \"+event.deltaMode}break;default:throw\"unrecognized mouse wheel event: \"+event.type}return delta},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(event){if(Browser.pointerLock){if(event.type!=\"mousemove\"&&\"mozMovementX\"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}if(typeof SDL!=\"undefined\"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}}else{var rect=Module[\"canvas\"].getBoundingClientRect();var cw=Module[\"canvas\"].width;var ch=Module[\"canvas\"].height;var scrollX=typeof window.scrollX!==\"undefined\"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!==\"undefined\"?window.scrollY:window.pageYOffset;assert(typeof scrollX!==\"undefined\"&&typeof scrollY!==\"undefined\",\"Unable to retrieve scroll position, mouse positions likely broken.\");if(event.type===\"touchstart\"||event.type===\"touchend\"||event.type===\"touchmove\"){var touch=event.touch;if(touch===undefined){return}var adjustedX=touch.pageX-(scrollX+rect.left);var adjustedY=touch.pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);var coords={x:adjustedX,y:adjustedY};if(event.type===\"touchstart\"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type===\"touchend\"||event.type===\"touchmove\"){var last=Browser.touches[touch.identifier];if(!last)last=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}},resizeListeners:[],updateResizeListeners:function(){var canvas=Module[\"canvas\"];Browser.resizeListeners.forEach(function(listener){listener(canvas.width,canvas.height)})},setCanvasSize:function(width,height,noUpdates){var canvas=Module[\"canvas\"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!=\"undefined\"){var flags=HEAPU32[SDL.screen>>2];flags=flags|8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module[\"canvas\"]);Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!=\"undefined\"){var flags=HEAPU32[SDL.screen>>2];flags=flags&~8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module[\"canvas\"]);Browser.updateResizeListeners()},updateCanvasDimensions:function(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module[\"forcedAspectRatio\"]&&Module[\"forcedAspectRatio\"]>0){if(w/h<Module[\"forcedAspectRatio\"]){w=Math.round(h*Module[\"forcedAspectRatio\"])}else{h=Math.round(w/Module[\"forcedAspectRatio\"])}}if((document[\"fullscreenElement\"]||document[\"mozFullScreenElement\"]||document[\"msFullscreenElement\"]||document[\"webkitFullscreenElement\"]||document[\"webkitCurrentFullScreenElement\"])===canvas.parentNode&&typeof screen!=\"undefined\"){var factor=Math.min(screen.width/w,screen.height/h);w=Math.round(w*factor);h=Math.round(h*factor)}if(Browser.resizeCanvas){if(canvas.width!=w)canvas.width=w;if(canvas.height!=h)canvas.height=h;if(typeof canvas.style!=\"undefined\"){canvas.style.removeProperty(\"width\");canvas.style.removeProperty(\"height\")}}else{if(canvas.width!=wNative)canvas.width=wNative;if(canvas.height!=hNative)canvas.height=hNative;if(typeof canvas.style!=\"undefined\"){if(w!=wNative||h!=hNative){canvas.style.setProperty(\"width\",w+\"px\",\"important\");canvas.style.setProperty(\"height\",h+\"px\",\"important\")}else{canvas.style.removeProperty(\"width\");canvas.style.removeProperty(\"height\")}}}}};function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback==\"function\"){callback(Module);continue}var func=callback.func;if(typeof func===\"number\"){if(callback.arg===undefined){wasmTable.get(func)()}else{wasmTable.get(func)(callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}function demangle(func){warnOnce(\"warning: build with  -s DEMANGLE_SUPPORT=1  to link in libcxxabi demangling\");return func}function demangleAll(text){var regex=/\\b_Z[\\w\\d_]+/g;return text.replace(regex,function(x){var y=demangle(x);return x===y?x:y+\" [\"+x+\"]\"})}function jsStackTrace(){var error=new Error;if(!error.stack){try{throw new Error}catch(e){error=e}if(!error.stack){return\"(no stack trace available)\"}}return error.stack.toString()}function stackTrace(){var js=jsStackTrace();if(Module[\"extraStackTrace\"])js+=\"\\n\"+Module[\"extraStackTrace\"]();return demangleAll(js)}function ___cxa_allocate_exception(size){return _malloc(size+16)+16}function _atexit(func,arg){}function ___cxa_atexit(a0,a1){return _atexit(a0,a1)}function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-16;this.set_type=function(type){HEAP32[this.ptr+4>>2]=type};this.get_type=function(){return HEAP32[this.ptr+4>>2]};this.set_destructor=function(destructor){HEAP32[this.ptr+8>>2]=destructor};this.get_destructor=function(){return HEAP32[this.ptr+8>>2]};this.set_refcount=function(refcount){HEAP32[this.ptr>>2]=refcount};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>0]=caught};this.get_caught=function(){return HEAP8[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return HEAP8[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_type(type);this.set_destructor(destructor);this.set_refcount(0);this.set_caught(false);this.set_rethrown(false)};this.add_ref=function(){var value=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=value+1};this.release_ref=function(){var prev=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=prev-1;assert(prev>0);return prev===1}}function CatchInfo(ptr){this.free=function(){_free(this.ptr);this.ptr=0};this.set_base_ptr=function(basePtr){HEAP32[this.ptr>>2]=basePtr};this.get_base_ptr=function(){return HEAP32[this.ptr>>2]};this.set_adjusted_ptr=function(adjustedPtr){HEAP32[this.ptr+4>>2]=adjustedPtr};this.get_adjusted_ptr_addr=function(){return this.ptr+4};this.get_adjusted_ptr=function(){return HEAP32[this.ptr+4>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_exception_info().get_type());if(isPointer){return HEAP32[this.get_base_ptr()>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.get_base_ptr()};this.get_exception_info=function(){return new ExceptionInfo(this.get_base_ptr())};if(ptr===undefined){this.ptr=_malloc(8);this.set_adjusted_ptr(0)}else{this.ptr=ptr}}var exceptionCaught=[];function exception_addRef(info){info.add_ref()}var uncaughtExceptionCount=0;function ___cxa_begin_catch(ptr){var catchInfo=new CatchInfo(ptr);var info=catchInfo.get_exception_info();if(!info.get_caught()){info.set_caught(true);uncaughtExceptionCount--}info.set_rethrown(false);exceptionCaught.push(catchInfo);exception_addRef(info);return catchInfo.get_exception_ptr()}var exceptionLast=0;function ___cxa_free_exception(ptr){try{return _free(new ExceptionInfo(ptr).ptr)}catch(e){err(\"exception during cxa_free_exception: \"+e)}}function exception_decRef(info){if(info.release_ref()&&!info.get_rethrown()){var destructor=info.get_destructor();if(destructor){wasmTable.get(destructor)(info.excPtr)}___cxa_free_exception(info.excPtr)}}function ___cxa_end_catch(){_setThrew(0);assert(exceptionCaught.length>0);var catchInfo=exceptionCaught.pop();exception_decRef(catchInfo.get_exception_info());catchInfo.free();exceptionLast=0}function ___resumeException(catchInfoPtr){var catchInfo=new CatchInfo(catchInfoPtr);var ptr=catchInfo.get_base_ptr();if(!exceptionLast){exceptionLast=ptr}catchInfo.free();throw ptr+\" - Exception catching is disabled, this exception cannot be caught. Compile with -s NO_DISABLE_EXCEPTION_CATCHING or -s EXCEPTION_CATCHING_ALLOWED=[..] to catch.\"}function ___cxa_find_matching_catch_2(){var thrown=exceptionLast;if(!thrown){setTempRet0(0);return 0|0}var info=new ExceptionInfo(thrown);var thrownType=info.get_type();var catchInfo=new CatchInfo;catchInfo.set_base_ptr(thrown);catchInfo.set_adjusted_ptr(thrown);if(!thrownType){setTempRet0(0);return catchInfo.ptr|0}var typeArray=Array.prototype.slice.call(arguments);for(var i=0;i<typeArray.length;i++){var caughtType=typeArray[i];if(caughtType===0||caughtType===thrownType){break}if(___cxa_can_catch(caughtType,thrownType,catchInfo.get_adjusted_ptr_addr())){setTempRet0(caughtType);return catchInfo.ptr|0}}setTempRet0(thrownType);return catchInfo.ptr|0}function ___cxa_find_matching_catch_3(){var thrown=exceptionLast;if(!thrown){setTempRet0(0);return 0|0}var info=new ExceptionInfo(thrown);var thrownType=info.get_type();var catchInfo=new CatchInfo;catchInfo.set_base_ptr(thrown);catchInfo.set_adjusted_ptr(thrown);if(!thrownType){setTempRet0(0);return catchInfo.ptr|0}var typeArray=Array.prototype.slice.call(arguments);for(var i=0;i<typeArray.length;i++){var caughtType=typeArray[i];if(caughtType===0||caughtType===thrownType){break}if(___cxa_can_catch(caughtType,thrownType,catchInfo.get_adjusted_ptr_addr())){setTempRet0(caughtType);return catchInfo.ptr|0}}setTempRet0(thrownType);return catchInfo.ptr|0}function ___cxa_rethrow(){var catchInfo=exceptionCaught.pop();if(!catchInfo){abort(\"no exception to throw\")}var info=catchInfo.get_exception_info();var ptr=catchInfo.get_base_ptr();if(!info.get_rethrown()){exceptionCaught.push(catchInfo);info.set_rethrown(true);info.set_caught(false);uncaughtExceptionCount++}else{catchInfo.free()}exceptionLast=ptr;throw ptr+\" - Exception catching is disabled, this exception cannot be caught. Compile with -s NO_DISABLE_EXCEPTION_CATCHING or -s EXCEPTION_CATCHING_ALLOWED=[..] to catch.\"}function ___cxa_thread_atexit(a0,a1){return _atexit(a0,a1)}function ___cxa_throw(ptr,type,destructor){var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;throw ptr+\" - Exception catching is disabled, this exception cannot be caught. Compile with -s NO_DISABLE_EXCEPTION_CATCHING or -s EXCEPTION_CATCHING_ALLOWED=[..] to catch.\"}function setErrNo(value){HEAP32[___errno_location()>>2]=value;return value}var PATH={splitPath:function(filename){var splitPathRe=/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:function(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:function(path){var isAbsolute=path.charAt(0)===\"/\",trailingSlash=path.substr(-1)===\"/\";path=PATH.normalizeArray(path.split(\"/\").filter(function(p){return!!p}),!isAbsolute).join(\"/\");if(!path&&!isAbsolute){path=\".\"}if(path&&trailingSlash){path+=\"/\"}return(isAbsolute?\"/\":\"\")+path},dirname:function(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:function(path){if(path===\"/\")return\"/\";path=PATH.normalize(path);path=path.replace(/\\/$/,\"\");var lastSlash=path.lastIndexOf(\"/\");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},extname:function(path){return PATH.splitPath(path)[3]},join:function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join(\"/\"))},join2:function(l,r){return PATH.normalize(l+\"/\"+r)}};function getRandomDevice(){if(typeof crypto===\"object\"&&typeof crypto[\"getRandomValues\"]===\"function\"){var randomBuffer=new Uint8Array(1);return function(){crypto.getRandomValues(randomBuffer);return randomBuffer[0]}}else if(ENVIRONMENT_IS_NODE){try{var crypto_module=require(\"crypto\");return function(){return crypto_module[\"randomBytes\"](1)[0]}}catch(e){}}return function(){abort(\"no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };\")}}var PATH_FS={resolve:function(){var resolvedPath=\"\",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[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.charAt(0)===\"/\"}resolvedPath=PATH.normalizeArray(resolvedPath.split(\"/\").filter(function(p){return!!p}),!resolvedAbsolute).join(\"/\");return(resolvedAbsolute?\"/\":\"\")+resolvedPath||\".\"},relative:function(from,to){from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start<arr.length;start++){if(arr[start]!==\"\")break}var end=arr.length-1;for(;end>=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<length;i++){if(fromParts[i]!==toParts[i]){samePartsLength=i;break}}var outputParts=[];for(var i=samePartsLength;i<fromParts.length;i++){outputParts.push(\"..\")}outputParts=outputParts.concat(toParts.slice(samePartsLength));return outputParts.join(\"/\")}};var TTY={ttys:[],init:function(){},shutdown:function(){},register:function(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)},stream_ops:{open:function(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43)}stream.tty=tty;stream.seekable=false},close:function(stream){stream.tty.ops.flush(stream.tty)},flush:function(stream){stream.tty.ops.flush(stream.tty)},read:function(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;i<length;i++){var result;try{result=stream.tty.ops.get_char(stream.tty)}catch(e){throw new FS.ErrnoError(29)}if(result===undefined&&bytesRead===0){throw new FS.ErrnoError(6)}if(result===null||result===undefined)break;bytesRead++;buffer[offset+i]=result}if(bytesRead){stream.node.timestamp=Date.now()}return bytesRead},write:function(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.put_char){throw new FS.ErrnoError(60)}try{for(var i=0;i<length;i++){stream.tty.ops.put_char(stream.tty,buffer[offset+i])}}catch(e){throw new FS.ErrnoError(29)}if(length){stream.node.timestamp=Date.now()}return i}},default_tty_ops:{get_char:function(tty){if(!tty.input.length){var result=null;if(ENVIRONMENT_IS_NODE){var BUFSIZE=256;var buf=Buffer.alloc(BUFSIZE);var bytesRead=0;try{bytesRead=nodeFS.readSync(process.stdin.fd,buf,0,BUFSIZE,null)}catch(e){if(e.toString().includes(\"EOF\"))bytesRead=0;else throw e}if(bytesRead>0){result=buf.slice(0,bytesRead).toString(\"utf-8\")}else{result=null}}else if(typeof window!=\"undefined\"&&typeof window.prompt==\"function\"){result=window.prompt(\"Input: \");if(result!==null){result+=\"\\n\"}}else if(typeof readline==\"function\"){result=readline();if(result!==null){result+=\"\\n\"}}if(!result){return null}tty.input=intArrayFromString(result,true)}return tty.input.shift()},put_char:function(tty,val){if(val===null||val===10){out(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}}},default_tty1_ops:{put_char:function(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};function zeroMemory(address,size){HEAPU8.fill(0,address,address+size)}function alignMemory(size,alignment){assert(alignment,\"alignment argument is required\");return Math.ceil(size/alignment)*alignment}function mmapAlloc(size){size=alignMemory(size,65536);var ptr=_memalign(65536,size);if(!ptr)return 0;zeroMemory(ptr,size);return ptr}var MEMFS={ops_table:null,mount:function(mount){return MEMFS.createNode(null,\"/\",16384|511,0)},createNode:function(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}if(!MEMFS.ops_table){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.timestamp=Date.now();if(parent){parent.contents[name]=node;parent.timestamp=node.timestamp}return node},getFileDataAsTypedArray:function(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:function(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<CAPACITY_DOUBLING_MAX?2:1.125)>>>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:function(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:function(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.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr},setattr:function(node,attr){if(attr.mode!==undefined){node.mode=attr.mode}if(attr.timestamp!==undefined){node.timestamp=attr.timestamp}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}},lookup:function(parent,name){throw FS.genericErrors[44]},mknod:function(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename:function(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55)}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp;old_node.parent=new_dir},unlink:function(parent,name){delete parent.contents[name];parent.timestamp=Date.now()},rmdir:function(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55)}delete parent.contents[name];parent.timestamp=Date.now()},readdir:function(node){var entries=[\".\",\"..\"];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue}entries.push(key)}return entries},symlink:function(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink:function(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read:function(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);assert(size>=0);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i<size;i++)buffer[offset+i]=contents[position+i]}return size},write:function(stream,buffer,offset,length,position,canOwn){assert(!(buffer instanceof ArrayBuffer));if(buffer.buffer===HEAP8.buffer){canOwn=false}if(!length)return 0;var node=stream.node;node.timestamp=Date.now();if(buffer.subarray&&(!node.contents||node.contents.subarray)){if(canOwn){assert(position===0,\"canOwn must imply no weird position inside the file\");node.contents=buffer.subarray(offset,offset+length);node.usedBytes=length;return length}else if(node.usedBytes===0&&position===0){node.contents=buffer.slice(offset,offset+length);node.usedBytes=length;return length}else if(position+length<=node.usedBytes){node.contents.set(buffer.subarray(offset,offset+length),position);return length}}MEMFS.expandFileStorage(node,position+length);if(node.contents.subarray&&buffer.subarray){node.contents.set(buffer.subarray(offset,offset+length),position)}else{for(var i=0;i<length;i++){node.contents[position+i]=buffer[offset+i]}}node.usedBytes=Math.max(node.usedBytes,position+length);return length},llseek:function(stream,offset,whence){var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){position+=stream.node.usedBytes}}if(position<0){throw new FS.ErrnoError(28)}return position},allocate:function(stream,offset,length){MEMFS.expandFileStorage(stream.node,offset+length);stream.node.usedBytes=Math.max(stream.node.usedBytes,offset+length)},mmap:function(stream,address,length,position,prot,flags){if(address!==0){throw new FS.ErrnoError(28)}if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}var ptr;var allocated;var contents=stream.node.contents;if(!(flags&2)&&contents.buffer===buffer){allocated=false;ptr=contents.byteOffset}else{if(position>0||position+length<contents.length){if(contents.subarray){contents=contents.subarray(position,position+length)}else{contents=Array.prototype.slice.call(contents,position,position+length)}}allocated=true;ptr=mmapAlloc(length);if(!ptr){throw new FS.ErrnoError(48)}HEAP8.set(contents,ptr)}return{ptr:ptr,allocated:allocated}},msync:function(stream,buffer,offset,length,mmapFlags){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}if(mmapFlags&2){return 0}var bytesWritten=MEMFS.stream_ops.write(stream,buffer,0,length,offset,false);return 0}}};function asyncLoad(url,onload,onerror,noRunDep){var dep=!noRunDep?getUniqueRunDependency(\"al \"+url):\"\";readAsync(url,function(arrayBuffer){assert(arrayBuffer,'Loading data file \"'+url+'\" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},function(event){if(onerror){onerror()}else{throw'Loading data file \"'+url+'\" failed.'}});if(dep)addRunDependency(dep)}var ERRNO_MESSAGES={0:\"Success\",1:\"Arg list too long\",2:\"Permission denied\",3:\"Address already in use\",4:\"Address not available\",5:\"Address family not supported by protocol family\",6:\"No more processes\",7:\"Socket already connected\",8:\"Bad file number\",9:\"Trying to read unreadable message\",10:\"Mount device busy\",11:\"Operation canceled\",12:\"No children\",13:\"Connection aborted\",14:\"Connection refused\",15:\"Connection reset by peer\",16:\"File locking deadlock error\",17:\"Destination address required\",18:\"Math arg out of domain of func\",19:\"Quota exceeded\",20:\"File exists\",21:\"Bad address\",22:\"File too large\",23:\"Host is unreachable\",24:\"Identifier removed\",25:\"Illegal byte sequence\",26:\"Connection already in progress\",27:\"Interrupted system call\",28:\"Invalid argument\",29:\"I/O error\",30:\"Socket is already connected\",31:\"Is a directory\",32:\"Too many symbolic links\",33:\"Too many open files\",34:\"Too many links\",35:\"Message too long\",36:\"Multihop attempted\",37:\"File or path name too long\",38:\"Network interface is not configured\",39:\"Connection reset by network\",40:\"Network is unreachable\",41:\"Too many open files in system\",42:\"No buffer space available\",43:\"No such device\",44:\"No such file or directory\",45:\"Exec format error\",46:\"No record locks available\",47:\"The link has been severed\",48:\"Not enough core\",49:\"No message of desired type\",50:\"Protocol not available\",51:\"No space left on device\",52:\"Function not implemented\",53:\"Socket is not connected\",54:\"Not a directory\",55:\"Directory not empty\",56:\"State not recoverable\",57:\"Socket operation on non-socket\",59:\"Not a typewriter\",60:\"No such device or address\",61:\"Value too large for defined data type\",62:\"Previous owner died\",63:\"Not super-user\",64:\"Broken pipe\",65:\"Protocol error\",66:\"Unknown protocol\",67:\"Protocol wrong type for socket\",68:\"Math result not representable\",69:\"Read only file system\",70:\"Illegal seek\",71:\"No such process\",72:\"Stale file handle\",73:\"Connection timed out\",74:\"Text file busy\",75:\"Cross-device link\",100:\"Device not a stream\",101:\"Bad font file fmt\",102:\"Invalid slot\",103:\"Invalid request code\",104:\"No anode\",105:\"Block device required\",106:\"Channel number out of range\",107:\"Level 3 halted\",108:\"Level 3 reset\",109:\"Link number out of range\",110:\"Protocol driver not attached\",111:\"No CSI structure available\",112:\"Level 2 halted\",113:\"Invalid exchange\",114:\"Invalid request descriptor\",115:\"Exchange full\",116:\"No data (for no delay io)\",117:\"Timer expired\",118:\"Out of streams resources\",119:\"Machine is not on the network\",120:\"Package not installed\",121:\"The object is remote\",122:\"Advertise error\",123:\"Srmount error\",124:\"Communication error on send\",125:\"Cross mount point (not really error)\",126:\"Given log. name not unique\",127:\"f.d. invalid for this operation\",128:\"Remote address changed\",129:\"Can   access a needed shared lib\",130:\"Accessing a corrupted shared lib\",131:\".lib section in a.out corrupted\",132:\"Attempting to link in too many libs\",133:\"Attempting to exec a shared library\",135:\"Streams pipe error\",136:\"Too many users\",137:\"Socket type not supported\",138:\"Not supported\",139:\"Protocol family not supported\",140:\"Can't send after socket shutdown\",141:\"Too many references\",142:\"Host is down\",148:\"No medium (in tape drive)\",156:\"Level 2 not synchronized\"};var ERRNO_CODES={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:\"/\",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(path,opts){path=PATH_FS.resolve(FS.cwd(),path);opts=opts||{};if(!path)return{path:\"\",node:null};var defaults={follow_mount:true,recurse_count:0};for(var key in defaults){if(opts[key]===undefined){opts[key]=defaults[key]}}if(opts.recurse_count>8){throw new FS.ErrnoError(32)}var parts=PATH.normalizeArray(path.split(\"/\").filter(function(p){return!!p}),false);var current=FS.root;var current_path=\"/\";for(var i=0;i<parts.length;i++){var islast=i===parts.length-1;if(islast&&opts.parent){break}current=FS.lookupNode(current,parts[i]);current_path=PATH.join2(current_path,parts[i]);if(FS.isMountpoint(current)){if(!islast||islast&&opts.follow_mount){current=current.mounted.root}}if(!islast||opts.follow){var count=0;while(FS.isLink(current.mode)){var link=FS.readlink(current_path);current_path=PATH_FS.resolve(PATH.dirname(current_path),link);var lookup=FS.lookupPath(current_path,{recurse_count:opts.recurse_count});current=lookup.node;if(count++>40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath:function(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!==\"/\"?mount+\"/\"+path:mount+path}path=path?node.name+\"/\"+path:node.name;node=node.parent}},hashName:function(parentid,name){var hash=0;for(var i=0;i<name.length;i++){hash=(hash<<5)-hash+name.charCodeAt(i)|0}return(parentid+hash>>>0)%FS.nameTable.length},hashAddNode:function(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode:function(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:function(parent,name){var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode,parent)}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:function(parent,name,mode,rdev){assert(typeof parent===\"object\");var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode:function(node){FS.hashRemoveNode(node)},isRoot:function(node){return node===node.parent},isMountpoint:function(node){return!!node.mounted},isFile:function(mode){return(mode&61440)===32768},isDir:function(mode){return(mode&61440)===16384},isLink:function(mode){return(mode&61440)===40960},isChrdev:function(mode){return(mode&61440)===8192},isBlkdev:function(mode){return(mode&61440)===24576},isFIFO:function(mode){return(mode&61440)===4096},isSocket:function(mode){return(mode&49152)===49152},flagModes:{\"r\":0,\"r+\":2,\"w\":577,\"w+\":578,\"a\":1089,\"a+\":1090},modeStringToFlags:function(str){var flags=FS.flagModes[str];if(typeof flags===\"undefined\"){throw new Error(\"Unknown file open mode: \"+str)}return flags},flagsToPermissionString:function(flag){var perms=[\"r\",\"w\",\"rw\"][flag&3];if(flag&512){perms+=\"w\"}return perms},nodePermissions:function(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:function(dir){var errCode=FS.nodePermissions(dir,\"x\");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate:function(dir,name){try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,\"wx\")},mayDelete:function(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:function(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){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd:function(fd_start,fd_end){fd_start=fd_start||0;fd_end=fd_end||FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStream:function(fd){return FS.streams[fd]},createStream:function(stream,fd_start,fd_end){if(!FS.FSStream){FS.FSStream=function(){};FS.FSStream.prototype={object:{get:function(){return this.node},set:function(val){this.node=val}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}}}}var newStream=new FS.FSStream;for(var p in stream){newStream[p]=stream[p]}stream=newStream;var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream:function(fd){FS.streams[fd]=null},chrdev_stream_ops:{open:function(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek:function(){throw new FS.ErrnoError(70)}},major:function(dev){return dev>>8},minor:function(dev){return dev&255},makedev:function(ma,mi){return ma<<8|mi},registerDevice:function(dev,ops){FS.devices[dev]={stream_ops:ops}},getDevice:function(dev){return FS.devices[dev]},getMounts:function(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs:function(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){assert(FS.syncFSRequests>0);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(function(mount){if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount:function(type,opts,mountpoint){if(typeof type===\"string\"){throw type}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:type,opts:opts,mountpoint: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:function(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(function(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);assert(idx!==-1);node.mount.mounts.splice(idx,1)},lookup:function(parent,name){return parent.node_ops.lookup(parent,name)},mknod:function(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name===\".\"||name===\"..\"){throw new FS.ErrnoError(28)}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)},create:function(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir:function(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree:function(path,mode){var dirs=path.split(\"/\");var d=\"\";for(var i=0;i<dirs.length;++i){if(!dirs[i])continue;d+=\"/\"+dirs[i];try{FS.mkdir(d,mode)}catch(e){if(e.errno!=20)throw e}}},mkdev:function(path,mode,dev){if(typeof dev===\"undefined\"){dev=mode;mode=438}mode|=8192;return FS.mknod(path,mode,dev)},symlink:function(oldpath,newpath){if(!PATH_FS.resolve(oldpath)){throw new FS.ErrnoError(44)}var lookup=FS.lookupPath(newpath,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var newname=PATH.basename(newpath);var errCode=FS.mayCreate(parent,newname);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.symlink){throw new FS.ErrnoError(63)}return parent.node_ops.symlink(parent,newname,oldpath)},rename:function(old_path,new_path){var old_dirname=PATH.dirname(old_path);var new_dirname=PATH.dirname(new_path);var old_name=PATH.basename(old_path);var new_name=PATH.basename(new_path);var lookup,old_dir,new_dir;lookup=FS.lookupPath(old_path,{parent:true});old_dir=lookup.node;lookup=FS.lookupPath(new_path,{parent:true});new_dir=lookup.node;if(!old_dir||!new_dir)throw new FS.ErrnoError(44);if(old_dir.mount!==new_dir.mount){throw new FS.ErrnoError(75)}var old_node=FS.lookupNode(old_dir,old_name);var relative=PATH_FS.relative(old_path,new_dirname);if(relative.charAt(0)!==\".\"){throw new FS.ErrnoError(28)}relative=PATH_FS.relative(new_path,old_dirname);if(relative.charAt(0)!==\".\"){throw new FS.ErrnoError(55)}var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(old_node===new_node){return}var isdir=FS.isDir(old_node.mode);var errCode=FS.mayDelete(old_dir,old_name,isdir);if(errCode){throw new FS.ErrnoError(errCode)}errCode=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name);if(errCode){throw new FS.ErrnoError(errCode)}if(!old_dir.node_ops.rename){throw new FS.ErrnoError(63)}if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node)){throw new FS.ErrnoError(10)}if(new_dir!==old_dir){errCode=FS.nodePermissions(old_dir,\"w\");if(errCode){throw new FS.ErrnoError(errCode)}}try{if(FS.trackingDelegate[\"willMovePath\"]){FS.trackingDelegate[\"willMovePath\"](old_path,new_path)}}catch(e){err(\"FS.trackingDelegate['willMovePath']('\"+old_path+\"', '\"+new_path+\"') threw an exception: \"+e.message)}FS.hashRemoveNode(old_node);try{old_dir.node_ops.rename(old_node,new_dir,new_name)}catch(e){throw e}finally{FS.hashAddNode(old_node)}try{if(FS.trackingDelegate[\"onMovePath\"])FS.trackingDelegate[\"onMovePath\"](old_path,new_path)}catch(e){err(\"FS.trackingDelegate['onMovePath']('\"+old_path+\"', '\"+new_path+\"') threw an exception: \"+e.message)}},rmdir:function(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,true);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.rmdir){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}try{if(FS.trackingDelegate[\"willDeletePath\"]){FS.trackingDelegate[\"willDeletePath\"](path)}}catch(e){err(\"FS.trackingDelegate['willDeletePath']('\"+path+\"') threw an exception: \"+e.message)}parent.node_ops.rmdir(parent,name);FS.destroyNode(node);try{if(FS.trackingDelegate[\"onDeletePath\"])FS.trackingDelegate[\"onDeletePath\"](path)}catch(e){err(\"FS.trackingDelegate['onDeletePath']('\"+path+\"') threw an exception: \"+e.message)}},readdir:function(path){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node.node_ops.readdir){throw new FS.ErrnoError(54)}return node.node_ops.readdir(node)},unlink:function(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,false);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.unlink){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}try{if(FS.trackingDelegate[\"willDeletePath\"]){FS.trackingDelegate[\"willDeletePath\"](path)}}catch(e){err(\"FS.trackingDelegate['willDeletePath']('\"+path+\"') threw an exception: \"+e.message)}parent.node_ops.unlink(parent,name);FS.destroyNode(node);try{if(FS.trackingDelegate[\"onDeletePath\"])FS.trackingDelegate[\"onDeletePath\"](path)}catch(e){err(\"FS.trackingDelegate['onDeletePath']('\"+path+\"') threw an exception: \"+e.message)}},readlink:function(path){var lookup=FS.lookupPath(path);var link=lookup.node;if(!link){throw new FS.ErrnoError(44)}if(!link.node_ops.readlink){throw new FS.ErrnoError(28)}return PATH_FS.resolve(FS.getPath(link.parent),link.node_ops.readlink(link))},stat:function(path,dontFollow){var lookup=FS.lookupPath(path,{follow:!dontFollow});var node=lookup.node;if(!node){throw new FS.ErrnoError(44)}if(!node.node_ops.getattr){throw new FS.ErrnoError(63)}return node.node_ops.getattr(node)},lstat:function(path){return FS.stat(path,true)},chmod:function(path,mode,dontFollow){var node;if(typeof path===\"string\"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{mode:mode&4095|node.mode&~4095,timestamp:Date.now()})},lchmod:function(path,mode){FS.chmod(path,mode,true)},fchmod:function(fd,mode){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chmod(stream.node,mode)},chown:function(path,uid,gid,dontFollow){var node;if(typeof path===\"string\"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{timestamp:Date.now()})},lchown:function(path,uid,gid){FS.chown(path,uid,gid,true)},fchown:function(fd,uid,gid){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chown(stream.node,uid,gid)},truncate:function(path,len){if(len<0){throw new FS.ErrnoError(28)}var node;if(typeof path===\"string\"){var lookup=FS.lookupPath(path,{follow:true});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}if(FS.isDir(node.mode)){throw new FS.ErrnoError(31)}if(!FS.isFile(node.mode)){throw new FS.ErrnoError(28)}var errCode=FS.nodePermissions(node,\"w\");if(errCode){throw new FS.ErrnoError(errCode)}node.node_ops.setattr(node,{size:len,timestamp:Date.now()})},ftruncate:function(fd,len){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(28)}FS.truncate(stream.node,len)},utime:function(path,atime,mtime){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;node.node_ops.setattr(node,{timestamp:Math.max(atime,mtime)})},open:function(path,flags,mode,fd_start,fd_end){if(path===\"\"){throw new FS.ErrnoError(44)}flags=typeof flags===\"string\"?FS.modeStringToFlags(flags):flags;mode=typeof mode===\"undefined\"?438:mode;if(flags&64){mode=mode&4095|32768}else{mode=0}var node;if(typeof path===\"object\"){node=path}else{path=PATH.normalize(path);try{var lookup=FS.lookupPath(path,{follow:!(flags&131072)});node=lookup.node}catch(e){}}var created=false;if(flags&64){if(node){if(flags&128){throw new FS.ErrnoError(20)}}else{node=FS.mknod(path,mode,0);created=true}}if(!node){throw new FS.ErrnoError(44)}if(FS.isChrdev(node.mode)){flags&=~512}if(flags&65536&&!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}if(!created){var errCode=FS.mayOpen(node,flags);if(errCode){throw new FS.ErrnoError(errCode)}}if(flags&512){FS.truncate(node,0)}flags&=~(128|512|131072);var stream=FS.createStream({node:node,path:FS.getPath(node),flags:flags,seekable:true,position:0,stream_ops:node.stream_ops,ungotten:[],error:false},fd_start,fd_end);if(stream.stream_ops.open){stream.stream_ops.open(stream)}if(Module[\"logReadFiles\"]&&!(flags&1)){if(!FS.readFiles)FS.readFiles={};if(!(path in FS.readFiles)){FS.readFiles[path]=1;err(\"FS.trackingDelegate error on read file: \"+path)}}try{if(FS.trackingDelegate[\"onOpenFile\"]){var trackingFlags=0;if((flags&2097155)!==1){trackingFlags|=FS.tracking.openFlags.READ}if((flags&2097155)!==0){trackingFlags|=FS.tracking.openFlags.WRITE}FS.trackingDelegate[\"onOpenFile\"](path,trackingFlags)}}catch(e){err(\"FS.trackingDelegate['onOpenFile']('\"+path+\"', flags) threw an exception: \"+e.message)}return stream},close:function(stream){if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(stream.getdents)stream.getdents=null;try{if(stream.stream_ops.close){stream.stream_ops.close(stream)}}catch(e){throw e}finally{FS.closeStream(stream.fd)}stream.fd=null},isClosed:function(stream){return stream.fd===null},llseek:function(stream,offset,whence){if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(!stream.seekable||!stream.stream_ops.llseek){throw new FS.ErrnoError(70)}if(whence!=0&&whence!=1&&whence!=2){throw new FS.ErrnoError(28)}stream.position=stream.stream_ops.llseek(stream,offset,whence);stream.ungotten=[];return stream.position},read:function(stream,buffer,offset,length,position){if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.read){throw new FS.ErrnoError(28)}var seeking=typeof position!==\"undefined\";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead},write:function(stream,buffer,offset,length,position,canOwn){if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.write){throw new FS.ErrnoError(28)}if(stream.seekable&&stream.flags&1024){FS.llseek(stream,0,2)}var seeking=typeof position!==\"undefined\";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;try{if(stream.path&&FS.trackingDelegate[\"onWriteToFile\"])FS.trackingDelegate[\"onWriteToFile\"](stream.path)}catch(e){err(\"FS.trackingDelegate['onWriteToFile']('\"+stream.path+\"') threw an exception: \"+e.message)}return bytesWritten},allocate:function(stream,offset,length){if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(offset<0||length<=0){throw new FS.ErrnoError(28)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(!FS.isFile(stream.node.mode)&&!FS.isDir(stream.node.mode)){throw new FS.ErrnoError(43)}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(138)}stream.stream_ops.allocate(stream,offset,length)},mmap:function(stream,address,length,position,prot,flags){if((prot&2)!==0&&(flags&2)===0&&(stream.flags&2097155)!==2){throw new FS.ErrnoError(2)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(2)}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(43)}return stream.stream_ops.mmap(stream,address,length,position,prot,flags)},msync:function(stream,buffer,offset,length,mmapFlags){if(!stream||!stream.stream_ops.msync){return 0}return stream.stream_ops.msync(stream,buffer,offset,length,mmapFlags)},munmap:function(stream){return 0},ioctl:function(stream,cmd,arg){if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(59)}return stream.stream_ops.ioctl(stream,cmd,arg)},readFile:function(path,opts){opts=opts||{};opts.flags=opts.flags||0;opts.encoding=opts.encoding||\"binary\";if(opts.encoding!==\"utf8\"&&opts.encoding!==\"binary\"){throw new Error('Invalid encoding type \"'+opts.encoding+'\"')}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding===\"utf8\"){ret=UTF8ArrayToString(buf,0)}else if(opts.encoding===\"binary\"){ret=buf}FS.close(stream);return ret},writeFile:function(path,data,opts){opts=opts||{};opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);if(typeof data===\"string\"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,undefined,opts.canOwn)}else if(ArrayBuffer.isView(data)){FS.write(stream,data,0,data.byteLength,undefined,opts.canOwn)}else{throw new Error(\"Unsupported data type\")}FS.close(stream)},cwd:function(){return FS.currentPath},chdir:function(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:function(){FS.mkdir(\"/tmp\");FS.mkdir(\"/home\");FS.mkdir(\"/home/web_user\")},createDefaultDevices:function(){FS.mkdir(\"/dev\");FS.registerDevice(FS.makedev(1,3),{read:function(){return 0},write:function(stream,buffer,offset,length,pos){return length}});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 random_device=getRandomDevice();FS.createDevice(\"/dev\",\"random\",random_device);FS.createDevice(\"/dev\",\"urandom\",random_device);FS.mkdir(\"/dev/shm\");FS.mkdir(\"/dev/shm/tmp\")},createSpecialDirectories:function(){FS.mkdir(\"/proc\");var proc_self=FS.mkdir(\"/proc/self\");FS.mkdir(\"/proc/self/fd\");FS.mount({mount:function(){var node=FS.createNode(proc_self,\"fd\",16384|511,73);node.node_ops={lookup:function(parent,name){var fd=+name;var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);var ret={parent:null,mount:{mountpoint:\"fake\"},node_ops:{readlink:function(){return stream.path}}};ret.parent=ret;return ret}};return node}},{},\"/proc/self/fd\")},createStandardStreams:function(){if(Module[\"stdin\"]){FS.createDevice(\"/dev\",\"stdin\",Module[\"stdin\"])}else{FS.symlink(\"/dev/tty\",\"/dev/stdin\")}if(Module[\"stdout\"]){FS.createDevice(\"/dev\",\"stdout\",null,Module[\"stdout\"])}else{FS.symlink(\"/dev/tty\",\"/dev/stdout\")}if(Module[\"stderr\"]){FS.createDevice(\"/dev\",\"stderr\",null,Module[\"stderr\"])}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);assert(stdin.fd===0,\"invalid handle for stdin (\"+stdin.fd+\")\");assert(stdout.fd===1,\"invalid handle for stdout (\"+stdout.fd+\")\");assert(stderr.fd===2,\"invalid handle for stderr (\"+stderr.fd+\")\")},ensureErrnoError:function(){if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.node=node;this.setErrno=function(errno){this.errno=errno;for(var key in ERRNO_CODES){if(ERRNO_CODES[key]===errno){this.code=key;break}}};this.setErrno(errno);this.message=ERRNO_MESSAGES[errno];if(this.stack){Object.defineProperty(this,\"stack\",{value:(new Error).stack,writable:true});this.stack=demangleAll(this.stack)}};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[44].forEach(function(code){FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=\"<generic error, no stack>\"})},staticInit:function(){FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},\"/\");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={\"MEMFS\":MEMFS}},init:function(input,output,error){assert(!FS.init.initialized,\"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)\");FS.init.initialized=true;FS.ensureErrnoError();Module[\"stdin\"]=input||Module[\"stdin\"];Module[\"stdout\"]=output||Module[\"stdout\"];Module[\"stderr\"]=error||Module[\"stderr\"];FS.createStandardStreams()},quit:function(){FS.init.initialized=false;var fflush=Module[\"_fflush\"];if(fflush)fflush(0);for(var i=0;i<FS.streams.length;i++){var stream=FS.streams[i];if(!stream){continue}FS.close(stream)}},getMode:function(canRead,canWrite){var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode},findObject:function(path,dontResolveLastLink){var ret=FS.analyzePath(path,dontResolveLastLink);if(ret.exists){return ret.object}else{return null}},analyzePath:function(path,dontResolveLastLink){try{var lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});path=lookup.path}catch(e){}var ret={isRoot:false,exists:false,error:0,name:null,path:null,object:null,parentExists:false,parentPath:null,parentObject:null};try{var lookup=FS.lookupPath(path,{parent:true});ret.parentExists=true;ret.parentPath=lookup.path;ret.parentObject=lookup.node;ret.name=PATH.basename(path);lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});ret.exists=true;ret.path=lookup.path;ret.object=lookup.node;ret.name=lookup.node.name;ret.isRoot=lookup.path===\"/\"}catch(e){ret.error=e.errno}return ret},createPath:function(parent,path,canRead,canWrite){parent=typeof parent===\"string\"?parent:FS.getPath(parent);var parts=path.split(\"/\").reverse();while(parts.length){var part=parts.pop();if(!part)continue;var current=PATH.join2(parent,part);try{FS.mkdir(current)}catch(e){}parent=current}return current},createFile:function(parent,name,properties,canRead,canWrite){var path=PATH.join2(typeof parent===\"string\"?parent:FS.getPath(parent),name);var mode=FS.getMode(canRead,canWrite);return FS.create(path,mode)},createDataFile:function(parent,name,data,canRead,canWrite,canOwn){var path=name?PATH.join2(typeof parent===\"string\"?parent:FS.getPath(parent),name):parent;var mode=FS.getMode(canRead,canWrite);var node=FS.create(path,mode);if(data){if(typeof data===\"string\"){var arr=new Array(data.length);for(var i=0,len=data.length;i<len;++i)arr[i]=data.charCodeAt(i);data=arr}FS.chmod(node,mode|146);var stream=FS.open(node,577);FS.write(stream,data,0,data.length,0,canOwn);FS.close(stream);FS.chmod(node,mode)}return node},createDevice:function(parent,name,input,output){var path=PATH.join2(typeof parent===\"string\"?parent:FS.getPath(parent),name);var mode=FS.getMode(!!input,!!output);if(!FS.createDevice.major)FS.createDevice.major=64;var dev=FS.makedev(FS.createDevice.major++,0);FS.registerDevice(dev,{open:function(stream){stream.seekable=false},close:function(stream){if(output&&output.buffer&&output.buffer.length){output(10)}},read:function(stream,buffer,offset,length,pos){var bytesRead=0;for(var i=0;i<length;i++){var result;try{result=input()}catch(e){throw new FS.ErrnoError(29)}if(result===undefined&&bytesRead===0){throw new FS.ErrnoError(6)}if(result===null||result===undefined)break;bytesRead++;buffer[offset+i]=result}if(bytesRead){stream.node.timestamp=Date.now()}return bytesRead},write:function(stream,buffer,offset,length,pos){for(var i=0;i<length;i++){try{output(buffer[offset+i])}catch(e){throw new FS.ErrnoError(29)}}if(length){stream.node.timestamp=Date.now()}return i}});return FS.mkdev(path,mode,dev)},forceLoadFile:function(obj){if(obj.isDevice||obj.isFolder||obj.link||obj.contents)return true;if(typeof XMLHttpRequest!==\"undefined\"){throw new Error(\"Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.\")}else if(read_){try{obj.contents=intArrayFromString(read_(obj.url),true);obj.usedBytes=obj.contents.length}catch(e){throw new FS.ErrnoError(29)}}else{throw new Error(\"Cannot load without read() or XMLHttpRequest.\")}},createLazyFile:function(parent,name,url,canRead,canWrite){function LazyUint8Array(){this.lengthKnown=false;this.chunks=[]}LazyUint8Array.prototype.get=function LazyUint8Array_get(idx){if(idx>this.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_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=function(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);if(typeof Uint8Array!=\"undefined\")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||[])}else{return intArrayFromString(xhr.responseText||\"\",true)}};var lazyArray=this;lazyArray.setDataGetter(function(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};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;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url: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(function(key){var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments)}});stream_ops.read=function stream_ops_read(stream,buffer,offset,length,position){FS.forceLoadFile(node);var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);assert(size>=0);if(contents.slice){for(var i=0;i<size;i++){buffer[offset+i]=contents[position+i]}}else{for(var i=0;i<size;i++){buffer[offset+i]=contents.get(position+i)}}return size};node.stream_ops=stream_ops;return node},createPreloadedFile:function(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn,preFinish){Browser.init();var fullname=name?PATH_FS.resolve(PATH.join2(parent,name)):parent;var dep=getUniqueRunDependency(\"cp \"+fullname);function processData(byteArray){function finish(byteArray){if(preFinish)preFinish();if(!dontCreateFile){FS.createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}if(onload)onload();removeRunDependency(dep)}var handled=false;Module[\"preloadPlugins\"].forEach(function(plugin){if(handled)return;if(plugin[\"canHandle\"](fullname)){plugin[\"handle\"](byteArray,fullname,finish,function(){if(onerror)onerror();removeRunDependency(dep)});handled=true}});if(!handled)finish(byteArray)}addRunDependency(dep);if(typeof url==\"string\"){asyncLoad(url,function(byteArray){processData(byteArray)},onerror)}else{processData(url)}},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return\"EM_FS_\"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:\"FILE_DATA\",saveFilesToDB:function(paths,onload,onerror){onload=onload||function(){};onerror=onerror||function(){};var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=function openRequest_onupgradeneeded(){out(\"creating db\");var db=openRequest.result;db.createObjectStore(FS.DB_STORE_NAME)};openRequest.onsuccess=function openRequest_onsuccess(){var db=openRequest.result;var transaction=db.transaction([FS.DB_STORE_NAME],\"readwrite\");var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach(function(path){var putRequest=files.put(FS.analyzePath(path).object.contents,path);putRequest.onsuccess=function putRequest_onsuccess(){ok++;if(ok+fail==total)finish()};putRequest.onerror=function putRequest_onerror(){fail++;if(ok+fail==total)finish()}});transaction.onerror=onerror};openRequest.onerror=onerror},loadFilesFromDB:function(paths,onload,onerror){onload=onload||function(){};onerror=onerror||function(){};var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=onerror;openRequest.onsuccess=function openRequest_onsuccess(){var db=openRequest.result;try{var transaction=db.transaction([FS.DB_STORE_NAME],\"readonly\")}catch(e){onerror(e);return}var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach(function(path){var getRequest=files.get(path);getRequest.onsuccess=function getRequest_onsuccess(){if(FS.analyzePath(path).exists){FS.unlink(path)}FS.createDataFile(PATH.dirname(path),PATH.basename(path),getRequest.result,true,true,true);ok++;if(ok+fail==total)finish()};getRequest.onerror=function getRequest_onerror(){fail++;if(ok+fail==total)finish()}});transaction.onerror=onerror};openRequest.onerror=onerror},absolutePath:function(){abort(\"FS.absolutePath has been removed; use PATH_FS.resolve instead\")},createFolder:function(){abort(\"FS.createFolder has been removed; use FS.mkdir instead\")},createLink:function(){abort(\"FS.createLink has been removed; use FS.symlink instead\")},joinPath:function(){abort(\"FS.joinPath has been removed; use PATH.join instead\")},mmapAlloc:function(){abort(\"FS.mmapAlloc has been replaced by the top level function mmapAlloc\")},standardizePath:function(){abort(\"FS.standardizePath has been removed; use PATH.normalize instead\")}};var SYSCALLS={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(dirfd,path,allowEmpty){if(path[0]===\"/\"){return path}var dir;if(dirfd===-100){dir=FS.cwd()}else{var dirstream=FS.getStream(dirfd);if(!dirstream)throw new FS.ErrnoError(8);dir=dirstream.path}if(path.length==0){if(!allowEmpty){throw new FS.ErrnoError(44)}return dir}return PATH.join2(dir,path)},doStat:function(func,path,buf){try{var stat=func(path)}catch(e){if(e&&e.node&&PATH.normalize(path)!==PATH.normalize(FS.getPath(e.node))){return-54}throw e}HEAP32[buf>>2]=stat.dev;HEAP32[buf+4>>2]=0;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAP32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;HEAP32[buf+32>>2]=0;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAP32[buf+48>>2]=4096;HEAP32[buf+52>>2]=stat.blocks;HEAP32[buf+56>>2]=stat.atime.getTime()/1e3|0;HEAP32[buf+60>>2]=0;HEAP32[buf+64>>2]=stat.mtime.getTime()/1e3|0;HEAP32[buf+68>>2]=0;HEAP32[buf+72>>2]=stat.ctime.getTime()/1e3|0;HEAP32[buf+76>>2]=0;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+80>>2]=tempI64[0],HEAP32[buf+84>>2]=tempI64[1];return 0},doMsync:function(addr,stream,len,flags,offset){var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},doMkdir:function(path,mode){path=PATH.normalize(path);if(path[path.length-1]===\"/\")path=path.substr(0,path.length-1);FS.mkdir(path,mode,0);return 0},doMknod:function(path,mode,dev){switch(mode&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}FS.mknod(path,mode,dev);return 0},doReadlink:function(path,buf,bufsize){if(bufsize<=0)return-28;var ret=FS.readlink(path);var len=Math.min(bufsize,lengthBytesUTF8(ret));var endChar=HEAP8[buf+len];stringToUTF8(ret,buf,bufsize+1);HEAP8[buf+len]=endChar;return len},doAccess:function(path,amode){if(amode&~7){return-28}var node;var lookup=FS.lookupPath(path,{follow:true});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},doDup:function(path,flags,suggestFD){var suggest=FS.getStream(suggestFD);if(suggest)FS.close(suggest);return FS.open(path,flags,0,suggestFD,suggestFD).fd},doReadv:function(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i<iovcnt;i++){var ptr=HEAP32[iov+i*8>>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr<len)break}return ret},doWritev:function(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i<iovcnt;i++){var ptr=HEAP32[iov+i*8>>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr}return ret},varargs:undefined,get:function(){assert(SYSCALLS.varargs!=undefined);SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret},getStreamFromFD:function(fd){var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);return stream},get64:function(low,high){if(low>=0)assert(high===0);else assert(high===-1);return low}};function ___sys_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-28}var newStream;newStream=FS.open(stream.path,stream.flags,0,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0}case 12:{var arg=SYSCALLS.get();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 13:case 14:return 0;case 16:case 8:return-28;case 9:setErrNo(28);return-1;default:{return-28}}}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(op){case 21509:case 21505:{if(!stream.tty)return-59;return 0}case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:{if(!stream.tty)return-59;return 0}case 21519:{if(!stream.tty)return-59;var argp=SYSCALLS.get();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-59;return-28}case 21531:{var argp=SYSCALLS.get();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-59;return 0}case 21524:{if(!stream.tty)return-59;return 0}default:abort(\"bad ioctl syscall \"+op)}}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function syscallMmap2(addr,len,prot,flags,fd,off){off<<=12;var ptr;var allocated=false;if((flags&16)!==0&&addr%65536!==0){return-28}if((flags&32)!==0){ptr=mmapAlloc(len);if(!ptr)return-48;allocated=true}else{var info=FS.getStream(fd);if(!info)return-8;var res=FS.mmap(info,addr,len,off,prot,flags);ptr=res.ptr;allocated=res.allocated}SYSCALLS.mappings[ptr]={malloc:ptr,len:len,allocated:allocated,fd:fd,prot:prot,flags:flags,offset:off};return ptr}function ___sys_mmap2(addr,len,prot,flags,fd,off){try{return syscallMmap2(addr,len,prot,flags,fd,off)}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_open(path,flags,varargs){SYSCALLS.varargs=varargs;try{var pathname=SYSCALLS.getStr(path);var mode=varargs?SYSCALLS.get():0;var stream=FS.open(pathname,flags,mode);return stream.fd}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_stat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.stat,path,buf)}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}var char_0=48;var char_9=57;function makeLegalFunctionName(name){if(undefined===name){return\"_unknown\"}name=name.replace(/[^a-zA-Z0-9_]/g,\"$\");var f=name.charCodeAt(0);if(f>=char_0&&f<=char_9){return\"_\"+name}else{return name}}function createNamedFunction(name,body){name=makeLegalFunctionName(name);return new Function(\"body\",\"return function \"+name+\"() {\\n\"+'    \"use strict\";'+\"    return body.apply(this, arguments);\\n\"+\"};\\n\")(body)}var emval_free_list=[];var emval_handle_array=[{},{value:undefined},{value:null},{value:true},{value:false}];function count_emval_handles(){var count=0;for(var i=5;i<emval_handle_array.length;++i){if(emval_handle_array[i]!==undefined){++count}}return count}function get_first_emval(){for(var i=5;i<emval_handle_array.length;++i){if(emval_handle_array[i]!==undefined){return emval_handle_array[i]}}return null}function init_emval(){Module[\"count_emval_handles\"]=count_emval_handles;Module[\"get_first_emval\"]=get_first_emval}function __emval_register(value){switch(value){case undefined:{return 1}case null:{return 2}case true:{return 3}case false:{return 4}default:{var handle=emval_free_list.length?emval_free_list.pop():emval_handle_array.length;emval_handle_array[handle]={refcount:1,value:value};return handle}}}function extendError(baseErrorType,errorName){var errorClass=createNamedFunction(errorName,function(message){this.name=errorName;this.message=message;var stack=new Error(message).stack;if(stack!==undefined){this.stack=this.toString()+\"\\n\"+stack.replace(/^Error(:[^\\n]*)?\\n/,\"\")}});errorClass.prototype=Object.create(baseErrorType.prototype);errorClass.prototype.constructor=errorClass;errorClass.prototype.toString=function(){if(this.message===undefined){return this.name}else{return this.name+\": \"+this.message}};return errorClass}var PureVirtualError=undefined;function embind_init_charCodes(){var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes}var embind_charCodes=undefined;function readLatin1String(ptr){var ret=\"\";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret}function getInheritedInstanceCount(){return Object.keys(registeredInstances).length}function getLiveInheritedInstances(){var rv=[];for(var k in registeredInstances){if(registeredInstances.hasOwnProperty(k)){rv.push(registeredInstances[k])}}return rv}var deletionQueue=[];function flushPendingDeletes(){while(deletionQueue.length){var obj=deletionQueue.pop();obj.$$.deleteScheduled=false;obj[\"delete\"]()}}var delayFunction=undefined;function setDelayFunction(fn){delayFunction=fn;if(deletionQueue.length&&delayFunction){delayFunction(flushPendingDeletes)}}function init_embind(){Module[\"getInheritedInstanceCount\"]=getInheritedInstanceCount;Module[\"getLiveInheritedInstances\"]=getLiveInheritedInstances;Module[\"flushPendingDeletes\"]=flushPendingDeletes;Module[\"setDelayFunction\"]=setDelayFunction}var registeredInstances={};var BindingError=undefined;function throwBindingError(message){throw new BindingError(message)}function getBasestPointer(class_,ptr){if(ptr===undefined){throwBindingError(\"ptr should not be undefined\")}while(class_.baseClass){ptr=class_.upcast(ptr);class_=class_.baseClass}return ptr}function registerInheritedInstance(class_,ptr,instance){ptr=getBasestPointer(class_,ptr);if(registeredInstances.hasOwnProperty(ptr)){throwBindingError(\"Tried to register registered instance: \"+ptr)}else{registeredInstances[ptr]=instance}}function requireHandle(handle){if(!handle){throwBindingError(\"Cannot use deleted val. handle = \"+handle)}return emval_handle_array[handle].value}var registeredTypes={};function getTypeName(type){var ptr=___getTypeName(type);var rv=readLatin1String(ptr);_free(ptr);return rv}function requireRegisteredType(rawType,humanName){var impl=registeredTypes[rawType];if(undefined===impl){throwBindingError(humanName+\" has unknown type \"+getTypeName(rawType))}return impl}function unregisterInheritedInstance(class_,ptr){ptr=getBasestPointer(class_,ptr);if(registeredInstances.hasOwnProperty(ptr)){delete registeredInstances[ptr]}else{throwBindingError(\"Tried to unregister unregistered instance: \"+ptr)}}function detachFinalizer(handle){}var finalizationGroup=false;function runDestructor($$){if($$.smartPtr){$$.smartPtrType.rawDestructor($$.smartPtr)}else{$$.ptrType.registeredClass.rawDestructor($$.ptr)}}function releaseClassHandle($$){$$.count.value-=1;var toDelete=0===$$.count.value;if(toDelete){runDestructor($$)}}function attachFinalizer(handle){if(\"undefined\"===typeof FinalizationGroup){attachFinalizer=function(handle){return handle};return handle}finalizationGroup=new FinalizationGroup(function(iter){for(var result=iter.next();!result.done;result=iter.next()){var $$=result.value;if(!$$.ptr){console.warn(\"object already deleted: \"+$$.ptr)}else{releaseClassHandle($$)}}});attachFinalizer=function(handle){finalizationGroup.register(handle,handle.$$,handle.$$);return handle};detachFinalizer=function(handle){finalizationGroup.unregister(handle.$$)};return attachFinalizer(handle)}function __embind_create_inheriting_constructor(constructorName,wrapperType,properties){constructorName=readLatin1String(constructorName);wrapperType=requireRegisteredType(wrapperType,\"wrapper\");properties=requireHandle(properties);var arraySlice=[].slice;var registeredClass=wrapperType.registeredClass;var wrapperPrototype=registeredClass.instancePrototype;var baseClass=registeredClass.baseClass;var baseClassPrototype=baseClass.instancePrototype;var baseConstructor=registeredClass.baseClass.constructor;var ctor=createNamedFunction(constructorName,function(){registeredClass.baseClass.pureVirtualFunctions.forEach(function(name){if(this[name]===baseClassPrototype[name]){throw new PureVirtualError(\"Pure virtual function \"+name+\" must be implemented in JavaScript\")}}.bind(this));Object.defineProperty(this,\"__parent\",{value:wrapperPrototype});this[\"__construct\"].apply(this,arraySlice.call(arguments))});wrapperPrototype[\"__construct\"]=function __construct(){if(this===wrapperPrototype){throwBindingError(\"Pass correct 'this' to __construct\")}var inner=baseConstructor[\"implement\"].apply(undefined,[this].concat(arraySlice.call(arguments)));detachFinalizer(inner);var $$=inner.$$;inner[\"notifyOnDestruction\"]();$$.preservePointerOnDelete=true;Object.defineProperties(this,{$$:{value:$$}});attachFinalizer(this);registerInheritedInstance(registeredClass,$$.ptr,this)};wrapperPrototype[\"__destruct\"]=function __destruct(){if(this===wrapperPrototype){throwBindingError(\"Pass correct 'this' to __destruct\")}detachFinalizer(this);unregisterInheritedInstance(registeredClass,this.$$.ptr)};ctor.prototype=Object.create(wrapperPrototype);for(var p in properties){ctor.prototype[p]=properties[p]}return __emval_register(ctor)}var structRegistrations={};function runDestructors(destructors){while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr)}}function simpleReadValueFromPointer(pointer){return this[\"fromWireType\"](HEAPU32[pointer>>2])}var awaitingDependencies={};var typeDependencies={};var InternalError=undefined;function throwInternalError(message){throw new InternalError(message)}function whenDependentTypesAreResolved(myTypes,dependentTypes,getTypeConverters){myTypes.forEach(function(type){typeDependencies[type]=dependentTypes});function onComplete(typeConverters){var myTypeConverters=getTypeConverters(typeConverters);if(myTypeConverters.length!==myTypes.length){throwInternalError(\"Mismatched type converter count\")}for(var i=0;i<myTypes.length;++i){registerType(myTypes[i],myTypeConverters[i])}}var typeConverters=new Array(dependentTypes.length);var unregisteredTypes=[];var registered=0;dependentTypes.forEach(function(dt,i){if(registeredTypes.hasOwnProperty(dt)){typeConverters[i]=registeredTypes[dt]}else{unregisteredTypes.push(dt);if(!awaitingDependencies.hasOwnProperty(dt)){awaitingDependencies[dt]=[]}awaitingDependencies[dt].push(function(){typeConverters[i]=registeredTypes[dt];++registered;if(registered===unregisteredTypes.length){onComplete(typeConverters)}})}});if(0===unregisteredTypes.length){onComplete(typeConverters)}}function __embind_finalize_value_object(structType){var reg=structRegistrations[structType];delete structRegistrations[structType];var rawConstructor=reg.rawConstructor;var rawDestructor=reg.rawDestructor;var fieldRecords=reg.fields;var fieldTypes=fieldRecords.map(function(field){return field.getterReturnType}).concat(fieldRecords.map(function(field){return field.setterArgumentType}));whenDependentTypesAreResolved([structType],fieldTypes,function(fieldTypes){var fields={};fieldRecords.forEach(function(field,i){var fieldName=field.fieldName;var getterReturnType=fieldTypes[i];var getter=field.getter;var getterContext=field.getterContext;var setterArgumentType=fieldTypes[i+fieldRecords.length];var setter=field.setter;var setterContext=field.setterContext;fields[fieldName]={read:function(ptr){return getterReturnType[\"fromWireType\"](getter(getterContext,ptr))},write:function(ptr,o){var destructors=[];setter(setterContext,ptr,setterArgumentType[\"toWireType\"](destructors,o));runDestructors(destructors)}}});return[{name:reg.name,\"fromWireType\":function(ptr){var rv={};for(var i in fields){rv[i]=fields[i].read(ptr)}rawDestructor(ptr);return rv},\"toWireType\":function(destructors,o){for(var fieldName in fields){if(!(fieldName in o)){throw new TypeError('Missing field:  \"'+fieldName+'\"')}}var ptr=rawConstructor();for(fieldName in fields){fields[fieldName].write(ptr,o[fieldName])}if(destructors!==null){destructors.push(rawDestructor,ptr)}return ptr},\"argPackAdvance\":8,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction:rawDestructor}]})}function __embind_register_bigint(primitiveType,name,size,minRange,maxRange){}function getShiftFromSize(size){switch(size){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(\"Unknown type size: \"+size)}}function registerType(rawType,registeredInstance,options){options=options||{};if(!(\"argPackAdvance\"in registeredInstance)){throw new TypeError(\"registerType registeredInstance requires argPackAdvance\")}var name=registeredInstance.name;if(!rawType){throwBindingError('type \"'+name+'\" must have a positive integer typeid pointer')}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError(\"Cannot register type '\"+name+\"' twice\")}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(function(cb){cb()})}}function __embind_register_bool(rawType,name,size,trueValue,falseValue){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":function(wt){return!!wt},\"toWireType\":function(destructors,o){return o?trueValue:falseValue},\"argPackAdvance\":8,\"readValueFromPointer\":function(pointer){var heap;if(size===1){heap=HEAP8}else if(size===2){heap=HEAP16}else if(size===4){heap=HEAP32}else{throw new TypeError(\"Unknown boolean type size: \"+name)}return this[\"fromWireType\"](heap[pointer>>shift])},destructorFunction:null})}function ClassHandle_isAliasOf(other){if(!(this instanceof ClassHandle)){return false}if(!(other instanceof ClassHandle)){return false}var leftClass=this.$$.ptrType.registeredClass;var left=this.$$.ptr;var rightClass=other.$$.ptrType.registeredClass;var right=other.$$.ptr;while(leftClass.baseClass){left=leftClass.upcast(left);leftClass=leftClass.baseClass}while(rightClass.baseClass){right=rightClass.upcast(right);rightClass=rightClass.baseClass}return leftClass===rightClass&&left===right}function shallowCopyInternalPointer(o){return{count:o.count,deleteScheduled:o.deleteScheduled,preservePointerOnDelete:o.preservePointerOnDelete,ptr:o.ptr,ptrType:o.ptrType,smartPtr:o.smartPtr,smartPtrType:o.smartPtrType}}function throwInstanceAlreadyDeleted(obj){function getInstanceTypeName(handle){return handle.$$.ptrType.registeredClass.name}throwBindingError(getInstanceTypeName(obj)+\" instance already deleted\")}function ClassHandle_clone(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.preservePointerOnDelete){this.$$.count.value+=1;return this}else{var clone=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));clone.$$.count.value+=1;clone.$$.deleteScheduled=false;return clone}}function ClassHandle_delete(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError(\"Object already scheduled for deletion\")}detachFinalizer(this);releaseClassHandle(this.$$);if(!this.$$.preservePointerOnDelete){this.$$.smartPtr=undefined;this.$$.ptr=undefined}}function ClassHandle_isDeleted(){return!this.$$.ptr}function ClassHandle_deleteLater(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError(\"Object already scheduled for deletion\")}deletionQueue.push(this);if(deletionQueue.length===1&&delayFunction){delayFunction(flushPendingDeletes)}this.$$.deleteScheduled=true;return this}function init_ClassHandle(){ClassHandle.prototype[\"isAliasOf\"]=ClassHandle_isAliasOf;ClassHandle.prototype[\"clone\"]=ClassHandle_clone;ClassHandle.prototype[\"delete\"]=ClassHandle_delete;ClassHandle.prototype[\"isDeleted\"]=ClassHandle_isDeleted;ClassHandle.prototype[\"deleteLater\"]=ClassHandle_deleteLater}function ClassHandle(){}var registeredPointers={};function ensureOverloadTable(proto,methodName,humanName){if(undefined===proto[methodName].overloadTable){var prevFunc=proto[methodName];proto[methodName]=function(){if(!proto[methodName].overloadTable.hasOwnProperty(arguments.length)){throwBindingError(\"Function '\"+humanName+\"' called with an invalid number of arguments (\"+arguments.length+\") - expects one of (\"+proto[methodName].overloadTable+\")!\")}return proto[methodName].overloadTable[arguments.length].apply(this,arguments)};proto[methodName].overloadTable=[];proto[methodName].overloadTable[prevFunc.argCount]=prevFunc}}function exposePublicSymbol(name,value,numArguments){if(Module.hasOwnProperty(name)){if(undefined===numArguments||undefined!==Module[name].overloadTable&&undefined!==Module[name].overloadTable[numArguments]){throwBindingError(\"Cannot register public name '\"+name+\"' twice\")}ensureOverloadTable(Module,name,name);if(Module.hasOwnProperty(numArguments)){throwBindingError(\"Cannot register multiple overloads of a function with the same number of arguments (\"+numArguments+\")!\")}Module[name].overloadTable[numArguments]=value}else{Module[name]=value;if(undefined!==numArguments){Module[name].numArguments=numArguments}}}function RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast){this.name=name;this.constructor=constructor;this.instancePrototype=instancePrototype;this.rawDestructor=rawDestructor;this.baseClass=baseClass;this.getActualType=getActualType;this.upcast=upcast;this.downcast=downcast;this.pureVirtualFunctions=[]}function upcastPointer(ptr,ptrClass,desiredClass){while(ptrClass!==desiredClass){if(!ptrClass.upcast){throwBindingError(\"Expected null or instance of \"+desiredClass.name+\", got an instance of \"+ptrClass.name)}ptr=ptrClass.upcast(ptr);ptrClass=ptrClass.baseClass}return ptr}function constNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError(\"null is not a valid \"+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass \"'+_embind_repr(handle)+'\" as a '+this.name)}if(!handle.$$.ptr){throwBindingError(\"Cannot pass deleted object as a pointer of type \"+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function genericPointerToWireType(destructors,handle){var ptr;if(handle===null){if(this.isReference){throwBindingError(\"null is not a valid \"+this.name)}if(this.isSmartPointer){ptr=this.rawConstructor();if(destructors!==null){destructors.push(this.rawDestructor,ptr)}return ptr}else{return 0}}if(!handle.$$){throwBindingError('Cannot pass \"'+_embind_repr(handle)+'\" as a '+this.name)}if(!handle.$$.ptr){throwBindingError(\"Cannot pass deleted object as a pointer of type \"+this.name)}if(!this.isConst&&handle.$$.ptrType.isConst){throwBindingError(\"Cannot convert argument of type \"+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+\" to parameter type \"+this.name)}var handleClass=handle.$$.ptrType.registeredClass;ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);if(this.isSmartPointer){if(undefined===handle.$$.smartPtr){throwBindingError(\"Passing raw pointer to smart pointer is illegal\")}switch(this.sharingPolicy){case 0:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{throwBindingError(\"Cannot convert argument of type \"+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+\" to parameter type \"+this.name)}break;case 1:ptr=handle.$$.smartPtr;break;case 2:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{var clonedHandle=handle[\"clone\"]();ptr=this.rawShare(ptr,__emval_register(function(){clonedHandle[\"delete\"]()}));if(destructors!==null){destructors.push(this.rawDestructor,ptr)}}break;default:throwBindingError(\"Unsupporting sharing policy\")}}return ptr}function nonConstNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError(\"null is not a valid \"+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass \"'+_embind_repr(handle)+'\" as a '+this.name)}if(!handle.$$.ptr){throwBindingError(\"Cannot pass deleted object as a pointer of type \"+this.name)}if(handle.$$.ptrType.isConst){throwBindingError(\"Cannot convert argument of type \"+handle.$$.ptrType.name+\" to parameter type \"+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function RegisteredPointer_getPointee(ptr){if(this.rawGetPointee){ptr=this.rawGetPointee(ptr)}return ptr}function RegisteredPointer_destructor(ptr){if(this.rawDestructor){this.rawDestructor(ptr)}}function RegisteredPointer_deleteObject(handle){if(handle!==null){handle[\"delete\"]()}}function downcastPointer(ptr,ptrClass,desiredClass){if(ptrClass===desiredClass){return ptr}if(undefined===desiredClass.baseClass){return null}var rv=downcastPointer(ptr,ptrClass,desiredClass.baseClass);if(rv===null){return null}return desiredClass.downcast(rv)}function getInheritedInstance(class_,ptr){ptr=getBasestPointer(class_,ptr);return registeredInstances[ptr]}function makeClassHandle(prototype,record){if(!record.ptrType||!record.ptr){throwInternalError(\"makeClassHandle requires ptr and ptrType\")}var hasSmartPtrType=!!record.smartPtrType;var hasSmartPtr=!!record.smartPtr;if(hasSmartPtrType!==hasSmartPtr){throwInternalError(\"Both smartPtrType and smartPtr must be specified\")}record.count={value:1};return attachFinalizer(Object.create(prototype,{$$:{value:record}}))}function RegisteredPointer_fromWireType(ptr){var rawPointer=this.getPointee(ptr);if(!rawPointer){this.destructor(ptr);return null}var registeredInstance=getInheritedInstance(this.registeredClass,rawPointer);if(undefined!==registeredInstance){if(0===registeredInstance.$$.count.value){registeredInstance.$$.ptr=rawPointer;registeredInstance.$$.smartPtr=ptr;return registeredInstance[\"clone\"]()}else{var rv=registeredInstance[\"clone\"]();this.destructor(ptr);return rv}}function makeDefaultHandle(){if(this.isSmartPointer){return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rawPointer,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:ptr})}}var actualType=this.registeredClass.getActualType(rawPointer);var registeredPointerRecord=registeredPointers[actualType];if(!registeredPointerRecord){return makeDefaultHandle.call(this)}var toType;if(this.isConst){toType=registeredPointerRecord.constPointerType}else{toType=registeredPointerRecord.pointerType}var dp=downcastPointer(rawPointer,this.registeredClass,toType.registeredClass);if(dp===null){return makeDefaultHandle.call(this)}if(this.isSmartPointer){return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp})}}function init_RegisteredPointer(){RegisteredPointer.prototype.getPointee=RegisteredPointer_getPointee;RegisteredPointer.prototype.destructor=RegisteredPointer_destructor;RegisteredPointer.prototype[\"argPackAdvance\"]=8;RegisteredPointer.prototype[\"readValueFromPointer\"]=simpleReadValueFromPointer;RegisteredPointer.prototype[\"deleteObject\"]=RegisteredPointer_deleteObject;RegisteredPointer.prototype[\"fromWireType\"]=RegisteredPointer_fromWireType}function RegisteredPointer(name,registeredClass,isReference,isConst,isSmartPointer,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor){this.name=name;this.registeredClass=registeredClass;this.isReference=isReference;this.isConst=isConst;this.isSmartPointer=isSmartPointer;this.pointeeType=pointeeType;this.sharingPolicy=sharingPolicy;this.rawGetPointee=rawGetPointee;this.rawConstructor=rawConstructor;this.rawShare=rawShare;this.rawDestructor=rawDestructor;if(!isSmartPointer&&registeredClass.baseClass===undefined){if(isConst){this[\"toWireType\"]=constNoSmartPtrRawPointerToWireType;this.destructorFunction=null}else{this[\"toWireType\"]=nonConstNoSmartPtrRawPointerToWireType;this.destructorFunction=null}}else{this[\"toWireType\"]=genericPointerToWireType}}function replacePublicSymbol(name,value,numArguments){if(!Module.hasOwnProperty(name)){throwInternalError(\"Replacing nonexistant public symbol\")}if(undefined!==Module[name].overloadTable&&undefined!==numArguments){Module[name].overloadTable[numArguments]=value}else{Module[name]=value;Module[name].argCount=numArguments}}function dynCallLegacy(sig,ptr,args){assert(\"dynCall_\"+sig in Module,\"bad function pointer type - no table for sig '\"+sig+\"'\");if(args&&args.length){assert(args.length===sig.substring(1).replace(/j/g,\"--\").length)}else{assert(sig.length==1)}var f=Module[\"dynCall_\"+sig];return args&&args.length?f.apply(null,[ptr].concat(args)):f.call(null,ptr)}function dynCall(sig,ptr,args){if(sig.includes(\"j\")){return dynCallLegacy(sig,ptr,args)}assert(wasmTable.get(ptr),\"missing table entry in dynCall: \"+ptr);return wasmTable.get(ptr).apply(null,args)}function getDynCaller(sig,ptr){assert(sig.includes(\"j\"),\"getDynCaller should only be called with i64 sigs\");var argCache=[];return function(){argCache.length=arguments.length;for(var i=0;i<arguments.length;i++){argCache[i]=arguments[i]}return dynCall(sig,ptr,argCache)}}function embind__requireFunction(signature,rawFunction){signature=readLatin1String(signature);function makeDynCaller(){if(signature.includes(\"j\")){return getDynCaller(signature,rawFunction)}return wasmTable.get(rawFunction)}var fp=makeDynCaller();if(typeof fp!==\"function\"){throwBindingError(\"unknown function pointer with signature \"+signature+\": \"+rawFunction)}return fp}var UnboundTypeError=undefined;function throwUnboundTypeError(message,types){var unboundTypes=[];var seen={};function visit(type){if(seen[type]){return}if(registeredTypes[type]){return}if(typeDependencies[type]){typeDependencies[type].forEach(visit);return}unboundTypes.push(type);seen[type]=true}types.forEach(visit);throw new UnboundTypeError(message+\": \"+unboundTypes.map(getTypeName).join([\", \"]))}function __embind_register_class(rawType,rawPointerType,rawConstPointerType,baseClassRawType,getActualTypeSignature,getActualType,upcastSignature,upcast,downcastSignature,downcast,name,destructorSignature,rawDestructor){name=readLatin1String(name);getActualType=embind__requireFunction(getActualTypeSignature,getActualType);if(upcast){upcast=embind__requireFunction(upcastSignature,upcast)}if(downcast){downcast=embind__requireFunction(downcastSignature,downcast)}rawDestructor=embind__requireFunction(destructorSignature,rawDestructor);var legalFunctionName=makeLegalFunctionName(name);exposePublicSymbol(legalFunctionName,function(){throwUnboundTypeError(\"Cannot construct \"+name+\" due to unbound types\",[baseClassRawType])});whenDependentTypesAreResolved([rawType,rawPointerType,rawConstPointerType],baseClassRawType?[baseClassRawType]:[],function(base){base=base[0];var baseClass;var basePrototype;if(baseClassRawType){baseClass=base.registeredClass;basePrototype=baseClass.instancePrototype}else{basePrototype=ClassHandle.prototype}var constructor=createNamedFunction(legalFunctionName,function(){if(Object.getPrototypeOf(this)!==instancePrototype){throw new BindingError(\"Use 'new' to construct \"+name)}if(undefined===registeredClass.constructor_body){throw new BindingError(name+\" has no accessible constructor\")}var body=registeredClass.constructor_body[arguments.length];if(undefined===body){throw new BindingError(\"Tried to invoke ctor of \"+name+\" with invalid number of parameters (\"+arguments.length+\") - expected (\"+Object.keys(registeredClass.constructor_body).toString()+\") parameters instead!\")}return body.apply(this,arguments)});var instancePrototype=Object.create(basePrototype,{constructor:{value:constructor}});constructor.prototype=instancePrototype;var registeredClass=new RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast);var referenceConverter=new RegisteredPointer(name,registeredClass,true,false,false);var pointerConverter=new RegisteredPointer(name+\"*\",registeredClass,false,false,false);var constPointerConverter=new RegisteredPointer(name+\" const*\",registeredClass,false,true,false);registeredPointers[rawType]={pointerType:pointerConverter,constPointerType:constPointerConverter};replacePublicSymbol(legalFunctionName,constructor);return[referenceConverter,pointerConverter,constPointerConverter]})}function new_(constructor,argumentList){if(!(constructor instanceof Function)){throw new TypeError(\"new_ called with constructor type \"+typeof constructor+\" which is not a function\")}var dummy=createNamedFunction(constructor.name||\"unknownFunctionName\",function(){});dummy.prototype=constructor.prototype;var obj=new dummy;var r=constructor.apply(obj,argumentList);return r instanceof Object?r:obj}function craftInvokerFunction(humanName,argTypes,classType,cppInvokerFunc,cppTargetFunc){var argCount=argTypes.length;if(argCount<2){throwBindingError(\"argTypes array size mismatch! Must at least get return value and 'this' types!\")}var isClassMethodFunc=argTypes[1]!==null&&classType!==null;var needsDestructorStack=false;for(var i=1;i<argTypes.length;++i){if(argTypes[i]!==null&&argTypes[i].destructorFunction===undefined){needsDestructorStack=true;break}}var returns=argTypes[0].name!==\"void\";var argsList=\"\";var argsListWired=\"\";for(var i=0;i<argCount-2;++i){argsList+=(i!==0?\", \":\"\")+\"arg\"+i;argsListWired+=(i!==0?\", \":\"\")+\"arg\"+i+\"Wired\"}var invokerFnBody=\"return function \"+makeLegalFunctionName(humanName)+\"(\"+argsList+\") {\\n\"+\"if (arguments.length !== \"+(argCount-2)+\") {\\n\"+\"throwBindingError('function \"+humanName+\" called with ' + arguments.length + ' arguments, expected \"+(argCount-2)+\" args!');\\n\"+\"}\\n\";if(needsDestructorStack){invokerFnBody+=\"var destructors = [];\\n\"}var dtorStack=needsDestructorStack?\"destructors\":\"null\";var args1=[\"throwBindingError\",\"invoker\",\"fn\",\"runDestructors\",\"retType\",\"classParam\"];var args2=[throwBindingError,cppInvokerFunc,cppTargetFunc,runDestructors,argTypes[0],argTypes[1]];if(isClassMethodFunc){invokerFnBody+=\"var thisWired = classParam.toWireType(\"+dtorStack+\", this);\\n\"}for(var i=0;i<argCount-2;++i){invokerFnBody+=\"var arg\"+i+\"Wired = argType\"+i+\".toWireType(\"+dtorStack+\", arg\"+i+\"); // \"+argTypes[i+2].name+\"\\n\";args1.push(\"argType\"+i);args2.push(argTypes[i+2])}if(isClassMethodFunc){argsListWired=\"thisWired\"+(argsListWired.length>0?\", \":\"\")+argsListWired}invokerFnBody+=(returns?\"var rv = \":\"\")+\"invoker(fn\"+(argsListWired.length>0?\", \":\"\")+argsListWired+\");\\n\";if(needsDestructorStack){invokerFnBody+=\"runDestructors(destructors);\\n\"}else{for(var i=isClassMethodFunc?1:2;i<argTypes.length;++i){var paramName=i===1?\"thisWired\":\"arg\"+(i-2)+\"Wired\";if(argTypes[i].destructorFunction!==null){invokerFnBody+=paramName+\"_dtor(\"+paramName+\"); // \"+argTypes[i].name+\"\\n\";args1.push(paramName+\"_dtor\");args2.push(argTypes[i].destructorFunction)}}}if(returns){invokerFnBody+=\"var ret = retType.fromWireType(rv);\\n\"+\"return ret;\\n\"}else{}invokerFnBody+=\"}\\n\";args1.push(invokerFnBody);var invokerFunction=new_(Function,args1).apply(null,args2);return invokerFunction}function heap32VectorToArray(count,firstElement){var array=[];for(var i=0;i<count;i++){array.push(HEAP32[(firstElement>>2)+i])}return array}function __embind_register_class_class_function(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,fn){var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=classType.name+\".\"+methodName;function unboundTypesHandler(){throwUnboundTypeError(\"Cannot call \"+humanName+\" due to unbound types\",rawArgTypes)}if(methodName.startsWith(\"@@\")){methodName=Symbol[methodName.substring(2)]}var proto=classType.registeredClass.constructor;if(undefined===proto[methodName]){unboundTypesHandler.argCount=argCount-1;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-1]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var invokerArgsArray=[argTypes[0],null].concat(argTypes.slice(1));var func=craftInvokerFunction(humanName,invokerArgsArray,null,rawInvoker,fn);if(undefined===proto[methodName].overloadTable){func.argCount=argCount-1;proto[methodName]=func}else{proto[methodName].overloadTable[argCount-1]=func}return[]});return[]})}function __embind_register_class_constructor(rawClassType,argCount,rawArgTypesAddr,invokerSignature,invoker,rawConstructor){assert(argCount>0);var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);invoker=embind__requireFunction(invokerSignature,invoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=\"constructor \"+classType.name;if(undefined===classType.registeredClass.constructor_body){classType.registeredClass.constructor_body=[]}if(undefined!==classType.registeredClass.constructor_body[argCount-1]){throw new BindingError(\"Cannot register multiple constructors with identical number of parameters (\"+(argCount-1)+\") for class '\"+classType.name+\"'! Overload resolution is currently only performed using the parameter count, not actual type info!\")}classType.registeredClass.constructor_body[argCount-1]=function unboundTypeHandler(){throwUnboundTypeError(\"Cannot construct \"+classType.name+\" due to unbound types\",rawArgTypes)};whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){argTypes.splice(1,0,null);classType.registeredClass.constructor_body[argCount-1]=craftInvokerFunction(humanName,argTypes,null,invoker,rawConstructor);return[]});return[]})}function __embind_register_class_function(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,context,isPureVirtual){var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=classType.name+\".\"+methodName;if(methodName.startsWith(\"@@\")){methodName=Symbol[methodName.substring(2)]}if(isPureVirtual){classType.registeredClass.pureVirtualFunctions.push(methodName)}function unboundTypesHandler(){throwUnboundTypeError(\"Cannot call \"+humanName+\" due to unbound types\",rawArgTypes)}var proto=classType.registeredClass.instancePrototype;var method=proto[methodName];if(undefined===method||undefined===method.overloadTable&&method.className!==classType.name&&method.argCount===argCount-2){unboundTypesHandler.argCount=argCount-2;unboundTypesHandler.className=classType.name;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-2]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var memberFunction=craftInvokerFunction(humanName,argTypes,classType,rawInvoker,context);if(undefined===proto[methodName].overloadTable){memberFunction.argCount=argCount-2;proto[methodName]=memberFunction}else{proto[methodName].overloadTable[argCount-2]=memberFunction}return[]});return[]})}function validateThis(this_,classType,humanName){if(!(this_ instanceof Object)){throwBindingError(humanName+' with invalid \"this\": '+this_)}if(!(this_ instanceof classType.registeredClass.constructor)){throwBindingError(humanName+' incompatible with \"this\" of type '+this_.constructor.name)}if(!this_.$$.ptr){throwBindingError(\"cannot call emscripten binding method \"+humanName+\" on deleted object\")}return upcastPointer(this_.$$.ptr,this_.$$.ptrType.registeredClass,classType.registeredClass)}function __embind_register_class_property(classType,fieldName,getterReturnType,getterSignature,getter,getterContext,setterArgumentType,setterSignature,setter,setterContext){fieldName=readLatin1String(fieldName);getter=embind__requireFunction(getterSignature,getter);whenDependentTypesAreResolved([],[classType],function(classType){classType=classType[0];var humanName=classType.name+\".\"+fieldName;var desc={get:function(){throwUnboundTypeError(\"Cannot access \"+humanName+\" due to unbound types\",[getterReturnType,setterArgumentType])},enumerable:true,configurable:true};if(setter){desc.set=function(){throwUnboundTypeError(\"Cannot access \"+humanName+\" due to unbound types\",[getterReturnType,setterArgumentType])}}else{desc.set=function(v){throwBindingError(humanName+\" is a read-only property\")}}Object.defineProperty(classType.registeredClass.instancePrototype,fieldName,desc);whenDependentTypesAreResolved([],setter?[getterReturnType,setterArgumentType]:[getterReturnType],function(types){var getterReturnType=types[0];var desc={get:function(){var ptr=validateThis(this,classType,humanName+\" getter\");return getterReturnType[\"fromWireType\"](getter(getterContext,ptr))},enumerable:true};if(setter){setter=embind__requireFunction(setterSignature,setter);var setterArgumentType=types[1];desc.set=function(v){var ptr=validateThis(this,classType,humanName+\" setter\");var destructors=[];setter(setterContext,ptr,setterArgumentType[\"toWireType\"](destructors,v));runDestructors(destructors)}}Object.defineProperty(classType.registeredClass.instancePrototype,fieldName,desc);return[]});return[]})}function __emval_decref(handle){if(handle>4&&0===--emval_handle_array[handle].refcount){emval_handle_array[handle]=undefined;emval_free_list.push(handle)}}function __embind_register_emval(rawType,name){name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":function(handle){var rv=emval_handle_array[handle].value;__emval_decref(handle);return rv},\"toWireType\":function(destructors,value){return __emval_register(value)},\"argPackAdvance\":8,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction:null})}function _embind_repr(v){if(v===null){return\"null\"}var t=typeof v;if(t===\"object\"||t===\"array\"||t===\"function\"){return v.toString()}else{return\"\"+v}}function floatReadValueFromPointer(name,shift){switch(shift){case 2:return function(pointer){return this[\"fromWireType\"](HEAPF32[pointer>>2])};case 3:return function(pointer){return this[\"fromWireType\"](HEAPF64[pointer>>3])};default:throw new TypeError(\"Unknown float type: \"+name)}}function __embind_register_float(rawType,name,size){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":function(value){return value},\"toWireType\":function(destructors,value){if(typeof value!==\"number\"&&typeof value!==\"boolean\"){throw new TypeError('Cannot convert \"'+_embind_repr(value)+'\" to '+this.name)}return value},\"argPackAdvance\":8,\"readValueFromPointer\":floatReadValueFromPointer(name,shift),destructorFunction:null})}function __embind_register_function(name,argCount,rawArgTypesAddr,signature,rawInvoker,fn){var argTypes=heap32VectorToArray(argCount,rawArgTypesAddr);name=readLatin1String(name);rawInvoker=embind__requireFunction(signature,rawInvoker);exposePublicSymbol(name,function(){throwUnboundTypeError(\"Cannot call \"+name+\" due to unbound types\",argTypes)},argCount-1);whenDependentTypesAreResolved([],argTypes,function(argTypes){var invokerArgsArray=[argTypes[0],null].concat(argTypes.slice(1));replacePublicSymbol(name,craftInvokerFunction(name,invokerArgsArray,null,rawInvoker,fn),argCount-1);return[]})}function integerReadValueFromPointer(name,shift,signed){switch(shift){case 0:return signed?function readS8FromPointer(pointer){return HEAP8[pointer]}:function readU8FromPointer(pointer){return HEAPU8[pointer]};case 1:return signed?function readS16FromPointer(pointer){return HEAP16[pointer>>1]}:function readU16FromPointer(pointer){return HEAPU16[pointer>>1]};case 2:return signed?function readS32FromPointer(pointer){return HEAP32[pointer>>2]}:function readU32FromPointer(pointer){return HEAPU32[pointer>>2]};default:throw new TypeError(\"Unknown integer type: \"+name)}}function __embind_register_integer(primitiveType,name,size,minRange,maxRange){name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var shift=getShiftFromSize(size);var fromWireType=function(value){return value};if(minRange===0){var bitshift=32-8*size;fromWireType=function(value){return value<<bitshift>>>bitshift}}var isUnsignedType=name.includes(\"unsigned\");registerType(primitiveType,{name:name,\"fromWireType\":fromWireType,\"toWireType\":function(destructors,value){if(typeof value!==\"number\"&&typeof value!==\"boolean\"){throw new TypeError('Cannot convert \"'+_embind_repr(value)+'\" to '+this.name)}if(value<minRange||value>maxRange){throw new TypeError('Passing a number \"'+_embind_repr(value)+'\" from JS side to C/C++ side to an argument of type \"'+name+'\", which is outside the valid range ['+minRange+\", \"+maxRange+\"]!\")}return isUnsignedType?value>>>0:value|0},\"argPackAdvance\":8,\"readValueFromPointer\":integerReadValueFromPointer(name,shift,minRange!==0),destructorFunction:null})}function __embind_register_memory_view(rawType,dataTypeIndex,name){var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){handle=handle>>2;var heap=HEAPU32;var size=heap[handle];var data=heap[handle+1];return new TA(buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":decodeMemoryView,\"argPackAdvance\":8,\"readValueFromPointer\":decodeMemoryView},{ignoreDuplicateRegistrations:true})}function __embind_register_std_string(rawType,name){name=readLatin1String(name);var stdStringIsUTF8=name===\"std::string\";registerType(rawType,{name:name,\"fromWireType\":function(value){var length=HEAPU32[value>>2];var str;if(stdStringIsUTF8){var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i<length;++i){a[i]=String.fromCharCode(HEAPU8[value+4+i])}str=a.join(\"\")}_free(value);return str},\"toWireType\":function(destructors,value){if(value instanceof ArrayBuffer){value=new Uint8Array(value)}var getLength;var valueIsOfTypeString=typeof value===\"string\";if(!(valueIsOfTypeString||value instanceof Uint8Array||value instanceof Uint8ClampedArray||value instanceof Int8Array)){throwBindingError(\"Cannot pass non-string to std::string\")}if(stdStringIsUTF8&&valueIsOfTypeString){getLength=function(){return lengthBytesUTF8(value)}}else{getLength=function(){return value.length}}var length=getLength();var ptr=_malloc(4+length+1);HEAPU32[ptr>>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr+4,length+1)}else{if(valueIsOfTypeString){for(var i=0;i<length;++i){var charCode=value.charCodeAt(i);if(charCode>255){_free(ptr);throwBindingError(\"String has UTF-16 code units that do not fit in 8 bits\")}HEAPU8[ptr+4+i]=charCode}}else{for(var i=0;i<length;++i){HEAPU8[ptr+4+i]=value[i]}}}if(destructors!==null){destructors.push(_free,ptr)}return ptr},\"argPackAdvance\":8,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction:function(ptr){_free(ptr)}})}function __embind_register_std_wstring(rawType,charSize,name){name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=function(){return HEAPU16};shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=function(){return HEAPU32};shift=2}registerType(rawType,{name:name,\"fromWireType\":function(value){var length=HEAPU32[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},\"toWireType\":function(destructors,value){if(!(typeof value===\"string\")){throwBindingError(\"Cannot pass non-string to C++ string type \"+name)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},\"argPackAdvance\":8,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction:function(ptr){_free(ptr)}})}function __embind_register_value_object(rawType,name,constructorSignature,rawConstructor,destructorSignature,rawDestructor){structRegistrations[rawType]={name:readLatin1String(name),rawConstructor:embind__requireFunction(constructorSignature,rawConstructor),rawDestructor:embind__requireFunction(destructorSignature,rawDestructor),fields:[]}}function __embind_register_value_object_field(structType,fieldName,getterReturnType,getterSignature,getter,getterContext,setterArgumentType,setterSignature,setter,setterContext){structRegistrations[structType].fields.push({fieldName:readLatin1String(fieldName),getterReturnType:getterReturnType,getter:embind__requireFunction(getterSignature,getter),getterContext:getterContext,setterArgumentType:setterArgumentType,setter:embind__requireFunction(setterSignature,setter),setterContext:setterContext})}function __embind_register_void(rawType,name){name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,\"argPackAdvance\":0,\"fromWireType\":function(){return undefined},\"toWireType\":function(destructors,o){return undefined}})}var emval_symbols={};function getStringOrSymbol(address){var symbol=emval_symbols[address];if(symbol===undefined){return readLatin1String(address)}else{return symbol}}var emval_methodCallers=[];function __emval_call_void_method(caller,handle,methodName,args){caller=emval_methodCallers[caller];handle=requireHandle(handle);methodName=getStringOrSymbol(methodName);caller(handle,methodName,null,args)}function __emval_addMethodCaller(caller){var id=emval_methodCallers.length;emval_methodCallers.push(caller);return id}function __emval_lookupTypes(argCount,argTypes){var a=new Array(argCount);for(var i=0;i<argCount;++i){a[i]=requireRegisteredType(HEAP32[(argTypes>>2)+i],\"parameter \"+i)}return a}function __emval_get_method_caller(argCount,argTypes){var types=__emval_lookupTypes(argCount,argTypes);var retType=types[0];var signatureName=retType.name+\"_$\"+types.slice(1).map(function(t){return t.name}).join(\"_\")+\"$\";var params=[\"retType\"];var args=[retType];var argsList=\"\";for(var i=0;i<argCount-1;++i){argsList+=(i!==0?\", \":\"\")+\"arg\"+i;params.push(\"argType\"+i);args.push(types[1+i])}var functionName=makeLegalFunctionName(\"methodCaller_\"+signatureName);var functionBody=\"return function \"+functionName+\"(handle, name, destructors, args) {\\n\";var offset=0;for(var i=0;i<argCount-1;++i){functionBody+=\"    var arg\"+i+\" = argType\"+i+\".readValueFromPointer(args\"+(offset?\"+\"+offset:\"\")+\");\\n\";offset+=types[i+1][\"argPackAdvance\"]}functionBody+=\"    var rv = handle[name](\"+argsList+\");\\n\";for(var i=0;i<argCount-1;++i){if(types[i+1][\"deleteObject\"]){functionBody+=\"    argType\"+i+\".deleteObject(arg\"+i+\");\\n\"}}if(!retType.isVoid){functionBody+=\"    return retType.toWireType(destructors, rv);\\n\"}functionBody+=\"};\\n\";params.push(functionBody);var invokerFunction=new_(Function,params).apply(null,args);return __emval_addMethodCaller(invokerFunction)}function __emval_incref(handle){if(handle>4){emval_handle_array[handle].refcount+=1}}function __emval_take_value(type,argv){type=requireRegisteredType(type,\"_emval_take_value\");var v=type[\"readValueFromPointer\"](argv);return __emval_register(v)}function _abort(){abort()}var _emscripten_get_now_is_monotonic=true;function _clock_gettime(clk_id,tp){var now;if(clk_id===0){now=Date.now()}else if((clk_id===1||clk_id===4)&&_emscripten_get_now_is_monotonic){now=_emscripten_get_now()}else{setErrNo(28);return-1}HEAP32[tp>>2]=now/1e3|0;HEAP32[tp+4>>2]=now%1e3*1e3*1e3|0;return 0}function _dlopen(filename,flag){abort(\"To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking\")}function _dlsym(handle,symbol){abort(\"To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking\")}var readAsmConstArgsArray=[];function readAsmConstArgs(sigPtr,buf){assert(Array.isArray(readAsmConstArgsArray));assert(buf%16==0);readAsmConstArgsArray.length=0;var ch;buf>>=2;while(ch=HEAPU8[sigPtr++]){assert(ch===100||ch===102||ch===105);var double=ch<105;if(double&&buf&1)buf++;readAsmConstArgsArray.push(double?HEAPF64[buf++>>1]:HEAP32[buf]);++buf}return readAsmConstArgsArray}function _emscripten_asm_const_int(code,sigPtr,argbuf){var args=readAsmConstArgs(sigPtr,argbuf);if(!ASM_CONSTS.hasOwnProperty(code))abort(\"No EM_ASM constant found at address \"+code);return ASM_CONSTS[code].apply(null,args)}function _emscripten_get_heap_max(){return 2147483648}function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function _emscripten_pc_get_function(pc){abort(\"Cannot use emscripten_pc_get_function without -s USE_OFFSET_CONVERTER\")}function emscripten_realloc_buffer(size){try{wasmMemory.grow(size-buffer.byteLength+65535>>>16);updateGlobalBufferAndViews(wasmMemory.buffer);return 1}catch(e){err(\"emscripten_realloc_buffer: Attempted to grow heap from \"+buffer.byteLength+\" bytes to \"+size+\" bytes, but got error: \"+e)}}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;assert(requestedSize>oldSize);var maxHeapSize=2147483648;if(requestedSize>maxHeapSize){err(\"Cannot enlarge memory, asked to go up to \"+requestedSize+\" bytes, but the limit is \"+maxHeapSize+\" bytes!\");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,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}err(\"Failed to grow the heap from \"+oldSize+\" bytes to \"+newSize+\" bytes, not enough memory!\");return false}function _emscripten_generate_pc(frame){abort(\"Cannot use emscripten_generate_pc (needed by __builtin_return_address) without -s USE_OFFSET_CONVERTER\")}var UNWIND_CACHE={};function __emscripten_save_in_unwind_cache(callstack){callstack.forEach(function(frame){var pc=_emscripten_generate_pc(frame);if(pc){UNWIND_CACHE[pc]=frame}})}function _emscripten_stack_snapshot(){var callstack=(new Error).stack.split(\"\\n\");if(callstack[0]==\"Error\"){callstack.shift()}__emscripten_save_in_unwind_cache(callstack);UNWIND_CACHE.last_addr=_emscripten_generate_pc(callstack[2]);UNWIND_CACHE.last_stack=callstack;return UNWIND_CACHE.last_addr}function _emscripten_stack_unwind_buffer(addr,buffer,count){var stack;if(UNWIND_CACHE.last_addr==addr){stack=UNWIND_CACHE.last_stack}else{stack=(new Error).stack.split(\"\\n\");if(stack[0]==\"Error\"){stack.shift()}__emscripten_save_in_unwind_cache(stack)}var offset=2;while(stack[offset]&&_emscripten_generate_pc(stack[offset])!=addr){++offset}for(var i=0;i<count&&stack[i+offset];++i){HEAP32[buffer+i*4>>2]=_emscripten_generate_pc(stack[i+offset])}return i}function _emscripten_thread_sleep(msecs){var start=_emscripten_get_now();while(_emscripten_get_now()-start<msecs){}}function __webgl_enable_ANGLE_instanced_arrays(ctx){var ext=ctx.getExtension(\"ANGLE_instanced_arrays\");if(ext){ctx[\"vertexAttribDivisor\"]=function(index,divisor){ext[\"vertexAttribDivisorANGLE\"](index,divisor)};ctx[\"drawArraysInstanced\"]=function(mode,first,count,primcount){ext[\"drawArraysInstancedANGLE\"](mode,first,count,primcount)};ctx[\"drawElementsInstanced\"]=function(mode,count,type,indices,primcount){ext[\"drawElementsInstancedANGLE\"](mode,count,type,indices,primcount)};return 1}}function __webgl_enable_OES_vertex_array_object(ctx){var ext=ctx.getExtension(\"OES_vertex_array_object\");if(ext){ctx[\"createVertexArray\"]=function(){return ext[\"createVertexArrayOES\"]()};ctx[\"deleteVertexArray\"]=function(vao){ext[\"deleteVertexArrayOES\"](vao)};ctx[\"bindVertexArray\"]=function(vao){ext[\"bindVertexArrayOES\"](vao)};ctx[\"isVertexArray\"]=function(vao){return ext[\"isVertexArrayOES\"](vao)};return 1}}function __webgl_enable_WEBGL_draw_buffers(ctx){var ext=ctx.getExtension(\"WEBGL_draw_buffers\");if(ext){ctx[\"drawBuffers\"]=function(n,bufs){ext[\"drawBuffersWEBGL\"](n,bufs)};return 1}}function __webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(ctx){return!!(ctx.dibvbi=ctx.getExtension(\"WEBGL_draw_instanced_base_vertex_base_instance\"))}function __webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(ctx){return!!(ctx.mdibvbi=ctx.getExtension(\"WEBGL_multi_draw_instanced_base_vertex_base_instance\"))}function __webgl_enable_WEBGL_multi_draw(ctx){return!!(ctx.multiDrawWebgl=ctx.getExtension(\"WEBGL_multi_draw\"))}var GL={counter:1,buffers:[],mappedBuffers:{},programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],byteSizeByTypeRoot:5120,byteSizeByType:[1,1,2,2,4,4,4,2,3,4,8],stringCache:{},stringiCache:{},unpackAlignment:4,recordError:function recordError(errorCode){if(!GL.lastError){GL.lastError=errorCode}},getNewId:function(table){var ret=GL.counter++;for(var i=table.length;i<ret;i++){table[i]=null}return ret},MAX_TEMP_BUFFER_SIZE:2097152,numTempVertexBuffersPerSize:64,log2ceilLookup:function(i){return 32-Math.clz32(i===0?0:i-1)},generateTempBuffers:function(quads,context){var largestIndex=GL.log2ceilLookup(GL.MAX_TEMP_BUFFER_SIZE);context.tempVertexBufferCounters1=[];context.tempVertexBufferCounters2=[];context.tempVertexBufferCounters1.length=context.tempVertexBufferCounters2.length=largestIndex+1;context.tempVertexBuffers1=[];context.tempVertexBuffers2=[];context.tempVertexBuffers1.length=context.tempVertexBuffers2.length=largestIndex+1;context.tempIndexBuffers=[];context.tempIndexBuffers.length=largestIndex+1;for(var i=0;i<=largestIndex;++i){context.tempIndexBuffers[i]=null;context.tempVertexBufferCounters1[i]=context.tempVertexBufferCounters2[i]=0;var ringbufferLength=GL.numTempVertexBuffersPerSize;context.tempVertexBuffers1[i]=[];context.tempVertexBuffers2[i]=[];var ringbuffer1=context.tempVertexBuffers1[i];var ringbuffer2=context.tempVertexBuffers2[i];ringbuffer1.length=ringbuffer2.length=ringbufferLength;for(var j=0;j<ringbufferLength;++j){ringbuffer1[j]=ringbuffer2[j]=null}}if(quads){context.tempQuadIndexBuffer=GLctx.createBuffer();context.GLctx.bindBuffer(34963,context.tempQuadIndexBuffer);var numIndexes=GL.MAX_TEMP_BUFFER_SIZE>>1;var quadIndexes=new Uint16Array(numIndexes);var i=0,v=0;while(1){quadIndexes[i++]=v;if(i>=numIndexes)break;quadIndexes[i++]=v+1;if(i>=numIndexes)break;quadIndexes[i++]=v+2;if(i>=numIndexes)break;quadIndexes[i++]=v;if(i>=numIndexes)break;quadIndexes[i++]=v+2;if(i>=numIndexes)break;quadIndexes[i++]=v+3;if(i>=numIndexes)break;v+=4}context.GLctx.bufferData(34963,quadIndexes,35044);context.GLctx.bindBuffer(34963,null)}},getTempVertexBuffer:function getTempVertexBuffer(sizeBytes){var idx=GL.log2ceilLookup(sizeBytes);var ringbuffer=GL.currentContext.tempVertexBuffers1[idx];var nextFreeBufferIndex=GL.currentContext.tempVertexBufferCounters1[idx];GL.currentContext.tempVertexBufferCounters1[idx]=GL.currentContext.tempVertexBufferCounters1[idx]+1&GL.numTempVertexBuffersPerSize-1;var vbo=ringbuffer[nextFreeBufferIndex];if(vbo){return vbo}var prevVBO=GLctx.getParameter(34964);ringbuffer[nextFreeBufferIndex]=GLctx.createBuffer();GLctx.bindBuffer(34962,ringbuffer[nextFreeBufferIndex]);GLctx.bufferData(34962,1<<idx,35048);GLctx.bindBuffer(34962,prevVBO);return ringbuffer[nextFreeBufferIndex]},getTempIndexBuffer:function getTempIndexBuffer(sizeBytes){var idx=GL.log2ceilLookup(sizeBytes);var ibo=GL.currentContext.tempIndexBuffers[idx];if(ibo){return ibo}var prevIBO=GLctx.getParameter(34965);GL.currentContext.tempIndexBuffers[idx]=GLctx.createBuffer();GLctx.bindBuffer(34963,GL.currentContext.tempIndexBuffers[idx]);GLctx.bufferData(34963,1<<idx,35048);GLctx.bindBuffer(34963,prevIBO);return GL.currentContext.tempIndexBuffers[idx]},newRenderingFrameStarted:function newRenderingFrameStarted(){if(!GL.currentContext){return}var vb=GL.currentContext.tempVertexBuffers1;GL.currentContext.tempVertexBuffers1=GL.currentContext.tempVertexBuffers2;GL.currentContext.tempVertexBuffers2=vb;vb=GL.currentContext.tempVertexBufferCounters1;GL.currentContext.tempVertexBufferCounters1=GL.currentContext.tempVertexBufferCounters2;GL.currentContext.tempVertexBufferCounters2=vb;var largestIndex=GL.log2ceilLookup(GL.MAX_TEMP_BUFFER_SIZE);for(var i=0;i<=largestIndex;++i){GL.currentContext.tempVertexBufferCounters1[i]=0}},getSource:function(shader,count,string,length){var source=\"\";for(var i=0;i<count;++i){var len=length?HEAP32[length+i*4>>2]:-1;source+=UTF8ToString(HEAP32[string+i*4>>2],len<0?undefined:len)}return source},calcBufLength:function calcBufLength(size,type,stride,count){if(stride>0){return count*stride}var typeSize=GL.byteSizeByType[type-GL.byteSizeByTypeRoot];return size*typeSize*count},usedTempBuffers:[],preDrawHandleClientVertexAttribBindings:function preDrawHandleClientVertexAttribBindings(count){GL.resetBufferBinding=false;for(var i=0;i<GL.currentContext.maxVertexAttribs;++i){var cb=GL.currentContext.clientBuffers[i];if(!cb.clientside||!cb.enabled)continue;GL.resetBufferBinding=true;var size=GL.calcBufLength(cb.size,cb.type,cb.stride,count);var buf=GL.getTempVertexBuffer(size);GLctx.bindBuffer(34962,buf);GLctx.bufferSubData(34962,0,HEAPU8.subarray(cb.ptr,cb.ptr+size));cb.vertexAttribPointerAdaptor.call(GLctx,i,cb.size,cb.type,cb.normalized,cb.stride,0)}},postDrawHandleClientVertexAttribBindings:function postDrawHandleClientVertexAttribBindings(){if(GL.resetBufferBinding){GLctx.bindBuffer(34962,GL.buffers[GLctx.currentArrayBufferBinding])}},createContext:function(canvas,webGLContextAttributes){if(webGLContextAttributes.renderViaOffscreenBackBuffer)webGLContextAttributes[\"preserveDrawingBuffer\"]=true;if(!canvas.getContextSafariWebGL2Fixed){canvas.getContextSafariWebGL2Fixed=canvas.getContext;canvas.getContext=function(ver,attrs){var gl=canvas.getContextSafariWebGL2Fixed(ver,attrs);return ver==\"webgl\"==gl instanceof WebGLRenderingContext?gl:null}}var ctx=webGLContextAttributes.majorVersion>1?canvas.getContext(\"webgl2\",webGLContextAttributes):canvas.getContext(\"webgl\",webGLContextAttributes);if(!ctx)return 0;var handle=GL.registerContext(ctx,webGLContextAttributes);return handle},enableOffscreenFramebufferAttributes:function(webGLContextAttributes){webGLContextAttributes.renderViaOffscreenBackBuffer=true;webGLContextAttributes.preserveDrawingBuffer=true},createOffscreenFramebuffer:function(context){var gl=context.GLctx;var fbo=gl.createFramebuffer();gl.bindFramebuffer(36160,fbo);context.defaultFbo=fbo;context.defaultFboForbidBlitFramebuffer=false;if(gl.getContextAttributes().antialias){context.defaultFboForbidBlitFramebuffer=true}else{var firefoxMatch=navigator.userAgent.toLowerCase().match(/firefox\\/(\\d\\d)/);if(firefoxMatch!=null){var firefoxVersion=firefoxMatch[1];context.defaultFboForbidBlitFramebuffer=firefoxVersion<67}}context.defaultColorTarget=gl.createTexture();context.defaultDepthTarget=gl.createRenderbuffer();GL.resizeOffscreenFramebuffer(context);gl.bindTexture(3553,context.defaultColorTarget);gl.texParameteri(3553,10241,9728);gl.texParameteri(3553,10240,9728);gl.texParameteri(3553,10242,33071);gl.texParameteri(3553,10243,33071);gl.texImage2D(3553,0,6408,gl.canvas.width,gl.canvas.height,0,6408,5121,null);gl.framebufferTexture2D(36160,36064,3553,context.defaultColorTarget,0);gl.bindTexture(3553,null);var depthTarget=gl.createRenderbuffer();gl.bindRenderbuffer(36161,context.defaultDepthTarget);gl.renderbufferStorage(36161,33189,gl.canvas.width,gl.canvas.height);gl.framebufferRenderbuffer(36160,36096,36161,context.defaultDepthTarget);gl.bindRenderbuffer(36161,null);var vertices=[-1,-1,-1,1,1,-1,1,1];var vb=gl.createBuffer();gl.bindBuffer(34962,vb);gl.bufferData(34962,new Float32Array(vertices),35044);gl.bindBuffer(34962,null);context.blitVB=vb;var vsCode=\"attribute vec2 pos;\"+\"varying lowp vec2 tex;\"+\"void main() { tex = pos * 0.5 + vec2(0.5,0.5); gl_Position = vec4(pos, 0.0, 1.0); }\";var vs=gl.createShader(35633);gl.shaderSource(vs,vsCode);gl.compileShader(vs);var fsCode=\"varying lowp vec2 tex;\"+\"uniform sampler2D sampler;\"+\"void main() { gl_FragColor = texture2D(sampler, tex); }\";var fs=gl.createShader(35632);gl.shaderSource(fs,fsCode);gl.compileShader(fs);var blitProgram=gl.createProgram();gl.attachShader(blitProgram,vs);gl.attachShader(blitProgram,fs);gl.linkProgram(blitProgram);context.blitProgram=blitProgram;context.blitPosLoc=gl.getAttribLocation(blitProgram,\"pos\");gl.useProgram(blitProgram);gl.uniform1i(gl.getUniformLocation(blitProgram,\"sampler\"),0);gl.useProgram(null);context.defaultVao=undefined;if(gl.createVertexArray){context.defaultVao=gl.createVertexArray();gl.bindVertexArray(context.defaultVao);gl.enableVertexAttribArray(context.blitPosLoc);gl.bindVertexArray(null)}},resizeOffscreenFramebuffer:function(context){var gl=context.GLctx;if(context.defaultColorTarget){var prevTextureBinding=gl.getParameter(32873);gl.bindTexture(3553,context.defaultColorTarget);gl.texImage2D(3553,0,6408,gl.drawingBufferWidth,gl.drawingBufferHeight,0,6408,5121,null);gl.bindTexture(3553,prevTextureBinding)}if(context.defaultDepthTarget){var prevRenderBufferBinding=gl.getParameter(36007);gl.bindRenderbuffer(36161,context.defaultDepthTarget);gl.renderbufferStorage(36161,33189,gl.drawingBufferWidth,gl.drawingBufferHeight);gl.bindRenderbuffer(36161,prevRenderBufferBinding)}},blitOffscreenFramebuffer:function(context){var gl=context.GLctx;var prevScissorTest=gl.getParameter(3089);if(prevScissorTest)gl.disable(3089);var prevFbo=gl.getParameter(36006);if(gl.blitFramebuffer&&!context.defaultFboForbidBlitFramebuffer){gl.bindFramebuffer(36008,context.defaultFbo);gl.bindFramebuffer(36009,null);gl.blitFramebuffer(0,0,gl.canvas.width,gl.canvas.height,0,0,gl.canvas.width,gl.canvas.height,16384,9728)}else{gl.bindFramebuffer(36160,null);var prevProgram=gl.getParameter(35725);gl.useProgram(context.blitProgram);var prevVB=gl.getParameter(34964);gl.bindBuffer(34962,context.blitVB);var prevActiveTexture=gl.getParameter(34016);gl.activeTexture(33984);var prevTextureBinding=gl.getParameter(32873);gl.bindTexture(3553,context.defaultColorTarget);var prevBlend=gl.getParameter(3042);if(prevBlend)gl.disable(3042);var prevCullFace=gl.getParameter(2884);if(prevCullFace)gl.disable(2884);var prevDepthTest=gl.getParameter(2929);if(prevDepthTest)gl.disable(2929);var prevStencilTest=gl.getParameter(2960);if(prevStencilTest)gl.disable(2960);function draw(){gl.vertexAttribPointer(context.blitPosLoc,2,5126,false,0,0);gl.drawArrays(5,0,4)}if(context.defaultVao){var prevVAO=gl.getParameter(34229);gl.bindVertexArray(context.defaultVao);draw();gl.bindVertexArray(prevVAO)}else{var prevVertexAttribPointer={buffer:gl.getVertexAttrib(context.blitPosLoc,34975),size:gl.getVertexAttrib(context.blitPosLoc,34339),stride:gl.getVertexAttrib(context.blitPosLoc,34340),type:gl.getVertexAttrib(context.blitPosLoc,34341),normalized:gl.getVertexAttrib(context.blitPosLoc,34922),pointer:gl.getVertexAttribOffset(context.blitPosLoc,34373)};var maxVertexAttribs=gl.getParameter(34921);var prevVertexAttribEnables=[];for(var i=0;i<maxVertexAttribs;++i){var prevEnabled=gl.getVertexAttrib(i,34338);var wantEnabled=i==context.blitPosLoc;if(prevEnabled&&!wantEnabled){gl.disableVertexAttribArray(i)}if(!prevEnabled&&wantEnabled){gl.enableVertexAttribArray(i)}prevVertexAttribEnables[i]=prevEnabled}draw();for(var i=0;i<maxVertexAttribs;++i){var prevEnabled=prevVertexAttribEnables[i];var nowEnabled=i==context.blitPosLoc;if(prevEnabled&&!nowEnabled){gl.enableVertexAttribArray(i)}if(!prevEnabled&&nowEnabled){gl.disableVertexAttribArray(i)}}gl.bindBuffer(34962,prevVertexAttribPointer.buffer);gl.vertexAttribPointer(context.blitPosLoc,prevVertexAttribPointer.size,prevVertexAttribPointer.type,prevVertexAttribPointer.normalized,prevVertexAttribPointer.stride,prevVertexAttribPointer.offset)}if(prevStencilTest)gl.enable(2960);if(prevDepthTest)gl.enable(2929);if(prevCullFace)gl.enable(2884);if(prevBlend)gl.enable(3042);gl.bindTexture(3553,prevTextureBinding);gl.activeTexture(prevActiveTexture);gl.bindBuffer(34962,prevVB);gl.useProgram(prevProgram)}gl.bindFramebuffer(36160,prevFbo);if(prevScissorTest)gl.enable(3089)},registerContext:function(ctx,webGLContextAttributes){var handle=GL.getNewId(GL.contexts);var context={handle:handle,attributes:webGLContextAttributes,version:webGLContextAttributes.majorVersion,GLctx:ctx};if(ctx.canvas)ctx.canvas.GLctxObject=context;GL.contexts[handle]=context;if(typeof webGLContextAttributes.enableExtensionsByDefault===\"undefined\"||webGLContextAttributes.enableExtensionsByDefault){GL.initExtensions(context)}context.maxVertexAttribs=context.GLctx.getParameter(34921);context.clientBuffers=[];for(var i=0;i<context.maxVertexAttribs;i++){context.clientBuffers[i]={enabled:false,clientside:false,size:0,type:0,normalized:0,stride:0,ptr:0,vertexAttribPointerAdaptor:null}}GL.generateTempBuffers(false,context);if(webGLContextAttributes.renderViaOffscreenBackBuffer)GL.createOffscreenFramebuffer(context);return handle},makeContextCurrent:function(contextHandle){GL.currentContext=GL.contexts[contextHandle];Module.ctx=GLctx=GL.currentContext&&GL.currentContext.GLctx;return!(contextHandle&&!GLctx)},getContext:function(contextHandle){return GL.contexts[contextHandle]},deleteContext:function(contextHandle){if(GL.currentContext===GL.contexts[contextHandle])GL.currentContext=null;if(typeof JSEvents===\"object\")JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas);if(GL.contexts[contextHandle]&&GL.contexts[contextHandle].GLctx.canvas)GL.contexts[contextHandle].GLctx.canvas.GLctxObject=undefined;GL.contexts[contextHandle]=null},initExtensions:function(context){if(!context)context=GL.currentContext;if(context.initExtensionsDone)return;context.initExtensionsDone=true;var GLctx=context.GLctx;__webgl_enable_ANGLE_instanced_arrays(GLctx);__webgl_enable_OES_vertex_array_object(GLctx);__webgl_enable_WEBGL_draw_buffers(GLctx);__webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(GLctx);__webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(GLctx);if(context.version>=2){GLctx.disjointTimerQueryExt=GLctx.getExtension(\"EXT_disjoint_timer_query_webgl2\")}if(context.version<2||!GLctx.disjointTimerQueryExt){GLctx.disjointTimerQueryExt=GLctx.getExtension(\"EXT_disjoint_timer_query\")}__webgl_enable_WEBGL_multi_draw(GLctx);var exts=GLctx.getSupportedExtensions()||[];exts.forEach(function(ext){if(!ext.includes(\"lose_context\")&&!ext.includes(\"debug\")){GLctx.getExtension(ext)}})}};var JSEvents={inEventHandler:0,removeAllEventListeners:function(){for(var i=JSEvents.eventHandlers.length-1;i>=0;--i){JSEvents._removeHandler(i)}JSEvents.eventHandlers=[];JSEvents.deferredCalls=[]},registerRemoveEventListeners:function(){if(!JSEvents.removeEventListenersRegistered){__ATEXIT__.push(JSEvents.removeAllEventListeners);JSEvents.removeEventListenersRegistered=true}},deferredCalls:[],deferCall:function(targetFunction,precedence,argsList){function arraysHaveEqualContent(arrA,arrB){if(arrA.length!=arrB.length)return false;for(var i in arrA){if(arrA[i]!=arrB[i])return false}return true}for(var i in JSEvents.deferredCalls){var call=JSEvents.deferredCalls[i];if(call.targetFunction==targetFunction&&arraysHaveEqualContent(call.argsList,argsList)){return}}JSEvents.deferredCalls.push({targetFunction:targetFunction,precedence:precedence,argsList:argsList});JSEvents.deferredCalls.sort(function(x,y){return x.precedence<y.precedence})},removeDeferredCalls:function(targetFunction){for(var i=0;i<JSEvents.deferredCalls.length;++i){if(JSEvents.deferredCalls[i].targetFunction==targetFunction){JSEvents.deferredCalls.splice(i,1);--i}}},canPerformEventHandlerRequests:function(){return JSEvents.inEventHandler&&JSEvents.currentEventHandler.allowsDeferredCalls},runDeferredCalls:function(){if(!JSEvents.canPerformEventHandlerRequests()){return}for(var i=0;i<JSEvents.deferredCalls.length;++i){var call=JSEvents.deferredCalls[i];JSEvents.deferredCalls.splice(i,1);--i;call.targetFunction.apply(null,call.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:function(target,eventTypeString){for(var i=0;i<JSEvents.eventHandlers.length;++i){if(JSEvents.eventHandlers[i].target==target&&(!eventTypeString||eventTypeString==JSEvents.eventHandlers[i].eventTypeString)){JSEvents._removeHandler(i--)}}},_removeHandler:function(i){var h=JSEvents.eventHandlers[i];h.target.removeEventListener(h.eventTypeString,h.eventListenerFunc,h.useCapture);JSEvents.eventHandlers.splice(i,1)},registerOrRemoveHandler:function(eventHandler){var jsEventHandler=function jsEventHandler(event){++JSEvents.inEventHandler;JSEvents.currentEventHandler=eventHandler;JSEvents.runDeferredCalls();eventHandler.handlerFunc(event);JSEvents.runDeferredCalls();--JSEvents.inEventHandler};if(eventHandler.callbackfunc){eventHandler.eventListenerFunc=jsEventHandler;eventHandler.target.addEventListener(eventHandler.eventTypeString,jsEventHandler,eventHandler.useCapture);JSEvents.eventHandlers.push(eventHandler);JSEvents.registerRemoveEventListeners()}else{for(var i=0;i<JSEvents.eventHandlers.length;++i){if(JSEvents.eventHandlers[i].target==eventHandler.target&&JSEvents.eventHandlers[i].eventTypeString==eventHandler.eventTypeString){JSEvents._removeHandler(i--)}}}},getNodeNameForTarget:function(target){if(!target)return\"\";if(target==window)return\"#window\";if(target==screen)return\"#screen\";return target&&target.nodeName?target.nodeName:\"\"},fullscreenEnabled:function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled}};var __emscripten_webgl_power_preferences=[\"default\",\"low-power\",\"high-performance\"];var specialHTMLTargets=[0,typeof document!==\"undefined\"?document:0,typeof window!==\"undefined\"?window:0];function findEventTarget(target){warnOnce(\"Rules for selecting event targets in HTML5 API are changing: instead of using document.getElementById() that only can refer to elements by their DOM ID, new event target selection mechanism uses the more flexible function document.querySelector() that can look up element names, classes, and complex CSS selectors. Build with -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1 to change to the new lookup rules. See https://github.com/emscripten-core/emscripten/pull/7977 for more details.\");try{if(!target)return window;if(typeof target===\"number\")target=specialHTMLTargets[target]||UTF8ToString(target);if(target===\"#window\")return window;else if(target===\"#document\")return document;else if(target===\"#screen\")return screen;else if(target===\"#canvas\")return Module[\"canvas\"];return typeof target===\"string\"?document.getElementById(target):target}catch(e){return null}}function findCanvasEventTarget(target){if(typeof target===\"number\")target=UTF8ToString(target);if(!target||target===\"#canvas\"){if(typeof GL!==\"undefined\"&&GL.offscreenCanvases[\"canvas\"])return GL.offscreenCanvases[\"canvas\"];return Module[\"canvas\"]}if(typeof GL!==\"undefined\"&&GL.offscreenCanvases[target])return GL.offscreenCanvases[target];return findEventTarget(target)}function _emscripten_webgl_do_create_context(target,attributes){assert(attributes);var a=attributes>>2;var powerPreference=HEAP32[a+(24>>2)];var contextAttributes={\"alpha\":!!HEAP32[a+(0>>2)],\"depth\":!!HEAP32[a+(4>>2)],\"stencil\":!!HEAP32[a+(8>>2)],\"antialias\":!!HEAP32[a+(12>>2)],\"premultipliedAlpha\":!!HEAP32[a+(16>>2)],\"preserveDrawingBuffer\":!!HEAP32[a+(20>>2)],\"powerPreference\":__emscripten_webgl_power_preferences[powerPreference],\"failIfMajorPerformanceCaveat\":!!HEAP32[a+(28>>2)],majorVersion:HEAP32[a+(32>>2)],minorVersion:HEAP32[a+(36>>2)],enableExtensionsByDefault:HEAP32[a+(40>>2)],explicitSwapControl:HEAP32[a+(44>>2)],proxyContextToMainThread:HEAP32[a+(48>>2)],renderViaOffscreenBackBuffer:HEAP32[a+(52>>2)]};var canvas=findCanvasEventTarget(target);if(!canvas){return 0}if(canvas.offscreenCanvas)canvas=canvas.offscreenCanvas;if(contextAttributes.explicitSwapControl){var supportsOffscreenCanvas=canvas.transferControlToOffscreen||typeof OffscreenCanvas!==\"undefined\"&&canvas instanceof OffscreenCanvas;if(!supportsOffscreenCanvas){if(!contextAttributes.renderViaOffscreenBackBuffer){contextAttributes.renderViaOffscreenBackBuffer=true}}if(canvas.transferControlToOffscreen){if(!canvas.controlTransferredOffscreen){GL.offscreenCanvases[canvas.id]={canvas:canvas.transferControlToOffscreen(),canvasSharedPtr:_malloc(12),id:canvas.id};canvas.controlTransferredOffscreen=true}else if(!GL.offscreenCanvases[canvas.id]){return 0}canvas=GL.offscreenCanvases[canvas.id]}}var contextHandle=GL.createContext(canvas,contextAttributes);return contextHandle}function _emscripten_webgl_create_context(a0,a1){return _emscripten_webgl_do_create_context(a0,a1)}function _emscripten_webgl_do_get_current_context(){return GL.currentContext?GL.currentContext.handle:0}function _emscripten_webgl_get_current_context(){return _emscripten_webgl_do_get_current_context()}Module[\"_emscripten_webgl_get_current_context\"]=_emscripten_webgl_get_current_context;function _emscripten_webgl_make_context_current(contextHandle){var success=GL.makeContextCurrent(contextHandle);return success?0:-5}Module[\"_emscripten_webgl_make_context_current\"]=_emscripten_webgl_make_context_current;function _emscripten_webgl_destroy_context(contextHandle){if(GL.currentContext==contextHandle)GL.currentContext=0;GL.deleteContext(contextHandle)}function _emscripten_webgl_get_context_attributes(c,a){if(!a)return-5;c=GL.contexts[c];if(!c)return-3;var t=c.GLctx;if(!t)return-3;t=t.getContextAttributes();HEAP32[a>>2]=t.alpha;HEAP32[a+4>>2]=t.depth;HEAP32[a+8>>2]=t.stencil;HEAP32[a+12>>2]=t.antialias;HEAP32[a+16>>2]=t.premultipliedAlpha;HEAP32[a+20>>2]=t.preserveDrawingBuffer;var power=t[\"powerPreference\"]&&__emscripten_webgl_power_preferences.indexOf(t[\"powerPreference\"]);HEAP32[a+24>>2]=power;HEAP32[a+28>>2]=t.failIfMajorPerformanceCaveat;HEAP32[a+32>>2]=c.version;HEAP32[a+36>>2]=0;HEAP32[a+40>>2]=c.attributes.enableExtensionsByDefault;return 0}function _emscripten_webgl_init_context_attributes(attributes){assert(attributes);var a=attributes>>2;for(var i=0;i<56>>2;++i){HEAP32[a+i]=0}HEAP32[a+(0>>2)]=HEAP32[a+(4>>2)]=HEAP32[a+(12>>2)]=HEAP32[a+(16>>2)]=HEAP32[a+(32>>2)]=HEAP32[a+(40>>2)]=1}var ENV={};function getExecutableName(){return thisProgram||\"./this.program\"}function 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}function _environ_get(__environ,environ_buf){var bufSize=0;getEnvStrings().forEach(function(string,i){var ptr=environ_buf+bufSize;HEAP32[__environ+i*4>>2]=ptr;writeAsciiToMemory(string,ptr);bufSize+=string.length+1});return 0}function _environ_sizes_get(penviron_count,penviron_buf_size){var strings=getEnvStrings();HEAP32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1});HEAP32[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 instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_read(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=SYSCALLS.doReadv(stream,iov,iovcnt);HEAP32[pnum>>2]=num;return 0}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){try{var stream=SYSCALLS.getStreamFromFD(fd);var HIGH_OFFSET=4294967296;var offset=offset_high*HIGH_OFFSET+(offset_low>>>0);var DOUBLE_LIMIT=9007199254740992;if(offset<=-DOUBLE_LIMIT||offset>=DOUBLE_LIMIT){return-61}FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[newOffset>>2]=tempI64[0],HEAP32[newOffset+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_write(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=SYSCALLS.doWritev(stream,iov,iovcnt);HEAP32[pnum>>2]=num;return 0}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _getTempRet0(){return getTempRet0()}function _getentropy(buffer,size){if(!_getentropy.randomDevice){_getentropy.randomDevice=getRandomDevice()}for(var i=0;i<size;i++){HEAP8[buffer+i>>0]=_getentropy.randomDevice()}return 0}function _glActiveTexture(x0){GLctx[\"activeTexture\"](x0)}function _glAttachShader(program,shader){GLctx.attachShader(GL.programs[program],GL.shaders[shader])}function _glBindAttribLocation(program,index,name){GLctx.bindAttribLocation(GL.programs[program],index,UTF8ToString(name))}function _glBindBuffer(target,buffer){if(target==34962){GLctx.currentArrayBufferBinding=buffer}else if(target==34963){GLctx.currentElementArrayBufferBinding=buffer}if(target==35051){GLctx.currentPixelPackBufferBinding=buffer}else if(target==35052){GLctx.currentPixelUnpackBufferBinding=buffer}GLctx.bindBuffer(target,GL.buffers[buffer])}function _glBindBufferBase(target,index,buffer){GLctx[\"bindBufferBase\"](target,index,GL.buffers[buffer])}function _glBindFramebuffer(target,framebuffer){GLctx.bindFramebuffer(target,framebuffer?GL.framebuffers[framebuffer]:GL.currentContext.defaultFbo)}function _glBindTexture(target,texture){GLctx.bindTexture(target,GL.textures[texture])}function _glBindVertexArray(vao){GLctx[\"bindVertexArray\"](GL.vaos[vao]);var ibo=GLctx.getParameter(34965);GLctx.currentElementArrayBufferBinding=ibo?ibo.name|0:0}function _glBufferData(target,size,data,usage){if(GL.currentContext.version>=2){if(data){GLctx.bufferData(target,HEAPU8,usage,data,size)}else{GLctx.bufferData(target,size,usage)}}else{GLctx.bufferData(target,data?HEAPU8.subarray(data,data+size):size,usage)}}function convertI32PairToI53(lo,hi){assert(hi===(hi|0));return(lo>>>0)+hi*4294967296}function _glClientWaitSync(sync,flags,timeoutLo,timeoutHi){return GLctx.clientWaitSync(GL.syncs[sync],flags,convertI32PairToI53(timeoutLo,timeoutHi))}function _glCompileShader(shader){GLctx.compileShader(GL.shaders[shader])}function _glCreateProgram(){var id=GL.getNewId(GL.programs);var program=GLctx.createProgram();program.name=id;program.maxUniformLength=program.maxAttributeLength=program.maxUniformBlockNameLength=0;program.uniformIdCounter=1;GL.programs[id]=program;return id}function _glCreateShader(shaderType){var id=GL.getNewId(GL.shaders);GL.shaders[id]=GLctx.createShader(shaderType);return id}function _glDeleteBuffers(n,buffers){for(var i=0;i<n;i++){var id=HEAP32[buffers+i*4>>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GLctx.currentArrayBufferBinding)GLctx.currentArrayBufferBinding=0;if(id==GLctx.currentElementArrayBufferBinding)GLctx.currentElementArrayBufferBinding=0;if(id==GLctx.currentPixelPackBufferBinding)GLctx.currentPixelPackBufferBinding=0;if(id==GLctx.currentPixelUnpackBufferBinding)GLctx.currentPixelUnpackBufferBinding=0}}function _glDeleteFramebuffers(n,framebuffers){for(var i=0;i<n;++i){var id=HEAP32[framebuffers+i*4>>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}function _glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null}function _glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _glDeleteSync(id){if(!id)return;var sync=GL.syncs[id];if(!sync){GL.recordError(1281);return}GLctx.deleteSync(sync);sync.name=0;GL.syncs[id]=null}function _glDeleteTextures(n,textures){for(var i=0;i<n;i++){var id=HEAP32[textures+i*4>>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _glDeleteVertexArrays(n,vaos){for(var i=0;i<n;i++){var id=HEAP32[vaos+i*4>>2];GLctx[\"deleteVertexArray\"](GL.vaos[id]);GL.vaos[id]=null}}function _glDisable(x0){GLctx[\"disable\"](x0)}function _glDisableVertexAttribArray(index){var cb=GL.currentContext.clientBuffers[index];cb.enabled=false;GLctx.disableVertexAttribArray(index)}function _glDrawArrays(mode,first,count){GL.preDrawHandleClientVertexAttribBindings(first+count);GLctx.drawArrays(mode,first,count);GL.postDrawHandleClientVertexAttribBindings()}var tempFixedLengthArray=[];function _glDrawBuffers(n,bufs){var bufArray=tempFixedLengthArray[n];for(var i=0;i<n;i++){bufArray[i]=HEAP32[bufs+i*4>>2]}GLctx[\"drawBuffers\"](bufArray)}function _glEnableVertexAttribArray(index){var cb=GL.currentContext.clientBuffers[index];cb.enabled=true;GLctx.enableVertexAttribArray(index)}function _glFenceSync(condition,flags){var sync=GLctx.fenceSync(condition,flags);if(sync){var id=GL.getNewId(GL.syncs);sync.name=id;GL.syncs[id]=sync;return id}else{return 0}}function _glFinish(){GLctx[\"finish\"]()}function _glFlush(){GLctx[\"flush\"]()}function _glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}function _glFramebufferTextureLayer(target,attachment,texture,level,layer){GLctx.framebufferTextureLayer(target,attachment,GL.textures[texture],level,layer)}function __glGenObject(n,buffers,createFunction,objectTable){for(var i=0;i<n;i++){var buffer=GLctx[createFunction]();var id=buffer&&GL.getNewId(objectTable);if(buffer){buffer.name=id;objectTable[id]=buffer}else{GL.recordError(1282)}HEAP32[buffers+i*4>>2]=id}}function _glGenBuffers(n,buffers){__glGenObject(n,buffers,\"createBuffer\",GL.buffers)}function _glGenFramebuffers(n,ids){__glGenObject(n,ids,\"createFramebuffer\",GL.framebuffers)}function _glGenTextures(n,textures){__glGenObject(n,textures,\"createTexture\",GL.textures)}function _glGenVertexArrays(n,arrays){__glGenObject(n,arrays,\"createVertexArray\",GL.vaos)}function _glGetAttribLocation(program,name){return GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name))}function _glGetError(){var error=GLctx.getError()||GL.lastError;GL.lastError=0;return error}function readI53FromI64(ptr){return HEAPU32[ptr>>2]+HEAP32[ptr+4>>2]*4294967296}function readI53FromU64(ptr){return HEAPU32[ptr>>2]+HEAPU32[ptr+4>>2]*4294967296}function writeI53ToI64(ptr,num){HEAPU32[ptr>>2]=num;HEAPU32[ptr+4>>2]=(num-HEAPU32[ptr>>2])/4294967296;var deserialized=num>=0?readI53FromU64(ptr):readI53FromI64(ptr);if(deserialized!=num)warnOnce(\"writeI53ToI64() out of range: serialized JS Number \"+num+\" to Wasm heap as bytes lo=0x\"+HEAPU32[ptr>>2].toString(16)+\", hi=0x\"+HEAPU32[ptr+4>>2].toString(16)+\", which deserializes back to \"+deserialized+\" instead!\")}function emscriptenWebGLGet(name_,p,type){if(!p){GL.recordError(1281);return}var ret=undefined;switch(name_){case 36346:ret=1;break;case 36344:if(type!=0&&type!=1){GL.recordError(1280)}return;case 34814:case 36345:ret=0;break;case 34466:var formats=GLctx.getParameter(34467);ret=formats?formats.length:0;break;case 33309:if(GL.currentContext.version<2){GL.recordError(1282);return}var exts=GLctx.getSupportedExtensions()||[];ret=2*exts.length;break;case 33307:case 33308:if(GL.currentContext.version<2){GL.recordError(1280);return}ret=name_==33307?3:0;break}if(ret===undefined){var result=GLctx.getParameter(name_);switch(typeof result){case\"number\":ret=result;break;case\"boolean\":ret=result?1:0;break;case\"string\":GL.recordError(1280);return;case\"object\":if(result===null){switch(name_){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:{ret=0;break}default:{GL.recordError(1280);return}}}else if(result instanceof Float32Array||result instanceof Uint32Array||result instanceof Int32Array||result instanceof Array){for(var i=0;i<result.length;++i){switch(type){case 0:HEAP32[p+i*4>>2]=result[i];break;case 2:HEAPF32[p+i*4>>2]=result[i];break;case 4:HEAP8[p+i>>0]=result[i]?1:0;break}}return}else{try{ret=result.name|0}catch(e){GL.recordError(1280);err(\"GL_INVALID_ENUM in glGet\"+type+\"v: Unknown object returned from WebGL getParameter(\"+name_+\")! (error: \"+e+\")\");return}}break;default:GL.recordError(1280);err(\"GL_INVALID_ENUM in glGet\"+type+\"v: Native code calling glGet\"+type+\"v(\"+name_+\") and it returns \"+result+\" of type \"+typeof result+\"!\");return}}switch(type){case 1:writeI53ToI64(p,ret);break;case 0:HEAP32[p>>2]=ret;break;case 2:HEAPF32[p>>2]=ret;break;case 4:HEAP8[p>>0]=ret?1:0;break}}function _glGetIntegerv(name_,p){emscriptenWebGLGet(name_,p,0)}function stringToNewUTF8(jsString){var length=lengthBytesUTF8(jsString)+1;var cString=_malloc(length);stringToUTF8(jsString,cString,length);return cString}function _glGetString(name_){var ret=GL.stringCache[name_];if(!ret){switch(name_){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return\"GL_\"+e}));ret=stringToNewUTF8(exts.join(\" \"));break;case 7936:case 7937:case 37445:case 37446:var s=GLctx.getParameter(name_);if(!s){GL.recordError(1280)}ret=s&&stringToNewUTF8(s);break;case 7938:var glVersion=GLctx.getParameter(7938);if(GL.currentContext.version>=2)glVersion=\"OpenGL ES 3.0 (\"+glVersion+\")\";else{glVersion=\"OpenGL ES 2.0 (\"+glVersion+\")\"}ret=stringToNewUTF8(glVersion);break;case 35724:var glslVersion=GLctx.getParameter(35724);var ver_re=/^WebGL GLSL ES ([0-9]\\.[0-9][0-9]?)(?:$| .*)/;var ver_num=glslVersion.match(ver_re);if(ver_num!==null){if(ver_num[1].length==3)ver_num[1]=ver_num[1]+\"0\";glslVersion=\"OpenGL ES GLSL ES \"+ver_num[1]+\" (\"+glslVersion+\")\"}ret=stringToNewUTF8(glslVersion);break;default:GL.recordError(1280)}GL.stringCache[name_]=ret}return ret}function _glGetUniformBlockIndex(program,uniformBlockName){return GLctx[\"getUniformBlockIndex\"](GL.programs[program],UTF8ToString(uniformBlockName))}function jstoi_q(str){return parseInt(str)}function webglGetLeftBracePos(name){return name.slice(-1)==\"]\"&&name.lastIndexOf(\"[\")}function webglPrepareUniformLocationsBeforeFirstUse(program){var uniformLocsById=program.uniformLocsById,uniformSizeAndIdsByName=program.uniformSizeAndIdsByName,i,j;if(!uniformLocsById){program.uniformLocsById=uniformLocsById={};program.uniformArrayNamesById={};for(i=0;i<GLctx.getProgramParameter(program,35718);++i){var u=GLctx.getActiveUniform(program,i);var nm=u.name;var sz=u.size;var lb=webglGetLeftBracePos(nm);var arrayName=lb>0?nm.slice(0,lb):nm;var id=program.uniformIdCounter;program.uniformIdCounter+=sz;uniformSizeAndIdsByName[arrayName]=[sz,id];for(j=0;j<sz;++j){uniformLocsById[id]=j;program.uniformArrayNamesById[id++]=arrayName}}}}function _glGetUniformLocation(program,name){name=UTF8ToString(name);if(program=GL.programs[program]){webglPrepareUniformLocationsBeforeFirstUse(program);var uniformLocsById=program.uniformLocsById;var arrayIndex=0;var uniformBaseName=name;var leftBrace=webglGetLeftBracePos(name);if(leftBrace>0){arrayIndex=jstoi_q(name.slice(leftBrace+1))>>>0;uniformBaseName=name.slice(0,leftBrace)}var sizeAndId=program.uniformSizeAndIdsByName[uniformBaseName];if(sizeAndId&&arrayIndex<sizeAndId[0]){arrayIndex+=sizeAndId[1];if(uniformLocsById[arrayIndex]=uniformLocsById[arrayIndex]||GLctx.getUniformLocation(program,name)){return arrayIndex}}}else{GL.recordError(1281)}return-1}function _glLinkProgram(program){program=GL.programs[program];GLctx.linkProgram(program);program.uniformLocsById=0;program.uniformSizeAndIdsByName={}}function _glPixelStorei(pname,param){if(pname==3317){GL.unpackAlignment=param}GLctx.pixelStorei(pname,param)}function computeUnpackAlignedImageSize(width,height,sizePerPixel,alignment){function roundedToNextMultipleOf(x,y){return x+y-1&-y}var plainRowSize=width*sizePerPixel;var alignedRowSize=roundedToNextMultipleOf(plainRowSize,alignment);return height*alignedRowSize}function __colorChannelsInGlTextureFormat(format){var colorChannels={5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4};return colorChannels[format-6402]||1}function heapObjectForWebGLType(type){type-=5120;if(type==0)return HEAP8;if(type==1)return HEAPU8;if(type==2)return HEAP16;if(type==4)return HEAP32;if(type==6)return HEAPF32;if(type==5||type==28922||type==28520||type==30779||type==30782)return HEAPU32;return HEAPU16}function heapAccessShiftForWebGLHeap(heap){return 31-Math.clz32(heap.BYTES_PER_ELEMENT)}function emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat){var heap=heapObjectForWebGLType(type);var shift=heapAccessShiftForWebGLHeap(heap);var byteSize=1<<shift;var sizePerPixel=__colorChannelsInGlTextureFormat(format)*byteSize;var bytes=computeUnpackAlignedImageSize(width,height,sizePerPixel,GL.unpackAlignment);return heap.subarray(pixels>>shift,pixels+bytes>>shift)}function _glReadPixels(x,y,width,height,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelPackBufferBinding){GLctx.readPixels(x,y,width,height,format,type,pixels)}else{var heap=heapObjectForWebGLType(type);GLctx.readPixels(x,y,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}return}var pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,format);if(!pixelData){GL.recordError(1280);return}GLctx.readPixels(x,y,width,height,format,type,pixelData)}function _glShaderSource(shader,count,string,length){var source=GL.getSource(shader,count,string,length);GLctx.shaderSource(GL.shaders[shader],source)}function _glTexImage2D(target,level,internalFormat,width,height,border,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,null)}return}GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels?emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat):null)}function _glTexParameterfv(target,pname,params){var param=HEAPF32[params>>2];GLctx.texParameterf(target,pname,param)}function _glTexParameteri(x0,x1,x2){GLctx[\"texParameteri\"](x0,x1,x2)}function _glTexStorage2D(x0,x1,x2,x3,x4){GLctx[\"texStorage2D\"](x0,x1,x2,x3,x4)}function _glTexStorage3D(x0,x1,x2,x3,x4,x5){GLctx[\"texStorage3D\"](x0,x1,x2,x3,x4,x5)}function _glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,null)}return}var pixelData=null;if(pixels)pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,0);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixelData)}function _glTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx[\"texSubImage3D\"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx[\"texSubImage3D\"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx[\"texSubImage3D\"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,null)}}function webglGetUniformLocation(location){var p=GLctx.currentProgram;if(p){var webglLoc=p.uniformLocsById[location];if(typeof webglLoc===\"number\"){p.uniformLocsById[location]=webglLoc=GLctx.getUniformLocation(p,p.uniformArrayNamesById[location]+(webglLoc>0?\"[\"+webglLoc+\"]\":\"\"))}return webglLoc}else{GL.recordError(1282)}}function _glUniform1f(location,v0){GLctx.uniform1f(webglGetUniformLocation(location),v0)}function _glUniform1i(location,v0){GLctx.uniform1i(webglGetUniformLocation(location),v0)}var miniTempWebGLFloatBuffers=[];function _glUniform2fv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform2fv(webglGetUniformLocation(location),HEAPF32,value>>2,count*2);return}if(count<=144){var view=miniTempWebGLFloatBuffers[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2fv(webglGetUniformLocation(location),view)}function _glUniform4fv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform4fv(webglGetUniformLocation(location),HEAPF32,value>>2,count*4);return}if(count<=72){var view=miniTempWebGLFloatBuffers[4*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<4*count;i+=4){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4fv(webglGetUniformLocation(location),view)}var __miniTempWebGLIntBuffers=[];function _glUniform4iv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform4iv(webglGetUniformLocation(location),HEAP32,value>>2,count*4);return}if(count<=72){var view=__miniTempWebGLIntBuffers[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2];view[i+2]=HEAP32[value+(4*i+8)>>2];view[i+3]=HEAP32[value+(4*i+12)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4iv(webglGetUniformLocation(location),view)}function _glUniformBlockBinding(program,uniformBlockIndex,uniformBlockBinding){program=GL.programs[program];GLctx[\"uniformBlockBinding\"](program,uniformBlockIndex,uniformBlockBinding)}function _glUniformMatrix4fv(location,count,transpose,value){if(GL.currentContext.version>=2){GLctx.uniformMatrix4fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*16);return}if(count<=18){var view=miniTempWebGLFloatBuffers[16*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<16*count;i+=16){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3];view[i+4]=heap[dst+4];view[i+5]=heap[dst+5];view[i+6]=heap[dst+6];view[i+7]=heap[dst+7];view[i+8]=heap[dst+8];view[i+9]=heap[dst+9];view[i+10]=heap[dst+10];view[i+11]=heap[dst+11];view[i+12]=heap[dst+12];view[i+13]=heap[dst+13];view[i+14]=heap[dst+14];view[i+15]=heap[dst+15]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(webglGetUniformLocation(location),!!transpose,view)}function _glUseProgram(program){program=GL.programs[program];GLctx.useProgram(program);GLctx.currentProgram=program}function _glVertexAttribPointer(index,size,type,normalized,stride,ptr){var cb=GL.currentContext.clientBuffers[index];if(!GLctx.currentArrayBufferBinding){cb.size=size;cb.type=type;cb.normalized=normalized;cb.stride=stride;cb.ptr=ptr;cb.clientside=true;cb.vertexAttribPointerAdaptor=function(index,size,type,normalized,stride,ptr){this.vertexAttribPointer(index,size,type,normalized,stride,ptr)};return}cb.clientside=false;GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _glViewport(x0,x1,x2,x3){GLctx[\"viewport\"](x0,x1,x2,x3)}function _gmtime_r(time,tmPtr){var date=new Date(HEAP32[time>>2]*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();HEAP32[tmPtr+36>>2]=0;HEAP32[tmPtr+32>>2]=0;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;if(!_gmtime_r.GMTString)_gmtime_r.GMTString=allocateUTF8(\"GMT\");HEAP32[tmPtr+40>>2]=_gmtime_r.GMTString;return tmPtr}function _llvm_eh_typeid_for(type){return type}function _tzset(){if(_tzset.called)return;_tzset.called=true;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);HEAP32[__get_timezone()>>2]=stdTimezoneOffset*60;HEAP32[__get_daylight()>>2]=Number(winterOffset!=summerOffset);function extractZone(date){var match=date.toTimeString().match(/\\(([A-Za-z ]+)\\)$/);return match?match[1]:\"GMT\"}var winterName=extractZone(winter);var summerName=extractZone(summer);var winterNamePtr=allocateUTF8(winterName);var summerNamePtr=allocateUTF8(summerName);if(summerOffset<winterOffset){HEAP32[__get_tzname()>>2]=winterNamePtr;HEAP32[__get_tzname()+4>>2]=summerNamePtr}else{HEAP32[__get_tzname()>>2]=summerNamePtr;HEAP32[__get_tzname()+4>>2]=winterNamePtr}}function _localtime_r(time,tmPtr){_tzset();var date=new Date(HEAP32[time>>2]*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 start=new Date(date.getFullYear(),0,1);var yday=(date.getTime()-start.getTime())/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);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 zonePtr=HEAP32[__get_tzname()+(dst?4:0)>>2];HEAP32[tmPtr+40>>2]=zonePtr;return tmPtr}function _mktime(tmPtr){_tzset();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=(date.getTime()-start.getTime())/(1e3*60*60*24)|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();return date.getTime()/1e3|0}function _proc_exit(code){procExit(code)}function _setTempRet0(val){setTempRet0(val)}function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}function __arraySum(array,index){var sum=0;for(var i=0;i<=index;sum+=array[i++]){}return sum}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var __MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(date,days){var newDate=new Date(date.getTime());while(days>0){var leap=__isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate}function _strftime(s,maxsize,format,tm){var tm_zone=HEAP32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?UTF8ToString(tm_zone):\"\"};var pattern=UTF8ToString(format);var EXPANSION_RULES_1={\"%c\":\"%a %b %d %H:%M:%S %Y\",\"%D\":\"%m/%d/%y\",\"%F\":\"%Y-%m-%d\",\"%h\":\"%b\",\"%r\":\"%I:%M:%S %p\",\"%R\":\"%H:%M\",\"%T\":\"%H:%M:%S\",\"%x\":\"%m/%d/%y\",\"%X\":\"%H:%M:%S\",\"%Ec\":\"%c\",\"%EC\":\"%C\",\"%Ex\":\"%m/%d/%y\",\"%EX\":\"%H:%M:%S\",\"%Ey\":\"%y\",\"%EY\":\"%Y\",\"%Od\":\"%d\",\"%Oe\":\"%e\",\"%OH\":\"%H\",\"%OI\":\"%I\",\"%Om\":\"%m\",\"%OM\":\"%M\",\"%OS\":\"%S\",\"%Ou\":\"%u\",\"%OU\":\"%U\",\"%OV\":\"%V\",\"%Ow\":\"%w\",\"%OW\":\"%W\",\"%Oy\":\"%y\"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,\"g\"),EXPANSION_RULES_1[rule])}var WEEKDAYS=[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"];var MONTHS=[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"];function leadingSomething(value,digits,character){var str=typeof value===\"number\"?value.toString():value||\"\";while(str.length<digits){str=character[0]+str}return str}function leadingNulls(value,digits){return leadingSomething(value,digits,\"0\")}function compareByDay(date1,date2){function sgn(value){return value<0?-1:value>0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}else{return thisDate.getFullYear()}}else{return thisDate.getFullYear()-1}}var EXPANSION_RULES_2={\"%a\":function(date){return WEEKDAYS[date.tm_wday].substring(0,3)},\"%A\":function(date){return WEEKDAYS[date.tm_wday]},\"%b\":function(date){return MONTHS[date.tm_mon].substring(0,3)},\"%B\":function(date){return MONTHS[date.tm_mon]},\"%C\":function(date){var year=date.tm_year+1900;return leadingNulls(year/100|0,2)},\"%d\":function(date){return leadingNulls(date.tm_mday,2)},\"%e\":function(date){return leadingSomething(date.tm_mday,2,\" \")},\"%g\":function(date){return getWeekBasedYear(date).toString().substring(2)},\"%G\":function(date){return getWeekBasedYear(date)},\"%H\":function(date){return leadingNulls(date.tm_hour,2)},\"%I\":function(date){var twelveHour=date.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2)},\"%j\":function(date){return leadingNulls(date.tm_mday+__arraySum(__isLeapYear(date.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,date.tm_mon-1),3)},\"%m\":function(date){return leadingNulls(date.tm_mon+1,2)},\"%M\":function(date){return leadingNulls(date.tm_min,2)},\"%n\":function(){return\"\\n\"},\"%p\":function(date){if(date.tm_hour>=0&&date.tm_hour<12){return\"AM\"}else{return\"PM\"}},\"%S\":function(date){return leadingNulls(date.tm_sec,2)},\"%t\":function(){return\"\\t\"},\"%u\":function(date){return date.tm_wday||7},\"%U\":function(date){var janFirst=new Date(date.tm_year+1900,0,1);var firstSunday=janFirst.getDay()===0?janFirst:__addDays(janFirst,7-janFirst.getDay());var endDate=new Date(date.tm_year+1900,date.tm_mon,date.tm_mday);if(compareByDay(firstSunday,endDate)<0){var februaryFirstUntilEndMonth=__arraySum(__isLeapYear(endDate.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,endDate.getMonth()-1)-31;var firstSundayUntilEndJanuary=31-firstSunday.getDate();var days=firstSundayUntilEndJanuary+februaryFirstUntilEndMonth+endDate.getDate();return leadingNulls(Math.ceil(days/7),2)}return compareByDay(firstSunday,janFirst)===0?\"01\":\"00\"},\"%V\":function(date){var janFourthThisYear=new Date(date.tm_year+1900,0,4);var janFourthNextYear=new Date(date.tm_year+1901,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);var endDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);if(compareByDay(endDate,firstWeekStartThisYear)<0){return\"53\"}if(compareByDay(firstWeekStartNextYear,endDate)<=0){return\"01\"}var daysDifference;if(firstWeekStartThisYear.getFullYear()<date.tm_year+1900){daysDifference=date.tm_yday+32-firstWeekStartThisYear.getDate()}else{daysDifference=date.tm_yday+1-firstWeekStartThisYear.getDate()}return leadingNulls(Math.ceil(daysDifference/7),2)},\"%w\":function(date){return date.tm_wday},\"%W\":function(date){var janFirst=new Date(date.tm_year,0,1);var firstMonday=janFirst.getDay()===1?janFirst:__addDays(janFirst,janFirst.getDay()===0?1:7-janFirst.getDay()+1);var endDate=new Date(date.tm_year+1900,date.tm_mon,date.tm_mday);if(compareByDay(firstMonday,endDate)<0){var februaryFirstUntilEndMonth=__arraySum(__isLeapYear(endDate.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,endDate.getMonth()-1)-31;var firstMondayUntilEndJanuary=31-firstMonday.getDate();var days=firstMondayUntilEndJanuary+februaryFirstUntilEndMonth+endDate.getDate();return leadingNulls(Math.ceil(days/7),2)}return compareByDay(firstMonday,janFirst)===0?\"01\":\"00\"},\"%y\":function(date){return(date.tm_year+1900).toString().substring(2)},\"%Y\":function(date){return date.tm_year+1900},\"%z\":function(date){var off=date.tm_gmtoff;var ahead=off>=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?\"+\":\"-\")+String(\"0000\"+off).slice(-4)},\"%Z\":function(date){return date.tm_zone},\"%%\":function(){return\"%\"}};for(var rule in EXPANSION_RULES_2){if(pattern.includes(rule)){pattern=pattern.replace(new RegExp(rule,\"g\"),EXPANSION_RULES_2[rule](date))}}var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1}function _strftime_l(s,maxsize,format,tm){return _strftime(s,maxsize,format,tm)}Module[\"requestFullscreen\"]=function Module_requestFullscreen(lockPointer,resizeCanvas){Browser.requestFullscreen(lockPointer,resizeCanvas)};Module[\"requestFullScreen\"]=function Module_requestFullScreen(){Browser.requestFullScreen()};Module[\"requestAnimationFrame\"]=function Module_requestAnimationFrame(func){Browser.requestAnimationFrame(func)};Module[\"setCanvasSize\"]=function Module_setCanvasSize(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates)};Module[\"pauseMainLoop\"]=function Module_pauseMainLoop(){Browser.mainLoop.pause()};Module[\"resumeMainLoop\"]=function Module_resumeMainLoop(){Browser.mainLoop.resume()};Module[\"getUserMedia\"]=function Module_getUserMedia(){Browser.getUserMedia()};Module[\"createContext\"]=function Module_createContext(canvas,useWebGL,setInModule,webGLContextAttributes){return Browser.createContext(canvas,useWebGL,setInModule,webGLContextAttributes)};var FSNode=function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev};var readMode=292|73;var writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}});FS.FSNode=FSNode;FS.staticInit();Module[\"FS_createPath\"]=FS.createPath;Module[\"FS_createDataFile\"]=FS.createDataFile;Module[\"FS_createPreloadedFile\"]=FS.createPreloadedFile;Module[\"FS_createLazyFile\"]=FS.createLazyFile;Module[\"FS_createDevice\"]=FS.createDevice;Module[\"FS_unlink\"]=FS.unlink;init_emval();PureVirtualError=Module[\"PureVirtualError\"]=extendError(Error,\"PureVirtualError\");embind_init_charCodes();init_embind();BindingError=Module[\"BindingError\"]=extendError(Error,\"BindingError\");InternalError=Module[\"InternalError\"]=extendError(Error,\"InternalError\");init_ClassHandle();init_RegisteredPointer();UnboundTypeError=Module[\"UnboundTypeError\"]=extendError(Error,\"UnboundTypeError\");var GLctx;for(var i=0;i<32;++i)tempFixedLengthArray.push(new Array(i));var miniTempWebGLFloatBuffersStorage=new Float32Array(288);for(var i=0;i<288;++i){miniTempWebGLFloatBuffers[i]=miniTempWebGLFloatBuffersStorage.subarray(0,i+1)}var __miniTempWebGLIntBuffersStorage=new Int32Array(288);for(var i=0;i<288;++i){__miniTempWebGLIntBuffers[i]=__miniTempWebGLIntBuffersStorage.subarray(0,i+1)}var ASSERTIONS=true;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 decodeBase64=typeof atob===\"function\"?atob:function(input){var keyStr=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";var output=\"\";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\\+\\/\\=]/g,\"\");do{enc1=keyStr.indexOf(input.charAt(i++));enc2=keyStr.indexOf(input.charAt(i++));enc3=keyStr.indexOf(input.charAt(i++));enc4=keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2)}if(enc4!==64){output=output+String.fromCharCode(chr3)}}while(i<input.length);return output};function intArrayFromBase64(s){if(typeof ENVIRONMENT_IS_NODE===\"boolean\"&&ENVIRONMENT_IS_NODE){var buf=Buffer.from(s,\"base64\");return new Uint8Array(buf[\"buffer\"],buf[\"byteOffset\"],buf[\"byteLength\"])}try{var decoded=decodeBase64(s);var bytes=new Uint8Array(decoded.length);for(var i=0;i<decoded.length;++i){bytes[i]=decoded.charCodeAt(i)}return bytes}catch(_){throw new Error(\"Converting base64 string to bytes failed.\")}}var asmLibraryArg={\"HaveOffsetConverter\":HaveOffsetConverter,\"__cxa_allocate_exception\":___cxa_allocate_exception,\"__cxa_atexit\":___cxa_atexit,\"__cxa_begin_catch\":___cxa_begin_catch,\"__cxa_end_catch\":___cxa_end_catch,\"__cxa_find_matching_catch_2\":___cxa_find_matching_catch_2,\"__cxa_find_matching_catch_3\":___cxa_find_matching_catch_3,\"__cxa_free_exception\":___cxa_free_exception,\"__cxa_rethrow\":___cxa_rethrow,\"__cxa_thread_atexit\":___cxa_thread_atexit,\"__cxa_throw\":___cxa_throw,\"__resumeException\":___resumeException,\"__sys_fcntl64\":___sys_fcntl64,\"__sys_ioctl\":___sys_ioctl,\"__sys_mmap2\":___sys_mmap2,\"__sys_open\":___sys_open,\"__sys_stat64\":___sys_stat64,\"_embind_create_inheriting_constructor\":__embind_create_inheriting_constructor,\"_embind_finalize_value_object\":__embind_finalize_value_object,\"_embind_register_bigint\":__embind_register_bigint,\"_embind_register_bool\":__embind_register_bool,\"_embind_register_class\":__embind_register_class,\"_embind_register_class_class_function\":__embind_register_class_class_function,\"_embind_register_class_constructor\":__embind_register_class_constructor,\"_embind_register_class_function\":__embind_register_class_function,\"_embind_register_class_property\":__embind_register_class_property,\"_embind_register_emval\":__embind_register_emval,\"_embind_register_float\":__embind_register_float,\"_embind_register_function\":__embind_register_function,\"_embind_register_integer\":__embind_register_integer,\"_embind_register_memory_view\":__embind_register_memory_view,\"_embind_register_std_string\":__embind_register_std_string,\"_embind_register_std_wstring\":__embind_register_std_wstring,\"_embind_register_value_object\":__embind_register_value_object,\"_embind_register_value_object_field\":__embind_register_value_object_field,\"_embind_register_void\":__embind_register_void,\"_emval_call_void_method\":__emval_call_void_method,\"_emval_decref\":__emval_decref,\"_emval_get_method_caller\":__emval_get_method_caller,\"_emval_incref\":__emval_incref,\"_emval_take_value\":__emval_take_value,\"abort\":_abort,\"clock_gettime\":_clock_gettime,\"dlopen\":_dlopen,\"dlsym\":_dlsym,\"emscripten_asm_const_int\":_emscripten_asm_const_int,\"emscripten_get_heap_max\":_emscripten_get_heap_max,\"emscripten_memcpy_big\":_emscripten_memcpy_big,\"emscripten_pc_get_function\":_emscripten_pc_get_function,\"emscripten_resize_heap\":_emscripten_resize_heap,\"emscripten_stack_snapshot\":_emscripten_stack_snapshot,\"emscripten_stack_unwind_buffer\":_emscripten_stack_unwind_buffer,\"emscripten_thread_sleep\":_emscripten_thread_sleep,\"emscripten_webgl_create_context\":_emscripten_webgl_create_context,\"emscripten_webgl_destroy_context\":_emscripten_webgl_destroy_context,\"emscripten_webgl_get_context_attributes\":_emscripten_webgl_get_context_attributes,\"emscripten_webgl_get_current_context\":_emscripten_webgl_get_current_context,\"emscripten_webgl_init_context_attributes\":_emscripten_webgl_init_context_attributes,\"emscripten_webgl_make_context_current\":_emscripten_webgl_make_context_current,\"environ_get\":_environ_get,\"environ_sizes_get\":_environ_sizes_get,\"exit\":_exit,\"fd_close\":_fd_close,\"fd_read\":_fd_read,\"fd_seek\":_fd_seek,\"fd_write\":_fd_write,\"getTempRet0\":_getTempRet0,\"getentropy\":_getentropy,\"glActiveTexture\":_glActiveTexture,\"glAttachShader\":_glAttachShader,\"glBindAttribLocation\":_glBindAttribLocation,\"glBindBuffer\":_glBindBuffer,\"glBindBufferBase\":_glBindBufferBase,\"glBindFramebuffer\":_glBindFramebuffer,\"glBindTexture\":_glBindTexture,\"glBindVertexArray\":_glBindVertexArray,\"glBufferData\":_glBufferData,\"glClientWaitSync\":_glClientWaitSync,\"glCompileShader\":_glCompileShader,\"glCreateProgram\":_glCreateProgram,\"glCreateShader\":_glCreateShader,\"glDeleteBuffers\":_glDeleteBuffers,\"glDeleteFramebuffers\":_glDeleteFramebuffers,\"glDeleteProgram\":_glDeleteProgram,\"glDeleteShader\":_glDeleteShader,\"glDeleteSync\":_glDeleteSync,\"glDeleteTextures\":_glDeleteTextures,\"glDeleteVertexArrays\":_glDeleteVertexArrays,\"glDisable\":_glDisable,\"glDisableVertexAttribArray\":_glDisableVertexAttribArray,\"glDrawArrays\":_glDrawArrays,\"glDrawBuffers\":_glDrawBuffers,\"glEnableVertexAttribArray\":_glEnableVertexAttribArray,\"glFenceSync\":_glFenceSync,\"glFinish\":_glFinish,\"glFlush\":_glFlush,\"glFramebufferTexture2D\":_glFramebufferTexture2D,\"glFramebufferTextureLayer\":_glFramebufferTextureLayer,\"glGenBuffers\":_glGenBuffers,\"glGenFramebuffers\":_glGenFramebuffers,\"glGenTextures\":_glGenTextures,\"glGenVertexArrays\":_glGenVertexArrays,\"glGetAttribLocation\":_glGetAttribLocation,\"glGetError\":_glGetError,\"glGetIntegerv\":_glGetIntegerv,\"glGetString\":_glGetString,\"glGetUniformBlockIndex\":_glGetUniformBlockIndex,\"glGetUniformLocation\":_glGetUniformLocation,\"glLinkProgram\":_glLinkProgram,\"glPixelStorei\":_glPixelStorei,\"glReadPixels\":_glReadPixels,\"glShaderSource\":_glShaderSource,\"glTexImage2D\":_glTexImage2D,\"glTexParameterfv\":_glTexParameterfv,\"glTexParameteri\":_glTexParameteri,\"glTexStorage2D\":_glTexStorage2D,\"glTexStorage3D\":_glTexStorage3D,\"glTexSubImage2D\":_glTexSubImage2D,\"glTexSubImage3D\":_glTexSubImage3D,\"glUniform1f\":_glUniform1f,\"glUniform1i\":_glUniform1i,\"glUniform2fv\":_glUniform2fv,\"glUniform4fv\":_glUniform4fv,\"glUniform4iv\":_glUniform4iv,\"glUniformBlockBinding\":_glUniformBlockBinding,\"glUniformMatrix4fv\":_glUniformMatrix4fv,\"glUseProgram\":_glUseProgram,\"glVertexAttribPointer\":_glVertexAttribPointer,\"glViewport\":_glViewport,\"gmtime_r\":_gmtime_r,\"invoke_diii\":invoke_diii,\"invoke_i\":invoke_i,\"invoke_ii\":invoke_ii,\"invoke_iii\":invoke_iii,\"invoke_iiii\":invoke_iiii,\"invoke_iiiii\":invoke_iiiii,\"invoke_iiiiii\":invoke_iiiiii,\"invoke_iiiiiii\":invoke_iiiiiii,\"invoke_iiiiiiiddi\":invoke_iiiiiiiddi,\"invoke_iiiiiiii\":invoke_iiiiiiii,\"invoke_iiiiiiiii\":invoke_iiiiiiiii,\"invoke_v\":invoke_v,\"invoke_vdiii\":invoke_vdiii,\"invoke_vi\":invoke_vi,\"invoke_vididdii\":invoke_vididdii,\"invoke_vidii\":invoke_vidii,\"invoke_vii\":invoke_vii,\"invoke_viid\":invoke_viid,\"invoke_viidi\":invoke_viidi,\"invoke_viididii\":invoke_viididii,\"invoke_viii\":invoke_viii,\"invoke_viiid\":invoke_viiid,\"invoke_viiidd\":invoke_viiidd,\"invoke_viiiddi\":invoke_viiiddi,\"invoke_viiidi\":invoke_viiidi,\"invoke_viiii\":invoke_viiii,\"invoke_viiiid\":invoke_viiiid,\"invoke_viiiidi\":invoke_viiiidi,\"invoke_viiiidid\":invoke_viiiidid,\"invoke_viiiidiidiiiiiii\":invoke_viiiidiidiiiiiii,\"invoke_viiiifiifiiiiiii\":invoke_viiiifiifiiiiiii,\"invoke_viiiii\":invoke_viiiii,\"invoke_viiiiid\":invoke_viiiiid,\"invoke_viiiiif\":invoke_viiiiif,\"invoke_viiiiii\":invoke_viiiiii,\"invoke_viiiiiid\":invoke_viiiiiid,\"invoke_viiiiiif\":invoke_viiiiiif,\"invoke_viiiiiii\":invoke_viiiiiii,\"invoke_viiiiiiiddi\":invoke_viiiiiiiddi,\"invoke_viiiiiiidiiii\":invoke_viiiiiiidiiii,\"invoke_viiiiiiifiiii\":invoke_viiiiiiifiiii,\"invoke_viiiiiiii\":invoke_viiiiiiii,\"invoke_viiiiiiiidd\":invoke_viiiiiiiidd,\"invoke_viiiiiiiidf\":invoke_viiiiiiiidf,\"invoke_viiiiiiiii\":invoke_viiiiiiiii,\"invoke_viiiiiiiiii\":invoke_viiiiiiiiii,\"invoke_viiiiiiiiiiddi\":invoke_viiiiiiiiiiddi,\"invoke_viiiiiiiiiii\":invoke_viiiiiiiiiii,\"invoke_viiiiiiiiiiii\":invoke_viiiiiiiiiiii,\"invoke_viiiiiiiiiiiii\":invoke_viiiiiiiiiiiii,\"llvm_eh_typeid_for\":_llvm_eh_typeid_for,\"localtime_r\":_localtime_r,\"mktime\":_mktime,\"proc_exit\":_proc_exit,\"setTempRet0\":_setTempRet0,\"strftime\":_strftime,\"strftime_l\":_strftime_l};var asm=createWasm();var ___wasm_call_ctors=Module[\"___wasm_call_ctors\"]=createExportWrapper(\"__wasm_call_ctors\");var _free=Module[\"_free\"]=createExportWrapper(\"free\");var _malloc=Module[\"_malloc\"]=createExportWrapper(\"malloc\");var _fflush=Module[\"_fflush\"]=createExportWrapper(\"fflush\");var ___errno_location=Module[\"___errno_location\"]=createExportWrapper(\"__errno_location\");var ___getTypeName=Module[\"___getTypeName\"]=createExportWrapper(\"__getTypeName\");var ___embind_register_native_and_builtin_types=Module[\"___embind_register_native_and_builtin_types\"]=createExportWrapper(\"__embind_register_native_and_builtin_types\");var _emscripten_main_thread_process_queued_calls=Module[\"_emscripten_main_thread_process_queued_calls\"]=createExportWrapper(\"emscripten_main_thread_process_queued_calls\");var _emscripten_stack_get_end=Module[\"_emscripten_stack_get_end\"]=function(){return(_emscripten_stack_get_end=Module[\"_emscripten_stack_get_end\"]=Module[\"asm\"][\"emscripten_stack_get_end\"]).apply(null,arguments)};var __get_tzname=Module[\"__get_tzname\"]=createExportWrapper(\"_get_tzname\");var __get_daylight=Module[\"__get_daylight\"]=createExportWrapper(\"_get_daylight\");var __get_timezone=Module[\"__get_timezone\"]=createExportWrapper(\"_get_timezone\");var stackSave=Module[\"stackSave\"]=createExportWrapper(\"stackSave\");var stackRestore=Module[\"stackRestore\"]=createExportWrapper(\"stackRestore\");var stackAlloc=Module[\"stackAlloc\"]=createExportWrapper(\"stackAlloc\");var _emscripten_stack_init=Module[\"_emscripten_stack_init\"]=function(){return(_emscripten_stack_init=Module[\"_emscripten_stack_init\"]=Module[\"asm\"][\"emscripten_stack_init\"]).apply(null,arguments)};var _emscripten_stack_get_free=Module[\"_emscripten_stack_get_free\"]=function(){return(_emscripten_stack_get_free=Module[\"_emscripten_stack_get_free\"]=Module[\"asm\"][\"emscripten_stack_get_free\"]).apply(null,arguments)};var _saveSetjmp=Module[\"_saveSetjmp\"]=createExportWrapper(\"saveSetjmp\");var _setThrew=Module[\"_setThrew\"]=createExportWrapper(\"setThrew\");var ___cxa_can_catch=Module[\"___cxa_can_catch\"]=createExportWrapper(\"__cxa_can_catch\");var ___cxa_is_pointer_type=Module[\"___cxa_is_pointer_type\"]=createExportWrapper(\"__cxa_is_pointer_type\");var _memalign=Module[\"_memalign\"]=createExportWrapper(\"memalign\");var _emscripten_builtin_malloc=Module[\"_emscripten_builtin_malloc\"]=createExportWrapper(\"emscripten_builtin_malloc\");var _emscripten_builtin_free=Module[\"_emscripten_builtin_free\"]=createExportWrapper(\"emscripten_builtin_free\");var _emscripten_builtin_memalign=Module[\"_emscripten_builtin_memalign\"]=createExportWrapper(\"emscripten_builtin_memalign\");var dynCall_jii=Module[\"dynCall_jii\"]=createExportWrapper(\"dynCall_jii\");var dynCall_viji=Module[\"dynCall_viji\"]=createExportWrapper(\"dynCall_viji\");var dynCall_jjj=Module[\"dynCall_jjj\"]=createExportWrapper(\"dynCall_jjj\");var dynCall_iiiijj=Module[\"dynCall_iiiijj\"]=createExportWrapper(\"dynCall_iiiijj\");var dynCall_viijj=Module[\"dynCall_viijj\"]=createExportWrapper(\"dynCall_viijj\");var dynCall_viiijjjj=Module[\"dynCall_viiijjjj\"]=createExportWrapper(\"dynCall_viiijjjj\");var dynCall_ji=Module[\"dynCall_ji\"]=createExportWrapper(\"dynCall_ji\");var dynCall_vij=Module[\"dynCall_vij\"]=createExportWrapper(\"dynCall_vij\");var dynCall_viijii=Module[\"dynCall_viijii\"]=createExportWrapper(\"dynCall_viijii\");var dynCall_vj=Module[\"dynCall_vj\"]=createExportWrapper(\"dynCall_vj\");var dynCall_viij=Module[\"dynCall_viij\"]=createExportWrapper(\"dynCall_viij\");var dynCall_viiiiij=Module[\"dynCall_viiiiij\"]=createExportWrapper(\"dynCall_viiiiij\");var dynCall_iijjiiii=Module[\"dynCall_iijjiiii\"]=createExportWrapper(\"dynCall_iijjiiii\");var dynCall_jiji=Module[\"dynCall_jiji\"]=createExportWrapper(\"dynCall_jiji\");var dynCall_iiiiij=Module[\"dynCall_iiiiij\"]=createExportWrapper(\"dynCall_iiiiij\");var dynCall_iiiiijj=Module[\"dynCall_iiiiijj\"]=createExportWrapper(\"dynCall_iiiiijj\");var dynCall_iiiiiijj=Module[\"dynCall_iiiiiijj\"]=createExportWrapper(\"dynCall_iiiiiijj\");function invoke_viid(index,a1,a2,a3){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_vi(index,a1){var sp=stackSave();try{wasmTable.get(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iii(index,a1,a2){var sp=stackSave();try{return wasmTable.get(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_v(index){var sp=stackSave();try{wasmTable.get(index)()}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_vii(index,a1,a2){var sp=stackSave();try{wasmTable.get(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_ii(index,a1){var sp=stackSave();try{return wasmTable.get(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viii(index,a1,a2,a3){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiii(index,a1,a2,a3,a4){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiii(index,a1,a2,a3,a4){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiidd(index,a1,a2,a3,a4,a5){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiiiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_diii(index,a1,a2,a3){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiii(index,a1,a2,a3){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_i(index){var sp=stackSave();try{return wasmTable.get(index)()}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiidi(index,a1,a2,a3,a4,a5){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiidi(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viididii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiidf(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiidd(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiid(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiid(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiidiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiif(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiif(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiifiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiifiifiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiidiidiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_vididdii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiid(index,a1,a2,a3,a4){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_vidii(index,a1,a2,a3,a4){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiiddi(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiddi(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiiiiiddi(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiddi(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiid(index,a1,a2,a3,a4,a5){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiidid(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viidi(index,a1,a2,a3,a4){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_vdiii(index,a1,a2,a3,a4){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}if(!Object.getOwnPropertyDescriptor(Module,\"intArrayFromString\"))Module[\"intArrayFromString\"]=function(){abort(\"'intArrayFromString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"intArrayToString\"))Module[\"intArrayToString\"]=function(){abort(\"'intArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ccall\"))Module[\"ccall\"]=function(){abort(\"'ccall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"cwrap\"))Module[\"cwrap\"]=function(){abort(\"'cwrap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setValue\"))Module[\"setValue\"]=function(){abort(\"'setValue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getValue\"))Module[\"getValue\"]=function(){abort(\"'getValue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"allocate\"))Module[\"allocate\"]=function(){abort(\"'allocate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UTF8ArrayToString\"))Module[\"UTF8ArrayToString\"]=function(){abort(\"'UTF8ArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UTF8ToString\"))Module[\"UTF8ToString\"]=function(){abort(\"'UTF8ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToUTF8Array\"))Module[\"stringToUTF8Array\"]=function(){abort(\"'stringToUTF8Array' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToUTF8\"))Module[\"stringToUTF8\"]=function(){abort(\"'stringToUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"lengthBytesUTF8\"))Module[\"lengthBytesUTF8\"]=function(){abort(\"'lengthBytesUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stackTrace\"))Module[\"stackTrace\"]=function(){abort(\"'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addOnPreRun\"))Module[\"addOnPreRun\"]=function(){abort(\"'addOnPreRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addOnInit\"))Module[\"addOnInit\"]=function(){abort(\"'addOnInit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addOnPreMain\"))Module[\"addOnPreMain\"]=function(){abort(\"'addOnPreMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addOnExit\"))Module[\"addOnExit\"]=function(){abort(\"'addOnExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addOnPostRun\"))Module[\"addOnPostRun\"]=function(){abort(\"'addOnPostRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeStringToMemory\"))Module[\"writeStringToMemory\"]=function(){abort(\"'writeStringToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeArrayToMemory\"))Module[\"writeArrayToMemory\"]=function(){abort(\"'writeArrayToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeAsciiToMemory\"))Module[\"writeAsciiToMemory\"]=function(){abort(\"'writeAsciiToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};Module[\"addRunDependency\"]=addRunDependency;Module[\"removeRunDependency\"]=removeRunDependency;if(!Object.getOwnPropertyDescriptor(Module,\"FS_createFolder\"))Module[\"FS_createFolder\"]=function(){abort(\"'FS_createFolder' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};Module[\"FS_createPath\"]=FS.createPath;Module[\"FS_createDataFile\"]=FS.createDataFile;Module[\"FS_createPreloadedFile\"]=FS.createPreloadedFile;Module[\"FS_createLazyFile\"]=FS.createLazyFile;if(!Object.getOwnPropertyDescriptor(Module,\"FS_createLink\"))Module[\"FS_createLink\"]=function(){abort(\"'FS_createLink' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};Module[\"FS_createDevice\"]=FS.createDevice;Module[\"FS_unlink\"]=FS.unlink;if(!Object.getOwnPropertyDescriptor(Module,\"getLEB\"))Module[\"getLEB\"]=function(){abort(\"'getLEB' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getFunctionTables\"))Module[\"getFunctionTables\"]=function(){abort(\"'getFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"alignFunctionTables\"))Module[\"alignFunctionTables\"]=function(){abort(\"'alignFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerFunctions\"))Module[\"registerFunctions\"]=function(){abort(\"'registerFunctions' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addFunction\"))Module[\"addFunction\"]=function(){abort(\"'addFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"removeFunction\"))Module[\"removeFunction\"]=function(){abort(\"'removeFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getFuncWrapper\"))Module[\"getFuncWrapper\"]=function(){abort(\"'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"prettyPrint\"))Module[\"prettyPrint\"]=function(){abort(\"'prettyPrint' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"dynCall\"))Module[\"dynCall\"]=function(){abort(\"'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getCompilerSetting\"))Module[\"getCompilerSetting\"]=function(){abort(\"'getCompilerSetting' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"print\"))Module[\"print\"]=function(){abort(\"'print' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"printErr\"))Module[\"printErr\"]=function(){abort(\"'printErr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getTempRet0\"))Module[\"getTempRet0\"]=function(){abort(\"'getTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setTempRet0\"))Module[\"setTempRet0\"]=function(){abort(\"'setTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"callMain\"))Module[\"callMain\"]=function(){abort(\"'callMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"abort\"))Module[\"abort\"]=function(){abort(\"'abort' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"keepRuntimeAlive\"))Module[\"keepRuntimeAlive\"]=function(){abort(\"'keepRuntimeAlive' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"zeroMemory\"))Module[\"zeroMemory\"]=function(){abort(\"'zeroMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToNewUTF8\"))Module[\"stringToNewUTF8\"]=function(){abort(\"'stringToNewUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setFileTime\"))Module[\"setFileTime\"]=function(){abort(\"'setFileTime' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscripten_realloc_buffer\"))Module[\"emscripten_realloc_buffer\"]=function(){abort(\"'emscripten_realloc_buffer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ENV\"))Module[\"ENV\"]=function(){abort(\"'ENV' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ERRNO_CODES\"))Module[\"ERRNO_CODES\"]=function(){abort(\"'ERRNO_CODES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ERRNO_MESSAGES\"))Module[\"ERRNO_MESSAGES\"]=function(){abort(\"'ERRNO_MESSAGES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setErrNo\"))Module[\"setErrNo\"]=function(){abort(\"'setErrNo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"inetPton4\"))Module[\"inetPton4\"]=function(){abort(\"'inetPton4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"inetNtop4\"))Module[\"inetNtop4\"]=function(){abort(\"'inetNtop4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"inetPton6\"))Module[\"inetPton6\"]=function(){abort(\"'inetPton6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"inetNtop6\"))Module[\"inetNtop6\"]=function(){abort(\"'inetNtop6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readSockaddr\"))Module[\"readSockaddr\"]=function(){abort(\"'readSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeSockaddr\"))Module[\"writeSockaddr\"]=function(){abort(\"'writeSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"DNS\"))Module[\"DNS\"]=function(){abort(\"'DNS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getHostByName\"))Module[\"getHostByName\"]=function(){abort(\"'getHostByName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"GAI_ERRNO_MESSAGES\"))Module[\"GAI_ERRNO_MESSAGES\"]=function(){abort(\"'GAI_ERRNO_MESSAGES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"Protocols\"))Module[\"Protocols\"]=function(){abort(\"'Protocols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"Sockets\"))Module[\"Sockets\"]=function(){abort(\"'Sockets' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getRandomDevice\"))Module[\"getRandomDevice\"]=function(){abort(\"'getRandomDevice' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"traverseStack\"))Module[\"traverseStack\"]=function(){abort(\"'traverseStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UNWIND_CACHE\"))Module[\"UNWIND_CACHE\"]=function(){abort(\"'UNWIND_CACHE' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"withBuiltinMalloc\"))Module[\"withBuiltinMalloc\"]=function(){abort(\"'withBuiltinMalloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readAsmConstArgsArray\"))Module[\"readAsmConstArgsArray\"]=function(){abort(\"'readAsmConstArgsArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readAsmConstArgs\"))Module[\"readAsmConstArgs\"]=function(){abort(\"'readAsmConstArgs' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"mainThreadEM_ASM\"))Module[\"mainThreadEM_ASM\"]=function(){abort(\"'mainThreadEM_ASM' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"jstoi_q\"))Module[\"jstoi_q\"]=function(){abort(\"'jstoi_q' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"jstoi_s\"))Module[\"jstoi_s\"]=function(){abort(\"'jstoi_s' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getExecutableName\"))Module[\"getExecutableName\"]=function(){abort(\"'getExecutableName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"listenOnce\"))Module[\"listenOnce\"]=function(){abort(\"'listenOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"autoResumeAudioContext\"))Module[\"autoResumeAudioContext\"]=function(){abort(\"'autoResumeAudioContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"dynCallLegacy\"))Module[\"dynCallLegacy\"]=function(){abort(\"'dynCallLegacy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getDynCaller\"))Module[\"getDynCaller\"]=function(){abort(\"'getDynCaller' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"dynCall\"))Module[\"dynCall\"]=function(){abort(\"'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"callRuntimeCallbacks\"))Module[\"callRuntimeCallbacks\"]=function(){abort(\"'callRuntimeCallbacks' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"runtimeKeepalivePush\"))Module[\"runtimeKeepalivePush\"]=function(){abort(\"'runtimeKeepalivePush' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"runtimeKeepalivePop\"))Module[\"runtimeKeepalivePop\"]=function(){abort(\"'runtimeKeepalivePop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"callUserCallback\"))Module[\"callUserCallback\"]=function(){abort(\"'callUserCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"maybeExit\"))Module[\"maybeExit\"]=function(){abort(\"'maybeExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"safeSetTimeout\"))Module[\"safeSetTimeout\"]=function(){abort(\"'safeSetTimeout' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"asmjsMangle\"))Module[\"asmjsMangle\"]=function(){abort(\"'asmjsMangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"asyncLoad\"))Module[\"asyncLoad\"]=function(){abort(\"'asyncLoad' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"alignMemory\"))Module[\"alignMemory\"]=function(){abort(\"'alignMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"mmapAlloc\"))Module[\"mmapAlloc\"]=function(){abort(\"'mmapAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"reallyNegative\"))Module[\"reallyNegative\"]=function(){abort(\"'reallyNegative' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"unSign\"))Module[\"unSign\"]=function(){abort(\"'unSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"reSign\"))Module[\"reSign\"]=function(){abort(\"'reSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"formatString\"))Module[\"formatString\"]=function(){abort(\"'formatString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"PATH\"))Module[\"PATH\"]=function(){abort(\"'PATH' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"PATH_FS\"))Module[\"PATH_FS\"]=function(){abort(\"'PATH_FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SYSCALLS\"))Module[\"SYSCALLS\"]=function(){abort(\"'SYSCALLS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"syscallMmap2\"))Module[\"syscallMmap2\"]=function(){abort(\"'syscallMmap2' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"syscallMunmap\"))Module[\"syscallMunmap\"]=function(){abort(\"'syscallMunmap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getSocketFromFD\"))Module[\"getSocketFromFD\"]=function(){abort(\"'getSocketFromFD' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getSocketAddress\"))Module[\"getSocketAddress\"]=function(){abort(\"'getSocketAddress' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"JSEvents\"))Module[\"JSEvents\"]=function(){abort(\"'JSEvents' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerKeyEventCallback\"))Module[\"registerKeyEventCallback\"]=function(){abort(\"'registerKeyEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"specialHTMLTargets\"))Module[\"specialHTMLTargets\"]=function(){abort(\"'specialHTMLTargets' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"findEventTarget\"))Module[\"findEventTarget\"]=function(){abort(\"'findEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"findCanvasEventTarget\"))Module[\"findCanvasEventTarget\"]=function(){abort(\"'findCanvasEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getBoundingClientRect\"))Module[\"getBoundingClientRect\"]=function(){abort(\"'getBoundingClientRect' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillMouseEventData\"))Module[\"fillMouseEventData\"]=function(){abort(\"'fillMouseEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerMouseEventCallback\"))Module[\"registerMouseEventCallback\"]=function(){abort(\"'registerMouseEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerWheelEventCallback\"))Module[\"registerWheelEventCallback\"]=function(){abort(\"'registerWheelEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerUiEventCallback\"))Module[\"registerUiEventCallback\"]=function(){abort(\"'registerUiEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerFocusEventCallback\"))Module[\"registerFocusEventCallback\"]=function(){abort(\"'registerFocusEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillDeviceOrientationEventData\"))Module[\"fillDeviceOrientationEventData\"]=function(){abort(\"'fillDeviceOrientationEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerDeviceOrientationEventCallback\"))Module[\"registerDeviceOrientationEventCallback\"]=function(){abort(\"'registerDeviceOrientationEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillDeviceMotionEventData\"))Module[\"fillDeviceMotionEventData\"]=function(){abort(\"'fillDeviceMotionEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerDeviceMotionEventCallback\"))Module[\"registerDeviceMotionEventCallback\"]=function(){abort(\"'registerDeviceMotionEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"screenOrientation\"))Module[\"screenOrientation\"]=function(){abort(\"'screenOrientation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillOrientationChangeEventData\"))Module[\"fillOrientationChangeEventData\"]=function(){abort(\"'fillOrientationChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerOrientationChangeEventCallback\"))Module[\"registerOrientationChangeEventCallback\"]=function(){abort(\"'registerOrientationChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillFullscreenChangeEventData\"))Module[\"fillFullscreenChangeEventData\"]=function(){abort(\"'fillFullscreenChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerFullscreenChangeEventCallback\"))Module[\"registerFullscreenChangeEventCallback\"]=function(){abort(\"'registerFullscreenChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerRestoreOldStyle\"))Module[\"registerRestoreOldStyle\"]=function(){abort(\"'registerRestoreOldStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"hideEverythingExceptGivenElement\"))Module[\"hideEverythingExceptGivenElement\"]=function(){abort(\"'hideEverythingExceptGivenElement' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"restoreHiddenElements\"))Module[\"restoreHiddenElements\"]=function(){abort(\"'restoreHiddenElements' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setLetterbox\"))Module[\"setLetterbox\"]=function(){abort(\"'setLetterbox' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"currentFullscreenStrategy\"))Module[\"currentFullscreenStrategy\"]=function(){abort(\"'currentFullscreenStrategy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"restoreOldWindowedStyle\"))Module[\"restoreOldWindowedStyle\"]=function(){abort(\"'restoreOldWindowedStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"softFullscreenResizeWebGLRenderTarget\"))Module[\"softFullscreenResizeWebGLRenderTarget\"]=function(){abort(\"'softFullscreenResizeWebGLRenderTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"doRequestFullscreen\"))Module[\"doRequestFullscreen\"]=function(){abort(\"'doRequestFullscreen' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillPointerlockChangeEventData\"))Module[\"fillPointerlockChangeEventData\"]=function(){abort(\"'fillPointerlockChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerPointerlockChangeEventCallback\"))Module[\"registerPointerlockChangeEventCallback\"]=function(){abort(\"'registerPointerlockChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerPointerlockErrorEventCallback\"))Module[\"registerPointerlockErrorEventCallback\"]=function(){abort(\"'registerPointerlockErrorEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"requestPointerLock\"))Module[\"requestPointerLock\"]=function(){abort(\"'requestPointerLock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillVisibilityChangeEventData\"))Module[\"fillVisibilityChangeEventData\"]=function(){abort(\"'fillVisibilityChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerVisibilityChangeEventCallback\"))Module[\"registerVisibilityChangeEventCallback\"]=function(){abort(\"'registerVisibilityChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerTouchEventCallback\"))Module[\"registerTouchEventCallback\"]=function(){abort(\"'registerTouchEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillGamepadEventData\"))Module[\"fillGamepadEventData\"]=function(){abort(\"'fillGamepadEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerGamepadEventCallback\"))Module[\"registerGamepadEventCallback\"]=function(){abort(\"'registerGamepadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerBeforeUnloadEventCallback\"))Module[\"registerBeforeUnloadEventCallback\"]=function(){abort(\"'registerBeforeUnloadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillBatteryEventData\"))Module[\"fillBatteryEventData\"]=function(){abort(\"'fillBatteryEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"battery\"))Module[\"battery\"]=function(){abort(\"'battery' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerBatteryEventCallback\"))Module[\"registerBatteryEventCallback\"]=function(){abort(\"'registerBatteryEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setCanvasElementSize\"))Module[\"setCanvasElementSize\"]=function(){abort(\"'setCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getCanvasElementSize\"))Module[\"getCanvasElementSize\"]=function(){abort(\"'getCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"polyfillSetImmediate\"))Module[\"polyfillSetImmediate\"]=function(){abort(\"'polyfillSetImmediate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"demangle\"))Module[\"demangle\"]=function(){abort(\"'demangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"demangleAll\"))Module[\"demangleAll\"]=function(){abort(\"'demangleAll' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"jsStackTrace\"))Module[\"jsStackTrace\"]=function(){abort(\"'jsStackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stackTrace\"))Module[\"stackTrace\"]=function(){abort(\"'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getEnvStrings\"))Module[\"getEnvStrings\"]=function(){abort(\"'getEnvStrings' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"checkWasiClock\"))Module[\"checkWasiClock\"]=function(){abort(\"'checkWasiClock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeI53ToI64\"))Module[\"writeI53ToI64\"]=function(){abort(\"'writeI53ToI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeI53ToI64Clamped\"))Module[\"writeI53ToI64Clamped\"]=function(){abort(\"'writeI53ToI64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeI53ToI64Signaling\"))Module[\"writeI53ToI64Signaling\"]=function(){abort(\"'writeI53ToI64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeI53ToU64Clamped\"))Module[\"writeI53ToU64Clamped\"]=function(){abort(\"'writeI53ToU64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeI53ToU64Signaling\"))Module[\"writeI53ToU64Signaling\"]=function(){abort(\"'writeI53ToU64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readI53FromI64\"))Module[\"readI53FromI64\"]=function(){abort(\"'readI53FromI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readI53FromU64\"))Module[\"readI53FromU64\"]=function(){abort(\"'readI53FromU64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"convertI32PairToI53\"))Module[\"convertI32PairToI53\"]=function(){abort(\"'convertI32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"convertU32PairToI53\"))Module[\"convertU32PairToI53\"]=function(){abort(\"'convertU32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"uncaughtExceptionCount\"))Module[\"uncaughtExceptionCount\"]=function(){abort(\"'uncaughtExceptionCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"exceptionLast\"))Module[\"exceptionLast\"]=function(){abort(\"'exceptionLast' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"exceptionCaught\"))Module[\"exceptionCaught\"]=function(){abort(\"'exceptionCaught' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ExceptionInfo\"))Module[\"ExceptionInfo\"]=function(){abort(\"'ExceptionInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"CatchInfo\"))Module[\"CatchInfo\"]=function(){abort(\"'CatchInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"exception_addRef\"))Module[\"exception_addRef\"]=function(){abort(\"'exception_addRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"exception_decRef\"))Module[\"exception_decRef\"]=function(){abort(\"'exception_decRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"Browser\"))Module[\"Browser\"]=function(){abort(\"'Browser' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"funcWrappers\"))Module[\"funcWrappers\"]=function(){abort(\"'funcWrappers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getFuncWrapper\"))Module[\"getFuncWrapper\"]=function(){abort(\"'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setMainLoop\"))Module[\"setMainLoop\"]=function(){abort(\"'setMainLoop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"wget\"))Module[\"wget\"]=function(){abort(\"'wget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"FS\"))Module[\"FS\"]=function(){abort(\"'FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"MEMFS\"))Module[\"MEMFS\"]=function(){abort(\"'MEMFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"TTY\"))Module[\"TTY\"]=function(){abort(\"'TTY' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"PIPEFS\"))Module[\"PIPEFS\"]=function(){abort(\"'PIPEFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SOCKFS\"))Module[\"SOCKFS\"]=function(){abort(\"'SOCKFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"_setNetworkCallback\"))Module[\"_setNetworkCallback\"]=function(){abort(\"'_setNetworkCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"tempFixedLengthArray\"))Module[\"tempFixedLengthArray\"]=function(){abort(\"'tempFixedLengthArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"miniTempWebGLFloatBuffers\"))Module[\"miniTempWebGLFloatBuffers\"]=function(){abort(\"'miniTempWebGLFloatBuffers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"heapObjectForWebGLType\"))Module[\"heapObjectForWebGLType\"]=function(){abort(\"'heapObjectForWebGLType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"heapAccessShiftForWebGLHeap\"))Module[\"heapAccessShiftForWebGLHeap\"]=function(){abort(\"'heapAccessShiftForWebGLHeap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};Module[\"GL\"]=GL;if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGet\"))Module[\"emscriptenWebGLGet\"]=function(){abort(\"'emscriptenWebGLGet' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"computeUnpackAlignedImageSize\"))Module[\"computeUnpackAlignedImageSize\"]=function(){abort(\"'computeUnpackAlignedImageSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGetTexPixelData\"))Module[\"emscriptenWebGLGetTexPixelData\"]=function(){abort(\"'emscriptenWebGLGetTexPixelData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGetUniform\"))Module[\"emscriptenWebGLGetUniform\"]=function(){abort(\"'emscriptenWebGLGetUniform' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"webglGetUniformLocation\"))Module[\"webglGetUniformLocation\"]=function(){abort(\"'webglGetUniformLocation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"webglPrepareUniformLocationsBeforeFirstUse\"))Module[\"webglPrepareUniformLocationsBeforeFirstUse\"]=function(){abort(\"'webglPrepareUniformLocationsBeforeFirstUse' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"webglGetLeftBracePos\"))Module[\"webglGetLeftBracePos\"]=function(){abort(\"'webglGetLeftBracePos' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGetVertexAttrib\"))Module[\"emscriptenWebGLGetVertexAttrib\"]=function(){abort(\"'emscriptenWebGLGetVertexAttrib' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGetBufferBinding\"))Module[\"emscriptenWebGLGetBufferBinding\"]=function(){abort(\"'emscriptenWebGLGetBufferBinding' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLValidateMapBufferTarget\"))Module[\"emscriptenWebGLValidateMapBufferTarget\"]=function(){abort(\"'emscriptenWebGLValidateMapBufferTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeGLArray\"))Module[\"writeGLArray\"]=function(){abort(\"'writeGLArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"AL\"))Module[\"AL\"]=function(){abort(\"'AL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SDL_unicode\"))Module[\"SDL_unicode\"]=function(){abort(\"'SDL_unicode' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SDL_ttfContext\"))Module[\"SDL_ttfContext\"]=function(){abort(\"'SDL_ttfContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SDL_audio\"))Module[\"SDL_audio\"]=function(){abort(\"'SDL_audio' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SDL\"))Module[\"SDL\"]=function(){abort(\"'SDL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SDL_gfx\"))Module[\"SDL_gfx\"]=function(){abort(\"'SDL_gfx' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"GLUT\"))Module[\"GLUT\"]=function(){abort(\"'GLUT' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"EGL\"))Module[\"EGL\"]=function(){abort(\"'EGL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"GLFW_Window\"))Module[\"GLFW_Window\"]=function(){abort(\"'GLFW_Window' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"GLFW\"))Module[\"GLFW\"]=function(){abort(\"'GLFW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"GLEW\"))Module[\"GLEW\"]=function(){abort(\"'GLEW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"IDBStore\"))Module[\"IDBStore\"]=function(){abort(\"'IDBStore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"runAndAbortIfError\"))Module[\"runAndAbortIfError\"]=function(){abort(\"'runAndAbortIfError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_handle_array\"))Module[\"emval_handle_array\"]=function(){abort(\"'emval_handle_array' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_free_list\"))Module[\"emval_free_list\"]=function(){abort(\"'emval_free_list' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_symbols\"))Module[\"emval_symbols\"]=function(){abort(\"'emval_symbols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"init_emval\"))Module[\"init_emval\"]=function(){abort(\"'init_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"count_emval_handles\"))Module[\"count_emval_handles\"]=function(){abort(\"'count_emval_handles' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"get_first_emval\"))Module[\"get_first_emval\"]=function(){abort(\"'get_first_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getStringOrSymbol\"))Module[\"getStringOrSymbol\"]=function(){abort(\"'getStringOrSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"requireHandle\"))Module[\"requireHandle\"]=function(){abort(\"'requireHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_newers\"))Module[\"emval_newers\"]=function(){abort(\"'emval_newers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"craftEmvalAllocator\"))Module[\"craftEmvalAllocator\"]=function(){abort(\"'craftEmvalAllocator' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_get_global\"))Module[\"emval_get_global\"]=function(){abort(\"'emval_get_global' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_methodCallers\"))Module[\"emval_methodCallers\"]=function(){abort(\"'emval_methodCallers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"InternalError\"))Module[\"InternalError\"]=function(){abort(\"'InternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"BindingError\"))Module[\"BindingError\"]=function(){abort(\"'BindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UnboundTypeError\"))Module[\"UnboundTypeError\"]=function(){abort(\"'UnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"PureVirtualError\"))Module[\"PureVirtualError\"]=function(){abort(\"'PureVirtualError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"init_embind\"))Module[\"init_embind\"]=function(){abort(\"'init_embind' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"throwInternalError\"))Module[\"throwInternalError\"]=function(){abort(\"'throwInternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"throwBindingError\"))Module[\"throwBindingError\"]=function(){abort(\"'throwBindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"throwUnboundTypeError\"))Module[\"throwUnboundTypeError\"]=function(){abort(\"'throwUnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ensureOverloadTable\"))Module[\"ensureOverloadTable\"]=function(){abort(\"'ensureOverloadTable' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"exposePublicSymbol\"))Module[\"exposePublicSymbol\"]=function(){abort(\"'exposePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"replacePublicSymbol\"))Module[\"replacePublicSymbol\"]=function(){abort(\"'replacePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"extendError\"))Module[\"extendError\"]=function(){abort(\"'extendError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"createNamedFunction\"))Module[\"createNamedFunction\"]=function(){abort(\"'createNamedFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registeredInstances\"))Module[\"registeredInstances\"]=function(){abort(\"'registeredInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getBasestPointer\"))Module[\"getBasestPointer\"]=function(){abort(\"'getBasestPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerInheritedInstance\"))Module[\"registerInheritedInstance\"]=function(){abort(\"'registerInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"unregisterInheritedInstance\"))Module[\"unregisterInheritedInstance\"]=function(){abort(\"'unregisterInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getInheritedInstance\"))Module[\"getInheritedInstance\"]=function(){abort(\"'getInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getInheritedInstanceCount\"))Module[\"getInheritedInstanceCount\"]=function(){abort(\"'getInheritedInstanceCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getLiveInheritedInstances\"))Module[\"getLiveInheritedInstances\"]=function(){abort(\"'getLiveInheritedInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registeredTypes\"))Module[\"registeredTypes\"]=function(){abort(\"'registeredTypes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"awaitingDependencies\"))Module[\"awaitingDependencies\"]=function(){abort(\"'awaitingDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"typeDependencies\"))Module[\"typeDependencies\"]=function(){abort(\"'typeDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registeredPointers\"))Module[\"registeredPointers\"]=function(){abort(\"'registeredPointers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerType\"))Module[\"registerType\"]=function(){abort(\"'registerType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"whenDependentTypesAreResolved\"))Module[\"whenDependentTypesAreResolved\"]=function(){abort(\"'whenDependentTypesAreResolved' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"embind_charCodes\"))Module[\"embind_charCodes\"]=function(){abort(\"'embind_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"embind_init_charCodes\"))Module[\"embind_init_charCodes\"]=function(){abort(\"'embind_init_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readLatin1String\"))Module[\"readLatin1String\"]=function(){abort(\"'readLatin1String' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getTypeName\"))Module[\"getTypeName\"]=function(){abort(\"'getTypeName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"heap32VectorToArray\"))Module[\"heap32VectorToArray\"]=function(){abort(\"'heap32VectorToArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"requireRegisteredType\"))Module[\"requireRegisteredType\"]=function(){abort(\"'requireRegisteredType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getShiftFromSize\"))Module[\"getShiftFromSize\"]=function(){abort(\"'getShiftFromSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"integerReadValueFromPointer\"))Module[\"integerReadValueFromPointer\"]=function(){abort(\"'integerReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"enumReadValueFromPointer\"))Module[\"enumReadValueFromPointer\"]=function(){abort(\"'enumReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"floatReadValueFromPointer\"))Module[\"floatReadValueFromPointer\"]=function(){abort(\"'floatReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"simpleReadValueFromPointer\"))Module[\"simpleReadValueFromPointer\"]=function(){abort(\"'simpleReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"runDestructors\"))Module[\"runDestructors\"]=function(){abort(\"'runDestructors' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"new_\"))Module[\"new_\"]=function(){abort(\"'new_' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"craftInvokerFunction\"))Module[\"craftInvokerFunction\"]=function(){abort(\"'craftInvokerFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"embind__requireFunction\"))Module[\"embind__requireFunction\"]=function(){abort(\"'embind__requireFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"tupleRegistrations\"))Module[\"tupleRegistrations\"]=function(){abort(\"'tupleRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"structRegistrations\"))Module[\"structRegistrations\"]=function(){abort(\"'structRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"genericPointerToWireType\"))Module[\"genericPointerToWireType\"]=function(){abort(\"'genericPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"constNoSmartPtrRawPointerToWireType\"))Module[\"constNoSmartPtrRawPointerToWireType\"]=function(){abort(\"'constNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"nonConstNoSmartPtrRawPointerToWireType\"))Module[\"nonConstNoSmartPtrRawPointerToWireType\"]=function(){abort(\"'nonConstNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"init_RegisteredPointer\"))Module[\"init_RegisteredPointer\"]=function(){abort(\"'init_RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredPointer\"))Module[\"RegisteredPointer\"]=function(){abort(\"'RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredPointer_getPointee\"))Module[\"RegisteredPointer_getPointee\"]=function(){abort(\"'RegisteredPointer_getPointee' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredPointer_destructor\"))Module[\"RegisteredPointer_destructor\"]=function(){abort(\"'RegisteredPointer_destructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredPointer_deleteObject\"))Module[\"RegisteredPointer_deleteObject\"]=function(){abort(\"'RegisteredPointer_deleteObject' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredPointer_fromWireType\"))Module[\"RegisteredPointer_fromWireType\"]=function(){abort(\"'RegisteredPointer_fromWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"runDestructor\"))Module[\"runDestructor\"]=function(){abort(\"'runDestructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"releaseClassHandle\"))Module[\"releaseClassHandle\"]=function(){abort(\"'releaseClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"finalizationGroup\"))Module[\"finalizationGroup\"]=function(){abort(\"'finalizationGroup' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"detachFinalizer_deps\"))Module[\"detachFinalizer_deps\"]=function(){abort(\"'detachFinalizer_deps' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"detachFinalizer\"))Module[\"detachFinalizer\"]=function(){abort(\"'detachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"attachFinalizer\"))Module[\"attachFinalizer\"]=function(){abort(\"'attachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"makeClassHandle\"))Module[\"makeClassHandle\"]=function(){abort(\"'makeClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"init_ClassHandle\"))Module[\"init_ClassHandle\"]=function(){abort(\"'init_ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle\"))Module[\"ClassHandle\"]=function(){abort(\"'ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle_isAliasOf\"))Module[\"ClassHandle_isAliasOf\"]=function(){abort(\"'ClassHandle_isAliasOf' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"throwInstanceAlreadyDeleted\"))Module[\"throwInstanceAlreadyDeleted\"]=function(){abort(\"'throwInstanceAlreadyDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle_clone\"))Module[\"ClassHandle_clone\"]=function(){abort(\"'ClassHandle_clone' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle_delete\"))Module[\"ClassHandle_delete\"]=function(){abort(\"'ClassHandle_delete' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"deletionQueue\"))Module[\"deletionQueue\"]=function(){abort(\"'deletionQueue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle_isDeleted\"))Module[\"ClassHandle_isDeleted\"]=function(){abort(\"'ClassHandle_isDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle_deleteLater\"))Module[\"ClassHandle_deleteLater\"]=function(){abort(\"'ClassHandle_deleteLater' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"flushPendingDeletes\"))Module[\"flushPendingDeletes\"]=function(){abort(\"'flushPendingDeletes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"delayFunction\"))Module[\"delayFunction\"]=function(){abort(\"'delayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setDelayFunction\"))Module[\"setDelayFunction\"]=function(){abort(\"'setDelayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredClass\"))Module[\"RegisteredClass\"]=function(){abort(\"'RegisteredClass' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"shallowCopyInternalPointer\"))Module[\"shallowCopyInternalPointer\"]=function(){abort(\"'shallowCopyInternalPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"downcastPointer\"))Module[\"downcastPointer\"]=function(){abort(\"'downcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"upcastPointer\"))Module[\"upcastPointer\"]=function(){abort(\"'upcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"validateThis\"))Module[\"validateThis\"]=function(){abort(\"'validateThis' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"char_0\"))Module[\"char_0\"]=function(){abort(\"'char_0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"char_9\"))Module[\"char_9\"]=function(){abort(\"'char_9' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"makeLegalFunctionName\"))Module[\"makeLegalFunctionName\"]=function(){abort(\"'makeLegalFunctionName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGetIndexed\"))Module[\"emscriptenWebGLGetIndexed\"]=function(){abort(\"'emscriptenWebGLGetIndexed' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"warnOnce\"))Module[\"warnOnce\"]=function(){abort(\"'warnOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stackSave\"))Module[\"stackSave\"]=function(){abort(\"'stackSave' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stackRestore\"))Module[\"stackRestore\"]=function(){abort(\"'stackRestore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stackAlloc\"))Module[\"stackAlloc\"]=function(){abort(\"'stackAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"AsciiToString\"))Module[\"AsciiToString\"]=function(){abort(\"'AsciiToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToAscii\"))Module[\"stringToAscii\"]=function(){abort(\"'stringToAscii' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UTF16ToString\"))Module[\"UTF16ToString\"]=function(){abort(\"'UTF16ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToUTF16\"))Module[\"stringToUTF16\"]=function(){abort(\"'stringToUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"lengthBytesUTF16\"))Module[\"lengthBytesUTF16\"]=function(){abort(\"'lengthBytesUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UTF32ToString\"))Module[\"UTF32ToString\"]=function(){abort(\"'UTF32ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToUTF32\"))Module[\"stringToUTF32\"]=function(){abort(\"'stringToUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"lengthBytesUTF32\"))Module[\"lengthBytesUTF32\"]=function(){abort(\"'lengthBytesUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"allocateUTF8\"))Module[\"allocateUTF8\"]=function(){abort(\"'allocateUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"allocateUTF8OnStack\"))Module[\"allocateUTF8OnStack\"]=function(){abort(\"'allocateUTF8OnStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};Module[\"writeStackCookie\"]=writeStackCookie;Module[\"checkStackCookie\"]=checkStackCookie;if(!Object.getOwnPropertyDescriptor(Module,\"ALLOC_NORMAL\"))Object.defineProperty(Module,\"ALLOC_NORMAL\",{configurable:true,get:function(){abort(\"'ALLOC_NORMAL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")}});if(!Object.getOwnPropertyDescriptor(Module,\"ALLOC_STACK\"))Object.defineProperty(Module,\"ALLOC_STACK\",{configurable:true,get:function(){abort(\"'ALLOC_STACK' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")}});var calledRun;function ExitStatus(status){this.name=\"ExitStatus\";this.message=\"Program terminated with exit(\"+status+\")\";this.status=status}dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function stackCheckInit(){_emscripten_stack_init();writeStackCookie()}function run(args){args=args||arguments_;if(runDependencies>0){return}stackCheckInit();preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module[\"calledRun\"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module[\"onRuntimeInitialized\"])Module[\"onRuntimeInitialized\"]();assert(!Module[\"_main\"],'compiled without a main, but one is present. if you added it from JS, use Module[\"onRuntimeInitialized\"]');postRun()}if(Module[\"setStatus\"]){Module[\"setStatus\"](\"Running...\");setTimeout(function(){setTimeout(function(){Module[\"setStatus\"](\"\")},1);doRun()},1)}else{doRun()}checkStackCookie()}Module[\"run\"]=run;function checkUnflushedContent(){var oldOut=out;var oldErr=err;var has=false;out=err=function(x){has=true};try{var flush=Module[\"_fflush\"];if(flush)flush(0);[\"stdout\",\"stderr\"].forEach(function(name){var info=FS.analyzePath(\"/dev/\"+name);if(!info)return;var stream=info.object;var rdev=stream.rdev;var tty=TTY.ttys[rdev];if(tty&&tty.output&&tty.output.length){has=true}})}catch(e){}out=oldOut;err=oldErr;if(has){warnOnce(\"stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.\")}}function exit(status,implicit){EXITSTATUS=status;checkUnflushedContent();if(keepRuntimeAlive()){if(!implicit){var msg=\"program exited (with status: \"+status+\"), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)\";readyPromiseReject(msg);err(msg)}}else{exitRuntime()}procExit(status)}function procExit(code){EXITSTATUS=code;if(!keepRuntimeAlive()){if(Module[\"onExit\"])Module[\"onExit\"](code);ABORT=true}quit_(code,new ExitStatus(code))}if(Module[\"preInit\"]){if(typeof Module[\"preInit\"]==\"function\")Module[\"preInit\"]=[Module[\"preInit\"]];while(Module[\"preInit\"].length>0){Module[\"preInit\"].pop()()}}run();\n\n\n  return createMediapipeSolutionsWasm.ready\n}\n);\n})();\nif (typeof exports === 'object' && typeof module === 'object')\n  module.exports = createMediapipeSolutionsWasm;\nelse if (typeof define === 'function' && define['amd'])\n  define([], function() { return createMediapipeSolutionsWasm; });\nelse if (typeof exports === 'object')\n  exports[\"createMediapipeSolutionsWasm\"] = createMediapipeSolutionsWasm;\n"
  },
  {
    "path": "src/renderer/public/lib/@mediapipe/holistic/holistic_solution_packed_assets_loader.js",
    "content": "\n  var Module = typeof createMediapipeSolutionsPackedAssets !== 'undefined' ? createMediapipeSolutionsPackedAssets : {};\n  \n  if (!Module.expectedDataFileDownloads) {\n    Module.expectedDataFileDownloads = 0;\n  }\n  Module.expectedDataFileDownloads++;\n  (function() {\n   var loadPackage = function(metadata) {\n  \n      var PACKAGE_PATH = '';\n      if (typeof window === 'object') {\n        PACKAGE_PATH = window['encodeURIComponent'](window.location.pathname.toString().substring(0, window.location.pathname.toString().lastIndexOf('/')) + '/');\n      } else if (typeof process === 'undefined' && typeof location !== 'undefined') {\n        // web worker\n        PACKAGE_PATH = encodeURIComponent(location.pathname.toString().substring(0, location.pathname.toString().lastIndexOf('/')) + '/');\n      }\n      var PACKAGE_NAME = 'blaze-out/k8-opt/genfiles/third_party/mediapipe/web/solutions/holistic/holistic_solution_packed_assets.data';\n      var REMOTE_PACKAGE_BASE = 'holistic_solution_packed_assets.data';\n      if (typeof Module['locateFilePackage'] === 'function' && !Module['locateFile']) {\n        Module['locateFile'] = Module['locateFilePackage'];\n        err('warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)');\n      }\n      var REMOTE_PACKAGE_NAME = Module['locateFile'] ? Module['locateFile'](REMOTE_PACKAGE_BASE, '') : REMOTE_PACKAGE_BASE;\n    \n      var REMOTE_PACKAGE_SIZE = metadata['remote_package_size'];\n      var PACKAGE_UUID = metadata['package_uuid'];\n    \n      function fetchRemotePackage(packageName, packageSize, callback, errback) {\n        \n        if (typeof process === 'object' && typeof process.versions === 'object' && typeof process.versions.node === 'string') {\n          require('fs').readFile(packageName, function(err, contents) {\n            if (err) {\n              errback(err);\n            } else {\n              callback(contents.buffer);\n            }\n          });\n          return;\n        }\n      \n        var xhr = new XMLHttpRequest();\n        xhr.open('GET', packageName, true);\n        xhr.responseType = 'arraybuffer';\n        xhr.onprogress = function(event) {\n          var url = packageName;\n          var size = packageSize;\n          if (event.total) size = event.total;\n          if (event.loaded) {\n            if (!xhr.addedTotal) {\n              xhr.addedTotal = true;\n              if (!Module.dataFileDownloads) Module.dataFileDownloads = {};\n              Module.dataFileDownloads[url] = {\n                loaded: event.loaded,\n                total: size\n              };\n            } else {\n              Module.dataFileDownloads[url].loaded = event.loaded;\n            }\n            var total = 0;\n            var loaded = 0;\n            var num = 0;\n            for (var download in Module.dataFileDownloads) {\n            var data = Module.dataFileDownloads[download];\n              total += data.total;\n              loaded += data.loaded;\n              num++;\n            }\n            total = Math.ceil(total * Module.expectedDataFileDownloads/num);\n            if (Module['setStatus']) Module['setStatus']('Downloading data... (' + loaded + '/' + total + ')');\n          } else if (!Module.dataFileDownloads) {\n            if (Module['setStatus']) Module['setStatus']('Downloading data...');\n          }\n        };\n        xhr.onerror = function(event) {\n          throw new Error(\"NetworkError for: \" + packageName);\n        }\n        xhr.onload = function(event) {\n          if (xhr.status == 200 || xhr.status == 304 || xhr.status == 206 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0\n            var packageData = xhr.response;\n            callback(packageData);\n          } else {\n            throw new Error(xhr.statusText + \" : \" + xhr.responseURL);\n          }\n        };\n        xhr.send(null);\n      };\n\n      function handleError(error) {\n        console.error('package error:', error);\n      };\n    \n        var fetchedCallback = null;\n        var fetched = Module['getPreloadedPackage'] ? Module['getPreloadedPackage'](REMOTE_PACKAGE_NAME, REMOTE_PACKAGE_SIZE) : null;\n\n        if (!fetched) fetchRemotePackage(REMOTE_PACKAGE_NAME, REMOTE_PACKAGE_SIZE, function(data) {\n          if (fetchedCallback) {\n            fetchedCallback(data);\n            fetchedCallback = null;\n          } else {\n            fetched = data;\n          }\n        }, handleError);\n      \n    function runWithFS() {\n  \n      function assert(check, msg) {\n        if (!check) throw msg + new Error().stack;\n      }\n  Module['FS_createPath'](\"/\", \"third_party\", true, true);\nModule['FS_createPath'](\"/third_party\", \"mediapipe\", true, true);\nModule['FS_createPath'](\"/third_party/mediapipe\", \"modules\", true, true);\nModule['FS_createPath'](\"/third_party/mediapipe/modules\", \"pose_detection\", true, true);\nModule['FS_createPath'](\"/third_party/mediapipe/modules\", \"palm_detection\", true, true);\nModule['FS_createPath'](\"/third_party/mediapipe/modules\", \"holistic_landmark\", true, true);\nModule['FS_createPath'](\"/third_party/mediapipe/modules\", \"hand_landmark\", true, true);\nModule['FS_createPath'](\"/third_party/mediapipe/modules\", \"face_landmark\", true, true);\nModule['FS_createPath'](\"/third_party/mediapipe/modules\", \"face_geometry\", true, true);\nModule['FS_createPath'](\"/third_party/mediapipe/modules/face_geometry\", \"data\", true, true);\nModule['FS_createPath'](\"/third_party/mediapipe/modules\", \"face_detection\", true, true);\n\n          /** @constructor */\n          function DataRequest(start, end, audio) {\n            this.start = start;\n            this.end = end;\n            this.audio = audio;\n          }\n          DataRequest.prototype = {\n            requests: {},\n            open: function(mode, name) {\n              this.name = name;\n              this.requests[name] = this;\n              Module['addRunDependency']('fp ' + this.name);\n            },\n            send: function() {},\n            onload: function() {\n              var byteArray = this.byteArray.subarray(this.start, this.end);\n              this.finish(byteArray);\n            },\n            finish: function(byteArray) {\n              var that = this;\n      \n          Module['FS_createPreloadedFile'](this.name, null, byteArray, true, true, function() {\n            Module['removeRunDependency']('fp ' + that.name);\n          }, function() {\n            if (that.audio) {\n              Module['removeRunDependency']('fp ' + that.name); // workaround for chromium bug 124926 (still no audio with this, but at least we don't hang)\n            } else {\n              err('Preloading file ' + that.name + ' failed');\n            }\n          }, false, true); // canOwn this data in the filesystem, it is a slide into the heap that will never change\n  \n              this.requests[this.name] = null;\n            }\n          };\n      \n              var files = metadata['files'];\n              for (var i = 0; i < files.length; ++i) {\n                new DataRequest(files[i]['start'], files[i]['end'], files[i]['audio']).open('GET', files[i]['filename']);\n              }\n      \n        \n      function processPackageData(arrayBuffer) {\n        assert(arrayBuffer, 'Loading data file failed.');\n        assert(arrayBuffer instanceof ArrayBuffer, 'bad input to processPackageData');\n        var byteArray = new Uint8Array(arrayBuffer);\n        var curr;\n        \n          // Reuse the bytearray from the XHR as the source for file reads.\n          DataRequest.prototype.byteArray = byteArray;\n    \n            var files = metadata['files'];\n            for (var i = 0; i < files.length; ++i) {\n              DataRequest.prototype.requests[files[i].filename].onload();\n            }\n                Module['removeRunDependency']('datafile_blaze-out/k8-opt/genfiles/third_party/mediapipe/web/solutions/holistic/holistic_solution_packed_assets.data');\n\n      };\n      Module['addRunDependency']('datafile_blaze-out/k8-opt/genfiles/third_party/mediapipe/web/solutions/holistic/holistic_solution_packed_assets.data');\n    \n      if (!Module.preloadResults) Module.preloadResults = {};\n    \n        Module.preloadResults[PACKAGE_NAME] = {fromCache: false};\n        if (fetched) {\n          processPackageData(fetched);\n          fetched = null;\n        } else {\n          fetchedCallback = processPackageData;\n        }\n      \n    }\n    if (Module['calledRun']) {\n      runWithFS();\n    } else {\n      if (!Module['preRun']) Module['preRun'] = [];\n      Module[\"preRun\"].push(runWithFS); // FS is not initialized yet, wait for it\n    }\n  \n   }\n   loadPackage({\"files\": [{\"filename\": \"/third_party/mediapipe/modules/pose_detection/pose_detection.tflite\", \"start\": 0, \"end\": 2962288, \"audio\": 0}, {\"filename\": \"/third_party/mediapipe/modules/palm_detection/palm_detection_lite.tflite\", \"start\": 2962288, \"end\": 4947728, \"audio\": 0}, {\"filename\": \"/third_party/mediapipe/modules/palm_detection/palm_detection_full.tflite\", \"start\": 4947728, \"end\": 7289008, \"audio\": 0}, {\"filename\": \"/third_party/mediapipe/modules/holistic_landmark/hand_recrop.tflite\", \"start\": 7289008, \"end\": 7412800, \"audio\": 0}, {\"filename\": \"/third_party/mediapipe/modules/hand_landmark/handedness.txt\", \"start\": 7412800, \"end\": 7412811, \"audio\": 0}, {\"filename\": \"/third_party/mediapipe/modules/hand_landmark/hand_landmark_full.tflite\", \"start\": 7412811, \"end\": 12891499, \"audio\": 0}, {\"filename\": \"/third_party/mediapipe/modules/face_landmark/face_landmark_with_attention.tflite\", \"start\": 12891499, \"end\": 15387451, \"audio\": 0}, {\"filename\": \"/third_party/mediapipe/modules/face_landmark/face_landmark.tflite\", \"start\": 15387451, \"end\": 16629347, \"audio\": 0}, {\"filename\": \"/third_party/mediapipe/modules/face_geometry/data/geometry_pipeline_metadata_landmarks.binarypb\", \"start\": 16629347, \"end\": 16648723, \"audio\": 0}, {\"filename\": \"/third_party/mediapipe/modules/face_detection/face_detection_short_range.tflite\", \"start\": 16648723, \"end\": 16877755, \"audio\": 0}], \"remote_package_size\": 16877755, \"package_uuid\": \"ae959d57-f008-4fa8-81e3-d2180f7564f5\"});\n  \n  })();\n  "
  },
  {
    "path": "src/renderer/public/lib/@mediapipe/holistic/holistic_solution_simd_wasm_bin.data",
    "content": ""
  },
  {
    "path": "src/renderer/public/lib/@mediapipe/holistic/holistic_solution_simd_wasm_bin.js",
    "content": "\nvar createMediapipeSolutionsWasm = (function() {\n  var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;\n  if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;\n  return (\nfunction(createMediapipeSolutionsWasm) {\n  createMediapipeSolutionsWasm = createMediapipeSolutionsWasm || {};\n\nvar Module=typeof createMediapipeSolutionsWasm!==\"undefined\"?createMediapipeSolutionsWasm:{};var readyPromiseResolve,readyPromiseReject;Module[\"ready\"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_main\")){Object.defineProperty(Module[\"ready\"],\"_main\",{configurable:true,get:function(){abort(\"You are getting _main on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_main\",{configurable:true,set:function(){abort(\"You are setting _main on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_stack_get_end\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_get_end\",{configurable:true,get:function(){abort(\"You are getting _emscripten_stack_get_end on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_get_end\",{configurable:true,set:function(){abort(\"You are setting _emscripten_stack_get_end on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_stack_get_free\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_get_free\",{configurable:true,get:function(){abort(\"You are getting _emscripten_stack_get_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_get_free\",{configurable:true,set:function(){abort(\"You are setting _emscripten_stack_get_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_stack_init\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_init\",{configurable:true,get:function(){abort(\"You are getting _emscripten_stack_init on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_init\",{configurable:true,set:function(){abort(\"You are setting _emscripten_stack_init on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_stackSave\")){Object.defineProperty(Module[\"ready\"],\"_stackSave\",{configurable:true,get:function(){abort(\"You are getting _stackSave on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_stackSave\",{configurable:true,set:function(){abort(\"You are setting _stackSave on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_stackRestore\")){Object.defineProperty(Module[\"ready\"],\"_stackRestore\",{configurable:true,get:function(){abort(\"You are getting _stackRestore on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_stackRestore\",{configurable:true,set:function(){abort(\"You are setting _stackRestore on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_stackAlloc\")){Object.defineProperty(Module[\"ready\"],\"_stackAlloc\",{configurable:true,get:function(){abort(\"You are getting _stackAlloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_stackAlloc\",{configurable:true,set:function(){abort(\"You are setting _stackAlloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___wasm_call_ctors\")){Object.defineProperty(Module[\"ready\"],\"___wasm_call_ctors\",{configurable:true,get:function(){abort(\"You are getting ___wasm_call_ctors on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___wasm_call_ctors\",{configurable:true,set:function(){abort(\"You are setting ___wasm_call_ctors on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_fflush\")){Object.defineProperty(Module[\"ready\"],\"_fflush\",{configurable:true,get:function(){abort(\"You are getting _fflush on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_fflush\",{configurable:true,set:function(){abort(\"You are setting _fflush on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___errno_location\")){Object.defineProperty(Module[\"ready\"],\"___errno_location\",{configurable:true,get:function(){abort(\"You are getting ___errno_location on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___errno_location\",{configurable:true,set:function(){abort(\"You are setting ___errno_location on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_malloc\")){Object.defineProperty(Module[\"ready\"],\"_malloc\",{configurable:true,get:function(){abort(\"You are getting _malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_malloc\",{configurable:true,set:function(){abort(\"You are setting _malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_free\")){Object.defineProperty(Module[\"ready\"],\"_free\",{configurable:true,get:function(){abort(\"You are getting _free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_free\",{configurable:true,set:function(){abort(\"You are setting _free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_main_thread_process_queued_calls\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_main_thread_process_queued_calls\",{configurable:true,get:function(){abort(\"You are getting _emscripten_main_thread_process_queued_calls on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_main_thread_process_queued_calls\",{configurable:true,set:function(){abort(\"You are setting _emscripten_main_thread_process_queued_calls on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_memalign\")){Object.defineProperty(Module[\"ready\"],\"_memalign\",{configurable:true,get:function(){abort(\"You are getting _memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_memalign\",{configurable:true,set:function(){abort(\"You are setting _memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_webgl_make_context_current\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_webgl_make_context_current\",{configurable:true,get:function(){abort(\"You are getting _emscripten_webgl_make_context_current on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_webgl_make_context_current\",{configurable:true,set:function(){abort(\"You are setting _emscripten_webgl_make_context_current on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_webgl_get_current_context\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_webgl_get_current_context\",{configurable:true,get:function(){abort(\"You are getting _emscripten_webgl_get_current_context on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_webgl_get_current_context\",{configurable:true,set:function(){abort(\"You are setting _emscripten_webgl_get_current_context on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_setThrew\")){Object.defineProperty(Module[\"ready\"],\"_setThrew\",{configurable:true,get:function(){abort(\"You are getting _setThrew on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_setThrew\",{configurable:true,set:function(){abort(\"You are setting _setThrew on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___cxa_is_pointer_type\")){Object.defineProperty(Module[\"ready\"],\"___cxa_is_pointer_type\",{configurable:true,get:function(){abort(\"You are getting ___cxa_is_pointer_type on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___cxa_is_pointer_type\",{configurable:true,set:function(){abort(\"You are setting ___cxa_is_pointer_type on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___cxa_can_catch\")){Object.defineProperty(Module[\"ready\"],\"___cxa_can_catch\",{configurable:true,get:function(){abort(\"You are getting ___cxa_can_catch on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___cxa_can_catch\",{configurable:true,set:function(){abort(\"You are setting ___cxa_can_catch on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_saveSetjmp\")){Object.defineProperty(Module[\"ready\"],\"_saveSetjmp\",{configurable:true,get:function(){abort(\"You are getting _saveSetjmp on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_saveSetjmp\",{configurable:true,set:function(){abort(\"You are setting _saveSetjmp on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"__get_tzname\")){Object.defineProperty(Module[\"ready\"],\"__get_tzname\",{configurable:true,get:function(){abort(\"You are getting __get_tzname on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"__get_tzname\",{configurable:true,set:function(){abort(\"You are setting __get_tzname on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"__get_daylight\")){Object.defineProperty(Module[\"ready\"],\"__get_daylight\",{configurable:true,get:function(){abort(\"You are getting __get_daylight on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"__get_daylight\",{configurable:true,set:function(){abort(\"You are setting __get_daylight on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"__get_timezone\")){Object.defineProperty(Module[\"ready\"],\"__get_timezone\",{configurable:true,get:function(){abort(\"You are getting __get_timezone on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"__get_timezone\",{configurable:true,set:function(){abort(\"You are setting __get_timezone on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_builtin_malloc\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_malloc\",{configurable:true,get:function(){abort(\"You are getting _emscripten_builtin_malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_malloc\",{configurable:true,set:function(){abort(\"You are setting _emscripten_builtin_malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_builtin_free\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_free\",{configurable:true,get:function(){abort(\"You are getting _emscripten_builtin_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_free\",{configurable:true,set:function(){abort(\"You are setting _emscripten_builtin_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_builtin_memalign\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_memalign\",{configurable:true,get:function(){abort(\"You are getting _emscripten_builtin_memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_memalign\",{configurable:true,set:function(){abort(\"You are setting _emscripten_builtin_memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___getTypeName\")){Object.defineProperty(Module[\"ready\"],\"___getTypeName\",{configurable:true,get:function(){abort(\"You are getting ___getTypeName on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___getTypeName\",{configurable:true,set:function(){abort(\"You are setting ___getTypeName on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___embind_register_native_and_builtin_types\")){Object.defineProperty(Module[\"ready\"],\"___embind_register_native_and_builtin_types\",{configurable:true,get:function(){abort(\"You are getting ___embind_register_native_and_builtin_types on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___embind_register_native_and_builtin_types\",{configurable:true,set:function(){abort(\"You are setting ___embind_register_native_and_builtin_types on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"onRuntimeInitialized\")){Object.defineProperty(Module[\"ready\"],\"onRuntimeInitialized\",{configurable:true,get:function(){abort(\"You are getting onRuntimeInitialized on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"onRuntimeInitialized\",{configurable:true,set:function(){abort(\"You are setting onRuntimeInitialized on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var arguments_=[];var thisProgram=\"./this.program\";var quit_=function(status,toThrow){throw toThrow};var ENVIRONMENT_IS_WEB=typeof window===\"object\";var ENVIRONMENT_IS_WORKER=typeof importScripts===\"function\";var ENVIRONMENT_IS_NODE=typeof process===\"object\"&&typeof process.versions===\"object\"&&typeof process.versions.node===\"string\";var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(Module[\"ENVIRONMENT\"]){throw new Error(\"Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)\")}var scriptDirectory=\"\";function locateFile(path){if(Module[\"locateFile\"]){return Module[\"locateFile\"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;var nodeFS;var nodePath;if(ENVIRONMENT_IS_NODE){if(!(typeof process===\"object\"&&typeof require===\"function\"))throw new Error(\"not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)\");if(ENVIRONMENT_IS_WORKER){scriptDirectory=require(\"path\").dirname(scriptDirectory)+\"/\"}else{scriptDirectory=__dirname+\"/\"}read_=function shell_read(filename,binary){if(!nodeFS)nodeFS=require(\"fs\");if(!nodePath)nodePath=require(\"path\");filename=nodePath[\"normalize\"](filename);return nodeFS[\"readFileSync\"](filename,binary?null:\"utf8\")};readBinary=function readBinary(filename){var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};readAsync=function readAsync(filename,onload,onerror){if(!nodeFS)nodeFS=require(\"fs\");if(!nodePath)nodePath=require(\"path\");filename=nodePath[\"normalize\"](filename);nodeFS[\"readFile\"](filename,function(err,data){if(err)onerror(err);else onload(data.buffer)})};if(process[\"argv\"].length>1){thisProgram=process[\"argv\"][1].replace(/\\\\/g,\"/\")}arguments_=process[\"argv\"].slice(2);process[\"on\"](\"uncaughtException\",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process[\"on\"](\"unhandledRejection\",abort);quit_=function(status,toThrow){if(keepRuntimeAlive()){process[\"exitCode\"]=status;throw toThrow}process[\"exit\"](status)};Module[\"inspect\"]=function(){return\"[Emscripten Module object]\"}}else if(ENVIRONMENT_IS_SHELL){if(typeof process===\"object\"&&typeof require===\"function\"||typeof window===\"object\"||typeof importScripts===\"function\")throw new Error(\"not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)\");if(typeof read!=\"undefined\"){read_=function shell_read(f){return read(f)}}readBinary=function readBinary(f){var data;if(typeof readbuffer===\"function\"){return new Uint8Array(readbuffer(f))}data=read(f,\"binary\");assert(typeof data===\"object\");return data};readAsync=function readAsync(f,onload,onerror){setTimeout(function(){onload(readBinary(f))},0)};if(typeof scriptArgs!=\"undefined\"){arguments_=scriptArgs}else if(typeof arguments!=\"undefined\"){arguments_=arguments}if(typeof quit===\"function\"){quit_=function(status){quit(status)}}if(typeof print!==\"undefined\"){if(typeof console===\"undefined\")console={};console.log=print;console.warn=console.error=typeof printErr!==\"undefined\"?printErr:print}}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(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf(\"blob:\")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf(\"/\")+1)}else{scriptDirectory=\"\"}if(!(typeof window===\"object\"||typeof importScripts===\"function\"))throw new Error(\"not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)\");{read_=function(url){var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=function(url){var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.responseType=\"arraybuffer\";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=function(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,true);xhr.responseType=\"arraybuffer\";xhr.onload=function(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=function(title){document.title=title}}else{throw new Error(\"environment detection error\")}var out=Module[\"print\"]||console.log.bind(console);var err=Module[\"printErr\"]||console.warn.bind(console);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=null;if(Module[\"arguments\"])arguments_=Module[\"arguments\"];if(!Object.getOwnPropertyDescriptor(Module,\"arguments\")){Object.defineProperty(Module,\"arguments\",{configurable:true,get:function(){abort(\"Module.arguments has been replaced with plain arguments_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(Module[\"thisProgram\"])thisProgram=Module[\"thisProgram\"];if(!Object.getOwnPropertyDescriptor(Module,\"thisProgram\")){Object.defineProperty(Module,\"thisProgram\",{configurable:true,get:function(){abort(\"Module.thisProgram has been replaced with plain thisProgram (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(Module[\"quit\"])quit_=Module[\"quit\"];if(!Object.getOwnPropertyDescriptor(Module,\"quit\")){Object.defineProperty(Module,\"quit\",{configurable:true,get:function(){abort(\"Module.quit has been replaced with plain quit_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}assert(typeof Module[\"memoryInitializerPrefixURL\"]===\"undefined\",\"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead\");assert(typeof Module[\"pthreadMainPrefixURL\"]===\"undefined\",\"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead\");assert(typeof Module[\"cdInitializerPrefixURL\"]===\"undefined\",\"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead\");assert(typeof Module[\"filePackagePrefixURL\"]===\"undefined\",\"Module.filePackagePrefixURL option was removed, use Module.locateFile instead\");assert(typeof Module[\"read\"]===\"undefined\",\"Module.read option was removed (modify read_ in JS)\");assert(typeof Module[\"readAsync\"]===\"undefined\",\"Module.readAsync option was removed (modify readAsync in JS)\");assert(typeof Module[\"readBinary\"]===\"undefined\",\"Module.readBinary option was removed (modify readBinary in JS)\");assert(typeof Module[\"setWindowTitle\"]===\"undefined\",\"Module.setWindowTitle option was removed (modify setWindowTitle in JS)\");assert(typeof Module[\"TOTAL_MEMORY\"]===\"undefined\",\"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY\");if(!Object.getOwnPropertyDescriptor(Module,\"read\")){Object.defineProperty(Module,\"read\",{configurable:true,get:function(){abort(\"Module.read has been replaced with plain read_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(!Object.getOwnPropertyDescriptor(Module,\"readAsync\")){Object.defineProperty(Module,\"readAsync\",{configurable:true,get:function(){abort(\"Module.readAsync has been replaced with plain readAsync (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(!Object.getOwnPropertyDescriptor(Module,\"readBinary\")){Object.defineProperty(Module,\"readBinary\",{configurable:true,get:function(){abort(\"Module.readBinary has been replaced with plain readBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(!Object.getOwnPropertyDescriptor(Module,\"setWindowTitle\")){Object.defineProperty(Module,\"setWindowTitle\",{configurable:true,get:function(){abort(\"Module.setWindowTitle has been replaced with plain setWindowTitle (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}assert(!ENVIRONMENT_IS_SHELL,\"shell environment detected but not enabled at build time.  Add 'shell' to `-s ENVIRONMENT` to enable.\");function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text)}}function convertJsFunctionToWasm(func,sig){if(typeof WebAssembly.Function===\"function\"){var typeNames={\"i\":\"i32\",\"j\":\"i64\",\"f\":\"f32\",\"d\":\"f64\"};var type={parameters:[],results:sig[0]==\"v\"?[]:[typeNames[sig[0]]]};for(var i=1;i<sig.length;++i){type.parameters.push(typeNames[sig[i]])}return new WebAssembly.Function(type,func)}var typeSection=[1,0,1,96];var sigRet=sig.slice(0,1);var sigParam=sig.slice(1);var typeCodes={\"i\":127,\"j\":126,\"f\":125,\"d\":124};typeSection.push(sigParam.length);for(var i=0;i<sigParam.length;++i){typeSection.push(typeCodes[sigParam[i]])}if(sigRet==\"v\"){typeSection.push(0)}else{typeSection=typeSection.concat([1,typeCodes[sigRet]])}typeSection[1]=typeSection.length-2;var bytes=new Uint8Array([0,97,115,109,1,0,0,0].concat(typeSection,[2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0]));var module=new WebAssembly.Module(bytes);var instance=new WebAssembly.Instance(module,{\"e\":{\"f\":func}});var wrappedFunc=instance.exports[\"f\"];return wrappedFunc}var freeTableIndexes=[];var functionsInTableMap;function getEmptyTableSlot(){if(freeTableIndexes.length){return freeTableIndexes.pop()}try{wasmTable.grow(1)}catch(err){if(!(err instanceof RangeError)){throw err}throw\"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.\"}return wasmTable.length-1}function addFunctionWasm(func,sig){if(!functionsInTableMap){functionsInTableMap=new WeakMap;for(var i=0;i<wasmTable.length;i++){var item=wasmTable.get(i);if(item){functionsInTableMap.set(item,i)}}}if(functionsInTableMap.has(func)){return functionsInTableMap.get(func)}var ret=getEmptyTableSlot();try{wasmTable.set(ret,func)}catch(err){if(!(err instanceof TypeError)){throw err}assert(typeof sig!==\"undefined\",\"Missing signature argument to addFunction: \"+func);var wrapped=convertJsFunctionToWasm(func,sig);wasmTable.set(ret,wrapped)}functionsInTableMap.set(func,ret);return ret}var tempRet0=0;var setTempRet0=function(value){tempRet0=value};var getTempRet0=function(){return tempRet0};var wasmBinary;if(Module[\"wasmBinary\"])wasmBinary=Module[\"wasmBinary\"];if(!Object.getOwnPropertyDescriptor(Module,\"wasmBinary\")){Object.defineProperty(Module,\"wasmBinary\",{configurable:true,get:function(){abort(\"Module.wasmBinary has been replaced with plain wasmBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}var noExitRuntime=Module[\"noExitRuntime\"]||true;if(!Object.getOwnPropertyDescriptor(Module,\"noExitRuntime\")){Object.defineProperty(Module,\"noExitRuntime\",{configurable:true,get:function(){abort(\"Module.noExitRuntime has been replaced with plain noExitRuntime (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(typeof WebAssembly!==\"object\"){abort(\"no native wasm support detected\")}var wasmMemory;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort(\"Assertion failed: \"+text)}}function getCFunc(ident){var func=Module[\"_\"+ident];assert(func,\"Cannot call unknown function \"+ident+\", make sure it is exported\");return func}function ccall(ident,returnType,argTypes,args,opts){var toC={\"string\":function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret},\"array\":function(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;assert(returnType!==\"array\",'Return type should not be \"array\".');if(args){for(var i=0;i<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0)stack=stackSave();cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var ret=func.apply(null,cArgs);function onDone(ret){if(stack!==0)stackRestore(stack);return convertReturnValue(ret)}ret=onDone(ret);return ret}var ALLOC_STACK=1;var UTF8Decoder=typeof TextDecoder!==\"undefined\"?new TextDecoder(\"utf8\"):undefined;function UTF8ArrayToString(heap,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heap[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heap.subarray&&UTF8Decoder){return UTF8Decoder.decode(heap.subarray(idx,endPtr))}else{var str=\"\";while(idx<endPtr){var u0=heap[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heap[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heap[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{if((u0&248)!=240)warnOnce(\"Invalid UTF-8 leading byte 0x\"+u0.toString(16)+\" encountered when deserializing a UTF-8 string in wasm memory to a JS string!\");u0=(u0&7)<<18|u1<<12|u2<<6|heap[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):\"\"}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=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;if(u>=2097152)warnOnce(\"Invalid Unicode code point 0x\"+u.toString(16)+\" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x1FFFFF).\");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 stringToUTF8(str,outPtr,maxBytesToWrite){assert(typeof maxBytesToWrite==\"number\",\"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!\");return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}var UTF16Decoder=typeof TextDecoder!==\"undefined\"?new TextDecoder(\"utf-16le\"):undefined;function UTF16ToString(ptr,maxBytesToRead){assert(ptr%2==0,\"Pointer passed to UTF16ToString must be aligned to two bytes!\");var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder){return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr))}else{var str=\"\";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str}}function stringToUTF16(str,outPtr,maxBytesToWrite){assert(outPtr%2==0,\"Pointer passed to stringToUTF16 must be aligned to two bytes!\");assert(typeof maxBytesToWrite==\"number\",\"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!\");if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite<str.length*2?maxBytesToWrite/2:str.length;for(var i=0;i<numCharsToWrite;++i){var codeUnit=str.charCodeAt(i);HEAP16[outPtr>>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr}function lengthBytesUTF16(str){return str.length*2}function UTF32ToString(ptr,maxBytesToRead){assert(ptr%4==0,\"Pointer passed to UTF32ToString must be aligned to four bytes!\");var i=0;var str=\"\";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str}function stringToUTF32(str,outPtr,maxBytesToWrite){assert(outPtr%4==0,\"Pointer passed to stringToUTF32 must be aligned to four bytes!\");assert(typeof maxBytesToWrite==\"number\",\"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!\");if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i<str.length;++i){var codeUnit=str.charCodeAt(i);if(codeUnit>=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr}function lengthBytesUTF32(str){var len=0;for(var i=0;i<str.length;++i){var codeUnit=str.charCodeAt(i);if(codeUnit>=55296&&codeUnit<=57343)++i;len+=4}return len}function allocateUTF8(str){var size=lengthBytesUTF8(str)+1;var ret=_malloc(size);if(ret)stringToUTF8Array(str,HEAP8,ret,size);return ret}function writeArrayToMemory(array,buffer){assert(array.length>=0,\"writeArrayToMemory array must have a length (should be an array or typed array)\");HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i<str.length;++i){assert(str.charCodeAt(i)===str.charCodeAt(i)&255);HEAP8[buffer++>>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module[\"HEAP8\"]=HEAP8=new Int8Array(buf);Module[\"HEAP16\"]=HEAP16=new Int16Array(buf);Module[\"HEAP32\"]=HEAP32=new Int32Array(buf);Module[\"HEAPU8\"]=HEAPU8=new Uint8Array(buf);Module[\"HEAPU16\"]=HEAPU16=new Uint16Array(buf);Module[\"HEAPU32\"]=HEAPU32=new Uint32Array(buf);Module[\"HEAPF32\"]=HEAPF32=new Float32Array(buf);Module[\"HEAPF64\"]=HEAPF64=new Float64Array(buf)}var TOTAL_STACK=5242880;if(Module[\"TOTAL_STACK\"])assert(TOTAL_STACK===Module[\"TOTAL_STACK\"],\"the stack size can no longer be determined at runtime\");var INITIAL_MEMORY=Module[\"INITIAL_MEMORY\"]||16777216;if(!Object.getOwnPropertyDescriptor(Module,\"INITIAL_MEMORY\")){Object.defineProperty(Module,\"INITIAL_MEMORY\",{configurable:true,get:function(){abort(\"Module.INITIAL_MEMORY has been replaced with plain INITIAL_MEMORY (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}assert(INITIAL_MEMORY>=TOTAL_STACK,\"INITIAL_MEMORY should be larger than TOTAL_STACK, was \"+INITIAL_MEMORY+\"! (TOTAL_STACK=\"+TOTAL_STACK+\")\");assert(typeof Int32Array!==\"undefined\"&&typeof Float64Array!==\"undefined\"&&Int32Array.prototype.subarray!==undefined&&Int32Array.prototype.set!==undefined,\"JS engine does not provide full typed array support\");assert(!Module[\"wasmMemory\"],\"Use of `wasmMemory` detected.  Use -s IMPORTED_MEMORY to define wasmMemory externally\");assert(INITIAL_MEMORY==16777216,\"Detected runtime INITIAL_MEMORY setting.  Use -s IMPORTED_MEMORY to define wasmMemory dynamically\");var wasmTable;function writeStackCookie(){var max=_emscripten_stack_get_end();assert((max&3)==0);HEAPU32[(max>>2)+1]=34821223;HEAPU32[(max>>2)+2]=2310721022;HEAP32[0]=1668509029}function checkStackCookie(){if(ABORT)return;var max=_emscripten_stack_get_end();var cookie1=HEAPU32[(max>>2)+1];var cookie2=HEAPU32[(max>>2)+2];if(cookie1!=34821223||cookie2!=2310721022){abort(\"Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x\"+cookie2.toString(16)+\" \"+cookie1.toString(16))}if(HEAP32[0]!==1668509029)abort(\"Runtime error: The application has corrupted its heap memory area (address zero)!\")}(function(){var h16=new Int16Array(1);var h8=new Int8Array(h16.buffer);h16[0]=25459;if(h8[0]!==115||h8[1]!==99)throw\"Runtime error: expected the system to be little-endian! (Run with -s SUPPORT_BIG_ENDIAN=1 to bypass)\"})();var __ATPRERUN__=[];var __ATINIT__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;var runtimeKeepaliveCounter=0;function keepRuntimeAlive(){return noExitRuntime||runtimeKeepaliveCounter>0}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(){checkStackCookie();assert(!runtimeInitialized);runtimeInitialized=true;if(!Module[\"noFSInit\"]&&!FS.init.initialized)FS.init();FS.ignorePermissions=false;TTY.init();callRuntimeCallbacks(__ATINIT__)}function exitRuntime(){checkStackCookie();runtimeExited=true}function postRun(){checkStackCookie();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)}assert(Math.imul,\"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill\");assert(Math.fround,\"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill\");assert(Math.clz32,\"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill\");assert(Math.trunc,\"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill\");var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;var runDependencyTracking={};function getUniqueRunDependency(id){var orig=id;while(1){if(!runDependencyTracking[id])return id;id=orig+Math.random()}}function addRunDependency(id){runDependencies++;if(Module[\"monitorRunDependencies\"]){Module[\"monitorRunDependencies\"](runDependencies)}if(id){assert(!runDependencyTracking[id]);runDependencyTracking[id]=1;if(runDependencyWatcher===null&&typeof setInterval!==\"undefined\"){runDependencyWatcher=setInterval(function(){if(ABORT){clearInterval(runDependencyWatcher);runDependencyWatcher=null;return}var shown=false;for(var dep in runDependencyTracking){if(!shown){shown=true;err(\"still waiting on run dependencies:\")}err(\"dependency: \"+dep)}if(shown){err(\"(end of list)\")}},1e4)}}else{err(\"warning: run dependency added without ID\")}}function removeRunDependency(id){runDependencies--;if(Module[\"monitorRunDependencies\"]){Module[\"monitorRunDependencies\"](runDependencies)}if(id){assert(runDependencyTracking[id]);delete runDependencyTracking[id]}else{err(\"warning: run dependency removed without ID\")}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module[\"preloadedImages\"]={};Module[\"preloadedAudios\"]={};function abort(what){if(Module[\"onAbort\"]){Module[\"onAbort\"](what)}what+=\"\";err(what);ABORT=true;EXITSTATUS=1;var output=\"abort(\"+what+\") at \"+stackTrace();what=output;var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix=\"data:application/octet-stream;base64,\";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}function isFileURI(filename){return filename.startsWith(\"file://\")}function createExportWrapper(name,fixedasm){return function(){var displayName=name;var asm=fixedasm;if(!fixedasm){asm=Module[\"asm\"]}assert(runtimeInitialized,\"native function `\"+displayName+\"` called before runtime initialization\");assert(!runtimeExited,\"native function `\"+displayName+\"` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)\");if(!asm[name]){assert(asm[name],\"exported native function `\"+displayName+\"` not found\")}return asm[name].apply(null,arguments)}}var wasmBinaryFile;wasmBinaryFile=\"holistic_solution_simd_wasm_bin.wasm\";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}else{throw\"both async and sync fetching of the wasm failed\"}}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch===\"function\"&&!isFileURI(wasmBinaryFile)){return fetch(wasmBinaryFile,{credentials:\"same-origin\"}).then(function(response){if(!response[\"ok\"]){throw\"failed to load wasm binary file at '\"+wasmBinaryFile+\"'\"}return response[\"arrayBuffer\"]()}).catch(function(){return getBinary(wasmBinaryFile)})}else{if(readAsync){return new Promise(function(resolve,reject){readAsync(wasmBinaryFile,function(response){resolve(new Uint8Array(response))},reject)})}}}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile)})}function createWasm(){var info={\"env\":asmLibraryArg,\"wasi_snapshot_preview1\":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module[\"asm\"]=exports;wasmMemory=Module[\"asm\"][\"memory\"];assert(wasmMemory,\"memory not found in wasm exports\");updateGlobalBufferAndViews(wasmMemory.buffer);wasmTable=Module[\"asm\"][\"__indirect_function_table\"];assert(wasmTable,\"table not found in wasm exports\");addOnInit(Module[\"asm\"][\"__wasm_call_ctors\"]);removeRunDependency(\"wasm-instantiate\")}addRunDependency(\"wasm-instantiate\");var trueModule=Module;function receiveInstantiationResult(result){assert(Module===trueModule,\"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?\");trueModule=null;receiveInstance(result[\"instance\"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){var result=WebAssembly.instantiate(binary,info);return result}).then(receiver,function(reason){err(\"failed to asynchronously prepare wasm: \"+reason);if(isFileURI(wasmBinaryFile)){err(\"warning: Loading from a file URI (\"+wasmBinaryFile+\") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing\")}abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming===\"function\"&&!isDataURI(wasmBinaryFile)&&!isFileURI(wasmBinaryFile)&&typeof fetch===\"function\"){return fetch(wasmBinaryFile,{credentials:\"same-origin\"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiationResult,function(reason){err(\"wasm streaming compile failed: \"+reason);err(\"falling back to ArrayBuffer instantiation\");return instantiateArrayBuffer(receiveInstantiationResult)})})}else{return instantiateArrayBuffer(receiveInstantiationResult)}}if(Module[\"instantiateWasm\"]){try{var exports=Module[\"instantiateWasm\"](info,receiveInstance);return exports}catch(e){err(\"Module.instantiateWasm callback failed with error: \"+e);return false}}instantiateAsync().catch(readyPromiseReject);return{}}var tempDouble;var tempI64;var ASM_CONSTS={633856:function(){let init_once=true;if(init_once){const cachedFindCanvasEventTarget=findCanvasEventTarget;if(typeof cachedFindCanvasEventTarget!==\"function\"){if(typeof console!==\"undefined\"){console.error(\"Expected Emscripten global function \"+'\"findCanvasEventTarget\" not found. WebGL context creation '+\"may fail.\")}return}findCanvasEventTarget=function(target){if(target==0){if(Module&&Module.canvas){return Module.canvas}else if(Module&&Module.canvasCssSelector){return cachedFindCanvasEventTarget(Module.canvasCssSelector)}if(typeof console!==\"undefined\"){console.warn(\"Module properties canvas and canvasCssSelector not \"+\"found during WebGL context creation.\")}}return cachedFindCanvasEventTarget(target)};init_once=false}},634641:function(){return typeof wasmOffsetConverter!==\"undefined\"}};function HaveOffsetConverter(){return typeof wasmOffsetConverter!==\"undefined\"}function _emscripten_set_main_loop_timing(mode,value){Browser.mainLoop.timingMode=mode;Browser.mainLoop.timingValue=value;if(!Browser.mainLoop.func){err(\"emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up.\");return 1}if(!Browser.mainLoop.running){Browser.mainLoop.running=true}if(mode==0){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setTimeout(){var timeUntilNextTick=Math.max(0,Browser.mainLoop.tickStartTime+value-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,timeUntilNextTick)};Browser.mainLoop.method=\"timeout\"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_rAF(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method=\"rAF\"}else if(mode==2){if(typeof setImmediate===\"undefined\"){var setImmediates=[];var emscriptenMainLoopMessageId=\"setimmediate\";var Browser_setImmediate_messageHandler=function(event){if(event.data===emscriptenMainLoopMessageId||event.data.target===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}};addEventListener(\"message\",Browser_setImmediate_messageHandler,true);setImmediate=function Browser_emulated_setImmediate(func){setImmediates.push(func);if(ENVIRONMENT_IS_WORKER){if(Module[\"setImmediates\"]===undefined)Module[\"setImmediates\"]=[];Module[\"setImmediates\"].push(func);postMessage({target:emscriptenMainLoopMessageId})}else postMessage(emscriptenMainLoopMessageId,\"*\")}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){setImmediate(Browser.mainLoop.runner)};Browser.mainLoop.method=\"immediate\"}return 0}var _emscripten_get_now;if(ENVIRONMENT_IS_NODE){_emscripten_get_now=function(){var t=process[\"hrtime\"]();return t[0]*1e3+t[1]/1e6}}else _emscripten_get_now=function(){return performance.now()};function _emscripten_webgl_do_commit_frame(){if(!GL.currentContext||!GL.currentContext.GLctx){return-3}if(GL.currentContext.defaultFbo){GL.blitOffscreenFramebuffer(GL.currentContext);return 0}if(!GL.currentContext.attributes.explicitSwapControl){return-3}return 0}function _exit(status){exit(status)}function handleException(e){if(e instanceof ExitStatus||e===\"unwind\"){return}if(e&&typeof e===\"object\"&&e.stack)err(\"exception thrown: \"+[e,e.stack]);throw e}function maybeExit(){if(!keepRuntimeAlive()){try{_exit(EXITSTATUS)}catch(e){handleException(e)}}}function setMainLoop(browserIterationFunc,fps,simulateInfiniteLoop,arg,noSetTiming){assert(!Browser.mainLoop.func,\"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.\");Browser.mainLoop.func=browserIterationFunc;Browser.mainLoop.arg=arg;var thisMainLoopId=Browser.mainLoop.currentlyRunningMainloop;function checkIsRunning(){if(thisMainLoopId<Browser.mainLoop.currentlyRunningMainloop){maybeExit();return false}return true}Browser.mainLoop.running=false;Browser.mainLoop.runner=function Browser_mainLoop_runner(){if(ABORT)return;if(Browser.mainLoop.queue.length>0){var start=Date.now();var blocker=Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if(Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){Browser.mainLoop.remainingBlockers=next}else{next=next+.5;Browser.mainLoop.remainingBlockers=(8*remaining+next)/9}}out('main loop blocker \"'+blocker.name+'\" took '+(Date.now()-start)+\" ms\");Browser.mainLoop.updateStatus();if(!checkIsRunning())return;setTimeout(Browser.mainLoop.runner,0);return}if(!checkIsRunning())return;Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0;if(Browser.mainLoop.timingMode==1&&Browser.mainLoop.timingValue>1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else if(Browser.mainLoop.timingMode==0){Browser.mainLoop.tickStartTime=_emscripten_get_now()}GL.newRenderingFrameStarted();if(typeof GL!==\"undefined\"&&GL.currentContext&&!GL.currentContextIsProxied&&!GL.currentContext.attributes.explicitSwapControl&&GL.currentContext.GLctx.commit){GL.currentContext.GLctx.commit()}if(Browser.mainLoop.method===\"timeout\"&&Module.ctx){warnOnce(\"Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!\");Browser.mainLoop.method=\"\"}Browser.mainLoop.runIter(browserIterationFunc);checkStackCookie();if(!checkIsRunning())return;if(typeof SDL===\"object\"&&SDL.audio&&SDL.audio.queueNewAudioData)SDL.audio.queueNewAudioData();Browser.mainLoop.scheduler()};if(!noSetTiming){if(fps&&fps>0)_emscripten_set_main_loop_timing(0,1e3/fps);else _emscripten_set_main_loop_timing(1,1);Browser.mainLoop.scheduler()}if(simulateInfiniteLoop){throw\"unwind\"}}function callUserCallback(func,synchronous){if(ABORT){err(\"user callback triggered after application aborted.  Ignoring.\");return}if(synchronous){func();return}try{func()}catch(e){handleException(e)}}function safeSetTimeout(func,timeout){return setTimeout(function(){callUserCallback(func)},timeout)}var Browser={mainLoop:{running:false,scheduler:null,method:\"\",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;setMainLoop(func,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()},updateStatus:function(){if(Module[\"setStatus\"]){var message=Module[\"statusMessage\"]||\"Please wait...\";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining<expected){Module[\"setStatus\"](message+\" (\"+(expected-remaining)+\"/\"+expected+\")\")}else{Module[\"setStatus\"](message)}}else{Module[\"setStatus\"](\"\")}}},runIter:function(func){if(ABORT)return;if(Module[\"preMainLoop\"]){var preRet=Module[\"preMainLoop\"]();if(preRet===false){return}}callUserCallback(func);if(Module[\"postMainLoop\"])Module[\"postMainLoop\"]()}},isFullscreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(!Module[\"preloadPlugins\"])Module[\"preloadPlugins\"]=[];if(Browser.initted)return;Browser.initted=true;try{new Blob;Browser.hasBlobConstructor=true}catch(e){Browser.hasBlobConstructor=false;out(\"warning: no blob constructor, cannot create blobs with mimetypes\")}Browser.BlobBuilder=typeof MozBlobBuilder!=\"undefined\"?MozBlobBuilder:typeof WebKitBlobBuilder!=\"undefined\"?WebKitBlobBuilder:!Browser.hasBlobConstructor?out(\"warning: no BlobBuilder\"):null;Browser.URLObject=typeof window!=\"undefined\"?window.URL?window.URL:window.webkitURL:undefined;if(!Module.noImageDecoding&&typeof Browser.URLObject===\"undefined\"){out(\"warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available.\");Module.noImageDecoding=true}var imagePlugin={};imagePlugin[\"canHandle\"]=function imagePlugin_canHandle(name){return!Module.noImageDecoding&&/\\.(jpg|jpeg|png|bmp)$/i.test(name)};imagePlugin[\"handle\"]=function imagePlugin_handle(byteArray,name,onload,onerror){var b=null;if(Browser.hasBlobConstructor){try{b=new Blob([byteArray],{type:Browser.getMimetype(name)});if(b.size!==byteArray.length){b=new Blob([new Uint8Array(byteArray).buffer],{type:Browser.getMimetype(name)})}}catch(e){warnOnce(\"Blob constructor present but fails: \"+e+\"; falling back to blob builder\")}}if(!b){var bb=new Browser.BlobBuilder;bb.append(new Uint8Array(byteArray).buffer);b=bb.getBlob()}var url=Browser.URLObject.createObjectURL(b);assert(typeof url==\"string\",\"createObjectURL must return a url as a string\");var img=new Image;img.onload=function img_onload(){assert(img.complete,\"Image \"+name+\" could not be decoded\");var canvas=document.createElement(\"canvas\");canvas.width=img.width;canvas.height=img.height;var ctx=canvas.getContext(\"2d\");ctx.drawImage(img,0,0);Module[\"preloadedImages\"][name]=canvas;Browser.URLObject.revokeObjectURL(url);if(onload)onload(byteArray)};img.onerror=function img_onerror(event){out(\"Image \"+url+\" could not be decoded\");if(onerror)onerror()};img.src=url};Module[\"preloadPlugins\"].push(imagePlugin);var audioPlugin={};audioPlugin[\"canHandle\"]=function audioPlugin_canHandle(name){return!Module.noAudioDecoding&&name.substr(-4)in{\".ogg\":1,\".wav\":1,\".mp3\":1}};audioPlugin[\"handle\"]=function audioPlugin_handle(byteArray,name,onload,onerror){var done=false;function finish(audio){if(done)return;done=true;Module[\"preloadedAudios\"][name]=audio;if(onload)onload(byteArray)}function fail(){if(done)return;done=true;Module[\"preloadedAudios\"][name]=new Audio;if(onerror)onerror()}if(Browser.hasBlobConstructor){try{var b=new Blob([byteArray],{type:Browser.getMimetype(name)})}catch(e){return fail()}var url=Browser.URLObject.createObjectURL(b);assert(typeof url==\"string\",\"createObjectURL must return a url as a string\");var audio=new Audio;audio.addEventListener(\"canplaythrough\",function(){finish(audio)},false);audio.onerror=function audio_onerror(event){if(done)return;out(\"warning: browser could not fully decode audio \"+name+\", trying slower base64 approach\");function encode64(data){var BASE=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";var PAD=\"=\";var ret=\"\";var leftchar=0;var leftbits=0;for(var i=0;i<data.length;i++){leftchar=leftchar<<8|data[i];leftbits+=8;while(leftbits>=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src=\"data:audio/x-\"+name.substr(-3)+\";base64,\"+encode64(byteArray);finish(audio)};audio.src=url;safeSetTimeout(function(){finish(audio)},1e4)}else{return fail()}};Module[\"preloadPlugins\"].push(audioPlugin);function pointerLockChange(){Browser.pointerLock=document[\"pointerLockElement\"]===Module[\"canvas\"]||document[\"mozPointerLockElement\"]===Module[\"canvas\"]||document[\"webkitPointerLockElement\"]===Module[\"canvas\"]||document[\"msPointerLockElement\"]===Module[\"canvas\"]}var canvas=Module[\"canvas\"];if(canvas){canvas.requestPointerLock=canvas[\"requestPointerLock\"]||canvas[\"mozRequestPointerLock\"]||canvas[\"webkitRequestPointerLock\"]||canvas[\"msRequestPointerLock\"]||function(){};canvas.exitPointerLock=document[\"exitPointerLock\"]||document[\"mozExitPointerLock\"]||document[\"webkitExitPointerLock\"]||document[\"msExitPointerLock\"]||function(){};canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener(\"pointerlockchange\",pointerLockChange,false);document.addEventListener(\"mozpointerlockchange\",pointerLockChange,false);document.addEventListener(\"webkitpointerlockchange\",pointerLockChange,false);document.addEventListener(\"mspointerlockchange\",pointerLockChange,false);if(Module[\"elementPointerLock\"]){canvas.addEventListener(\"click\",function(ev){if(!Browser.pointerLock&&Module[\"canvas\"].requestPointerLock){Module[\"canvas\"].requestPointerLock();ev.preventDefault()}},false)}}},createContext:function(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx;var contextHandle;if(useWebGL){var contextAttributes={antialias:false,alpha:false,majorVersion:typeof WebGL2RenderingContext!==\"undefined\"?2:1};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}if(typeof GL!==\"undefined\"){contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}}}else{ctx=canvas.getContext(\"2d\")}if(!ctx)return null;if(setInModule){if(!useWebGL)assert(typeof GLctx===\"undefined\",\"cannot set in module if GLctx is used, but we are a non-GL context that would replace it\");Module.ctx=ctx;if(useWebGL)GL.makeContextCurrent(contextHandle);Module.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach(function(callback){callback()});Browser.init()}return ctx},destroyContext:function(canvas,useWebGL,setInModule){},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function(lockPointer,resizeCanvas){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;if(typeof Browser.lockPointer===\"undefined\")Browser.lockPointer=true;if(typeof Browser.resizeCanvas===\"undefined\")Browser.resizeCanvas=false;var canvas=Module[\"canvas\"];function fullscreenChange(){Browser.isFullscreen=false;var canvasContainer=canvas.parentNode;if((document[\"fullscreenElement\"]||document[\"mozFullScreenElement\"]||document[\"msFullscreenElement\"]||document[\"webkitFullscreenElement\"]||document[\"webkitCurrentFullScreenElement\"])===canvasContainer){canvas.exitFullscreen=Browser.exitFullscreen;if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullscreen=true;if(Browser.resizeCanvas){Browser.setFullscreenCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas){Browser.setWindowedCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}if(Module[\"onFullScreen\"])Module[\"onFullScreen\"](Browser.isFullscreen);if(Module[\"onFullscreen\"])Module[\"onFullscreen\"](Browser.isFullscreen)}if(!Browser.fullscreenHandlersInstalled){Browser.fullscreenHandlersInstalled=true;document.addEventListener(\"fullscreenchange\",fullscreenChange,false);document.addEventListener(\"mozfullscreenchange\",fullscreenChange,false);document.addEventListener(\"webkitfullscreenchange\",fullscreenChange,false);document.addEventListener(\"MSFullscreenChange\",fullscreenChange,false)}var canvasContainer=document.createElement(\"div\");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullscreen=canvasContainer[\"requestFullscreen\"]||canvasContainer[\"mozRequestFullScreen\"]||canvasContainer[\"msRequestFullscreen\"]||(canvasContainer[\"webkitRequestFullscreen\"]?function(){canvasContainer[\"webkitRequestFullscreen\"](Element[\"ALLOW_KEYBOARD_INPUT\"])}:null)||(canvasContainer[\"webkitRequestFullScreen\"]?function(){canvasContainer[\"webkitRequestFullScreen\"](Element[\"ALLOW_KEYBOARD_INPUT\"])}:null);canvasContainer.requestFullscreen()},requestFullScreen:function(){abort(\"Module.requestFullScreen has been replaced by Module.requestFullscreen (without a capital S)\")},exitFullscreen:function(){if(!Browser.isFullscreen){return false}var CFS=document[\"exitFullscreen\"]||document[\"cancelFullScreen\"]||document[\"mozCancelFullScreen\"]||document[\"msExitFullscreen\"]||document[\"webkitCancelFullScreen\"]||function(){};CFS.apply(document,[]);return true},nextRAF:0,fakeRequestAnimationFrame:function(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)},requestAnimationFrame:function(func){if(typeof requestAnimationFrame===\"function\"){requestAnimationFrame(func);return}var RAF=Browser.fakeRequestAnimationFrame;RAF(func)},safeSetTimeout:function(func){return safeSetTimeout(func)},safeRequestAnimationFrame:function(func){return Browser.requestAnimationFrame(function(){callUserCallback(func)})},getMimetype:function(name){return{\"jpg\":\"image/jpeg\",\"jpeg\":\"image/jpeg\",\"png\":\"image/png\",\"bmp\":\"image/bmp\",\"ogg\":\"audio/ogg\",\"wav\":\"audio/wav\",\"mp3\":\"audio/mpeg\"}[name.substr(name.lastIndexOf(\".\")+1)]},getUserMedia:function(func){if(!window.getUserMedia){window.getUserMedia=navigator[\"getUserMedia\"]||navigator[\"mozGetUserMedia\"]}window.getUserMedia(func)},getMovementX:function(event){return event[\"movementX\"]||event[\"mozMovementX\"]||event[\"webkitMovementX\"]||0},getMovementY:function(event){return event[\"movementY\"]||event[\"mozMovementY\"]||event[\"webkitMovementY\"]||0},getMouseWheelDelta:function(event){var delta=0;switch(event.type){case\"DOMMouseScroll\":delta=event.detail/3;break;case\"mousewheel\":delta=event.wheelDelta/120;break;case\"wheel\":delta=event.deltaY;switch(event.deltaMode){case 0:delta/=100;break;case 1:delta/=3;break;case 2:delta*=80;break;default:throw\"unrecognized mouse wheel delta mode: \"+event.deltaMode}break;default:throw\"unrecognized mouse wheel event: \"+event.type}return delta},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(event){if(Browser.pointerLock){if(event.type!=\"mousemove\"&&\"mozMovementX\"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}if(typeof SDL!=\"undefined\"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}}else{var rect=Module[\"canvas\"].getBoundingClientRect();var cw=Module[\"canvas\"].width;var ch=Module[\"canvas\"].height;var scrollX=typeof window.scrollX!==\"undefined\"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!==\"undefined\"?window.scrollY:window.pageYOffset;assert(typeof scrollX!==\"undefined\"&&typeof scrollY!==\"undefined\",\"Unable to retrieve scroll position, mouse positions likely broken.\");if(event.type===\"touchstart\"||event.type===\"touchend\"||event.type===\"touchmove\"){var touch=event.touch;if(touch===undefined){return}var adjustedX=touch.pageX-(scrollX+rect.left);var adjustedY=touch.pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);var coords={x:adjustedX,y:adjustedY};if(event.type===\"touchstart\"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type===\"touchend\"||event.type===\"touchmove\"){var last=Browser.touches[touch.identifier];if(!last)last=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}},resizeListeners:[],updateResizeListeners:function(){var canvas=Module[\"canvas\"];Browser.resizeListeners.forEach(function(listener){listener(canvas.width,canvas.height)})},setCanvasSize:function(width,height,noUpdates){var canvas=Module[\"canvas\"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!=\"undefined\"){var flags=HEAPU32[SDL.screen>>2];flags=flags|8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module[\"canvas\"]);Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!=\"undefined\"){var flags=HEAPU32[SDL.screen>>2];flags=flags&~8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module[\"canvas\"]);Browser.updateResizeListeners()},updateCanvasDimensions:function(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module[\"forcedAspectRatio\"]&&Module[\"forcedAspectRatio\"]>0){if(w/h<Module[\"forcedAspectRatio\"]){w=Math.round(h*Module[\"forcedAspectRatio\"])}else{h=Math.round(w/Module[\"forcedAspectRatio\"])}}if((document[\"fullscreenElement\"]||document[\"mozFullScreenElement\"]||document[\"msFullscreenElement\"]||document[\"webkitFullscreenElement\"]||document[\"webkitCurrentFullScreenElement\"])===canvas.parentNode&&typeof screen!=\"undefined\"){var factor=Math.min(screen.width/w,screen.height/h);w=Math.round(w*factor);h=Math.round(h*factor)}if(Browser.resizeCanvas){if(canvas.width!=w)canvas.width=w;if(canvas.height!=h)canvas.height=h;if(typeof canvas.style!=\"undefined\"){canvas.style.removeProperty(\"width\");canvas.style.removeProperty(\"height\")}}else{if(canvas.width!=wNative)canvas.width=wNative;if(canvas.height!=hNative)canvas.height=hNative;if(typeof canvas.style!=\"undefined\"){if(w!=wNative||h!=hNative){canvas.style.setProperty(\"width\",w+\"px\",\"important\");canvas.style.setProperty(\"height\",h+\"px\",\"important\")}else{canvas.style.removeProperty(\"width\");canvas.style.removeProperty(\"height\")}}}}};function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback==\"function\"){callback(Module);continue}var func=callback.func;if(typeof func===\"number\"){if(callback.arg===undefined){wasmTable.get(func)()}else{wasmTable.get(func)(callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}function demangle(func){warnOnce(\"warning: build with  -s DEMANGLE_SUPPORT=1  to link in libcxxabi demangling\");return func}function demangleAll(text){var regex=/\\b_Z[\\w\\d_]+/g;return text.replace(regex,function(x){var y=demangle(x);return x===y?x:y+\" [\"+x+\"]\"})}function jsStackTrace(){var error=new Error;if(!error.stack){try{throw new Error}catch(e){error=e}if(!error.stack){return\"(no stack trace available)\"}}return error.stack.toString()}function stackTrace(){var js=jsStackTrace();if(Module[\"extraStackTrace\"])js+=\"\\n\"+Module[\"extraStackTrace\"]();return demangleAll(js)}function ___cxa_allocate_exception(size){return _malloc(size+16)+16}function _atexit(func,arg){}function ___cxa_atexit(a0,a1){return _atexit(a0,a1)}function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-16;this.set_type=function(type){HEAP32[this.ptr+4>>2]=type};this.get_type=function(){return HEAP32[this.ptr+4>>2]};this.set_destructor=function(destructor){HEAP32[this.ptr+8>>2]=destructor};this.get_destructor=function(){return HEAP32[this.ptr+8>>2]};this.set_refcount=function(refcount){HEAP32[this.ptr>>2]=refcount};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>0]=caught};this.get_caught=function(){return HEAP8[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return HEAP8[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_type(type);this.set_destructor(destructor);this.set_refcount(0);this.set_caught(false);this.set_rethrown(false)};this.add_ref=function(){var value=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=value+1};this.release_ref=function(){var prev=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=prev-1;assert(prev>0);return prev===1}}function CatchInfo(ptr){this.free=function(){_free(this.ptr);this.ptr=0};this.set_base_ptr=function(basePtr){HEAP32[this.ptr>>2]=basePtr};this.get_base_ptr=function(){return HEAP32[this.ptr>>2]};this.set_adjusted_ptr=function(adjustedPtr){HEAP32[this.ptr+4>>2]=adjustedPtr};this.get_adjusted_ptr_addr=function(){return this.ptr+4};this.get_adjusted_ptr=function(){return HEAP32[this.ptr+4>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_exception_info().get_type());if(isPointer){return HEAP32[this.get_base_ptr()>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.get_base_ptr()};this.get_exception_info=function(){return new ExceptionInfo(this.get_base_ptr())};if(ptr===undefined){this.ptr=_malloc(8);this.set_adjusted_ptr(0)}else{this.ptr=ptr}}var exceptionCaught=[];function exception_addRef(info){info.add_ref()}var uncaughtExceptionCount=0;function ___cxa_begin_catch(ptr){var catchInfo=new CatchInfo(ptr);var info=catchInfo.get_exception_info();if(!info.get_caught()){info.set_caught(true);uncaughtExceptionCount--}info.set_rethrown(false);exceptionCaught.push(catchInfo);exception_addRef(info);return catchInfo.get_exception_ptr()}var exceptionLast=0;function ___cxa_free_exception(ptr){try{return _free(new ExceptionInfo(ptr).ptr)}catch(e){err(\"exception during cxa_free_exception: \"+e)}}function exception_decRef(info){if(info.release_ref()&&!info.get_rethrown()){var destructor=info.get_destructor();if(destructor){wasmTable.get(destructor)(info.excPtr)}___cxa_free_exception(info.excPtr)}}function ___cxa_end_catch(){_setThrew(0);assert(exceptionCaught.length>0);var catchInfo=exceptionCaught.pop();exception_decRef(catchInfo.get_exception_info());catchInfo.free();exceptionLast=0}function ___resumeException(catchInfoPtr){var catchInfo=new CatchInfo(catchInfoPtr);var ptr=catchInfo.get_base_ptr();if(!exceptionLast){exceptionLast=ptr}catchInfo.free();throw ptr+\" - Exception catching is disabled, this exception cannot be caught. Compile with -s NO_DISABLE_EXCEPTION_CATCHING or -s EXCEPTION_CATCHING_ALLOWED=[..] to catch.\"}function ___cxa_find_matching_catch_2(){var thrown=exceptionLast;if(!thrown){setTempRet0(0);return 0|0}var info=new ExceptionInfo(thrown);var thrownType=info.get_type();var catchInfo=new CatchInfo;catchInfo.set_base_ptr(thrown);catchInfo.set_adjusted_ptr(thrown);if(!thrownType){setTempRet0(0);return catchInfo.ptr|0}var typeArray=Array.prototype.slice.call(arguments);for(var i=0;i<typeArray.length;i++){var caughtType=typeArray[i];if(caughtType===0||caughtType===thrownType){break}if(___cxa_can_catch(caughtType,thrownType,catchInfo.get_adjusted_ptr_addr())){setTempRet0(caughtType);return catchInfo.ptr|0}}setTempRet0(thrownType);return catchInfo.ptr|0}function ___cxa_find_matching_catch_3(){var thrown=exceptionLast;if(!thrown){setTempRet0(0);return 0|0}var info=new ExceptionInfo(thrown);var thrownType=info.get_type();var catchInfo=new CatchInfo;catchInfo.set_base_ptr(thrown);catchInfo.set_adjusted_ptr(thrown);if(!thrownType){setTempRet0(0);return catchInfo.ptr|0}var typeArray=Array.prototype.slice.call(arguments);for(var i=0;i<typeArray.length;i++){var caughtType=typeArray[i];if(caughtType===0||caughtType===thrownType){break}if(___cxa_can_catch(caughtType,thrownType,catchInfo.get_adjusted_ptr_addr())){setTempRet0(caughtType);return catchInfo.ptr|0}}setTempRet0(thrownType);return catchInfo.ptr|0}function ___cxa_rethrow(){var catchInfo=exceptionCaught.pop();if(!catchInfo){abort(\"no exception to throw\")}var info=catchInfo.get_exception_info();var ptr=catchInfo.get_base_ptr();if(!info.get_rethrown()){exceptionCaught.push(catchInfo);info.set_rethrown(true);info.set_caught(false);uncaughtExceptionCount++}else{catchInfo.free()}exceptionLast=ptr;throw ptr+\" - Exception catching is disabled, this exception cannot be caught. Compile with -s NO_DISABLE_EXCEPTION_CATCHING or -s EXCEPTION_CATCHING_ALLOWED=[..] to catch.\"}function ___cxa_thread_atexit(a0,a1){return _atexit(a0,a1)}function ___cxa_throw(ptr,type,destructor){var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;throw ptr+\" - Exception catching is disabled, this exception cannot be caught. Compile with -s NO_DISABLE_EXCEPTION_CATCHING or -s EXCEPTION_CATCHING_ALLOWED=[..] to catch.\"}function setErrNo(value){HEAP32[___errno_location()>>2]=value;return value}var PATH={splitPath:function(filename){var splitPathRe=/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:function(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:function(path){var isAbsolute=path.charAt(0)===\"/\",trailingSlash=path.substr(-1)===\"/\";path=PATH.normalizeArray(path.split(\"/\").filter(function(p){return!!p}),!isAbsolute).join(\"/\");if(!path&&!isAbsolute){path=\".\"}if(path&&trailingSlash){path+=\"/\"}return(isAbsolute?\"/\":\"\")+path},dirname:function(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:function(path){if(path===\"/\")return\"/\";path=PATH.normalize(path);path=path.replace(/\\/$/,\"\");var lastSlash=path.lastIndexOf(\"/\");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},extname:function(path){return PATH.splitPath(path)[3]},join:function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join(\"/\"))},join2:function(l,r){return PATH.normalize(l+\"/\"+r)}};function getRandomDevice(){if(typeof crypto===\"object\"&&typeof crypto[\"getRandomValues\"]===\"function\"){var randomBuffer=new Uint8Array(1);return function(){crypto.getRandomValues(randomBuffer);return randomBuffer[0]}}else if(ENVIRONMENT_IS_NODE){try{var crypto_module=require(\"crypto\");return function(){return crypto_module[\"randomBytes\"](1)[0]}}catch(e){}}return function(){abort(\"no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };\")}}var PATH_FS={resolve:function(){var resolvedPath=\"\",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[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.charAt(0)===\"/\"}resolvedPath=PATH.normalizeArray(resolvedPath.split(\"/\").filter(function(p){return!!p}),!resolvedAbsolute).join(\"/\");return(resolvedAbsolute?\"/\":\"\")+resolvedPath||\".\"},relative:function(from,to){from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start<arr.length;start++){if(arr[start]!==\"\")break}var end=arr.length-1;for(;end>=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<length;i++){if(fromParts[i]!==toParts[i]){samePartsLength=i;break}}var outputParts=[];for(var i=samePartsLength;i<fromParts.length;i++){outputParts.push(\"..\")}outputParts=outputParts.concat(toParts.slice(samePartsLength));return outputParts.join(\"/\")}};var TTY={ttys:[],init:function(){},shutdown:function(){},register:function(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)},stream_ops:{open:function(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43)}stream.tty=tty;stream.seekable=false},close:function(stream){stream.tty.ops.flush(stream.tty)},flush:function(stream){stream.tty.ops.flush(stream.tty)},read:function(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;i<length;i++){var result;try{result=stream.tty.ops.get_char(stream.tty)}catch(e){throw new FS.ErrnoError(29)}if(result===undefined&&bytesRead===0){throw new FS.ErrnoError(6)}if(result===null||result===undefined)break;bytesRead++;buffer[offset+i]=result}if(bytesRead){stream.node.timestamp=Date.now()}return bytesRead},write:function(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.put_char){throw new FS.ErrnoError(60)}try{for(var i=0;i<length;i++){stream.tty.ops.put_char(stream.tty,buffer[offset+i])}}catch(e){throw new FS.ErrnoError(29)}if(length){stream.node.timestamp=Date.now()}return i}},default_tty_ops:{get_char:function(tty){if(!tty.input.length){var result=null;if(ENVIRONMENT_IS_NODE){var BUFSIZE=256;var buf=Buffer.alloc(BUFSIZE);var bytesRead=0;try{bytesRead=nodeFS.readSync(process.stdin.fd,buf,0,BUFSIZE,null)}catch(e){if(e.toString().includes(\"EOF\"))bytesRead=0;else throw e}if(bytesRead>0){result=buf.slice(0,bytesRead).toString(\"utf-8\")}else{result=null}}else if(typeof window!=\"undefined\"&&typeof window.prompt==\"function\"){result=window.prompt(\"Input: \");if(result!==null){result+=\"\\n\"}}else if(typeof readline==\"function\"){result=readline();if(result!==null){result+=\"\\n\"}}if(!result){return null}tty.input=intArrayFromString(result,true)}return tty.input.shift()},put_char:function(tty,val){if(val===null||val===10){out(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}}},default_tty1_ops:{put_char:function(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};function zeroMemory(address,size){HEAPU8.fill(0,address,address+size)}function alignMemory(size,alignment){assert(alignment,\"alignment argument is required\");return Math.ceil(size/alignment)*alignment}function mmapAlloc(size){size=alignMemory(size,65536);var ptr=_memalign(65536,size);if(!ptr)return 0;zeroMemory(ptr,size);return ptr}var MEMFS={ops_table:null,mount:function(mount){return MEMFS.createNode(null,\"/\",16384|511,0)},createNode:function(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}if(!MEMFS.ops_table){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.timestamp=Date.now();if(parent){parent.contents[name]=node;parent.timestamp=node.timestamp}return node},getFileDataAsTypedArray:function(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:function(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<CAPACITY_DOUBLING_MAX?2:1.125)>>>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:function(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:function(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.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr},setattr:function(node,attr){if(attr.mode!==undefined){node.mode=attr.mode}if(attr.timestamp!==undefined){node.timestamp=attr.timestamp}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}},lookup:function(parent,name){throw FS.genericErrors[44]},mknod:function(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename:function(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55)}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp;old_node.parent=new_dir},unlink:function(parent,name){delete parent.contents[name];parent.timestamp=Date.now()},rmdir:function(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55)}delete parent.contents[name];parent.timestamp=Date.now()},readdir:function(node){var entries=[\".\",\"..\"];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue}entries.push(key)}return entries},symlink:function(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink:function(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read:function(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);assert(size>=0);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i<size;i++)buffer[offset+i]=contents[position+i]}return size},write:function(stream,buffer,offset,length,position,canOwn){assert(!(buffer instanceof ArrayBuffer));if(buffer.buffer===HEAP8.buffer){canOwn=false}if(!length)return 0;var node=stream.node;node.timestamp=Date.now();if(buffer.subarray&&(!node.contents||node.contents.subarray)){if(canOwn){assert(position===0,\"canOwn must imply no weird position inside the file\");node.contents=buffer.subarray(offset,offset+length);node.usedBytes=length;return length}else if(node.usedBytes===0&&position===0){node.contents=buffer.slice(offset,offset+length);node.usedBytes=length;return length}else if(position+length<=node.usedBytes){node.contents.set(buffer.subarray(offset,offset+length),position);return length}}MEMFS.expandFileStorage(node,position+length);if(node.contents.subarray&&buffer.subarray){node.contents.set(buffer.subarray(offset,offset+length),position)}else{for(var i=0;i<length;i++){node.contents[position+i]=buffer[offset+i]}}node.usedBytes=Math.max(node.usedBytes,position+length);return length},llseek:function(stream,offset,whence){var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){position+=stream.node.usedBytes}}if(position<0){throw new FS.ErrnoError(28)}return position},allocate:function(stream,offset,length){MEMFS.expandFileStorage(stream.node,offset+length);stream.node.usedBytes=Math.max(stream.node.usedBytes,offset+length)},mmap:function(stream,address,length,position,prot,flags){if(address!==0){throw new FS.ErrnoError(28)}if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}var ptr;var allocated;var contents=stream.node.contents;if(!(flags&2)&&contents.buffer===buffer){allocated=false;ptr=contents.byteOffset}else{if(position>0||position+length<contents.length){if(contents.subarray){contents=contents.subarray(position,position+length)}else{contents=Array.prototype.slice.call(contents,position,position+length)}}allocated=true;ptr=mmapAlloc(length);if(!ptr){throw new FS.ErrnoError(48)}HEAP8.set(contents,ptr)}return{ptr:ptr,allocated:allocated}},msync:function(stream,buffer,offset,length,mmapFlags){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}if(mmapFlags&2){return 0}var bytesWritten=MEMFS.stream_ops.write(stream,buffer,0,length,offset,false);return 0}}};function asyncLoad(url,onload,onerror,noRunDep){var dep=!noRunDep?getUniqueRunDependency(\"al \"+url):\"\";readAsync(url,function(arrayBuffer){assert(arrayBuffer,'Loading data file \"'+url+'\" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},function(event){if(onerror){onerror()}else{throw'Loading data file \"'+url+'\" failed.'}});if(dep)addRunDependency(dep)}var ERRNO_MESSAGES={0:\"Success\",1:\"Arg list too long\",2:\"Permission denied\",3:\"Address already in use\",4:\"Address not available\",5:\"Address family not supported by protocol family\",6:\"No more processes\",7:\"Socket already connected\",8:\"Bad file number\",9:\"Trying to read unreadable message\",10:\"Mount device busy\",11:\"Operation canceled\",12:\"No children\",13:\"Connection aborted\",14:\"Connection refused\",15:\"Connection reset by peer\",16:\"File locking deadlock error\",17:\"Destination address required\",18:\"Math arg out of domain of func\",19:\"Quota exceeded\",20:\"File exists\",21:\"Bad address\",22:\"File too large\",23:\"Host is unreachable\",24:\"Identifier removed\",25:\"Illegal byte sequence\",26:\"Connection already in progress\",27:\"Interrupted system call\",28:\"Invalid argument\",29:\"I/O error\",30:\"Socket is already connected\",31:\"Is a directory\",32:\"Too many symbolic links\",33:\"Too many open files\",34:\"Too many links\",35:\"Message too long\",36:\"Multihop attempted\",37:\"File or path name too long\",38:\"Network interface is not configured\",39:\"Connection reset by network\",40:\"Network is unreachable\",41:\"Too many open files in system\",42:\"No buffer space available\",43:\"No such device\",44:\"No such file or directory\",45:\"Exec format error\",46:\"No record locks available\",47:\"The link has been severed\",48:\"Not enough core\",49:\"No message of desired type\",50:\"Protocol not available\",51:\"No space left on device\",52:\"Function not implemented\",53:\"Socket is not connected\",54:\"Not a directory\",55:\"Directory not empty\",56:\"State not recoverable\",57:\"Socket operation on non-socket\",59:\"Not a typewriter\",60:\"No such device or address\",61:\"Value too large for defined data type\",62:\"Previous owner died\",63:\"Not super-user\",64:\"Broken pipe\",65:\"Protocol error\",66:\"Unknown protocol\",67:\"Protocol wrong type for socket\",68:\"Math result not representable\",69:\"Read only file system\",70:\"Illegal seek\",71:\"No such process\",72:\"Stale file handle\",73:\"Connection timed out\",74:\"Text file busy\",75:\"Cross-device link\",100:\"Device not a stream\",101:\"Bad font file fmt\",102:\"Invalid slot\",103:\"Invalid request code\",104:\"No anode\",105:\"Block device required\",106:\"Channel number out of range\",107:\"Level 3 halted\",108:\"Level 3 reset\",109:\"Link number out of range\",110:\"Protocol driver not attached\",111:\"No CSI structure available\",112:\"Level 2 halted\",113:\"Invalid exchange\",114:\"Invalid request descriptor\",115:\"Exchange full\",116:\"No data (for no delay io)\",117:\"Timer expired\",118:\"Out of streams resources\",119:\"Machine is not on the network\",120:\"Package not installed\",121:\"The object is remote\",122:\"Advertise error\",123:\"Srmount error\",124:\"Communication error on send\",125:\"Cross mount point (not really error)\",126:\"Given log. name not unique\",127:\"f.d. invalid for this operation\",128:\"Remote address changed\",129:\"Can   access a needed shared lib\",130:\"Accessing a corrupted shared lib\",131:\".lib section in a.out corrupted\",132:\"Attempting to link in too many libs\",133:\"Attempting to exec a shared library\",135:\"Streams pipe error\",136:\"Too many users\",137:\"Socket type not supported\",138:\"Not supported\",139:\"Protocol family not supported\",140:\"Can't send after socket shutdown\",141:\"Too many references\",142:\"Host is down\",148:\"No medium (in tape drive)\",156:\"Level 2 not synchronized\"};var ERRNO_CODES={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:\"/\",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(path,opts){path=PATH_FS.resolve(FS.cwd(),path);opts=opts||{};if(!path)return{path:\"\",node:null};var defaults={follow_mount:true,recurse_count:0};for(var key in defaults){if(opts[key]===undefined){opts[key]=defaults[key]}}if(opts.recurse_count>8){throw new FS.ErrnoError(32)}var parts=PATH.normalizeArray(path.split(\"/\").filter(function(p){return!!p}),false);var current=FS.root;var current_path=\"/\";for(var i=0;i<parts.length;i++){var islast=i===parts.length-1;if(islast&&opts.parent){break}current=FS.lookupNode(current,parts[i]);current_path=PATH.join2(current_path,parts[i]);if(FS.isMountpoint(current)){if(!islast||islast&&opts.follow_mount){current=current.mounted.root}}if(!islast||opts.follow){var count=0;while(FS.isLink(current.mode)){var link=FS.readlink(current_path);current_path=PATH_FS.resolve(PATH.dirname(current_path),link);var lookup=FS.lookupPath(current_path,{recurse_count:opts.recurse_count});current=lookup.node;if(count++>40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath:function(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!==\"/\"?mount+\"/\"+path:mount+path}path=path?node.name+\"/\"+path:node.name;node=node.parent}},hashName:function(parentid,name){var hash=0;for(var i=0;i<name.length;i++){hash=(hash<<5)-hash+name.charCodeAt(i)|0}return(parentid+hash>>>0)%FS.nameTable.length},hashAddNode:function(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode:function(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:function(parent,name){var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode,parent)}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:function(parent,name,mode,rdev){assert(typeof parent===\"object\");var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode:function(node){FS.hashRemoveNode(node)},isRoot:function(node){return node===node.parent},isMountpoint:function(node){return!!node.mounted},isFile:function(mode){return(mode&61440)===32768},isDir:function(mode){return(mode&61440)===16384},isLink:function(mode){return(mode&61440)===40960},isChrdev:function(mode){return(mode&61440)===8192},isBlkdev:function(mode){return(mode&61440)===24576},isFIFO:function(mode){return(mode&61440)===4096},isSocket:function(mode){return(mode&49152)===49152},flagModes:{\"r\":0,\"r+\":2,\"w\":577,\"w+\":578,\"a\":1089,\"a+\":1090},modeStringToFlags:function(str){var flags=FS.flagModes[str];if(typeof flags===\"undefined\"){throw new Error(\"Unknown file open mode: \"+str)}return flags},flagsToPermissionString:function(flag){var perms=[\"r\",\"w\",\"rw\"][flag&3];if(flag&512){perms+=\"w\"}return perms},nodePermissions:function(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:function(dir){var errCode=FS.nodePermissions(dir,\"x\");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate:function(dir,name){try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,\"wx\")},mayDelete:function(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:function(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){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd:function(fd_start,fd_end){fd_start=fd_start||0;fd_end=fd_end||FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStream:function(fd){return FS.streams[fd]},createStream:function(stream,fd_start,fd_end){if(!FS.FSStream){FS.FSStream=function(){};FS.FSStream.prototype={object:{get:function(){return this.node},set:function(val){this.node=val}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}}}}var newStream=new FS.FSStream;for(var p in stream){newStream[p]=stream[p]}stream=newStream;var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream:function(fd){FS.streams[fd]=null},chrdev_stream_ops:{open:function(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek:function(){throw new FS.ErrnoError(70)}},major:function(dev){return dev>>8},minor:function(dev){return dev&255},makedev:function(ma,mi){return ma<<8|mi},registerDevice:function(dev,ops){FS.devices[dev]={stream_ops:ops}},getDevice:function(dev){return FS.devices[dev]},getMounts:function(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs:function(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){assert(FS.syncFSRequests>0);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(function(mount){if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount:function(type,opts,mountpoint){if(typeof type===\"string\"){throw type}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:type,opts:opts,mountpoint: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:function(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(function(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);assert(idx!==-1);node.mount.mounts.splice(idx,1)},lookup:function(parent,name){return parent.node_ops.lookup(parent,name)},mknod:function(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name===\".\"||name===\"..\"){throw new FS.ErrnoError(28)}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)},create:function(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir:function(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree:function(path,mode){var dirs=path.split(\"/\");var d=\"\";for(var i=0;i<dirs.length;++i){if(!dirs[i])continue;d+=\"/\"+dirs[i];try{FS.mkdir(d,mode)}catch(e){if(e.errno!=20)throw e}}},mkdev:function(path,mode,dev){if(typeof dev===\"undefined\"){dev=mode;mode=438}mode|=8192;return FS.mknod(path,mode,dev)},symlink:function(oldpath,newpath){if(!PATH_FS.resolve(oldpath)){throw new FS.ErrnoError(44)}var lookup=FS.lookupPath(newpath,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var newname=PATH.basename(newpath);var errCode=FS.mayCreate(parent,newname);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.symlink){throw new FS.ErrnoError(63)}return parent.node_ops.symlink(parent,newname,oldpath)},rename:function(old_path,new_path){var old_dirname=PATH.dirname(old_path);var new_dirname=PATH.dirname(new_path);var old_name=PATH.basename(old_path);var new_name=PATH.basename(new_path);var lookup,old_dir,new_dir;lookup=FS.lookupPath(old_path,{parent:true});old_dir=lookup.node;lookup=FS.lookupPath(new_path,{parent:true});new_dir=lookup.node;if(!old_dir||!new_dir)throw new FS.ErrnoError(44);if(old_dir.mount!==new_dir.mount){throw new FS.ErrnoError(75)}var old_node=FS.lookupNode(old_dir,old_name);var relative=PATH_FS.relative(old_path,new_dirname);if(relative.charAt(0)!==\".\"){throw new FS.ErrnoError(28)}relative=PATH_FS.relative(new_path,old_dirname);if(relative.charAt(0)!==\".\"){throw new FS.ErrnoError(55)}var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(old_node===new_node){return}var isdir=FS.isDir(old_node.mode);var errCode=FS.mayDelete(old_dir,old_name,isdir);if(errCode){throw new FS.ErrnoError(errCode)}errCode=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name);if(errCode){throw new FS.ErrnoError(errCode)}if(!old_dir.node_ops.rename){throw new FS.ErrnoError(63)}if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node)){throw new FS.ErrnoError(10)}if(new_dir!==old_dir){errCode=FS.nodePermissions(old_dir,\"w\");if(errCode){throw new FS.ErrnoError(errCode)}}try{if(FS.trackingDelegate[\"willMovePath\"]){FS.trackingDelegate[\"willMovePath\"](old_path,new_path)}}catch(e){err(\"FS.trackingDelegate['willMovePath']('\"+old_path+\"', '\"+new_path+\"') threw an exception: \"+e.message)}FS.hashRemoveNode(old_node);try{old_dir.node_ops.rename(old_node,new_dir,new_name)}catch(e){throw e}finally{FS.hashAddNode(old_node)}try{if(FS.trackingDelegate[\"onMovePath\"])FS.trackingDelegate[\"onMovePath\"](old_path,new_path)}catch(e){err(\"FS.trackingDelegate['onMovePath']('\"+old_path+\"', '\"+new_path+\"') threw an exception: \"+e.message)}},rmdir:function(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,true);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.rmdir){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}try{if(FS.trackingDelegate[\"willDeletePath\"]){FS.trackingDelegate[\"willDeletePath\"](path)}}catch(e){err(\"FS.trackingDelegate['willDeletePath']('\"+path+\"') threw an exception: \"+e.message)}parent.node_ops.rmdir(parent,name);FS.destroyNode(node);try{if(FS.trackingDelegate[\"onDeletePath\"])FS.trackingDelegate[\"onDeletePath\"](path)}catch(e){err(\"FS.trackingDelegate['onDeletePath']('\"+path+\"') threw an exception: \"+e.message)}},readdir:function(path){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node.node_ops.readdir){throw new FS.ErrnoError(54)}return node.node_ops.readdir(node)},unlink:function(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,false);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.unlink){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}try{if(FS.trackingDelegate[\"willDeletePath\"]){FS.trackingDelegate[\"willDeletePath\"](path)}}catch(e){err(\"FS.trackingDelegate['willDeletePath']('\"+path+\"') threw an exception: \"+e.message)}parent.node_ops.unlink(parent,name);FS.destroyNode(node);try{if(FS.trackingDelegate[\"onDeletePath\"])FS.trackingDelegate[\"onDeletePath\"](path)}catch(e){err(\"FS.trackingDelegate['onDeletePath']('\"+path+\"') threw an exception: \"+e.message)}},readlink:function(path){var lookup=FS.lookupPath(path);var link=lookup.node;if(!link){throw new FS.ErrnoError(44)}if(!link.node_ops.readlink){throw new FS.ErrnoError(28)}return PATH_FS.resolve(FS.getPath(link.parent),link.node_ops.readlink(link))},stat:function(path,dontFollow){var lookup=FS.lookupPath(path,{follow:!dontFollow});var node=lookup.node;if(!node){throw new FS.ErrnoError(44)}if(!node.node_ops.getattr){throw new FS.ErrnoError(63)}return node.node_ops.getattr(node)},lstat:function(path){return FS.stat(path,true)},chmod:function(path,mode,dontFollow){var node;if(typeof path===\"string\"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{mode:mode&4095|node.mode&~4095,timestamp:Date.now()})},lchmod:function(path,mode){FS.chmod(path,mode,true)},fchmod:function(fd,mode){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chmod(stream.node,mode)},chown:function(path,uid,gid,dontFollow){var node;if(typeof path===\"string\"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{timestamp:Date.now()})},lchown:function(path,uid,gid){FS.chown(path,uid,gid,true)},fchown:function(fd,uid,gid){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chown(stream.node,uid,gid)},truncate:function(path,len){if(len<0){throw new FS.ErrnoError(28)}var node;if(typeof path===\"string\"){var lookup=FS.lookupPath(path,{follow:true});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}if(FS.isDir(node.mode)){throw new FS.ErrnoError(31)}if(!FS.isFile(node.mode)){throw new FS.ErrnoError(28)}var errCode=FS.nodePermissions(node,\"w\");if(errCode){throw new FS.ErrnoError(errCode)}node.node_ops.setattr(node,{size:len,timestamp:Date.now()})},ftruncate:function(fd,len){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(28)}FS.truncate(stream.node,len)},utime:function(path,atime,mtime){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;node.node_ops.setattr(node,{timestamp:Math.max(atime,mtime)})},open:function(path,flags,mode,fd_start,fd_end){if(path===\"\"){throw new FS.ErrnoError(44)}flags=typeof flags===\"string\"?FS.modeStringToFlags(flags):flags;mode=typeof mode===\"undefined\"?438:mode;if(flags&64){mode=mode&4095|32768}else{mode=0}var node;if(typeof path===\"object\"){node=path}else{path=PATH.normalize(path);try{var lookup=FS.lookupPath(path,{follow:!(flags&131072)});node=lookup.node}catch(e){}}var created=false;if(flags&64){if(node){if(flags&128){throw new FS.ErrnoError(20)}}else{node=FS.mknod(path,mode,0);created=true}}if(!node){throw new FS.ErrnoError(44)}if(FS.isChrdev(node.mode)){flags&=~512}if(flags&65536&&!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}if(!created){var errCode=FS.mayOpen(node,flags);if(errCode){throw new FS.ErrnoError(errCode)}}if(flags&512){FS.truncate(node,0)}flags&=~(128|512|131072);var stream=FS.createStream({node:node,path:FS.getPath(node),flags:flags,seekable:true,position:0,stream_ops:node.stream_ops,ungotten:[],error:false},fd_start,fd_end);if(stream.stream_ops.open){stream.stream_ops.open(stream)}if(Module[\"logReadFiles\"]&&!(flags&1)){if(!FS.readFiles)FS.readFiles={};if(!(path in FS.readFiles)){FS.readFiles[path]=1;err(\"FS.trackingDelegate error on read file: \"+path)}}try{if(FS.trackingDelegate[\"onOpenFile\"]){var trackingFlags=0;if((flags&2097155)!==1){trackingFlags|=FS.tracking.openFlags.READ}if((flags&2097155)!==0){trackingFlags|=FS.tracking.openFlags.WRITE}FS.trackingDelegate[\"onOpenFile\"](path,trackingFlags)}}catch(e){err(\"FS.trackingDelegate['onOpenFile']('\"+path+\"', flags) threw an exception: \"+e.message)}return stream},close:function(stream){if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(stream.getdents)stream.getdents=null;try{if(stream.stream_ops.close){stream.stream_ops.close(stream)}}catch(e){throw e}finally{FS.closeStream(stream.fd)}stream.fd=null},isClosed:function(stream){return stream.fd===null},llseek:function(stream,offset,whence){if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(!stream.seekable||!stream.stream_ops.llseek){throw new FS.ErrnoError(70)}if(whence!=0&&whence!=1&&whence!=2){throw new FS.ErrnoError(28)}stream.position=stream.stream_ops.llseek(stream,offset,whence);stream.ungotten=[];return stream.position},read:function(stream,buffer,offset,length,position){if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.read){throw new FS.ErrnoError(28)}var seeking=typeof position!==\"undefined\";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead},write:function(stream,buffer,offset,length,position,canOwn){if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.write){throw new FS.ErrnoError(28)}if(stream.seekable&&stream.flags&1024){FS.llseek(stream,0,2)}var seeking=typeof position!==\"undefined\";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;try{if(stream.path&&FS.trackingDelegate[\"onWriteToFile\"])FS.trackingDelegate[\"onWriteToFile\"](stream.path)}catch(e){err(\"FS.trackingDelegate['onWriteToFile']('\"+stream.path+\"') threw an exception: \"+e.message)}return bytesWritten},allocate:function(stream,offset,length){if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(offset<0||length<=0){throw new FS.ErrnoError(28)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(!FS.isFile(stream.node.mode)&&!FS.isDir(stream.node.mode)){throw new FS.ErrnoError(43)}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(138)}stream.stream_ops.allocate(stream,offset,length)},mmap:function(stream,address,length,position,prot,flags){if((prot&2)!==0&&(flags&2)===0&&(stream.flags&2097155)!==2){throw new FS.ErrnoError(2)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(2)}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(43)}return stream.stream_ops.mmap(stream,address,length,position,prot,flags)},msync:function(stream,buffer,offset,length,mmapFlags){if(!stream||!stream.stream_ops.msync){return 0}return stream.stream_ops.msync(stream,buffer,offset,length,mmapFlags)},munmap:function(stream){return 0},ioctl:function(stream,cmd,arg){if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(59)}return stream.stream_ops.ioctl(stream,cmd,arg)},readFile:function(path,opts){opts=opts||{};opts.flags=opts.flags||0;opts.encoding=opts.encoding||\"binary\";if(opts.encoding!==\"utf8\"&&opts.encoding!==\"binary\"){throw new Error('Invalid encoding type \"'+opts.encoding+'\"')}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding===\"utf8\"){ret=UTF8ArrayToString(buf,0)}else if(opts.encoding===\"binary\"){ret=buf}FS.close(stream);return ret},writeFile:function(path,data,opts){opts=opts||{};opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);if(typeof data===\"string\"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,undefined,opts.canOwn)}else if(ArrayBuffer.isView(data)){FS.write(stream,data,0,data.byteLength,undefined,opts.canOwn)}else{throw new Error(\"Unsupported data type\")}FS.close(stream)},cwd:function(){return FS.currentPath},chdir:function(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:function(){FS.mkdir(\"/tmp\");FS.mkdir(\"/home\");FS.mkdir(\"/home/web_user\")},createDefaultDevices:function(){FS.mkdir(\"/dev\");FS.registerDevice(FS.makedev(1,3),{read:function(){return 0},write:function(stream,buffer,offset,length,pos){return length}});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 random_device=getRandomDevice();FS.createDevice(\"/dev\",\"random\",random_device);FS.createDevice(\"/dev\",\"urandom\",random_device);FS.mkdir(\"/dev/shm\");FS.mkdir(\"/dev/shm/tmp\")},createSpecialDirectories:function(){FS.mkdir(\"/proc\");var proc_self=FS.mkdir(\"/proc/self\");FS.mkdir(\"/proc/self/fd\");FS.mount({mount:function(){var node=FS.createNode(proc_self,\"fd\",16384|511,73);node.node_ops={lookup:function(parent,name){var fd=+name;var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);var ret={parent:null,mount:{mountpoint:\"fake\"},node_ops:{readlink:function(){return stream.path}}};ret.parent=ret;return ret}};return node}},{},\"/proc/self/fd\")},createStandardStreams:function(){if(Module[\"stdin\"]){FS.createDevice(\"/dev\",\"stdin\",Module[\"stdin\"])}else{FS.symlink(\"/dev/tty\",\"/dev/stdin\")}if(Module[\"stdout\"]){FS.createDevice(\"/dev\",\"stdout\",null,Module[\"stdout\"])}else{FS.symlink(\"/dev/tty\",\"/dev/stdout\")}if(Module[\"stderr\"]){FS.createDevice(\"/dev\",\"stderr\",null,Module[\"stderr\"])}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);assert(stdin.fd===0,\"invalid handle for stdin (\"+stdin.fd+\")\");assert(stdout.fd===1,\"invalid handle for stdout (\"+stdout.fd+\")\");assert(stderr.fd===2,\"invalid handle for stderr (\"+stderr.fd+\")\")},ensureErrnoError:function(){if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.node=node;this.setErrno=function(errno){this.errno=errno;for(var key in ERRNO_CODES){if(ERRNO_CODES[key]===errno){this.code=key;break}}};this.setErrno(errno);this.message=ERRNO_MESSAGES[errno];if(this.stack){Object.defineProperty(this,\"stack\",{value:(new Error).stack,writable:true});this.stack=demangleAll(this.stack)}};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[44].forEach(function(code){FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=\"<generic error, no stack>\"})},staticInit:function(){FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},\"/\");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={\"MEMFS\":MEMFS}},init:function(input,output,error){assert(!FS.init.initialized,\"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)\");FS.init.initialized=true;FS.ensureErrnoError();Module[\"stdin\"]=input||Module[\"stdin\"];Module[\"stdout\"]=output||Module[\"stdout\"];Module[\"stderr\"]=error||Module[\"stderr\"];FS.createStandardStreams()},quit:function(){FS.init.initialized=false;var fflush=Module[\"_fflush\"];if(fflush)fflush(0);for(var i=0;i<FS.streams.length;i++){var stream=FS.streams[i];if(!stream){continue}FS.close(stream)}},getMode:function(canRead,canWrite){var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode},findObject:function(path,dontResolveLastLink){var ret=FS.analyzePath(path,dontResolveLastLink);if(ret.exists){return ret.object}else{return null}},analyzePath:function(path,dontResolveLastLink){try{var lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});path=lookup.path}catch(e){}var ret={isRoot:false,exists:false,error:0,name:null,path:null,object:null,parentExists:false,parentPath:null,parentObject:null};try{var lookup=FS.lookupPath(path,{parent:true});ret.parentExists=true;ret.parentPath=lookup.path;ret.parentObject=lookup.node;ret.name=PATH.basename(path);lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});ret.exists=true;ret.path=lookup.path;ret.object=lookup.node;ret.name=lookup.node.name;ret.isRoot=lookup.path===\"/\"}catch(e){ret.error=e.errno}return ret},createPath:function(parent,path,canRead,canWrite){parent=typeof parent===\"string\"?parent:FS.getPath(parent);var parts=path.split(\"/\").reverse();while(parts.length){var part=parts.pop();if(!part)continue;var current=PATH.join2(parent,part);try{FS.mkdir(current)}catch(e){}parent=current}return current},createFile:function(parent,name,properties,canRead,canWrite){var path=PATH.join2(typeof parent===\"string\"?parent:FS.getPath(parent),name);var mode=FS.getMode(canRead,canWrite);return FS.create(path,mode)},createDataFile:function(parent,name,data,canRead,canWrite,canOwn){var path=name?PATH.join2(typeof parent===\"string\"?parent:FS.getPath(parent),name):parent;var mode=FS.getMode(canRead,canWrite);var node=FS.create(path,mode);if(data){if(typeof data===\"string\"){var arr=new Array(data.length);for(var i=0,len=data.length;i<len;++i)arr[i]=data.charCodeAt(i);data=arr}FS.chmod(node,mode|146);var stream=FS.open(node,577);FS.write(stream,data,0,data.length,0,canOwn);FS.close(stream);FS.chmod(node,mode)}return node},createDevice:function(parent,name,input,output){var path=PATH.join2(typeof parent===\"string\"?parent:FS.getPath(parent),name);var mode=FS.getMode(!!input,!!output);if(!FS.createDevice.major)FS.createDevice.major=64;var dev=FS.makedev(FS.createDevice.major++,0);FS.registerDevice(dev,{open:function(stream){stream.seekable=false},close:function(stream){if(output&&output.buffer&&output.buffer.length){output(10)}},read:function(stream,buffer,offset,length,pos){var bytesRead=0;for(var i=0;i<length;i++){var result;try{result=input()}catch(e){throw new FS.ErrnoError(29)}if(result===undefined&&bytesRead===0){throw new FS.ErrnoError(6)}if(result===null||result===undefined)break;bytesRead++;buffer[offset+i]=result}if(bytesRead){stream.node.timestamp=Date.now()}return bytesRead},write:function(stream,buffer,offset,length,pos){for(var i=0;i<length;i++){try{output(buffer[offset+i])}catch(e){throw new FS.ErrnoError(29)}}if(length){stream.node.timestamp=Date.now()}return i}});return FS.mkdev(path,mode,dev)},forceLoadFile:function(obj){if(obj.isDevice||obj.isFolder||obj.link||obj.contents)return true;if(typeof XMLHttpRequest!==\"undefined\"){throw new Error(\"Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.\")}else if(read_){try{obj.contents=intArrayFromString(read_(obj.url),true);obj.usedBytes=obj.contents.length}catch(e){throw new FS.ErrnoError(29)}}else{throw new Error(\"Cannot load without read() or XMLHttpRequest.\")}},createLazyFile:function(parent,name,url,canRead,canWrite){function LazyUint8Array(){this.lengthKnown=false;this.chunks=[]}LazyUint8Array.prototype.get=function LazyUint8Array_get(idx){if(idx>this.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_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=function(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);if(typeof Uint8Array!=\"undefined\")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||[])}else{return intArrayFromString(xhr.responseText||\"\",true)}};var lazyArray=this;lazyArray.setDataGetter(function(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};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;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url: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(function(key){var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments)}});stream_ops.read=function stream_ops_read(stream,buffer,offset,length,position){FS.forceLoadFile(node);var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);assert(size>=0);if(contents.slice){for(var i=0;i<size;i++){buffer[offset+i]=contents[position+i]}}else{for(var i=0;i<size;i++){buffer[offset+i]=contents.get(position+i)}}return size};node.stream_ops=stream_ops;return node},createPreloadedFile:function(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn,preFinish){Browser.init();var fullname=name?PATH_FS.resolve(PATH.join2(parent,name)):parent;var dep=getUniqueRunDependency(\"cp \"+fullname);function processData(byteArray){function finish(byteArray){if(preFinish)preFinish();if(!dontCreateFile){FS.createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}if(onload)onload();removeRunDependency(dep)}var handled=false;Module[\"preloadPlugins\"].forEach(function(plugin){if(handled)return;if(plugin[\"canHandle\"](fullname)){plugin[\"handle\"](byteArray,fullname,finish,function(){if(onerror)onerror();removeRunDependency(dep)});handled=true}});if(!handled)finish(byteArray)}addRunDependency(dep);if(typeof url==\"string\"){asyncLoad(url,function(byteArray){processData(byteArray)},onerror)}else{processData(url)}},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return\"EM_FS_\"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:\"FILE_DATA\",saveFilesToDB:function(paths,onload,onerror){onload=onload||function(){};onerror=onerror||function(){};var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=function openRequest_onupgradeneeded(){out(\"creating db\");var db=openRequest.result;db.createObjectStore(FS.DB_STORE_NAME)};openRequest.onsuccess=function openRequest_onsuccess(){var db=openRequest.result;var transaction=db.transaction([FS.DB_STORE_NAME],\"readwrite\");var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach(function(path){var putRequest=files.put(FS.analyzePath(path).object.contents,path);putRequest.onsuccess=function putRequest_onsuccess(){ok++;if(ok+fail==total)finish()};putRequest.onerror=function putRequest_onerror(){fail++;if(ok+fail==total)finish()}});transaction.onerror=onerror};openRequest.onerror=onerror},loadFilesFromDB:function(paths,onload,onerror){onload=onload||function(){};onerror=onerror||function(){};var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=onerror;openRequest.onsuccess=function openRequest_onsuccess(){var db=openRequest.result;try{var transaction=db.transaction([FS.DB_STORE_NAME],\"readonly\")}catch(e){onerror(e);return}var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach(function(path){var getRequest=files.get(path);getRequest.onsuccess=function getRequest_onsuccess(){if(FS.analyzePath(path).exists){FS.unlink(path)}FS.createDataFile(PATH.dirname(path),PATH.basename(path),getRequest.result,true,true,true);ok++;if(ok+fail==total)finish()};getRequest.onerror=function getRequest_onerror(){fail++;if(ok+fail==total)finish()}});transaction.onerror=onerror};openRequest.onerror=onerror},absolutePath:function(){abort(\"FS.absolutePath has been removed; use PATH_FS.resolve instead\")},createFolder:function(){abort(\"FS.createFolder has been removed; use FS.mkdir instead\")},createLink:function(){abort(\"FS.createLink has been removed; use FS.symlink instead\")},joinPath:function(){abort(\"FS.joinPath has been removed; use PATH.join instead\")},mmapAlloc:function(){abort(\"FS.mmapAlloc has been replaced by the top level function mmapAlloc\")},standardizePath:function(){abort(\"FS.standardizePath has been removed; use PATH.normalize instead\")}};var SYSCALLS={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(dirfd,path,allowEmpty){if(path[0]===\"/\"){return path}var dir;if(dirfd===-100){dir=FS.cwd()}else{var dirstream=FS.getStream(dirfd);if(!dirstream)throw new FS.ErrnoError(8);dir=dirstream.path}if(path.length==0){if(!allowEmpty){throw new FS.ErrnoError(44)}return dir}return PATH.join2(dir,path)},doStat:function(func,path,buf){try{var stat=func(path)}catch(e){if(e&&e.node&&PATH.normalize(path)!==PATH.normalize(FS.getPath(e.node))){return-54}throw e}HEAP32[buf>>2]=stat.dev;HEAP32[buf+4>>2]=0;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAP32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;HEAP32[buf+32>>2]=0;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAP32[buf+48>>2]=4096;HEAP32[buf+52>>2]=stat.blocks;HEAP32[buf+56>>2]=stat.atime.getTime()/1e3|0;HEAP32[buf+60>>2]=0;HEAP32[buf+64>>2]=stat.mtime.getTime()/1e3|0;HEAP32[buf+68>>2]=0;HEAP32[buf+72>>2]=stat.ctime.getTime()/1e3|0;HEAP32[buf+76>>2]=0;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+80>>2]=tempI64[0],HEAP32[buf+84>>2]=tempI64[1];return 0},doMsync:function(addr,stream,len,flags,offset){var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},doMkdir:function(path,mode){path=PATH.normalize(path);if(path[path.length-1]===\"/\")path=path.substr(0,path.length-1);FS.mkdir(path,mode,0);return 0},doMknod:function(path,mode,dev){switch(mode&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}FS.mknod(path,mode,dev);return 0},doReadlink:function(path,buf,bufsize){if(bufsize<=0)return-28;var ret=FS.readlink(path);var len=Math.min(bufsize,lengthBytesUTF8(ret));var endChar=HEAP8[buf+len];stringToUTF8(ret,buf,bufsize+1);HEAP8[buf+len]=endChar;return len},doAccess:function(path,amode){if(amode&~7){return-28}var node;var lookup=FS.lookupPath(path,{follow:true});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},doDup:function(path,flags,suggestFD){var suggest=FS.getStream(suggestFD);if(suggest)FS.close(suggest);return FS.open(path,flags,0,suggestFD,suggestFD).fd},doReadv:function(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i<iovcnt;i++){var ptr=HEAP32[iov+i*8>>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr<len)break}return ret},doWritev:function(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i<iovcnt;i++){var ptr=HEAP32[iov+i*8>>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr}return ret},varargs:undefined,get:function(){assert(SYSCALLS.varargs!=undefined);SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret},getStreamFromFD:function(fd){var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);return stream},get64:function(low,high){if(low>=0)assert(high===0);else assert(high===-1);return low}};function ___sys_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-28}var newStream;newStream=FS.open(stream.path,stream.flags,0,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0}case 12:{var arg=SYSCALLS.get();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 13:case 14:return 0;case 16:case 8:return-28;case 9:setErrNo(28);return-1;default:{return-28}}}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(op){case 21509:case 21505:{if(!stream.tty)return-59;return 0}case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:{if(!stream.tty)return-59;return 0}case 21519:{if(!stream.tty)return-59;var argp=SYSCALLS.get();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-59;return-28}case 21531:{var argp=SYSCALLS.get();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-59;return 0}case 21524:{if(!stream.tty)return-59;return 0}default:abort(\"bad ioctl syscall \"+op)}}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function syscallMmap2(addr,len,prot,flags,fd,off){off<<=12;var ptr;var allocated=false;if((flags&16)!==0&&addr%65536!==0){return-28}if((flags&32)!==0){ptr=mmapAlloc(len);if(!ptr)return-48;allocated=true}else{var info=FS.getStream(fd);if(!info)return-8;var res=FS.mmap(info,addr,len,off,prot,flags);ptr=res.ptr;allocated=res.allocated}SYSCALLS.mappings[ptr]={malloc:ptr,len:len,allocated:allocated,fd:fd,prot:prot,flags:flags,offset:off};return ptr}function ___sys_mmap2(addr,len,prot,flags,fd,off){try{return syscallMmap2(addr,len,prot,flags,fd,off)}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_open(path,flags,varargs){SYSCALLS.varargs=varargs;try{var pathname=SYSCALLS.getStr(path);var mode=varargs?SYSCALLS.get():0;var stream=FS.open(pathname,flags,mode);return stream.fd}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_stat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.stat,path,buf)}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}var char_0=48;var char_9=57;function makeLegalFunctionName(name){if(undefined===name){return\"_unknown\"}name=name.replace(/[^a-zA-Z0-9_]/g,\"$\");var f=name.charCodeAt(0);if(f>=char_0&&f<=char_9){return\"_\"+name}else{return name}}function createNamedFunction(name,body){name=makeLegalFunctionName(name);return new Function(\"body\",\"return function \"+name+\"() {\\n\"+'    \"use strict\";'+\"    return body.apply(this, arguments);\\n\"+\"};\\n\")(body)}var emval_free_list=[];var emval_handle_array=[{},{value:undefined},{value:null},{value:true},{value:false}];function count_emval_handles(){var count=0;for(var i=5;i<emval_handle_array.length;++i){if(emval_handle_array[i]!==undefined){++count}}return count}function get_first_emval(){for(var i=5;i<emval_handle_array.length;++i){if(emval_handle_array[i]!==undefined){return emval_handle_array[i]}}return null}function init_emval(){Module[\"count_emval_handles\"]=count_emval_handles;Module[\"get_first_emval\"]=get_first_emval}function __emval_register(value){switch(value){case undefined:{return 1}case null:{return 2}case true:{return 3}case false:{return 4}default:{var handle=emval_free_list.length?emval_free_list.pop():emval_handle_array.length;emval_handle_array[handle]={refcount:1,value:value};return handle}}}function extendError(baseErrorType,errorName){var errorClass=createNamedFunction(errorName,function(message){this.name=errorName;this.message=message;var stack=new Error(message).stack;if(stack!==undefined){this.stack=this.toString()+\"\\n\"+stack.replace(/^Error(:[^\\n]*)?\\n/,\"\")}});errorClass.prototype=Object.create(baseErrorType.prototype);errorClass.prototype.constructor=errorClass;errorClass.prototype.toString=function(){if(this.message===undefined){return this.name}else{return this.name+\": \"+this.message}};return errorClass}var PureVirtualError=undefined;function embind_init_charCodes(){var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes}var embind_charCodes=undefined;function readLatin1String(ptr){var ret=\"\";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret}function getInheritedInstanceCount(){return Object.keys(registeredInstances).length}function getLiveInheritedInstances(){var rv=[];for(var k in registeredInstances){if(registeredInstances.hasOwnProperty(k)){rv.push(registeredInstances[k])}}return rv}var deletionQueue=[];function flushPendingDeletes(){while(deletionQueue.length){var obj=deletionQueue.pop();obj.$$.deleteScheduled=false;obj[\"delete\"]()}}var delayFunction=undefined;function setDelayFunction(fn){delayFunction=fn;if(deletionQueue.length&&delayFunction){delayFunction(flushPendingDeletes)}}function init_embind(){Module[\"getInheritedInstanceCount\"]=getInheritedInstanceCount;Module[\"getLiveInheritedInstances\"]=getLiveInheritedInstances;Module[\"flushPendingDeletes\"]=flushPendingDeletes;Module[\"setDelayFunction\"]=setDelayFunction}var registeredInstances={};var BindingError=undefined;function throwBindingError(message){throw new BindingError(message)}function getBasestPointer(class_,ptr){if(ptr===undefined){throwBindingError(\"ptr should not be undefined\")}while(class_.baseClass){ptr=class_.upcast(ptr);class_=class_.baseClass}return ptr}function registerInheritedInstance(class_,ptr,instance){ptr=getBasestPointer(class_,ptr);if(registeredInstances.hasOwnProperty(ptr)){throwBindingError(\"Tried to register registered instance: \"+ptr)}else{registeredInstances[ptr]=instance}}function requireHandle(handle){if(!handle){throwBindingError(\"Cannot use deleted val. handle = \"+handle)}return emval_handle_array[handle].value}var registeredTypes={};function getTypeName(type){var ptr=___getTypeName(type);var rv=readLatin1String(ptr);_free(ptr);return rv}function requireRegisteredType(rawType,humanName){var impl=registeredTypes[rawType];if(undefined===impl){throwBindingError(humanName+\" has unknown type \"+getTypeName(rawType))}return impl}function unregisterInheritedInstance(class_,ptr){ptr=getBasestPointer(class_,ptr);if(registeredInstances.hasOwnProperty(ptr)){delete registeredInstances[ptr]}else{throwBindingError(\"Tried to unregister unregistered instance: \"+ptr)}}function detachFinalizer(handle){}var finalizationGroup=false;function runDestructor($$){if($$.smartPtr){$$.smartPtrType.rawDestructor($$.smartPtr)}else{$$.ptrType.registeredClass.rawDestructor($$.ptr)}}function releaseClassHandle($$){$$.count.value-=1;var toDelete=0===$$.count.value;if(toDelete){runDestructor($$)}}function attachFinalizer(handle){if(\"undefined\"===typeof FinalizationGroup){attachFinalizer=function(handle){return handle};return handle}finalizationGroup=new FinalizationGroup(function(iter){for(var result=iter.next();!result.done;result=iter.next()){var $$=result.value;if(!$$.ptr){console.warn(\"object already deleted: \"+$$.ptr)}else{releaseClassHandle($$)}}});attachFinalizer=function(handle){finalizationGroup.register(handle,handle.$$,handle.$$);return handle};detachFinalizer=function(handle){finalizationGroup.unregister(handle.$$)};return attachFinalizer(handle)}function __embind_create_inheriting_constructor(constructorName,wrapperType,properties){constructorName=readLatin1String(constructorName);wrapperType=requireRegisteredType(wrapperType,\"wrapper\");properties=requireHandle(properties);var arraySlice=[].slice;var registeredClass=wrapperType.registeredClass;var wrapperPrototype=registeredClass.instancePrototype;var baseClass=registeredClass.baseClass;var baseClassPrototype=baseClass.instancePrototype;var baseConstructor=registeredClass.baseClass.constructor;var ctor=createNamedFunction(constructorName,function(){registeredClass.baseClass.pureVirtualFunctions.forEach(function(name){if(this[name]===baseClassPrototype[name]){throw new PureVirtualError(\"Pure virtual function \"+name+\" must be implemented in JavaScript\")}}.bind(this));Object.defineProperty(this,\"__parent\",{value:wrapperPrototype});this[\"__construct\"].apply(this,arraySlice.call(arguments))});wrapperPrototype[\"__construct\"]=function __construct(){if(this===wrapperPrototype){throwBindingError(\"Pass correct 'this' to __construct\")}var inner=baseConstructor[\"implement\"].apply(undefined,[this].concat(arraySlice.call(arguments)));detachFinalizer(inner);var $$=inner.$$;inner[\"notifyOnDestruction\"]();$$.preservePointerOnDelete=true;Object.defineProperties(this,{$$:{value:$$}});attachFinalizer(this);registerInheritedInstance(registeredClass,$$.ptr,this)};wrapperPrototype[\"__destruct\"]=function __destruct(){if(this===wrapperPrototype){throwBindingError(\"Pass correct 'this' to __destruct\")}detachFinalizer(this);unregisterInheritedInstance(registeredClass,this.$$.ptr)};ctor.prototype=Object.create(wrapperPrototype);for(var p in properties){ctor.prototype[p]=properties[p]}return __emval_register(ctor)}var structRegistrations={};function runDestructors(destructors){while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr)}}function simpleReadValueFromPointer(pointer){return this[\"fromWireType\"](HEAPU32[pointer>>2])}var awaitingDependencies={};var typeDependencies={};var InternalError=undefined;function throwInternalError(message){throw new InternalError(message)}function whenDependentTypesAreResolved(myTypes,dependentTypes,getTypeConverters){myTypes.forEach(function(type){typeDependencies[type]=dependentTypes});function onComplete(typeConverters){var myTypeConverters=getTypeConverters(typeConverters);if(myTypeConverters.length!==myTypes.length){throwInternalError(\"Mismatched type converter count\")}for(var i=0;i<myTypes.length;++i){registerType(myTypes[i],myTypeConverters[i])}}var typeConverters=new Array(dependentTypes.length);var unregisteredTypes=[];var registered=0;dependentTypes.forEach(function(dt,i){if(registeredTypes.hasOwnProperty(dt)){typeConverters[i]=registeredTypes[dt]}else{unregisteredTypes.push(dt);if(!awaitingDependencies.hasOwnProperty(dt)){awaitingDependencies[dt]=[]}awaitingDependencies[dt].push(function(){typeConverters[i]=registeredTypes[dt];++registered;if(registered===unregisteredTypes.length){onComplete(typeConverters)}})}});if(0===unregisteredTypes.length){onComplete(typeConverters)}}function __embind_finalize_value_object(structType){var reg=structRegistrations[structType];delete structRegistrations[structType];var rawConstructor=reg.rawConstructor;var rawDestructor=reg.rawDestructor;var fieldRecords=reg.fields;var fieldTypes=fieldRecords.map(function(field){return field.getterReturnType}).concat(fieldRecords.map(function(field){return field.setterArgumentType}));whenDependentTypesAreResolved([structType],fieldTypes,function(fieldTypes){var fields={};fieldRecords.forEach(function(field,i){var fieldName=field.fieldName;var getterReturnType=fieldTypes[i];var getter=field.getter;var getterContext=field.getterContext;var setterArgumentType=fieldTypes[i+fieldRecords.length];var setter=field.setter;var setterContext=field.setterContext;fields[fieldName]={read:function(ptr){return getterReturnType[\"fromWireType\"](getter(getterContext,ptr))},write:function(ptr,o){var destructors=[];setter(setterContext,ptr,setterArgumentType[\"toWireType\"](destructors,o));runDestructors(destructors)}}});return[{name:reg.name,\"fromWireType\":function(ptr){var rv={};for(var i in fields){rv[i]=fields[i].read(ptr)}rawDestructor(ptr);return rv},\"toWireType\":function(destructors,o){for(var fieldName in fields){if(!(fieldName in o)){throw new TypeError('Missing field:  \"'+fieldName+'\"')}}var ptr=rawConstructor();for(fieldName in fields){fields[fieldName].write(ptr,o[fieldName])}if(destructors!==null){destructors.push(rawDestructor,ptr)}return ptr},\"argPackAdvance\":8,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction:rawDestructor}]})}function __embind_register_bigint(primitiveType,name,size,minRange,maxRange){}function getShiftFromSize(size){switch(size){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(\"Unknown type size: \"+size)}}function registerType(rawType,registeredInstance,options){options=options||{};if(!(\"argPackAdvance\"in registeredInstance)){throw new TypeError(\"registerType registeredInstance requires argPackAdvance\")}var name=registeredInstance.name;if(!rawType){throwBindingError('type \"'+name+'\" must have a positive integer typeid pointer')}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError(\"Cannot register type '\"+name+\"' twice\")}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(function(cb){cb()})}}function __embind_register_bool(rawType,name,size,trueValue,falseValue){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":function(wt){return!!wt},\"toWireType\":function(destructors,o){return o?trueValue:falseValue},\"argPackAdvance\":8,\"readValueFromPointer\":function(pointer){var heap;if(size===1){heap=HEAP8}else if(size===2){heap=HEAP16}else if(size===4){heap=HEAP32}else{throw new TypeError(\"Unknown boolean type size: \"+name)}return this[\"fromWireType\"](heap[pointer>>shift])},destructorFunction:null})}function ClassHandle_isAliasOf(other){if(!(this instanceof ClassHandle)){return false}if(!(other instanceof ClassHandle)){return false}var leftClass=this.$$.ptrType.registeredClass;var left=this.$$.ptr;var rightClass=other.$$.ptrType.registeredClass;var right=other.$$.ptr;while(leftClass.baseClass){left=leftClass.upcast(left);leftClass=leftClass.baseClass}while(rightClass.baseClass){right=rightClass.upcast(right);rightClass=rightClass.baseClass}return leftClass===rightClass&&left===right}function shallowCopyInternalPointer(o){return{count:o.count,deleteScheduled:o.deleteScheduled,preservePointerOnDelete:o.preservePointerOnDelete,ptr:o.ptr,ptrType:o.ptrType,smartPtr:o.smartPtr,smartPtrType:o.smartPtrType}}function throwInstanceAlreadyDeleted(obj){function getInstanceTypeName(handle){return handle.$$.ptrType.registeredClass.name}throwBindingError(getInstanceTypeName(obj)+\" instance already deleted\")}function ClassHandle_clone(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.preservePointerOnDelete){this.$$.count.value+=1;return this}else{var clone=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));clone.$$.count.value+=1;clone.$$.deleteScheduled=false;return clone}}function ClassHandle_delete(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError(\"Object already scheduled for deletion\")}detachFinalizer(this);releaseClassHandle(this.$$);if(!this.$$.preservePointerOnDelete){this.$$.smartPtr=undefined;this.$$.ptr=undefined}}function ClassHandle_isDeleted(){return!this.$$.ptr}function ClassHandle_deleteLater(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError(\"Object already scheduled for deletion\")}deletionQueue.push(this);if(deletionQueue.length===1&&delayFunction){delayFunction(flushPendingDeletes)}this.$$.deleteScheduled=true;return this}function init_ClassHandle(){ClassHandle.prototype[\"isAliasOf\"]=ClassHandle_isAliasOf;ClassHandle.prototype[\"clone\"]=ClassHandle_clone;ClassHandle.prototype[\"delete\"]=ClassHandle_delete;ClassHandle.prototype[\"isDeleted\"]=ClassHandle_isDeleted;ClassHandle.prototype[\"deleteLater\"]=ClassHandle_deleteLater}function ClassHandle(){}var registeredPointers={};function ensureOverloadTable(proto,methodName,humanName){if(undefined===proto[methodName].overloadTable){var prevFunc=proto[methodName];proto[methodName]=function(){if(!proto[methodName].overloadTable.hasOwnProperty(arguments.length)){throwBindingError(\"Function '\"+humanName+\"' called with an invalid number of arguments (\"+arguments.length+\") - expects one of (\"+proto[methodName].overloadTable+\")!\")}return proto[methodName].overloadTable[arguments.length].apply(this,arguments)};proto[methodName].overloadTable=[];proto[methodName].overloadTable[prevFunc.argCount]=prevFunc}}function exposePublicSymbol(name,value,numArguments){if(Module.hasOwnProperty(name)){if(undefined===numArguments||undefined!==Module[name].overloadTable&&undefined!==Module[name].overloadTable[numArguments]){throwBindingError(\"Cannot register public name '\"+name+\"' twice\")}ensureOverloadTable(Module,name,name);if(Module.hasOwnProperty(numArguments)){throwBindingError(\"Cannot register multiple overloads of a function with the same number of arguments (\"+numArguments+\")!\")}Module[name].overloadTable[numArguments]=value}else{Module[name]=value;if(undefined!==numArguments){Module[name].numArguments=numArguments}}}function RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast){this.name=name;this.constructor=constructor;this.instancePrototype=instancePrototype;this.rawDestructor=rawDestructor;this.baseClass=baseClass;this.getActualType=getActualType;this.upcast=upcast;this.downcast=downcast;this.pureVirtualFunctions=[]}function upcastPointer(ptr,ptrClass,desiredClass){while(ptrClass!==desiredClass){if(!ptrClass.upcast){throwBindingError(\"Expected null or instance of \"+desiredClass.name+\", got an instance of \"+ptrClass.name)}ptr=ptrClass.upcast(ptr);ptrClass=ptrClass.baseClass}return ptr}function constNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError(\"null is not a valid \"+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass \"'+_embind_repr(handle)+'\" as a '+this.name)}if(!handle.$$.ptr){throwBindingError(\"Cannot pass deleted object as a pointer of type \"+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function genericPointerToWireType(destructors,handle){var ptr;if(handle===null){if(this.isReference){throwBindingError(\"null is not a valid \"+this.name)}if(this.isSmartPointer){ptr=this.rawConstructor();if(destructors!==null){destructors.push(this.rawDestructor,ptr)}return ptr}else{return 0}}if(!handle.$$){throwBindingError('Cannot pass \"'+_embind_repr(handle)+'\" as a '+this.name)}if(!handle.$$.ptr){throwBindingError(\"Cannot pass deleted object as a pointer of type \"+this.name)}if(!this.isConst&&handle.$$.ptrType.isConst){throwBindingError(\"Cannot convert argument of type \"+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+\" to parameter type \"+this.name)}var handleClass=handle.$$.ptrType.registeredClass;ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);if(this.isSmartPointer){if(undefined===handle.$$.smartPtr){throwBindingError(\"Passing raw pointer to smart pointer is illegal\")}switch(this.sharingPolicy){case 0:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{throwBindingError(\"Cannot convert argument of type \"+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+\" to parameter type \"+this.name)}break;case 1:ptr=handle.$$.smartPtr;break;case 2:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{var clonedHandle=handle[\"clone\"]();ptr=this.rawShare(ptr,__emval_register(function(){clonedHandle[\"delete\"]()}));if(destructors!==null){destructors.push(this.rawDestructor,ptr)}}break;default:throwBindingError(\"Unsupporting sharing policy\")}}return ptr}function nonConstNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError(\"null is not a valid \"+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass \"'+_embind_repr(handle)+'\" as a '+this.name)}if(!handle.$$.ptr){throwBindingError(\"Cannot pass deleted object as a pointer of type \"+this.name)}if(handle.$$.ptrType.isConst){throwBindingError(\"Cannot convert argument of type \"+handle.$$.ptrType.name+\" to parameter type \"+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function RegisteredPointer_getPointee(ptr){if(this.rawGetPointee){ptr=this.rawGetPointee(ptr)}return ptr}function RegisteredPointer_destructor(ptr){if(this.rawDestructor){this.rawDestructor(ptr)}}function RegisteredPointer_deleteObject(handle){if(handle!==null){handle[\"delete\"]()}}function downcastPointer(ptr,ptrClass,desiredClass){if(ptrClass===desiredClass){return ptr}if(undefined===desiredClass.baseClass){return null}var rv=downcastPointer(ptr,ptrClass,desiredClass.baseClass);if(rv===null){return null}return desiredClass.downcast(rv)}function getInheritedInstance(class_,ptr){ptr=getBasestPointer(class_,ptr);return registeredInstances[ptr]}function makeClassHandle(prototype,record){if(!record.ptrType||!record.ptr){throwInternalError(\"makeClassHandle requires ptr and ptrType\")}var hasSmartPtrType=!!record.smartPtrType;var hasSmartPtr=!!record.smartPtr;if(hasSmartPtrType!==hasSmartPtr){throwInternalError(\"Both smartPtrType and smartPtr must be specified\")}record.count={value:1};return attachFinalizer(Object.create(prototype,{$$:{value:record}}))}function RegisteredPointer_fromWireType(ptr){var rawPointer=this.getPointee(ptr);if(!rawPointer){this.destructor(ptr);return null}var registeredInstance=getInheritedInstance(this.registeredClass,rawPointer);if(undefined!==registeredInstance){if(0===registeredInstance.$$.count.value){registeredInstance.$$.ptr=rawPointer;registeredInstance.$$.smartPtr=ptr;return registeredInstance[\"clone\"]()}else{var rv=registeredInstance[\"clone\"]();this.destructor(ptr);return rv}}function makeDefaultHandle(){if(this.isSmartPointer){return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rawPointer,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:ptr})}}var actualType=this.registeredClass.getActualType(rawPointer);var registeredPointerRecord=registeredPointers[actualType];if(!registeredPointerRecord){return makeDefaultHandle.call(this)}var toType;if(this.isConst){toType=registeredPointerRecord.constPointerType}else{toType=registeredPointerRecord.pointerType}var dp=downcastPointer(rawPointer,this.registeredClass,toType.registeredClass);if(dp===null){return makeDefaultHandle.call(this)}if(this.isSmartPointer){return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp})}}function init_RegisteredPointer(){RegisteredPointer.prototype.getPointee=RegisteredPointer_getPointee;RegisteredPointer.prototype.destructor=RegisteredPointer_destructor;RegisteredPointer.prototype[\"argPackAdvance\"]=8;RegisteredPointer.prototype[\"readValueFromPointer\"]=simpleReadValueFromPointer;RegisteredPointer.prototype[\"deleteObject\"]=RegisteredPointer_deleteObject;RegisteredPointer.prototype[\"fromWireType\"]=RegisteredPointer_fromWireType}function RegisteredPointer(name,registeredClass,isReference,isConst,isSmartPointer,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor){this.name=name;this.registeredClass=registeredClass;this.isReference=isReference;this.isConst=isConst;this.isSmartPointer=isSmartPointer;this.pointeeType=pointeeType;this.sharingPolicy=sharingPolicy;this.rawGetPointee=rawGetPointee;this.rawConstructor=rawConstructor;this.rawShare=rawShare;this.rawDestructor=rawDestructor;if(!isSmartPointer&&registeredClass.baseClass===undefined){if(isConst){this[\"toWireType\"]=constNoSmartPtrRawPointerToWireType;this.destructorFunction=null}else{this[\"toWireType\"]=nonConstNoSmartPtrRawPointerToWireType;this.destructorFunction=null}}else{this[\"toWireType\"]=genericPointerToWireType}}function replacePublicSymbol(name,value,numArguments){if(!Module.hasOwnProperty(name)){throwInternalError(\"Replacing nonexistant public symbol\")}if(undefined!==Module[name].overloadTable&&undefined!==numArguments){Module[name].overloadTable[numArguments]=value}else{Module[name]=value;Module[name].argCount=numArguments}}function dynCallLegacy(sig,ptr,args){assert(\"dynCall_\"+sig in Module,\"bad function pointer type - no table for sig '\"+sig+\"'\");if(args&&args.length){assert(args.length===sig.substring(1).replace(/j/g,\"--\").length)}else{assert(sig.length==1)}var f=Module[\"dynCall_\"+sig];return args&&args.length?f.apply(null,[ptr].concat(args)):f.call(null,ptr)}function dynCall(sig,ptr,args){if(sig.includes(\"j\")){return dynCallLegacy(sig,ptr,args)}assert(wasmTable.get(ptr),\"missing table entry in dynCall: \"+ptr);return wasmTable.get(ptr).apply(null,args)}function getDynCaller(sig,ptr){assert(sig.includes(\"j\"),\"getDynCaller should only be called with i64 sigs\");var argCache=[];return function(){argCache.length=arguments.length;for(var i=0;i<arguments.length;i++){argCache[i]=arguments[i]}return dynCall(sig,ptr,argCache)}}function embind__requireFunction(signature,rawFunction){signature=readLatin1String(signature);function makeDynCaller(){if(signature.includes(\"j\")){return getDynCaller(signature,rawFunction)}return wasmTable.get(rawFunction)}var fp=makeDynCaller();if(typeof fp!==\"function\"){throwBindingError(\"unknown function pointer with signature \"+signature+\": \"+rawFunction)}return fp}var UnboundTypeError=undefined;function throwUnboundTypeError(message,types){var unboundTypes=[];var seen={};function visit(type){if(seen[type]){return}if(registeredTypes[type]){return}if(typeDependencies[type]){typeDependencies[type].forEach(visit);return}unboundTypes.push(type);seen[type]=true}types.forEach(visit);throw new UnboundTypeError(message+\": \"+unboundTypes.map(getTypeName).join([\", \"]))}function __embind_register_class(rawType,rawPointerType,rawConstPointerType,baseClassRawType,getActualTypeSignature,getActualType,upcastSignature,upcast,downcastSignature,downcast,name,destructorSignature,rawDestructor){name=readLatin1String(name);getActualType=embind__requireFunction(getActualTypeSignature,getActualType);if(upcast){upcast=embind__requireFunction(upcastSignature,upcast)}if(downcast){downcast=embind__requireFunction(downcastSignature,downcast)}rawDestructor=embind__requireFunction(destructorSignature,rawDestructor);var legalFunctionName=makeLegalFunctionName(name);exposePublicSymbol(legalFunctionName,function(){throwUnboundTypeError(\"Cannot construct \"+name+\" due to unbound types\",[baseClassRawType])});whenDependentTypesAreResolved([rawType,rawPointerType,rawConstPointerType],baseClassRawType?[baseClassRawType]:[],function(base){base=base[0];var baseClass;var basePrototype;if(baseClassRawType){baseClass=base.registeredClass;basePrototype=baseClass.instancePrototype}else{basePrototype=ClassHandle.prototype}var constructor=createNamedFunction(legalFunctionName,function(){if(Object.getPrototypeOf(this)!==instancePrototype){throw new BindingError(\"Use 'new' to construct \"+name)}if(undefined===registeredClass.constructor_body){throw new BindingError(name+\" has no accessible constructor\")}var body=registeredClass.constructor_body[arguments.length];if(undefined===body){throw new BindingError(\"Tried to invoke ctor of \"+name+\" with invalid number of parameters (\"+arguments.length+\") - expected (\"+Object.keys(registeredClass.constructor_body).toString()+\") parameters instead!\")}return body.apply(this,arguments)});var instancePrototype=Object.create(basePrototype,{constructor:{value:constructor}});constructor.prototype=instancePrototype;var registeredClass=new RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast);var referenceConverter=new RegisteredPointer(name,registeredClass,true,false,false);var pointerConverter=new RegisteredPointer(name+\"*\",registeredClass,false,false,false);var constPointerConverter=new RegisteredPointer(name+\" const*\",registeredClass,false,true,false);registeredPointers[rawType]={pointerType:pointerConverter,constPointerType:constPointerConverter};replacePublicSymbol(legalFunctionName,constructor);return[referenceConverter,pointerConverter,constPointerConverter]})}function new_(constructor,argumentList){if(!(constructor instanceof Function)){throw new TypeError(\"new_ called with constructor type \"+typeof constructor+\" which is not a function\")}var dummy=createNamedFunction(constructor.name||\"unknownFunctionName\",function(){});dummy.prototype=constructor.prototype;var obj=new dummy;var r=constructor.apply(obj,argumentList);return r instanceof Object?r:obj}function craftInvokerFunction(humanName,argTypes,classType,cppInvokerFunc,cppTargetFunc){var argCount=argTypes.length;if(argCount<2){throwBindingError(\"argTypes array size mismatch! Must at least get return value and 'this' types!\")}var isClassMethodFunc=argTypes[1]!==null&&classType!==null;var needsDestructorStack=false;for(var i=1;i<argTypes.length;++i){if(argTypes[i]!==null&&argTypes[i].destructorFunction===undefined){needsDestructorStack=true;break}}var returns=argTypes[0].name!==\"void\";var argsList=\"\";var argsListWired=\"\";for(var i=0;i<argCount-2;++i){argsList+=(i!==0?\", \":\"\")+\"arg\"+i;argsListWired+=(i!==0?\", \":\"\")+\"arg\"+i+\"Wired\"}var invokerFnBody=\"return function \"+makeLegalFunctionName(humanName)+\"(\"+argsList+\") {\\n\"+\"if (arguments.length !== \"+(argCount-2)+\") {\\n\"+\"throwBindingError('function \"+humanName+\" called with ' + arguments.length + ' arguments, expected \"+(argCount-2)+\" args!');\\n\"+\"}\\n\";if(needsDestructorStack){invokerFnBody+=\"var destructors = [];\\n\"}var dtorStack=needsDestructorStack?\"destructors\":\"null\";var args1=[\"throwBindingError\",\"invoker\",\"fn\",\"runDestructors\",\"retType\",\"classParam\"];var args2=[throwBindingError,cppInvokerFunc,cppTargetFunc,runDestructors,argTypes[0],argTypes[1]];if(isClassMethodFunc){invokerFnBody+=\"var thisWired = classParam.toWireType(\"+dtorStack+\", this);\\n\"}for(var i=0;i<argCount-2;++i){invokerFnBody+=\"var arg\"+i+\"Wired = argType\"+i+\".toWireType(\"+dtorStack+\", arg\"+i+\"); // \"+argTypes[i+2].name+\"\\n\";args1.push(\"argType\"+i);args2.push(argTypes[i+2])}if(isClassMethodFunc){argsListWired=\"thisWired\"+(argsListWired.length>0?\", \":\"\")+argsListWired}invokerFnBody+=(returns?\"var rv = \":\"\")+\"invoker(fn\"+(argsListWired.length>0?\", \":\"\")+argsListWired+\");\\n\";if(needsDestructorStack){invokerFnBody+=\"runDestructors(destructors);\\n\"}else{for(var i=isClassMethodFunc?1:2;i<argTypes.length;++i){var paramName=i===1?\"thisWired\":\"arg\"+(i-2)+\"Wired\";if(argTypes[i].destructorFunction!==null){invokerFnBody+=paramName+\"_dtor(\"+paramName+\"); // \"+argTypes[i].name+\"\\n\";args1.push(paramName+\"_dtor\");args2.push(argTypes[i].destructorFunction)}}}if(returns){invokerFnBody+=\"var ret = retType.fromWireType(rv);\\n\"+\"return ret;\\n\"}else{}invokerFnBody+=\"}\\n\";args1.push(invokerFnBody);var invokerFunction=new_(Function,args1).apply(null,args2);return invokerFunction}function heap32VectorToArray(count,firstElement){var array=[];for(var i=0;i<count;i++){array.push(HEAP32[(firstElement>>2)+i])}return array}function __embind_register_class_class_function(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,fn){var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=classType.name+\".\"+methodName;function unboundTypesHandler(){throwUnboundTypeError(\"Cannot call \"+humanName+\" due to unbound types\",rawArgTypes)}if(methodName.startsWith(\"@@\")){methodName=Symbol[methodName.substring(2)]}var proto=classType.registeredClass.constructor;if(undefined===proto[methodName]){unboundTypesHandler.argCount=argCount-1;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-1]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var invokerArgsArray=[argTypes[0],null].concat(argTypes.slice(1));var func=craftInvokerFunction(humanName,invokerArgsArray,null,rawInvoker,fn);if(undefined===proto[methodName].overloadTable){func.argCount=argCount-1;proto[methodName]=func}else{proto[methodName].overloadTable[argCount-1]=func}return[]});return[]})}function __embind_register_class_constructor(rawClassType,argCount,rawArgTypesAddr,invokerSignature,invoker,rawConstructor){assert(argCount>0);var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);invoker=embind__requireFunction(invokerSignature,invoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=\"constructor \"+classType.name;if(undefined===classType.registeredClass.constructor_body){classType.registeredClass.constructor_body=[]}if(undefined!==classType.registeredClass.constructor_body[argCount-1]){throw new BindingError(\"Cannot register multiple constructors with identical number of parameters (\"+(argCount-1)+\") for class '\"+classType.name+\"'! Overload resolution is currently only performed using the parameter count, not actual type info!\")}classType.registeredClass.constructor_body[argCount-1]=function unboundTypeHandler(){throwUnboundTypeError(\"Cannot construct \"+classType.name+\" due to unbound types\",rawArgTypes)};whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){argTypes.splice(1,0,null);classType.registeredClass.constructor_body[argCount-1]=craftInvokerFunction(humanName,argTypes,null,invoker,rawConstructor);return[]});return[]})}function __embind_register_class_function(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,context,isPureVirtual){var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=classType.name+\".\"+methodName;if(methodName.startsWith(\"@@\")){methodName=Symbol[methodName.substring(2)]}if(isPureVirtual){classType.registeredClass.pureVirtualFunctions.push(methodName)}function unboundTypesHandler(){throwUnboundTypeError(\"Cannot call \"+humanName+\" due to unbound types\",rawArgTypes)}var proto=classType.registeredClass.instancePrototype;var method=proto[methodName];if(undefined===method||undefined===method.overloadTable&&method.className!==classType.name&&method.argCount===argCount-2){unboundTypesHandler.argCount=argCount-2;unboundTypesHandler.className=classType.name;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-2]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var memberFunction=craftInvokerFunction(humanName,argTypes,classType,rawInvoker,context);if(undefined===proto[methodName].overloadTable){memberFunction.argCount=argCount-2;proto[methodName]=memberFunction}else{proto[methodName].overloadTable[argCount-2]=memberFunction}return[]});return[]})}function validateThis(this_,classType,humanName){if(!(this_ instanceof Object)){throwBindingError(humanName+' with invalid \"this\": '+this_)}if(!(this_ instanceof classType.registeredClass.constructor)){throwBindingError(humanName+' incompatible with \"this\" of type '+this_.constructor.name)}if(!this_.$$.ptr){throwBindingError(\"cannot call emscripten binding method \"+humanName+\" on deleted object\")}return upcastPointer(this_.$$.ptr,this_.$$.ptrType.registeredClass,classType.registeredClass)}function __embind_register_class_property(classType,fieldName,getterReturnType,getterSignature,getter,getterContext,setterArgumentType,setterSignature,setter,setterContext){fieldName=readLatin1String(fieldName);getter=embind__requireFunction(getterSignature,getter);whenDependentTypesAreResolved([],[classType],function(classType){classType=classType[0];var humanName=classType.name+\".\"+fieldName;var desc={get:function(){throwUnboundTypeError(\"Cannot access \"+humanName+\" due to unbound types\",[getterReturnType,setterArgumentType])},enumerable:true,configurable:true};if(setter){desc.set=function(){throwUnboundTypeError(\"Cannot access \"+humanName+\" due to unbound types\",[getterReturnType,setterArgumentType])}}else{desc.set=function(v){throwBindingError(humanName+\" is a read-only property\")}}Object.defineProperty(classType.registeredClass.instancePrototype,fieldName,desc);whenDependentTypesAreResolved([],setter?[getterReturnType,setterArgumentType]:[getterReturnType],function(types){var getterReturnType=types[0];var desc={get:function(){var ptr=validateThis(this,classType,humanName+\" getter\");return getterReturnType[\"fromWireType\"](getter(getterContext,ptr))},enumerable:true};if(setter){setter=embind__requireFunction(setterSignature,setter);var setterArgumentType=types[1];desc.set=function(v){var ptr=validateThis(this,classType,humanName+\" setter\");var destructors=[];setter(setterContext,ptr,setterArgumentType[\"toWireType\"](destructors,v));runDestructors(destructors)}}Object.defineProperty(classType.registeredClass.instancePrototype,fieldName,desc);return[]});return[]})}function __emval_decref(handle){if(handle>4&&0===--emval_handle_array[handle].refcount){emval_handle_array[handle]=undefined;emval_free_list.push(handle)}}function __embind_register_emval(rawType,name){name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":function(handle){var rv=emval_handle_array[handle].value;__emval_decref(handle);return rv},\"toWireType\":function(destructors,value){return __emval_register(value)},\"argPackAdvance\":8,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction:null})}function _embind_repr(v){if(v===null){return\"null\"}var t=typeof v;if(t===\"object\"||t===\"array\"||t===\"function\"){return v.toString()}else{return\"\"+v}}function floatReadValueFromPointer(name,shift){switch(shift){case 2:return function(pointer){return this[\"fromWireType\"](HEAPF32[pointer>>2])};case 3:return function(pointer){return this[\"fromWireType\"](HEAPF64[pointer>>3])};default:throw new TypeError(\"Unknown float type: \"+name)}}function __embind_register_float(rawType,name,size){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":function(value){return value},\"toWireType\":function(destructors,value){if(typeof value!==\"number\"&&typeof value!==\"boolean\"){throw new TypeError('Cannot convert \"'+_embind_repr(value)+'\" to '+this.name)}return value},\"argPackAdvance\":8,\"readValueFromPointer\":floatReadValueFromPointer(name,shift),destructorFunction:null})}function __embind_register_function(name,argCount,rawArgTypesAddr,signature,rawInvoker,fn){var argTypes=heap32VectorToArray(argCount,rawArgTypesAddr);name=readLatin1String(name);rawInvoker=embind__requireFunction(signature,rawInvoker);exposePublicSymbol(name,function(){throwUnboundTypeError(\"Cannot call \"+name+\" due to unbound types\",argTypes)},argCount-1);whenDependentTypesAreResolved([],argTypes,function(argTypes){var invokerArgsArray=[argTypes[0],null].concat(argTypes.slice(1));replacePublicSymbol(name,craftInvokerFunction(name,invokerArgsArray,null,rawInvoker,fn),argCount-1);return[]})}function integerReadValueFromPointer(name,shift,signed){switch(shift){case 0:return signed?function readS8FromPointer(pointer){return HEAP8[pointer]}:function readU8FromPointer(pointer){return HEAPU8[pointer]};case 1:return signed?function readS16FromPointer(pointer){return HEAP16[pointer>>1]}:function readU16FromPointer(pointer){return HEAPU16[pointer>>1]};case 2:return signed?function readS32FromPointer(pointer){return HEAP32[pointer>>2]}:function readU32FromPointer(pointer){return HEAPU32[pointer>>2]};default:throw new TypeError(\"Unknown integer type: \"+name)}}function __embind_register_integer(primitiveType,name,size,minRange,maxRange){name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var shift=getShiftFromSize(size);var fromWireType=function(value){return value};if(minRange===0){var bitshift=32-8*size;fromWireType=function(value){return value<<bitshift>>>bitshift}}var isUnsignedType=name.includes(\"unsigned\");registerType(primitiveType,{name:name,\"fromWireType\":fromWireType,\"toWireType\":function(destructors,value){if(typeof value!==\"number\"&&typeof value!==\"boolean\"){throw new TypeError('Cannot convert \"'+_embind_repr(value)+'\" to '+this.name)}if(value<minRange||value>maxRange){throw new TypeError('Passing a number \"'+_embind_repr(value)+'\" from JS side to C/C++ side to an argument of type \"'+name+'\", which is outside the valid range ['+minRange+\", \"+maxRange+\"]!\")}return isUnsignedType?value>>>0:value|0},\"argPackAdvance\":8,\"readValueFromPointer\":integerReadValueFromPointer(name,shift,minRange!==0),destructorFunction:null})}function __embind_register_memory_view(rawType,dataTypeIndex,name){var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){handle=handle>>2;var heap=HEAPU32;var size=heap[handle];var data=heap[handle+1];return new TA(buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":decodeMemoryView,\"argPackAdvance\":8,\"readValueFromPointer\":decodeMemoryView},{ignoreDuplicateRegistrations:true})}function __embind_register_std_string(rawType,name){name=readLatin1String(name);var stdStringIsUTF8=name===\"std::string\";registerType(rawType,{name:name,\"fromWireType\":function(value){var length=HEAPU32[value>>2];var str;if(stdStringIsUTF8){var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i<length;++i){a[i]=String.fromCharCode(HEAPU8[value+4+i])}str=a.join(\"\")}_free(value);return str},\"toWireType\":function(destructors,value){if(value instanceof ArrayBuffer){value=new Uint8Array(value)}var getLength;var valueIsOfTypeString=typeof value===\"string\";if(!(valueIsOfTypeString||value instanceof Uint8Array||value instanceof Uint8ClampedArray||value instanceof Int8Array)){throwBindingError(\"Cannot pass non-string to std::string\")}if(stdStringIsUTF8&&valueIsOfTypeString){getLength=function(){return lengthBytesUTF8(value)}}else{getLength=function(){return value.length}}var length=getLength();var ptr=_malloc(4+length+1);HEAPU32[ptr>>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr+4,length+1)}else{if(valueIsOfTypeString){for(var i=0;i<length;++i){var charCode=value.charCodeAt(i);if(charCode>255){_free(ptr);throwBindingError(\"String has UTF-16 code units that do not fit in 8 bits\")}HEAPU8[ptr+4+i]=charCode}}else{for(var i=0;i<length;++i){HEAPU8[ptr+4+i]=value[i]}}}if(destructors!==null){destructors.push(_free,ptr)}return ptr},\"argPackAdvance\":8,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction:function(ptr){_free(ptr)}})}function __embind_register_std_wstring(rawType,charSize,name){name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=function(){return HEAPU16};shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=function(){return HEAPU32};shift=2}registerType(rawType,{name:name,\"fromWireType\":function(value){var length=HEAPU32[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},\"toWireType\":function(destructors,value){if(!(typeof value===\"string\")){throwBindingError(\"Cannot pass non-string to C++ string type \"+name)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},\"argPackAdvance\":8,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction:function(ptr){_free(ptr)}})}function __embind_register_value_object(rawType,name,constructorSignature,rawConstructor,destructorSignature,rawDestructor){structRegistrations[rawType]={name:readLatin1String(name),rawConstructor:embind__requireFunction(constructorSignature,rawConstructor),rawDestructor:embind__requireFunction(destructorSignature,rawDestructor),fields:[]}}function __embind_register_value_object_field(structType,fieldName,getterReturnType,getterSignature,getter,getterContext,setterArgumentType,setterSignature,setter,setterContext){structRegistrations[structType].fields.push({fieldName:readLatin1String(fieldName),getterReturnType:getterReturnType,getter:embind__requireFunction(getterSignature,getter),getterContext:getterContext,setterArgumentType:setterArgumentType,setter:embind__requireFunction(setterSignature,setter),setterContext:setterContext})}function __embind_register_void(rawType,name){name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,\"argPackAdvance\":0,\"fromWireType\":function(){return undefined},\"toWireType\":function(destructors,o){return undefined}})}var emval_symbols={};function getStringOrSymbol(address){var symbol=emval_symbols[address];if(symbol===undefined){return readLatin1String(address)}else{return symbol}}var emval_methodCallers=[];function __emval_call_void_method(caller,handle,methodName,args){caller=emval_methodCallers[caller];handle=requireHandle(handle);methodName=getStringOrSymbol(methodName);caller(handle,methodName,null,args)}function __emval_addMethodCaller(caller){var id=emval_methodCallers.length;emval_methodCallers.push(caller);return id}function __emval_lookupTypes(argCount,argTypes){var a=new Array(argCount);for(var i=0;i<argCount;++i){a[i]=requireRegisteredType(HEAP32[(argTypes>>2)+i],\"parameter \"+i)}return a}function __emval_get_method_caller(argCount,argTypes){var types=__emval_lookupTypes(argCount,argTypes);var retType=types[0];var signatureName=retType.name+\"_$\"+types.slice(1).map(function(t){return t.name}).join(\"_\")+\"$\";var params=[\"retType\"];var args=[retType];var argsList=\"\";for(var i=0;i<argCount-1;++i){argsList+=(i!==0?\", \":\"\")+\"arg\"+i;params.push(\"argType\"+i);args.push(types[1+i])}var functionName=makeLegalFunctionName(\"methodCaller_\"+signatureName);var functionBody=\"return function \"+functionName+\"(handle, name, destructors, args) {\\n\";var offset=0;for(var i=0;i<argCount-1;++i){functionBody+=\"    var arg\"+i+\" = argType\"+i+\".readValueFromPointer(args\"+(offset?\"+\"+offset:\"\")+\");\\n\";offset+=types[i+1][\"argPackAdvance\"]}functionBody+=\"    var rv = handle[name](\"+argsList+\");\\n\";for(var i=0;i<argCount-1;++i){if(types[i+1][\"deleteObject\"]){functionBody+=\"    argType\"+i+\".deleteObject(arg\"+i+\");\\n\"}}if(!retType.isVoid){functionBody+=\"    return retType.toWireType(destructors, rv);\\n\"}functionBody+=\"};\\n\";params.push(functionBody);var invokerFunction=new_(Function,params).apply(null,args);return __emval_addMethodCaller(invokerFunction)}function __emval_incref(handle){if(handle>4){emval_handle_array[handle].refcount+=1}}function __emval_take_value(type,argv){type=requireRegisteredType(type,\"_emval_take_value\");var v=type[\"readValueFromPointer\"](argv);return __emval_register(v)}function _abort(){abort()}var _emscripten_get_now_is_monotonic=true;function _clock_gettime(clk_id,tp){var now;if(clk_id===0){now=Date.now()}else if((clk_id===1||clk_id===4)&&_emscripten_get_now_is_monotonic){now=_emscripten_get_now()}else{setErrNo(28);return-1}HEAP32[tp>>2]=now/1e3|0;HEAP32[tp+4>>2]=now%1e3*1e3*1e3|0;return 0}function _dlopen(filename,flag){abort(\"To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking\")}function _dlsym(handle,symbol){abort(\"To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking\")}var readAsmConstArgsArray=[];function readAsmConstArgs(sigPtr,buf){assert(Array.isArray(readAsmConstArgsArray));assert(buf%16==0);readAsmConstArgsArray.length=0;var ch;buf>>=2;while(ch=HEAPU8[sigPtr++]){assert(ch===100||ch===102||ch===105);var double=ch<105;if(double&&buf&1)buf++;readAsmConstArgsArray.push(double?HEAPF64[buf++>>1]:HEAP32[buf]);++buf}return readAsmConstArgsArray}function _emscripten_asm_const_int(code,sigPtr,argbuf){var args=readAsmConstArgs(sigPtr,argbuf);if(!ASM_CONSTS.hasOwnProperty(code))abort(\"No EM_ASM constant found at address \"+code);return ASM_CONSTS[code].apply(null,args)}function _emscripten_get_heap_max(){return 2147483648}function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function _emscripten_pc_get_function(pc){abort(\"Cannot use emscripten_pc_get_function without -s USE_OFFSET_CONVERTER\")}function emscripten_realloc_buffer(size){try{wasmMemory.grow(size-buffer.byteLength+65535>>>16);updateGlobalBufferAndViews(wasmMemory.buffer);return 1}catch(e){err(\"emscripten_realloc_buffer: Attempted to grow heap from \"+buffer.byteLength+\" bytes to \"+size+\" bytes, but got error: \"+e)}}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;assert(requestedSize>oldSize);var maxHeapSize=2147483648;if(requestedSize>maxHeapSize){err(\"Cannot enlarge memory, asked to go up to \"+requestedSize+\" bytes, but the limit is \"+maxHeapSize+\" bytes!\");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,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}err(\"Failed to grow the heap from \"+oldSize+\" bytes to \"+newSize+\" bytes, not enough memory!\");return false}function _emscripten_generate_pc(frame){abort(\"Cannot use emscripten_generate_pc (needed by __builtin_return_address) without -s USE_OFFSET_CONVERTER\")}var UNWIND_CACHE={};function __emscripten_save_in_unwind_cache(callstack){callstack.forEach(function(frame){var pc=_emscripten_generate_pc(frame);if(pc){UNWIND_CACHE[pc]=frame}})}function _emscripten_stack_snapshot(){var callstack=(new Error).stack.split(\"\\n\");if(callstack[0]==\"Error\"){callstack.shift()}__emscripten_save_in_unwind_cache(callstack);UNWIND_CACHE.last_addr=_emscripten_generate_pc(callstack[2]);UNWIND_CACHE.last_stack=callstack;return UNWIND_CACHE.last_addr}function _emscripten_stack_unwind_buffer(addr,buffer,count){var stack;if(UNWIND_CACHE.last_addr==addr){stack=UNWIND_CACHE.last_stack}else{stack=(new Error).stack.split(\"\\n\");if(stack[0]==\"Error\"){stack.shift()}__emscripten_save_in_unwind_cache(stack)}var offset=2;while(stack[offset]&&_emscripten_generate_pc(stack[offset])!=addr){++offset}for(var i=0;i<count&&stack[i+offset];++i){HEAP32[buffer+i*4>>2]=_emscripten_generate_pc(stack[i+offset])}return i}function _emscripten_thread_sleep(msecs){var start=_emscripten_get_now();while(_emscripten_get_now()-start<msecs){}}function __webgl_enable_ANGLE_instanced_arrays(ctx){var ext=ctx.getExtension(\"ANGLE_instanced_arrays\");if(ext){ctx[\"vertexAttribDivisor\"]=function(index,divisor){ext[\"vertexAttribDivisorANGLE\"](index,divisor)};ctx[\"drawArraysInstanced\"]=function(mode,first,count,primcount){ext[\"drawArraysInstancedANGLE\"](mode,first,count,primcount)};ctx[\"drawElementsInstanced\"]=function(mode,count,type,indices,primcount){ext[\"drawElementsInstancedANGLE\"](mode,count,type,indices,primcount)};return 1}}function __webgl_enable_OES_vertex_array_object(ctx){var ext=ctx.getExtension(\"OES_vertex_array_object\");if(ext){ctx[\"createVertexArray\"]=function(){return ext[\"createVertexArrayOES\"]()};ctx[\"deleteVertexArray\"]=function(vao){ext[\"deleteVertexArrayOES\"](vao)};ctx[\"bindVertexArray\"]=function(vao){ext[\"bindVertexArrayOES\"](vao)};ctx[\"isVertexArray\"]=function(vao){return ext[\"isVertexArrayOES\"](vao)};return 1}}function __webgl_enable_WEBGL_draw_buffers(ctx){var ext=ctx.getExtension(\"WEBGL_draw_buffers\");if(ext){ctx[\"drawBuffers\"]=function(n,bufs){ext[\"drawBuffersWEBGL\"](n,bufs)};return 1}}function __webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(ctx){return!!(ctx.dibvbi=ctx.getExtension(\"WEBGL_draw_instanced_base_vertex_base_instance\"))}function __webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(ctx){return!!(ctx.mdibvbi=ctx.getExtension(\"WEBGL_multi_draw_instanced_base_vertex_base_instance\"))}function __webgl_enable_WEBGL_multi_draw(ctx){return!!(ctx.multiDrawWebgl=ctx.getExtension(\"WEBGL_multi_draw\"))}var GL={counter:1,buffers:[],mappedBuffers:{},programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],byteSizeByTypeRoot:5120,byteSizeByType:[1,1,2,2,4,4,4,2,3,4,8],stringCache:{},stringiCache:{},unpackAlignment:4,recordError:function recordError(errorCode){if(!GL.lastError){GL.lastError=errorCode}},getNewId:function(table){var ret=GL.counter++;for(var i=table.length;i<ret;i++){table[i]=null}return ret},MAX_TEMP_BUFFER_SIZE:2097152,numTempVertexBuffersPerSize:64,log2ceilLookup:function(i){return 32-Math.clz32(i===0?0:i-1)},generateTempBuffers:function(quads,context){var largestIndex=GL.log2ceilLookup(GL.MAX_TEMP_BUFFER_SIZE);context.tempVertexBufferCounters1=[];context.tempVertexBufferCounters2=[];context.tempVertexBufferCounters1.length=context.tempVertexBufferCounters2.length=largestIndex+1;context.tempVertexBuffers1=[];context.tempVertexBuffers2=[];context.tempVertexBuffers1.length=context.tempVertexBuffers2.length=largestIndex+1;context.tempIndexBuffers=[];context.tempIndexBuffers.length=largestIndex+1;for(var i=0;i<=largestIndex;++i){context.tempIndexBuffers[i]=null;context.tempVertexBufferCounters1[i]=context.tempVertexBufferCounters2[i]=0;var ringbufferLength=GL.numTempVertexBuffersPerSize;context.tempVertexBuffers1[i]=[];context.tempVertexBuffers2[i]=[];var ringbuffer1=context.tempVertexBuffers1[i];var ringbuffer2=context.tempVertexBuffers2[i];ringbuffer1.length=ringbuffer2.length=ringbufferLength;for(var j=0;j<ringbufferLength;++j){ringbuffer1[j]=ringbuffer2[j]=null}}if(quads){context.tempQuadIndexBuffer=GLctx.createBuffer();context.GLctx.bindBuffer(34963,context.tempQuadIndexBuffer);var numIndexes=GL.MAX_TEMP_BUFFER_SIZE>>1;var quadIndexes=new Uint16Array(numIndexes);var i=0,v=0;while(1){quadIndexes[i++]=v;if(i>=numIndexes)break;quadIndexes[i++]=v+1;if(i>=numIndexes)break;quadIndexes[i++]=v+2;if(i>=numIndexes)break;quadIndexes[i++]=v;if(i>=numIndexes)break;quadIndexes[i++]=v+2;if(i>=numIndexes)break;quadIndexes[i++]=v+3;if(i>=numIndexes)break;v+=4}context.GLctx.bufferData(34963,quadIndexes,35044);context.GLctx.bindBuffer(34963,null)}},getTempVertexBuffer:function getTempVertexBuffer(sizeBytes){var idx=GL.log2ceilLookup(sizeBytes);var ringbuffer=GL.currentContext.tempVertexBuffers1[idx];var nextFreeBufferIndex=GL.currentContext.tempVertexBufferCounters1[idx];GL.currentContext.tempVertexBufferCounters1[idx]=GL.currentContext.tempVertexBufferCounters1[idx]+1&GL.numTempVertexBuffersPerSize-1;var vbo=ringbuffer[nextFreeBufferIndex];if(vbo){return vbo}var prevVBO=GLctx.getParameter(34964);ringbuffer[nextFreeBufferIndex]=GLctx.createBuffer();GLctx.bindBuffer(34962,ringbuffer[nextFreeBufferIndex]);GLctx.bufferData(34962,1<<idx,35048);GLctx.bindBuffer(34962,prevVBO);return ringbuffer[nextFreeBufferIndex]},getTempIndexBuffer:function getTempIndexBuffer(sizeBytes){var idx=GL.log2ceilLookup(sizeBytes);var ibo=GL.currentContext.tempIndexBuffers[idx];if(ibo){return ibo}var prevIBO=GLctx.getParameter(34965);GL.currentContext.tempIndexBuffers[idx]=GLctx.createBuffer();GLctx.bindBuffer(34963,GL.currentContext.tempIndexBuffers[idx]);GLctx.bufferData(34963,1<<idx,35048);GLctx.bindBuffer(34963,prevIBO);return GL.currentContext.tempIndexBuffers[idx]},newRenderingFrameStarted:function newRenderingFrameStarted(){if(!GL.currentContext){return}var vb=GL.currentContext.tempVertexBuffers1;GL.currentContext.tempVertexBuffers1=GL.currentContext.tempVertexBuffers2;GL.currentContext.tempVertexBuffers2=vb;vb=GL.currentContext.tempVertexBufferCounters1;GL.currentContext.tempVertexBufferCounters1=GL.currentContext.tempVertexBufferCounters2;GL.currentContext.tempVertexBufferCounters2=vb;var largestIndex=GL.log2ceilLookup(GL.MAX_TEMP_BUFFER_SIZE);for(var i=0;i<=largestIndex;++i){GL.currentContext.tempVertexBufferCounters1[i]=0}},getSource:function(shader,count,string,length){var source=\"\";for(var i=0;i<count;++i){var len=length?HEAP32[length+i*4>>2]:-1;source+=UTF8ToString(HEAP32[string+i*4>>2],len<0?undefined:len)}return source},calcBufLength:function calcBufLength(size,type,stride,count){if(stride>0){return count*stride}var typeSize=GL.byteSizeByType[type-GL.byteSizeByTypeRoot];return size*typeSize*count},usedTempBuffers:[],preDrawHandleClientVertexAttribBindings:function preDrawHandleClientVertexAttribBindings(count){GL.resetBufferBinding=false;for(var i=0;i<GL.currentContext.maxVertexAttribs;++i){var cb=GL.currentContext.clientBuffers[i];if(!cb.clientside||!cb.enabled)continue;GL.resetBufferBinding=true;var size=GL.calcBufLength(cb.size,cb.type,cb.stride,count);var buf=GL.getTempVertexBuffer(size);GLctx.bindBuffer(34962,buf);GLctx.bufferSubData(34962,0,HEAPU8.subarray(cb.ptr,cb.ptr+size));cb.vertexAttribPointerAdaptor.call(GLctx,i,cb.size,cb.type,cb.normalized,cb.stride,0)}},postDrawHandleClientVertexAttribBindings:function postDrawHandleClientVertexAttribBindings(){if(GL.resetBufferBinding){GLctx.bindBuffer(34962,GL.buffers[GLctx.currentArrayBufferBinding])}},createContext:function(canvas,webGLContextAttributes){if(webGLContextAttributes.renderViaOffscreenBackBuffer)webGLContextAttributes[\"preserveDrawingBuffer\"]=true;if(!canvas.getContextSafariWebGL2Fixed){canvas.getContextSafariWebGL2Fixed=canvas.getContext;canvas.getContext=function(ver,attrs){var gl=canvas.getContextSafariWebGL2Fixed(ver,attrs);return ver==\"webgl\"==gl instanceof WebGLRenderingContext?gl:null}}var ctx=webGLContextAttributes.majorVersion>1?canvas.getContext(\"webgl2\",webGLContextAttributes):canvas.getContext(\"webgl\",webGLContextAttributes);if(!ctx)return 0;var handle=GL.registerContext(ctx,webGLContextAttributes);return handle},enableOffscreenFramebufferAttributes:function(webGLContextAttributes){webGLContextAttributes.renderViaOffscreenBackBuffer=true;webGLContextAttributes.preserveDrawingBuffer=true},createOffscreenFramebuffer:function(context){var gl=context.GLctx;var fbo=gl.createFramebuffer();gl.bindFramebuffer(36160,fbo);context.defaultFbo=fbo;context.defaultFboForbidBlitFramebuffer=false;if(gl.getContextAttributes().antialias){context.defaultFboForbidBlitFramebuffer=true}else{var firefoxMatch=navigator.userAgent.toLowerCase().match(/firefox\\/(\\d\\d)/);if(firefoxMatch!=null){var firefoxVersion=firefoxMatch[1];context.defaultFboForbidBlitFramebuffer=firefoxVersion<67}}context.defaultColorTarget=gl.createTexture();context.defaultDepthTarget=gl.createRenderbuffer();GL.resizeOffscreenFramebuffer(context);gl.bindTexture(3553,context.defaultColorTarget);gl.texParameteri(3553,10241,9728);gl.texParameteri(3553,10240,9728);gl.texParameteri(3553,10242,33071);gl.texParameteri(3553,10243,33071);gl.texImage2D(3553,0,6408,gl.canvas.width,gl.canvas.height,0,6408,5121,null);gl.framebufferTexture2D(36160,36064,3553,context.defaultColorTarget,0);gl.bindTexture(3553,null);var depthTarget=gl.createRenderbuffer();gl.bindRenderbuffer(36161,context.defaultDepthTarget);gl.renderbufferStorage(36161,33189,gl.canvas.width,gl.canvas.height);gl.framebufferRenderbuffer(36160,36096,36161,context.defaultDepthTarget);gl.bindRenderbuffer(36161,null);var vertices=[-1,-1,-1,1,1,-1,1,1];var vb=gl.createBuffer();gl.bindBuffer(34962,vb);gl.bufferData(34962,new Float32Array(vertices),35044);gl.bindBuffer(34962,null);context.blitVB=vb;var vsCode=\"attribute vec2 pos;\"+\"varying lowp vec2 tex;\"+\"void main() { tex = pos * 0.5 + vec2(0.5,0.5); gl_Position = vec4(pos, 0.0, 1.0); }\";var vs=gl.createShader(35633);gl.shaderSource(vs,vsCode);gl.compileShader(vs);var fsCode=\"varying lowp vec2 tex;\"+\"uniform sampler2D sampler;\"+\"void main() { gl_FragColor = texture2D(sampler, tex); }\";var fs=gl.createShader(35632);gl.shaderSource(fs,fsCode);gl.compileShader(fs);var blitProgram=gl.createProgram();gl.attachShader(blitProgram,vs);gl.attachShader(blitProgram,fs);gl.linkProgram(blitProgram);context.blitProgram=blitProgram;context.blitPosLoc=gl.getAttribLocation(blitProgram,\"pos\");gl.useProgram(blitProgram);gl.uniform1i(gl.getUniformLocation(blitProgram,\"sampler\"),0);gl.useProgram(null);context.defaultVao=undefined;if(gl.createVertexArray){context.defaultVao=gl.createVertexArray();gl.bindVertexArray(context.defaultVao);gl.enableVertexAttribArray(context.blitPosLoc);gl.bindVertexArray(null)}},resizeOffscreenFramebuffer:function(context){var gl=context.GLctx;if(context.defaultColorTarget){var prevTextureBinding=gl.getParameter(32873);gl.bindTexture(3553,context.defaultColorTarget);gl.texImage2D(3553,0,6408,gl.drawingBufferWidth,gl.drawingBufferHeight,0,6408,5121,null);gl.bindTexture(3553,prevTextureBinding)}if(context.defaultDepthTarget){var prevRenderBufferBinding=gl.getParameter(36007);gl.bindRenderbuffer(36161,context.defaultDepthTarget);gl.renderbufferStorage(36161,33189,gl.drawingBufferWidth,gl.drawingBufferHeight);gl.bindRenderbuffer(36161,prevRenderBufferBinding)}},blitOffscreenFramebuffer:function(context){var gl=context.GLctx;var prevScissorTest=gl.getParameter(3089);if(prevScissorTest)gl.disable(3089);var prevFbo=gl.getParameter(36006);if(gl.blitFramebuffer&&!context.defaultFboForbidBlitFramebuffer){gl.bindFramebuffer(36008,context.defaultFbo);gl.bindFramebuffer(36009,null);gl.blitFramebuffer(0,0,gl.canvas.width,gl.canvas.height,0,0,gl.canvas.width,gl.canvas.height,16384,9728)}else{gl.bindFramebuffer(36160,null);var prevProgram=gl.getParameter(35725);gl.useProgram(context.blitProgram);var prevVB=gl.getParameter(34964);gl.bindBuffer(34962,context.blitVB);var prevActiveTexture=gl.getParameter(34016);gl.activeTexture(33984);var prevTextureBinding=gl.getParameter(32873);gl.bindTexture(3553,context.defaultColorTarget);var prevBlend=gl.getParameter(3042);if(prevBlend)gl.disable(3042);var prevCullFace=gl.getParameter(2884);if(prevCullFace)gl.disable(2884);var prevDepthTest=gl.getParameter(2929);if(prevDepthTest)gl.disable(2929);var prevStencilTest=gl.getParameter(2960);if(prevStencilTest)gl.disable(2960);function draw(){gl.vertexAttribPointer(context.blitPosLoc,2,5126,false,0,0);gl.drawArrays(5,0,4)}if(context.defaultVao){var prevVAO=gl.getParameter(34229);gl.bindVertexArray(context.defaultVao);draw();gl.bindVertexArray(prevVAO)}else{var prevVertexAttribPointer={buffer:gl.getVertexAttrib(context.blitPosLoc,34975),size:gl.getVertexAttrib(context.blitPosLoc,34339),stride:gl.getVertexAttrib(context.blitPosLoc,34340),type:gl.getVertexAttrib(context.blitPosLoc,34341),normalized:gl.getVertexAttrib(context.blitPosLoc,34922),pointer:gl.getVertexAttribOffset(context.blitPosLoc,34373)};var maxVertexAttribs=gl.getParameter(34921);var prevVertexAttribEnables=[];for(var i=0;i<maxVertexAttribs;++i){var prevEnabled=gl.getVertexAttrib(i,34338);var wantEnabled=i==context.blitPosLoc;if(prevEnabled&&!wantEnabled){gl.disableVertexAttribArray(i)}if(!prevEnabled&&wantEnabled){gl.enableVertexAttribArray(i)}prevVertexAttribEnables[i]=prevEnabled}draw();for(var i=0;i<maxVertexAttribs;++i){var prevEnabled=prevVertexAttribEnables[i];var nowEnabled=i==context.blitPosLoc;if(prevEnabled&&!nowEnabled){gl.enableVertexAttribArray(i)}if(!prevEnabled&&nowEnabled){gl.disableVertexAttribArray(i)}}gl.bindBuffer(34962,prevVertexAttribPointer.buffer);gl.vertexAttribPointer(context.blitPosLoc,prevVertexAttribPointer.size,prevVertexAttribPointer.type,prevVertexAttribPointer.normalized,prevVertexAttribPointer.stride,prevVertexAttribPointer.offset)}if(prevStencilTest)gl.enable(2960);if(prevDepthTest)gl.enable(2929);if(prevCullFace)gl.enable(2884);if(prevBlend)gl.enable(3042);gl.bindTexture(3553,prevTextureBinding);gl.activeTexture(prevActiveTexture);gl.bindBuffer(34962,prevVB);gl.useProgram(prevProgram)}gl.bindFramebuffer(36160,prevFbo);if(prevScissorTest)gl.enable(3089)},registerContext:function(ctx,webGLContextAttributes){var handle=GL.getNewId(GL.contexts);var context={handle:handle,attributes:webGLContextAttributes,version:webGLContextAttributes.majorVersion,GLctx:ctx};if(ctx.canvas)ctx.canvas.GLctxObject=context;GL.contexts[handle]=context;if(typeof webGLContextAttributes.enableExtensionsByDefault===\"undefined\"||webGLContextAttributes.enableExtensionsByDefault){GL.initExtensions(context)}context.maxVertexAttribs=context.GLctx.getParameter(34921);context.clientBuffers=[];for(var i=0;i<context.maxVertexAttribs;i++){context.clientBuffers[i]={enabled:false,clientside:false,size:0,type:0,normalized:0,stride:0,ptr:0,vertexAttribPointerAdaptor:null}}GL.generateTempBuffers(false,context);if(webGLContextAttributes.renderViaOffscreenBackBuffer)GL.createOffscreenFramebuffer(context);return handle},makeContextCurrent:function(contextHandle){GL.currentContext=GL.contexts[contextHandle];Module.ctx=GLctx=GL.currentContext&&GL.currentContext.GLctx;return!(contextHandle&&!GLctx)},getContext:function(contextHandle){return GL.contexts[contextHandle]},deleteContext:function(contextHandle){if(GL.currentContext===GL.contexts[contextHandle])GL.currentContext=null;if(typeof JSEvents===\"object\")JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas);if(GL.contexts[contextHandle]&&GL.contexts[contextHandle].GLctx.canvas)GL.contexts[contextHandle].GLctx.canvas.GLctxObject=undefined;GL.contexts[contextHandle]=null},initExtensions:function(context){if(!context)context=GL.currentContext;if(context.initExtensionsDone)return;context.initExtensionsDone=true;var GLctx=context.GLctx;__webgl_enable_ANGLE_instanced_arrays(GLctx);__webgl_enable_OES_vertex_array_object(GLctx);__webgl_enable_WEBGL_draw_buffers(GLctx);__webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(GLctx);__webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(GLctx);if(context.version>=2){GLctx.disjointTimerQueryExt=GLctx.getExtension(\"EXT_disjoint_timer_query_webgl2\")}if(context.version<2||!GLctx.disjointTimerQueryExt){GLctx.disjointTimerQueryExt=GLctx.getExtension(\"EXT_disjoint_timer_query\")}__webgl_enable_WEBGL_multi_draw(GLctx);var exts=GLctx.getSupportedExtensions()||[];exts.forEach(function(ext){if(!ext.includes(\"lose_context\")&&!ext.includes(\"debug\")){GLctx.getExtension(ext)}})}};var JSEvents={inEventHandler:0,removeAllEventListeners:function(){for(var i=JSEvents.eventHandlers.length-1;i>=0;--i){JSEvents._removeHandler(i)}JSEvents.eventHandlers=[];JSEvents.deferredCalls=[]},registerRemoveEventListeners:function(){if(!JSEvents.removeEventListenersRegistered){__ATEXIT__.push(JSEvents.removeAllEventListeners);JSEvents.removeEventListenersRegistered=true}},deferredCalls:[],deferCall:function(targetFunction,precedence,argsList){function arraysHaveEqualContent(arrA,arrB){if(arrA.length!=arrB.length)return false;for(var i in arrA){if(arrA[i]!=arrB[i])return false}return true}for(var i in JSEvents.deferredCalls){var call=JSEvents.deferredCalls[i];if(call.targetFunction==targetFunction&&arraysHaveEqualContent(call.argsList,argsList)){return}}JSEvents.deferredCalls.push({targetFunction:targetFunction,precedence:precedence,argsList:argsList});JSEvents.deferredCalls.sort(function(x,y){return x.precedence<y.precedence})},removeDeferredCalls:function(targetFunction){for(var i=0;i<JSEvents.deferredCalls.length;++i){if(JSEvents.deferredCalls[i].targetFunction==targetFunction){JSEvents.deferredCalls.splice(i,1);--i}}},canPerformEventHandlerRequests:function(){return JSEvents.inEventHandler&&JSEvents.currentEventHandler.allowsDeferredCalls},runDeferredCalls:function(){if(!JSEvents.canPerformEventHandlerRequests()){return}for(var i=0;i<JSEvents.deferredCalls.length;++i){var call=JSEvents.deferredCalls[i];JSEvents.deferredCalls.splice(i,1);--i;call.targetFunction.apply(null,call.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:function(target,eventTypeString){for(var i=0;i<JSEvents.eventHandlers.length;++i){if(JSEvents.eventHandlers[i].target==target&&(!eventTypeString||eventTypeString==JSEvents.eventHandlers[i].eventTypeString)){JSEvents._removeHandler(i--)}}},_removeHandler:function(i){var h=JSEvents.eventHandlers[i];h.target.removeEventListener(h.eventTypeString,h.eventListenerFunc,h.useCapture);JSEvents.eventHandlers.splice(i,1)},registerOrRemoveHandler:function(eventHandler){var jsEventHandler=function jsEventHandler(event){++JSEvents.inEventHandler;JSEvents.currentEventHandler=eventHandler;JSEvents.runDeferredCalls();eventHandler.handlerFunc(event);JSEvents.runDeferredCalls();--JSEvents.inEventHandler};if(eventHandler.callbackfunc){eventHandler.eventListenerFunc=jsEventHandler;eventHandler.target.addEventListener(eventHandler.eventTypeString,jsEventHandler,eventHandler.useCapture);JSEvents.eventHandlers.push(eventHandler);JSEvents.registerRemoveEventListeners()}else{for(var i=0;i<JSEvents.eventHandlers.length;++i){if(JSEvents.eventHandlers[i].target==eventHandler.target&&JSEvents.eventHandlers[i].eventTypeString==eventHandler.eventTypeString){JSEvents._removeHandler(i--)}}}},getNodeNameForTarget:function(target){if(!target)return\"\";if(target==window)return\"#window\";if(target==screen)return\"#screen\";return target&&target.nodeName?target.nodeName:\"\"},fullscreenEnabled:function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled}};var __emscripten_webgl_power_preferences=[\"default\",\"low-power\",\"high-performance\"];var specialHTMLTargets=[0,typeof document!==\"undefined\"?document:0,typeof window!==\"undefined\"?window:0];function findEventTarget(target){warnOnce(\"Rules for selecting event targets in HTML5 API are changing: instead of using document.getElementById() that only can refer to elements by their DOM ID, new event target selection mechanism uses the more flexible function document.querySelector() that can look up element names, classes, and complex CSS selectors. Build with -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1 to change to the new lookup rules. See https://github.com/emscripten-core/emscripten/pull/7977 for more details.\");try{if(!target)return window;if(typeof target===\"number\")target=specialHTMLTargets[target]||UTF8ToString(target);if(target===\"#window\")return window;else if(target===\"#document\")return document;else if(target===\"#screen\")return screen;else if(target===\"#canvas\")return Module[\"canvas\"];return typeof target===\"string\"?document.getElementById(target):target}catch(e){return null}}function findCanvasEventTarget(target){if(typeof target===\"number\")target=UTF8ToString(target);if(!target||target===\"#canvas\"){if(typeof GL!==\"undefined\"&&GL.offscreenCanvases[\"canvas\"])return GL.offscreenCanvases[\"canvas\"];return Module[\"canvas\"]}if(typeof GL!==\"undefined\"&&GL.offscreenCanvases[target])return GL.offscreenCanvases[target];return findEventTarget(target)}function _emscripten_webgl_do_create_context(target,attributes){assert(attributes);var a=attributes>>2;var powerPreference=HEAP32[a+(24>>2)];var contextAttributes={\"alpha\":!!HEAP32[a+(0>>2)],\"depth\":!!HEAP32[a+(4>>2)],\"stencil\":!!HEAP32[a+(8>>2)],\"antialias\":!!HEAP32[a+(12>>2)],\"premultipliedAlpha\":!!HEAP32[a+(16>>2)],\"preserveDrawingBuffer\":!!HEAP32[a+(20>>2)],\"powerPreference\":__emscripten_webgl_power_preferences[powerPreference],\"failIfMajorPerformanceCaveat\":!!HEAP32[a+(28>>2)],majorVersion:HEAP32[a+(32>>2)],minorVersion:HEAP32[a+(36>>2)],enableExtensionsByDefault:HEAP32[a+(40>>2)],explicitSwapControl:HEAP32[a+(44>>2)],proxyContextToMainThread:HEAP32[a+(48>>2)],renderViaOffscreenBackBuffer:HEAP32[a+(52>>2)]};var canvas=findCanvasEventTarget(target);if(!canvas){return 0}if(canvas.offscreenCanvas)canvas=canvas.offscreenCanvas;if(contextAttributes.explicitSwapControl){var supportsOffscreenCanvas=canvas.transferControlToOffscreen||typeof OffscreenCanvas!==\"undefined\"&&canvas instanceof OffscreenCanvas;if(!supportsOffscreenCanvas){if(!contextAttributes.renderViaOffscreenBackBuffer){contextAttributes.renderViaOffscreenBackBuffer=true}}if(canvas.transferControlToOffscreen){if(!canvas.controlTransferredOffscreen){GL.offscreenCanvases[canvas.id]={canvas:canvas.transferControlToOffscreen(),canvasSharedPtr:_malloc(12),id:canvas.id};canvas.controlTransferredOffscreen=true}else if(!GL.offscreenCanvases[canvas.id]){return 0}canvas=GL.offscreenCanvases[canvas.id]}}var contextHandle=GL.createContext(canvas,contextAttributes);return contextHandle}function _emscripten_webgl_create_context(a0,a1){return _emscripten_webgl_do_create_context(a0,a1)}function _emscripten_webgl_do_get_current_context(){return GL.currentContext?GL.currentContext.handle:0}function _emscripten_webgl_get_current_context(){return _emscripten_webgl_do_get_current_context()}Module[\"_emscripten_webgl_get_current_context\"]=_emscripten_webgl_get_current_context;function _emscripten_webgl_make_context_current(contextHandle){var success=GL.makeContextCurrent(contextHandle);return success?0:-5}Module[\"_emscripten_webgl_make_context_current\"]=_emscripten_webgl_make_context_current;function _emscripten_webgl_destroy_context(contextHandle){if(GL.currentContext==contextHandle)GL.currentContext=0;GL.deleteContext(contextHandle)}function _emscripten_webgl_get_context_attributes(c,a){if(!a)return-5;c=GL.contexts[c];if(!c)return-3;var t=c.GLctx;if(!t)return-3;t=t.getContextAttributes();HEAP32[a>>2]=t.alpha;HEAP32[a+4>>2]=t.depth;HEAP32[a+8>>2]=t.stencil;HEAP32[a+12>>2]=t.antialias;HEAP32[a+16>>2]=t.premultipliedAlpha;HEAP32[a+20>>2]=t.preserveDrawingBuffer;var power=t[\"powerPreference\"]&&__emscripten_webgl_power_preferences.indexOf(t[\"powerPreference\"]);HEAP32[a+24>>2]=power;HEAP32[a+28>>2]=t.failIfMajorPerformanceCaveat;HEAP32[a+32>>2]=c.version;HEAP32[a+36>>2]=0;HEAP32[a+40>>2]=c.attributes.enableExtensionsByDefault;return 0}function _emscripten_webgl_init_context_attributes(attributes){assert(attributes);var a=attributes>>2;for(var i=0;i<56>>2;++i){HEAP32[a+i]=0}HEAP32[a+(0>>2)]=HEAP32[a+(4>>2)]=HEAP32[a+(12>>2)]=HEAP32[a+(16>>2)]=HEAP32[a+(32>>2)]=HEAP32[a+(40>>2)]=1}var ENV={};function getExecutableName(){return thisProgram||\"./this.program\"}function 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}function _environ_get(__environ,environ_buf){var bufSize=0;getEnvStrings().forEach(function(string,i){var ptr=environ_buf+bufSize;HEAP32[__environ+i*4>>2]=ptr;writeAsciiToMemory(string,ptr);bufSize+=string.length+1});return 0}function _environ_sizes_get(penviron_count,penviron_buf_size){var strings=getEnvStrings();HEAP32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1});HEAP32[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 instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_read(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=SYSCALLS.doReadv(stream,iov,iovcnt);HEAP32[pnum>>2]=num;return 0}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){try{var stream=SYSCALLS.getStreamFromFD(fd);var HIGH_OFFSET=4294967296;var offset=offset_high*HIGH_OFFSET+(offset_low>>>0);var DOUBLE_LIMIT=9007199254740992;if(offset<=-DOUBLE_LIMIT||offset>=DOUBLE_LIMIT){return-61}FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[newOffset>>2]=tempI64[0],HEAP32[newOffset+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_write(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=SYSCALLS.doWritev(stream,iov,iovcnt);HEAP32[pnum>>2]=num;return 0}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _getTempRet0(){return getTempRet0()}function _getentropy(buffer,size){if(!_getentropy.randomDevice){_getentropy.randomDevice=getRandomDevice()}for(var i=0;i<size;i++){HEAP8[buffer+i>>0]=_getentropy.randomDevice()}return 0}function _glActiveTexture(x0){GLctx[\"activeTexture\"](x0)}function _glAttachShader(program,shader){GLctx.attachShader(GL.programs[program],GL.shaders[shader])}function _glBindAttribLocation(program,index,name){GLctx.bindAttribLocation(GL.programs[program],index,UTF8ToString(name))}function _glBindBuffer(target,buffer){if(target==34962){GLctx.currentArrayBufferBinding=buffer}else if(target==34963){GLctx.currentElementArrayBufferBinding=buffer}if(target==35051){GLctx.currentPixelPackBufferBinding=buffer}else if(target==35052){GLctx.currentPixelUnpackBufferBinding=buffer}GLctx.bindBuffer(target,GL.buffers[buffer])}function _glBindBufferBase(target,index,buffer){GLctx[\"bindBufferBase\"](target,index,GL.buffers[buffer])}function _glBindFramebuffer(target,framebuffer){GLctx.bindFramebuffer(target,framebuffer?GL.framebuffers[framebuffer]:GL.currentContext.defaultFbo)}function _glBindTexture(target,texture){GLctx.bindTexture(target,GL.textures[texture])}function _glBindVertexArray(vao){GLctx[\"bindVertexArray\"](GL.vaos[vao]);var ibo=GLctx.getParameter(34965);GLctx.currentElementArrayBufferBinding=ibo?ibo.name|0:0}function _glBufferData(target,size,data,usage){if(GL.currentContext.version>=2){if(data){GLctx.bufferData(target,HEAPU8,usage,data,size)}else{GLctx.bufferData(target,size,usage)}}else{GLctx.bufferData(target,data?HEAPU8.subarray(data,data+size):size,usage)}}function convertI32PairToI53(lo,hi){assert(hi===(hi|0));return(lo>>>0)+hi*4294967296}function _glClientWaitSync(sync,flags,timeoutLo,timeoutHi){return GLctx.clientWaitSync(GL.syncs[sync],flags,convertI32PairToI53(timeoutLo,timeoutHi))}function _glCompileShader(shader){GLctx.compileShader(GL.shaders[shader])}function _glCreateProgram(){var id=GL.getNewId(GL.programs);var program=GLctx.createProgram();program.name=id;program.maxUniformLength=program.maxAttributeLength=program.maxUniformBlockNameLength=0;program.uniformIdCounter=1;GL.programs[id]=program;return id}function _glCreateShader(shaderType){var id=GL.getNewId(GL.shaders);GL.shaders[id]=GLctx.createShader(shaderType);return id}function _glDeleteBuffers(n,buffers){for(var i=0;i<n;i++){var id=HEAP32[buffers+i*4>>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GLctx.currentArrayBufferBinding)GLctx.currentArrayBufferBinding=0;if(id==GLctx.currentElementArrayBufferBinding)GLctx.currentElementArrayBufferBinding=0;if(id==GLctx.currentPixelPackBufferBinding)GLctx.currentPixelPackBufferBinding=0;if(id==GLctx.currentPixelUnpackBufferBinding)GLctx.currentPixelUnpackBufferBinding=0}}function _glDeleteFramebuffers(n,framebuffers){for(var i=0;i<n;++i){var id=HEAP32[framebuffers+i*4>>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}function _glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null}function _glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _glDeleteSync(id){if(!id)return;var sync=GL.syncs[id];if(!sync){GL.recordError(1281);return}GLctx.deleteSync(sync);sync.name=0;GL.syncs[id]=null}function _glDeleteTextures(n,textures){for(var i=0;i<n;i++){var id=HEAP32[textures+i*4>>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _glDeleteVertexArrays(n,vaos){for(var i=0;i<n;i++){var id=HEAP32[vaos+i*4>>2];GLctx[\"deleteVertexArray\"](GL.vaos[id]);GL.vaos[id]=null}}function _glDisable(x0){GLctx[\"disable\"](x0)}function _glDisableVertexAttribArray(index){var cb=GL.currentContext.clientBuffers[index];cb.enabled=false;GLctx.disableVertexAttribArray(index)}function _glDrawArrays(mode,first,count){GL.preDrawHandleClientVertexAttribBindings(first+count);GLctx.drawArrays(mode,first,count);GL.postDrawHandleClientVertexAttribBindings()}var tempFixedLengthArray=[];function _glDrawBuffers(n,bufs){var bufArray=tempFixedLengthArray[n];for(var i=0;i<n;i++){bufArray[i]=HEAP32[bufs+i*4>>2]}GLctx[\"drawBuffers\"](bufArray)}function _glEnableVertexAttribArray(index){var cb=GL.currentContext.clientBuffers[index];cb.enabled=true;GLctx.enableVertexAttribArray(index)}function _glFenceSync(condition,flags){var sync=GLctx.fenceSync(condition,flags);if(sync){var id=GL.getNewId(GL.syncs);sync.name=id;GL.syncs[id]=sync;return id}else{return 0}}function _glFinish(){GLctx[\"finish\"]()}function _glFlush(){GLctx[\"flush\"]()}function _glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}function _glFramebufferTextureLayer(target,attachment,texture,level,layer){GLctx.framebufferTextureLayer(target,attachment,GL.textures[texture],level,layer)}function __glGenObject(n,buffers,createFunction,objectTable){for(var i=0;i<n;i++){var buffer=GLctx[createFunction]();var id=buffer&&GL.getNewId(objectTable);if(buffer){buffer.name=id;objectTable[id]=buffer}else{GL.recordError(1282)}HEAP32[buffers+i*4>>2]=id}}function _glGenBuffers(n,buffers){__glGenObject(n,buffers,\"createBuffer\",GL.buffers)}function _glGenFramebuffers(n,ids){__glGenObject(n,ids,\"createFramebuffer\",GL.framebuffers)}function _glGenTextures(n,textures){__glGenObject(n,textures,\"createTexture\",GL.textures)}function _glGenVertexArrays(n,arrays){__glGenObject(n,arrays,\"createVertexArray\",GL.vaos)}function _glGetAttribLocation(program,name){return GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name))}function _glGetError(){var error=GLctx.getError()||GL.lastError;GL.lastError=0;return error}function _glGetFramebufferAttachmentParameteriv(target,attachment,pname,params){var result=GLctx.getFramebufferAttachmentParameter(target,attachment,pname);if(result instanceof WebGLRenderbuffer||result instanceof WebGLTexture){result=result.name|0}HEAP32[params>>2]=result}function readI53FromI64(ptr){return HEAPU32[ptr>>2]+HEAP32[ptr+4>>2]*4294967296}function readI53FromU64(ptr){return HEAPU32[ptr>>2]+HEAPU32[ptr+4>>2]*4294967296}function writeI53ToI64(ptr,num){HEAPU32[ptr>>2]=num;HEAPU32[ptr+4>>2]=(num-HEAPU32[ptr>>2])/4294967296;var deserialized=num>=0?readI53FromU64(ptr):readI53FromI64(ptr);if(deserialized!=num)warnOnce(\"writeI53ToI64() out of range: serialized JS Number \"+num+\" to Wasm heap as bytes lo=0x\"+HEAPU32[ptr>>2].toString(16)+\", hi=0x\"+HEAPU32[ptr+4>>2].toString(16)+\", which deserializes back to \"+deserialized+\" instead!\")}function emscriptenWebGLGet(name_,p,type){if(!p){GL.recordError(1281);return}var ret=undefined;switch(name_){case 36346:ret=1;break;case 36344:if(type!=0&&type!=1){GL.recordError(1280)}return;case 34814:case 36345:ret=0;break;case 34466:var formats=GLctx.getParameter(34467);ret=formats?formats.length:0;break;case 33309:if(GL.currentContext.version<2){GL.recordError(1282);return}var exts=GLctx.getSupportedExtensions()||[];ret=2*exts.length;break;case 33307:case 33308:if(GL.currentContext.version<2){GL.recordError(1280);return}ret=name_==33307?3:0;break}if(ret===undefined){var result=GLctx.getParameter(name_);switch(typeof result){case\"number\":ret=result;break;case\"boolean\":ret=result?1:0;break;case\"string\":GL.recordError(1280);return;case\"object\":if(result===null){switch(name_){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:{ret=0;break}default:{GL.recordError(1280);return}}}else if(result instanceof Float32Array||result instanceof Uint32Array||result instanceof Int32Array||result instanceof Array){for(var i=0;i<result.length;++i){switch(type){case 0:HEAP32[p+i*4>>2]=result[i];break;case 2:HEAPF32[p+i*4>>2]=result[i];break;case 4:HEAP8[p+i>>0]=result[i]?1:0;break}}return}else{try{ret=result.name|0}catch(e){GL.recordError(1280);err(\"GL_INVALID_ENUM in glGet\"+type+\"v: Unknown object returned from WebGL getParameter(\"+name_+\")! (error: \"+e+\")\");return}}break;default:GL.recordError(1280);err(\"GL_INVALID_ENUM in glGet\"+type+\"v: Native code calling glGet\"+type+\"v(\"+name_+\") and it returns \"+result+\" of type \"+typeof result+\"!\");return}}switch(type){case 1:writeI53ToI64(p,ret);break;case 0:HEAP32[p>>2]=ret;break;case 2:HEAPF32[p>>2]=ret;break;case 4:HEAP8[p>>0]=ret?1:0;break}}function _glGetIntegerv(name_,p){emscriptenWebGLGet(name_,p,0)}function stringToNewUTF8(jsString){var length=lengthBytesUTF8(jsString)+1;var cString=_malloc(length);stringToUTF8(jsString,cString,length);return cString}function _glGetString(name_){var ret=GL.stringCache[name_];if(!ret){switch(name_){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return\"GL_\"+e}));ret=stringToNewUTF8(exts.join(\" \"));break;case 7936:case 7937:case 37445:case 37446:var s=GLctx.getParameter(name_);if(!s){GL.recordError(1280)}ret=s&&stringToNewUTF8(s);break;case 7938:var glVersion=GLctx.getParameter(7938);if(GL.currentContext.version>=2)glVersion=\"OpenGL ES 3.0 (\"+glVersion+\")\";else{glVersion=\"OpenGL ES 2.0 (\"+glVersion+\")\"}ret=stringToNewUTF8(glVersion);break;case 35724:var glslVersion=GLctx.getParameter(35724);var ver_re=/^WebGL GLSL ES ([0-9]\\.[0-9][0-9]?)(?:$| .*)/;var ver_num=glslVersion.match(ver_re);if(ver_num!==null){if(ver_num[1].length==3)ver_num[1]=ver_num[1]+\"0\";glslVersion=\"OpenGL ES GLSL ES \"+ver_num[1]+\" (\"+glslVersion+\")\"}ret=stringToNewUTF8(glslVersion);break;default:GL.recordError(1280)}GL.stringCache[name_]=ret}return ret}function _glGetUniformBlockIndex(program,uniformBlockName){return GLctx[\"getUniformBlockIndex\"](GL.programs[program],UTF8ToString(uniformBlockName))}function jstoi_q(str){return parseInt(str)}function webglGetLeftBracePos(name){return name.slice(-1)==\"]\"&&name.lastIndexOf(\"[\")}function webglPrepareUniformLocationsBeforeFirstUse(program){var uniformLocsById=program.uniformLocsById,uniformSizeAndIdsByName=program.uniformSizeAndIdsByName,i,j;if(!uniformLocsById){program.uniformLocsById=uniformLocsById={};program.uniformArrayNamesById={};for(i=0;i<GLctx.getProgramParameter(program,35718);++i){var u=GLctx.getActiveUniform(program,i);var nm=u.name;var sz=u.size;var lb=webglGetLeftBracePos(nm);var arrayName=lb>0?nm.slice(0,lb):nm;var id=program.uniformIdCounter;program.uniformIdCounter+=sz;uniformSizeAndIdsByName[arrayName]=[sz,id];for(j=0;j<sz;++j){uniformLocsById[id]=j;program.uniformArrayNamesById[id++]=arrayName}}}}function _glGetUniformLocation(program,name){name=UTF8ToString(name);if(program=GL.programs[program]){webglPrepareUniformLocationsBeforeFirstUse(program);var uniformLocsById=program.uniformLocsById;var arrayIndex=0;var uniformBaseName=name;var leftBrace=webglGetLeftBracePos(name);if(leftBrace>0){arrayIndex=jstoi_q(name.slice(leftBrace+1))>>>0;uniformBaseName=name.slice(0,leftBrace)}var sizeAndId=program.uniformSizeAndIdsByName[uniformBaseName];if(sizeAndId&&arrayIndex<sizeAndId[0]){arrayIndex+=sizeAndId[1];if(uniformLocsById[arrayIndex]=uniformLocsById[arrayIndex]||GLctx.getUniformLocation(program,name)){return arrayIndex}}}else{GL.recordError(1281)}return-1}function _glLinkProgram(program){program=GL.programs[program];GLctx.linkProgram(program);program.uniformLocsById=0;program.uniformSizeAndIdsByName={}}function _glPixelStorei(pname,param){if(pname==3317){GL.unpackAlignment=param}GLctx.pixelStorei(pname,param)}function computeUnpackAlignedImageSize(width,height,sizePerPixel,alignment){function roundedToNextMultipleOf(x,y){return x+y-1&-y}var plainRowSize=width*sizePerPixel;var alignedRowSize=roundedToNextMultipleOf(plainRowSize,alignment);return height*alignedRowSize}function __colorChannelsInGlTextureFormat(format){var colorChannels={5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4};return colorChannels[format-6402]||1}function heapObjectForWebGLType(type){type-=5120;if(type==0)return HEAP8;if(type==1)return HEAPU8;if(type==2)return HEAP16;if(type==4)return HEAP32;if(type==6)return HEAPF32;if(type==5||type==28922||type==28520||type==30779||type==30782)return HEAPU32;return HEAPU16}function heapAccessShiftForWebGLHeap(heap){return 31-Math.clz32(heap.BYTES_PER_ELEMENT)}function emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat){var heap=heapObjectForWebGLType(type);var shift=heapAccessShiftForWebGLHeap(heap);var byteSize=1<<shift;var sizePerPixel=__colorChannelsInGlTextureFormat(format)*byteSize;var bytes=computeUnpackAlignedImageSize(width,height,sizePerPixel,GL.unpackAlignment);return heap.subarray(pixels>>shift,pixels+bytes>>shift)}function _glReadPixels(x,y,width,height,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelPackBufferBinding){GLctx.readPixels(x,y,width,height,format,type,pixels)}else{var heap=heapObjectForWebGLType(type);GLctx.readPixels(x,y,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}return}var pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,format);if(!pixelData){GL.recordError(1280);return}GLctx.readPixels(x,y,width,height,format,type,pixelData)}function _glShaderSource(shader,count,string,length){var source=GL.getSource(shader,count,string,length);GLctx.shaderSource(GL.shaders[shader],source)}function _glTexImage2D(target,level,internalFormat,width,height,border,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,null)}return}GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels?emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat):null)}function _glTexParameterfv(target,pname,params){var param=HEAPF32[params>>2];GLctx.texParameterf(target,pname,param)}function _glTexParameteri(x0,x1,x2){GLctx[\"texParameteri\"](x0,x1,x2)}function _glTexStorage2D(x0,x1,x2,x3,x4){GLctx[\"texStorage2D\"](x0,x1,x2,x3,x4)}function _glTexStorage3D(x0,x1,x2,x3,x4,x5){GLctx[\"texStorage3D\"](x0,x1,x2,x3,x4,x5)}function _glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,null)}return}var pixelData=null;if(pixels)pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,0);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixelData)}function _glTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx[\"texSubImage3D\"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx[\"texSubImage3D\"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx[\"texSubImage3D\"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,null)}}function webglGetUniformLocation(location){var p=GLctx.currentProgram;if(p){var webglLoc=p.uniformLocsById[location];if(typeof webglLoc===\"number\"){p.uniformLocsById[location]=webglLoc=GLctx.getUniformLocation(p,p.uniformArrayNamesById[location]+(webglLoc>0?\"[\"+webglLoc+\"]\":\"\"))}return webglLoc}else{GL.recordError(1282)}}function _glUniform1f(location,v0){GLctx.uniform1f(webglGetUniformLocation(location),v0)}function _glUniform1i(location,v0){GLctx.uniform1i(webglGetUniformLocation(location),v0)}var miniTempWebGLFloatBuffers=[];function _glUniform2fv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform2fv(webglGetUniformLocation(location),HEAPF32,value>>2,count*2);return}if(count<=144){var view=miniTempWebGLFloatBuffers[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2fv(webglGetUniformLocation(location),view)}function _glUniform4fv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform4fv(webglGetUniformLocation(location),HEAPF32,value>>2,count*4);return}if(count<=72){var view=miniTempWebGLFloatBuffers[4*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<4*count;i+=4){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4fv(webglGetUniformLocation(location),view)}var __miniTempWebGLIntBuffers=[];function _glUniform4iv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform4iv(webglGetUniformLocation(location),HEAP32,value>>2,count*4);return}if(count<=72){var view=__miniTempWebGLIntBuffers[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2];view[i+2]=HEAP32[value+(4*i+8)>>2];view[i+3]=HEAP32[value+(4*i+12)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4iv(webglGetUniformLocation(location),view)}function _glUniformBlockBinding(program,uniformBlockIndex,uniformBlockBinding){program=GL.programs[program];GLctx[\"uniformBlockBinding\"](program,uniformBlockIndex,uniformBlockBinding)}function _glUniformMatrix4fv(location,count,transpose,value){if(GL.currentContext.version>=2){GLctx.uniformMatrix4fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*16);return}if(count<=18){var view=miniTempWebGLFloatBuffers[16*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<16*count;i+=16){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3];view[i+4]=heap[dst+4];view[i+5]=heap[dst+5];view[i+6]=heap[dst+6];view[i+7]=heap[dst+7];view[i+8]=heap[dst+8];view[i+9]=heap[dst+9];view[i+10]=heap[dst+10];view[i+11]=heap[dst+11];view[i+12]=heap[dst+12];view[i+13]=heap[dst+13];view[i+14]=heap[dst+14];view[i+15]=heap[dst+15]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(webglGetUniformLocation(location),!!transpose,view)}function _glUseProgram(program){program=GL.programs[program];GLctx.useProgram(program);GLctx.currentProgram=program}function _glVertexAttribPointer(index,size,type,normalized,stride,ptr){var cb=GL.currentContext.clientBuffers[index];if(!GLctx.currentArrayBufferBinding){cb.size=size;cb.type=type;cb.normalized=normalized;cb.stride=stride;cb.ptr=ptr;cb.clientside=true;cb.vertexAttribPointerAdaptor=function(index,size,type,normalized,stride,ptr){this.vertexAttribPointer(index,size,type,normalized,stride,ptr)};return}cb.clientside=false;GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _glViewport(x0,x1,x2,x3){GLctx[\"viewport\"](x0,x1,x2,x3)}function _gmtime_r(time,tmPtr){var date=new Date(HEAP32[time>>2]*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();HEAP32[tmPtr+36>>2]=0;HEAP32[tmPtr+32>>2]=0;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;if(!_gmtime_r.GMTString)_gmtime_r.GMTString=allocateUTF8(\"GMT\");HEAP32[tmPtr+40>>2]=_gmtime_r.GMTString;return tmPtr}function _llvm_eh_typeid_for(type){return type}function _tzset(){if(_tzset.called)return;_tzset.called=true;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);HEAP32[__get_timezone()>>2]=stdTimezoneOffset*60;HEAP32[__get_daylight()>>2]=Number(winterOffset!=summerOffset);function extractZone(date){var match=date.toTimeString().match(/\\(([A-Za-z ]+)\\)$/);return match?match[1]:\"GMT\"}var winterName=extractZone(winter);var summerName=extractZone(summer);var winterNamePtr=allocateUTF8(winterName);var summerNamePtr=allocateUTF8(summerName);if(summerOffset<winterOffset){HEAP32[__get_tzname()>>2]=winterNamePtr;HEAP32[__get_tzname()+4>>2]=summerNamePtr}else{HEAP32[__get_tzname()>>2]=summerNamePtr;HEAP32[__get_tzname()+4>>2]=winterNamePtr}}function _localtime_r(time,tmPtr){_tzset();var date=new Date(HEAP32[time>>2]*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 start=new Date(date.getFullYear(),0,1);var yday=(date.getTime()-start.getTime())/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);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 zonePtr=HEAP32[__get_tzname()+(dst?4:0)>>2];HEAP32[tmPtr+40>>2]=zonePtr;return tmPtr}function _mktime(tmPtr){_tzset();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=(date.getTime()-start.getTime())/(1e3*60*60*24)|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();return date.getTime()/1e3|0}function _proc_exit(code){procExit(code)}function _setTempRet0(val){setTempRet0(val)}function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}function __arraySum(array,index){var sum=0;for(var i=0;i<=index;sum+=array[i++]){}return sum}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var __MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(date,days){var newDate=new Date(date.getTime());while(days>0){var leap=__isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate}function _strftime(s,maxsize,format,tm){var tm_zone=HEAP32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?UTF8ToString(tm_zone):\"\"};var pattern=UTF8ToString(format);var EXPANSION_RULES_1={\"%c\":\"%a %b %d %H:%M:%S %Y\",\"%D\":\"%m/%d/%y\",\"%F\":\"%Y-%m-%d\",\"%h\":\"%b\",\"%r\":\"%I:%M:%S %p\",\"%R\":\"%H:%M\",\"%T\":\"%H:%M:%S\",\"%x\":\"%m/%d/%y\",\"%X\":\"%H:%M:%S\",\"%Ec\":\"%c\",\"%EC\":\"%C\",\"%Ex\":\"%m/%d/%y\",\"%EX\":\"%H:%M:%S\",\"%Ey\":\"%y\",\"%EY\":\"%Y\",\"%Od\":\"%d\",\"%Oe\":\"%e\",\"%OH\":\"%H\",\"%OI\":\"%I\",\"%Om\":\"%m\",\"%OM\":\"%M\",\"%OS\":\"%S\",\"%Ou\":\"%u\",\"%OU\":\"%U\",\"%OV\":\"%V\",\"%Ow\":\"%w\",\"%OW\":\"%W\",\"%Oy\":\"%y\"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,\"g\"),EXPANSION_RULES_1[rule])}var WEEKDAYS=[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"];var MONTHS=[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"];function leadingSomething(value,digits,character){var str=typeof value===\"number\"?value.toString():value||\"\";while(str.length<digits){str=character[0]+str}return str}function leadingNulls(value,digits){return leadingSomething(value,digits,\"0\")}function compareByDay(date1,date2){function sgn(value){return value<0?-1:value>0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}else{return thisDate.getFullYear()}}else{return thisDate.getFullYear()-1}}var EXPANSION_RULES_2={\"%a\":function(date){return WEEKDAYS[date.tm_wday].substring(0,3)},\"%A\":function(date){return WEEKDAYS[date.tm_wday]},\"%b\":function(date){return MONTHS[date.tm_mon].substring(0,3)},\"%B\":function(date){return MONTHS[date.tm_mon]},\"%C\":function(date){var year=date.tm_year+1900;return leadingNulls(year/100|0,2)},\"%d\":function(date){return leadingNulls(date.tm_mday,2)},\"%e\":function(date){return leadingSomething(date.tm_mday,2,\" \")},\"%g\":function(date){return getWeekBasedYear(date).toString().substring(2)},\"%G\":function(date){return getWeekBasedYear(date)},\"%H\":function(date){return leadingNulls(date.tm_hour,2)},\"%I\":function(date){var twelveHour=date.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2)},\"%j\":function(date){return leadingNulls(date.tm_mday+__arraySum(__isLeapYear(date.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,date.tm_mon-1),3)},\"%m\":function(date){return leadingNulls(date.tm_mon+1,2)},\"%M\":function(date){return leadingNulls(date.tm_min,2)},\"%n\":function(){return\"\\n\"},\"%p\":function(date){if(date.tm_hour>=0&&date.tm_hour<12){return\"AM\"}else{return\"PM\"}},\"%S\":function(date){return leadingNulls(date.tm_sec,2)},\"%t\":function(){return\"\\t\"},\"%u\":function(date){return date.tm_wday||7},\"%U\":function(date){var janFirst=new Date(date.tm_year+1900,0,1);var firstSunday=janFirst.getDay()===0?janFirst:__addDays(janFirst,7-janFirst.getDay());var endDate=new Date(date.tm_year+1900,date.tm_mon,date.tm_mday);if(compareByDay(firstSunday,endDate)<0){var februaryFirstUntilEndMonth=__arraySum(__isLeapYear(endDate.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,endDate.getMonth()-1)-31;var firstSundayUntilEndJanuary=31-firstSunday.getDate();var days=firstSundayUntilEndJanuary+februaryFirstUntilEndMonth+endDate.getDate();return leadingNulls(Math.ceil(days/7),2)}return compareByDay(firstSunday,janFirst)===0?\"01\":\"00\"},\"%V\":function(date){var janFourthThisYear=new Date(date.tm_year+1900,0,4);var janFourthNextYear=new Date(date.tm_year+1901,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);var endDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);if(compareByDay(endDate,firstWeekStartThisYear)<0){return\"53\"}if(compareByDay(firstWeekStartNextYear,endDate)<=0){return\"01\"}var daysDifference;if(firstWeekStartThisYear.getFullYear()<date.tm_year+1900){daysDifference=date.tm_yday+32-firstWeekStartThisYear.getDate()}else{daysDifference=date.tm_yday+1-firstWeekStartThisYear.getDate()}return leadingNulls(Math.ceil(daysDifference/7),2)},\"%w\":function(date){return date.tm_wday},\"%W\":function(date){var janFirst=new Date(date.tm_year,0,1);var firstMonday=janFirst.getDay()===1?janFirst:__addDays(janFirst,janFirst.getDay()===0?1:7-janFirst.getDay()+1);var endDate=new Date(date.tm_year+1900,date.tm_mon,date.tm_mday);if(compareByDay(firstMonday,endDate)<0){var februaryFirstUntilEndMonth=__arraySum(__isLeapYear(endDate.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,endDate.getMonth()-1)-31;var firstMondayUntilEndJanuary=31-firstMonday.getDate();var days=firstMondayUntilEndJanuary+februaryFirstUntilEndMonth+endDate.getDate();return leadingNulls(Math.ceil(days/7),2)}return compareByDay(firstMonday,janFirst)===0?\"01\":\"00\"},\"%y\":function(date){return(date.tm_year+1900).toString().substring(2)},\"%Y\":function(date){return date.tm_year+1900},\"%z\":function(date){var off=date.tm_gmtoff;var ahead=off>=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?\"+\":\"-\")+String(\"0000\"+off).slice(-4)},\"%Z\":function(date){return date.tm_zone},\"%%\":function(){return\"%\"}};for(var rule in EXPANSION_RULES_2){if(pattern.includes(rule)){pattern=pattern.replace(new RegExp(rule,\"g\"),EXPANSION_RULES_2[rule](date))}}var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1}function _strftime_l(s,maxsize,format,tm){return _strftime(s,maxsize,format,tm)}Module[\"requestFullscreen\"]=function Module_requestFullscreen(lockPointer,resizeCanvas){Browser.requestFullscreen(lockPointer,resizeCanvas)};Module[\"requestFullScreen\"]=function Module_requestFullScreen(){Browser.requestFullScreen()};Module[\"requestAnimationFrame\"]=function Module_requestAnimationFrame(func){Browser.requestAnimationFrame(func)};Module[\"setCanvasSize\"]=function Module_setCanvasSize(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates)};Module[\"pauseMainLoop\"]=function Module_pauseMainLoop(){Browser.mainLoop.pause()};Module[\"resumeMainLoop\"]=function Module_resumeMainLoop(){Browser.mainLoop.resume()};Module[\"getUserMedia\"]=function Module_getUserMedia(){Browser.getUserMedia()};Module[\"createContext\"]=function Module_createContext(canvas,useWebGL,setInModule,webGLContextAttributes){return Browser.createContext(canvas,useWebGL,setInModule,webGLContextAttributes)};var FSNode=function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev};var readMode=292|73;var writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}});FS.FSNode=FSNode;FS.staticInit();Module[\"FS_createPath\"]=FS.createPath;Module[\"FS_createDataFile\"]=FS.createDataFile;Module[\"FS_createPreloadedFile\"]=FS.createPreloadedFile;Module[\"FS_createLazyFile\"]=FS.createLazyFile;Module[\"FS_createDevice\"]=FS.createDevice;Module[\"FS_unlink\"]=FS.unlink;init_emval();PureVirtualError=Module[\"PureVirtualError\"]=extendError(Error,\"PureVirtualError\");embind_init_charCodes();init_embind();BindingError=Module[\"BindingError\"]=extendError(Error,\"BindingError\");InternalError=Module[\"InternalError\"]=extendError(Error,\"InternalError\");init_ClassHandle();init_RegisteredPointer();UnboundTypeError=Module[\"UnboundTypeError\"]=extendError(Error,\"UnboundTypeError\");var GLctx;for(var i=0;i<32;++i)tempFixedLengthArray.push(new Array(i));var miniTempWebGLFloatBuffersStorage=new Float32Array(288);for(var i=0;i<288;++i){miniTempWebGLFloatBuffers[i]=miniTempWebGLFloatBuffersStorage.subarray(0,i+1)}var __miniTempWebGLIntBuffersStorage=new Int32Array(288);for(var i=0;i<288;++i){__miniTempWebGLIntBuffers[i]=__miniTempWebGLIntBuffersStorage.subarray(0,i+1)}var ASSERTIONS=true;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 decodeBase64=typeof atob===\"function\"?atob:function(input){var keyStr=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";var output=\"\";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\\+\\/\\=]/g,\"\");do{enc1=keyStr.indexOf(input.charAt(i++));enc2=keyStr.indexOf(input.charAt(i++));enc3=keyStr.indexOf(input.charAt(i++));enc4=keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2)}if(enc4!==64){output=output+String.fromCharCode(chr3)}}while(i<input.length);return output};function intArrayFromBase64(s){if(typeof ENVIRONMENT_IS_NODE===\"boolean\"&&ENVIRONMENT_IS_NODE){var buf=Buffer.from(s,\"base64\");return new Uint8Array(buf[\"buffer\"],buf[\"byteOffset\"],buf[\"byteLength\"])}try{var decoded=decodeBase64(s);var bytes=new Uint8Array(decoded.length);for(var i=0;i<decoded.length;++i){bytes[i]=decoded.charCodeAt(i)}return bytes}catch(_){throw new Error(\"Converting base64 string to bytes failed.\")}}var asmLibraryArg={\"HaveOffsetConverter\":HaveOffsetConverter,\"__cxa_allocate_exception\":___cxa_allocate_exception,\"__cxa_atexit\":___cxa_atexit,\"__cxa_begin_catch\":___cxa_begin_catch,\"__cxa_end_catch\":___cxa_end_catch,\"__cxa_find_matching_catch_2\":___cxa_find_matching_catch_2,\"__cxa_find_matching_catch_3\":___cxa_find_matching_catch_3,\"__cxa_free_exception\":___cxa_free_exception,\"__cxa_rethrow\":___cxa_rethrow,\"__cxa_thread_atexit\":___cxa_thread_atexit,\"__cxa_throw\":___cxa_throw,\"__resumeException\":___resumeException,\"__sys_fcntl64\":___sys_fcntl64,\"__sys_ioctl\":___sys_ioctl,\"__sys_mmap2\":___sys_mmap2,\"__sys_open\":___sys_open,\"__sys_stat64\":___sys_stat64,\"_embind_create_inheriting_constructor\":__embind_create_inheriting_constructor,\"_embind_finalize_value_object\":__embind_finalize_value_object,\"_embind_register_bigint\":__embind_register_bigint,\"_embind_register_bool\":__embind_register_bool,\"_embind_register_class\":__embind_register_class,\"_embind_register_class_class_function\":__embind_register_class_class_function,\"_embind_register_class_constructor\":__embind_register_class_constructor,\"_embind_register_class_function\":__embind_register_class_function,\"_embind_register_class_property\":__embind_register_class_property,\"_embind_register_emval\":__embind_register_emval,\"_embind_register_float\":__embind_register_float,\"_embind_register_function\":__embind_register_function,\"_embind_register_integer\":__embind_register_integer,\"_embind_register_memory_view\":__embind_register_memory_view,\"_embind_register_std_string\":__embind_register_std_string,\"_embind_register_std_wstring\":__embind_register_std_wstring,\"_embind_register_value_object\":__embind_register_value_object,\"_embind_register_value_object_field\":__embind_register_value_object_field,\"_embind_register_void\":__embind_register_void,\"_emval_call_void_method\":__emval_call_void_method,\"_emval_decref\":__emval_decref,\"_emval_get_method_caller\":__emval_get_method_caller,\"_emval_incref\":__emval_incref,\"_emval_take_value\":__emval_take_value,\"abort\":_abort,\"clock_gettime\":_clock_gettime,\"dlopen\":_dlopen,\"dlsym\":_dlsym,\"emscripten_asm_const_int\":_emscripten_asm_const_int,\"emscripten_get_heap_max\":_emscripten_get_heap_max,\"emscripten_memcpy_big\":_emscripten_memcpy_big,\"emscripten_pc_get_function\":_emscripten_pc_get_function,\"emscripten_resize_heap\":_emscripten_resize_heap,\"emscripten_stack_snapshot\":_emscripten_stack_snapshot,\"emscripten_stack_unwind_buffer\":_emscripten_stack_unwind_buffer,\"emscripten_thread_sleep\":_emscripten_thread_sleep,\"emscripten_webgl_create_context\":_emscripten_webgl_create_context,\"emscripten_webgl_destroy_context\":_emscripten_webgl_destroy_context,\"emscripten_webgl_get_context_attributes\":_emscripten_webgl_get_context_attributes,\"emscripten_webgl_get_current_context\":_emscripten_webgl_get_current_context,\"emscripten_webgl_init_context_attributes\":_emscripten_webgl_init_context_attributes,\"emscripten_webgl_make_context_current\":_emscripten_webgl_make_context_current,\"environ_get\":_environ_get,\"environ_sizes_get\":_environ_sizes_get,\"exit\":_exit,\"fd_close\":_fd_close,\"fd_read\":_fd_read,\"fd_seek\":_fd_seek,\"fd_write\":_fd_write,\"getTempRet0\":_getTempRet0,\"getentropy\":_getentropy,\"glActiveTexture\":_glActiveTexture,\"glAttachShader\":_glAttachShader,\"glBindAttribLocation\":_glBindAttribLocation,\"glBindBuffer\":_glBindBuffer,\"glBindBufferBase\":_glBindBufferBase,\"glBindFramebuffer\":_glBindFramebuffer,\"glBindTexture\":_glBindTexture,\"glBindVertexArray\":_glBindVertexArray,\"glBufferData\":_glBufferData,\"glClientWaitSync\":_glClientWaitSync,\"glCompileShader\":_glCompileShader,\"glCreateProgram\":_glCreateProgram,\"glCreateShader\":_glCreateShader,\"glDeleteBuffers\":_glDeleteBuffers,\"glDeleteFramebuffers\":_glDeleteFramebuffers,\"glDeleteProgram\":_glDeleteProgram,\"glDeleteShader\":_glDeleteShader,\"glDeleteSync\":_glDeleteSync,\"glDeleteTextures\":_glDeleteTextures,\"glDeleteVertexArrays\":_glDeleteVertexArrays,\"glDisable\":_glDisable,\"glDisableVertexAttribArray\":_glDisableVertexAttribArray,\"glDrawArrays\":_glDrawArrays,\"glDrawBuffers\":_glDrawBuffers,\"glEnableVertexAttribArray\":_glEnableVertexAttribArray,\"glFenceSync\":_glFenceSync,\"glFinish\":_glFinish,\"glFlush\":_glFlush,\"glFramebufferTexture2D\":_glFramebufferTexture2D,\"glFramebufferTextureLayer\":_glFramebufferTextureLayer,\"glGenBuffers\":_glGenBuffers,\"glGenFramebuffers\":_glGenFramebuffers,\"glGenTextures\":_glGenTextures,\"glGenVertexArrays\":_glGenVertexArrays,\"glGetAttribLocation\":_glGetAttribLocation,\"glGetError\":_glGetError,\"glGetFramebufferAttachmentParameteriv\":_glGetFramebufferAttachmentParameteriv,\"glGetIntegerv\":_glGetIntegerv,\"glGetString\":_glGetString,\"glGetUniformBlockIndex\":_glGetUniformBlockIndex,\"glGetUniformLocation\":_glGetUniformLocation,\"glLinkProgram\":_glLinkProgram,\"glPixelStorei\":_glPixelStorei,\"glReadPixels\":_glReadPixels,\"glShaderSource\":_glShaderSource,\"glTexImage2D\":_glTexImage2D,\"glTexParameterfv\":_glTexParameterfv,\"glTexParameteri\":_glTexParameteri,\"glTexStorage2D\":_glTexStorage2D,\"glTexStorage3D\":_glTexStorage3D,\"glTexSubImage2D\":_glTexSubImage2D,\"glTexSubImage3D\":_glTexSubImage3D,\"glUniform1f\":_glUniform1f,\"glUniform1i\":_glUniform1i,\"glUniform2fv\":_glUniform2fv,\"glUniform4fv\":_glUniform4fv,\"glUniform4iv\":_glUniform4iv,\"glUniformBlockBinding\":_glUniformBlockBinding,\"glUniformMatrix4fv\":_glUniformMatrix4fv,\"glUseProgram\":_glUseProgram,\"glVertexAttribPointer\":_glVertexAttribPointer,\"glViewport\":_glViewport,\"gmtime_r\":_gmtime_r,\"invoke_diii\":invoke_diii,\"invoke_i\":invoke_i,\"invoke_ii\":invoke_ii,\"invoke_iii\":invoke_iii,\"invoke_iiii\":invoke_iiii,\"invoke_iiiii\":invoke_iiiii,\"invoke_iiiiii\":invoke_iiiiii,\"invoke_iiiiiii\":invoke_iiiiiii,\"invoke_iiiiiiiddi\":invoke_iiiiiiiddi,\"invoke_iiiiiiii\":invoke_iiiiiiii,\"invoke_iiiiiiiii\":invoke_iiiiiiiii,\"invoke_iiiiiiiiii\":invoke_iiiiiiiiii,\"invoke_v\":invoke_v,\"invoke_vdiii\":invoke_vdiii,\"invoke_vi\":invoke_vi,\"invoke_vididdii\":invoke_vididdii,\"invoke_vidii\":invoke_vidii,\"invoke_vii\":invoke_vii,\"invoke_viid\":invoke_viid,\"invoke_viidi\":invoke_viidi,\"invoke_viididii\":invoke_viididii,\"invoke_viii\":invoke_viii,\"invoke_viiid\":invoke_viiid,\"invoke_viiidd\":invoke_viiidd,\"invoke_viiiddi\":invoke_viiiddi,\"invoke_viiidi\":invoke_viiidi,\"invoke_viiii\":invoke_viiii,\"invoke_viiiid\":invoke_viiiid,\"invoke_viiiidi\":invoke_viiiidi,\"invoke_viiiidid\":invoke_viiiidid,\"invoke_viiiidiidiiiiiii\":invoke_viiiidiidiiiiiii,\"invoke_viiiifiifiiiiiii\":invoke_viiiifiifiiiiiii,\"invoke_viiiii\":invoke_viiiii,\"invoke_viiiiid\":invoke_viiiiid,\"invoke_viiiiif\":invoke_viiiiif,\"invoke_viiiiii\":invoke_viiiiii,\"invoke_viiiiiid\":invoke_viiiiiid,\"invoke_viiiiiif\":invoke_viiiiiif,\"invoke_viiiiiii\":invoke_viiiiiii,\"invoke_viiiiiiiddi\":invoke_viiiiiiiddi,\"invoke_viiiiiiidiiii\":invoke_viiiiiiidiiii,\"invoke_viiiiiiifiiii\":invoke_viiiiiiifiiii,\"invoke_viiiiiiii\":invoke_viiiiiiii,\"invoke_viiiiiiiidd\":invoke_viiiiiiiidd,\"invoke_viiiiiiiidf\":invoke_viiiiiiiidf,\"invoke_viiiiiiiii\":invoke_viiiiiiiii,\"invoke_viiiiiiiiidd\":invoke_viiiiiiiiidd,\"invoke_viiiiiiiiiddi\":invoke_viiiiiiiiiddi,\"invoke_viiiiiiiiii\":invoke_viiiiiiiiii,\"invoke_viiiiiiiiiiddi\":invoke_viiiiiiiiiiddi,\"invoke_viiiiiiiiiii\":invoke_viiiiiiiiiii,\"invoke_viiiiiiiiiiii\":invoke_viiiiiiiiiiii,\"invoke_viiiiiiiiiiiii\":invoke_viiiiiiiiiiiii,\"llvm_eh_typeid_for\":_llvm_eh_typeid_for,\"localtime_r\":_localtime_r,\"mktime\":_mktime,\"proc_exit\":_proc_exit,\"setTempRet0\":_setTempRet0,\"strftime\":_strftime,\"strftime_l\":_strftime_l};var asm=createWasm();var ___wasm_call_ctors=Module[\"___wasm_call_ctors\"]=createExportWrapper(\"__wasm_call_ctors\");var _free=Module[\"_free\"]=createExportWrapper(\"free\");var _malloc=Module[\"_malloc\"]=createExportWrapper(\"malloc\");var ___errno_location=Module[\"___errno_location\"]=createExportWrapper(\"__errno_location\");var _fflush=Module[\"_fflush\"]=createExportWrapper(\"fflush\");var ___getTypeName=Module[\"___getTypeName\"]=createExportWrapper(\"__getTypeName\");var ___embind_register_native_and_builtin_types=Module[\"___embind_register_native_and_builtin_types\"]=createExportWrapper(\"__embind_register_native_and_builtin_types\");var _emscripten_main_thread_process_queued_calls=Module[\"_emscripten_main_thread_process_queued_calls\"]=createExportWrapper(\"emscripten_main_thread_process_queued_calls\");var _emscripten_stack_get_end=Module[\"_emscripten_stack_get_end\"]=function(){return(_emscripten_stack_get_end=Module[\"_emscripten_stack_get_end\"]=Module[\"asm\"][\"emscripten_stack_get_end\"]).apply(null,arguments)};var __get_tzname=Module[\"__get_tzname\"]=createExportWrapper(\"_get_tzname\");var __get_daylight=Module[\"__get_daylight\"]=createExportWrapper(\"_get_daylight\");var __get_timezone=Module[\"__get_timezone\"]=createExportWrapper(\"_get_timezone\");var stackSave=Module[\"stackSave\"]=createExportWrapper(\"stackSave\");var stackRestore=Module[\"stackRestore\"]=createExportWrapper(\"stackRestore\");var stackAlloc=Module[\"stackAlloc\"]=createExportWrapper(\"stackAlloc\");var _emscripten_stack_init=Module[\"_emscripten_stack_init\"]=function(){return(_emscripten_stack_init=Module[\"_emscripten_stack_init\"]=Module[\"asm\"][\"emscripten_stack_init\"]).apply(null,arguments)};var _emscripten_stack_get_free=Module[\"_emscripten_stack_get_free\"]=function(){return(_emscripten_stack_get_free=Module[\"_emscripten_stack_get_free\"]=Module[\"asm\"][\"emscripten_stack_get_free\"]).apply(null,arguments)};var _saveSetjmp=Module[\"_saveSetjmp\"]=createExportWrapper(\"saveSetjmp\");var _setThrew=Module[\"_setThrew\"]=createExportWrapper(\"setThrew\");var ___cxa_can_catch=Module[\"___cxa_can_catch\"]=createExportWrapper(\"__cxa_can_catch\");var ___cxa_is_pointer_type=Module[\"___cxa_is_pointer_type\"]=createExportWrapper(\"__cxa_is_pointer_type\");var _memalign=Module[\"_memalign\"]=createExportWrapper(\"memalign\");var _emscripten_builtin_malloc=Module[\"_emscripten_builtin_malloc\"]=createExportWrapper(\"emscripten_builtin_malloc\");var _emscripten_builtin_free=Module[\"_emscripten_builtin_free\"]=createExportWrapper(\"emscripten_builtin_free\");var _emscripten_builtin_memalign=Module[\"_emscripten_builtin_memalign\"]=createExportWrapper(\"emscripten_builtin_memalign\");var dynCall_jii=Module[\"dynCall_jii\"]=createExportWrapper(\"dynCall_jii\");var dynCall_viji=Module[\"dynCall_viji\"]=createExportWrapper(\"dynCall_viji\");var dynCall_jjj=Module[\"dynCall_jjj\"]=createExportWrapper(\"dynCall_jjj\");var dynCall_jiii=Module[\"dynCall_jiii\"]=createExportWrapper(\"dynCall_jiii\");var dynCall_iiiijj=Module[\"dynCall_iiiijj\"]=createExportWrapper(\"dynCall_iiiijj\");var dynCall_viijj=Module[\"dynCall_viijj\"]=createExportWrapper(\"dynCall_viijj\");var dynCall_viiijjjj=Module[\"dynCall_viiijjjj\"]=createExportWrapper(\"dynCall_viiijjjj\");var dynCall_ji=Module[\"dynCall_ji\"]=createExportWrapper(\"dynCall_ji\");var dynCall_vij=Module[\"dynCall_vij\"]=createExportWrapper(\"dynCall_vij\");var dynCall_viijii=Module[\"dynCall_viijii\"]=createExportWrapper(\"dynCall_viijii\");var dynCall_vj=Module[\"dynCall_vj\"]=createExportWrapper(\"dynCall_vj\");var dynCall_viij=Module[\"dynCall_viij\"]=createExportWrapper(\"dynCall_viij\");var dynCall_viiiiij=Module[\"dynCall_viiiiij\"]=createExportWrapper(\"dynCall_viiiiij\");var dynCall_iijjiiii=Module[\"dynCall_iijjiiii\"]=createExportWrapper(\"dynCall_iijjiiii\");var dynCall_jiji=Module[\"dynCall_jiji\"]=createExportWrapper(\"dynCall_jiji\");var dynCall_iiiiij=Module[\"dynCall_iiiiij\"]=createExportWrapper(\"dynCall_iiiiij\");var dynCall_iiiiijj=Module[\"dynCall_iiiiijj\"]=createExportWrapper(\"dynCall_iiiiijj\");var dynCall_iiiiiijj=Module[\"dynCall_iiiiiijj\"]=createExportWrapper(\"dynCall_iiiiiijj\");function invoke_viid(index,a1,a2,a3){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_vi(index,a1){var sp=stackSave();try{wasmTable.get(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iii(index,a1,a2){var sp=stackSave();try{return wasmTable.get(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_v(index){var sp=stackSave();try{wasmTable.get(index)()}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_vii(index,a1,a2){var sp=stackSave();try{wasmTable.get(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_ii(index,a1){var sp=stackSave();try{return wasmTable.get(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viii(index,a1,a2,a3){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiii(index,a1,a2,a3,a4){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiii(index,a1,a2,a3,a4){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiidd(index,a1,a2,a3,a4,a5){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiiiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_diii(index,a1,a2,a3){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiii(index,a1,a2,a3){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiidd(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiddi(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiddi(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_i(index){var sp=stackSave();try{return wasmTable.get(index)()}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiidi(index,a1,a2,a3,a4,a5){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiidi(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viididii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiidf(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiidd(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiid(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiid(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiidiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiif(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiif(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiifiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiifiifiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiidiidiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_vididdii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiid(index,a1,a2,a3,a4){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_vidii(index,a1,a2,a3,a4){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiiddi(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiddi(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiiiiiddi(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiid(index,a1,a2,a3,a4,a5){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiidid(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viidi(index,a1,a2,a3,a4){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_vdiii(index,a1,a2,a3,a4){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}if(!Object.getOwnPropertyDescriptor(Module,\"intArrayFromString\"))Module[\"intArrayFromString\"]=function(){abort(\"'intArrayFromString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"intArrayToString\"))Module[\"intArrayToString\"]=function(){abort(\"'intArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ccall\"))Module[\"ccall\"]=function(){abort(\"'ccall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"cwrap\"))Module[\"cwrap\"]=function(){abort(\"'cwrap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setValue\"))Module[\"setValue\"]=function(){abort(\"'setValue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getValue\"))Module[\"getValue\"]=function(){abort(\"'getValue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"allocate\"))Module[\"allocate\"]=function(){abort(\"'allocate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UTF8ArrayToString\"))Module[\"UTF8ArrayToString\"]=function(){abort(\"'UTF8ArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UTF8ToString\"))Module[\"UTF8ToString\"]=function(){abort(\"'UTF8ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToUTF8Array\"))Module[\"stringToUTF8Array\"]=function(){abort(\"'stringToUTF8Array' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToUTF8\"))Module[\"stringToUTF8\"]=function(){abort(\"'stringToUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"lengthBytesUTF8\"))Module[\"lengthBytesUTF8\"]=function(){abort(\"'lengthBytesUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stackTrace\"))Module[\"stackTrace\"]=function(){abort(\"'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addOnPreRun\"))Module[\"addOnPreRun\"]=function(){abort(\"'addOnPreRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addOnInit\"))Module[\"addOnInit\"]=function(){abort(\"'addOnInit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addOnPreMain\"))Module[\"addOnPreMain\"]=function(){abort(\"'addOnPreMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addOnExit\"))Module[\"addOnExit\"]=function(){abort(\"'addOnExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addOnPostRun\"))Module[\"addOnPostRun\"]=function(){abort(\"'addOnPostRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeStringToMemory\"))Module[\"writeStringToMemory\"]=function(){abort(\"'writeStringToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeArrayToMemory\"))Module[\"writeArrayToMemory\"]=function(){abort(\"'writeArrayToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeAsciiToMemory\"))Module[\"writeAsciiToMemory\"]=function(){abort(\"'writeAsciiToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};Module[\"addRunDependency\"]=addRunDependency;Module[\"removeRunDependency\"]=removeRunDependency;if(!Object.getOwnPropertyDescriptor(Module,\"FS_createFolder\"))Module[\"FS_createFolder\"]=function(){abort(\"'FS_createFolder' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};Module[\"FS_createPath\"]=FS.createPath;Module[\"FS_createDataFile\"]=FS.createDataFile;Module[\"FS_createPreloadedFile\"]=FS.createPreloadedFile;Module[\"FS_createLazyFile\"]=FS.createLazyFile;if(!Object.getOwnPropertyDescriptor(Module,\"FS_createLink\"))Module[\"FS_createLink\"]=function(){abort(\"'FS_createLink' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};Module[\"FS_createDevice\"]=FS.createDevice;Module[\"FS_unlink\"]=FS.unlink;if(!Object.getOwnPropertyDescriptor(Module,\"getLEB\"))Module[\"getLEB\"]=function(){abort(\"'getLEB' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getFunctionTables\"))Module[\"getFunctionTables\"]=function(){abort(\"'getFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"alignFunctionTables\"))Module[\"alignFunctionTables\"]=function(){abort(\"'alignFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerFunctions\"))Module[\"registerFunctions\"]=function(){abort(\"'registerFunctions' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addFunction\"))Module[\"addFunction\"]=function(){abort(\"'addFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"removeFunction\"))Module[\"removeFunction\"]=function(){abort(\"'removeFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getFuncWrapper\"))Module[\"getFuncWrapper\"]=function(){abort(\"'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"prettyPrint\"))Module[\"prettyPrint\"]=function(){abort(\"'prettyPrint' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"dynCall\"))Module[\"dynCall\"]=function(){abort(\"'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getCompilerSetting\"))Module[\"getCompilerSetting\"]=function(){abort(\"'getCompilerSetting' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"print\"))Module[\"print\"]=function(){abort(\"'print' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"printErr\"))Module[\"printErr\"]=function(){abort(\"'printErr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getTempRet0\"))Module[\"getTempRet0\"]=function(){abort(\"'getTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setTempRet0\"))Module[\"setTempRet0\"]=function(){abort(\"'setTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"callMain\"))Module[\"callMain\"]=function(){abort(\"'callMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"abort\"))Module[\"abort\"]=function(){abort(\"'abort' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"keepRuntimeAlive\"))Module[\"keepRuntimeAlive\"]=function(){abort(\"'keepRuntimeAlive' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"zeroMemory\"))Module[\"zeroMemory\"]=function(){abort(\"'zeroMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToNewUTF8\"))Module[\"stringToNewUTF8\"]=function(){abort(\"'stringToNewUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setFileTime\"))Module[\"setFileTime\"]=function(){abort(\"'setFileTime' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscripten_realloc_buffer\"))Module[\"emscripten_realloc_buffer\"]=function(){abort(\"'emscripten_realloc_buffer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ENV\"))Module[\"ENV\"]=function(){abort(\"'ENV' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ERRNO_CODES\"))Module[\"ERRNO_CODES\"]=function(){abort(\"'ERRNO_CODES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ERRNO_MESSAGES\"))Module[\"ERRNO_MESSAGES\"]=function(){abort(\"'ERRNO_MESSAGES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setErrNo\"))Module[\"setErrNo\"]=function(){abort(\"'setErrNo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"inetPton4\"))Module[\"inetPton4\"]=function(){abort(\"'inetPton4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"inetNtop4\"))Module[\"inetNtop4\"]=function(){abort(\"'inetNtop4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"inetPton6\"))Module[\"inetPton6\"]=function(){abort(\"'inetPton6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"inetNtop6\"))Module[\"inetNtop6\"]=function(){abort(\"'inetNtop6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readSockaddr\"))Module[\"readSockaddr\"]=function(){abort(\"'readSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeSockaddr\"))Module[\"writeSockaddr\"]=function(){abort(\"'writeSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"DNS\"))Module[\"DNS\"]=function(){abort(\"'DNS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getHostByName\"))Module[\"getHostByName\"]=function(){abort(\"'getHostByName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"GAI_ERRNO_MESSAGES\"))Module[\"GAI_ERRNO_MESSAGES\"]=function(){abort(\"'GAI_ERRNO_MESSAGES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"Protocols\"))Module[\"Protocols\"]=function(){abort(\"'Protocols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"Sockets\"))Module[\"Sockets\"]=function(){abort(\"'Sockets' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getRandomDevice\"))Module[\"getRandomDevice\"]=function(){abort(\"'getRandomDevice' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"traverseStack\"))Module[\"traverseStack\"]=function(){abort(\"'traverseStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UNWIND_CACHE\"))Module[\"UNWIND_CACHE\"]=function(){abort(\"'UNWIND_CACHE' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"withBuiltinMalloc\"))Module[\"withBuiltinMalloc\"]=function(){abort(\"'withBuiltinMalloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readAsmConstArgsArray\"))Module[\"readAsmConstArgsArray\"]=function(){abort(\"'readAsmConstArgsArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readAsmConstArgs\"))Module[\"readAsmConstArgs\"]=function(){abort(\"'readAsmConstArgs' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"mainThreadEM_ASM\"))Module[\"mainThreadEM_ASM\"]=function(){abort(\"'mainThreadEM_ASM' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"jstoi_q\"))Module[\"jstoi_q\"]=function(){abort(\"'jstoi_q' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"jstoi_s\"))Module[\"jstoi_s\"]=function(){abort(\"'jstoi_s' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getExecutableName\"))Module[\"getExecutableName\"]=function(){abort(\"'getExecutableName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"listenOnce\"))Module[\"listenOnce\"]=function(){abort(\"'listenOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"autoResumeAudioContext\"))Module[\"autoResumeAudioContext\"]=function(){abort(\"'autoResumeAudioContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"dynCallLegacy\"))Module[\"dynCallLegacy\"]=function(){abort(\"'dynCallLegacy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getDynCaller\"))Module[\"getDynCaller\"]=function(){abort(\"'getDynCaller' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"dynCall\"))Module[\"dynCall\"]=function(){abort(\"'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"callRuntimeCallbacks\"))Module[\"callRuntimeCallbacks\"]=function(){abort(\"'callRuntimeCallbacks' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"handleException\"))Module[\"handleException\"]=function(){abort(\"'handleException' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"runtimeKeepalivePush\"))Module[\"runtimeKeepalivePush\"]=function(){abort(\"'runtimeKeepalivePush' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"runtimeKeepalivePop\"))Module[\"runtimeKeepalivePop\"]=function(){abort(\"'runtimeKeepalivePop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"callUserCallback\"))Module[\"callUserCallback\"]=function(){abort(\"'callUserCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"maybeExit\"))Module[\"maybeExit\"]=function(){abort(\"'maybeExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"safeSetTimeout\"))Module[\"safeSetTimeout\"]=function(){abort(\"'safeSetTimeout' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"asmjsMangle\"))Module[\"asmjsMangle\"]=function(){abort(\"'asmjsMangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"asyncLoad\"))Module[\"asyncLoad\"]=function(){abort(\"'asyncLoad' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"alignMemory\"))Module[\"alignMemory\"]=function(){abort(\"'alignMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"mmapAlloc\"))Module[\"mmapAlloc\"]=function(){abort(\"'mmapAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"reallyNegative\"))Module[\"reallyNegative\"]=function(){abort(\"'reallyNegative' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"unSign\"))Module[\"unSign\"]=function(){abort(\"'unSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"reSign\"))Module[\"reSign\"]=function(){abort(\"'reSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"formatString\"))Module[\"formatString\"]=function(){abort(\"'formatString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"PATH\"))Module[\"PATH\"]=function(){abort(\"'PATH' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"PATH_FS\"))Module[\"PATH_FS\"]=function(){abort(\"'PATH_FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SYSCALLS\"))Module[\"SYSCALLS\"]=function(){abort(\"'SYSCALLS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"syscallMmap2\"))Module[\"syscallMmap2\"]=function(){abort(\"'syscallMmap2' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"syscallMunmap\"))Module[\"syscallMunmap\"]=function(){abort(\"'syscallMunmap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getSocketFromFD\"))Module[\"getSocketFromFD\"]=function(){abort(\"'getSocketFromFD' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getSocketAddress\"))Module[\"getSocketAddress\"]=function(){abort(\"'getSocketAddress' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"JSEvents\"))Module[\"JSEvents\"]=function(){abort(\"'JSEvents' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerKeyEventCallback\"))Module[\"registerKeyEventCallback\"]=function(){abort(\"'registerKeyEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"specialHTMLTargets\"))Module[\"specialHTMLTargets\"]=function(){abort(\"'specialHTMLTargets' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"findEventTarget\"))Module[\"findEventTarget\"]=function(){abort(\"'findEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"findCanvasEventTarget\"))Module[\"findCanvasEventTarget\"]=function(){abort(\"'findCanvasEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getBoundingClientRect\"))Module[\"getBoundingClientRect\"]=function(){abort(\"'getBoundingClientRect' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillMouseEventData\"))Module[\"fillMouseEventData\"]=function(){abort(\"'fillMouseEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerMouseEventCallback\"))Module[\"registerMouseEventCallback\"]=function(){abort(\"'registerMouseEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerWheelEventCallback\"))Module[\"registerWheelEventCallback\"]=function(){abort(\"'registerWheelEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerUiEventCallback\"))Module[\"registerUiEventCallback\"]=function(){abort(\"'registerUiEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerFocusEventCallback\"))Module[\"registerFocusEventCallback\"]=function(){abort(\"'registerFocusEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillDeviceOrientationEventData\"))Module[\"fillDeviceOrientationEventData\"]=function(){abort(\"'fillDeviceOrientationEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerDeviceOrientationEventCallback\"))Module[\"registerDeviceOrientationEventCallback\"]=function(){abort(\"'registerDeviceOrientationEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillDeviceMotionEventData\"))Module[\"fillDeviceMotionEventData\"]=function(){abort(\"'fillDeviceMotionEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerDeviceMotionEventCallback\"))Module[\"registerDeviceMotionEventCallback\"]=function(){abort(\"'registerDeviceMotionEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"screenOrientation\"))Module[\"screenOrientation\"]=function(){abort(\"'screenOrientation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillOrientationChangeEventData\"))Module[\"fillOrientationChangeEventData\"]=function(){abort(\"'fillOrientationChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerOrientationChangeEventCallback\"))Module[\"registerOrientationChangeEventCallback\"]=function(){abort(\"'registerOrientationChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillFullscreenChangeEventData\"))Module[\"fillFullscreenChangeEventData\"]=function(){abort(\"'fillFullscreenChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerFullscreenChangeEventCallback\"))Module[\"registerFullscreenChangeEventCallback\"]=function(){abort(\"'registerFullscreenChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerRestoreOldStyle\"))Module[\"registerRestoreOldStyle\"]=function(){abort(\"'registerRestoreOldStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"hideEverythingExceptGivenElement\"))Module[\"hideEverythingExceptGivenElement\"]=function(){abort(\"'hideEverythingExceptGivenElement' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"restoreHiddenElements\"))Module[\"restoreHiddenElements\"]=function(){abort(\"'restoreHiddenElements' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setLetterbox\"))Module[\"setLetterbox\"]=function(){abort(\"'setLetterbox' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"currentFullscreenStrategy\"))Module[\"currentFullscreenStrategy\"]=function(){abort(\"'currentFullscreenStrategy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"restoreOldWindowedStyle\"))Module[\"restoreOldWindowedStyle\"]=function(){abort(\"'restoreOldWindowedStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"softFullscreenResizeWebGLRenderTarget\"))Module[\"softFullscreenResizeWebGLRenderTarget\"]=function(){abort(\"'softFullscreenResizeWebGLRenderTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"doRequestFullscreen\"))Module[\"doRequestFullscreen\"]=function(){abort(\"'doRequestFullscreen' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillPointerlockChangeEventData\"))Module[\"fillPointerlockChangeEventData\"]=function(){abort(\"'fillPointerlockChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerPointerlockChangeEventCallback\"))Module[\"registerPointerlockChangeEventCallback\"]=function(){abort(\"'registerPointerlockChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerPointerlockErrorEventCallback\"))Module[\"registerPointerlockErrorEventCallback\"]=function(){abort(\"'registerPointerlockErrorEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"requestPointerLock\"))Module[\"requestPointerLock\"]=function(){abort(\"'requestPointerLock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillVisibilityChangeEventData\"))Module[\"fillVisibilityChangeEventData\"]=function(){abort(\"'fillVisibilityChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerVisibilityChangeEventCallback\"))Module[\"registerVisibilityChangeEventCallback\"]=function(){abort(\"'registerVisibilityChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerTouchEventCallback\"))Module[\"registerTouchEventCallback\"]=function(){abort(\"'registerTouchEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillGamepadEventData\"))Module[\"fillGamepadEventData\"]=function(){abort(\"'fillGamepadEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerGamepadEventCallback\"))Module[\"registerGamepadEventCallback\"]=function(){abort(\"'registerGamepadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerBeforeUnloadEventCallback\"))Module[\"registerBeforeUnloadEventCallback\"]=function(){abort(\"'registerBeforeUnloadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillBatteryEventData\"))Module[\"fillBatteryEventData\"]=function(){abort(\"'fillBatteryEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"battery\"))Module[\"battery\"]=function(){abort(\"'battery' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerBatteryEventCallback\"))Module[\"registerBatteryEventCallback\"]=function(){abort(\"'registerBatteryEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setCanvasElementSize\"))Module[\"setCanvasElementSize\"]=function(){abort(\"'setCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getCanvasElementSize\"))Module[\"getCanvasElementSize\"]=function(){abort(\"'getCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"polyfillSetImmediate\"))Module[\"polyfillSetImmediate\"]=function(){abort(\"'polyfillSetImmediate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"demangle\"))Module[\"demangle\"]=function(){abort(\"'demangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"demangleAll\"))Module[\"demangleAll\"]=function(){abort(\"'demangleAll' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"jsStackTrace\"))Module[\"jsStackTrace\"]=function(){abort(\"'jsStackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stackTrace\"))Module[\"stackTrace\"]=function(){abort(\"'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getEnvStrings\"))Module[\"getEnvStrings\"]=function(){abort(\"'getEnvStrings' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"checkWasiClock\"))Module[\"checkWasiClock\"]=function(){abort(\"'checkWasiClock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeI53ToI64\"))Module[\"writeI53ToI64\"]=function(){abort(\"'writeI53ToI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeI53ToI64Clamped\"))Module[\"writeI53ToI64Clamped\"]=function(){abort(\"'writeI53ToI64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeI53ToI64Signaling\"))Module[\"writeI53ToI64Signaling\"]=function(){abort(\"'writeI53ToI64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeI53ToU64Clamped\"))Module[\"writeI53ToU64Clamped\"]=function(){abort(\"'writeI53ToU64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeI53ToU64Signaling\"))Module[\"writeI53ToU64Signaling\"]=function(){abort(\"'writeI53ToU64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readI53FromI64\"))Module[\"readI53FromI64\"]=function(){abort(\"'readI53FromI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readI53FromU64\"))Module[\"readI53FromU64\"]=function(){abort(\"'readI53FromU64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"convertI32PairToI53\"))Module[\"convertI32PairToI53\"]=function(){abort(\"'convertI32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"convertU32PairToI53\"))Module[\"convertU32PairToI53\"]=function(){abort(\"'convertU32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"uncaughtExceptionCount\"))Module[\"uncaughtExceptionCount\"]=function(){abort(\"'uncaughtExceptionCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"exceptionLast\"))Module[\"exceptionLast\"]=function(){abort(\"'exceptionLast' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"exceptionCaught\"))Module[\"exceptionCaught\"]=function(){abort(\"'exceptionCaught' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ExceptionInfo\"))Module[\"ExceptionInfo\"]=function(){abort(\"'ExceptionInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"CatchInfo\"))Module[\"CatchInfo\"]=function(){abort(\"'CatchInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"exception_addRef\"))Module[\"exception_addRef\"]=function(){abort(\"'exception_addRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"exception_decRef\"))Module[\"exception_decRef\"]=function(){abort(\"'exception_decRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"Browser\"))Module[\"Browser\"]=function(){abort(\"'Browser' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"funcWrappers\"))Module[\"funcWrappers\"]=function(){abort(\"'funcWrappers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getFuncWrapper\"))Module[\"getFuncWrapper\"]=function(){abort(\"'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setMainLoop\"))Module[\"setMainLoop\"]=function(){abort(\"'setMainLoop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"wget\"))Module[\"wget\"]=function(){abort(\"'wget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"FS\"))Module[\"FS\"]=function(){abort(\"'FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"MEMFS\"))Module[\"MEMFS\"]=function(){abort(\"'MEMFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"TTY\"))Module[\"TTY\"]=function(){abort(\"'TTY' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"PIPEFS\"))Module[\"PIPEFS\"]=function(){abort(\"'PIPEFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SOCKFS\"))Module[\"SOCKFS\"]=function(){abort(\"'SOCKFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"_setNetworkCallback\"))Module[\"_setNetworkCallback\"]=function(){abort(\"'_setNetworkCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"tempFixedLengthArray\"))Module[\"tempFixedLengthArray\"]=function(){abort(\"'tempFixedLengthArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"miniTempWebGLFloatBuffers\"))Module[\"miniTempWebGLFloatBuffers\"]=function(){abort(\"'miniTempWebGLFloatBuffers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"heapObjectForWebGLType\"))Module[\"heapObjectForWebGLType\"]=function(){abort(\"'heapObjectForWebGLType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"heapAccessShiftForWebGLHeap\"))Module[\"heapAccessShiftForWebGLHeap\"]=function(){abort(\"'heapAccessShiftForWebGLHeap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};Module[\"GL\"]=GL;if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGet\"))Module[\"emscriptenWebGLGet\"]=function(){abort(\"'emscriptenWebGLGet' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"computeUnpackAlignedImageSize\"))Module[\"computeUnpackAlignedImageSize\"]=function(){abort(\"'computeUnpackAlignedImageSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGetTexPixelData\"))Module[\"emscriptenWebGLGetTexPixelData\"]=function(){abort(\"'emscriptenWebGLGetTexPixelData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGetUniform\"))Module[\"emscriptenWebGLGetUniform\"]=function(){abort(\"'emscriptenWebGLGetUniform' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"webglGetUniformLocation\"))Module[\"webglGetUniformLocation\"]=function(){abort(\"'webglGetUniformLocation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"webglPrepareUniformLocationsBeforeFirstUse\"))Module[\"webglPrepareUniformLocationsBeforeFirstUse\"]=function(){abort(\"'webglPrepareUniformLocationsBeforeFirstUse' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"webglGetLeftBracePos\"))Module[\"webglGetLeftBracePos\"]=function(){abort(\"'webglGetLeftBracePos' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGetVertexAttrib\"))Module[\"emscriptenWebGLGetVertexAttrib\"]=function(){abort(\"'emscriptenWebGLGetVertexAttrib' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGetBufferBinding\"))Module[\"emscriptenWebGLGetBufferBinding\"]=function(){abort(\"'emscriptenWebGLGetBufferBinding' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLValidateMapBufferTarget\"))Module[\"emscriptenWebGLValidateMapBufferTarget\"]=function(){abort(\"'emscriptenWebGLValidateMapBufferTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeGLArray\"))Module[\"writeGLArray\"]=function(){abort(\"'writeGLArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"AL\"))Module[\"AL\"]=function(){abort(\"'AL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SDL_unicode\"))Module[\"SDL_unicode\"]=function(){abort(\"'SDL_unicode' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SDL_ttfContext\"))Module[\"SDL_ttfContext\"]=function(){abort(\"'SDL_ttfContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SDL_audio\"))Module[\"SDL_audio\"]=function(){abort(\"'SDL_audio' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SDL\"))Module[\"SDL\"]=function(){abort(\"'SDL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SDL_gfx\"))Module[\"SDL_gfx\"]=function(){abort(\"'SDL_gfx' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"GLUT\"))Module[\"GLUT\"]=function(){abort(\"'GLUT' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"EGL\"))Module[\"EGL\"]=function(){abort(\"'EGL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"GLFW_Window\"))Module[\"GLFW_Window\"]=function(){abort(\"'GLFW_Window' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"GLFW\"))Module[\"GLFW\"]=function(){abort(\"'GLFW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"GLEW\"))Module[\"GLEW\"]=function(){abort(\"'GLEW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"IDBStore\"))Module[\"IDBStore\"]=function(){abort(\"'IDBStore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"runAndAbortIfError\"))Module[\"runAndAbortIfError\"]=function(){abort(\"'runAndAbortIfError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_handle_array\"))Module[\"emval_handle_array\"]=function(){abort(\"'emval_handle_array' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_free_list\"))Module[\"emval_free_list\"]=function(){abort(\"'emval_free_list' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_symbols\"))Module[\"emval_symbols\"]=function(){abort(\"'emval_symbols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"init_emval\"))Module[\"init_emval\"]=function(){abort(\"'init_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"count_emval_handles\"))Module[\"count_emval_handles\"]=function(){abort(\"'count_emval_handles' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"get_first_emval\"))Module[\"get_first_emval\"]=function(){abort(\"'get_first_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getStringOrSymbol\"))Module[\"getStringOrSymbol\"]=function(){abort(\"'getStringOrSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"requireHandle\"))Module[\"requireHandle\"]=function(){abort(\"'requireHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_newers\"))Module[\"emval_newers\"]=function(){abort(\"'emval_newers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"craftEmvalAllocator\"))Module[\"craftEmvalAllocator\"]=function(){abort(\"'craftEmvalAllocator' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_get_global\"))Module[\"emval_get_global\"]=function(){abort(\"'emval_get_global' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_methodCallers\"))Module[\"emval_methodCallers\"]=function(){abort(\"'emval_methodCallers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"InternalError\"))Module[\"InternalError\"]=function(){abort(\"'InternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"BindingError\"))Module[\"BindingError\"]=function(){abort(\"'BindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UnboundTypeError\"))Module[\"UnboundTypeError\"]=function(){abort(\"'UnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"PureVirtualError\"))Module[\"PureVirtualError\"]=function(){abort(\"'PureVirtualError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"init_embind\"))Module[\"init_embind\"]=function(){abort(\"'init_embind' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"throwInternalError\"))Module[\"throwInternalError\"]=function(){abort(\"'throwInternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"throwBindingError\"))Module[\"throwBindingError\"]=function(){abort(\"'throwBindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"throwUnboundTypeError\"))Module[\"throwUnboundTypeError\"]=function(){abort(\"'throwUnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ensureOverloadTable\"))Module[\"ensureOverloadTable\"]=function(){abort(\"'ensureOverloadTable' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"exposePublicSymbol\"))Module[\"exposePublicSymbol\"]=function(){abort(\"'exposePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"replacePublicSymbol\"))Module[\"replacePublicSymbol\"]=function(){abort(\"'replacePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"extendError\"))Module[\"extendError\"]=function(){abort(\"'extendError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"createNamedFunction\"))Module[\"createNamedFunction\"]=function(){abort(\"'createNamedFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registeredInstances\"))Module[\"registeredInstances\"]=function(){abort(\"'registeredInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getBasestPointer\"))Module[\"getBasestPointer\"]=function(){abort(\"'getBasestPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerInheritedInstance\"))Module[\"registerInheritedInstance\"]=function(){abort(\"'registerInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"unregisterInheritedInstance\"))Module[\"unregisterInheritedInstance\"]=function(){abort(\"'unregisterInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getInheritedInstance\"))Module[\"getInheritedInstance\"]=function(){abort(\"'getInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getInheritedInstanceCount\"))Module[\"getInheritedInstanceCount\"]=function(){abort(\"'getInheritedInstanceCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getLiveInheritedInstances\"))Module[\"getLiveInheritedInstances\"]=function(){abort(\"'getLiveInheritedInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registeredTypes\"))Module[\"registeredTypes\"]=function(){abort(\"'registeredTypes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"awaitingDependencies\"))Module[\"awaitingDependencies\"]=function(){abort(\"'awaitingDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"typeDependencies\"))Module[\"typeDependencies\"]=function(){abort(\"'typeDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registeredPointers\"))Module[\"registeredPointers\"]=function(){abort(\"'registeredPointers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerType\"))Module[\"registerType\"]=function(){abort(\"'registerType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"whenDependentTypesAreResolved\"))Module[\"whenDependentTypesAreResolved\"]=function(){abort(\"'whenDependentTypesAreResolved' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"embind_charCodes\"))Module[\"embind_charCodes\"]=function(){abort(\"'embind_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"embind_init_charCodes\"))Module[\"embind_init_charCodes\"]=function(){abort(\"'embind_init_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readLatin1String\"))Module[\"readLatin1String\"]=function(){abort(\"'readLatin1String' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getTypeName\"))Module[\"getTypeName\"]=function(){abort(\"'getTypeName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"heap32VectorToArray\"))Module[\"heap32VectorToArray\"]=function(){abort(\"'heap32VectorToArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"requireRegisteredType\"))Module[\"requireRegisteredType\"]=function(){abort(\"'requireRegisteredType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getShiftFromSize\"))Module[\"getShiftFromSize\"]=function(){abort(\"'getShiftFromSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"integerReadValueFromPointer\"))Module[\"integerReadValueFromPointer\"]=function(){abort(\"'integerReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"enumReadValueFromPointer\"))Module[\"enumReadValueFromPointer\"]=function(){abort(\"'enumReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"floatReadValueFromPointer\"))Module[\"floatReadValueFromPointer\"]=function(){abort(\"'floatReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"simpleReadValueFromPointer\"))Module[\"simpleReadValueFromPointer\"]=function(){abort(\"'simpleReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"runDestructors\"))Module[\"runDestructors\"]=function(){abort(\"'runDestructors' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"new_\"))Module[\"new_\"]=function(){abort(\"'new_' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"craftInvokerFunction\"))Module[\"craftInvokerFunction\"]=function(){abort(\"'craftInvokerFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"embind__requireFunction\"))Module[\"embind__requireFunction\"]=function(){abort(\"'embind__requireFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"tupleRegistrations\"))Module[\"tupleRegistrations\"]=function(){abort(\"'tupleRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"structRegistrations\"))Module[\"structRegistrations\"]=function(){abort(\"'structRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"genericPointerToWireType\"))Module[\"genericPointerToWireType\"]=function(){abort(\"'genericPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"constNoSmartPtrRawPointerToWireType\"))Module[\"constNoSmartPtrRawPointerToWireType\"]=function(){abort(\"'constNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"nonConstNoSmartPtrRawPointerToWireType\"))Module[\"nonConstNoSmartPtrRawPointerToWireType\"]=function(){abort(\"'nonConstNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"init_RegisteredPointer\"))Module[\"init_RegisteredPointer\"]=function(){abort(\"'init_RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredPointer\"))Module[\"RegisteredPointer\"]=function(){abort(\"'RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredPointer_getPointee\"))Module[\"RegisteredPointer_getPointee\"]=function(){abort(\"'RegisteredPointer_getPointee' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredPointer_destructor\"))Module[\"RegisteredPointer_destructor\"]=function(){abort(\"'RegisteredPointer_destructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredPointer_deleteObject\"))Module[\"RegisteredPointer_deleteObject\"]=function(){abort(\"'RegisteredPointer_deleteObject' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredPointer_fromWireType\"))Module[\"RegisteredPointer_fromWireType\"]=function(){abort(\"'RegisteredPointer_fromWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"runDestructor\"))Module[\"runDestructor\"]=function(){abort(\"'runDestructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"releaseClassHandle\"))Module[\"releaseClassHandle\"]=function(){abort(\"'releaseClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"finalizationGroup\"))Module[\"finalizationGroup\"]=function(){abort(\"'finalizationGroup' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"detachFinalizer_deps\"))Module[\"detachFinalizer_deps\"]=function(){abort(\"'detachFinalizer_deps' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"detachFinalizer\"))Module[\"detachFinalizer\"]=function(){abort(\"'detachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"attachFinalizer\"))Module[\"attachFinalizer\"]=function(){abort(\"'attachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"makeClassHandle\"))Module[\"makeClassHandle\"]=function(){abort(\"'makeClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"init_ClassHandle\"))Module[\"init_ClassHandle\"]=function(){abort(\"'init_ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle\"))Module[\"ClassHandle\"]=function(){abort(\"'ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle_isAliasOf\"))Module[\"ClassHandle_isAliasOf\"]=function(){abort(\"'ClassHandle_isAliasOf' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"throwInstanceAlreadyDeleted\"))Module[\"throwInstanceAlreadyDeleted\"]=function(){abort(\"'throwInstanceAlreadyDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle_clone\"))Module[\"ClassHandle_clone\"]=function(){abort(\"'ClassHandle_clone' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle_delete\"))Module[\"ClassHandle_delete\"]=function(){abort(\"'ClassHandle_delete' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"deletionQueue\"))Module[\"deletionQueue\"]=function(){abort(\"'deletionQueue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle_isDeleted\"))Module[\"ClassHandle_isDeleted\"]=function(){abort(\"'ClassHandle_isDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle_deleteLater\"))Module[\"ClassHandle_deleteLater\"]=function(){abort(\"'ClassHandle_deleteLater' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"flushPendingDeletes\"))Module[\"flushPendingDeletes\"]=function(){abort(\"'flushPendingDeletes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"delayFunction\"))Module[\"delayFunction\"]=function(){abort(\"'delayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setDelayFunction\"))Module[\"setDelayFunction\"]=function(){abort(\"'setDelayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredClass\"))Module[\"RegisteredClass\"]=function(){abort(\"'RegisteredClass' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"shallowCopyInternalPointer\"))Module[\"shallowCopyInternalPointer\"]=function(){abort(\"'shallowCopyInternalPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"downcastPointer\"))Module[\"downcastPointer\"]=function(){abort(\"'downcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"upcastPointer\"))Module[\"upcastPointer\"]=function(){abort(\"'upcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"validateThis\"))Module[\"validateThis\"]=function(){abort(\"'validateThis' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"char_0\"))Module[\"char_0\"]=function(){abort(\"'char_0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"char_9\"))Module[\"char_9\"]=function(){abort(\"'char_9' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"makeLegalFunctionName\"))Module[\"makeLegalFunctionName\"]=function(){abort(\"'makeLegalFunctionName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGetIndexed\"))Module[\"emscriptenWebGLGetIndexed\"]=function(){abort(\"'emscriptenWebGLGetIndexed' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"warnOnce\"))Module[\"warnOnce\"]=function(){abort(\"'warnOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stackSave\"))Module[\"stackSave\"]=function(){abort(\"'stackSave' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stackRestore\"))Module[\"stackRestore\"]=function(){abort(\"'stackRestore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stackAlloc\"))Module[\"stackAlloc\"]=function(){abort(\"'stackAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"AsciiToString\"))Module[\"AsciiToString\"]=function(){abort(\"'AsciiToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToAscii\"))Module[\"stringToAscii\"]=function(){abort(\"'stringToAscii' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UTF16ToString\"))Module[\"UTF16ToString\"]=function(){abort(\"'UTF16ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToUTF16\"))Module[\"stringToUTF16\"]=function(){abort(\"'stringToUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"lengthBytesUTF16\"))Module[\"lengthBytesUTF16\"]=function(){abort(\"'lengthBytesUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UTF32ToString\"))Module[\"UTF32ToString\"]=function(){abort(\"'UTF32ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToUTF32\"))Module[\"stringToUTF32\"]=function(){abort(\"'stringToUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"lengthBytesUTF32\"))Module[\"lengthBytesUTF32\"]=function(){abort(\"'lengthBytesUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"allocateUTF8\"))Module[\"allocateUTF8\"]=function(){abort(\"'allocateUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"allocateUTF8OnStack\"))Module[\"allocateUTF8OnStack\"]=function(){abort(\"'allocateUTF8OnStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};Module[\"writeStackCookie\"]=writeStackCookie;Module[\"checkStackCookie\"]=checkStackCookie;if(!Object.getOwnPropertyDescriptor(Module,\"ALLOC_NORMAL\"))Object.defineProperty(Module,\"ALLOC_NORMAL\",{configurable:true,get:function(){abort(\"'ALLOC_NORMAL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")}});if(!Object.getOwnPropertyDescriptor(Module,\"ALLOC_STACK\"))Object.defineProperty(Module,\"ALLOC_STACK\",{configurable:true,get:function(){abort(\"'ALLOC_STACK' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")}});var calledRun;function ExitStatus(status){this.name=\"ExitStatus\";this.message=\"Program terminated with exit(\"+status+\")\";this.status=status}dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function stackCheckInit(){_emscripten_stack_init();writeStackCookie()}function run(args){args=args||arguments_;if(runDependencies>0){return}stackCheckInit();preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module[\"calledRun\"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module[\"onRuntimeInitialized\"])Module[\"onRuntimeInitialized\"]();assert(!Module[\"_main\"],'compiled without a main, but one is present. if you added it from JS, use Module[\"onRuntimeInitialized\"]');postRun()}if(Module[\"setStatus\"]){Module[\"setStatus\"](\"Running...\");setTimeout(function(){setTimeout(function(){Module[\"setStatus\"](\"\")},1);doRun()},1)}else{doRun()}checkStackCookie()}Module[\"run\"]=run;function checkUnflushedContent(){var oldOut=out;var oldErr=err;var has=false;out=err=function(x){has=true};try{var flush=Module[\"_fflush\"];if(flush)flush(0);[\"stdout\",\"stderr\"].forEach(function(name){var info=FS.analyzePath(\"/dev/\"+name);if(!info)return;var stream=info.object;var rdev=stream.rdev;var tty=TTY.ttys[rdev];if(tty&&tty.output&&tty.output.length){has=true}})}catch(e){}out=oldOut;err=oldErr;if(has){warnOnce(\"stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.\")}}function exit(status,implicit){EXITSTATUS=status;checkUnflushedContent();if(keepRuntimeAlive()){if(!implicit){var msg=\"program exited (with status: \"+status+\"), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)\";readyPromiseReject(msg);err(msg)}}else{exitRuntime()}procExit(status)}function procExit(code){EXITSTATUS=code;if(!keepRuntimeAlive()){if(Module[\"onExit\"])Module[\"onExit\"](code);ABORT=true}quit_(code,new ExitStatus(code))}if(Module[\"preInit\"]){if(typeof Module[\"preInit\"]==\"function\")Module[\"preInit\"]=[Module[\"preInit\"]];while(Module[\"preInit\"].length>0){Module[\"preInit\"].pop()()}}run();\n\n\n  return createMediapipeSolutionsWasm.ready\n}\n);\n})();\nif (typeof exports === 'object' && typeof module === 'object')\n  module.exports = createMediapipeSolutionsWasm;\nelse if (typeof define === 'function' && define['amd'])\n  define([], function() { return createMediapipeSolutionsWasm; });\nelse if (typeof exports === 'object')\n  exports[\"createMediapipeSolutionsWasm\"] = createMediapipeSolutionsWasm;\n"
  },
  {
    "path": "src/renderer/public/lib/@mediapipe/holistic/holistic_solution_wasm_bin.js",
    "content": "\nvar createMediapipeSolutionsWasm = (function() {\n  var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;\n  if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;\n  return (\nfunction(createMediapipeSolutionsWasm) {\n  createMediapipeSolutionsWasm = createMediapipeSolutionsWasm || {};\n\nvar Module=typeof createMediapipeSolutionsWasm!==\"undefined\"?createMediapipeSolutionsWasm:{};var readyPromiseResolve,readyPromiseReject;Module[\"ready\"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_main\")){Object.defineProperty(Module[\"ready\"],\"_main\",{configurable:true,get:function(){abort(\"You are getting _main on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_main\",{configurable:true,set:function(){abort(\"You are setting _main on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_stack_get_end\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_get_end\",{configurable:true,get:function(){abort(\"You are getting _emscripten_stack_get_end on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_get_end\",{configurable:true,set:function(){abort(\"You are setting _emscripten_stack_get_end on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_stack_get_free\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_get_free\",{configurable:true,get:function(){abort(\"You are getting _emscripten_stack_get_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_get_free\",{configurable:true,set:function(){abort(\"You are setting _emscripten_stack_get_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_stack_init\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_init\",{configurable:true,get:function(){abort(\"You are getting _emscripten_stack_init on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_stack_init\",{configurable:true,set:function(){abort(\"You are setting _emscripten_stack_init on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_stackSave\")){Object.defineProperty(Module[\"ready\"],\"_stackSave\",{configurable:true,get:function(){abort(\"You are getting _stackSave on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_stackSave\",{configurable:true,set:function(){abort(\"You are setting _stackSave on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_stackRestore\")){Object.defineProperty(Module[\"ready\"],\"_stackRestore\",{configurable:true,get:function(){abort(\"You are getting _stackRestore on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_stackRestore\",{configurable:true,set:function(){abort(\"You are setting _stackRestore on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_stackAlloc\")){Object.defineProperty(Module[\"ready\"],\"_stackAlloc\",{configurable:true,get:function(){abort(\"You are getting _stackAlloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_stackAlloc\",{configurable:true,set:function(){abort(\"You are setting _stackAlloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___wasm_call_ctors\")){Object.defineProperty(Module[\"ready\"],\"___wasm_call_ctors\",{configurable:true,get:function(){abort(\"You are getting ___wasm_call_ctors on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___wasm_call_ctors\",{configurable:true,set:function(){abort(\"You are setting ___wasm_call_ctors on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_fflush\")){Object.defineProperty(Module[\"ready\"],\"_fflush\",{configurable:true,get:function(){abort(\"You are getting _fflush on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_fflush\",{configurable:true,set:function(){abort(\"You are setting _fflush on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___errno_location\")){Object.defineProperty(Module[\"ready\"],\"___errno_location\",{configurable:true,get:function(){abort(\"You are getting ___errno_location on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___errno_location\",{configurable:true,set:function(){abort(\"You are setting ___errno_location on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_malloc\")){Object.defineProperty(Module[\"ready\"],\"_malloc\",{configurable:true,get:function(){abort(\"You are getting _malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_malloc\",{configurable:true,set:function(){abort(\"You are setting _malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_free\")){Object.defineProperty(Module[\"ready\"],\"_free\",{configurable:true,get:function(){abort(\"You are getting _free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_free\",{configurable:true,set:function(){abort(\"You are setting _free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_main_thread_process_queued_calls\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_main_thread_process_queued_calls\",{configurable:true,get:function(){abort(\"You are getting _emscripten_main_thread_process_queued_calls on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_main_thread_process_queued_calls\",{configurable:true,set:function(){abort(\"You are setting _emscripten_main_thread_process_queued_calls on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_memalign\")){Object.defineProperty(Module[\"ready\"],\"_memalign\",{configurable:true,get:function(){abort(\"You are getting _memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_memalign\",{configurable:true,set:function(){abort(\"You are setting _memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_webgl_make_context_current\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_webgl_make_context_current\",{configurable:true,get:function(){abort(\"You are getting _emscripten_webgl_make_context_current on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_webgl_make_context_current\",{configurable:true,set:function(){abort(\"You are setting _emscripten_webgl_make_context_current on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_webgl_get_current_context\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_webgl_get_current_context\",{configurable:true,get:function(){abort(\"You are getting _emscripten_webgl_get_current_context on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_webgl_get_current_context\",{configurable:true,set:function(){abort(\"You are setting _emscripten_webgl_get_current_context on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_setThrew\")){Object.defineProperty(Module[\"ready\"],\"_setThrew\",{configurable:true,get:function(){abort(\"You are getting _setThrew on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_setThrew\",{configurable:true,set:function(){abort(\"You are setting _setThrew on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___cxa_is_pointer_type\")){Object.defineProperty(Module[\"ready\"],\"___cxa_is_pointer_type\",{configurable:true,get:function(){abort(\"You are getting ___cxa_is_pointer_type on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___cxa_is_pointer_type\",{configurable:true,set:function(){abort(\"You are setting ___cxa_is_pointer_type on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___cxa_can_catch\")){Object.defineProperty(Module[\"ready\"],\"___cxa_can_catch\",{configurable:true,get:function(){abort(\"You are getting ___cxa_can_catch on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___cxa_can_catch\",{configurable:true,set:function(){abort(\"You are setting ___cxa_can_catch on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_saveSetjmp\")){Object.defineProperty(Module[\"ready\"],\"_saveSetjmp\",{configurable:true,get:function(){abort(\"You are getting _saveSetjmp on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_saveSetjmp\",{configurable:true,set:function(){abort(\"You are setting _saveSetjmp on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"__get_tzname\")){Object.defineProperty(Module[\"ready\"],\"__get_tzname\",{configurable:true,get:function(){abort(\"You are getting __get_tzname on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"__get_tzname\",{configurable:true,set:function(){abort(\"You are setting __get_tzname on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"__get_daylight\")){Object.defineProperty(Module[\"ready\"],\"__get_daylight\",{configurable:true,get:function(){abort(\"You are getting __get_daylight on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"__get_daylight\",{configurable:true,set:function(){abort(\"You are setting __get_daylight on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"__get_timezone\")){Object.defineProperty(Module[\"ready\"],\"__get_timezone\",{configurable:true,get:function(){abort(\"You are getting __get_timezone on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"__get_timezone\",{configurable:true,set:function(){abort(\"You are setting __get_timezone on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_builtin_malloc\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_malloc\",{configurable:true,get:function(){abort(\"You are getting _emscripten_builtin_malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_malloc\",{configurable:true,set:function(){abort(\"You are setting _emscripten_builtin_malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_builtin_free\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_free\",{configurable:true,get:function(){abort(\"You are getting _emscripten_builtin_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_free\",{configurable:true,set:function(){abort(\"You are setting _emscripten_builtin_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"_emscripten_builtin_memalign\")){Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_memalign\",{configurable:true,get:function(){abort(\"You are getting _emscripten_builtin_memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"_emscripten_builtin_memalign\",{configurable:true,set:function(){abort(\"You are setting _emscripten_builtin_memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___getTypeName\")){Object.defineProperty(Module[\"ready\"],\"___getTypeName\",{configurable:true,get:function(){abort(\"You are getting ___getTypeName on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___getTypeName\",{configurable:true,set:function(){abort(\"You are setting ___getTypeName on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"___embind_register_native_and_builtin_types\")){Object.defineProperty(Module[\"ready\"],\"___embind_register_native_and_builtin_types\",{configurable:true,get:function(){abort(\"You are getting ___embind_register_native_and_builtin_types on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"___embind_register_native_and_builtin_types\",{configurable:true,set:function(){abort(\"You are setting ___embind_register_native_and_builtin_types on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}if(!Object.getOwnPropertyDescriptor(Module[\"ready\"],\"onRuntimeInitialized\")){Object.defineProperty(Module[\"ready\"],\"onRuntimeInitialized\",{configurable:true,get:function(){abort(\"You are getting onRuntimeInitialized on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}});Object.defineProperty(Module[\"ready\"],\"onRuntimeInitialized\",{configurable:true,set:function(){abort(\"You are setting onRuntimeInitialized on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js\")}})}var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var arguments_=[];var thisProgram=\"./this.program\";var quit_=function(status,toThrow){throw toThrow};var ENVIRONMENT_IS_WEB=typeof window===\"object\";var ENVIRONMENT_IS_WORKER=typeof importScripts===\"function\";var ENVIRONMENT_IS_NODE=typeof process===\"object\"&&typeof process.versions===\"object\"&&typeof process.versions.node===\"string\";var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(Module[\"ENVIRONMENT\"]){throw new Error(\"Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)\")}var scriptDirectory=\"\";function locateFile(path){if(Module[\"locateFile\"]){return Module[\"locateFile\"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;var nodeFS;var nodePath;if(ENVIRONMENT_IS_NODE){if(!(typeof process===\"object\"&&typeof require===\"function\"))throw new Error(\"not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)\");if(ENVIRONMENT_IS_WORKER){scriptDirectory=require(\"path\").dirname(scriptDirectory)+\"/\"}else{scriptDirectory=__dirname+\"/\"}read_=function shell_read(filename,binary){if(!nodeFS)nodeFS=require(\"fs\");if(!nodePath)nodePath=require(\"path\");filename=nodePath[\"normalize\"](filename);return nodeFS[\"readFileSync\"](filename,binary?null:\"utf8\")};readBinary=function readBinary(filename){var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};readAsync=function readAsync(filename,onload,onerror){if(!nodeFS)nodeFS=require(\"fs\");if(!nodePath)nodePath=require(\"path\");filename=nodePath[\"normalize\"](filename);nodeFS[\"readFile\"](filename,function(err,data){if(err)onerror(err);else onload(data.buffer)})};if(process[\"argv\"].length>1){thisProgram=process[\"argv\"][1].replace(/\\\\/g,\"/\")}arguments_=process[\"argv\"].slice(2);process[\"on\"](\"uncaughtException\",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process[\"on\"](\"unhandledRejection\",abort);quit_=function(status,toThrow){if(keepRuntimeAlive()){process[\"exitCode\"]=status;throw toThrow}process[\"exit\"](status)};Module[\"inspect\"]=function(){return\"[Emscripten Module object]\"}}else if(ENVIRONMENT_IS_SHELL){if(typeof process===\"object\"&&typeof require===\"function\"||typeof window===\"object\"||typeof importScripts===\"function\")throw new Error(\"not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)\");if(typeof read!=\"undefined\"){read_=function shell_read(f){return read(f)}}readBinary=function readBinary(f){var data;if(typeof readbuffer===\"function\"){return new Uint8Array(readbuffer(f))}data=read(f,\"binary\");assert(typeof data===\"object\");return data};readAsync=function readAsync(f,onload,onerror){setTimeout(function(){onload(readBinary(f))},0)};if(typeof scriptArgs!=\"undefined\"){arguments_=scriptArgs}else if(typeof arguments!=\"undefined\"){arguments_=arguments}if(typeof quit===\"function\"){quit_=function(status){quit(status)}}if(typeof print!==\"undefined\"){if(typeof console===\"undefined\")console={};console.log=print;console.warn=console.error=typeof printErr!==\"undefined\"?printErr:print}}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(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf(\"blob:\")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf(\"/\")+1)}else{scriptDirectory=\"\"}if(!(typeof window===\"object\"||typeof importScripts===\"function\"))throw new Error(\"not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)\");{read_=function(url){var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=function(url){var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.responseType=\"arraybuffer\";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=function(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,true);xhr.responseType=\"arraybuffer\";xhr.onload=function(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=function(title){document.title=title}}else{throw new Error(\"environment detection error\")}var out=Module[\"print\"]||console.log.bind(console);var err=Module[\"printErr\"]||console.warn.bind(console);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=null;if(Module[\"arguments\"])arguments_=Module[\"arguments\"];if(!Object.getOwnPropertyDescriptor(Module,\"arguments\")){Object.defineProperty(Module,\"arguments\",{configurable:true,get:function(){abort(\"Module.arguments has been replaced with plain arguments_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(Module[\"thisProgram\"])thisProgram=Module[\"thisProgram\"];if(!Object.getOwnPropertyDescriptor(Module,\"thisProgram\")){Object.defineProperty(Module,\"thisProgram\",{configurable:true,get:function(){abort(\"Module.thisProgram has been replaced with plain thisProgram (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(Module[\"quit\"])quit_=Module[\"quit\"];if(!Object.getOwnPropertyDescriptor(Module,\"quit\")){Object.defineProperty(Module,\"quit\",{configurable:true,get:function(){abort(\"Module.quit has been replaced with plain quit_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}assert(typeof Module[\"memoryInitializerPrefixURL\"]===\"undefined\",\"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead\");assert(typeof Module[\"pthreadMainPrefixURL\"]===\"undefined\",\"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead\");assert(typeof Module[\"cdInitializerPrefixURL\"]===\"undefined\",\"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead\");assert(typeof Module[\"filePackagePrefixURL\"]===\"undefined\",\"Module.filePackagePrefixURL option was removed, use Module.locateFile instead\");assert(typeof Module[\"read\"]===\"undefined\",\"Module.read option was removed (modify read_ in JS)\");assert(typeof Module[\"readAsync\"]===\"undefined\",\"Module.readAsync option was removed (modify readAsync in JS)\");assert(typeof Module[\"readBinary\"]===\"undefined\",\"Module.readBinary option was removed (modify readBinary in JS)\");assert(typeof Module[\"setWindowTitle\"]===\"undefined\",\"Module.setWindowTitle option was removed (modify setWindowTitle in JS)\");assert(typeof Module[\"TOTAL_MEMORY\"]===\"undefined\",\"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY\");if(!Object.getOwnPropertyDescriptor(Module,\"read\")){Object.defineProperty(Module,\"read\",{configurable:true,get:function(){abort(\"Module.read has been replaced with plain read_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(!Object.getOwnPropertyDescriptor(Module,\"readAsync\")){Object.defineProperty(Module,\"readAsync\",{configurable:true,get:function(){abort(\"Module.readAsync has been replaced with plain readAsync (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(!Object.getOwnPropertyDescriptor(Module,\"readBinary\")){Object.defineProperty(Module,\"readBinary\",{configurable:true,get:function(){abort(\"Module.readBinary has been replaced with plain readBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(!Object.getOwnPropertyDescriptor(Module,\"setWindowTitle\")){Object.defineProperty(Module,\"setWindowTitle\",{configurable:true,get:function(){abort(\"Module.setWindowTitle has been replaced with plain setWindowTitle (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}assert(!ENVIRONMENT_IS_SHELL,\"shell environment detected but not enabled at build time.  Add 'shell' to `-s ENVIRONMENT` to enable.\");function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text)}}function convertJsFunctionToWasm(func,sig){if(typeof WebAssembly.Function===\"function\"){var typeNames={\"i\":\"i32\",\"j\":\"i64\",\"f\":\"f32\",\"d\":\"f64\"};var type={parameters:[],results:sig[0]==\"v\"?[]:[typeNames[sig[0]]]};for(var i=1;i<sig.length;++i){type.parameters.push(typeNames[sig[i]])}return new WebAssembly.Function(type,func)}var typeSection=[1,0,1,96];var sigRet=sig.slice(0,1);var sigParam=sig.slice(1);var typeCodes={\"i\":127,\"j\":126,\"f\":125,\"d\":124};typeSection.push(sigParam.length);for(var i=0;i<sigParam.length;++i){typeSection.push(typeCodes[sigParam[i]])}if(sigRet==\"v\"){typeSection.push(0)}else{typeSection=typeSection.concat([1,typeCodes[sigRet]])}typeSection[1]=typeSection.length-2;var bytes=new Uint8Array([0,97,115,109,1,0,0,0].concat(typeSection,[2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0]));var module=new WebAssembly.Module(bytes);var instance=new WebAssembly.Instance(module,{\"e\":{\"f\":func}});var wrappedFunc=instance.exports[\"f\"];return wrappedFunc}var freeTableIndexes=[];var functionsInTableMap;function getEmptyTableSlot(){if(freeTableIndexes.length){return freeTableIndexes.pop()}try{wasmTable.grow(1)}catch(err){if(!(err instanceof RangeError)){throw err}throw\"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.\"}return wasmTable.length-1}function addFunctionWasm(func,sig){if(!functionsInTableMap){functionsInTableMap=new WeakMap;for(var i=0;i<wasmTable.length;i++){var item=wasmTable.get(i);if(item){functionsInTableMap.set(item,i)}}}if(functionsInTableMap.has(func)){return functionsInTableMap.get(func)}var ret=getEmptyTableSlot();try{wasmTable.set(ret,func)}catch(err){if(!(err instanceof TypeError)){throw err}assert(typeof sig!==\"undefined\",\"Missing signature argument to addFunction: \"+func);var wrapped=convertJsFunctionToWasm(func,sig);wasmTable.set(ret,wrapped)}functionsInTableMap.set(func,ret);return ret}var tempRet0=0;var setTempRet0=function(value){tempRet0=value};var getTempRet0=function(){return tempRet0};var wasmBinary;if(Module[\"wasmBinary\"])wasmBinary=Module[\"wasmBinary\"];if(!Object.getOwnPropertyDescriptor(Module,\"wasmBinary\")){Object.defineProperty(Module,\"wasmBinary\",{configurable:true,get:function(){abort(\"Module.wasmBinary has been replaced with plain wasmBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}var noExitRuntime=Module[\"noExitRuntime\"]||true;if(!Object.getOwnPropertyDescriptor(Module,\"noExitRuntime\")){Object.defineProperty(Module,\"noExitRuntime\",{configurable:true,get:function(){abort(\"Module.noExitRuntime has been replaced with plain noExitRuntime (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}if(typeof WebAssembly!==\"object\"){abort(\"no native wasm support detected\")}var wasmMemory;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort(\"Assertion failed: \"+text)}}function getCFunc(ident){var func=Module[\"_\"+ident];assert(func,\"Cannot call unknown function \"+ident+\", make sure it is exported\");return func}function ccall(ident,returnType,argTypes,args,opts){var toC={\"string\":function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret},\"array\":function(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;assert(returnType!==\"array\",'Return type should not be \"array\".');if(args){for(var i=0;i<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0)stack=stackSave();cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var ret=func.apply(null,cArgs);function onDone(ret){if(stack!==0)stackRestore(stack);return convertReturnValue(ret)}ret=onDone(ret);return ret}var ALLOC_STACK=1;var UTF8Decoder=typeof TextDecoder!==\"undefined\"?new TextDecoder(\"utf8\"):undefined;function UTF8ArrayToString(heap,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heap[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heap.subarray&&UTF8Decoder){return UTF8Decoder.decode(heap.subarray(idx,endPtr))}else{var str=\"\";while(idx<endPtr){var u0=heap[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heap[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heap[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{if((u0&248)!=240)warnOnce(\"Invalid UTF-8 leading byte 0x\"+u0.toString(16)+\" encountered when deserializing a UTF-8 string in wasm memory to a JS string!\");u0=(u0&7)<<18|u1<<12|u2<<6|heap[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):\"\"}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=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;if(u>=2097152)warnOnce(\"Invalid Unicode code point 0x\"+u.toString(16)+\" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x1FFFFF).\");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 stringToUTF8(str,outPtr,maxBytesToWrite){assert(typeof maxBytesToWrite==\"number\",\"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!\");return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}var UTF16Decoder=typeof TextDecoder!==\"undefined\"?new TextDecoder(\"utf-16le\"):undefined;function UTF16ToString(ptr,maxBytesToRead){assert(ptr%2==0,\"Pointer passed to UTF16ToString must be aligned to two bytes!\");var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder){return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr))}else{var str=\"\";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str}}function stringToUTF16(str,outPtr,maxBytesToWrite){assert(outPtr%2==0,\"Pointer passed to stringToUTF16 must be aligned to two bytes!\");assert(typeof maxBytesToWrite==\"number\",\"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!\");if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite<str.length*2?maxBytesToWrite/2:str.length;for(var i=0;i<numCharsToWrite;++i){var codeUnit=str.charCodeAt(i);HEAP16[outPtr>>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr}function lengthBytesUTF16(str){return str.length*2}function UTF32ToString(ptr,maxBytesToRead){assert(ptr%4==0,\"Pointer passed to UTF32ToString must be aligned to four bytes!\");var i=0;var str=\"\";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str}function stringToUTF32(str,outPtr,maxBytesToWrite){assert(outPtr%4==0,\"Pointer passed to stringToUTF32 must be aligned to four bytes!\");assert(typeof maxBytesToWrite==\"number\",\"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!\");if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i<str.length;++i){var codeUnit=str.charCodeAt(i);if(codeUnit>=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr}function lengthBytesUTF32(str){var len=0;for(var i=0;i<str.length;++i){var codeUnit=str.charCodeAt(i);if(codeUnit>=55296&&codeUnit<=57343)++i;len+=4}return len}function allocateUTF8(str){var size=lengthBytesUTF8(str)+1;var ret=_malloc(size);if(ret)stringToUTF8Array(str,HEAP8,ret,size);return ret}function writeArrayToMemory(array,buffer){assert(array.length>=0,\"writeArrayToMemory array must have a length (should be an array or typed array)\");HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i<str.length;++i){assert(str.charCodeAt(i)===str.charCodeAt(i)&255);HEAP8[buffer++>>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module[\"HEAP8\"]=HEAP8=new Int8Array(buf);Module[\"HEAP16\"]=HEAP16=new Int16Array(buf);Module[\"HEAP32\"]=HEAP32=new Int32Array(buf);Module[\"HEAPU8\"]=HEAPU8=new Uint8Array(buf);Module[\"HEAPU16\"]=HEAPU16=new Uint16Array(buf);Module[\"HEAPU32\"]=HEAPU32=new Uint32Array(buf);Module[\"HEAPF32\"]=HEAPF32=new Float32Array(buf);Module[\"HEAPF64\"]=HEAPF64=new Float64Array(buf)}var TOTAL_STACK=5242880;if(Module[\"TOTAL_STACK\"])assert(TOTAL_STACK===Module[\"TOTAL_STACK\"],\"the stack size can no longer be determined at runtime\");var INITIAL_MEMORY=Module[\"INITIAL_MEMORY\"]||16777216;if(!Object.getOwnPropertyDescriptor(Module,\"INITIAL_MEMORY\")){Object.defineProperty(Module,\"INITIAL_MEMORY\",{configurable:true,get:function(){abort(\"Module.INITIAL_MEMORY has been replaced with plain INITIAL_MEMORY (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)\")}})}assert(INITIAL_MEMORY>=TOTAL_STACK,\"INITIAL_MEMORY should be larger than TOTAL_STACK, was \"+INITIAL_MEMORY+\"! (TOTAL_STACK=\"+TOTAL_STACK+\")\");assert(typeof Int32Array!==\"undefined\"&&typeof Float64Array!==\"undefined\"&&Int32Array.prototype.subarray!==undefined&&Int32Array.prototype.set!==undefined,\"JS engine does not provide full typed array support\");assert(!Module[\"wasmMemory\"],\"Use of `wasmMemory` detected.  Use -s IMPORTED_MEMORY to define wasmMemory externally\");assert(INITIAL_MEMORY==16777216,\"Detected runtime INITIAL_MEMORY setting.  Use -s IMPORTED_MEMORY to define wasmMemory dynamically\");var wasmTable;function writeStackCookie(){var max=_emscripten_stack_get_end();assert((max&3)==0);HEAPU32[(max>>2)+1]=34821223;HEAPU32[(max>>2)+2]=2310721022;HEAP32[0]=1668509029}function checkStackCookie(){if(ABORT)return;var max=_emscripten_stack_get_end();var cookie1=HEAPU32[(max>>2)+1];var cookie2=HEAPU32[(max>>2)+2];if(cookie1!=34821223||cookie2!=2310721022){abort(\"Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x\"+cookie2.toString(16)+\" \"+cookie1.toString(16))}if(HEAP32[0]!==1668509029)abort(\"Runtime error: The application has corrupted its heap memory area (address zero)!\")}(function(){var h16=new Int16Array(1);var h8=new Int8Array(h16.buffer);h16[0]=25459;if(h8[0]!==115||h8[1]!==99)throw\"Runtime error: expected the system to be little-endian! (Run with -s SUPPORT_BIG_ENDIAN=1 to bypass)\"})();var __ATPRERUN__=[];var __ATINIT__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;var runtimeKeepaliveCounter=0;function keepRuntimeAlive(){return noExitRuntime||runtimeKeepaliveCounter>0}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(){checkStackCookie();assert(!runtimeInitialized);runtimeInitialized=true;if(!Module[\"noFSInit\"]&&!FS.init.initialized)FS.init();FS.ignorePermissions=false;TTY.init();callRuntimeCallbacks(__ATINIT__)}function exitRuntime(){checkStackCookie();runtimeExited=true}function postRun(){checkStackCookie();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)}assert(Math.imul,\"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill\");assert(Math.fround,\"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill\");assert(Math.clz32,\"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill\");assert(Math.trunc,\"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill\");var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;var runDependencyTracking={};function getUniqueRunDependency(id){var orig=id;while(1){if(!runDependencyTracking[id])return id;id=orig+Math.random()}}function addRunDependency(id){runDependencies++;if(Module[\"monitorRunDependencies\"]){Module[\"monitorRunDependencies\"](runDependencies)}if(id){assert(!runDependencyTracking[id]);runDependencyTracking[id]=1;if(runDependencyWatcher===null&&typeof setInterval!==\"undefined\"){runDependencyWatcher=setInterval(function(){if(ABORT){clearInterval(runDependencyWatcher);runDependencyWatcher=null;return}var shown=false;for(var dep in runDependencyTracking){if(!shown){shown=true;err(\"still waiting on run dependencies:\")}err(\"dependency: \"+dep)}if(shown){err(\"(end of list)\")}},1e4)}}else{err(\"warning: run dependency added without ID\")}}function removeRunDependency(id){runDependencies--;if(Module[\"monitorRunDependencies\"]){Module[\"monitorRunDependencies\"](runDependencies)}if(id){assert(runDependencyTracking[id]);delete runDependencyTracking[id]}else{err(\"warning: run dependency removed without ID\")}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module[\"preloadedImages\"]={};Module[\"preloadedAudios\"]={};function abort(what){if(Module[\"onAbort\"]){Module[\"onAbort\"](what)}what+=\"\";err(what);ABORT=true;EXITSTATUS=1;var output=\"abort(\"+what+\") at \"+stackTrace();what=output;var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix=\"data:application/octet-stream;base64,\";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}function isFileURI(filename){return filename.startsWith(\"file://\")}function createExportWrapper(name,fixedasm){return function(){var displayName=name;var asm=fixedasm;if(!fixedasm){asm=Module[\"asm\"]}assert(runtimeInitialized,\"native function `\"+displayName+\"` called before runtime initialization\");assert(!runtimeExited,\"native function `\"+displayName+\"` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)\");if(!asm[name]){assert(asm[name],\"exported native function `\"+displayName+\"` not found\")}return asm[name].apply(null,arguments)}}var wasmBinaryFile;wasmBinaryFile=\"holistic_solution_wasm_bin.wasm\";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}else{throw\"both async and sync fetching of the wasm failed\"}}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch===\"function\"&&!isFileURI(wasmBinaryFile)){return fetch(wasmBinaryFile,{credentials:\"same-origin\"}).then(function(response){if(!response[\"ok\"]){throw\"failed to load wasm binary file at '\"+wasmBinaryFile+\"'\"}return response[\"arrayBuffer\"]()}).catch(function(){return getBinary(wasmBinaryFile)})}else{if(readAsync){return new Promise(function(resolve,reject){readAsync(wasmBinaryFile,function(response){resolve(new Uint8Array(response))},reject)})}}}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile)})}function createWasm(){var info={\"env\":asmLibraryArg,\"wasi_snapshot_preview1\":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module[\"asm\"]=exports;wasmMemory=Module[\"asm\"][\"memory\"];assert(wasmMemory,\"memory not found in wasm exports\");updateGlobalBufferAndViews(wasmMemory.buffer);wasmTable=Module[\"asm\"][\"__indirect_function_table\"];assert(wasmTable,\"table not found in wasm exports\");addOnInit(Module[\"asm\"][\"__wasm_call_ctors\"]);removeRunDependency(\"wasm-instantiate\")}addRunDependency(\"wasm-instantiate\");var trueModule=Module;function receiveInstantiationResult(result){assert(Module===trueModule,\"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?\");trueModule=null;receiveInstance(result[\"instance\"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){var result=WebAssembly.instantiate(binary,info);return result}).then(receiver,function(reason){err(\"failed to asynchronously prepare wasm: \"+reason);if(isFileURI(wasmBinaryFile)){err(\"warning: Loading from a file URI (\"+wasmBinaryFile+\") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing\")}abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming===\"function\"&&!isDataURI(wasmBinaryFile)&&!isFileURI(wasmBinaryFile)&&typeof fetch===\"function\"){return fetch(wasmBinaryFile,{credentials:\"same-origin\"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiationResult,function(reason){err(\"wasm streaming compile failed: \"+reason);err(\"falling back to ArrayBuffer instantiation\");return instantiateArrayBuffer(receiveInstantiationResult)})})}else{return instantiateArrayBuffer(receiveInstantiationResult)}}if(Module[\"instantiateWasm\"]){try{var exports=Module[\"instantiateWasm\"](info,receiveInstance);return exports}catch(e){err(\"Module.instantiateWasm callback failed with error: \"+e);return false}}instantiateAsync().catch(readyPromiseReject);return{}}var tempDouble;var tempI64;var ASM_CONSTS={634176:function(){let init_once=true;if(init_once){const cachedFindCanvasEventTarget=findCanvasEventTarget;if(typeof cachedFindCanvasEventTarget!==\"function\"){if(typeof console!==\"undefined\"){console.error(\"Expected Emscripten global function \"+'\"findCanvasEventTarget\" not found. WebGL context creation '+\"may fail.\")}return}findCanvasEventTarget=function(target){if(target==0){if(Module&&Module.canvas){return Module.canvas}else if(Module&&Module.canvasCssSelector){return cachedFindCanvasEventTarget(Module.canvasCssSelector)}if(typeof console!==\"undefined\"){console.warn(\"Module properties canvas and canvasCssSelector not \"+\"found during WebGL context creation.\")}}return cachedFindCanvasEventTarget(target)};init_once=false}},634961:function(){return typeof wasmOffsetConverter!==\"undefined\"}};function HaveOffsetConverter(){return typeof wasmOffsetConverter!==\"undefined\"}function _emscripten_set_main_loop_timing(mode,value){Browser.mainLoop.timingMode=mode;Browser.mainLoop.timingValue=value;if(!Browser.mainLoop.func){err(\"emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up.\");return 1}if(!Browser.mainLoop.running){Browser.mainLoop.running=true}if(mode==0){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setTimeout(){var timeUntilNextTick=Math.max(0,Browser.mainLoop.tickStartTime+value-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,timeUntilNextTick)};Browser.mainLoop.method=\"timeout\"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_rAF(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method=\"rAF\"}else if(mode==2){if(typeof setImmediate===\"undefined\"){var setImmediates=[];var emscriptenMainLoopMessageId=\"setimmediate\";var Browser_setImmediate_messageHandler=function(event){if(event.data===emscriptenMainLoopMessageId||event.data.target===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}};addEventListener(\"message\",Browser_setImmediate_messageHandler,true);setImmediate=function Browser_emulated_setImmediate(func){setImmediates.push(func);if(ENVIRONMENT_IS_WORKER){if(Module[\"setImmediates\"]===undefined)Module[\"setImmediates\"]=[];Module[\"setImmediates\"].push(func);postMessage({target:emscriptenMainLoopMessageId})}else postMessage(emscriptenMainLoopMessageId,\"*\")}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){setImmediate(Browser.mainLoop.runner)};Browser.mainLoop.method=\"immediate\"}return 0}var _emscripten_get_now;if(ENVIRONMENT_IS_NODE){_emscripten_get_now=function(){var t=process[\"hrtime\"]();return t[0]*1e3+t[1]/1e6}}else _emscripten_get_now=function(){return performance.now()};function _emscripten_webgl_do_commit_frame(){if(!GL.currentContext||!GL.currentContext.GLctx){return-3}if(GL.currentContext.defaultFbo){GL.blitOffscreenFramebuffer(GL.currentContext);return 0}if(!GL.currentContext.attributes.explicitSwapControl){return-3}return 0}function _exit(status){exit(status)}function handleException(e){if(e instanceof ExitStatus||e===\"unwind\"){return}if(e&&typeof e===\"object\"&&e.stack)err(\"exception thrown: \"+[e,e.stack]);throw e}function maybeExit(){if(!keepRuntimeAlive()){try{_exit(EXITSTATUS)}catch(e){handleException(e)}}}function setMainLoop(browserIterationFunc,fps,simulateInfiniteLoop,arg,noSetTiming){assert(!Browser.mainLoop.func,\"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.\");Browser.mainLoop.func=browserIterationFunc;Browser.mainLoop.arg=arg;var thisMainLoopId=Browser.mainLoop.currentlyRunningMainloop;function checkIsRunning(){if(thisMainLoopId<Browser.mainLoop.currentlyRunningMainloop){maybeExit();return false}return true}Browser.mainLoop.running=false;Browser.mainLoop.runner=function Browser_mainLoop_runner(){if(ABORT)return;if(Browser.mainLoop.queue.length>0){var start=Date.now();var blocker=Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if(Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){Browser.mainLoop.remainingBlockers=next}else{next=next+.5;Browser.mainLoop.remainingBlockers=(8*remaining+next)/9}}out('main loop blocker \"'+blocker.name+'\" took '+(Date.now()-start)+\" ms\");Browser.mainLoop.updateStatus();if(!checkIsRunning())return;setTimeout(Browser.mainLoop.runner,0);return}if(!checkIsRunning())return;Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0;if(Browser.mainLoop.timingMode==1&&Browser.mainLoop.timingValue>1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else if(Browser.mainLoop.timingMode==0){Browser.mainLoop.tickStartTime=_emscripten_get_now()}GL.newRenderingFrameStarted();if(typeof GL!==\"undefined\"&&GL.currentContext&&!GL.currentContextIsProxied&&!GL.currentContext.attributes.explicitSwapControl&&GL.currentContext.GLctx.commit){GL.currentContext.GLctx.commit()}if(Browser.mainLoop.method===\"timeout\"&&Module.ctx){warnOnce(\"Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!\");Browser.mainLoop.method=\"\"}Browser.mainLoop.runIter(browserIterationFunc);checkStackCookie();if(!checkIsRunning())return;if(typeof SDL===\"object\"&&SDL.audio&&SDL.audio.queueNewAudioData)SDL.audio.queueNewAudioData();Browser.mainLoop.scheduler()};if(!noSetTiming){if(fps&&fps>0)_emscripten_set_main_loop_timing(0,1e3/fps);else _emscripten_set_main_loop_timing(1,1);Browser.mainLoop.scheduler()}if(simulateInfiniteLoop){throw\"unwind\"}}function callUserCallback(func,synchronous){if(ABORT){err(\"user callback triggered after application aborted.  Ignoring.\");return}if(synchronous){func();return}try{func()}catch(e){handleException(e)}}function safeSetTimeout(func,timeout){return setTimeout(function(){callUserCallback(func)},timeout)}var Browser={mainLoop:{running:false,scheduler:null,method:\"\",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;setMainLoop(func,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()},updateStatus:function(){if(Module[\"setStatus\"]){var message=Module[\"statusMessage\"]||\"Please wait...\";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining<expected){Module[\"setStatus\"](message+\" (\"+(expected-remaining)+\"/\"+expected+\")\")}else{Module[\"setStatus\"](message)}}else{Module[\"setStatus\"](\"\")}}},runIter:function(func){if(ABORT)return;if(Module[\"preMainLoop\"]){var preRet=Module[\"preMainLoop\"]();if(preRet===false){return}}callUserCallback(func);if(Module[\"postMainLoop\"])Module[\"postMainLoop\"]()}},isFullscreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(!Module[\"preloadPlugins\"])Module[\"preloadPlugins\"]=[];if(Browser.initted)return;Browser.initted=true;try{new Blob;Browser.hasBlobConstructor=true}catch(e){Browser.hasBlobConstructor=false;out(\"warning: no blob constructor, cannot create blobs with mimetypes\")}Browser.BlobBuilder=typeof MozBlobBuilder!=\"undefined\"?MozBlobBuilder:typeof WebKitBlobBuilder!=\"undefined\"?WebKitBlobBuilder:!Browser.hasBlobConstructor?out(\"warning: no BlobBuilder\"):null;Browser.URLObject=typeof window!=\"undefined\"?window.URL?window.URL:window.webkitURL:undefined;if(!Module.noImageDecoding&&typeof Browser.URLObject===\"undefined\"){out(\"warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available.\");Module.noImageDecoding=true}var imagePlugin={};imagePlugin[\"canHandle\"]=function imagePlugin_canHandle(name){return!Module.noImageDecoding&&/\\.(jpg|jpeg|png|bmp)$/i.test(name)};imagePlugin[\"handle\"]=function imagePlugin_handle(byteArray,name,onload,onerror){var b=null;if(Browser.hasBlobConstructor){try{b=new Blob([byteArray],{type:Browser.getMimetype(name)});if(b.size!==byteArray.length){b=new Blob([new Uint8Array(byteArray).buffer],{type:Browser.getMimetype(name)})}}catch(e){warnOnce(\"Blob constructor present but fails: \"+e+\"; falling back to blob builder\")}}if(!b){var bb=new Browser.BlobBuilder;bb.append(new Uint8Array(byteArray).buffer);b=bb.getBlob()}var url=Browser.URLObject.createObjectURL(b);assert(typeof url==\"string\",\"createObjectURL must return a url as a string\");var img=new Image;img.onload=function img_onload(){assert(img.complete,\"Image \"+name+\" could not be decoded\");var canvas=document.createElement(\"canvas\");canvas.width=img.width;canvas.height=img.height;var ctx=canvas.getContext(\"2d\");ctx.drawImage(img,0,0);Module[\"preloadedImages\"][name]=canvas;Browser.URLObject.revokeObjectURL(url);if(onload)onload(byteArray)};img.onerror=function img_onerror(event){out(\"Image \"+url+\" could not be decoded\");if(onerror)onerror()};img.src=url};Module[\"preloadPlugins\"].push(imagePlugin);var audioPlugin={};audioPlugin[\"canHandle\"]=function audioPlugin_canHandle(name){return!Module.noAudioDecoding&&name.substr(-4)in{\".ogg\":1,\".wav\":1,\".mp3\":1}};audioPlugin[\"handle\"]=function audioPlugin_handle(byteArray,name,onload,onerror){var done=false;function finish(audio){if(done)return;done=true;Module[\"preloadedAudios\"][name]=audio;if(onload)onload(byteArray)}function fail(){if(done)return;done=true;Module[\"preloadedAudios\"][name]=new Audio;if(onerror)onerror()}if(Browser.hasBlobConstructor){try{var b=new Blob([byteArray],{type:Browser.getMimetype(name)})}catch(e){return fail()}var url=Browser.URLObject.createObjectURL(b);assert(typeof url==\"string\",\"createObjectURL must return a url as a string\");var audio=new Audio;audio.addEventListener(\"canplaythrough\",function(){finish(audio)},false);audio.onerror=function audio_onerror(event){if(done)return;out(\"warning: browser could not fully decode audio \"+name+\", trying slower base64 approach\");function encode64(data){var BASE=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";var PAD=\"=\";var ret=\"\";var leftchar=0;var leftbits=0;for(var i=0;i<data.length;i++){leftchar=leftchar<<8|data[i];leftbits+=8;while(leftbits>=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src=\"data:audio/x-\"+name.substr(-3)+\";base64,\"+encode64(byteArray);finish(audio)};audio.src=url;safeSetTimeout(function(){finish(audio)},1e4)}else{return fail()}};Module[\"preloadPlugins\"].push(audioPlugin);function pointerLockChange(){Browser.pointerLock=document[\"pointerLockElement\"]===Module[\"canvas\"]||document[\"mozPointerLockElement\"]===Module[\"canvas\"]||document[\"webkitPointerLockElement\"]===Module[\"canvas\"]||document[\"msPointerLockElement\"]===Module[\"canvas\"]}var canvas=Module[\"canvas\"];if(canvas){canvas.requestPointerLock=canvas[\"requestPointerLock\"]||canvas[\"mozRequestPointerLock\"]||canvas[\"webkitRequestPointerLock\"]||canvas[\"msRequestPointerLock\"]||function(){};canvas.exitPointerLock=document[\"exitPointerLock\"]||document[\"mozExitPointerLock\"]||document[\"webkitExitPointerLock\"]||document[\"msExitPointerLock\"]||function(){};canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener(\"pointerlockchange\",pointerLockChange,false);document.addEventListener(\"mozpointerlockchange\",pointerLockChange,false);document.addEventListener(\"webkitpointerlockchange\",pointerLockChange,false);document.addEventListener(\"mspointerlockchange\",pointerLockChange,false);if(Module[\"elementPointerLock\"]){canvas.addEventListener(\"click\",function(ev){if(!Browser.pointerLock&&Module[\"canvas\"].requestPointerLock){Module[\"canvas\"].requestPointerLock();ev.preventDefault()}},false)}}},createContext:function(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx;var contextHandle;if(useWebGL){var contextAttributes={antialias:false,alpha:false,majorVersion:typeof WebGL2RenderingContext!==\"undefined\"?2:1};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}if(typeof GL!==\"undefined\"){contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}}}else{ctx=canvas.getContext(\"2d\")}if(!ctx)return null;if(setInModule){if(!useWebGL)assert(typeof GLctx===\"undefined\",\"cannot set in module if GLctx is used, but we are a non-GL context that would replace it\");Module.ctx=ctx;if(useWebGL)GL.makeContextCurrent(contextHandle);Module.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach(function(callback){callback()});Browser.init()}return ctx},destroyContext:function(canvas,useWebGL,setInModule){},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function(lockPointer,resizeCanvas){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;if(typeof Browser.lockPointer===\"undefined\")Browser.lockPointer=true;if(typeof Browser.resizeCanvas===\"undefined\")Browser.resizeCanvas=false;var canvas=Module[\"canvas\"];function fullscreenChange(){Browser.isFullscreen=false;var canvasContainer=canvas.parentNode;if((document[\"fullscreenElement\"]||document[\"mozFullScreenElement\"]||document[\"msFullscreenElement\"]||document[\"webkitFullscreenElement\"]||document[\"webkitCurrentFullScreenElement\"])===canvasContainer){canvas.exitFullscreen=Browser.exitFullscreen;if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullscreen=true;if(Browser.resizeCanvas){Browser.setFullscreenCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas){Browser.setWindowedCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}if(Module[\"onFullScreen\"])Module[\"onFullScreen\"](Browser.isFullscreen);if(Module[\"onFullscreen\"])Module[\"onFullscreen\"](Browser.isFullscreen)}if(!Browser.fullscreenHandlersInstalled){Browser.fullscreenHandlersInstalled=true;document.addEventListener(\"fullscreenchange\",fullscreenChange,false);document.addEventListener(\"mozfullscreenchange\",fullscreenChange,false);document.addEventListener(\"webkitfullscreenchange\",fullscreenChange,false);document.addEventListener(\"MSFullscreenChange\",fullscreenChange,false)}var canvasContainer=document.createElement(\"div\");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullscreen=canvasContainer[\"requestFullscreen\"]||canvasContainer[\"mozRequestFullScreen\"]||canvasContainer[\"msRequestFullscreen\"]||(canvasContainer[\"webkitRequestFullscreen\"]?function(){canvasContainer[\"webkitRequestFullscreen\"](Element[\"ALLOW_KEYBOARD_INPUT\"])}:null)||(canvasContainer[\"webkitRequestFullScreen\"]?function(){canvasContainer[\"webkitRequestFullScreen\"](Element[\"ALLOW_KEYBOARD_INPUT\"])}:null);canvasContainer.requestFullscreen()},requestFullScreen:function(){abort(\"Module.requestFullScreen has been replaced by Module.requestFullscreen (without a capital S)\")},exitFullscreen:function(){if(!Browser.isFullscreen){return false}var CFS=document[\"exitFullscreen\"]||document[\"cancelFullScreen\"]||document[\"mozCancelFullScreen\"]||document[\"msExitFullscreen\"]||document[\"webkitCancelFullScreen\"]||function(){};CFS.apply(document,[]);return true},nextRAF:0,fakeRequestAnimationFrame:function(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)},requestAnimationFrame:function(func){if(typeof requestAnimationFrame===\"function\"){requestAnimationFrame(func);return}var RAF=Browser.fakeRequestAnimationFrame;RAF(func)},safeSetTimeout:function(func){return safeSetTimeout(func)},safeRequestAnimationFrame:function(func){return Browser.requestAnimationFrame(function(){callUserCallback(func)})},getMimetype:function(name){return{\"jpg\":\"image/jpeg\",\"jpeg\":\"image/jpeg\",\"png\":\"image/png\",\"bmp\":\"image/bmp\",\"ogg\":\"audio/ogg\",\"wav\":\"audio/wav\",\"mp3\":\"audio/mpeg\"}[name.substr(name.lastIndexOf(\".\")+1)]},getUserMedia:function(func){if(!window.getUserMedia){window.getUserMedia=navigator[\"getUserMedia\"]||navigator[\"mozGetUserMedia\"]}window.getUserMedia(func)},getMovementX:function(event){return event[\"movementX\"]||event[\"mozMovementX\"]||event[\"webkitMovementX\"]||0},getMovementY:function(event){return event[\"movementY\"]||event[\"mozMovementY\"]||event[\"webkitMovementY\"]||0},getMouseWheelDelta:function(event){var delta=0;switch(event.type){case\"DOMMouseScroll\":delta=event.detail/3;break;case\"mousewheel\":delta=event.wheelDelta/120;break;case\"wheel\":delta=event.deltaY;switch(event.deltaMode){case 0:delta/=100;break;case 1:delta/=3;break;case 2:delta*=80;break;default:throw\"unrecognized mouse wheel delta mode: \"+event.deltaMode}break;default:throw\"unrecognized mouse wheel event: \"+event.type}return delta},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(event){if(Browser.pointerLock){if(event.type!=\"mousemove\"&&\"mozMovementX\"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}if(typeof SDL!=\"undefined\"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}}else{var rect=Module[\"canvas\"].getBoundingClientRect();var cw=Module[\"canvas\"].width;var ch=Module[\"canvas\"].height;var scrollX=typeof window.scrollX!==\"undefined\"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!==\"undefined\"?window.scrollY:window.pageYOffset;assert(typeof scrollX!==\"undefined\"&&typeof scrollY!==\"undefined\",\"Unable to retrieve scroll position, mouse positions likely broken.\");if(event.type===\"touchstart\"||event.type===\"touchend\"||event.type===\"touchmove\"){var touch=event.touch;if(touch===undefined){return}var adjustedX=touch.pageX-(scrollX+rect.left);var adjustedY=touch.pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);var coords={x:adjustedX,y:adjustedY};if(event.type===\"touchstart\"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type===\"touchend\"||event.type===\"touchmove\"){var last=Browser.touches[touch.identifier];if(!last)last=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}},resizeListeners:[],updateResizeListeners:function(){var canvas=Module[\"canvas\"];Browser.resizeListeners.forEach(function(listener){listener(canvas.width,canvas.height)})},setCanvasSize:function(width,height,noUpdates){var canvas=Module[\"canvas\"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!=\"undefined\"){var flags=HEAPU32[SDL.screen>>2];flags=flags|8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module[\"canvas\"]);Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!=\"undefined\"){var flags=HEAPU32[SDL.screen>>2];flags=flags&~8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module[\"canvas\"]);Browser.updateResizeListeners()},updateCanvasDimensions:function(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module[\"forcedAspectRatio\"]&&Module[\"forcedAspectRatio\"]>0){if(w/h<Module[\"forcedAspectRatio\"]){w=Math.round(h*Module[\"forcedAspectRatio\"])}else{h=Math.round(w/Module[\"forcedAspectRatio\"])}}if((document[\"fullscreenElement\"]||document[\"mozFullScreenElement\"]||document[\"msFullscreenElement\"]||document[\"webkitFullscreenElement\"]||document[\"webkitCurrentFullScreenElement\"])===canvas.parentNode&&typeof screen!=\"undefined\"){var factor=Math.min(screen.width/w,screen.height/h);w=Math.round(w*factor);h=Math.round(h*factor)}if(Browser.resizeCanvas){if(canvas.width!=w)canvas.width=w;if(canvas.height!=h)canvas.height=h;if(typeof canvas.style!=\"undefined\"){canvas.style.removeProperty(\"width\");canvas.style.removeProperty(\"height\")}}else{if(canvas.width!=wNative)canvas.width=wNative;if(canvas.height!=hNative)canvas.height=hNative;if(typeof canvas.style!=\"undefined\"){if(w!=wNative||h!=hNative){canvas.style.setProperty(\"width\",w+\"px\",\"important\");canvas.style.setProperty(\"height\",h+\"px\",\"important\")}else{canvas.style.removeProperty(\"width\");canvas.style.removeProperty(\"height\")}}}}};function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback==\"function\"){callback(Module);continue}var func=callback.func;if(typeof func===\"number\"){if(callback.arg===undefined){wasmTable.get(func)()}else{wasmTable.get(func)(callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}function demangle(func){warnOnce(\"warning: build with  -s DEMANGLE_SUPPORT=1  to link in libcxxabi demangling\");return func}function demangleAll(text){var regex=/\\b_Z[\\w\\d_]+/g;return text.replace(regex,function(x){var y=demangle(x);return x===y?x:y+\" [\"+x+\"]\"})}function jsStackTrace(){var error=new Error;if(!error.stack){try{throw new Error}catch(e){error=e}if(!error.stack){return\"(no stack trace available)\"}}return error.stack.toString()}function stackTrace(){var js=jsStackTrace();if(Module[\"extraStackTrace\"])js+=\"\\n\"+Module[\"extraStackTrace\"]();return demangleAll(js)}function ___cxa_allocate_exception(size){return _malloc(size+16)+16}function _atexit(func,arg){}function ___cxa_atexit(a0,a1){return _atexit(a0,a1)}function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-16;this.set_type=function(type){HEAP32[this.ptr+4>>2]=type};this.get_type=function(){return HEAP32[this.ptr+4>>2]};this.set_destructor=function(destructor){HEAP32[this.ptr+8>>2]=destructor};this.get_destructor=function(){return HEAP32[this.ptr+8>>2]};this.set_refcount=function(refcount){HEAP32[this.ptr>>2]=refcount};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>0]=caught};this.get_caught=function(){return HEAP8[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return HEAP8[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_type(type);this.set_destructor(destructor);this.set_refcount(0);this.set_caught(false);this.set_rethrown(false)};this.add_ref=function(){var value=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=value+1};this.release_ref=function(){var prev=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=prev-1;assert(prev>0);return prev===1}}function CatchInfo(ptr){this.free=function(){_free(this.ptr);this.ptr=0};this.set_base_ptr=function(basePtr){HEAP32[this.ptr>>2]=basePtr};this.get_base_ptr=function(){return HEAP32[this.ptr>>2]};this.set_adjusted_ptr=function(adjustedPtr){HEAP32[this.ptr+4>>2]=adjustedPtr};this.get_adjusted_ptr_addr=function(){return this.ptr+4};this.get_adjusted_ptr=function(){return HEAP32[this.ptr+4>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_exception_info().get_type());if(isPointer){return HEAP32[this.get_base_ptr()>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.get_base_ptr()};this.get_exception_info=function(){return new ExceptionInfo(this.get_base_ptr())};if(ptr===undefined){this.ptr=_malloc(8);this.set_adjusted_ptr(0)}else{this.ptr=ptr}}var exceptionCaught=[];function exception_addRef(info){info.add_ref()}var uncaughtExceptionCount=0;function ___cxa_begin_catch(ptr){var catchInfo=new CatchInfo(ptr);var info=catchInfo.get_exception_info();if(!info.get_caught()){info.set_caught(true);uncaughtExceptionCount--}info.set_rethrown(false);exceptionCaught.push(catchInfo);exception_addRef(info);return catchInfo.get_exception_ptr()}var exceptionLast=0;function ___cxa_free_exception(ptr){try{return _free(new ExceptionInfo(ptr).ptr)}catch(e){err(\"exception during cxa_free_exception: \"+e)}}function exception_decRef(info){if(info.release_ref()&&!info.get_rethrown()){var destructor=info.get_destructor();if(destructor){wasmTable.get(destructor)(info.excPtr)}___cxa_free_exception(info.excPtr)}}function ___cxa_end_catch(){_setThrew(0);assert(exceptionCaught.length>0);var catchInfo=exceptionCaught.pop();exception_decRef(catchInfo.get_exception_info());catchInfo.free();exceptionLast=0}function ___resumeException(catchInfoPtr){var catchInfo=new CatchInfo(catchInfoPtr);var ptr=catchInfo.get_base_ptr();if(!exceptionLast){exceptionLast=ptr}catchInfo.free();throw ptr+\" - Exception catching is disabled, this exception cannot be caught. Compile with -s NO_DISABLE_EXCEPTION_CATCHING or -s EXCEPTION_CATCHING_ALLOWED=[..] to catch.\"}function ___cxa_find_matching_catch_2(){var thrown=exceptionLast;if(!thrown){setTempRet0(0);return 0|0}var info=new ExceptionInfo(thrown);var thrownType=info.get_type();var catchInfo=new CatchInfo;catchInfo.set_base_ptr(thrown);catchInfo.set_adjusted_ptr(thrown);if(!thrownType){setTempRet0(0);return catchInfo.ptr|0}var typeArray=Array.prototype.slice.call(arguments);for(var i=0;i<typeArray.length;i++){var caughtType=typeArray[i];if(caughtType===0||caughtType===thrownType){break}if(___cxa_can_catch(caughtType,thrownType,catchInfo.get_adjusted_ptr_addr())){setTempRet0(caughtType);return catchInfo.ptr|0}}setTempRet0(thrownType);return catchInfo.ptr|0}function ___cxa_find_matching_catch_3(){var thrown=exceptionLast;if(!thrown){setTempRet0(0);return 0|0}var info=new ExceptionInfo(thrown);var thrownType=info.get_type();var catchInfo=new CatchInfo;catchInfo.set_base_ptr(thrown);catchInfo.set_adjusted_ptr(thrown);if(!thrownType){setTempRet0(0);return catchInfo.ptr|0}var typeArray=Array.prototype.slice.call(arguments);for(var i=0;i<typeArray.length;i++){var caughtType=typeArray[i];if(caughtType===0||caughtType===thrownType){break}if(___cxa_can_catch(caughtType,thrownType,catchInfo.get_adjusted_ptr_addr())){setTempRet0(caughtType);return catchInfo.ptr|0}}setTempRet0(thrownType);return catchInfo.ptr|0}function ___cxa_rethrow(){var catchInfo=exceptionCaught.pop();if(!catchInfo){abort(\"no exception to throw\")}var info=catchInfo.get_exception_info();var ptr=catchInfo.get_base_ptr();if(!info.get_rethrown()){exceptionCaught.push(catchInfo);info.set_rethrown(true);info.set_caught(false);uncaughtExceptionCount++}else{catchInfo.free()}exceptionLast=ptr;throw ptr+\" - Exception catching is disabled, this exception cannot be caught. Compile with -s NO_DISABLE_EXCEPTION_CATCHING or -s EXCEPTION_CATCHING_ALLOWED=[..] to catch.\"}function ___cxa_thread_atexit(a0,a1){return _atexit(a0,a1)}function ___cxa_throw(ptr,type,destructor){var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;throw ptr+\" - Exception catching is disabled, this exception cannot be caught. Compile with -s NO_DISABLE_EXCEPTION_CATCHING or -s EXCEPTION_CATCHING_ALLOWED=[..] to catch.\"}function setErrNo(value){HEAP32[___errno_location()>>2]=value;return value}var PATH={splitPath:function(filename){var splitPathRe=/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:function(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:function(path){var isAbsolute=path.charAt(0)===\"/\",trailingSlash=path.substr(-1)===\"/\";path=PATH.normalizeArray(path.split(\"/\").filter(function(p){return!!p}),!isAbsolute).join(\"/\");if(!path&&!isAbsolute){path=\".\"}if(path&&trailingSlash){path+=\"/\"}return(isAbsolute?\"/\":\"\")+path},dirname:function(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:function(path){if(path===\"/\")return\"/\";path=PATH.normalize(path);path=path.replace(/\\/$/,\"\");var lastSlash=path.lastIndexOf(\"/\");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},extname:function(path){return PATH.splitPath(path)[3]},join:function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join(\"/\"))},join2:function(l,r){return PATH.normalize(l+\"/\"+r)}};function getRandomDevice(){if(typeof crypto===\"object\"&&typeof crypto[\"getRandomValues\"]===\"function\"){var randomBuffer=new Uint8Array(1);return function(){crypto.getRandomValues(randomBuffer);return randomBuffer[0]}}else if(ENVIRONMENT_IS_NODE){try{var crypto_module=require(\"crypto\");return function(){return crypto_module[\"randomBytes\"](1)[0]}}catch(e){}}return function(){abort(\"no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };\")}}var PATH_FS={resolve:function(){var resolvedPath=\"\",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[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.charAt(0)===\"/\"}resolvedPath=PATH.normalizeArray(resolvedPath.split(\"/\").filter(function(p){return!!p}),!resolvedAbsolute).join(\"/\");return(resolvedAbsolute?\"/\":\"\")+resolvedPath||\".\"},relative:function(from,to){from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start<arr.length;start++){if(arr[start]!==\"\")break}var end=arr.length-1;for(;end>=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<length;i++){if(fromParts[i]!==toParts[i]){samePartsLength=i;break}}var outputParts=[];for(var i=samePartsLength;i<fromParts.length;i++){outputParts.push(\"..\")}outputParts=outputParts.concat(toParts.slice(samePartsLength));return outputParts.join(\"/\")}};var TTY={ttys:[],init:function(){},shutdown:function(){},register:function(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)},stream_ops:{open:function(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43)}stream.tty=tty;stream.seekable=false},close:function(stream){stream.tty.ops.flush(stream.tty)},flush:function(stream){stream.tty.ops.flush(stream.tty)},read:function(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;i<length;i++){var result;try{result=stream.tty.ops.get_char(stream.tty)}catch(e){throw new FS.ErrnoError(29)}if(result===undefined&&bytesRead===0){throw new FS.ErrnoError(6)}if(result===null||result===undefined)break;bytesRead++;buffer[offset+i]=result}if(bytesRead){stream.node.timestamp=Date.now()}return bytesRead},write:function(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.put_char){throw new FS.ErrnoError(60)}try{for(var i=0;i<length;i++){stream.tty.ops.put_char(stream.tty,buffer[offset+i])}}catch(e){throw new FS.ErrnoError(29)}if(length){stream.node.timestamp=Date.now()}return i}},default_tty_ops:{get_char:function(tty){if(!tty.input.length){var result=null;if(ENVIRONMENT_IS_NODE){var BUFSIZE=256;var buf=Buffer.alloc(BUFSIZE);var bytesRead=0;try{bytesRead=nodeFS.readSync(process.stdin.fd,buf,0,BUFSIZE,null)}catch(e){if(e.toString().includes(\"EOF\"))bytesRead=0;else throw e}if(bytesRead>0){result=buf.slice(0,bytesRead).toString(\"utf-8\")}else{result=null}}else if(typeof window!=\"undefined\"&&typeof window.prompt==\"function\"){result=window.prompt(\"Input: \");if(result!==null){result+=\"\\n\"}}else if(typeof readline==\"function\"){result=readline();if(result!==null){result+=\"\\n\"}}if(!result){return null}tty.input=intArrayFromString(result,true)}return tty.input.shift()},put_char:function(tty,val){if(val===null||val===10){out(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}}},default_tty1_ops:{put_char:function(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};function zeroMemory(address,size){HEAPU8.fill(0,address,address+size)}function alignMemory(size,alignment){assert(alignment,\"alignment argument is required\");return Math.ceil(size/alignment)*alignment}function mmapAlloc(size){size=alignMemory(size,65536);var ptr=_memalign(65536,size);if(!ptr)return 0;zeroMemory(ptr,size);return ptr}var MEMFS={ops_table:null,mount:function(mount){return MEMFS.createNode(null,\"/\",16384|511,0)},createNode:function(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}if(!MEMFS.ops_table){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.timestamp=Date.now();if(parent){parent.contents[name]=node;parent.timestamp=node.timestamp}return node},getFileDataAsTypedArray:function(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:function(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<CAPACITY_DOUBLING_MAX?2:1.125)>>>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:function(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:function(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.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr},setattr:function(node,attr){if(attr.mode!==undefined){node.mode=attr.mode}if(attr.timestamp!==undefined){node.timestamp=attr.timestamp}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}},lookup:function(parent,name){throw FS.genericErrors[44]},mknod:function(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename:function(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55)}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp;old_node.parent=new_dir},unlink:function(parent,name){delete parent.contents[name];parent.timestamp=Date.now()},rmdir:function(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55)}delete parent.contents[name];parent.timestamp=Date.now()},readdir:function(node){var entries=[\".\",\"..\"];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue}entries.push(key)}return entries},symlink:function(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink:function(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read:function(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);assert(size>=0);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i<size;i++)buffer[offset+i]=contents[position+i]}return size},write:function(stream,buffer,offset,length,position,canOwn){assert(!(buffer instanceof ArrayBuffer));if(buffer.buffer===HEAP8.buffer){canOwn=false}if(!length)return 0;var node=stream.node;node.timestamp=Date.now();if(buffer.subarray&&(!node.contents||node.contents.subarray)){if(canOwn){assert(position===0,\"canOwn must imply no weird position inside the file\");node.contents=buffer.subarray(offset,offset+length);node.usedBytes=length;return length}else if(node.usedBytes===0&&position===0){node.contents=buffer.slice(offset,offset+length);node.usedBytes=length;return length}else if(position+length<=node.usedBytes){node.contents.set(buffer.subarray(offset,offset+length),position);return length}}MEMFS.expandFileStorage(node,position+length);if(node.contents.subarray&&buffer.subarray){node.contents.set(buffer.subarray(offset,offset+length),position)}else{for(var i=0;i<length;i++){node.contents[position+i]=buffer[offset+i]}}node.usedBytes=Math.max(node.usedBytes,position+length);return length},llseek:function(stream,offset,whence){var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){position+=stream.node.usedBytes}}if(position<0){throw new FS.ErrnoError(28)}return position},allocate:function(stream,offset,length){MEMFS.expandFileStorage(stream.node,offset+length);stream.node.usedBytes=Math.max(stream.node.usedBytes,offset+length)},mmap:function(stream,address,length,position,prot,flags){if(address!==0){throw new FS.ErrnoError(28)}if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}var ptr;var allocated;var contents=stream.node.contents;if(!(flags&2)&&contents.buffer===buffer){allocated=false;ptr=contents.byteOffset}else{if(position>0||position+length<contents.length){if(contents.subarray){contents=contents.subarray(position,position+length)}else{contents=Array.prototype.slice.call(contents,position,position+length)}}allocated=true;ptr=mmapAlloc(length);if(!ptr){throw new FS.ErrnoError(48)}HEAP8.set(contents,ptr)}return{ptr:ptr,allocated:allocated}},msync:function(stream,buffer,offset,length,mmapFlags){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}if(mmapFlags&2){return 0}var bytesWritten=MEMFS.stream_ops.write(stream,buffer,0,length,offset,false);return 0}}};function asyncLoad(url,onload,onerror,noRunDep){var dep=!noRunDep?getUniqueRunDependency(\"al \"+url):\"\";readAsync(url,function(arrayBuffer){assert(arrayBuffer,'Loading data file \"'+url+'\" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},function(event){if(onerror){onerror()}else{throw'Loading data file \"'+url+'\" failed.'}});if(dep)addRunDependency(dep)}var ERRNO_MESSAGES={0:\"Success\",1:\"Arg list too long\",2:\"Permission denied\",3:\"Address already in use\",4:\"Address not available\",5:\"Address family not supported by protocol family\",6:\"No more processes\",7:\"Socket already connected\",8:\"Bad file number\",9:\"Trying to read unreadable message\",10:\"Mount device busy\",11:\"Operation canceled\",12:\"No children\",13:\"Connection aborted\",14:\"Connection refused\",15:\"Connection reset by peer\",16:\"File locking deadlock error\",17:\"Destination address required\",18:\"Math arg out of domain of func\",19:\"Quota exceeded\",20:\"File exists\",21:\"Bad address\",22:\"File too large\",23:\"Host is unreachable\",24:\"Identifier removed\",25:\"Illegal byte sequence\",26:\"Connection already in progress\",27:\"Interrupted system call\",28:\"Invalid argument\",29:\"I/O error\",30:\"Socket is already connected\",31:\"Is a directory\",32:\"Too many symbolic links\",33:\"Too many open files\",34:\"Too many links\",35:\"Message too long\",36:\"Multihop attempted\",37:\"File or path name too long\",38:\"Network interface is not configured\",39:\"Connection reset by network\",40:\"Network is unreachable\",41:\"Too many open files in system\",42:\"No buffer space available\",43:\"No such device\",44:\"No such file or directory\",45:\"Exec format error\",46:\"No record locks available\",47:\"The link has been severed\",48:\"Not enough core\",49:\"No message of desired type\",50:\"Protocol not available\",51:\"No space left on device\",52:\"Function not implemented\",53:\"Socket is not connected\",54:\"Not a directory\",55:\"Directory not empty\",56:\"State not recoverable\",57:\"Socket operation on non-socket\",59:\"Not a typewriter\",60:\"No such device or address\",61:\"Value too large for defined data type\",62:\"Previous owner died\",63:\"Not super-user\",64:\"Broken pipe\",65:\"Protocol error\",66:\"Unknown protocol\",67:\"Protocol wrong type for socket\",68:\"Math result not representable\",69:\"Read only file system\",70:\"Illegal seek\",71:\"No such process\",72:\"Stale file handle\",73:\"Connection timed out\",74:\"Text file busy\",75:\"Cross-device link\",100:\"Device not a stream\",101:\"Bad font file fmt\",102:\"Invalid slot\",103:\"Invalid request code\",104:\"No anode\",105:\"Block device required\",106:\"Channel number out of range\",107:\"Level 3 halted\",108:\"Level 3 reset\",109:\"Link number out of range\",110:\"Protocol driver not attached\",111:\"No CSI structure available\",112:\"Level 2 halted\",113:\"Invalid exchange\",114:\"Invalid request descriptor\",115:\"Exchange full\",116:\"No data (for no delay io)\",117:\"Timer expired\",118:\"Out of streams resources\",119:\"Machine is not on the network\",120:\"Package not installed\",121:\"The object is remote\",122:\"Advertise error\",123:\"Srmount error\",124:\"Communication error on send\",125:\"Cross mount point (not really error)\",126:\"Given log. name not unique\",127:\"f.d. invalid for this operation\",128:\"Remote address changed\",129:\"Can   access a needed shared lib\",130:\"Accessing a corrupted shared lib\",131:\".lib section in a.out corrupted\",132:\"Attempting to link in too many libs\",133:\"Attempting to exec a shared library\",135:\"Streams pipe error\",136:\"Too many users\",137:\"Socket type not supported\",138:\"Not supported\",139:\"Protocol family not supported\",140:\"Can't send after socket shutdown\",141:\"Too many references\",142:\"Host is down\",148:\"No medium (in tape drive)\",156:\"Level 2 not synchronized\"};var ERRNO_CODES={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:\"/\",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(path,opts){path=PATH_FS.resolve(FS.cwd(),path);opts=opts||{};if(!path)return{path:\"\",node:null};var defaults={follow_mount:true,recurse_count:0};for(var key in defaults){if(opts[key]===undefined){opts[key]=defaults[key]}}if(opts.recurse_count>8){throw new FS.ErrnoError(32)}var parts=PATH.normalizeArray(path.split(\"/\").filter(function(p){return!!p}),false);var current=FS.root;var current_path=\"/\";for(var i=0;i<parts.length;i++){var islast=i===parts.length-1;if(islast&&opts.parent){break}current=FS.lookupNode(current,parts[i]);current_path=PATH.join2(current_path,parts[i]);if(FS.isMountpoint(current)){if(!islast||islast&&opts.follow_mount){current=current.mounted.root}}if(!islast||opts.follow){var count=0;while(FS.isLink(current.mode)){var link=FS.readlink(current_path);current_path=PATH_FS.resolve(PATH.dirname(current_path),link);var lookup=FS.lookupPath(current_path,{recurse_count:opts.recurse_count});current=lookup.node;if(count++>40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath:function(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!==\"/\"?mount+\"/\"+path:mount+path}path=path?node.name+\"/\"+path:node.name;node=node.parent}},hashName:function(parentid,name){var hash=0;for(var i=0;i<name.length;i++){hash=(hash<<5)-hash+name.charCodeAt(i)|0}return(parentid+hash>>>0)%FS.nameTable.length},hashAddNode:function(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode:function(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:function(parent,name){var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode,parent)}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:function(parent,name,mode,rdev){assert(typeof parent===\"object\");var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode:function(node){FS.hashRemoveNode(node)},isRoot:function(node){return node===node.parent},isMountpoint:function(node){return!!node.mounted},isFile:function(mode){return(mode&61440)===32768},isDir:function(mode){return(mode&61440)===16384},isLink:function(mode){return(mode&61440)===40960},isChrdev:function(mode){return(mode&61440)===8192},isBlkdev:function(mode){return(mode&61440)===24576},isFIFO:function(mode){return(mode&61440)===4096},isSocket:function(mode){return(mode&49152)===49152},flagModes:{\"r\":0,\"r+\":2,\"w\":577,\"w+\":578,\"a\":1089,\"a+\":1090},modeStringToFlags:function(str){var flags=FS.flagModes[str];if(typeof flags===\"undefined\"){throw new Error(\"Unknown file open mode: \"+str)}return flags},flagsToPermissionString:function(flag){var perms=[\"r\",\"w\",\"rw\"][flag&3];if(flag&512){perms+=\"w\"}return perms},nodePermissions:function(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:function(dir){var errCode=FS.nodePermissions(dir,\"x\");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate:function(dir,name){try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,\"wx\")},mayDelete:function(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:function(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){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd:function(fd_start,fd_end){fd_start=fd_start||0;fd_end=fd_end||FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStream:function(fd){return FS.streams[fd]},createStream:function(stream,fd_start,fd_end){if(!FS.FSStream){FS.FSStream=function(){};FS.FSStream.prototype={object:{get:function(){return this.node},set:function(val){this.node=val}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}}}}var newStream=new FS.FSStream;for(var p in stream){newStream[p]=stream[p]}stream=newStream;var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream:function(fd){FS.streams[fd]=null},chrdev_stream_ops:{open:function(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek:function(){throw new FS.ErrnoError(70)}},major:function(dev){return dev>>8},minor:function(dev){return dev&255},makedev:function(ma,mi){return ma<<8|mi},registerDevice:function(dev,ops){FS.devices[dev]={stream_ops:ops}},getDevice:function(dev){return FS.devices[dev]},getMounts:function(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs:function(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){assert(FS.syncFSRequests>0);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(function(mount){if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount:function(type,opts,mountpoint){if(typeof type===\"string\"){throw type}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:type,opts:opts,mountpoint: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:function(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(function(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);assert(idx!==-1);node.mount.mounts.splice(idx,1)},lookup:function(parent,name){return parent.node_ops.lookup(parent,name)},mknod:function(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name===\".\"||name===\"..\"){throw new FS.ErrnoError(28)}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)},create:function(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir:function(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree:function(path,mode){var dirs=path.split(\"/\");var d=\"\";for(var i=0;i<dirs.length;++i){if(!dirs[i])continue;d+=\"/\"+dirs[i];try{FS.mkdir(d,mode)}catch(e){if(e.errno!=20)throw e}}},mkdev:function(path,mode,dev){if(typeof dev===\"undefined\"){dev=mode;mode=438}mode|=8192;return FS.mknod(path,mode,dev)},symlink:function(oldpath,newpath){if(!PATH_FS.resolve(oldpath)){throw new FS.ErrnoError(44)}var lookup=FS.lookupPath(newpath,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var newname=PATH.basename(newpath);var errCode=FS.mayCreate(parent,newname);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.symlink){throw new FS.ErrnoError(63)}return parent.node_ops.symlink(parent,newname,oldpath)},rename:function(old_path,new_path){var old_dirname=PATH.dirname(old_path);var new_dirname=PATH.dirname(new_path);var old_name=PATH.basename(old_path);var new_name=PATH.basename(new_path);var lookup,old_dir,new_dir;lookup=FS.lookupPath(old_path,{parent:true});old_dir=lookup.node;lookup=FS.lookupPath(new_path,{parent:true});new_dir=lookup.node;if(!old_dir||!new_dir)throw new FS.ErrnoError(44);if(old_dir.mount!==new_dir.mount){throw new FS.ErrnoError(75)}var old_node=FS.lookupNode(old_dir,old_name);var relative=PATH_FS.relative(old_path,new_dirname);if(relative.charAt(0)!==\".\"){throw new FS.ErrnoError(28)}relative=PATH_FS.relative(new_path,old_dirname);if(relative.charAt(0)!==\".\"){throw new FS.ErrnoError(55)}var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(old_node===new_node){return}var isdir=FS.isDir(old_node.mode);var errCode=FS.mayDelete(old_dir,old_name,isdir);if(errCode){throw new FS.ErrnoError(errCode)}errCode=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name);if(errCode){throw new FS.ErrnoError(errCode)}if(!old_dir.node_ops.rename){throw new FS.ErrnoError(63)}if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node)){throw new FS.ErrnoError(10)}if(new_dir!==old_dir){errCode=FS.nodePermissions(old_dir,\"w\");if(errCode){throw new FS.ErrnoError(errCode)}}try{if(FS.trackingDelegate[\"willMovePath\"]){FS.trackingDelegate[\"willMovePath\"](old_path,new_path)}}catch(e){err(\"FS.trackingDelegate['willMovePath']('\"+old_path+\"', '\"+new_path+\"') threw an exception: \"+e.message)}FS.hashRemoveNode(old_node);try{old_dir.node_ops.rename(old_node,new_dir,new_name)}catch(e){throw e}finally{FS.hashAddNode(old_node)}try{if(FS.trackingDelegate[\"onMovePath\"])FS.trackingDelegate[\"onMovePath\"](old_path,new_path)}catch(e){err(\"FS.trackingDelegate['onMovePath']('\"+old_path+\"', '\"+new_path+\"') threw an exception: \"+e.message)}},rmdir:function(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,true);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.rmdir){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}try{if(FS.trackingDelegate[\"willDeletePath\"]){FS.trackingDelegate[\"willDeletePath\"](path)}}catch(e){err(\"FS.trackingDelegate['willDeletePath']('\"+path+\"') threw an exception: \"+e.message)}parent.node_ops.rmdir(parent,name);FS.destroyNode(node);try{if(FS.trackingDelegate[\"onDeletePath\"])FS.trackingDelegate[\"onDeletePath\"](path)}catch(e){err(\"FS.trackingDelegate['onDeletePath']('\"+path+\"') threw an exception: \"+e.message)}},readdir:function(path){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node.node_ops.readdir){throw new FS.ErrnoError(54)}return node.node_ops.readdir(node)},unlink:function(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,false);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.unlink){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}try{if(FS.trackingDelegate[\"willDeletePath\"]){FS.trackingDelegate[\"willDeletePath\"](path)}}catch(e){err(\"FS.trackingDelegate['willDeletePath']('\"+path+\"') threw an exception: \"+e.message)}parent.node_ops.unlink(parent,name);FS.destroyNode(node);try{if(FS.trackingDelegate[\"onDeletePath\"])FS.trackingDelegate[\"onDeletePath\"](path)}catch(e){err(\"FS.trackingDelegate['onDeletePath']('\"+path+\"') threw an exception: \"+e.message)}},readlink:function(path){var lookup=FS.lookupPath(path);var link=lookup.node;if(!link){throw new FS.ErrnoError(44)}if(!link.node_ops.readlink){throw new FS.ErrnoError(28)}return PATH_FS.resolve(FS.getPath(link.parent),link.node_ops.readlink(link))},stat:function(path,dontFollow){var lookup=FS.lookupPath(path,{follow:!dontFollow});var node=lookup.node;if(!node){throw new FS.ErrnoError(44)}if(!node.node_ops.getattr){throw new FS.ErrnoError(63)}return node.node_ops.getattr(node)},lstat:function(path){return FS.stat(path,true)},chmod:function(path,mode,dontFollow){var node;if(typeof path===\"string\"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{mode:mode&4095|node.mode&~4095,timestamp:Date.now()})},lchmod:function(path,mode){FS.chmod(path,mode,true)},fchmod:function(fd,mode){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chmod(stream.node,mode)},chown:function(path,uid,gid,dontFollow){var node;if(typeof path===\"string\"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{timestamp:Date.now()})},lchown:function(path,uid,gid){FS.chown(path,uid,gid,true)},fchown:function(fd,uid,gid){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chown(stream.node,uid,gid)},truncate:function(path,len){if(len<0){throw new FS.ErrnoError(28)}var node;if(typeof path===\"string\"){var lookup=FS.lookupPath(path,{follow:true});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}if(FS.isDir(node.mode)){throw new FS.ErrnoError(31)}if(!FS.isFile(node.mode)){throw new FS.ErrnoError(28)}var errCode=FS.nodePermissions(node,\"w\");if(errCode){throw new FS.ErrnoError(errCode)}node.node_ops.setattr(node,{size:len,timestamp:Date.now()})},ftruncate:function(fd,len){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(28)}FS.truncate(stream.node,len)},utime:function(path,atime,mtime){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;node.node_ops.setattr(node,{timestamp:Math.max(atime,mtime)})},open:function(path,flags,mode,fd_start,fd_end){if(path===\"\"){throw new FS.ErrnoError(44)}flags=typeof flags===\"string\"?FS.modeStringToFlags(flags):flags;mode=typeof mode===\"undefined\"?438:mode;if(flags&64){mode=mode&4095|32768}else{mode=0}var node;if(typeof path===\"object\"){node=path}else{path=PATH.normalize(path);try{var lookup=FS.lookupPath(path,{follow:!(flags&131072)});node=lookup.node}catch(e){}}var created=false;if(flags&64){if(node){if(flags&128){throw new FS.ErrnoError(20)}}else{node=FS.mknod(path,mode,0);created=true}}if(!node){throw new FS.ErrnoError(44)}if(FS.isChrdev(node.mode)){flags&=~512}if(flags&65536&&!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}if(!created){var errCode=FS.mayOpen(node,flags);if(errCode){throw new FS.ErrnoError(errCode)}}if(flags&512){FS.truncate(node,0)}flags&=~(128|512|131072);var stream=FS.createStream({node:node,path:FS.getPath(node),flags:flags,seekable:true,position:0,stream_ops:node.stream_ops,ungotten:[],error:false},fd_start,fd_end);if(stream.stream_ops.open){stream.stream_ops.open(stream)}if(Module[\"logReadFiles\"]&&!(flags&1)){if(!FS.readFiles)FS.readFiles={};if(!(path in FS.readFiles)){FS.readFiles[path]=1;err(\"FS.trackingDelegate error on read file: \"+path)}}try{if(FS.trackingDelegate[\"onOpenFile\"]){var trackingFlags=0;if((flags&2097155)!==1){trackingFlags|=FS.tracking.openFlags.READ}if((flags&2097155)!==0){trackingFlags|=FS.tracking.openFlags.WRITE}FS.trackingDelegate[\"onOpenFile\"](path,trackingFlags)}}catch(e){err(\"FS.trackingDelegate['onOpenFile']('\"+path+\"', flags) threw an exception: \"+e.message)}return stream},close:function(stream){if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(stream.getdents)stream.getdents=null;try{if(stream.stream_ops.close){stream.stream_ops.close(stream)}}catch(e){throw e}finally{FS.closeStream(stream.fd)}stream.fd=null},isClosed:function(stream){return stream.fd===null},llseek:function(stream,offset,whence){if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(!stream.seekable||!stream.stream_ops.llseek){throw new FS.ErrnoError(70)}if(whence!=0&&whence!=1&&whence!=2){throw new FS.ErrnoError(28)}stream.position=stream.stream_ops.llseek(stream,offset,whence);stream.ungotten=[];return stream.position},read:function(stream,buffer,offset,length,position){if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.read){throw new FS.ErrnoError(28)}var seeking=typeof position!==\"undefined\";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead},write:function(stream,buffer,offset,length,position,canOwn){if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.write){throw new FS.ErrnoError(28)}if(stream.seekable&&stream.flags&1024){FS.llseek(stream,0,2)}var seeking=typeof position!==\"undefined\";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;try{if(stream.path&&FS.trackingDelegate[\"onWriteToFile\"])FS.trackingDelegate[\"onWriteToFile\"](stream.path)}catch(e){err(\"FS.trackingDelegate['onWriteToFile']('\"+stream.path+\"') threw an exception: \"+e.message)}return bytesWritten},allocate:function(stream,offset,length){if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(offset<0||length<=0){throw new FS.ErrnoError(28)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(!FS.isFile(stream.node.mode)&&!FS.isDir(stream.node.mode)){throw new FS.ErrnoError(43)}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(138)}stream.stream_ops.allocate(stream,offset,length)},mmap:function(stream,address,length,position,prot,flags){if((prot&2)!==0&&(flags&2)===0&&(stream.flags&2097155)!==2){throw new FS.ErrnoError(2)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(2)}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(43)}return stream.stream_ops.mmap(stream,address,length,position,prot,flags)},msync:function(stream,buffer,offset,length,mmapFlags){if(!stream||!stream.stream_ops.msync){return 0}return stream.stream_ops.msync(stream,buffer,offset,length,mmapFlags)},munmap:function(stream){return 0},ioctl:function(stream,cmd,arg){if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(59)}return stream.stream_ops.ioctl(stream,cmd,arg)},readFile:function(path,opts){opts=opts||{};opts.flags=opts.flags||0;opts.encoding=opts.encoding||\"binary\";if(opts.encoding!==\"utf8\"&&opts.encoding!==\"binary\"){throw new Error('Invalid encoding type \"'+opts.encoding+'\"')}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding===\"utf8\"){ret=UTF8ArrayToString(buf,0)}else if(opts.encoding===\"binary\"){ret=buf}FS.close(stream);return ret},writeFile:function(path,data,opts){opts=opts||{};opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);if(typeof data===\"string\"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,undefined,opts.canOwn)}else if(ArrayBuffer.isView(data)){FS.write(stream,data,0,data.byteLength,undefined,opts.canOwn)}else{throw new Error(\"Unsupported data type\")}FS.close(stream)},cwd:function(){return FS.currentPath},chdir:function(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:function(){FS.mkdir(\"/tmp\");FS.mkdir(\"/home\");FS.mkdir(\"/home/web_user\")},createDefaultDevices:function(){FS.mkdir(\"/dev\");FS.registerDevice(FS.makedev(1,3),{read:function(){return 0},write:function(stream,buffer,offset,length,pos){return length}});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 random_device=getRandomDevice();FS.createDevice(\"/dev\",\"random\",random_device);FS.createDevice(\"/dev\",\"urandom\",random_device);FS.mkdir(\"/dev/shm\");FS.mkdir(\"/dev/shm/tmp\")},createSpecialDirectories:function(){FS.mkdir(\"/proc\");var proc_self=FS.mkdir(\"/proc/self\");FS.mkdir(\"/proc/self/fd\");FS.mount({mount:function(){var node=FS.createNode(proc_self,\"fd\",16384|511,73);node.node_ops={lookup:function(parent,name){var fd=+name;var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);var ret={parent:null,mount:{mountpoint:\"fake\"},node_ops:{readlink:function(){return stream.path}}};ret.parent=ret;return ret}};return node}},{},\"/proc/self/fd\")},createStandardStreams:function(){if(Module[\"stdin\"]){FS.createDevice(\"/dev\",\"stdin\",Module[\"stdin\"])}else{FS.symlink(\"/dev/tty\",\"/dev/stdin\")}if(Module[\"stdout\"]){FS.createDevice(\"/dev\",\"stdout\",null,Module[\"stdout\"])}else{FS.symlink(\"/dev/tty\",\"/dev/stdout\")}if(Module[\"stderr\"]){FS.createDevice(\"/dev\",\"stderr\",null,Module[\"stderr\"])}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);assert(stdin.fd===0,\"invalid handle for stdin (\"+stdin.fd+\")\");assert(stdout.fd===1,\"invalid handle for stdout (\"+stdout.fd+\")\");assert(stderr.fd===2,\"invalid handle for stderr (\"+stderr.fd+\")\")},ensureErrnoError:function(){if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.node=node;this.setErrno=function(errno){this.errno=errno;for(var key in ERRNO_CODES){if(ERRNO_CODES[key]===errno){this.code=key;break}}};this.setErrno(errno);this.message=ERRNO_MESSAGES[errno];if(this.stack){Object.defineProperty(this,\"stack\",{value:(new Error).stack,writable:true});this.stack=demangleAll(this.stack)}};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[44].forEach(function(code){FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=\"<generic error, no stack>\"})},staticInit:function(){FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},\"/\");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={\"MEMFS\":MEMFS}},init:function(input,output,error){assert(!FS.init.initialized,\"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)\");FS.init.initialized=true;FS.ensureErrnoError();Module[\"stdin\"]=input||Module[\"stdin\"];Module[\"stdout\"]=output||Module[\"stdout\"];Module[\"stderr\"]=error||Module[\"stderr\"];FS.createStandardStreams()},quit:function(){FS.init.initialized=false;var fflush=Module[\"_fflush\"];if(fflush)fflush(0);for(var i=0;i<FS.streams.length;i++){var stream=FS.streams[i];if(!stream){continue}FS.close(stream)}},getMode:function(canRead,canWrite){var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode},findObject:function(path,dontResolveLastLink){var ret=FS.analyzePath(path,dontResolveLastLink);if(ret.exists){return ret.object}else{return null}},analyzePath:function(path,dontResolveLastLink){try{var lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});path=lookup.path}catch(e){}var ret={isRoot:false,exists:false,error:0,name:null,path:null,object:null,parentExists:false,parentPath:null,parentObject:null};try{var lookup=FS.lookupPath(path,{parent:true});ret.parentExists=true;ret.parentPath=lookup.path;ret.parentObject=lookup.node;ret.name=PATH.basename(path);lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});ret.exists=true;ret.path=lookup.path;ret.object=lookup.node;ret.name=lookup.node.name;ret.isRoot=lookup.path===\"/\"}catch(e){ret.error=e.errno}return ret},createPath:function(parent,path,canRead,canWrite){parent=typeof parent===\"string\"?parent:FS.getPath(parent);var parts=path.split(\"/\").reverse();while(parts.length){var part=parts.pop();if(!part)continue;var current=PATH.join2(parent,part);try{FS.mkdir(current)}catch(e){}parent=current}return current},createFile:function(parent,name,properties,canRead,canWrite){var path=PATH.join2(typeof parent===\"string\"?parent:FS.getPath(parent),name);var mode=FS.getMode(canRead,canWrite);return FS.create(path,mode)},createDataFile:function(parent,name,data,canRead,canWrite,canOwn){var path=name?PATH.join2(typeof parent===\"string\"?parent:FS.getPath(parent),name):parent;var mode=FS.getMode(canRead,canWrite);var node=FS.create(path,mode);if(data){if(typeof data===\"string\"){var arr=new Array(data.length);for(var i=0,len=data.length;i<len;++i)arr[i]=data.charCodeAt(i);data=arr}FS.chmod(node,mode|146);var stream=FS.open(node,577);FS.write(stream,data,0,data.length,0,canOwn);FS.close(stream);FS.chmod(node,mode)}return node},createDevice:function(parent,name,input,output){var path=PATH.join2(typeof parent===\"string\"?parent:FS.getPath(parent),name);var mode=FS.getMode(!!input,!!output);if(!FS.createDevice.major)FS.createDevice.major=64;var dev=FS.makedev(FS.createDevice.major++,0);FS.registerDevice(dev,{open:function(stream){stream.seekable=false},close:function(stream){if(output&&output.buffer&&output.buffer.length){output(10)}},read:function(stream,buffer,offset,length,pos){var bytesRead=0;for(var i=0;i<length;i++){var result;try{result=input()}catch(e){throw new FS.ErrnoError(29)}if(result===undefined&&bytesRead===0){throw new FS.ErrnoError(6)}if(result===null||result===undefined)break;bytesRead++;buffer[offset+i]=result}if(bytesRead){stream.node.timestamp=Date.now()}return bytesRead},write:function(stream,buffer,offset,length,pos){for(var i=0;i<length;i++){try{output(buffer[offset+i])}catch(e){throw new FS.ErrnoError(29)}}if(length){stream.node.timestamp=Date.now()}return i}});return FS.mkdev(path,mode,dev)},forceLoadFile:function(obj){if(obj.isDevice||obj.isFolder||obj.link||obj.contents)return true;if(typeof XMLHttpRequest!==\"undefined\"){throw new Error(\"Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.\")}else if(read_){try{obj.contents=intArrayFromString(read_(obj.url),true);obj.usedBytes=obj.contents.length}catch(e){throw new FS.ErrnoError(29)}}else{throw new Error(\"Cannot load without read() or XMLHttpRequest.\")}},createLazyFile:function(parent,name,url,canRead,canWrite){function LazyUint8Array(){this.lengthKnown=false;this.chunks=[]}LazyUint8Array.prototype.get=function LazyUint8Array_get(idx){if(idx>this.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_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=function(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);if(typeof Uint8Array!=\"undefined\")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||[])}else{return intArrayFromString(xhr.responseText||\"\",true)}};var lazyArray=this;lazyArray.setDataGetter(function(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};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;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url: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(function(key){var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments)}});stream_ops.read=function stream_ops_read(stream,buffer,offset,length,position){FS.forceLoadFile(node);var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);assert(size>=0);if(contents.slice){for(var i=0;i<size;i++){buffer[offset+i]=contents[position+i]}}else{for(var i=0;i<size;i++){buffer[offset+i]=contents.get(position+i)}}return size};node.stream_ops=stream_ops;return node},createPreloadedFile:function(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn,preFinish){Browser.init();var fullname=name?PATH_FS.resolve(PATH.join2(parent,name)):parent;var dep=getUniqueRunDependency(\"cp \"+fullname);function processData(byteArray){function finish(byteArray){if(preFinish)preFinish();if(!dontCreateFile){FS.createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}if(onload)onload();removeRunDependency(dep)}var handled=false;Module[\"preloadPlugins\"].forEach(function(plugin){if(handled)return;if(plugin[\"canHandle\"](fullname)){plugin[\"handle\"](byteArray,fullname,finish,function(){if(onerror)onerror();removeRunDependency(dep)});handled=true}});if(!handled)finish(byteArray)}addRunDependency(dep);if(typeof url==\"string\"){asyncLoad(url,function(byteArray){processData(byteArray)},onerror)}else{processData(url)}},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return\"EM_FS_\"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:\"FILE_DATA\",saveFilesToDB:function(paths,onload,onerror){onload=onload||function(){};onerror=onerror||function(){};var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=function openRequest_onupgradeneeded(){out(\"creating db\");var db=openRequest.result;db.createObjectStore(FS.DB_STORE_NAME)};openRequest.onsuccess=function openRequest_onsuccess(){var db=openRequest.result;var transaction=db.transaction([FS.DB_STORE_NAME],\"readwrite\");var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach(function(path){var putRequest=files.put(FS.analyzePath(path).object.contents,path);putRequest.onsuccess=function putRequest_onsuccess(){ok++;if(ok+fail==total)finish()};putRequest.onerror=function putRequest_onerror(){fail++;if(ok+fail==total)finish()}});transaction.onerror=onerror};openRequest.onerror=onerror},loadFilesFromDB:function(paths,onload,onerror){onload=onload||function(){};onerror=onerror||function(){};var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=onerror;openRequest.onsuccess=function openRequest_onsuccess(){var db=openRequest.result;try{var transaction=db.transaction([FS.DB_STORE_NAME],\"readonly\")}catch(e){onerror(e);return}var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach(function(path){var getRequest=files.get(path);getRequest.onsuccess=function getRequest_onsuccess(){if(FS.analyzePath(path).exists){FS.unlink(path)}FS.createDataFile(PATH.dirname(path),PATH.basename(path),getRequest.result,true,true,true);ok++;if(ok+fail==total)finish()};getRequest.onerror=function getRequest_onerror(){fail++;if(ok+fail==total)finish()}});transaction.onerror=onerror};openRequest.onerror=onerror},absolutePath:function(){abort(\"FS.absolutePath has been removed; use PATH_FS.resolve instead\")},createFolder:function(){abort(\"FS.createFolder has been removed; use FS.mkdir instead\")},createLink:function(){abort(\"FS.createLink has been removed; use FS.symlink instead\")},joinPath:function(){abort(\"FS.joinPath has been removed; use PATH.join instead\")},mmapAlloc:function(){abort(\"FS.mmapAlloc has been replaced by the top level function mmapAlloc\")},standardizePath:function(){abort(\"FS.standardizePath has been removed; use PATH.normalize instead\")}};var SYSCALLS={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(dirfd,path,allowEmpty){if(path[0]===\"/\"){return path}var dir;if(dirfd===-100){dir=FS.cwd()}else{var dirstream=FS.getStream(dirfd);if(!dirstream)throw new FS.ErrnoError(8);dir=dirstream.path}if(path.length==0){if(!allowEmpty){throw new FS.ErrnoError(44)}return dir}return PATH.join2(dir,path)},doStat:function(func,path,buf){try{var stat=func(path)}catch(e){if(e&&e.node&&PATH.normalize(path)!==PATH.normalize(FS.getPath(e.node))){return-54}throw e}HEAP32[buf>>2]=stat.dev;HEAP32[buf+4>>2]=0;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAP32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;HEAP32[buf+32>>2]=0;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAP32[buf+48>>2]=4096;HEAP32[buf+52>>2]=stat.blocks;HEAP32[buf+56>>2]=stat.atime.getTime()/1e3|0;HEAP32[buf+60>>2]=0;HEAP32[buf+64>>2]=stat.mtime.getTime()/1e3|0;HEAP32[buf+68>>2]=0;HEAP32[buf+72>>2]=stat.ctime.getTime()/1e3|0;HEAP32[buf+76>>2]=0;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+80>>2]=tempI64[0],HEAP32[buf+84>>2]=tempI64[1];return 0},doMsync:function(addr,stream,len,flags,offset){var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},doMkdir:function(path,mode){path=PATH.normalize(path);if(path[path.length-1]===\"/\")path=path.substr(0,path.length-1);FS.mkdir(path,mode,0);return 0},doMknod:function(path,mode,dev){switch(mode&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}FS.mknod(path,mode,dev);return 0},doReadlink:function(path,buf,bufsize){if(bufsize<=0)return-28;var ret=FS.readlink(path);var len=Math.min(bufsize,lengthBytesUTF8(ret));var endChar=HEAP8[buf+len];stringToUTF8(ret,buf,bufsize+1);HEAP8[buf+len]=endChar;return len},doAccess:function(path,amode){if(amode&~7){return-28}var node;var lookup=FS.lookupPath(path,{follow:true});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},doDup:function(path,flags,suggestFD){var suggest=FS.getStream(suggestFD);if(suggest)FS.close(suggest);return FS.open(path,flags,0,suggestFD,suggestFD).fd},doReadv:function(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i<iovcnt;i++){var ptr=HEAP32[iov+i*8>>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr<len)break}return ret},doWritev:function(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i<iovcnt;i++){var ptr=HEAP32[iov+i*8>>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr}return ret},varargs:undefined,get:function(){assert(SYSCALLS.varargs!=undefined);SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret},getStreamFromFD:function(fd){var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);return stream},get64:function(low,high){if(low>=0)assert(high===0);else assert(high===-1);return low}};function ___sys_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-28}var newStream;newStream=FS.open(stream.path,stream.flags,0,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0}case 12:{var arg=SYSCALLS.get();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 13:case 14:return 0;case 16:case 8:return-28;case 9:setErrNo(28);return-1;default:{return-28}}}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(op){case 21509:case 21505:{if(!stream.tty)return-59;return 0}case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:{if(!stream.tty)return-59;return 0}case 21519:{if(!stream.tty)return-59;var argp=SYSCALLS.get();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-59;return-28}case 21531:{var argp=SYSCALLS.get();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-59;return 0}case 21524:{if(!stream.tty)return-59;return 0}default:abort(\"bad ioctl syscall \"+op)}}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function syscallMmap2(addr,len,prot,flags,fd,off){off<<=12;var ptr;var allocated=false;if((flags&16)!==0&&addr%65536!==0){return-28}if((flags&32)!==0){ptr=mmapAlloc(len);if(!ptr)return-48;allocated=true}else{var info=FS.getStream(fd);if(!info)return-8;var res=FS.mmap(info,addr,len,off,prot,flags);ptr=res.ptr;allocated=res.allocated}SYSCALLS.mappings[ptr]={malloc:ptr,len:len,allocated:allocated,fd:fd,prot:prot,flags:flags,offset:off};return ptr}function ___sys_mmap2(addr,len,prot,flags,fd,off){try{return syscallMmap2(addr,len,prot,flags,fd,off)}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_open(path,flags,varargs){SYSCALLS.varargs=varargs;try{var pathname=SYSCALLS.getStr(path);var mode=varargs?SYSCALLS.get():0;var stream=FS.open(pathname,flags,mode);return stream.fd}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_stat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.stat,path,buf)}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}var char_0=48;var char_9=57;function makeLegalFunctionName(name){if(undefined===name){return\"_unknown\"}name=name.replace(/[^a-zA-Z0-9_]/g,\"$\");var f=name.charCodeAt(0);if(f>=char_0&&f<=char_9){return\"_\"+name}else{return name}}function createNamedFunction(name,body){name=makeLegalFunctionName(name);return new Function(\"body\",\"return function \"+name+\"() {\\n\"+'    \"use strict\";'+\"    return body.apply(this, arguments);\\n\"+\"};\\n\")(body)}var emval_free_list=[];var emval_handle_array=[{},{value:undefined},{value:null},{value:true},{value:false}];function count_emval_handles(){var count=0;for(var i=5;i<emval_handle_array.length;++i){if(emval_handle_array[i]!==undefined){++count}}return count}function get_first_emval(){for(var i=5;i<emval_handle_array.length;++i){if(emval_handle_array[i]!==undefined){return emval_handle_array[i]}}return null}function init_emval(){Module[\"count_emval_handles\"]=count_emval_handles;Module[\"get_first_emval\"]=get_first_emval}function __emval_register(value){switch(value){case undefined:{return 1}case null:{return 2}case true:{return 3}case false:{return 4}default:{var handle=emval_free_list.length?emval_free_list.pop():emval_handle_array.length;emval_handle_array[handle]={refcount:1,value:value};return handle}}}function extendError(baseErrorType,errorName){var errorClass=createNamedFunction(errorName,function(message){this.name=errorName;this.message=message;var stack=new Error(message).stack;if(stack!==undefined){this.stack=this.toString()+\"\\n\"+stack.replace(/^Error(:[^\\n]*)?\\n/,\"\")}});errorClass.prototype=Object.create(baseErrorType.prototype);errorClass.prototype.constructor=errorClass;errorClass.prototype.toString=function(){if(this.message===undefined){return this.name}else{return this.name+\": \"+this.message}};return errorClass}var PureVirtualError=undefined;function embind_init_charCodes(){var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes}var embind_charCodes=undefined;function readLatin1String(ptr){var ret=\"\";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret}function getInheritedInstanceCount(){return Object.keys(registeredInstances).length}function getLiveInheritedInstances(){var rv=[];for(var k in registeredInstances){if(registeredInstances.hasOwnProperty(k)){rv.push(registeredInstances[k])}}return rv}var deletionQueue=[];function flushPendingDeletes(){while(deletionQueue.length){var obj=deletionQueue.pop();obj.$$.deleteScheduled=false;obj[\"delete\"]()}}var delayFunction=undefined;function setDelayFunction(fn){delayFunction=fn;if(deletionQueue.length&&delayFunction){delayFunction(flushPendingDeletes)}}function init_embind(){Module[\"getInheritedInstanceCount\"]=getInheritedInstanceCount;Module[\"getLiveInheritedInstances\"]=getLiveInheritedInstances;Module[\"flushPendingDeletes\"]=flushPendingDeletes;Module[\"setDelayFunction\"]=setDelayFunction}var registeredInstances={};var BindingError=undefined;function throwBindingError(message){throw new BindingError(message)}function getBasestPointer(class_,ptr){if(ptr===undefined){throwBindingError(\"ptr should not be undefined\")}while(class_.baseClass){ptr=class_.upcast(ptr);class_=class_.baseClass}return ptr}function registerInheritedInstance(class_,ptr,instance){ptr=getBasestPointer(class_,ptr);if(registeredInstances.hasOwnProperty(ptr)){throwBindingError(\"Tried to register registered instance: \"+ptr)}else{registeredInstances[ptr]=instance}}function requireHandle(handle){if(!handle){throwBindingError(\"Cannot use deleted val. handle = \"+handle)}return emval_handle_array[handle].value}var registeredTypes={};function getTypeName(type){var ptr=___getTypeName(type);var rv=readLatin1String(ptr);_free(ptr);return rv}function requireRegisteredType(rawType,humanName){var impl=registeredTypes[rawType];if(undefined===impl){throwBindingError(humanName+\" has unknown type \"+getTypeName(rawType))}return impl}function unregisterInheritedInstance(class_,ptr){ptr=getBasestPointer(class_,ptr);if(registeredInstances.hasOwnProperty(ptr)){delete registeredInstances[ptr]}else{throwBindingError(\"Tried to unregister unregistered instance: \"+ptr)}}function detachFinalizer(handle){}var finalizationGroup=false;function runDestructor($$){if($$.smartPtr){$$.smartPtrType.rawDestructor($$.smartPtr)}else{$$.ptrType.registeredClass.rawDestructor($$.ptr)}}function releaseClassHandle($$){$$.count.value-=1;var toDelete=0===$$.count.value;if(toDelete){runDestructor($$)}}function attachFinalizer(handle){if(\"undefined\"===typeof FinalizationGroup){attachFinalizer=function(handle){return handle};return handle}finalizationGroup=new FinalizationGroup(function(iter){for(var result=iter.next();!result.done;result=iter.next()){var $$=result.value;if(!$$.ptr){console.warn(\"object already deleted: \"+$$.ptr)}else{releaseClassHandle($$)}}});attachFinalizer=function(handle){finalizationGroup.register(handle,handle.$$,handle.$$);return handle};detachFinalizer=function(handle){finalizationGroup.unregister(handle.$$)};return attachFinalizer(handle)}function __embind_create_inheriting_constructor(constructorName,wrapperType,properties){constructorName=readLatin1String(constructorName);wrapperType=requireRegisteredType(wrapperType,\"wrapper\");properties=requireHandle(properties);var arraySlice=[].slice;var registeredClass=wrapperType.registeredClass;var wrapperPrototype=registeredClass.instancePrototype;var baseClass=registeredClass.baseClass;var baseClassPrototype=baseClass.instancePrototype;var baseConstructor=registeredClass.baseClass.constructor;var ctor=createNamedFunction(constructorName,function(){registeredClass.baseClass.pureVirtualFunctions.forEach(function(name){if(this[name]===baseClassPrototype[name]){throw new PureVirtualError(\"Pure virtual function \"+name+\" must be implemented in JavaScript\")}}.bind(this));Object.defineProperty(this,\"__parent\",{value:wrapperPrototype});this[\"__construct\"].apply(this,arraySlice.call(arguments))});wrapperPrototype[\"__construct\"]=function __construct(){if(this===wrapperPrototype){throwBindingError(\"Pass correct 'this' to __construct\")}var inner=baseConstructor[\"implement\"].apply(undefined,[this].concat(arraySlice.call(arguments)));detachFinalizer(inner);var $$=inner.$$;inner[\"notifyOnDestruction\"]();$$.preservePointerOnDelete=true;Object.defineProperties(this,{$$:{value:$$}});attachFinalizer(this);registerInheritedInstance(registeredClass,$$.ptr,this)};wrapperPrototype[\"__destruct\"]=function __destruct(){if(this===wrapperPrototype){throwBindingError(\"Pass correct 'this' to __destruct\")}detachFinalizer(this);unregisterInheritedInstance(registeredClass,this.$$.ptr)};ctor.prototype=Object.create(wrapperPrototype);for(var p in properties){ctor.prototype[p]=properties[p]}return __emval_register(ctor)}var structRegistrations={};function runDestructors(destructors){while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr)}}function simpleReadValueFromPointer(pointer){return this[\"fromWireType\"](HEAPU32[pointer>>2])}var awaitingDependencies={};var typeDependencies={};var InternalError=undefined;function throwInternalError(message){throw new InternalError(message)}function whenDependentTypesAreResolved(myTypes,dependentTypes,getTypeConverters){myTypes.forEach(function(type){typeDependencies[type]=dependentTypes});function onComplete(typeConverters){var myTypeConverters=getTypeConverters(typeConverters);if(myTypeConverters.length!==myTypes.length){throwInternalError(\"Mismatched type converter count\")}for(var i=0;i<myTypes.length;++i){registerType(myTypes[i],myTypeConverters[i])}}var typeConverters=new Array(dependentTypes.length);var unregisteredTypes=[];var registered=0;dependentTypes.forEach(function(dt,i){if(registeredTypes.hasOwnProperty(dt)){typeConverters[i]=registeredTypes[dt]}else{unregisteredTypes.push(dt);if(!awaitingDependencies.hasOwnProperty(dt)){awaitingDependencies[dt]=[]}awaitingDependencies[dt].push(function(){typeConverters[i]=registeredTypes[dt];++registered;if(registered===unregisteredTypes.length){onComplete(typeConverters)}})}});if(0===unregisteredTypes.length){onComplete(typeConverters)}}function __embind_finalize_value_object(structType){var reg=structRegistrations[structType];delete structRegistrations[structType];var rawConstructor=reg.rawConstructor;var rawDestructor=reg.rawDestructor;var fieldRecords=reg.fields;var fieldTypes=fieldRecords.map(function(field){return field.getterReturnType}).concat(fieldRecords.map(function(field){return field.setterArgumentType}));whenDependentTypesAreResolved([structType],fieldTypes,function(fieldTypes){var fields={};fieldRecords.forEach(function(field,i){var fieldName=field.fieldName;var getterReturnType=fieldTypes[i];var getter=field.getter;var getterContext=field.getterContext;var setterArgumentType=fieldTypes[i+fieldRecords.length];var setter=field.setter;var setterContext=field.setterContext;fields[fieldName]={read:function(ptr){return getterReturnType[\"fromWireType\"](getter(getterContext,ptr))},write:function(ptr,o){var destructors=[];setter(setterContext,ptr,setterArgumentType[\"toWireType\"](destructors,o));runDestructors(destructors)}}});return[{name:reg.name,\"fromWireType\":function(ptr){var rv={};for(var i in fields){rv[i]=fields[i].read(ptr)}rawDestructor(ptr);return rv},\"toWireType\":function(destructors,o){for(var fieldName in fields){if(!(fieldName in o)){throw new TypeError('Missing field:  \"'+fieldName+'\"')}}var ptr=rawConstructor();for(fieldName in fields){fields[fieldName].write(ptr,o[fieldName])}if(destructors!==null){destructors.push(rawDestructor,ptr)}return ptr},\"argPackAdvance\":8,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction:rawDestructor}]})}function __embind_register_bigint(primitiveType,name,size,minRange,maxRange){}function getShiftFromSize(size){switch(size){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(\"Unknown type size: \"+size)}}function registerType(rawType,registeredInstance,options){options=options||{};if(!(\"argPackAdvance\"in registeredInstance)){throw new TypeError(\"registerType registeredInstance requires argPackAdvance\")}var name=registeredInstance.name;if(!rawType){throwBindingError('type \"'+name+'\" must have a positive integer typeid pointer')}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError(\"Cannot register type '\"+name+\"' twice\")}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(function(cb){cb()})}}function __embind_register_bool(rawType,name,size,trueValue,falseValue){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":function(wt){return!!wt},\"toWireType\":function(destructors,o){return o?trueValue:falseValue},\"argPackAdvance\":8,\"readValueFromPointer\":function(pointer){var heap;if(size===1){heap=HEAP8}else if(size===2){heap=HEAP16}else if(size===4){heap=HEAP32}else{throw new TypeError(\"Unknown boolean type size: \"+name)}return this[\"fromWireType\"](heap[pointer>>shift])},destructorFunction:null})}function ClassHandle_isAliasOf(other){if(!(this instanceof ClassHandle)){return false}if(!(other instanceof ClassHandle)){return false}var leftClass=this.$$.ptrType.registeredClass;var left=this.$$.ptr;var rightClass=other.$$.ptrType.registeredClass;var right=other.$$.ptr;while(leftClass.baseClass){left=leftClass.upcast(left);leftClass=leftClass.baseClass}while(rightClass.baseClass){right=rightClass.upcast(right);rightClass=rightClass.baseClass}return leftClass===rightClass&&left===right}function shallowCopyInternalPointer(o){return{count:o.count,deleteScheduled:o.deleteScheduled,preservePointerOnDelete:o.preservePointerOnDelete,ptr:o.ptr,ptrType:o.ptrType,smartPtr:o.smartPtr,smartPtrType:o.smartPtrType}}function throwInstanceAlreadyDeleted(obj){function getInstanceTypeName(handle){return handle.$$.ptrType.registeredClass.name}throwBindingError(getInstanceTypeName(obj)+\" instance already deleted\")}function ClassHandle_clone(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.preservePointerOnDelete){this.$$.count.value+=1;return this}else{var clone=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));clone.$$.count.value+=1;clone.$$.deleteScheduled=false;return clone}}function ClassHandle_delete(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError(\"Object already scheduled for deletion\")}detachFinalizer(this);releaseClassHandle(this.$$);if(!this.$$.preservePointerOnDelete){this.$$.smartPtr=undefined;this.$$.ptr=undefined}}function ClassHandle_isDeleted(){return!this.$$.ptr}function ClassHandle_deleteLater(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError(\"Object already scheduled for deletion\")}deletionQueue.push(this);if(deletionQueue.length===1&&delayFunction){delayFunction(flushPendingDeletes)}this.$$.deleteScheduled=true;return this}function init_ClassHandle(){ClassHandle.prototype[\"isAliasOf\"]=ClassHandle_isAliasOf;ClassHandle.prototype[\"clone\"]=ClassHandle_clone;ClassHandle.prototype[\"delete\"]=ClassHandle_delete;ClassHandle.prototype[\"isDeleted\"]=ClassHandle_isDeleted;ClassHandle.prototype[\"deleteLater\"]=ClassHandle_deleteLater}function ClassHandle(){}var registeredPointers={};function ensureOverloadTable(proto,methodName,humanName){if(undefined===proto[methodName].overloadTable){var prevFunc=proto[methodName];proto[methodName]=function(){if(!proto[methodName].overloadTable.hasOwnProperty(arguments.length)){throwBindingError(\"Function '\"+humanName+\"' called with an invalid number of arguments (\"+arguments.length+\") - expects one of (\"+proto[methodName].overloadTable+\")!\")}return proto[methodName].overloadTable[arguments.length].apply(this,arguments)};proto[methodName].overloadTable=[];proto[methodName].overloadTable[prevFunc.argCount]=prevFunc}}function exposePublicSymbol(name,value,numArguments){if(Module.hasOwnProperty(name)){if(undefined===numArguments||undefined!==Module[name].overloadTable&&undefined!==Module[name].overloadTable[numArguments]){throwBindingError(\"Cannot register public name '\"+name+\"' twice\")}ensureOverloadTable(Module,name,name);if(Module.hasOwnProperty(numArguments)){throwBindingError(\"Cannot register multiple overloads of a function with the same number of arguments (\"+numArguments+\")!\")}Module[name].overloadTable[numArguments]=value}else{Module[name]=value;if(undefined!==numArguments){Module[name].numArguments=numArguments}}}function RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast){this.name=name;this.constructor=constructor;this.instancePrototype=instancePrototype;this.rawDestructor=rawDestructor;this.baseClass=baseClass;this.getActualType=getActualType;this.upcast=upcast;this.downcast=downcast;this.pureVirtualFunctions=[]}function upcastPointer(ptr,ptrClass,desiredClass){while(ptrClass!==desiredClass){if(!ptrClass.upcast){throwBindingError(\"Expected null or instance of \"+desiredClass.name+\", got an instance of \"+ptrClass.name)}ptr=ptrClass.upcast(ptr);ptrClass=ptrClass.baseClass}return ptr}function constNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError(\"null is not a valid \"+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass \"'+_embind_repr(handle)+'\" as a '+this.name)}if(!handle.$$.ptr){throwBindingError(\"Cannot pass deleted object as a pointer of type \"+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function genericPointerToWireType(destructors,handle){var ptr;if(handle===null){if(this.isReference){throwBindingError(\"null is not a valid \"+this.name)}if(this.isSmartPointer){ptr=this.rawConstructor();if(destructors!==null){destructors.push(this.rawDestructor,ptr)}return ptr}else{return 0}}if(!handle.$$){throwBindingError('Cannot pass \"'+_embind_repr(handle)+'\" as a '+this.name)}if(!handle.$$.ptr){throwBindingError(\"Cannot pass deleted object as a pointer of type \"+this.name)}if(!this.isConst&&handle.$$.ptrType.isConst){throwBindingError(\"Cannot convert argument of type \"+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+\" to parameter type \"+this.name)}var handleClass=handle.$$.ptrType.registeredClass;ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);if(this.isSmartPointer){if(undefined===handle.$$.smartPtr){throwBindingError(\"Passing raw pointer to smart pointer is illegal\")}switch(this.sharingPolicy){case 0:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{throwBindingError(\"Cannot convert argument of type \"+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+\" to parameter type \"+this.name)}break;case 1:ptr=handle.$$.smartPtr;break;case 2:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{var clonedHandle=handle[\"clone\"]();ptr=this.rawShare(ptr,__emval_register(function(){clonedHandle[\"delete\"]()}));if(destructors!==null){destructors.push(this.rawDestructor,ptr)}}break;default:throwBindingError(\"Unsupporting sharing policy\")}}return ptr}function nonConstNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError(\"null is not a valid \"+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass \"'+_embind_repr(handle)+'\" as a '+this.name)}if(!handle.$$.ptr){throwBindingError(\"Cannot pass deleted object as a pointer of type \"+this.name)}if(handle.$$.ptrType.isConst){throwBindingError(\"Cannot convert argument of type \"+handle.$$.ptrType.name+\" to parameter type \"+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function RegisteredPointer_getPointee(ptr){if(this.rawGetPointee){ptr=this.rawGetPointee(ptr)}return ptr}function RegisteredPointer_destructor(ptr){if(this.rawDestructor){this.rawDestructor(ptr)}}function RegisteredPointer_deleteObject(handle){if(handle!==null){handle[\"delete\"]()}}function downcastPointer(ptr,ptrClass,desiredClass){if(ptrClass===desiredClass){return ptr}if(undefined===desiredClass.baseClass){return null}var rv=downcastPointer(ptr,ptrClass,desiredClass.baseClass);if(rv===null){return null}return desiredClass.downcast(rv)}function getInheritedInstance(class_,ptr){ptr=getBasestPointer(class_,ptr);return registeredInstances[ptr]}function makeClassHandle(prototype,record){if(!record.ptrType||!record.ptr){throwInternalError(\"makeClassHandle requires ptr and ptrType\")}var hasSmartPtrType=!!record.smartPtrType;var hasSmartPtr=!!record.smartPtr;if(hasSmartPtrType!==hasSmartPtr){throwInternalError(\"Both smartPtrType and smartPtr must be specified\")}record.count={value:1};return attachFinalizer(Object.create(prototype,{$$:{value:record}}))}function RegisteredPointer_fromWireType(ptr){var rawPointer=this.getPointee(ptr);if(!rawPointer){this.destructor(ptr);return null}var registeredInstance=getInheritedInstance(this.registeredClass,rawPointer);if(undefined!==registeredInstance){if(0===registeredInstance.$$.count.value){registeredInstance.$$.ptr=rawPointer;registeredInstance.$$.smartPtr=ptr;return registeredInstance[\"clone\"]()}else{var rv=registeredInstance[\"clone\"]();this.destructor(ptr);return rv}}function makeDefaultHandle(){if(this.isSmartPointer){return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rawPointer,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:ptr})}}var actualType=this.registeredClass.getActualType(rawPointer);var registeredPointerRecord=registeredPointers[actualType];if(!registeredPointerRecord){return makeDefaultHandle.call(this)}var toType;if(this.isConst){toType=registeredPointerRecord.constPointerType}else{toType=registeredPointerRecord.pointerType}var dp=downcastPointer(rawPointer,this.registeredClass,toType.registeredClass);if(dp===null){return makeDefaultHandle.call(this)}if(this.isSmartPointer){return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp})}}function init_RegisteredPointer(){RegisteredPointer.prototype.getPointee=RegisteredPointer_getPointee;RegisteredPointer.prototype.destructor=RegisteredPointer_destructor;RegisteredPointer.prototype[\"argPackAdvance\"]=8;RegisteredPointer.prototype[\"readValueFromPointer\"]=simpleReadValueFromPointer;RegisteredPointer.prototype[\"deleteObject\"]=RegisteredPointer_deleteObject;RegisteredPointer.prototype[\"fromWireType\"]=RegisteredPointer_fromWireType}function RegisteredPointer(name,registeredClass,isReference,isConst,isSmartPointer,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor){this.name=name;this.registeredClass=registeredClass;this.isReference=isReference;this.isConst=isConst;this.isSmartPointer=isSmartPointer;this.pointeeType=pointeeType;this.sharingPolicy=sharingPolicy;this.rawGetPointee=rawGetPointee;this.rawConstructor=rawConstructor;this.rawShare=rawShare;this.rawDestructor=rawDestructor;if(!isSmartPointer&&registeredClass.baseClass===undefined){if(isConst){this[\"toWireType\"]=constNoSmartPtrRawPointerToWireType;this.destructorFunction=null}else{this[\"toWireType\"]=nonConstNoSmartPtrRawPointerToWireType;this.destructorFunction=null}}else{this[\"toWireType\"]=genericPointerToWireType}}function replacePublicSymbol(name,value,numArguments){if(!Module.hasOwnProperty(name)){throwInternalError(\"Replacing nonexistant public symbol\")}if(undefined!==Module[name].overloadTable&&undefined!==numArguments){Module[name].overloadTable[numArguments]=value}else{Module[name]=value;Module[name].argCount=numArguments}}function dynCallLegacy(sig,ptr,args){assert(\"dynCall_\"+sig in Module,\"bad function pointer type - no table for sig '\"+sig+\"'\");if(args&&args.length){assert(args.length===sig.substring(1).replace(/j/g,\"--\").length)}else{assert(sig.length==1)}var f=Module[\"dynCall_\"+sig];return args&&args.length?f.apply(null,[ptr].concat(args)):f.call(null,ptr)}function dynCall(sig,ptr,args){if(sig.includes(\"j\")){return dynCallLegacy(sig,ptr,args)}assert(wasmTable.get(ptr),\"missing table entry in dynCall: \"+ptr);return wasmTable.get(ptr).apply(null,args)}function getDynCaller(sig,ptr){assert(sig.includes(\"j\"),\"getDynCaller should only be called with i64 sigs\");var argCache=[];return function(){argCache.length=arguments.length;for(var i=0;i<arguments.length;i++){argCache[i]=arguments[i]}return dynCall(sig,ptr,argCache)}}function embind__requireFunction(signature,rawFunction){signature=readLatin1String(signature);function makeDynCaller(){if(signature.includes(\"j\")){return getDynCaller(signature,rawFunction)}return wasmTable.get(rawFunction)}var fp=makeDynCaller();if(typeof fp!==\"function\"){throwBindingError(\"unknown function pointer with signature \"+signature+\": \"+rawFunction)}return fp}var UnboundTypeError=undefined;function throwUnboundTypeError(message,types){var unboundTypes=[];var seen={};function visit(type){if(seen[type]){return}if(registeredTypes[type]){return}if(typeDependencies[type]){typeDependencies[type].forEach(visit);return}unboundTypes.push(type);seen[type]=true}types.forEach(visit);throw new UnboundTypeError(message+\": \"+unboundTypes.map(getTypeName).join([\", \"]))}function __embind_register_class(rawType,rawPointerType,rawConstPointerType,baseClassRawType,getActualTypeSignature,getActualType,upcastSignature,upcast,downcastSignature,downcast,name,destructorSignature,rawDestructor){name=readLatin1String(name);getActualType=embind__requireFunction(getActualTypeSignature,getActualType);if(upcast){upcast=embind__requireFunction(upcastSignature,upcast)}if(downcast){downcast=embind__requireFunction(downcastSignature,downcast)}rawDestructor=embind__requireFunction(destructorSignature,rawDestructor);var legalFunctionName=makeLegalFunctionName(name);exposePublicSymbol(legalFunctionName,function(){throwUnboundTypeError(\"Cannot construct \"+name+\" due to unbound types\",[baseClassRawType])});whenDependentTypesAreResolved([rawType,rawPointerType,rawConstPointerType],baseClassRawType?[baseClassRawType]:[],function(base){base=base[0];var baseClass;var basePrototype;if(baseClassRawType){baseClass=base.registeredClass;basePrototype=baseClass.instancePrototype}else{basePrototype=ClassHandle.prototype}var constructor=createNamedFunction(legalFunctionName,function(){if(Object.getPrototypeOf(this)!==instancePrototype){throw new BindingError(\"Use 'new' to construct \"+name)}if(undefined===registeredClass.constructor_body){throw new BindingError(name+\" has no accessible constructor\")}var body=registeredClass.constructor_body[arguments.length];if(undefined===body){throw new BindingError(\"Tried to invoke ctor of \"+name+\" with invalid number of parameters (\"+arguments.length+\") - expected (\"+Object.keys(registeredClass.constructor_body).toString()+\") parameters instead!\")}return body.apply(this,arguments)});var instancePrototype=Object.create(basePrototype,{constructor:{value:constructor}});constructor.prototype=instancePrototype;var registeredClass=new RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast);var referenceConverter=new RegisteredPointer(name,registeredClass,true,false,false);var pointerConverter=new RegisteredPointer(name+\"*\",registeredClass,false,false,false);var constPointerConverter=new RegisteredPointer(name+\" const*\",registeredClass,false,true,false);registeredPointers[rawType]={pointerType:pointerConverter,constPointerType:constPointerConverter};replacePublicSymbol(legalFunctionName,constructor);return[referenceConverter,pointerConverter,constPointerConverter]})}function new_(constructor,argumentList){if(!(constructor instanceof Function)){throw new TypeError(\"new_ called with constructor type \"+typeof constructor+\" which is not a function\")}var dummy=createNamedFunction(constructor.name||\"unknownFunctionName\",function(){});dummy.prototype=constructor.prototype;var obj=new dummy;var r=constructor.apply(obj,argumentList);return r instanceof Object?r:obj}function craftInvokerFunction(humanName,argTypes,classType,cppInvokerFunc,cppTargetFunc){var argCount=argTypes.length;if(argCount<2){throwBindingError(\"argTypes array size mismatch! Must at least get return value and 'this' types!\")}var isClassMethodFunc=argTypes[1]!==null&&classType!==null;var needsDestructorStack=false;for(var i=1;i<argTypes.length;++i){if(argTypes[i]!==null&&argTypes[i].destructorFunction===undefined){needsDestructorStack=true;break}}var returns=argTypes[0].name!==\"void\";var argsList=\"\";var argsListWired=\"\";for(var i=0;i<argCount-2;++i){argsList+=(i!==0?\", \":\"\")+\"arg\"+i;argsListWired+=(i!==0?\", \":\"\")+\"arg\"+i+\"Wired\"}var invokerFnBody=\"return function \"+makeLegalFunctionName(humanName)+\"(\"+argsList+\") {\\n\"+\"if (arguments.length !== \"+(argCount-2)+\") {\\n\"+\"throwBindingError('function \"+humanName+\" called with ' + arguments.length + ' arguments, expected \"+(argCount-2)+\" args!');\\n\"+\"}\\n\";if(needsDestructorStack){invokerFnBody+=\"var destructors = [];\\n\"}var dtorStack=needsDestructorStack?\"destructors\":\"null\";var args1=[\"throwBindingError\",\"invoker\",\"fn\",\"runDestructors\",\"retType\",\"classParam\"];var args2=[throwBindingError,cppInvokerFunc,cppTargetFunc,runDestructors,argTypes[0],argTypes[1]];if(isClassMethodFunc){invokerFnBody+=\"var thisWired = classParam.toWireType(\"+dtorStack+\", this);\\n\"}for(var i=0;i<argCount-2;++i){invokerFnBody+=\"var arg\"+i+\"Wired = argType\"+i+\".toWireType(\"+dtorStack+\", arg\"+i+\"); // \"+argTypes[i+2].name+\"\\n\";args1.push(\"argType\"+i);args2.push(argTypes[i+2])}if(isClassMethodFunc){argsListWired=\"thisWired\"+(argsListWired.length>0?\", \":\"\")+argsListWired}invokerFnBody+=(returns?\"var rv = \":\"\")+\"invoker(fn\"+(argsListWired.length>0?\", \":\"\")+argsListWired+\");\\n\";if(needsDestructorStack){invokerFnBody+=\"runDestructors(destructors);\\n\"}else{for(var i=isClassMethodFunc?1:2;i<argTypes.length;++i){var paramName=i===1?\"thisWired\":\"arg\"+(i-2)+\"Wired\";if(argTypes[i].destructorFunction!==null){invokerFnBody+=paramName+\"_dtor(\"+paramName+\"); // \"+argTypes[i].name+\"\\n\";args1.push(paramName+\"_dtor\");args2.push(argTypes[i].destructorFunction)}}}if(returns){invokerFnBody+=\"var ret = retType.fromWireType(rv);\\n\"+\"return ret;\\n\"}else{}invokerFnBody+=\"}\\n\";args1.push(invokerFnBody);var invokerFunction=new_(Function,args1).apply(null,args2);return invokerFunction}function heap32VectorToArray(count,firstElement){var array=[];for(var i=0;i<count;i++){array.push(HEAP32[(firstElement>>2)+i])}return array}function __embind_register_class_class_function(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,fn){var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=classType.name+\".\"+methodName;function unboundTypesHandler(){throwUnboundTypeError(\"Cannot call \"+humanName+\" due to unbound types\",rawArgTypes)}if(methodName.startsWith(\"@@\")){methodName=Symbol[methodName.substring(2)]}var proto=classType.registeredClass.constructor;if(undefined===proto[methodName]){unboundTypesHandler.argCount=argCount-1;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-1]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var invokerArgsArray=[argTypes[0],null].concat(argTypes.slice(1));var func=craftInvokerFunction(humanName,invokerArgsArray,null,rawInvoker,fn);if(undefined===proto[methodName].overloadTable){func.argCount=argCount-1;proto[methodName]=func}else{proto[methodName].overloadTable[argCount-1]=func}return[]});return[]})}function __embind_register_class_constructor(rawClassType,argCount,rawArgTypesAddr,invokerSignature,invoker,rawConstructor){assert(argCount>0);var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);invoker=embind__requireFunction(invokerSignature,invoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=\"constructor \"+classType.name;if(undefined===classType.registeredClass.constructor_body){classType.registeredClass.constructor_body=[]}if(undefined!==classType.registeredClass.constructor_body[argCount-1]){throw new BindingError(\"Cannot register multiple constructors with identical number of parameters (\"+(argCount-1)+\") for class '\"+classType.name+\"'! Overload resolution is currently only performed using the parameter count, not actual type info!\")}classType.registeredClass.constructor_body[argCount-1]=function unboundTypeHandler(){throwUnboundTypeError(\"Cannot construct \"+classType.name+\" due to unbound types\",rawArgTypes)};whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){argTypes.splice(1,0,null);classType.registeredClass.constructor_body[argCount-1]=craftInvokerFunction(humanName,argTypes,null,invoker,rawConstructor);return[]});return[]})}function __embind_register_class_function(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,context,isPureVirtual){var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=classType.name+\".\"+methodName;if(methodName.startsWith(\"@@\")){methodName=Symbol[methodName.substring(2)]}if(isPureVirtual){classType.registeredClass.pureVirtualFunctions.push(methodName)}function unboundTypesHandler(){throwUnboundTypeError(\"Cannot call \"+humanName+\" due to unbound types\",rawArgTypes)}var proto=classType.registeredClass.instancePrototype;var method=proto[methodName];if(undefined===method||undefined===method.overloadTable&&method.className!==classType.name&&method.argCount===argCount-2){unboundTypesHandler.argCount=argCount-2;unboundTypesHandler.className=classType.name;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-2]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var memberFunction=craftInvokerFunction(humanName,argTypes,classType,rawInvoker,context);if(undefined===proto[methodName].overloadTable){memberFunction.argCount=argCount-2;proto[methodName]=memberFunction}else{proto[methodName].overloadTable[argCount-2]=memberFunction}return[]});return[]})}function validateThis(this_,classType,humanName){if(!(this_ instanceof Object)){throwBindingError(humanName+' with invalid \"this\": '+this_)}if(!(this_ instanceof classType.registeredClass.constructor)){throwBindingError(humanName+' incompatible with \"this\" of type '+this_.constructor.name)}if(!this_.$$.ptr){throwBindingError(\"cannot call emscripten binding method \"+humanName+\" on deleted object\")}return upcastPointer(this_.$$.ptr,this_.$$.ptrType.registeredClass,classType.registeredClass)}function __embind_register_class_property(classType,fieldName,getterReturnType,getterSignature,getter,getterContext,setterArgumentType,setterSignature,setter,setterContext){fieldName=readLatin1String(fieldName);getter=embind__requireFunction(getterSignature,getter);whenDependentTypesAreResolved([],[classType],function(classType){classType=classType[0];var humanName=classType.name+\".\"+fieldName;var desc={get:function(){throwUnboundTypeError(\"Cannot access \"+humanName+\" due to unbound types\",[getterReturnType,setterArgumentType])},enumerable:true,configurable:true};if(setter){desc.set=function(){throwUnboundTypeError(\"Cannot access \"+humanName+\" due to unbound types\",[getterReturnType,setterArgumentType])}}else{desc.set=function(v){throwBindingError(humanName+\" is a read-only property\")}}Object.defineProperty(classType.registeredClass.instancePrototype,fieldName,desc);whenDependentTypesAreResolved([],setter?[getterReturnType,setterArgumentType]:[getterReturnType],function(types){var getterReturnType=types[0];var desc={get:function(){var ptr=validateThis(this,classType,humanName+\" getter\");return getterReturnType[\"fromWireType\"](getter(getterContext,ptr))},enumerable:true};if(setter){setter=embind__requireFunction(setterSignature,setter);var setterArgumentType=types[1];desc.set=function(v){var ptr=validateThis(this,classType,humanName+\" setter\");var destructors=[];setter(setterContext,ptr,setterArgumentType[\"toWireType\"](destructors,v));runDestructors(destructors)}}Object.defineProperty(classType.registeredClass.instancePrototype,fieldName,desc);return[]});return[]})}function __emval_decref(handle){if(handle>4&&0===--emval_handle_array[handle].refcount){emval_handle_array[handle]=undefined;emval_free_list.push(handle)}}function __embind_register_emval(rawType,name){name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":function(handle){var rv=emval_handle_array[handle].value;__emval_decref(handle);return rv},\"toWireType\":function(destructors,value){return __emval_register(value)},\"argPackAdvance\":8,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction:null})}function _embind_repr(v){if(v===null){return\"null\"}var t=typeof v;if(t===\"object\"||t===\"array\"||t===\"function\"){return v.toString()}else{return\"\"+v}}function floatReadValueFromPointer(name,shift){switch(shift){case 2:return function(pointer){return this[\"fromWireType\"](HEAPF32[pointer>>2])};case 3:return function(pointer){return this[\"fromWireType\"](HEAPF64[pointer>>3])};default:throw new TypeError(\"Unknown float type: \"+name)}}function __embind_register_float(rawType,name,size){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":function(value){return value},\"toWireType\":function(destructors,value){if(typeof value!==\"number\"&&typeof value!==\"boolean\"){throw new TypeError('Cannot convert \"'+_embind_repr(value)+'\" to '+this.name)}return value},\"argPackAdvance\":8,\"readValueFromPointer\":floatReadValueFromPointer(name,shift),destructorFunction:null})}function __embind_register_function(name,argCount,rawArgTypesAddr,signature,rawInvoker,fn){var argTypes=heap32VectorToArray(argCount,rawArgTypesAddr);name=readLatin1String(name);rawInvoker=embind__requireFunction(signature,rawInvoker);exposePublicSymbol(name,function(){throwUnboundTypeError(\"Cannot call \"+name+\" due to unbound types\",argTypes)},argCount-1);whenDependentTypesAreResolved([],argTypes,function(argTypes){var invokerArgsArray=[argTypes[0],null].concat(argTypes.slice(1));replacePublicSymbol(name,craftInvokerFunction(name,invokerArgsArray,null,rawInvoker,fn),argCount-1);return[]})}function integerReadValueFromPointer(name,shift,signed){switch(shift){case 0:return signed?function readS8FromPointer(pointer){return HEAP8[pointer]}:function readU8FromPointer(pointer){return HEAPU8[pointer]};case 1:return signed?function readS16FromPointer(pointer){return HEAP16[pointer>>1]}:function readU16FromPointer(pointer){return HEAPU16[pointer>>1]};case 2:return signed?function readS32FromPointer(pointer){return HEAP32[pointer>>2]}:function readU32FromPointer(pointer){return HEAPU32[pointer>>2]};default:throw new TypeError(\"Unknown integer type: \"+name)}}function __embind_register_integer(primitiveType,name,size,minRange,maxRange){name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var shift=getShiftFromSize(size);var fromWireType=function(value){return value};if(minRange===0){var bitshift=32-8*size;fromWireType=function(value){return value<<bitshift>>>bitshift}}var isUnsignedType=name.includes(\"unsigned\");registerType(primitiveType,{name:name,\"fromWireType\":fromWireType,\"toWireType\":function(destructors,value){if(typeof value!==\"number\"&&typeof value!==\"boolean\"){throw new TypeError('Cannot convert \"'+_embind_repr(value)+'\" to '+this.name)}if(value<minRange||value>maxRange){throw new TypeError('Passing a number \"'+_embind_repr(value)+'\" from JS side to C/C++ side to an argument of type \"'+name+'\", which is outside the valid range ['+minRange+\", \"+maxRange+\"]!\")}return isUnsignedType?value>>>0:value|0},\"argPackAdvance\":8,\"readValueFromPointer\":integerReadValueFromPointer(name,shift,minRange!==0),destructorFunction:null})}function __embind_register_memory_view(rawType,dataTypeIndex,name){var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){handle=handle>>2;var heap=HEAPU32;var size=heap[handle];var data=heap[handle+1];return new TA(buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":decodeMemoryView,\"argPackAdvance\":8,\"readValueFromPointer\":decodeMemoryView},{ignoreDuplicateRegistrations:true})}function __embind_register_std_string(rawType,name){name=readLatin1String(name);var stdStringIsUTF8=name===\"std::string\";registerType(rawType,{name:name,\"fromWireType\":function(value){var length=HEAPU32[value>>2];var str;if(stdStringIsUTF8){var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i<length;++i){a[i]=String.fromCharCode(HEAPU8[value+4+i])}str=a.join(\"\")}_free(value);return str},\"toWireType\":function(destructors,value){if(value instanceof ArrayBuffer){value=new Uint8Array(value)}var getLength;var valueIsOfTypeString=typeof value===\"string\";if(!(valueIsOfTypeString||value instanceof Uint8Array||value instanceof Uint8ClampedArray||value instanceof Int8Array)){throwBindingError(\"Cannot pass non-string to std::string\")}if(stdStringIsUTF8&&valueIsOfTypeString){getLength=function(){return lengthBytesUTF8(value)}}else{getLength=function(){return value.length}}var length=getLength();var ptr=_malloc(4+length+1);HEAPU32[ptr>>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr+4,length+1)}else{if(valueIsOfTypeString){for(var i=0;i<length;++i){var charCode=value.charCodeAt(i);if(charCode>255){_free(ptr);throwBindingError(\"String has UTF-16 code units that do not fit in 8 bits\")}HEAPU8[ptr+4+i]=charCode}}else{for(var i=0;i<length;++i){HEAPU8[ptr+4+i]=value[i]}}}if(destructors!==null){destructors.push(_free,ptr)}return ptr},\"argPackAdvance\":8,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction:function(ptr){_free(ptr)}})}function __embind_register_std_wstring(rawType,charSize,name){name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=function(){return HEAPU16};shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=function(){return HEAPU32};shift=2}registerType(rawType,{name:name,\"fromWireType\":function(value){var length=HEAPU32[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},\"toWireType\":function(destructors,value){if(!(typeof value===\"string\")){throwBindingError(\"Cannot pass non-string to C++ string type \"+name)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},\"argPackAdvance\":8,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction:function(ptr){_free(ptr)}})}function __embind_register_value_object(rawType,name,constructorSignature,rawConstructor,destructorSignature,rawDestructor){structRegistrations[rawType]={name:readLatin1String(name),rawConstructor:embind__requireFunction(constructorSignature,rawConstructor),rawDestructor:embind__requireFunction(destructorSignature,rawDestructor),fields:[]}}function __embind_register_value_object_field(structType,fieldName,getterReturnType,getterSignature,getter,getterContext,setterArgumentType,setterSignature,setter,setterContext){structRegistrations[structType].fields.push({fieldName:readLatin1String(fieldName),getterReturnType:getterReturnType,getter:embind__requireFunction(getterSignature,getter),getterContext:getterContext,setterArgumentType:setterArgumentType,setter:embind__requireFunction(setterSignature,setter),setterContext:setterContext})}function __embind_register_void(rawType,name){name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,\"argPackAdvance\":0,\"fromWireType\":function(){return undefined},\"toWireType\":function(destructors,o){return undefined}})}var emval_symbols={};function getStringOrSymbol(address){var symbol=emval_symbols[address];if(symbol===undefined){return readLatin1String(address)}else{return symbol}}var emval_methodCallers=[];function __emval_call_void_method(caller,handle,methodName,args){caller=emval_methodCallers[caller];handle=requireHandle(handle);methodName=getStringOrSymbol(methodName);caller(handle,methodName,null,args)}function __emval_addMethodCaller(caller){var id=emval_methodCallers.length;emval_methodCallers.push(caller);return id}function __emval_lookupTypes(argCount,argTypes){var a=new Array(argCount);for(var i=0;i<argCount;++i){a[i]=requireRegisteredType(HEAP32[(argTypes>>2)+i],\"parameter \"+i)}return a}function __emval_get_method_caller(argCount,argTypes){var types=__emval_lookupTypes(argCount,argTypes);var retType=types[0];var signatureName=retType.name+\"_$\"+types.slice(1).map(function(t){return t.name}).join(\"_\")+\"$\";var params=[\"retType\"];var args=[retType];var argsList=\"\";for(var i=0;i<argCount-1;++i){argsList+=(i!==0?\", \":\"\")+\"arg\"+i;params.push(\"argType\"+i);args.push(types[1+i])}var functionName=makeLegalFunctionName(\"methodCaller_\"+signatureName);var functionBody=\"return function \"+functionName+\"(handle, name, destructors, args) {\\n\";var offset=0;for(var i=0;i<argCount-1;++i){functionBody+=\"    var arg\"+i+\" = argType\"+i+\".readValueFromPointer(args\"+(offset?\"+\"+offset:\"\")+\");\\n\";offset+=types[i+1][\"argPackAdvance\"]}functionBody+=\"    var rv = handle[name](\"+argsList+\");\\n\";for(var i=0;i<argCount-1;++i){if(types[i+1][\"deleteObject\"]){functionBody+=\"    argType\"+i+\".deleteObject(arg\"+i+\");\\n\"}}if(!retType.isVoid){functionBody+=\"    return retType.toWireType(destructors, rv);\\n\"}functionBody+=\"};\\n\";params.push(functionBody);var invokerFunction=new_(Function,params).apply(null,args);return __emval_addMethodCaller(invokerFunction)}function __emval_incref(handle){if(handle>4){emval_handle_array[handle].refcount+=1}}function __emval_take_value(type,argv){type=requireRegisteredType(type,\"_emval_take_value\");var v=type[\"readValueFromPointer\"](argv);return __emval_register(v)}function _abort(){abort()}var _emscripten_get_now_is_monotonic=true;function _clock_gettime(clk_id,tp){var now;if(clk_id===0){now=Date.now()}else if((clk_id===1||clk_id===4)&&_emscripten_get_now_is_monotonic){now=_emscripten_get_now()}else{setErrNo(28);return-1}HEAP32[tp>>2]=now/1e3|0;HEAP32[tp+4>>2]=now%1e3*1e3*1e3|0;return 0}function _dlopen(filename,flag){abort(\"To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking\")}function _dlsym(handle,symbol){abort(\"To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking\")}var readAsmConstArgsArray=[];function readAsmConstArgs(sigPtr,buf){assert(Array.isArray(readAsmConstArgsArray));assert(buf%16==0);readAsmConstArgsArray.length=0;var ch;buf>>=2;while(ch=HEAPU8[sigPtr++]){assert(ch===100||ch===102||ch===105);var double=ch<105;if(double&&buf&1)buf++;readAsmConstArgsArray.push(double?HEAPF64[buf++>>1]:HEAP32[buf]);++buf}return readAsmConstArgsArray}function _emscripten_asm_const_int(code,sigPtr,argbuf){var args=readAsmConstArgs(sigPtr,argbuf);if(!ASM_CONSTS.hasOwnProperty(code))abort(\"No EM_ASM constant found at address \"+code);return ASM_CONSTS[code].apply(null,args)}function _emscripten_get_heap_max(){return 2147483648}function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function _emscripten_pc_get_function(pc){abort(\"Cannot use emscripten_pc_get_function without -s USE_OFFSET_CONVERTER\")}function emscripten_realloc_buffer(size){try{wasmMemory.grow(size-buffer.byteLength+65535>>>16);updateGlobalBufferAndViews(wasmMemory.buffer);return 1}catch(e){err(\"emscripten_realloc_buffer: Attempted to grow heap from \"+buffer.byteLength+\" bytes to \"+size+\" bytes, but got error: \"+e)}}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;assert(requestedSize>oldSize);var maxHeapSize=2147483648;if(requestedSize>maxHeapSize){err(\"Cannot enlarge memory, asked to go up to \"+requestedSize+\" bytes, but the limit is \"+maxHeapSize+\" bytes!\");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,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}err(\"Failed to grow the heap from \"+oldSize+\" bytes to \"+newSize+\" bytes, not enough memory!\");return false}function _emscripten_generate_pc(frame){abort(\"Cannot use emscripten_generate_pc (needed by __builtin_return_address) without -s USE_OFFSET_CONVERTER\")}var UNWIND_CACHE={};function __emscripten_save_in_unwind_cache(callstack){callstack.forEach(function(frame){var pc=_emscripten_generate_pc(frame);if(pc){UNWIND_CACHE[pc]=frame}})}function _emscripten_stack_snapshot(){var callstack=(new Error).stack.split(\"\\n\");if(callstack[0]==\"Error\"){callstack.shift()}__emscripten_save_in_unwind_cache(callstack);UNWIND_CACHE.last_addr=_emscripten_generate_pc(callstack[2]);UNWIND_CACHE.last_stack=callstack;return UNWIND_CACHE.last_addr}function _emscripten_stack_unwind_buffer(addr,buffer,count){var stack;if(UNWIND_CACHE.last_addr==addr){stack=UNWIND_CACHE.last_stack}else{stack=(new Error).stack.split(\"\\n\");if(stack[0]==\"Error\"){stack.shift()}__emscripten_save_in_unwind_cache(stack)}var offset=2;while(stack[offset]&&_emscripten_generate_pc(stack[offset])!=addr){++offset}for(var i=0;i<count&&stack[i+offset];++i){HEAP32[buffer+i*4>>2]=_emscripten_generate_pc(stack[i+offset])}return i}function _emscripten_thread_sleep(msecs){var start=_emscripten_get_now();while(_emscripten_get_now()-start<msecs){}}function __webgl_enable_ANGLE_instanced_arrays(ctx){var ext=ctx.getExtension(\"ANGLE_instanced_arrays\");if(ext){ctx[\"vertexAttribDivisor\"]=function(index,divisor){ext[\"vertexAttribDivisorANGLE\"](index,divisor)};ctx[\"drawArraysInstanced\"]=function(mode,first,count,primcount){ext[\"drawArraysInstancedANGLE\"](mode,first,count,primcount)};ctx[\"drawElementsInstanced\"]=function(mode,count,type,indices,primcount){ext[\"drawElementsInstancedANGLE\"](mode,count,type,indices,primcount)};return 1}}function __webgl_enable_OES_vertex_array_object(ctx){var ext=ctx.getExtension(\"OES_vertex_array_object\");if(ext){ctx[\"createVertexArray\"]=function(){return ext[\"createVertexArrayOES\"]()};ctx[\"deleteVertexArray\"]=function(vao){ext[\"deleteVertexArrayOES\"](vao)};ctx[\"bindVertexArray\"]=function(vao){ext[\"bindVertexArrayOES\"](vao)};ctx[\"isVertexArray\"]=function(vao){return ext[\"isVertexArrayOES\"](vao)};return 1}}function __webgl_enable_WEBGL_draw_buffers(ctx){var ext=ctx.getExtension(\"WEBGL_draw_buffers\");if(ext){ctx[\"drawBuffers\"]=function(n,bufs){ext[\"drawBuffersWEBGL\"](n,bufs)};return 1}}function __webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(ctx){return!!(ctx.dibvbi=ctx.getExtension(\"WEBGL_draw_instanced_base_vertex_base_instance\"))}function __webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(ctx){return!!(ctx.mdibvbi=ctx.getExtension(\"WEBGL_multi_draw_instanced_base_vertex_base_instance\"))}function __webgl_enable_WEBGL_multi_draw(ctx){return!!(ctx.multiDrawWebgl=ctx.getExtension(\"WEBGL_multi_draw\"))}var GL={counter:1,buffers:[],mappedBuffers:{},programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],byteSizeByTypeRoot:5120,byteSizeByType:[1,1,2,2,4,4,4,2,3,4,8],stringCache:{},stringiCache:{},unpackAlignment:4,recordError:function recordError(errorCode){if(!GL.lastError){GL.lastError=errorCode}},getNewId:function(table){var ret=GL.counter++;for(var i=table.length;i<ret;i++){table[i]=null}return ret},MAX_TEMP_BUFFER_SIZE:2097152,numTempVertexBuffersPerSize:64,log2ceilLookup:function(i){return 32-Math.clz32(i===0?0:i-1)},generateTempBuffers:function(quads,context){var largestIndex=GL.log2ceilLookup(GL.MAX_TEMP_BUFFER_SIZE);context.tempVertexBufferCounters1=[];context.tempVertexBufferCounters2=[];context.tempVertexBufferCounters1.length=context.tempVertexBufferCounters2.length=largestIndex+1;context.tempVertexBuffers1=[];context.tempVertexBuffers2=[];context.tempVertexBuffers1.length=context.tempVertexBuffers2.length=largestIndex+1;context.tempIndexBuffers=[];context.tempIndexBuffers.length=largestIndex+1;for(var i=0;i<=largestIndex;++i){context.tempIndexBuffers[i]=null;context.tempVertexBufferCounters1[i]=context.tempVertexBufferCounters2[i]=0;var ringbufferLength=GL.numTempVertexBuffersPerSize;context.tempVertexBuffers1[i]=[];context.tempVertexBuffers2[i]=[];var ringbuffer1=context.tempVertexBuffers1[i];var ringbuffer2=context.tempVertexBuffers2[i];ringbuffer1.length=ringbuffer2.length=ringbufferLength;for(var j=0;j<ringbufferLength;++j){ringbuffer1[j]=ringbuffer2[j]=null}}if(quads){context.tempQuadIndexBuffer=GLctx.createBuffer();context.GLctx.bindBuffer(34963,context.tempQuadIndexBuffer);var numIndexes=GL.MAX_TEMP_BUFFER_SIZE>>1;var quadIndexes=new Uint16Array(numIndexes);var i=0,v=0;while(1){quadIndexes[i++]=v;if(i>=numIndexes)break;quadIndexes[i++]=v+1;if(i>=numIndexes)break;quadIndexes[i++]=v+2;if(i>=numIndexes)break;quadIndexes[i++]=v;if(i>=numIndexes)break;quadIndexes[i++]=v+2;if(i>=numIndexes)break;quadIndexes[i++]=v+3;if(i>=numIndexes)break;v+=4}context.GLctx.bufferData(34963,quadIndexes,35044);context.GLctx.bindBuffer(34963,null)}},getTempVertexBuffer:function getTempVertexBuffer(sizeBytes){var idx=GL.log2ceilLookup(sizeBytes);var ringbuffer=GL.currentContext.tempVertexBuffers1[idx];var nextFreeBufferIndex=GL.currentContext.tempVertexBufferCounters1[idx];GL.currentContext.tempVertexBufferCounters1[idx]=GL.currentContext.tempVertexBufferCounters1[idx]+1&GL.numTempVertexBuffersPerSize-1;var vbo=ringbuffer[nextFreeBufferIndex];if(vbo){return vbo}var prevVBO=GLctx.getParameter(34964);ringbuffer[nextFreeBufferIndex]=GLctx.createBuffer();GLctx.bindBuffer(34962,ringbuffer[nextFreeBufferIndex]);GLctx.bufferData(34962,1<<idx,35048);GLctx.bindBuffer(34962,prevVBO);return ringbuffer[nextFreeBufferIndex]},getTempIndexBuffer:function getTempIndexBuffer(sizeBytes){var idx=GL.log2ceilLookup(sizeBytes);var ibo=GL.currentContext.tempIndexBuffers[idx];if(ibo){return ibo}var prevIBO=GLctx.getParameter(34965);GL.currentContext.tempIndexBuffers[idx]=GLctx.createBuffer();GLctx.bindBuffer(34963,GL.currentContext.tempIndexBuffers[idx]);GLctx.bufferData(34963,1<<idx,35048);GLctx.bindBuffer(34963,prevIBO);return GL.currentContext.tempIndexBuffers[idx]},newRenderingFrameStarted:function newRenderingFrameStarted(){if(!GL.currentContext){return}var vb=GL.currentContext.tempVertexBuffers1;GL.currentContext.tempVertexBuffers1=GL.currentContext.tempVertexBuffers2;GL.currentContext.tempVertexBuffers2=vb;vb=GL.currentContext.tempVertexBufferCounters1;GL.currentContext.tempVertexBufferCounters1=GL.currentContext.tempVertexBufferCounters2;GL.currentContext.tempVertexBufferCounters2=vb;var largestIndex=GL.log2ceilLookup(GL.MAX_TEMP_BUFFER_SIZE);for(var i=0;i<=largestIndex;++i){GL.currentContext.tempVertexBufferCounters1[i]=0}},getSource:function(shader,count,string,length){var source=\"\";for(var i=0;i<count;++i){var len=length?HEAP32[length+i*4>>2]:-1;source+=UTF8ToString(HEAP32[string+i*4>>2],len<0?undefined:len)}return source},calcBufLength:function calcBufLength(size,type,stride,count){if(stride>0){return count*stride}var typeSize=GL.byteSizeByType[type-GL.byteSizeByTypeRoot];return size*typeSize*count},usedTempBuffers:[],preDrawHandleClientVertexAttribBindings:function preDrawHandleClientVertexAttribBindings(count){GL.resetBufferBinding=false;for(var i=0;i<GL.currentContext.maxVertexAttribs;++i){var cb=GL.currentContext.clientBuffers[i];if(!cb.clientside||!cb.enabled)continue;GL.resetBufferBinding=true;var size=GL.calcBufLength(cb.size,cb.type,cb.stride,count);var buf=GL.getTempVertexBuffer(size);GLctx.bindBuffer(34962,buf);GLctx.bufferSubData(34962,0,HEAPU8.subarray(cb.ptr,cb.ptr+size));cb.vertexAttribPointerAdaptor.call(GLctx,i,cb.size,cb.type,cb.normalized,cb.stride,0)}},postDrawHandleClientVertexAttribBindings:function postDrawHandleClientVertexAttribBindings(){if(GL.resetBufferBinding){GLctx.bindBuffer(34962,GL.buffers[GLctx.currentArrayBufferBinding])}},createContext:function(canvas,webGLContextAttributes){if(webGLContextAttributes.renderViaOffscreenBackBuffer)webGLContextAttributes[\"preserveDrawingBuffer\"]=true;if(!canvas.getContextSafariWebGL2Fixed){canvas.getContextSafariWebGL2Fixed=canvas.getContext;canvas.getContext=function(ver,attrs){var gl=canvas.getContextSafariWebGL2Fixed(ver,attrs);return ver==\"webgl\"==gl instanceof WebGLRenderingContext?gl:null}}var ctx=webGLContextAttributes.majorVersion>1?canvas.getContext(\"webgl2\",webGLContextAttributes):canvas.getContext(\"webgl\",webGLContextAttributes);if(!ctx)return 0;var handle=GL.registerContext(ctx,webGLContextAttributes);return handle},enableOffscreenFramebufferAttributes:function(webGLContextAttributes){webGLContextAttributes.renderViaOffscreenBackBuffer=true;webGLContextAttributes.preserveDrawingBuffer=true},createOffscreenFramebuffer:function(context){var gl=context.GLctx;var fbo=gl.createFramebuffer();gl.bindFramebuffer(36160,fbo);context.defaultFbo=fbo;context.defaultFboForbidBlitFramebuffer=false;if(gl.getContextAttributes().antialias){context.defaultFboForbidBlitFramebuffer=true}else{var firefoxMatch=navigator.userAgent.toLowerCase().match(/firefox\\/(\\d\\d)/);if(firefoxMatch!=null){var firefoxVersion=firefoxMatch[1];context.defaultFboForbidBlitFramebuffer=firefoxVersion<67}}context.defaultColorTarget=gl.createTexture();context.defaultDepthTarget=gl.createRenderbuffer();GL.resizeOffscreenFramebuffer(context);gl.bindTexture(3553,context.defaultColorTarget);gl.texParameteri(3553,10241,9728);gl.texParameteri(3553,10240,9728);gl.texParameteri(3553,10242,33071);gl.texParameteri(3553,10243,33071);gl.texImage2D(3553,0,6408,gl.canvas.width,gl.canvas.height,0,6408,5121,null);gl.framebufferTexture2D(36160,36064,3553,context.defaultColorTarget,0);gl.bindTexture(3553,null);var depthTarget=gl.createRenderbuffer();gl.bindRenderbuffer(36161,context.defaultDepthTarget);gl.renderbufferStorage(36161,33189,gl.canvas.width,gl.canvas.height);gl.framebufferRenderbuffer(36160,36096,36161,context.defaultDepthTarget);gl.bindRenderbuffer(36161,null);var vertices=[-1,-1,-1,1,1,-1,1,1];var vb=gl.createBuffer();gl.bindBuffer(34962,vb);gl.bufferData(34962,new Float32Array(vertices),35044);gl.bindBuffer(34962,null);context.blitVB=vb;var vsCode=\"attribute vec2 pos;\"+\"varying lowp vec2 tex;\"+\"void main() { tex = pos * 0.5 + vec2(0.5,0.5); gl_Position = vec4(pos, 0.0, 1.0); }\";var vs=gl.createShader(35633);gl.shaderSource(vs,vsCode);gl.compileShader(vs);var fsCode=\"varying lowp vec2 tex;\"+\"uniform sampler2D sampler;\"+\"void main() { gl_FragColor = texture2D(sampler, tex); }\";var fs=gl.createShader(35632);gl.shaderSource(fs,fsCode);gl.compileShader(fs);var blitProgram=gl.createProgram();gl.attachShader(blitProgram,vs);gl.attachShader(blitProgram,fs);gl.linkProgram(blitProgram);context.blitProgram=blitProgram;context.blitPosLoc=gl.getAttribLocation(blitProgram,\"pos\");gl.useProgram(blitProgram);gl.uniform1i(gl.getUniformLocation(blitProgram,\"sampler\"),0);gl.useProgram(null);context.defaultVao=undefined;if(gl.createVertexArray){context.defaultVao=gl.createVertexArray();gl.bindVertexArray(context.defaultVao);gl.enableVertexAttribArray(context.blitPosLoc);gl.bindVertexArray(null)}},resizeOffscreenFramebuffer:function(context){var gl=context.GLctx;if(context.defaultColorTarget){var prevTextureBinding=gl.getParameter(32873);gl.bindTexture(3553,context.defaultColorTarget);gl.texImage2D(3553,0,6408,gl.drawingBufferWidth,gl.drawingBufferHeight,0,6408,5121,null);gl.bindTexture(3553,prevTextureBinding)}if(context.defaultDepthTarget){var prevRenderBufferBinding=gl.getParameter(36007);gl.bindRenderbuffer(36161,context.defaultDepthTarget);gl.renderbufferStorage(36161,33189,gl.drawingBufferWidth,gl.drawingBufferHeight);gl.bindRenderbuffer(36161,prevRenderBufferBinding)}},blitOffscreenFramebuffer:function(context){var gl=context.GLctx;var prevScissorTest=gl.getParameter(3089);if(prevScissorTest)gl.disable(3089);var prevFbo=gl.getParameter(36006);if(gl.blitFramebuffer&&!context.defaultFboForbidBlitFramebuffer){gl.bindFramebuffer(36008,context.defaultFbo);gl.bindFramebuffer(36009,null);gl.blitFramebuffer(0,0,gl.canvas.width,gl.canvas.height,0,0,gl.canvas.width,gl.canvas.height,16384,9728)}else{gl.bindFramebuffer(36160,null);var prevProgram=gl.getParameter(35725);gl.useProgram(context.blitProgram);var prevVB=gl.getParameter(34964);gl.bindBuffer(34962,context.blitVB);var prevActiveTexture=gl.getParameter(34016);gl.activeTexture(33984);var prevTextureBinding=gl.getParameter(32873);gl.bindTexture(3553,context.defaultColorTarget);var prevBlend=gl.getParameter(3042);if(prevBlend)gl.disable(3042);var prevCullFace=gl.getParameter(2884);if(prevCullFace)gl.disable(2884);var prevDepthTest=gl.getParameter(2929);if(prevDepthTest)gl.disable(2929);var prevStencilTest=gl.getParameter(2960);if(prevStencilTest)gl.disable(2960);function draw(){gl.vertexAttribPointer(context.blitPosLoc,2,5126,false,0,0);gl.drawArrays(5,0,4)}if(context.defaultVao){var prevVAO=gl.getParameter(34229);gl.bindVertexArray(context.defaultVao);draw();gl.bindVertexArray(prevVAO)}else{var prevVertexAttribPointer={buffer:gl.getVertexAttrib(context.blitPosLoc,34975),size:gl.getVertexAttrib(context.blitPosLoc,34339),stride:gl.getVertexAttrib(context.blitPosLoc,34340),type:gl.getVertexAttrib(context.blitPosLoc,34341),normalized:gl.getVertexAttrib(context.blitPosLoc,34922),pointer:gl.getVertexAttribOffset(context.blitPosLoc,34373)};var maxVertexAttribs=gl.getParameter(34921);var prevVertexAttribEnables=[];for(var i=0;i<maxVertexAttribs;++i){var prevEnabled=gl.getVertexAttrib(i,34338);var wantEnabled=i==context.blitPosLoc;if(prevEnabled&&!wantEnabled){gl.disableVertexAttribArray(i)}if(!prevEnabled&&wantEnabled){gl.enableVertexAttribArray(i)}prevVertexAttribEnables[i]=prevEnabled}draw();for(var i=0;i<maxVertexAttribs;++i){var prevEnabled=prevVertexAttribEnables[i];var nowEnabled=i==context.blitPosLoc;if(prevEnabled&&!nowEnabled){gl.enableVertexAttribArray(i)}if(!prevEnabled&&nowEnabled){gl.disableVertexAttribArray(i)}}gl.bindBuffer(34962,prevVertexAttribPointer.buffer);gl.vertexAttribPointer(context.blitPosLoc,prevVertexAttribPointer.size,prevVertexAttribPointer.type,prevVertexAttribPointer.normalized,prevVertexAttribPointer.stride,prevVertexAttribPointer.offset)}if(prevStencilTest)gl.enable(2960);if(prevDepthTest)gl.enable(2929);if(prevCullFace)gl.enable(2884);if(prevBlend)gl.enable(3042);gl.bindTexture(3553,prevTextureBinding);gl.activeTexture(prevActiveTexture);gl.bindBuffer(34962,prevVB);gl.useProgram(prevProgram)}gl.bindFramebuffer(36160,prevFbo);if(prevScissorTest)gl.enable(3089)},registerContext:function(ctx,webGLContextAttributes){var handle=GL.getNewId(GL.contexts);var context={handle:handle,attributes:webGLContextAttributes,version:webGLContextAttributes.majorVersion,GLctx:ctx};if(ctx.canvas)ctx.canvas.GLctxObject=context;GL.contexts[handle]=context;if(typeof webGLContextAttributes.enableExtensionsByDefault===\"undefined\"||webGLContextAttributes.enableExtensionsByDefault){GL.initExtensions(context)}context.maxVertexAttribs=context.GLctx.getParameter(34921);context.clientBuffers=[];for(var i=0;i<context.maxVertexAttribs;i++){context.clientBuffers[i]={enabled:false,clientside:false,size:0,type:0,normalized:0,stride:0,ptr:0,vertexAttribPointerAdaptor:null}}GL.generateTempBuffers(false,context);if(webGLContextAttributes.renderViaOffscreenBackBuffer)GL.createOffscreenFramebuffer(context);return handle},makeContextCurrent:function(contextHandle){GL.currentContext=GL.contexts[contextHandle];Module.ctx=GLctx=GL.currentContext&&GL.currentContext.GLctx;return!(contextHandle&&!GLctx)},getContext:function(contextHandle){return GL.contexts[contextHandle]},deleteContext:function(contextHandle){if(GL.currentContext===GL.contexts[contextHandle])GL.currentContext=null;if(typeof JSEvents===\"object\")JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas);if(GL.contexts[contextHandle]&&GL.contexts[contextHandle].GLctx.canvas)GL.contexts[contextHandle].GLctx.canvas.GLctxObject=undefined;GL.contexts[contextHandle]=null},initExtensions:function(context){if(!context)context=GL.currentContext;if(context.initExtensionsDone)return;context.initExtensionsDone=true;var GLctx=context.GLctx;__webgl_enable_ANGLE_instanced_arrays(GLctx);__webgl_enable_OES_vertex_array_object(GLctx);__webgl_enable_WEBGL_draw_buffers(GLctx);__webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(GLctx);__webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(GLctx);if(context.version>=2){GLctx.disjointTimerQueryExt=GLctx.getExtension(\"EXT_disjoint_timer_query_webgl2\")}if(context.version<2||!GLctx.disjointTimerQueryExt){GLctx.disjointTimerQueryExt=GLctx.getExtension(\"EXT_disjoint_timer_query\")}__webgl_enable_WEBGL_multi_draw(GLctx);var exts=GLctx.getSupportedExtensions()||[];exts.forEach(function(ext){if(!ext.includes(\"lose_context\")&&!ext.includes(\"debug\")){GLctx.getExtension(ext)}})}};var JSEvents={inEventHandler:0,removeAllEventListeners:function(){for(var i=JSEvents.eventHandlers.length-1;i>=0;--i){JSEvents._removeHandler(i)}JSEvents.eventHandlers=[];JSEvents.deferredCalls=[]},registerRemoveEventListeners:function(){if(!JSEvents.removeEventListenersRegistered){__ATEXIT__.push(JSEvents.removeAllEventListeners);JSEvents.removeEventListenersRegistered=true}},deferredCalls:[],deferCall:function(targetFunction,precedence,argsList){function arraysHaveEqualContent(arrA,arrB){if(arrA.length!=arrB.length)return false;for(var i in arrA){if(arrA[i]!=arrB[i])return false}return true}for(var i in JSEvents.deferredCalls){var call=JSEvents.deferredCalls[i];if(call.targetFunction==targetFunction&&arraysHaveEqualContent(call.argsList,argsList)){return}}JSEvents.deferredCalls.push({targetFunction:targetFunction,precedence:precedence,argsList:argsList});JSEvents.deferredCalls.sort(function(x,y){return x.precedence<y.precedence})},removeDeferredCalls:function(targetFunction){for(var i=0;i<JSEvents.deferredCalls.length;++i){if(JSEvents.deferredCalls[i].targetFunction==targetFunction){JSEvents.deferredCalls.splice(i,1);--i}}},canPerformEventHandlerRequests:function(){return JSEvents.inEventHandler&&JSEvents.currentEventHandler.allowsDeferredCalls},runDeferredCalls:function(){if(!JSEvents.canPerformEventHandlerRequests()){return}for(var i=0;i<JSEvents.deferredCalls.length;++i){var call=JSEvents.deferredCalls[i];JSEvents.deferredCalls.splice(i,1);--i;call.targetFunction.apply(null,call.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:function(target,eventTypeString){for(var i=0;i<JSEvents.eventHandlers.length;++i){if(JSEvents.eventHandlers[i].target==target&&(!eventTypeString||eventTypeString==JSEvents.eventHandlers[i].eventTypeString)){JSEvents._removeHandler(i--)}}},_removeHandler:function(i){var h=JSEvents.eventHandlers[i];h.target.removeEventListener(h.eventTypeString,h.eventListenerFunc,h.useCapture);JSEvents.eventHandlers.splice(i,1)},registerOrRemoveHandler:function(eventHandler){var jsEventHandler=function jsEventHandler(event){++JSEvents.inEventHandler;JSEvents.currentEventHandler=eventHandler;JSEvents.runDeferredCalls();eventHandler.handlerFunc(event);JSEvents.runDeferredCalls();--JSEvents.inEventHandler};if(eventHandler.callbackfunc){eventHandler.eventListenerFunc=jsEventHandler;eventHandler.target.addEventListener(eventHandler.eventTypeString,jsEventHandler,eventHandler.useCapture);JSEvents.eventHandlers.push(eventHandler);JSEvents.registerRemoveEventListeners()}else{for(var i=0;i<JSEvents.eventHandlers.length;++i){if(JSEvents.eventHandlers[i].target==eventHandler.target&&JSEvents.eventHandlers[i].eventTypeString==eventHandler.eventTypeString){JSEvents._removeHandler(i--)}}}},getNodeNameForTarget:function(target){if(!target)return\"\";if(target==window)return\"#window\";if(target==screen)return\"#screen\";return target&&target.nodeName?target.nodeName:\"\"},fullscreenEnabled:function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled}};var __emscripten_webgl_power_preferences=[\"default\",\"low-power\",\"high-performance\"];var specialHTMLTargets=[0,typeof document!==\"undefined\"?document:0,typeof window!==\"undefined\"?window:0];function findEventTarget(target){warnOnce(\"Rules for selecting event targets in HTML5 API are changing: instead of using document.getElementById() that only can refer to elements by their DOM ID, new event target selection mechanism uses the more flexible function document.querySelector() that can look up element names, classes, and complex CSS selectors. Build with -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1 to change to the new lookup rules. See https://github.com/emscripten-core/emscripten/pull/7977 for more details.\");try{if(!target)return window;if(typeof target===\"number\")target=specialHTMLTargets[target]||UTF8ToString(target);if(target===\"#window\")return window;else if(target===\"#document\")return document;else if(target===\"#screen\")return screen;else if(target===\"#canvas\")return Module[\"canvas\"];return typeof target===\"string\"?document.getElementById(target):target}catch(e){return null}}function findCanvasEventTarget(target){if(typeof target===\"number\")target=UTF8ToString(target);if(!target||target===\"#canvas\"){if(typeof GL!==\"undefined\"&&GL.offscreenCanvases[\"canvas\"])return GL.offscreenCanvases[\"canvas\"];return Module[\"canvas\"]}if(typeof GL!==\"undefined\"&&GL.offscreenCanvases[target])return GL.offscreenCanvases[target];return findEventTarget(target)}function _emscripten_webgl_do_create_context(target,attributes){assert(attributes);var a=attributes>>2;var powerPreference=HEAP32[a+(24>>2)];var contextAttributes={\"alpha\":!!HEAP32[a+(0>>2)],\"depth\":!!HEAP32[a+(4>>2)],\"stencil\":!!HEAP32[a+(8>>2)],\"antialias\":!!HEAP32[a+(12>>2)],\"premultipliedAlpha\":!!HEAP32[a+(16>>2)],\"preserveDrawingBuffer\":!!HEAP32[a+(20>>2)],\"powerPreference\":__emscripten_webgl_power_preferences[powerPreference],\"failIfMajorPerformanceCaveat\":!!HEAP32[a+(28>>2)],majorVersion:HEAP32[a+(32>>2)],minorVersion:HEAP32[a+(36>>2)],enableExtensionsByDefault:HEAP32[a+(40>>2)],explicitSwapControl:HEAP32[a+(44>>2)],proxyContextToMainThread:HEAP32[a+(48>>2)],renderViaOffscreenBackBuffer:HEAP32[a+(52>>2)]};var canvas=findCanvasEventTarget(target);if(!canvas){return 0}if(canvas.offscreenCanvas)canvas=canvas.offscreenCanvas;if(contextAttributes.explicitSwapControl){var supportsOffscreenCanvas=canvas.transferControlToOffscreen||typeof OffscreenCanvas!==\"undefined\"&&canvas instanceof OffscreenCanvas;if(!supportsOffscreenCanvas){if(!contextAttributes.renderViaOffscreenBackBuffer){contextAttributes.renderViaOffscreenBackBuffer=true}}if(canvas.transferControlToOffscreen){if(!canvas.controlTransferredOffscreen){GL.offscreenCanvases[canvas.id]={canvas:canvas.transferControlToOffscreen(),canvasSharedPtr:_malloc(12),id:canvas.id};canvas.controlTransferredOffscreen=true}else if(!GL.offscreenCanvases[canvas.id]){return 0}canvas=GL.offscreenCanvases[canvas.id]}}var contextHandle=GL.createContext(canvas,contextAttributes);return contextHandle}function _emscripten_webgl_create_context(a0,a1){return _emscripten_webgl_do_create_context(a0,a1)}function _emscripten_webgl_do_get_current_context(){return GL.currentContext?GL.currentContext.handle:0}function _emscripten_webgl_get_current_context(){return _emscripten_webgl_do_get_current_context()}Module[\"_emscripten_webgl_get_current_context\"]=_emscripten_webgl_get_current_context;function _emscripten_webgl_make_context_current(contextHandle){var success=GL.makeContextCurrent(contextHandle);return success?0:-5}Module[\"_emscripten_webgl_make_context_current\"]=_emscripten_webgl_make_context_current;function _emscripten_webgl_destroy_context(contextHandle){if(GL.currentContext==contextHandle)GL.currentContext=0;GL.deleteContext(contextHandle)}function _emscripten_webgl_get_context_attributes(c,a){if(!a)return-5;c=GL.contexts[c];if(!c)return-3;var t=c.GLctx;if(!t)return-3;t=t.getContextAttributes();HEAP32[a>>2]=t.alpha;HEAP32[a+4>>2]=t.depth;HEAP32[a+8>>2]=t.stencil;HEAP32[a+12>>2]=t.antialias;HEAP32[a+16>>2]=t.premultipliedAlpha;HEAP32[a+20>>2]=t.preserveDrawingBuffer;var power=t[\"powerPreference\"]&&__emscripten_webgl_power_preferences.indexOf(t[\"powerPreference\"]);HEAP32[a+24>>2]=power;HEAP32[a+28>>2]=t.failIfMajorPerformanceCaveat;HEAP32[a+32>>2]=c.version;HEAP32[a+36>>2]=0;HEAP32[a+40>>2]=c.attributes.enableExtensionsByDefault;return 0}function _emscripten_webgl_init_context_attributes(attributes){assert(attributes);var a=attributes>>2;for(var i=0;i<56>>2;++i){HEAP32[a+i]=0}HEAP32[a+(0>>2)]=HEAP32[a+(4>>2)]=HEAP32[a+(12>>2)]=HEAP32[a+(16>>2)]=HEAP32[a+(32>>2)]=HEAP32[a+(40>>2)]=1}var ENV={};function getExecutableName(){return thisProgram||\"./this.program\"}function 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}function _environ_get(__environ,environ_buf){var bufSize=0;getEnvStrings().forEach(function(string,i){var ptr=environ_buf+bufSize;HEAP32[__environ+i*4>>2]=ptr;writeAsciiToMemory(string,ptr);bufSize+=string.length+1});return 0}function _environ_sizes_get(penviron_count,penviron_buf_size){var strings=getEnvStrings();HEAP32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1});HEAP32[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 instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_read(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=SYSCALLS.doReadv(stream,iov,iovcnt);HEAP32[pnum>>2]=num;return 0}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){try{var stream=SYSCALLS.getStreamFromFD(fd);var HIGH_OFFSET=4294967296;var offset=offset_high*HIGH_OFFSET+(offset_low>>>0);var DOUBLE_LIMIT=9007199254740992;if(offset<=-DOUBLE_LIMIT||offset>=DOUBLE_LIMIT){return-61}FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[newOffset>>2]=tempI64[0],HEAP32[newOffset+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_write(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=SYSCALLS.doWritev(stream,iov,iovcnt);HEAP32[pnum>>2]=num;return 0}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _getTempRet0(){return getTempRet0()}function _getentropy(buffer,size){if(!_getentropy.randomDevice){_getentropy.randomDevice=getRandomDevice()}for(var i=0;i<size;i++){HEAP8[buffer+i>>0]=_getentropy.randomDevice()}return 0}function _glActiveTexture(x0){GLctx[\"activeTexture\"](x0)}function _glAttachShader(program,shader){GLctx.attachShader(GL.programs[program],GL.shaders[shader])}function _glBindAttribLocation(program,index,name){GLctx.bindAttribLocation(GL.programs[program],index,UTF8ToString(name))}function _glBindBuffer(target,buffer){if(target==34962){GLctx.currentArrayBufferBinding=buffer}else if(target==34963){GLctx.currentElementArrayBufferBinding=buffer}if(target==35051){GLctx.currentPixelPackBufferBinding=buffer}else if(target==35052){GLctx.currentPixelUnpackBufferBinding=buffer}GLctx.bindBuffer(target,GL.buffers[buffer])}function _glBindBufferBase(target,index,buffer){GLctx[\"bindBufferBase\"](target,index,GL.buffers[buffer])}function _glBindFramebuffer(target,framebuffer){GLctx.bindFramebuffer(target,framebuffer?GL.framebuffers[framebuffer]:GL.currentContext.defaultFbo)}function _glBindTexture(target,texture){GLctx.bindTexture(target,GL.textures[texture])}function _glBindVertexArray(vao){GLctx[\"bindVertexArray\"](GL.vaos[vao]);var ibo=GLctx.getParameter(34965);GLctx.currentElementArrayBufferBinding=ibo?ibo.name|0:0}function _glBufferData(target,size,data,usage){if(GL.currentContext.version>=2){if(data){GLctx.bufferData(target,HEAPU8,usage,data,size)}else{GLctx.bufferData(target,size,usage)}}else{GLctx.bufferData(target,data?HEAPU8.subarray(data,data+size):size,usage)}}function convertI32PairToI53(lo,hi){assert(hi===(hi|0));return(lo>>>0)+hi*4294967296}function _glClientWaitSync(sync,flags,timeoutLo,timeoutHi){return GLctx.clientWaitSync(GL.syncs[sync],flags,convertI32PairToI53(timeoutLo,timeoutHi))}function _glCompileShader(shader){GLctx.compileShader(GL.shaders[shader])}function _glCreateProgram(){var id=GL.getNewId(GL.programs);var program=GLctx.createProgram();program.name=id;program.maxUniformLength=program.maxAttributeLength=program.maxUniformBlockNameLength=0;program.uniformIdCounter=1;GL.programs[id]=program;return id}function _glCreateShader(shaderType){var id=GL.getNewId(GL.shaders);GL.shaders[id]=GLctx.createShader(shaderType);return id}function _glDeleteBuffers(n,buffers){for(var i=0;i<n;i++){var id=HEAP32[buffers+i*4>>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GLctx.currentArrayBufferBinding)GLctx.currentArrayBufferBinding=0;if(id==GLctx.currentElementArrayBufferBinding)GLctx.currentElementArrayBufferBinding=0;if(id==GLctx.currentPixelPackBufferBinding)GLctx.currentPixelPackBufferBinding=0;if(id==GLctx.currentPixelUnpackBufferBinding)GLctx.currentPixelUnpackBufferBinding=0}}function _glDeleteFramebuffers(n,framebuffers){for(var i=0;i<n;++i){var id=HEAP32[framebuffers+i*4>>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}function _glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null}function _glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _glDeleteSync(id){if(!id)return;var sync=GL.syncs[id];if(!sync){GL.recordError(1281);return}GLctx.deleteSync(sync);sync.name=0;GL.syncs[id]=null}function _glDeleteTextures(n,textures){for(var i=0;i<n;i++){var id=HEAP32[textures+i*4>>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _glDeleteVertexArrays(n,vaos){for(var i=0;i<n;i++){var id=HEAP32[vaos+i*4>>2];GLctx[\"deleteVertexArray\"](GL.vaos[id]);GL.vaos[id]=null}}function _glDisable(x0){GLctx[\"disable\"](x0)}function _glDisableVertexAttribArray(index){var cb=GL.currentContext.clientBuffers[index];cb.enabled=false;GLctx.disableVertexAttribArray(index)}function _glDrawArrays(mode,first,count){GL.preDrawHandleClientVertexAttribBindings(first+count);GLctx.drawArrays(mode,first,count);GL.postDrawHandleClientVertexAttribBindings()}var tempFixedLengthArray=[];function _glDrawBuffers(n,bufs){var bufArray=tempFixedLengthArray[n];for(var i=0;i<n;i++){bufArray[i]=HEAP32[bufs+i*4>>2]}GLctx[\"drawBuffers\"](bufArray)}function _glEnableVertexAttribArray(index){var cb=GL.currentContext.clientBuffers[index];cb.enabled=true;GLctx.enableVertexAttribArray(index)}function _glFenceSync(condition,flags){var sync=GLctx.fenceSync(condition,flags);if(sync){var id=GL.getNewId(GL.syncs);sync.name=id;GL.syncs[id]=sync;return id}else{return 0}}function _glFinish(){GLctx[\"finish\"]()}function _glFlush(){GLctx[\"flush\"]()}function _glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}function _glFramebufferTextureLayer(target,attachment,texture,level,layer){GLctx.framebufferTextureLayer(target,attachment,GL.textures[texture],level,layer)}function __glGenObject(n,buffers,createFunction,objectTable){for(var i=0;i<n;i++){var buffer=GLctx[createFunction]();var id=buffer&&GL.getNewId(objectTable);if(buffer){buffer.name=id;objectTable[id]=buffer}else{GL.recordError(1282)}HEAP32[buffers+i*4>>2]=id}}function _glGenBuffers(n,buffers){__glGenObject(n,buffers,\"createBuffer\",GL.buffers)}function _glGenFramebuffers(n,ids){__glGenObject(n,ids,\"createFramebuffer\",GL.framebuffers)}function _glGenTextures(n,textures){__glGenObject(n,textures,\"createTexture\",GL.textures)}function _glGenVertexArrays(n,arrays){__glGenObject(n,arrays,\"createVertexArray\",GL.vaos)}function _glGetAttribLocation(program,name){return GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name))}function _glGetError(){var error=GLctx.getError()||GL.lastError;GL.lastError=0;return error}function _glGetFramebufferAttachmentParameteriv(target,attachment,pname,params){var result=GLctx.getFramebufferAttachmentParameter(target,attachment,pname);if(result instanceof WebGLRenderbuffer||result instanceof WebGLTexture){result=result.name|0}HEAP32[params>>2]=result}function readI53FromI64(ptr){return HEAPU32[ptr>>2]+HEAP32[ptr+4>>2]*4294967296}function readI53FromU64(ptr){return HEAPU32[ptr>>2]+HEAPU32[ptr+4>>2]*4294967296}function writeI53ToI64(ptr,num){HEAPU32[ptr>>2]=num;HEAPU32[ptr+4>>2]=(num-HEAPU32[ptr>>2])/4294967296;var deserialized=num>=0?readI53FromU64(ptr):readI53FromI64(ptr);if(deserialized!=num)warnOnce(\"writeI53ToI64() out of range: serialized JS Number \"+num+\" to Wasm heap as bytes lo=0x\"+HEAPU32[ptr>>2].toString(16)+\", hi=0x\"+HEAPU32[ptr+4>>2].toString(16)+\", which deserializes back to \"+deserialized+\" instead!\")}function emscriptenWebGLGet(name_,p,type){if(!p){GL.recordError(1281);return}var ret=undefined;switch(name_){case 36346:ret=1;break;case 36344:if(type!=0&&type!=1){GL.recordError(1280)}return;case 34814:case 36345:ret=0;break;case 34466:var formats=GLctx.getParameter(34467);ret=formats?formats.length:0;break;case 33309:if(GL.currentContext.version<2){GL.recordError(1282);return}var exts=GLctx.getSupportedExtensions()||[];ret=2*exts.length;break;case 33307:case 33308:if(GL.currentContext.version<2){GL.recordError(1280);return}ret=name_==33307?3:0;break}if(ret===undefined){var result=GLctx.getParameter(name_);switch(typeof result){case\"number\":ret=result;break;case\"boolean\":ret=result?1:0;break;case\"string\":GL.recordError(1280);return;case\"object\":if(result===null){switch(name_){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:{ret=0;break}default:{GL.recordError(1280);return}}}else if(result instanceof Float32Array||result instanceof Uint32Array||result instanceof Int32Array||result instanceof Array){for(var i=0;i<result.length;++i){switch(type){case 0:HEAP32[p+i*4>>2]=result[i];break;case 2:HEAPF32[p+i*4>>2]=result[i];break;case 4:HEAP8[p+i>>0]=result[i]?1:0;break}}return}else{try{ret=result.name|0}catch(e){GL.recordError(1280);err(\"GL_INVALID_ENUM in glGet\"+type+\"v: Unknown object returned from WebGL getParameter(\"+name_+\")! (error: \"+e+\")\");return}}break;default:GL.recordError(1280);err(\"GL_INVALID_ENUM in glGet\"+type+\"v: Native code calling glGet\"+type+\"v(\"+name_+\") and it returns \"+result+\" of type \"+typeof result+\"!\");return}}switch(type){case 1:writeI53ToI64(p,ret);break;case 0:HEAP32[p>>2]=ret;break;case 2:HEAPF32[p>>2]=ret;break;case 4:HEAP8[p>>0]=ret?1:0;break}}function _glGetIntegerv(name_,p){emscriptenWebGLGet(name_,p,0)}function stringToNewUTF8(jsString){var length=lengthBytesUTF8(jsString)+1;var cString=_malloc(length);stringToUTF8(jsString,cString,length);return cString}function _glGetString(name_){var ret=GL.stringCache[name_];if(!ret){switch(name_){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return\"GL_\"+e}));ret=stringToNewUTF8(exts.join(\" \"));break;case 7936:case 7937:case 37445:case 37446:var s=GLctx.getParameter(name_);if(!s){GL.recordError(1280)}ret=s&&stringToNewUTF8(s);break;case 7938:var glVersion=GLctx.getParameter(7938);if(GL.currentContext.version>=2)glVersion=\"OpenGL ES 3.0 (\"+glVersion+\")\";else{glVersion=\"OpenGL ES 2.0 (\"+glVersion+\")\"}ret=stringToNewUTF8(glVersion);break;case 35724:var glslVersion=GLctx.getParameter(35724);var ver_re=/^WebGL GLSL ES ([0-9]\\.[0-9][0-9]?)(?:$| .*)/;var ver_num=glslVersion.match(ver_re);if(ver_num!==null){if(ver_num[1].length==3)ver_num[1]=ver_num[1]+\"0\";glslVersion=\"OpenGL ES GLSL ES \"+ver_num[1]+\" (\"+glslVersion+\")\"}ret=stringToNewUTF8(glslVersion);break;default:GL.recordError(1280)}GL.stringCache[name_]=ret}return ret}function _glGetUniformBlockIndex(program,uniformBlockName){return GLctx[\"getUniformBlockIndex\"](GL.programs[program],UTF8ToString(uniformBlockName))}function jstoi_q(str){return parseInt(str)}function webglGetLeftBracePos(name){return name.slice(-1)==\"]\"&&name.lastIndexOf(\"[\")}function webglPrepareUniformLocationsBeforeFirstUse(program){var uniformLocsById=program.uniformLocsById,uniformSizeAndIdsByName=program.uniformSizeAndIdsByName,i,j;if(!uniformLocsById){program.uniformLocsById=uniformLocsById={};program.uniformArrayNamesById={};for(i=0;i<GLctx.getProgramParameter(program,35718);++i){var u=GLctx.getActiveUniform(program,i);var nm=u.name;var sz=u.size;var lb=webglGetLeftBracePos(nm);var arrayName=lb>0?nm.slice(0,lb):nm;var id=program.uniformIdCounter;program.uniformIdCounter+=sz;uniformSizeAndIdsByName[arrayName]=[sz,id];for(j=0;j<sz;++j){uniformLocsById[id]=j;program.uniformArrayNamesById[id++]=arrayName}}}}function _glGetUniformLocation(program,name){name=UTF8ToString(name);if(program=GL.programs[program]){webglPrepareUniformLocationsBeforeFirstUse(program);var uniformLocsById=program.uniformLocsById;var arrayIndex=0;var uniformBaseName=name;var leftBrace=webglGetLeftBracePos(name);if(leftBrace>0){arrayIndex=jstoi_q(name.slice(leftBrace+1))>>>0;uniformBaseName=name.slice(0,leftBrace)}var sizeAndId=program.uniformSizeAndIdsByName[uniformBaseName];if(sizeAndId&&arrayIndex<sizeAndId[0]){arrayIndex+=sizeAndId[1];if(uniformLocsById[arrayIndex]=uniformLocsById[arrayIndex]||GLctx.getUniformLocation(program,name)){return arrayIndex}}}else{GL.recordError(1281)}return-1}function _glLinkProgram(program){program=GL.programs[program];GLctx.linkProgram(program);program.uniformLocsById=0;program.uniformSizeAndIdsByName={}}function _glPixelStorei(pname,param){if(pname==3317){GL.unpackAlignment=param}GLctx.pixelStorei(pname,param)}function computeUnpackAlignedImageSize(width,height,sizePerPixel,alignment){function roundedToNextMultipleOf(x,y){return x+y-1&-y}var plainRowSize=width*sizePerPixel;var alignedRowSize=roundedToNextMultipleOf(plainRowSize,alignment);return height*alignedRowSize}function __colorChannelsInGlTextureFormat(format){var colorChannels={5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4};return colorChannels[format-6402]||1}function heapObjectForWebGLType(type){type-=5120;if(type==0)return HEAP8;if(type==1)return HEAPU8;if(type==2)return HEAP16;if(type==4)return HEAP32;if(type==6)return HEAPF32;if(type==5||type==28922||type==28520||type==30779||type==30782)return HEAPU32;return HEAPU16}function heapAccessShiftForWebGLHeap(heap){return 31-Math.clz32(heap.BYTES_PER_ELEMENT)}function emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat){var heap=heapObjectForWebGLType(type);var shift=heapAccessShiftForWebGLHeap(heap);var byteSize=1<<shift;var sizePerPixel=__colorChannelsInGlTextureFormat(format)*byteSize;var bytes=computeUnpackAlignedImageSize(width,height,sizePerPixel,GL.unpackAlignment);return heap.subarray(pixels>>shift,pixels+bytes>>shift)}function _glReadPixels(x,y,width,height,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelPackBufferBinding){GLctx.readPixels(x,y,width,height,format,type,pixels)}else{var heap=heapObjectForWebGLType(type);GLctx.readPixels(x,y,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}return}var pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,format);if(!pixelData){GL.recordError(1280);return}GLctx.readPixels(x,y,width,height,format,type,pixelData)}function _glShaderSource(shader,count,string,length){var source=GL.getSource(shader,count,string,length);GLctx.shaderSource(GL.shaders[shader],source)}function _glTexImage2D(target,level,internalFormat,width,height,border,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,null)}return}GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels?emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat):null)}function _glTexParameterfv(target,pname,params){var param=HEAPF32[params>>2];GLctx.texParameterf(target,pname,param)}function _glTexParameteri(x0,x1,x2){GLctx[\"texParameteri\"](x0,x1,x2)}function _glTexStorage2D(x0,x1,x2,x3,x4){GLctx[\"texStorage2D\"](x0,x1,x2,x3,x4)}function _glTexStorage3D(x0,x1,x2,x3,x4,x5){GLctx[\"texStorage3D\"](x0,x1,x2,x3,x4,x5)}function _glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,null)}return}var pixelData=null;if(pixels)pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,0);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixelData)}function _glTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx[\"texSubImage3D\"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx[\"texSubImage3D\"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx[\"texSubImage3D\"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,null)}}function webglGetUniformLocation(location){var p=GLctx.currentProgram;if(p){var webglLoc=p.uniformLocsById[location];if(typeof webglLoc===\"number\"){p.uniformLocsById[location]=webglLoc=GLctx.getUniformLocation(p,p.uniformArrayNamesById[location]+(webglLoc>0?\"[\"+webglLoc+\"]\":\"\"))}return webglLoc}else{GL.recordError(1282)}}function _glUniform1f(location,v0){GLctx.uniform1f(webglGetUniformLocation(location),v0)}function _glUniform1i(location,v0){GLctx.uniform1i(webglGetUniformLocation(location),v0)}var miniTempWebGLFloatBuffers=[];function _glUniform2fv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform2fv(webglGetUniformLocation(location),HEAPF32,value>>2,count*2);return}if(count<=144){var view=miniTempWebGLFloatBuffers[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2fv(webglGetUniformLocation(location),view)}function _glUniform4fv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform4fv(webglGetUniformLocation(location),HEAPF32,value>>2,count*4);return}if(count<=72){var view=miniTempWebGLFloatBuffers[4*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<4*count;i+=4){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4fv(webglGetUniformLocation(location),view)}var __miniTempWebGLIntBuffers=[];function _glUniform4iv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform4iv(webglGetUniformLocation(location),HEAP32,value>>2,count*4);return}if(count<=72){var view=__miniTempWebGLIntBuffers[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2];view[i+2]=HEAP32[value+(4*i+8)>>2];view[i+3]=HEAP32[value+(4*i+12)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4iv(webglGetUniformLocation(location),view)}function _glUniformBlockBinding(program,uniformBlockIndex,uniformBlockBinding){program=GL.programs[program];GLctx[\"uniformBlockBinding\"](program,uniformBlockIndex,uniformBlockBinding)}function _glUniformMatrix4fv(location,count,transpose,value){if(GL.currentContext.version>=2){GLctx.uniformMatrix4fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*16);return}if(count<=18){var view=miniTempWebGLFloatBuffers[16*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<16*count;i+=16){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3];view[i+4]=heap[dst+4];view[i+5]=heap[dst+5];view[i+6]=heap[dst+6];view[i+7]=heap[dst+7];view[i+8]=heap[dst+8];view[i+9]=heap[dst+9];view[i+10]=heap[dst+10];view[i+11]=heap[dst+11];view[i+12]=heap[dst+12];view[i+13]=heap[dst+13];view[i+14]=heap[dst+14];view[i+15]=heap[dst+15]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(webglGetUniformLocation(location),!!transpose,view)}function _glUseProgram(program){program=GL.programs[program];GLctx.useProgram(program);GLctx.currentProgram=program}function _glVertexAttribPointer(index,size,type,normalized,stride,ptr){var cb=GL.currentContext.clientBuffers[index];if(!GLctx.currentArrayBufferBinding){cb.size=size;cb.type=type;cb.normalized=normalized;cb.stride=stride;cb.ptr=ptr;cb.clientside=true;cb.vertexAttribPointerAdaptor=function(index,size,type,normalized,stride,ptr){this.vertexAttribPointer(index,size,type,normalized,stride,ptr)};return}cb.clientside=false;GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _glViewport(x0,x1,x2,x3){GLctx[\"viewport\"](x0,x1,x2,x3)}function _gmtime_r(time,tmPtr){var date=new Date(HEAP32[time>>2]*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();HEAP32[tmPtr+36>>2]=0;HEAP32[tmPtr+32>>2]=0;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;if(!_gmtime_r.GMTString)_gmtime_r.GMTString=allocateUTF8(\"GMT\");HEAP32[tmPtr+40>>2]=_gmtime_r.GMTString;return tmPtr}function _llvm_eh_typeid_for(type){return type}function _tzset(){if(_tzset.called)return;_tzset.called=true;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);HEAP32[__get_timezone()>>2]=stdTimezoneOffset*60;HEAP32[__get_daylight()>>2]=Number(winterOffset!=summerOffset);function extractZone(date){var match=date.toTimeString().match(/\\(([A-Za-z ]+)\\)$/);return match?match[1]:\"GMT\"}var winterName=extractZone(winter);var summerName=extractZone(summer);var winterNamePtr=allocateUTF8(winterName);var summerNamePtr=allocateUTF8(summerName);if(summerOffset<winterOffset){HEAP32[__get_tzname()>>2]=winterNamePtr;HEAP32[__get_tzname()+4>>2]=summerNamePtr}else{HEAP32[__get_tzname()>>2]=summerNamePtr;HEAP32[__get_tzname()+4>>2]=winterNamePtr}}function _localtime_r(time,tmPtr){_tzset();var date=new Date(HEAP32[time>>2]*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 start=new Date(date.getFullYear(),0,1);var yday=(date.getTime()-start.getTime())/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);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 zonePtr=HEAP32[__get_tzname()+(dst?4:0)>>2];HEAP32[tmPtr+40>>2]=zonePtr;return tmPtr}function _mktime(tmPtr){_tzset();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=(date.getTime()-start.getTime())/(1e3*60*60*24)|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();return date.getTime()/1e3|0}function _proc_exit(code){procExit(code)}function _setTempRet0(val){setTempRet0(val)}function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}function __arraySum(array,index){var sum=0;for(var i=0;i<=index;sum+=array[i++]){}return sum}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var __MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(date,days){var newDate=new Date(date.getTime());while(days>0){var leap=__isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate}function _strftime(s,maxsize,format,tm){var tm_zone=HEAP32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?UTF8ToString(tm_zone):\"\"};var pattern=UTF8ToString(format);var EXPANSION_RULES_1={\"%c\":\"%a %b %d %H:%M:%S %Y\",\"%D\":\"%m/%d/%y\",\"%F\":\"%Y-%m-%d\",\"%h\":\"%b\",\"%r\":\"%I:%M:%S %p\",\"%R\":\"%H:%M\",\"%T\":\"%H:%M:%S\",\"%x\":\"%m/%d/%y\",\"%X\":\"%H:%M:%S\",\"%Ec\":\"%c\",\"%EC\":\"%C\",\"%Ex\":\"%m/%d/%y\",\"%EX\":\"%H:%M:%S\",\"%Ey\":\"%y\",\"%EY\":\"%Y\",\"%Od\":\"%d\",\"%Oe\":\"%e\",\"%OH\":\"%H\",\"%OI\":\"%I\",\"%Om\":\"%m\",\"%OM\":\"%M\",\"%OS\":\"%S\",\"%Ou\":\"%u\",\"%OU\":\"%U\",\"%OV\":\"%V\",\"%Ow\":\"%w\",\"%OW\":\"%W\",\"%Oy\":\"%y\"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,\"g\"),EXPANSION_RULES_1[rule])}var WEEKDAYS=[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"];var MONTHS=[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"];function leadingSomething(value,digits,character){var str=typeof value===\"number\"?value.toString():value||\"\";while(str.length<digits){str=character[0]+str}return str}function leadingNulls(value,digits){return leadingSomething(value,digits,\"0\")}function compareByDay(date1,date2){function sgn(value){return value<0?-1:value>0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}else{return thisDate.getFullYear()}}else{return thisDate.getFullYear()-1}}var EXPANSION_RULES_2={\"%a\":function(date){return WEEKDAYS[date.tm_wday].substring(0,3)},\"%A\":function(date){return WEEKDAYS[date.tm_wday]},\"%b\":function(date){return MONTHS[date.tm_mon].substring(0,3)},\"%B\":function(date){return MONTHS[date.tm_mon]},\"%C\":function(date){var year=date.tm_year+1900;return leadingNulls(year/100|0,2)},\"%d\":function(date){return leadingNulls(date.tm_mday,2)},\"%e\":function(date){return leadingSomething(date.tm_mday,2,\" \")},\"%g\":function(date){return getWeekBasedYear(date).toString().substring(2)},\"%G\":function(date){return getWeekBasedYear(date)},\"%H\":function(date){return leadingNulls(date.tm_hour,2)},\"%I\":function(date){var twelveHour=date.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2)},\"%j\":function(date){return leadingNulls(date.tm_mday+__arraySum(__isLeapYear(date.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,date.tm_mon-1),3)},\"%m\":function(date){return leadingNulls(date.tm_mon+1,2)},\"%M\":function(date){return leadingNulls(date.tm_min,2)},\"%n\":function(){return\"\\n\"},\"%p\":function(date){if(date.tm_hour>=0&&date.tm_hour<12){return\"AM\"}else{return\"PM\"}},\"%S\":function(date){return leadingNulls(date.tm_sec,2)},\"%t\":function(){return\"\\t\"},\"%u\":function(date){return date.tm_wday||7},\"%U\":function(date){var janFirst=new Date(date.tm_year+1900,0,1);var firstSunday=janFirst.getDay()===0?janFirst:__addDays(janFirst,7-janFirst.getDay());var endDate=new Date(date.tm_year+1900,date.tm_mon,date.tm_mday);if(compareByDay(firstSunday,endDate)<0){var februaryFirstUntilEndMonth=__arraySum(__isLeapYear(endDate.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,endDate.getMonth()-1)-31;var firstSundayUntilEndJanuary=31-firstSunday.getDate();var days=firstSundayUntilEndJanuary+februaryFirstUntilEndMonth+endDate.getDate();return leadingNulls(Math.ceil(days/7),2)}return compareByDay(firstSunday,janFirst)===0?\"01\":\"00\"},\"%V\":function(date){var janFourthThisYear=new Date(date.tm_year+1900,0,4);var janFourthNextYear=new Date(date.tm_year+1901,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);var endDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);if(compareByDay(endDate,firstWeekStartThisYear)<0){return\"53\"}if(compareByDay(firstWeekStartNextYear,endDate)<=0){return\"01\"}var daysDifference;if(firstWeekStartThisYear.getFullYear()<date.tm_year+1900){daysDifference=date.tm_yday+32-firstWeekStartThisYear.getDate()}else{daysDifference=date.tm_yday+1-firstWeekStartThisYear.getDate()}return leadingNulls(Math.ceil(daysDifference/7),2)},\"%w\":function(date){return date.tm_wday},\"%W\":function(date){var janFirst=new Date(date.tm_year,0,1);var firstMonday=janFirst.getDay()===1?janFirst:__addDays(janFirst,janFirst.getDay()===0?1:7-janFirst.getDay()+1);var endDate=new Date(date.tm_year+1900,date.tm_mon,date.tm_mday);if(compareByDay(firstMonday,endDate)<0){var februaryFirstUntilEndMonth=__arraySum(__isLeapYear(endDate.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,endDate.getMonth()-1)-31;var firstMondayUntilEndJanuary=31-firstMonday.getDate();var days=firstMondayUntilEndJanuary+februaryFirstUntilEndMonth+endDate.getDate();return leadingNulls(Math.ceil(days/7),2)}return compareByDay(firstMonday,janFirst)===0?\"01\":\"00\"},\"%y\":function(date){return(date.tm_year+1900).toString().substring(2)},\"%Y\":function(date){return date.tm_year+1900},\"%z\":function(date){var off=date.tm_gmtoff;var ahead=off>=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?\"+\":\"-\")+String(\"0000\"+off).slice(-4)},\"%Z\":function(date){return date.tm_zone},\"%%\":function(){return\"%\"}};for(var rule in EXPANSION_RULES_2){if(pattern.includes(rule)){pattern=pattern.replace(new RegExp(rule,\"g\"),EXPANSION_RULES_2[rule](date))}}var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1}function _strftime_l(s,maxsize,format,tm){return _strftime(s,maxsize,format,tm)}Module[\"requestFullscreen\"]=function Module_requestFullscreen(lockPointer,resizeCanvas){Browser.requestFullscreen(lockPointer,resizeCanvas)};Module[\"requestFullScreen\"]=function Module_requestFullScreen(){Browser.requestFullScreen()};Module[\"requestAnimationFrame\"]=function Module_requestAnimationFrame(func){Browser.requestAnimationFrame(func)};Module[\"setCanvasSize\"]=function Module_setCanvasSize(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates)};Module[\"pauseMainLoop\"]=function Module_pauseMainLoop(){Browser.mainLoop.pause()};Module[\"resumeMainLoop\"]=function Module_resumeMainLoop(){Browser.mainLoop.resume()};Module[\"getUserMedia\"]=function Module_getUserMedia(){Browser.getUserMedia()};Module[\"createContext\"]=function Module_createContext(canvas,useWebGL,setInModule,webGLContextAttributes){return Browser.createContext(canvas,useWebGL,setInModule,webGLContextAttributes)};var FSNode=function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev};var readMode=292|73;var writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}});FS.FSNode=FSNode;FS.staticInit();Module[\"FS_createPath\"]=FS.createPath;Module[\"FS_createDataFile\"]=FS.createDataFile;Module[\"FS_createPreloadedFile\"]=FS.createPreloadedFile;Module[\"FS_createLazyFile\"]=FS.createLazyFile;Module[\"FS_createDevice\"]=FS.createDevice;Module[\"FS_unlink\"]=FS.unlink;init_emval();PureVirtualError=Module[\"PureVirtualError\"]=extendError(Error,\"PureVirtualError\");embind_init_charCodes();init_embind();BindingError=Module[\"BindingError\"]=extendError(Error,\"BindingError\");InternalError=Module[\"InternalError\"]=extendError(Error,\"InternalError\");init_ClassHandle();init_RegisteredPointer();UnboundTypeError=Module[\"UnboundTypeError\"]=extendError(Error,\"UnboundTypeError\");var GLctx;for(var i=0;i<32;++i)tempFixedLengthArray.push(new Array(i));var miniTempWebGLFloatBuffersStorage=new Float32Array(288);for(var i=0;i<288;++i){miniTempWebGLFloatBuffers[i]=miniTempWebGLFloatBuffersStorage.subarray(0,i+1)}var __miniTempWebGLIntBuffersStorage=new Int32Array(288);for(var i=0;i<288;++i){__miniTempWebGLIntBuffers[i]=__miniTempWebGLIntBuffersStorage.subarray(0,i+1)}var ASSERTIONS=true;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 decodeBase64=typeof atob===\"function\"?atob:function(input){var keyStr=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";var output=\"\";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\\+\\/\\=]/g,\"\");do{enc1=keyStr.indexOf(input.charAt(i++));enc2=keyStr.indexOf(input.charAt(i++));enc3=keyStr.indexOf(input.charAt(i++));enc4=keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2)}if(enc4!==64){output=output+String.fromCharCode(chr3)}}while(i<input.length);return output};function intArrayFromBase64(s){if(typeof ENVIRONMENT_IS_NODE===\"boolean\"&&ENVIRONMENT_IS_NODE){var buf=Buffer.from(s,\"base64\");return new Uint8Array(buf[\"buffer\"],buf[\"byteOffset\"],buf[\"byteLength\"])}try{var decoded=decodeBase64(s);var bytes=new Uint8Array(decoded.length);for(var i=0;i<decoded.length;++i){bytes[i]=decoded.charCodeAt(i)}return bytes}catch(_){throw new Error(\"Converting base64 string to bytes failed.\")}}var asmLibraryArg={\"HaveOffsetConverter\":HaveOffsetConverter,\"__cxa_allocate_exception\":___cxa_allocate_exception,\"__cxa_atexit\":___cxa_atexit,\"__cxa_begin_catch\":___cxa_begin_catch,\"__cxa_end_catch\":___cxa_end_catch,\"__cxa_find_matching_catch_2\":___cxa_find_matching_catch_2,\"__cxa_find_matching_catch_3\":___cxa_find_matching_catch_3,\"__cxa_free_exception\":___cxa_free_exception,\"__cxa_rethrow\":___cxa_rethrow,\"__cxa_thread_atexit\":___cxa_thread_atexit,\"__cxa_throw\":___cxa_throw,\"__resumeException\":___resumeException,\"__sys_fcntl64\":___sys_fcntl64,\"__sys_ioctl\":___sys_ioctl,\"__sys_mmap2\":___sys_mmap2,\"__sys_open\":___sys_open,\"__sys_stat64\":___sys_stat64,\"_embind_create_inheriting_constructor\":__embind_create_inheriting_constructor,\"_embind_finalize_value_object\":__embind_finalize_value_object,\"_embind_register_bigint\":__embind_register_bigint,\"_embind_register_bool\":__embind_register_bool,\"_embind_register_class\":__embind_register_class,\"_embind_register_class_class_function\":__embind_register_class_class_function,\"_embind_register_class_constructor\":__embind_register_class_constructor,\"_embind_register_class_function\":__embind_register_class_function,\"_embind_register_class_property\":__embind_register_class_property,\"_embind_register_emval\":__embind_register_emval,\"_embind_register_float\":__embind_register_float,\"_embind_register_function\":__embind_register_function,\"_embind_register_integer\":__embind_register_integer,\"_embind_register_memory_view\":__embind_register_memory_view,\"_embind_register_std_string\":__embind_register_std_string,\"_embind_register_std_wstring\":__embind_register_std_wstring,\"_embind_register_value_object\":__embind_register_value_object,\"_embind_register_value_object_field\":__embind_register_value_object_field,\"_embind_register_void\":__embind_register_void,\"_emval_call_void_method\":__emval_call_void_method,\"_emval_decref\":__emval_decref,\"_emval_get_method_caller\":__emval_get_method_caller,\"_emval_incref\":__emval_incref,\"_emval_take_value\":__emval_take_value,\"abort\":_abort,\"clock_gettime\":_clock_gettime,\"dlopen\":_dlopen,\"dlsym\":_dlsym,\"emscripten_asm_const_int\":_emscripten_asm_const_int,\"emscripten_get_heap_max\":_emscripten_get_heap_max,\"emscripten_memcpy_big\":_emscripten_memcpy_big,\"emscripten_pc_get_function\":_emscripten_pc_get_function,\"emscripten_resize_heap\":_emscripten_resize_heap,\"emscripten_stack_snapshot\":_emscripten_stack_snapshot,\"emscripten_stack_unwind_buffer\":_emscripten_stack_unwind_buffer,\"emscripten_thread_sleep\":_emscripten_thread_sleep,\"emscripten_webgl_create_context\":_emscripten_webgl_create_context,\"emscripten_webgl_destroy_context\":_emscripten_webgl_destroy_context,\"emscripten_webgl_get_context_attributes\":_emscripten_webgl_get_context_attributes,\"emscripten_webgl_get_current_context\":_emscripten_webgl_get_current_context,\"emscripten_webgl_init_context_attributes\":_emscripten_webgl_init_context_attributes,\"emscripten_webgl_make_context_current\":_emscripten_webgl_make_context_current,\"environ_get\":_environ_get,\"environ_sizes_get\":_environ_sizes_get,\"exit\":_exit,\"fd_close\":_fd_close,\"fd_read\":_fd_read,\"fd_seek\":_fd_seek,\"fd_write\":_fd_write,\"getTempRet0\":_getTempRet0,\"getentropy\":_getentropy,\"glActiveTexture\":_glActiveTexture,\"glAttachShader\":_glAttachShader,\"glBindAttribLocation\":_glBindAttribLocation,\"glBindBuffer\":_glBindBuffer,\"glBindBufferBase\":_glBindBufferBase,\"glBindFramebuffer\":_glBindFramebuffer,\"glBindTexture\":_glBindTexture,\"glBindVertexArray\":_glBindVertexArray,\"glBufferData\":_glBufferData,\"glClientWaitSync\":_glClientWaitSync,\"glCompileShader\":_glCompileShader,\"glCreateProgram\":_glCreateProgram,\"glCreateShader\":_glCreateShader,\"glDeleteBuffers\":_glDeleteBuffers,\"glDeleteFramebuffers\":_glDeleteFramebuffers,\"glDeleteProgram\":_glDeleteProgram,\"glDeleteShader\":_glDeleteShader,\"glDeleteSync\":_glDeleteSync,\"glDeleteTextures\":_glDeleteTextures,\"glDeleteVertexArrays\":_glDeleteVertexArrays,\"glDisable\":_glDisable,\"glDisableVertexAttribArray\":_glDisableVertexAttribArray,\"glDrawArrays\":_glDrawArrays,\"glDrawBuffers\":_glDrawBuffers,\"glEnableVertexAttribArray\":_glEnableVertexAttribArray,\"glFenceSync\":_glFenceSync,\"glFinish\":_glFinish,\"glFlush\":_glFlush,\"glFramebufferTexture2D\":_glFramebufferTexture2D,\"glFramebufferTextureLayer\":_glFramebufferTextureLayer,\"glGenBuffers\":_glGenBuffers,\"glGenFramebuffers\":_glGenFramebuffers,\"glGenTextures\":_glGenTextures,\"glGenVertexArrays\":_glGenVertexArrays,\"glGetAttribLocation\":_glGetAttribLocation,\"glGetError\":_glGetError,\"glGetFramebufferAttachmentParameteriv\":_glGetFramebufferAttachmentParameteriv,\"glGetIntegerv\":_glGetIntegerv,\"glGetString\":_glGetString,\"glGetUniformBlockIndex\":_glGetUniformBlockIndex,\"glGetUniformLocation\":_glGetUniformLocation,\"glLinkProgram\":_glLinkProgram,\"glPixelStorei\":_glPixelStorei,\"glReadPixels\":_glReadPixels,\"glShaderSource\":_glShaderSource,\"glTexImage2D\":_glTexImage2D,\"glTexParameterfv\":_glTexParameterfv,\"glTexParameteri\":_glTexParameteri,\"glTexStorage2D\":_glTexStorage2D,\"glTexStorage3D\":_glTexStorage3D,\"glTexSubImage2D\":_glTexSubImage2D,\"glTexSubImage3D\":_glTexSubImage3D,\"glUniform1f\":_glUniform1f,\"glUniform1i\":_glUniform1i,\"glUniform2fv\":_glUniform2fv,\"glUniform4fv\":_glUniform4fv,\"glUniform4iv\":_glUniform4iv,\"glUniformBlockBinding\":_glUniformBlockBinding,\"glUniformMatrix4fv\":_glUniformMatrix4fv,\"glUseProgram\":_glUseProgram,\"glVertexAttribPointer\":_glVertexAttribPointer,\"glViewport\":_glViewport,\"gmtime_r\":_gmtime_r,\"invoke_diii\":invoke_diii,\"invoke_i\":invoke_i,\"invoke_ii\":invoke_ii,\"invoke_iii\":invoke_iii,\"invoke_iiii\":invoke_iiii,\"invoke_iiiii\":invoke_iiiii,\"invoke_iiiiii\":invoke_iiiiii,\"invoke_iiiiiii\":invoke_iiiiiii,\"invoke_iiiiiiiddi\":invoke_iiiiiiiddi,\"invoke_iiiiiiii\":invoke_iiiiiiii,\"invoke_iiiiiiiii\":invoke_iiiiiiiii,\"invoke_iiiiiiiiii\":invoke_iiiiiiiiii,\"invoke_v\":invoke_v,\"invoke_vdiii\":invoke_vdiii,\"invoke_vi\":invoke_vi,\"invoke_vididdii\":invoke_vididdii,\"invoke_vidii\":invoke_vidii,\"invoke_vii\":invoke_vii,\"invoke_viid\":invoke_viid,\"invoke_viidi\":invoke_viidi,\"invoke_viididii\":invoke_viididii,\"invoke_viii\":invoke_viii,\"invoke_viiid\":invoke_viiid,\"invoke_viiidd\":invoke_viiidd,\"invoke_viiiddi\":invoke_viiiddi,\"invoke_viiidi\":invoke_viiidi,\"invoke_viiii\":invoke_viiii,\"invoke_viiiid\":invoke_viiiid,\"invoke_viiiidi\":invoke_viiiidi,\"invoke_viiiidid\":invoke_viiiidid,\"invoke_viiiidiidiiiiiii\":invoke_viiiidiidiiiiiii,\"invoke_viiiifiifiiiiiii\":invoke_viiiifiifiiiiiii,\"invoke_viiiii\":invoke_viiiii,\"invoke_viiiiid\":invoke_viiiiid,\"invoke_viiiiif\":invoke_viiiiif,\"invoke_viiiiii\":invoke_viiiiii,\"invoke_viiiiiid\":invoke_viiiiiid,\"invoke_viiiiiif\":invoke_viiiiiif,\"invoke_viiiiiii\":invoke_viiiiiii,\"invoke_viiiiiiiddi\":invoke_viiiiiiiddi,\"invoke_viiiiiiidiiii\":invoke_viiiiiiidiiii,\"invoke_viiiiiiifiiii\":invoke_viiiiiiifiiii,\"invoke_viiiiiiii\":invoke_viiiiiiii,\"invoke_viiiiiiiidd\":invoke_viiiiiiiidd,\"invoke_viiiiiiiidf\":invoke_viiiiiiiidf,\"invoke_viiiiiiiii\":invoke_viiiiiiiii,\"invoke_viiiiiiiiidd\":invoke_viiiiiiiiidd,\"invoke_viiiiiiiiiddi\":invoke_viiiiiiiiiddi,\"invoke_viiiiiiiiii\":invoke_viiiiiiiiii,\"invoke_viiiiiiiiiiddi\":invoke_viiiiiiiiiiddi,\"invoke_viiiiiiiiiii\":invoke_viiiiiiiiiii,\"invoke_viiiiiiiiiiii\":invoke_viiiiiiiiiiii,\"invoke_viiiiiiiiiiiii\":invoke_viiiiiiiiiiiii,\"llvm_eh_typeid_for\":_llvm_eh_typeid_for,\"localtime_r\":_localtime_r,\"mktime\":_mktime,\"proc_exit\":_proc_exit,\"setTempRet0\":_setTempRet0,\"strftime\":_strftime,\"strftime_l\":_strftime_l};var asm=createWasm();var ___wasm_call_ctors=Module[\"___wasm_call_ctors\"]=createExportWrapper(\"__wasm_call_ctors\");var _free=Module[\"_free\"]=createExportWrapper(\"free\");var _malloc=Module[\"_malloc\"]=createExportWrapper(\"malloc\");var ___errno_location=Module[\"___errno_location\"]=createExportWrapper(\"__errno_location\");var _fflush=Module[\"_fflush\"]=createExportWrapper(\"fflush\");var ___getTypeName=Module[\"___getTypeName\"]=createExportWrapper(\"__getTypeName\");var ___embind_register_native_and_builtin_types=Module[\"___embind_register_native_and_builtin_types\"]=createExportWrapper(\"__embind_register_native_and_builtin_types\");var _emscripten_main_thread_process_queued_calls=Module[\"_emscripten_main_thread_process_queued_calls\"]=createExportWrapper(\"emscripten_main_thread_process_queued_calls\");var _emscripten_stack_get_end=Module[\"_emscripten_stack_get_end\"]=function(){return(_emscripten_stack_get_end=Module[\"_emscripten_stack_get_end\"]=Module[\"asm\"][\"emscripten_stack_get_end\"]).apply(null,arguments)};var __get_tzname=Module[\"__get_tzname\"]=createExportWrapper(\"_get_tzname\");var __get_daylight=Module[\"__get_daylight\"]=createExportWrapper(\"_get_daylight\");var __get_timezone=Module[\"__get_timezone\"]=createExportWrapper(\"_get_timezone\");var stackSave=Module[\"stackSave\"]=createExportWrapper(\"stackSave\");var stackRestore=Module[\"stackRestore\"]=createExportWrapper(\"stackRestore\");var stackAlloc=Module[\"stackAlloc\"]=createExportWrapper(\"stackAlloc\");var _emscripten_stack_init=Module[\"_emscripten_stack_init\"]=function(){return(_emscripten_stack_init=Module[\"_emscripten_stack_init\"]=Module[\"asm\"][\"emscripten_stack_init\"]).apply(null,arguments)};var _emscripten_stack_get_free=Module[\"_emscripten_stack_get_free\"]=function(){return(_emscripten_stack_get_free=Module[\"_emscripten_stack_get_free\"]=Module[\"asm\"][\"emscripten_stack_get_free\"]).apply(null,arguments)};var _saveSetjmp=Module[\"_saveSetjmp\"]=createExportWrapper(\"saveSetjmp\");var _setThrew=Module[\"_setThrew\"]=createExportWrapper(\"setThrew\");var ___cxa_can_catch=Module[\"___cxa_can_catch\"]=createExportWrapper(\"__cxa_can_catch\");var ___cxa_is_pointer_type=Module[\"___cxa_is_pointer_type\"]=createExportWrapper(\"__cxa_is_pointer_type\");var _memalign=Module[\"_memalign\"]=createExportWrapper(\"memalign\");var _emscripten_builtin_malloc=Module[\"_emscripten_builtin_malloc\"]=createExportWrapper(\"emscripten_builtin_malloc\");var _emscripten_builtin_free=Module[\"_emscripten_builtin_free\"]=createExportWrapper(\"emscripten_builtin_free\");var _emscripten_builtin_memalign=Module[\"_emscripten_builtin_memalign\"]=createExportWrapper(\"emscripten_builtin_memalign\");var dynCall_jii=Module[\"dynCall_jii\"]=createExportWrapper(\"dynCall_jii\");var dynCall_viji=Module[\"dynCall_viji\"]=createExportWrapper(\"dynCall_viji\");var dynCall_jjj=Module[\"dynCall_jjj\"]=createExportWrapper(\"dynCall_jjj\");var dynCall_jiii=Module[\"dynCall_jiii\"]=createExportWrapper(\"dynCall_jiii\");var dynCall_iiiijj=Module[\"dynCall_iiiijj\"]=createExportWrapper(\"dynCall_iiiijj\");var dynCall_viijj=Module[\"dynCall_viijj\"]=createExportWrapper(\"dynCall_viijj\");var dynCall_viiijjjj=Module[\"dynCall_viiijjjj\"]=createExportWrapper(\"dynCall_viiijjjj\");var dynCall_ji=Module[\"dynCall_ji\"]=createExportWrapper(\"dynCall_ji\");var dynCall_vij=Module[\"dynCall_vij\"]=createExportWrapper(\"dynCall_vij\");var dynCall_viijii=Module[\"dynCall_viijii\"]=createExportWrapper(\"dynCall_viijii\");var dynCall_vj=Module[\"dynCall_vj\"]=createExportWrapper(\"dynCall_vj\");var dynCall_viij=Module[\"dynCall_viij\"]=createExportWrapper(\"dynCall_viij\");var dynCall_viiiiij=Module[\"dynCall_viiiiij\"]=createExportWrapper(\"dynCall_viiiiij\");var dynCall_iijjiiii=Module[\"dynCall_iijjiiii\"]=createExportWrapper(\"dynCall_iijjiiii\");var dynCall_jiji=Module[\"dynCall_jiji\"]=createExportWrapper(\"dynCall_jiji\");var dynCall_iiiiij=Module[\"dynCall_iiiiij\"]=createExportWrapper(\"dynCall_iiiiij\");var dynCall_iiiiijj=Module[\"dynCall_iiiiijj\"]=createExportWrapper(\"dynCall_iiiiijj\");var dynCall_iiiiiijj=Module[\"dynCall_iiiiiijj\"]=createExportWrapper(\"dynCall_iiiiiijj\");function invoke_viid(index,a1,a2,a3){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_vi(index,a1){var sp=stackSave();try{wasmTable.get(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iii(index,a1,a2){var sp=stackSave();try{return wasmTable.get(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_v(index){var sp=stackSave();try{wasmTable.get(index)()}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_vii(index,a1,a2){var sp=stackSave();try{wasmTable.get(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_ii(index,a1){var sp=stackSave();try{return wasmTable.get(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viii(index,a1,a2,a3){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiii(index,a1,a2,a3,a4){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiii(index,a1,a2,a3,a4){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiidd(index,a1,a2,a3,a4,a5){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiiiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_diii(index,a1,a2,a3){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiii(index,a1,a2,a3){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiidd(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiddi(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiddi(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_i(index){var sp=stackSave();try{return wasmTable.get(index)()}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiidi(index,a1,a2,a3,a4,a5){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiidi(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viididii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiidf(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiidd(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiid(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiid(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiidiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiif(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiif(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiifiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiifiifiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiidiidiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_vididdii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiid(index,a1,a2,a3,a4){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_vidii(index,a1,a2,a3,a4){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiiddi(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiiiiiddi(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_iiiiiiiddi(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiid(index,a1,a2,a3,a4,a5){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viiiidid(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_viidi(index,a1,a2,a3,a4){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}function invoke_vdiii(index,a1,a2,a3,a4){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!==\"longjmp\")throw e;_setThrew(1,0)}}if(!Object.getOwnPropertyDescriptor(Module,\"intArrayFromString\"))Module[\"intArrayFromString\"]=function(){abort(\"'intArrayFromString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"intArrayToString\"))Module[\"intArrayToString\"]=function(){abort(\"'intArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ccall\"))Module[\"ccall\"]=function(){abort(\"'ccall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"cwrap\"))Module[\"cwrap\"]=function(){abort(\"'cwrap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setValue\"))Module[\"setValue\"]=function(){abort(\"'setValue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getValue\"))Module[\"getValue\"]=function(){abort(\"'getValue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"allocate\"))Module[\"allocate\"]=function(){abort(\"'allocate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UTF8ArrayToString\"))Module[\"UTF8ArrayToString\"]=function(){abort(\"'UTF8ArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UTF8ToString\"))Module[\"UTF8ToString\"]=function(){abort(\"'UTF8ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToUTF8Array\"))Module[\"stringToUTF8Array\"]=function(){abort(\"'stringToUTF8Array' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToUTF8\"))Module[\"stringToUTF8\"]=function(){abort(\"'stringToUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"lengthBytesUTF8\"))Module[\"lengthBytesUTF8\"]=function(){abort(\"'lengthBytesUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stackTrace\"))Module[\"stackTrace\"]=function(){abort(\"'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addOnPreRun\"))Module[\"addOnPreRun\"]=function(){abort(\"'addOnPreRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addOnInit\"))Module[\"addOnInit\"]=function(){abort(\"'addOnInit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addOnPreMain\"))Module[\"addOnPreMain\"]=function(){abort(\"'addOnPreMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addOnExit\"))Module[\"addOnExit\"]=function(){abort(\"'addOnExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addOnPostRun\"))Module[\"addOnPostRun\"]=function(){abort(\"'addOnPostRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeStringToMemory\"))Module[\"writeStringToMemory\"]=function(){abort(\"'writeStringToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeArrayToMemory\"))Module[\"writeArrayToMemory\"]=function(){abort(\"'writeArrayToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeAsciiToMemory\"))Module[\"writeAsciiToMemory\"]=function(){abort(\"'writeAsciiToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};Module[\"addRunDependency\"]=addRunDependency;Module[\"removeRunDependency\"]=removeRunDependency;if(!Object.getOwnPropertyDescriptor(Module,\"FS_createFolder\"))Module[\"FS_createFolder\"]=function(){abort(\"'FS_createFolder' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};Module[\"FS_createPath\"]=FS.createPath;Module[\"FS_createDataFile\"]=FS.createDataFile;Module[\"FS_createPreloadedFile\"]=FS.createPreloadedFile;Module[\"FS_createLazyFile\"]=FS.createLazyFile;if(!Object.getOwnPropertyDescriptor(Module,\"FS_createLink\"))Module[\"FS_createLink\"]=function(){abort(\"'FS_createLink' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};Module[\"FS_createDevice\"]=FS.createDevice;Module[\"FS_unlink\"]=FS.unlink;if(!Object.getOwnPropertyDescriptor(Module,\"getLEB\"))Module[\"getLEB\"]=function(){abort(\"'getLEB' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getFunctionTables\"))Module[\"getFunctionTables\"]=function(){abort(\"'getFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"alignFunctionTables\"))Module[\"alignFunctionTables\"]=function(){abort(\"'alignFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerFunctions\"))Module[\"registerFunctions\"]=function(){abort(\"'registerFunctions' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"addFunction\"))Module[\"addFunction\"]=function(){abort(\"'addFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"removeFunction\"))Module[\"removeFunction\"]=function(){abort(\"'removeFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getFuncWrapper\"))Module[\"getFuncWrapper\"]=function(){abort(\"'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"prettyPrint\"))Module[\"prettyPrint\"]=function(){abort(\"'prettyPrint' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"dynCall\"))Module[\"dynCall\"]=function(){abort(\"'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getCompilerSetting\"))Module[\"getCompilerSetting\"]=function(){abort(\"'getCompilerSetting' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"print\"))Module[\"print\"]=function(){abort(\"'print' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"printErr\"))Module[\"printErr\"]=function(){abort(\"'printErr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getTempRet0\"))Module[\"getTempRet0\"]=function(){abort(\"'getTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setTempRet0\"))Module[\"setTempRet0\"]=function(){abort(\"'setTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"callMain\"))Module[\"callMain\"]=function(){abort(\"'callMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"abort\"))Module[\"abort\"]=function(){abort(\"'abort' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"keepRuntimeAlive\"))Module[\"keepRuntimeAlive\"]=function(){abort(\"'keepRuntimeAlive' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"zeroMemory\"))Module[\"zeroMemory\"]=function(){abort(\"'zeroMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToNewUTF8\"))Module[\"stringToNewUTF8\"]=function(){abort(\"'stringToNewUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setFileTime\"))Module[\"setFileTime\"]=function(){abort(\"'setFileTime' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscripten_realloc_buffer\"))Module[\"emscripten_realloc_buffer\"]=function(){abort(\"'emscripten_realloc_buffer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ENV\"))Module[\"ENV\"]=function(){abort(\"'ENV' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ERRNO_CODES\"))Module[\"ERRNO_CODES\"]=function(){abort(\"'ERRNO_CODES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ERRNO_MESSAGES\"))Module[\"ERRNO_MESSAGES\"]=function(){abort(\"'ERRNO_MESSAGES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setErrNo\"))Module[\"setErrNo\"]=function(){abort(\"'setErrNo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"inetPton4\"))Module[\"inetPton4\"]=function(){abort(\"'inetPton4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"inetNtop4\"))Module[\"inetNtop4\"]=function(){abort(\"'inetNtop4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"inetPton6\"))Module[\"inetPton6\"]=function(){abort(\"'inetPton6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"inetNtop6\"))Module[\"inetNtop6\"]=function(){abort(\"'inetNtop6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readSockaddr\"))Module[\"readSockaddr\"]=function(){abort(\"'readSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeSockaddr\"))Module[\"writeSockaddr\"]=function(){abort(\"'writeSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"DNS\"))Module[\"DNS\"]=function(){abort(\"'DNS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getHostByName\"))Module[\"getHostByName\"]=function(){abort(\"'getHostByName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"GAI_ERRNO_MESSAGES\"))Module[\"GAI_ERRNO_MESSAGES\"]=function(){abort(\"'GAI_ERRNO_MESSAGES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"Protocols\"))Module[\"Protocols\"]=function(){abort(\"'Protocols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"Sockets\"))Module[\"Sockets\"]=function(){abort(\"'Sockets' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getRandomDevice\"))Module[\"getRandomDevice\"]=function(){abort(\"'getRandomDevice' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"traverseStack\"))Module[\"traverseStack\"]=function(){abort(\"'traverseStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UNWIND_CACHE\"))Module[\"UNWIND_CACHE\"]=function(){abort(\"'UNWIND_CACHE' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"withBuiltinMalloc\"))Module[\"withBuiltinMalloc\"]=function(){abort(\"'withBuiltinMalloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readAsmConstArgsArray\"))Module[\"readAsmConstArgsArray\"]=function(){abort(\"'readAsmConstArgsArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readAsmConstArgs\"))Module[\"readAsmConstArgs\"]=function(){abort(\"'readAsmConstArgs' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"mainThreadEM_ASM\"))Module[\"mainThreadEM_ASM\"]=function(){abort(\"'mainThreadEM_ASM' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"jstoi_q\"))Module[\"jstoi_q\"]=function(){abort(\"'jstoi_q' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"jstoi_s\"))Module[\"jstoi_s\"]=function(){abort(\"'jstoi_s' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getExecutableName\"))Module[\"getExecutableName\"]=function(){abort(\"'getExecutableName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"listenOnce\"))Module[\"listenOnce\"]=function(){abort(\"'listenOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"autoResumeAudioContext\"))Module[\"autoResumeAudioContext\"]=function(){abort(\"'autoResumeAudioContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"dynCallLegacy\"))Module[\"dynCallLegacy\"]=function(){abort(\"'dynCallLegacy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getDynCaller\"))Module[\"getDynCaller\"]=function(){abort(\"'getDynCaller' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"dynCall\"))Module[\"dynCall\"]=function(){abort(\"'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"callRuntimeCallbacks\"))Module[\"callRuntimeCallbacks\"]=function(){abort(\"'callRuntimeCallbacks' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"handleException\"))Module[\"handleException\"]=function(){abort(\"'handleException' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"runtimeKeepalivePush\"))Module[\"runtimeKeepalivePush\"]=function(){abort(\"'runtimeKeepalivePush' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"runtimeKeepalivePop\"))Module[\"runtimeKeepalivePop\"]=function(){abort(\"'runtimeKeepalivePop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"callUserCallback\"))Module[\"callUserCallback\"]=function(){abort(\"'callUserCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"maybeExit\"))Module[\"maybeExit\"]=function(){abort(\"'maybeExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"safeSetTimeout\"))Module[\"safeSetTimeout\"]=function(){abort(\"'safeSetTimeout' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"asmjsMangle\"))Module[\"asmjsMangle\"]=function(){abort(\"'asmjsMangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"asyncLoad\"))Module[\"asyncLoad\"]=function(){abort(\"'asyncLoad' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"alignMemory\"))Module[\"alignMemory\"]=function(){abort(\"'alignMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"mmapAlloc\"))Module[\"mmapAlloc\"]=function(){abort(\"'mmapAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"reallyNegative\"))Module[\"reallyNegative\"]=function(){abort(\"'reallyNegative' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"unSign\"))Module[\"unSign\"]=function(){abort(\"'unSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"reSign\"))Module[\"reSign\"]=function(){abort(\"'reSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"formatString\"))Module[\"formatString\"]=function(){abort(\"'formatString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"PATH\"))Module[\"PATH\"]=function(){abort(\"'PATH' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"PATH_FS\"))Module[\"PATH_FS\"]=function(){abort(\"'PATH_FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SYSCALLS\"))Module[\"SYSCALLS\"]=function(){abort(\"'SYSCALLS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"syscallMmap2\"))Module[\"syscallMmap2\"]=function(){abort(\"'syscallMmap2' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"syscallMunmap\"))Module[\"syscallMunmap\"]=function(){abort(\"'syscallMunmap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getSocketFromFD\"))Module[\"getSocketFromFD\"]=function(){abort(\"'getSocketFromFD' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getSocketAddress\"))Module[\"getSocketAddress\"]=function(){abort(\"'getSocketAddress' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"JSEvents\"))Module[\"JSEvents\"]=function(){abort(\"'JSEvents' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerKeyEventCallback\"))Module[\"registerKeyEventCallback\"]=function(){abort(\"'registerKeyEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"specialHTMLTargets\"))Module[\"specialHTMLTargets\"]=function(){abort(\"'specialHTMLTargets' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"findEventTarget\"))Module[\"findEventTarget\"]=function(){abort(\"'findEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"findCanvasEventTarget\"))Module[\"findCanvasEventTarget\"]=function(){abort(\"'findCanvasEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getBoundingClientRect\"))Module[\"getBoundingClientRect\"]=function(){abort(\"'getBoundingClientRect' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillMouseEventData\"))Module[\"fillMouseEventData\"]=function(){abort(\"'fillMouseEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerMouseEventCallback\"))Module[\"registerMouseEventCallback\"]=function(){abort(\"'registerMouseEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerWheelEventCallback\"))Module[\"registerWheelEventCallback\"]=function(){abort(\"'registerWheelEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerUiEventCallback\"))Module[\"registerUiEventCallback\"]=function(){abort(\"'registerUiEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerFocusEventCallback\"))Module[\"registerFocusEventCallback\"]=function(){abort(\"'registerFocusEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillDeviceOrientationEventData\"))Module[\"fillDeviceOrientationEventData\"]=function(){abort(\"'fillDeviceOrientationEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerDeviceOrientationEventCallback\"))Module[\"registerDeviceOrientationEventCallback\"]=function(){abort(\"'registerDeviceOrientationEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillDeviceMotionEventData\"))Module[\"fillDeviceMotionEventData\"]=function(){abort(\"'fillDeviceMotionEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerDeviceMotionEventCallback\"))Module[\"registerDeviceMotionEventCallback\"]=function(){abort(\"'registerDeviceMotionEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"screenOrientation\"))Module[\"screenOrientation\"]=function(){abort(\"'screenOrientation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillOrientationChangeEventData\"))Module[\"fillOrientationChangeEventData\"]=function(){abort(\"'fillOrientationChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerOrientationChangeEventCallback\"))Module[\"registerOrientationChangeEventCallback\"]=function(){abort(\"'registerOrientationChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillFullscreenChangeEventData\"))Module[\"fillFullscreenChangeEventData\"]=function(){abort(\"'fillFullscreenChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerFullscreenChangeEventCallback\"))Module[\"registerFullscreenChangeEventCallback\"]=function(){abort(\"'registerFullscreenChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerRestoreOldStyle\"))Module[\"registerRestoreOldStyle\"]=function(){abort(\"'registerRestoreOldStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"hideEverythingExceptGivenElement\"))Module[\"hideEverythingExceptGivenElement\"]=function(){abort(\"'hideEverythingExceptGivenElement' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"restoreHiddenElements\"))Module[\"restoreHiddenElements\"]=function(){abort(\"'restoreHiddenElements' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setLetterbox\"))Module[\"setLetterbox\"]=function(){abort(\"'setLetterbox' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"currentFullscreenStrategy\"))Module[\"currentFullscreenStrategy\"]=function(){abort(\"'currentFullscreenStrategy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"restoreOldWindowedStyle\"))Module[\"restoreOldWindowedStyle\"]=function(){abort(\"'restoreOldWindowedStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"softFullscreenResizeWebGLRenderTarget\"))Module[\"softFullscreenResizeWebGLRenderTarget\"]=function(){abort(\"'softFullscreenResizeWebGLRenderTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"doRequestFullscreen\"))Module[\"doRequestFullscreen\"]=function(){abort(\"'doRequestFullscreen' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillPointerlockChangeEventData\"))Module[\"fillPointerlockChangeEventData\"]=function(){abort(\"'fillPointerlockChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerPointerlockChangeEventCallback\"))Module[\"registerPointerlockChangeEventCallback\"]=function(){abort(\"'registerPointerlockChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerPointerlockErrorEventCallback\"))Module[\"registerPointerlockErrorEventCallback\"]=function(){abort(\"'registerPointerlockErrorEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"requestPointerLock\"))Module[\"requestPointerLock\"]=function(){abort(\"'requestPointerLock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillVisibilityChangeEventData\"))Module[\"fillVisibilityChangeEventData\"]=function(){abort(\"'fillVisibilityChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerVisibilityChangeEventCallback\"))Module[\"registerVisibilityChangeEventCallback\"]=function(){abort(\"'registerVisibilityChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerTouchEventCallback\"))Module[\"registerTouchEventCallback\"]=function(){abort(\"'registerTouchEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillGamepadEventData\"))Module[\"fillGamepadEventData\"]=function(){abort(\"'fillGamepadEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerGamepadEventCallback\"))Module[\"registerGamepadEventCallback\"]=function(){abort(\"'registerGamepadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerBeforeUnloadEventCallback\"))Module[\"registerBeforeUnloadEventCallback\"]=function(){abort(\"'registerBeforeUnloadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"fillBatteryEventData\"))Module[\"fillBatteryEventData\"]=function(){abort(\"'fillBatteryEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"battery\"))Module[\"battery\"]=function(){abort(\"'battery' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerBatteryEventCallback\"))Module[\"registerBatteryEventCallback\"]=function(){abort(\"'registerBatteryEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setCanvasElementSize\"))Module[\"setCanvasElementSize\"]=function(){abort(\"'setCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getCanvasElementSize\"))Module[\"getCanvasElementSize\"]=function(){abort(\"'getCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"polyfillSetImmediate\"))Module[\"polyfillSetImmediate\"]=function(){abort(\"'polyfillSetImmediate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"demangle\"))Module[\"demangle\"]=function(){abort(\"'demangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"demangleAll\"))Module[\"demangleAll\"]=function(){abort(\"'demangleAll' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"jsStackTrace\"))Module[\"jsStackTrace\"]=function(){abort(\"'jsStackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stackTrace\"))Module[\"stackTrace\"]=function(){abort(\"'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getEnvStrings\"))Module[\"getEnvStrings\"]=function(){abort(\"'getEnvStrings' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"checkWasiClock\"))Module[\"checkWasiClock\"]=function(){abort(\"'checkWasiClock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeI53ToI64\"))Module[\"writeI53ToI64\"]=function(){abort(\"'writeI53ToI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeI53ToI64Clamped\"))Module[\"writeI53ToI64Clamped\"]=function(){abort(\"'writeI53ToI64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeI53ToI64Signaling\"))Module[\"writeI53ToI64Signaling\"]=function(){abort(\"'writeI53ToI64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeI53ToU64Clamped\"))Module[\"writeI53ToU64Clamped\"]=function(){abort(\"'writeI53ToU64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeI53ToU64Signaling\"))Module[\"writeI53ToU64Signaling\"]=function(){abort(\"'writeI53ToU64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readI53FromI64\"))Module[\"readI53FromI64\"]=function(){abort(\"'readI53FromI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readI53FromU64\"))Module[\"readI53FromU64\"]=function(){abort(\"'readI53FromU64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"convertI32PairToI53\"))Module[\"convertI32PairToI53\"]=function(){abort(\"'convertI32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"convertU32PairToI53\"))Module[\"convertU32PairToI53\"]=function(){abort(\"'convertU32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"uncaughtExceptionCount\"))Module[\"uncaughtExceptionCount\"]=function(){abort(\"'uncaughtExceptionCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"exceptionLast\"))Module[\"exceptionLast\"]=function(){abort(\"'exceptionLast' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"exceptionCaught\"))Module[\"exceptionCaught\"]=function(){abort(\"'exceptionCaught' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ExceptionInfo\"))Module[\"ExceptionInfo\"]=function(){abort(\"'ExceptionInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"CatchInfo\"))Module[\"CatchInfo\"]=function(){abort(\"'CatchInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"exception_addRef\"))Module[\"exception_addRef\"]=function(){abort(\"'exception_addRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"exception_decRef\"))Module[\"exception_decRef\"]=function(){abort(\"'exception_decRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"Browser\"))Module[\"Browser\"]=function(){abort(\"'Browser' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"funcWrappers\"))Module[\"funcWrappers\"]=function(){abort(\"'funcWrappers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getFuncWrapper\"))Module[\"getFuncWrapper\"]=function(){abort(\"'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setMainLoop\"))Module[\"setMainLoop\"]=function(){abort(\"'setMainLoop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"wget\"))Module[\"wget\"]=function(){abort(\"'wget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"FS\"))Module[\"FS\"]=function(){abort(\"'FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"MEMFS\"))Module[\"MEMFS\"]=function(){abort(\"'MEMFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"TTY\"))Module[\"TTY\"]=function(){abort(\"'TTY' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"PIPEFS\"))Module[\"PIPEFS\"]=function(){abort(\"'PIPEFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SOCKFS\"))Module[\"SOCKFS\"]=function(){abort(\"'SOCKFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"_setNetworkCallback\"))Module[\"_setNetworkCallback\"]=function(){abort(\"'_setNetworkCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"tempFixedLengthArray\"))Module[\"tempFixedLengthArray\"]=function(){abort(\"'tempFixedLengthArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"miniTempWebGLFloatBuffers\"))Module[\"miniTempWebGLFloatBuffers\"]=function(){abort(\"'miniTempWebGLFloatBuffers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"heapObjectForWebGLType\"))Module[\"heapObjectForWebGLType\"]=function(){abort(\"'heapObjectForWebGLType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"heapAccessShiftForWebGLHeap\"))Module[\"heapAccessShiftForWebGLHeap\"]=function(){abort(\"'heapAccessShiftForWebGLHeap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};Module[\"GL\"]=GL;if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGet\"))Module[\"emscriptenWebGLGet\"]=function(){abort(\"'emscriptenWebGLGet' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"computeUnpackAlignedImageSize\"))Module[\"computeUnpackAlignedImageSize\"]=function(){abort(\"'computeUnpackAlignedImageSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGetTexPixelData\"))Module[\"emscriptenWebGLGetTexPixelData\"]=function(){abort(\"'emscriptenWebGLGetTexPixelData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGetUniform\"))Module[\"emscriptenWebGLGetUniform\"]=function(){abort(\"'emscriptenWebGLGetUniform' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"webglGetUniformLocation\"))Module[\"webglGetUniformLocation\"]=function(){abort(\"'webglGetUniformLocation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"webglPrepareUniformLocationsBeforeFirstUse\"))Module[\"webglPrepareUniformLocationsBeforeFirstUse\"]=function(){abort(\"'webglPrepareUniformLocationsBeforeFirstUse' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"webglGetLeftBracePos\"))Module[\"webglGetLeftBracePos\"]=function(){abort(\"'webglGetLeftBracePos' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGetVertexAttrib\"))Module[\"emscriptenWebGLGetVertexAttrib\"]=function(){abort(\"'emscriptenWebGLGetVertexAttrib' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGetBufferBinding\"))Module[\"emscriptenWebGLGetBufferBinding\"]=function(){abort(\"'emscriptenWebGLGetBufferBinding' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLValidateMapBufferTarget\"))Module[\"emscriptenWebGLValidateMapBufferTarget\"]=function(){abort(\"'emscriptenWebGLValidateMapBufferTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"writeGLArray\"))Module[\"writeGLArray\"]=function(){abort(\"'writeGLArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"AL\"))Module[\"AL\"]=function(){abort(\"'AL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SDL_unicode\"))Module[\"SDL_unicode\"]=function(){abort(\"'SDL_unicode' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SDL_ttfContext\"))Module[\"SDL_ttfContext\"]=function(){abort(\"'SDL_ttfContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SDL_audio\"))Module[\"SDL_audio\"]=function(){abort(\"'SDL_audio' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SDL\"))Module[\"SDL\"]=function(){abort(\"'SDL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"SDL_gfx\"))Module[\"SDL_gfx\"]=function(){abort(\"'SDL_gfx' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"GLUT\"))Module[\"GLUT\"]=function(){abort(\"'GLUT' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"EGL\"))Module[\"EGL\"]=function(){abort(\"'EGL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"GLFW_Window\"))Module[\"GLFW_Window\"]=function(){abort(\"'GLFW_Window' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"GLFW\"))Module[\"GLFW\"]=function(){abort(\"'GLFW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"GLEW\"))Module[\"GLEW\"]=function(){abort(\"'GLEW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"IDBStore\"))Module[\"IDBStore\"]=function(){abort(\"'IDBStore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"runAndAbortIfError\"))Module[\"runAndAbortIfError\"]=function(){abort(\"'runAndAbortIfError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_handle_array\"))Module[\"emval_handle_array\"]=function(){abort(\"'emval_handle_array' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_free_list\"))Module[\"emval_free_list\"]=function(){abort(\"'emval_free_list' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_symbols\"))Module[\"emval_symbols\"]=function(){abort(\"'emval_symbols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"init_emval\"))Module[\"init_emval\"]=function(){abort(\"'init_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"count_emval_handles\"))Module[\"count_emval_handles\"]=function(){abort(\"'count_emval_handles' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"get_first_emval\"))Module[\"get_first_emval\"]=function(){abort(\"'get_first_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getStringOrSymbol\"))Module[\"getStringOrSymbol\"]=function(){abort(\"'getStringOrSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"requireHandle\"))Module[\"requireHandle\"]=function(){abort(\"'requireHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_newers\"))Module[\"emval_newers\"]=function(){abort(\"'emval_newers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"craftEmvalAllocator\"))Module[\"craftEmvalAllocator\"]=function(){abort(\"'craftEmvalAllocator' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_get_global\"))Module[\"emval_get_global\"]=function(){abort(\"'emval_get_global' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emval_methodCallers\"))Module[\"emval_methodCallers\"]=function(){abort(\"'emval_methodCallers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"InternalError\"))Module[\"InternalError\"]=function(){abort(\"'InternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"BindingError\"))Module[\"BindingError\"]=function(){abort(\"'BindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UnboundTypeError\"))Module[\"UnboundTypeError\"]=function(){abort(\"'UnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"PureVirtualError\"))Module[\"PureVirtualError\"]=function(){abort(\"'PureVirtualError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"init_embind\"))Module[\"init_embind\"]=function(){abort(\"'init_embind' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"throwInternalError\"))Module[\"throwInternalError\"]=function(){abort(\"'throwInternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"throwBindingError\"))Module[\"throwBindingError\"]=function(){abort(\"'throwBindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"throwUnboundTypeError\"))Module[\"throwUnboundTypeError\"]=function(){abort(\"'throwUnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ensureOverloadTable\"))Module[\"ensureOverloadTable\"]=function(){abort(\"'ensureOverloadTable' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"exposePublicSymbol\"))Module[\"exposePublicSymbol\"]=function(){abort(\"'exposePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"replacePublicSymbol\"))Module[\"replacePublicSymbol\"]=function(){abort(\"'replacePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"extendError\"))Module[\"extendError\"]=function(){abort(\"'extendError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"createNamedFunction\"))Module[\"createNamedFunction\"]=function(){abort(\"'createNamedFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registeredInstances\"))Module[\"registeredInstances\"]=function(){abort(\"'registeredInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getBasestPointer\"))Module[\"getBasestPointer\"]=function(){abort(\"'getBasestPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerInheritedInstance\"))Module[\"registerInheritedInstance\"]=function(){abort(\"'registerInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"unregisterInheritedInstance\"))Module[\"unregisterInheritedInstance\"]=function(){abort(\"'unregisterInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getInheritedInstance\"))Module[\"getInheritedInstance\"]=function(){abort(\"'getInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getInheritedInstanceCount\"))Module[\"getInheritedInstanceCount\"]=function(){abort(\"'getInheritedInstanceCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getLiveInheritedInstances\"))Module[\"getLiveInheritedInstances\"]=function(){abort(\"'getLiveInheritedInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registeredTypes\"))Module[\"registeredTypes\"]=function(){abort(\"'registeredTypes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"awaitingDependencies\"))Module[\"awaitingDependencies\"]=function(){abort(\"'awaitingDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"typeDependencies\"))Module[\"typeDependencies\"]=function(){abort(\"'typeDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registeredPointers\"))Module[\"registeredPointers\"]=function(){abort(\"'registeredPointers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"registerType\"))Module[\"registerType\"]=function(){abort(\"'registerType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"whenDependentTypesAreResolved\"))Module[\"whenDependentTypesAreResolved\"]=function(){abort(\"'whenDependentTypesAreResolved' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"embind_charCodes\"))Module[\"embind_charCodes\"]=function(){abort(\"'embind_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"embind_init_charCodes\"))Module[\"embind_init_charCodes\"]=function(){abort(\"'embind_init_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"readLatin1String\"))Module[\"readLatin1String\"]=function(){abort(\"'readLatin1String' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getTypeName\"))Module[\"getTypeName\"]=function(){abort(\"'getTypeName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"heap32VectorToArray\"))Module[\"heap32VectorToArray\"]=function(){abort(\"'heap32VectorToArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"requireRegisteredType\"))Module[\"requireRegisteredType\"]=function(){abort(\"'requireRegisteredType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"getShiftFromSize\"))Module[\"getShiftFromSize\"]=function(){abort(\"'getShiftFromSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"integerReadValueFromPointer\"))Module[\"integerReadValueFromPointer\"]=function(){abort(\"'integerReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"enumReadValueFromPointer\"))Module[\"enumReadValueFromPointer\"]=function(){abort(\"'enumReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"floatReadValueFromPointer\"))Module[\"floatReadValueFromPointer\"]=function(){abort(\"'floatReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"simpleReadValueFromPointer\"))Module[\"simpleReadValueFromPointer\"]=function(){abort(\"'simpleReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"runDestructors\"))Module[\"runDestructors\"]=function(){abort(\"'runDestructors' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"new_\"))Module[\"new_\"]=function(){abort(\"'new_' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"craftInvokerFunction\"))Module[\"craftInvokerFunction\"]=function(){abort(\"'craftInvokerFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"embind__requireFunction\"))Module[\"embind__requireFunction\"]=function(){abort(\"'embind__requireFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"tupleRegistrations\"))Module[\"tupleRegistrations\"]=function(){abort(\"'tupleRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"structRegistrations\"))Module[\"structRegistrations\"]=function(){abort(\"'structRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"genericPointerToWireType\"))Module[\"genericPointerToWireType\"]=function(){abort(\"'genericPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"constNoSmartPtrRawPointerToWireType\"))Module[\"constNoSmartPtrRawPointerToWireType\"]=function(){abort(\"'constNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"nonConstNoSmartPtrRawPointerToWireType\"))Module[\"nonConstNoSmartPtrRawPointerToWireType\"]=function(){abort(\"'nonConstNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"init_RegisteredPointer\"))Module[\"init_RegisteredPointer\"]=function(){abort(\"'init_RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredPointer\"))Module[\"RegisteredPointer\"]=function(){abort(\"'RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredPointer_getPointee\"))Module[\"RegisteredPointer_getPointee\"]=function(){abort(\"'RegisteredPointer_getPointee' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredPointer_destructor\"))Module[\"RegisteredPointer_destructor\"]=function(){abort(\"'RegisteredPointer_destructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredPointer_deleteObject\"))Module[\"RegisteredPointer_deleteObject\"]=function(){abort(\"'RegisteredPointer_deleteObject' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredPointer_fromWireType\"))Module[\"RegisteredPointer_fromWireType\"]=function(){abort(\"'RegisteredPointer_fromWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"runDestructor\"))Module[\"runDestructor\"]=function(){abort(\"'runDestructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"releaseClassHandle\"))Module[\"releaseClassHandle\"]=function(){abort(\"'releaseClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"finalizationGroup\"))Module[\"finalizationGroup\"]=function(){abort(\"'finalizationGroup' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"detachFinalizer_deps\"))Module[\"detachFinalizer_deps\"]=function(){abort(\"'detachFinalizer_deps' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"detachFinalizer\"))Module[\"detachFinalizer\"]=function(){abort(\"'detachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"attachFinalizer\"))Module[\"attachFinalizer\"]=function(){abort(\"'attachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"makeClassHandle\"))Module[\"makeClassHandle\"]=function(){abort(\"'makeClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"init_ClassHandle\"))Module[\"init_ClassHandle\"]=function(){abort(\"'init_ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle\"))Module[\"ClassHandle\"]=function(){abort(\"'ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle_isAliasOf\"))Module[\"ClassHandle_isAliasOf\"]=function(){abort(\"'ClassHandle_isAliasOf' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"throwInstanceAlreadyDeleted\"))Module[\"throwInstanceAlreadyDeleted\"]=function(){abort(\"'throwInstanceAlreadyDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle_clone\"))Module[\"ClassHandle_clone\"]=function(){abort(\"'ClassHandle_clone' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle_delete\"))Module[\"ClassHandle_delete\"]=function(){abort(\"'ClassHandle_delete' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"deletionQueue\"))Module[\"deletionQueue\"]=function(){abort(\"'deletionQueue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle_isDeleted\"))Module[\"ClassHandle_isDeleted\"]=function(){abort(\"'ClassHandle_isDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"ClassHandle_deleteLater\"))Module[\"ClassHandle_deleteLater\"]=function(){abort(\"'ClassHandle_deleteLater' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"flushPendingDeletes\"))Module[\"flushPendingDeletes\"]=function(){abort(\"'flushPendingDeletes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"delayFunction\"))Module[\"delayFunction\"]=function(){abort(\"'delayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"setDelayFunction\"))Module[\"setDelayFunction\"]=function(){abort(\"'setDelayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"RegisteredClass\"))Module[\"RegisteredClass\"]=function(){abort(\"'RegisteredClass' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"shallowCopyInternalPointer\"))Module[\"shallowCopyInternalPointer\"]=function(){abort(\"'shallowCopyInternalPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"downcastPointer\"))Module[\"downcastPointer\"]=function(){abort(\"'downcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"upcastPointer\"))Module[\"upcastPointer\"]=function(){abort(\"'upcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"validateThis\"))Module[\"validateThis\"]=function(){abort(\"'validateThis' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"char_0\"))Module[\"char_0\"]=function(){abort(\"'char_0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"char_9\"))Module[\"char_9\"]=function(){abort(\"'char_9' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"makeLegalFunctionName\"))Module[\"makeLegalFunctionName\"]=function(){abort(\"'makeLegalFunctionName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"emscriptenWebGLGetIndexed\"))Module[\"emscriptenWebGLGetIndexed\"]=function(){abort(\"'emscriptenWebGLGetIndexed' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"warnOnce\"))Module[\"warnOnce\"]=function(){abort(\"'warnOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stackSave\"))Module[\"stackSave\"]=function(){abort(\"'stackSave' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stackRestore\"))Module[\"stackRestore\"]=function(){abort(\"'stackRestore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stackAlloc\"))Module[\"stackAlloc\"]=function(){abort(\"'stackAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"AsciiToString\"))Module[\"AsciiToString\"]=function(){abort(\"'AsciiToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToAscii\"))Module[\"stringToAscii\"]=function(){abort(\"'stringToAscii' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UTF16ToString\"))Module[\"UTF16ToString\"]=function(){abort(\"'UTF16ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToUTF16\"))Module[\"stringToUTF16\"]=function(){abort(\"'stringToUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"lengthBytesUTF16\"))Module[\"lengthBytesUTF16\"]=function(){abort(\"'lengthBytesUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"UTF32ToString\"))Module[\"UTF32ToString\"]=function(){abort(\"'UTF32ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"stringToUTF32\"))Module[\"stringToUTF32\"]=function(){abort(\"'stringToUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"lengthBytesUTF32\"))Module[\"lengthBytesUTF32\"]=function(){abort(\"'lengthBytesUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"allocateUTF8\"))Module[\"allocateUTF8\"]=function(){abort(\"'allocateUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};if(!Object.getOwnPropertyDescriptor(Module,\"allocateUTF8OnStack\"))Module[\"allocateUTF8OnStack\"]=function(){abort(\"'allocateUTF8OnStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")};Module[\"writeStackCookie\"]=writeStackCookie;Module[\"checkStackCookie\"]=checkStackCookie;if(!Object.getOwnPropertyDescriptor(Module,\"ALLOC_NORMAL\"))Object.defineProperty(Module,\"ALLOC_NORMAL\",{configurable:true,get:function(){abort(\"'ALLOC_NORMAL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")}});if(!Object.getOwnPropertyDescriptor(Module,\"ALLOC_STACK\"))Object.defineProperty(Module,\"ALLOC_STACK\",{configurable:true,get:function(){abort(\"'ALLOC_STACK' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)\")}});var calledRun;function ExitStatus(status){this.name=\"ExitStatus\";this.message=\"Program terminated with exit(\"+status+\")\";this.status=status}dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function stackCheckInit(){_emscripten_stack_init();writeStackCookie()}function run(args){args=args||arguments_;if(runDependencies>0){return}stackCheckInit();preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module[\"calledRun\"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module[\"onRuntimeInitialized\"])Module[\"onRuntimeInitialized\"]();assert(!Module[\"_main\"],'compiled without a main, but one is present. if you added it from JS, use Module[\"onRuntimeInitialized\"]');postRun()}if(Module[\"setStatus\"]){Module[\"setStatus\"](\"Running...\");setTimeout(function(){setTimeout(function(){Module[\"setStatus\"](\"\")},1);doRun()},1)}else{doRun()}checkStackCookie()}Module[\"run\"]=run;function checkUnflushedContent(){var oldOut=out;var oldErr=err;var has=false;out=err=function(x){has=true};try{var flush=Module[\"_fflush\"];if(flush)flush(0);[\"stdout\",\"stderr\"].forEach(function(name){var info=FS.analyzePath(\"/dev/\"+name);if(!info)return;var stream=info.object;var rdev=stream.rdev;var tty=TTY.ttys[rdev];if(tty&&tty.output&&tty.output.length){has=true}})}catch(e){}out=oldOut;err=oldErr;if(has){warnOnce(\"stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.\")}}function exit(status,implicit){EXITSTATUS=status;checkUnflushedContent();if(keepRuntimeAlive()){if(!implicit){var msg=\"program exited (with status: \"+status+\"), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)\";readyPromiseReject(msg);err(msg)}}else{exitRuntime()}procExit(status)}function procExit(code){EXITSTATUS=code;if(!keepRuntimeAlive()){if(Module[\"onExit\"])Module[\"onExit\"](code);ABORT=true}quit_(code,new ExitStatus(code))}if(Module[\"preInit\"]){if(typeof Module[\"preInit\"]==\"function\")Module[\"preInit\"]=[Module[\"preInit\"]];while(Module[\"preInit\"].length>0){Module[\"preInit\"].pop()()}}run();\n\n\n  return createMediapipeSolutionsWasm.ready\n}\n);\n})();\nif (typeof exports === 'object' && typeof module === 'object')\n  module.exports = createMediapipeSolutionsWasm;\nelse if (typeof define === 'function' && define['amd'])\n  define([], function() { return createMediapipeSolutionsWasm; });\nelse if (typeof exports === 'object')\n  exports[\"createMediapipeSolutionsWasm\"] = createMediapipeSolutionsWasm;\n"
  },
  {
    "path": "src/renderer/public/lib/spine/pixi-spine.umd.js",
    "content": "/* eslint-disable */\n \n/*!\n * pixi-spine - v3.0.15\n * Compiled Fri, 03 Jun 2022 12:34:36 UTC\n *\n * pixi-spine is licensed under SPINE-LICENSE\n * http://esotericsoftware.com/spine-runtimes-license\n * \n * Copyright 2019-2020, Ivan Igorevich Popelyshev <ivan.popelyshev@gmail.com>, All Rights Reserved\n */\nthis.PIXI = this.PIXI || {};\nthis.PIXI.spine = this.PIXI.spine || {};\n(function (global, factory) {\n    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@pixi/loaders'), require('@pixi/core'), require('@pixi/constants'), require('@pixi/math'), require('@pixi/display'), require('@pixi/sprite'), require('@pixi/mesh-extras'), require('@pixi/graphics'), require('@pixi/utils')) :\n    typeof define === 'function' && define.amd ? define(['exports', '@pixi/loaders', '@pixi/core', '@pixi/constants', '@pixi/math', '@pixi/display', '@pixi/sprite', '@pixi/mesh-extras', '@pixi/graphics', '@pixi/utils'], factory) :\n    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.pixi_spine = {}, global.PIXI, global.PIXI, global.PIXI, global.PIXI, global.PIXI, global.PIXI, global.PIXI, global.PIXI, global.PIXI.utils));\n})(this, (function (exports, loaders, core, constants, math, display, sprite, meshExtras, graphics, utils) { 'use strict';\n\n    /* eslint-disable */\n\n    /**\r\n     * @public\r\n     */\r\n    exports.AttachmentType = void 0;\r\n    (function (AttachmentType) {\r\n        AttachmentType[AttachmentType[\"Region\"] = 0] = \"Region\";\r\n        AttachmentType[AttachmentType[\"BoundingBox\"] = 1] = \"BoundingBox\";\r\n        AttachmentType[AttachmentType[\"Mesh\"] = 2] = \"Mesh\";\r\n        AttachmentType[AttachmentType[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\r\n        AttachmentType[AttachmentType[\"Path\"] = 4] = \"Path\";\r\n        AttachmentType[AttachmentType[\"Point\"] = 5] = \"Point\";\r\n        AttachmentType[AttachmentType[\"Clipping\"] = 6] = \"Clipping\";\r\n    })(exports.AttachmentType || (exports.AttachmentType = {}));\n\n    /**\r\n     * @public\r\n     */\r\n    var BinaryInput = /** @class */ (function () {\r\n        function BinaryInput(data, strings, index, buffer) {\r\n            if (strings === void 0) { strings = new Array(); }\r\n            if (index === void 0) { index = 0; }\r\n            if (buffer === void 0) { buffer = new DataView(data.buffer); }\r\n            this.strings = strings;\r\n            this.index = index;\r\n            this.buffer = buffer;\r\n        }\r\n        BinaryInput.prototype.readByte = function () {\r\n            return this.buffer.getInt8(this.index++);\r\n        };\r\n        BinaryInput.prototype.readUnsignedByte = function () {\r\n            return this.buffer.getUint8(this.index++);\r\n        };\r\n        BinaryInput.prototype.readShort = function () {\r\n            var value = this.buffer.getInt16(this.index);\r\n            this.index += 2;\r\n            return value;\r\n        };\r\n        BinaryInput.prototype.readInt32 = function () {\r\n            var value = this.buffer.getInt32(this.index);\r\n            this.index += 4;\r\n            return value;\r\n        };\r\n        BinaryInput.prototype.readInt = function (optimizePositive) {\r\n            var b = this.readByte();\r\n            var result = b & 0x7F;\r\n            if ((b & 0x80) != 0) {\r\n                b = this.readByte();\r\n                result |= (b & 0x7F) << 7;\r\n                if ((b & 0x80) != 0) {\r\n                    b = this.readByte();\r\n                    result |= (b & 0x7F) << 14;\r\n                    if ((b & 0x80) != 0) {\r\n                        b = this.readByte();\r\n                        result |= (b & 0x7F) << 21;\r\n                        if ((b & 0x80) != 0) {\r\n                            b = this.readByte();\r\n                            result |= (b & 0x7F) << 28;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            return optimizePositive ? result : ((result >>> 1) ^ -(result & 1));\r\n        };\r\n        BinaryInput.prototype.readStringRef = function () {\r\n            var index = this.readInt(true);\r\n            return index == 0 ? null : this.strings[index - 1];\r\n        };\r\n        BinaryInput.prototype.readString = function () {\r\n            var byteCount = this.readInt(true);\r\n            switch (byteCount) {\r\n                case 0:\r\n                    return null;\r\n                case 1:\r\n                    return \"\";\r\n            }\r\n            byteCount--;\r\n            var chars = \"\";\r\n            for (var i = 0; i < byteCount;) {\r\n                var b = this.readUnsignedByte();\r\n                switch (b >> 4) {\r\n                    case 12:\r\n                    case 13:\r\n                        chars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F));\r\n                        i += 2;\r\n                        break;\r\n                    case 14:\r\n                        chars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F));\r\n                        i += 3;\r\n                        break;\r\n                    default:\r\n                        chars += String.fromCharCode(b);\r\n                        i++;\r\n                }\r\n            }\r\n            return chars;\r\n        };\r\n        BinaryInput.prototype.readFloat = function () {\r\n            var value = this.buffer.getFloat32(this.index);\r\n            this.index += 4;\r\n            return value;\r\n        };\r\n        BinaryInput.prototype.readBoolean = function () {\r\n            return this.readByte() != 0;\r\n        };\r\n        return BinaryInput;\r\n    }());\n\n    // Those enums were moved from Animation.ts of spine 3.8 and 4.0\r\n    /** Controls how a timeline value is mixed with the setup pose value or current pose value when a timeline's `alpha`\r\n     * < 1.\r\n     *\r\n     * See Timeline {@link Timeline#apply(Skeleton, float, float, Array, float, MixBlend, MixDirection)}.\r\n     * @public\r\n     * */\r\n    exports.MixBlend = void 0;\r\n    (function (MixBlend) {\r\n        /** Transitions from the setup value to the timeline value (the current value is not used). Before the first key, the setup\r\n         * value is set. */\r\n        MixBlend[MixBlend[\"setup\"] = 0] = \"setup\";\r\n        /** Transitions from the current value to the timeline value. Before the first key, transitions from the current value to\r\n         * the setup value. Timelines which perform instant transitions, such as DrawOrderTimeline or\r\n         * AttachmentTimeline, use the setup value before the first key.\r\n         *\r\n         * `first` is intended for the first animations applied, not for animations layered on top of those. */\r\n        MixBlend[MixBlend[\"first\"] = 1] = \"first\";\r\n        /** Transitions from the current value to the timeline value. No change is made before the first key (the current value is\r\n         * kept until the first key).\r\n         *\r\n         * `replace` is intended for animations layered on top of others, not for the first animations applied. */\r\n        MixBlend[MixBlend[\"replace\"] = 2] = \"replace\";\r\n        /** Transitions from the current value to the current value plus the timeline value. No change is made before the first key\r\n         * (the current value is kept until the first key).\r\n         *\r\n         * `add` is intended for animations layered on top of others, not for the first animations applied. Properties\r\n         * keyed by additive animations must be set manually or by another animation before applying the additive animations, else\r\n         * the property values will increase continually. */\r\n        MixBlend[MixBlend[\"add\"] = 3] = \"add\";\r\n    })(exports.MixBlend || (exports.MixBlend = {}));\r\n    /** Indicates whether a timeline's `alpha` is mixing out over time toward 0 (the setup or current pose value) or\r\n     * mixing in toward 1 (the timeline's value).\r\n     *\r\n     * See Timeline {@link Timeline#apply(Skeleton, float, float, Array, float, MixBlend, MixDirection)}.\r\n     * @public\r\n     * */\r\n    exports.MixDirection = void 0;\r\n    (function (MixDirection) {\r\n        MixDirection[MixDirection[\"mixIn\"] = 0] = \"mixIn\";\r\n        MixDirection[MixDirection[\"mixOut\"] = 1] = \"mixOut\";\r\n    })(exports.MixDirection || (exports.MixDirection = {}));\n\n    // These enums were moved from PathConstraintData.ts of spine 3.7, 3.8 and 4.0\r\n    /** Controls how the first bone is positioned along the path.\r\n     *\r\n     * See [Position mode](http://esotericsoftware.com/spine-path-constraints#Position-mode) in the Spine User Guide.\r\n     * @public\r\n     * */\r\n    exports.PositionMode = void 0;\r\n    (function (PositionMode) {\r\n        PositionMode[PositionMode[\"Fixed\"] = 0] = \"Fixed\";\r\n        PositionMode[PositionMode[\"Percent\"] = 1] = \"Percent\";\r\n    })(exports.PositionMode || (exports.PositionMode = {}));\r\n    /** Controls how bones are rotated, translated, and scaled to match the path.\r\n     *\r\n     * [Rotate mode](http://esotericsoftware.com/spine-path-constraints#Rotate-mod) in the Spine User Guide.\r\n     * @public\r\n     * */\r\n    exports.RotateMode = void 0;\r\n    (function (RotateMode) {\r\n        RotateMode[RotateMode[\"Tangent\"] = 0] = \"Tangent\";\r\n        RotateMode[RotateMode[\"Chain\"] = 1] = \"Chain\";\r\n        RotateMode[RotateMode[\"ChainScale\"] = 2] = \"ChainScale\";\r\n    })(exports.RotateMode || (exports.RotateMode = {}));\n\n    // This enum was moved from BoneData.ts of spine 3.7, 3.8 and 4.0\r\n    /** Determines how a bone inherits world transforms from parent bones.\r\n     * @public\r\n     * */\r\n    exports.TransformMode = void 0;\r\n    (function (TransformMode) {\r\n        TransformMode[TransformMode[\"Normal\"] = 0] = \"Normal\";\r\n        TransformMode[TransformMode[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\r\n        TransformMode[TransformMode[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\r\n        TransformMode[TransformMode[\"NoScale\"] = 3] = \"NoScale\";\r\n        TransformMode[TransformMode[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\r\n    })(exports.TransformMode || (exports.TransformMode = {}));\n\n    /*! *****************************************************************************\r\n    Copyright (c) Microsoft Corporation.\r\n\r\n    Permission to use, copy, modify, and/or distribute this software for any\r\n    purpose with or without fee is hereby granted.\r\n\r\n    THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\n    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\n    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\n    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\n    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\n    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\n    PERFORMANCE OF THIS SOFTWARE.\r\n    ***************************************************************************** */\r\n    /* global Reflect, Promise */\r\n\r\n    var extendStatics$4 = function(d, b) {\r\n        extendStatics$4 = Object.setPrototypeOf ||\r\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n        return extendStatics$4(d, b);\r\n    };\r\n\r\n    function __extends$4(d, b) {\r\n        if (typeof b !== \"function\" && b !== null)\r\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n        extendStatics$4(d, b);\r\n        function __() { this.constructor = d; }\r\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n    }\n\n    /**\r\n     * @public\r\n     */\r\n    function filterFromString(text) {\r\n        switch (text.toLowerCase()) {\r\n            case \"nearest\": return exports.TextureFilter.Nearest;\r\n            case \"linear\": return exports.TextureFilter.Linear;\r\n            case \"mipmap\": return exports.TextureFilter.MipMap;\r\n            case \"mipmapnearestnearest\": return exports.TextureFilter.MipMapNearestNearest;\r\n            case \"mipmaplinearnearest\": return exports.TextureFilter.MipMapLinearNearest;\r\n            case \"mipmapnearestlinear\": return exports.TextureFilter.MipMapNearestLinear;\r\n            case \"mipmaplinearlinear\": return exports.TextureFilter.MipMapLinearLinear;\r\n            default: throw new Error(\"Unknown texture filter \" + text);\r\n        }\r\n    }\r\n    /**\r\n     * @public\r\n     */\r\n    function wrapFromString(text) {\r\n        switch (text.toLowerCase()) {\r\n            case \"mirroredtepeat\": return exports.TextureWrap.MirroredRepeat;\r\n            case \"clamptoedge\": return exports.TextureWrap.ClampToEdge;\r\n            case \"repeat\": return exports.TextureWrap.Repeat;\r\n            default: throw new Error(\"Unknown texture wrap \" + text);\r\n        }\r\n    }\r\n    /**\r\n     * @public\r\n     */\r\n    exports.TextureFilter = void 0;\r\n    (function (TextureFilter) {\r\n        TextureFilter[TextureFilter[\"Nearest\"] = 9728] = \"Nearest\";\r\n        TextureFilter[TextureFilter[\"Linear\"] = 9729] = \"Linear\";\r\n        TextureFilter[TextureFilter[\"MipMap\"] = 9987] = \"MipMap\";\r\n        TextureFilter[TextureFilter[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\r\n        TextureFilter[TextureFilter[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\r\n        TextureFilter[TextureFilter[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\r\n        TextureFilter[TextureFilter[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\"; // WebGLRenderingContext.LINEAR_MIPMAP_LINEAR\r\n    })(exports.TextureFilter || (exports.TextureFilter = {}));\r\n    /**\r\n     * @public\r\n     */\r\n    exports.TextureWrap = void 0;\r\n    (function (TextureWrap) {\r\n        TextureWrap[TextureWrap[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\r\n        TextureWrap[TextureWrap[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\r\n        TextureWrap[TextureWrap[\"Repeat\"] = 10497] = \"Repeat\"; // WebGLRenderingContext.REPEAT\r\n    })(exports.TextureWrap || (exports.TextureWrap = {}));\r\n    /**\r\n     * @public\r\n     */\r\n    var TextureRegion = /** @class */ (function () {\r\n        function TextureRegion() {\r\n            //thats for overrides\r\n            this.size = null;\r\n            this.names = null;\r\n            this.values = null;\r\n        }\r\n        Object.defineProperty(TextureRegion.prototype, \"width\", {\r\n            get: function () {\r\n                var tex = this.texture;\r\n                if (tex.trim) {\r\n                    return tex.trim.width;\r\n                }\r\n                return tex.orig.width;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(TextureRegion.prototype, \"height\", {\r\n            get: function () {\r\n                var tex = this.texture;\r\n                if (tex.trim) {\r\n                    return tex.trim.height;\r\n                }\r\n                return tex.orig.height;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(TextureRegion.prototype, \"u\", {\r\n            get: function () {\r\n                return this.texture._uvs.x0;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(TextureRegion.prototype, \"v\", {\r\n            get: function () {\r\n                return this.texture._uvs.y0;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(TextureRegion.prototype, \"u2\", {\r\n            get: function () {\r\n                return this.texture._uvs.x2;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(TextureRegion.prototype, \"v2\", {\r\n            get: function () {\r\n                return this.texture._uvs.y2;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(TextureRegion.prototype, \"offsetX\", {\r\n            get: function () {\r\n                var tex = this.texture;\r\n                return tex.trim ? tex.trim.x : 0;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(TextureRegion.prototype, \"offsetY\", {\r\n            get: function () {\r\n                // console.warn(\"Deprecation Warning: @Hackerham: I guess, if you are using PIXI-SPINE ATLAS region.offsetY, you want a texture, right? Use region.texture from now on.\");\r\n                return this.spineOffsetY;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(TextureRegion.prototype, \"pixiOffsetY\", {\r\n            get: function () {\r\n                var tex = this.texture;\r\n                return tex.trim ? tex.trim.y : 0;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(TextureRegion.prototype, \"spineOffsetY\", {\r\n            get: function () {\r\n                var tex = this.texture;\r\n                return this.originalHeight - this.height - (tex.trim ? tex.trim.y : 0);\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(TextureRegion.prototype, \"originalWidth\", {\r\n            get: function () {\r\n                return this.texture.orig.width;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(TextureRegion.prototype, \"originalHeight\", {\r\n            get: function () {\r\n                return this.texture.orig.height;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(TextureRegion.prototype, \"x\", {\r\n            get: function () {\r\n                return this.texture.frame.x;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(TextureRegion.prototype, \"y\", {\r\n            get: function () {\r\n                return this.texture.frame.y;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(TextureRegion.prototype, \"rotate\", {\r\n            get: function () {\r\n                return this.texture.rotate !== 0;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(TextureRegion.prototype, \"degrees\", {\r\n            get: function () {\r\n                return (360 - this.texture.rotate * 45) % 360;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        return TextureRegion;\r\n    }());\n\n    var RegionFields = /** @class */ (function () {\r\n        function RegionFields() {\r\n            this.x = 0;\r\n            this.y = 0;\r\n            this.width = 0;\r\n            this.height = 0;\r\n            this.offsetX = 0;\r\n            this.offsetY = 0;\r\n            this.originalWidth = 0;\r\n            this.originalHeight = 0;\r\n            this.rotate = 0;\r\n            this.index = 0;\r\n        }\r\n        return RegionFields;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var TextureAtlas = /** @class */ (function () {\r\n        function TextureAtlas(atlasText, textureLoader, callback) {\r\n            this.pages = new Array();\r\n            this.regions = new Array();\r\n            if (atlasText) {\r\n                this.addSpineAtlas(atlasText, textureLoader, callback);\r\n            }\r\n        }\r\n        TextureAtlas.prototype.addTexture = function (name, texture) {\r\n            var pages = this.pages;\r\n            var page = null;\r\n            for (var i = 0; i < pages.length; i++) {\r\n                if (pages[i].baseTexture === texture.baseTexture) {\r\n                    page = pages[i];\r\n                    break;\r\n                }\r\n            }\r\n            if (page === null) {\r\n                page = new TextureAtlasPage();\r\n                page.name = 'texturePage';\r\n                var baseTexture = texture.baseTexture;\r\n                page.width = baseTexture.realWidth;\r\n                page.height = baseTexture.realHeight;\r\n                page.baseTexture = baseTexture;\r\n                //those fields are not relevant in Pixi\r\n                page.minFilter = page.magFilter = exports.TextureFilter.Nearest;\r\n                page.uWrap = exports.TextureWrap.ClampToEdge;\r\n                page.vWrap = exports.TextureWrap.ClampToEdge;\r\n                pages.push(page);\r\n            }\r\n            var region = new TextureAtlasRegion();\r\n            region.name = name;\r\n            region.page = page;\r\n            region.texture = texture;\r\n            region.index = -1;\r\n            this.regions.push(region);\r\n            return region;\r\n        };\r\n        TextureAtlas.prototype.addTextureHash = function (textures, stripExtension) {\r\n            for (var key in textures) {\r\n                if (textures.hasOwnProperty(key)) {\r\n                    this.addTexture(stripExtension && key.indexOf('.') !== -1 ? key.substr(0, key.lastIndexOf('.')) : key, textures[key]);\r\n                }\r\n            }\r\n        };\r\n        TextureAtlas.prototype.addSpineAtlas = function (atlasText, textureLoader, callback) {\r\n            return this.load(atlasText, textureLoader, callback);\r\n        };\r\n        TextureAtlas.prototype.load = function (atlasText, textureLoader, callback) {\r\n            var _this = this;\r\n            if (textureLoader == null)\r\n                throw new Error(\"textureLoader cannot be null.\");\r\n            var reader = new TextureAtlasReader(atlasText);\r\n            var entry = new Array(4);\r\n            var page = null;\r\n            var pageFields = {};\r\n            var region = null;\r\n            pageFields[\"size\"] = function () {\r\n                page.width = parseInt(entry[1]);\r\n                page.height = parseInt(entry[2]);\r\n            };\r\n            pageFields[\"format\"] = function () {\r\n                // page.format = Format[tuple[0]]; we don't need format in WebGL\r\n            };\r\n            pageFields[\"filter\"] = function () {\r\n                page.minFilter = filterFromString(entry[1]);\r\n                page.magFilter = filterFromString(entry[2]);\r\n            };\r\n            pageFields[\"repeat\"] = function () {\r\n                if (entry[1].indexOf('x') != -1)\r\n                    page.uWrap = exports.TextureWrap.Repeat;\r\n                if (entry[1].indexOf('y') != -1)\r\n                    page.vWrap = exports.TextureWrap.Repeat;\r\n            };\r\n            pageFields[\"pma\"] = function () {\r\n                page.pma = entry[1] == \"true\";\r\n            };\r\n            var regionFields = {};\r\n            regionFields[\"xy\"] = function () {\r\n                region.x = parseInt(entry[1]);\r\n                region.y = parseInt(entry[2]);\r\n            };\r\n            regionFields[\"size\"] = function () {\r\n                region.width = parseInt(entry[1]);\r\n                region.height = parseInt(entry[2]);\r\n            };\r\n            regionFields[\"bounds\"] = function () {\r\n                region.x = parseInt(entry[1]);\r\n                region.y = parseInt(entry[2]);\r\n                region.width = parseInt(entry[3]);\r\n                region.height = parseInt(entry[4]);\r\n            };\r\n            regionFields[\"offset\"] = function () {\r\n                region.offsetX = parseInt(entry[1]);\r\n                region.offsetY = parseInt(entry[2]);\r\n            };\r\n            regionFields[\"orig\"] = function () {\r\n                region.originalWidth = parseInt(entry[1]);\r\n                region.originalHeight = parseInt(entry[2]);\r\n            };\r\n            regionFields[\"offsets\"] = function () {\r\n                region.offsetX = parseInt(entry[1]);\r\n                region.offsetY = parseInt(entry[2]);\r\n                region.originalWidth = parseInt(entry[3]);\r\n                region.originalHeight = parseInt(entry[4]);\r\n            };\r\n            regionFields[\"rotate\"] = function () {\r\n                var rotateValue = entry[1];\r\n                var rotate = 0;\r\n                if (rotateValue.toLocaleLowerCase() == \"true\") {\r\n                    rotate = 6;\r\n                }\r\n                else if (rotateValue.toLocaleLowerCase() == \"false\") {\r\n                    rotate = 0;\r\n                }\r\n                else {\r\n                    rotate = ((720 - parseFloat(rotateValue)) % 360) / 45;\r\n                }\r\n                region.rotate = rotate;\r\n            };\r\n            regionFields[\"index\"] = function () {\r\n                region.index = parseInt(entry[1]);\r\n            };\r\n            var line = reader.readLine();\r\n            // Ignore empty lines before first entry.\r\n            while (line != null && line.trim().length == 0)\r\n                line = reader.readLine();\r\n            // Header entries.\r\n            while (true) {\r\n                if (line == null || line.trim().length == 0)\r\n                    break;\r\n                if (reader.readEntry(entry, line) == 0)\r\n                    break; // Silently ignore all header fields.\r\n                line = reader.readLine();\r\n            }\r\n            var iterateParser = function () {\r\n                while (true) {\r\n                    if (line == null) {\r\n                        return callback && callback(_this);\r\n                    }\r\n                    if (line.trim().length == 0) {\r\n                        page = null;\r\n                        line = reader.readLine();\r\n                    }\r\n                    else if (page === null) {\r\n                        page = new TextureAtlasPage();\r\n                        page.name = line.trim();\r\n                        while (true) {\r\n                            if (reader.readEntry(entry, line = reader.readLine()) == 0)\r\n                                break;\r\n                            var field = pageFields[entry[0]];\r\n                            if (field)\r\n                                field();\r\n                        }\r\n                        _this.pages.push(page);\r\n                        textureLoader(page.name, function (texture) {\r\n                            if (texture === null) {\r\n                                _this.pages.splice(_this.pages.indexOf(page), 1);\r\n                                return callback && callback(null);\r\n                            }\r\n                            page.baseTexture = texture;\r\n                            //TODO: set scaleMode and mipmapMode from spine\r\n                            if (page.pma) {\r\n                                texture.alphaMode = constants.ALPHA_MODES.PMA;\r\n                            }\r\n                            if (!texture.valid) {\r\n                                texture.setSize(page.width, page.height);\r\n                            }\r\n                            _this.pages.push(page);\r\n                            page.setFilters();\r\n                            if (!page.width || !page.height) {\r\n                                page.width = texture.realWidth;\r\n                                page.height = texture.realHeight;\r\n                                if (!page.width || !page.height) {\r\n                                    console.log(\"ERROR spine atlas page \" + page.name + \": meshes wont work if you dont specify size in atlas (http://www.html5gamedevs.com/topic/18888-pixi-spines-and-meshes/?p=107121)\");\r\n                                }\r\n                            }\r\n                            iterateParser();\r\n                        });\r\n                        _this.pages.push(page);\r\n                        break;\r\n                    }\r\n                    else {\r\n                        region = new RegionFields();\r\n                        var atlasRegion = new TextureAtlasRegion();\r\n                        atlasRegion.name = line;\r\n                        atlasRegion.page = page;\r\n                        var names = null;\r\n                        var values = null;\r\n                        while (true) {\r\n                            var count = reader.readEntry(entry, line = reader.readLine());\r\n                            if (count == 0)\r\n                                break;\r\n                            var field = regionFields[entry[0]];\r\n                            if (field)\r\n                                field();\r\n                            else {\r\n                                if (names == null) {\r\n                                    names = [];\r\n                                    values = [];\r\n                                }\r\n                                names.push(entry[0]);\r\n                                var entryValues = [];\r\n                                for (var i = 0; i < count; i++)\r\n                                    entryValues.push(parseInt(entry[i + 1]));\r\n                                values.push(entryValues);\r\n                            }\r\n                        }\r\n                        if (region.originalWidth == 0 && region.originalHeight == 0) {\r\n                            region.originalWidth = region.width;\r\n                            region.originalHeight = region.height;\r\n                        }\r\n                        var resolution = page.baseTexture.resolution;\r\n                        region.x /= resolution;\r\n                        region.y /= resolution;\r\n                        region.width /= resolution;\r\n                        region.height /= resolution;\r\n                        region.originalWidth /= resolution;\r\n                        region.originalHeight /= resolution;\r\n                        region.offsetX /= resolution;\r\n                        region.offsetY /= resolution;\r\n                        var swapWH = region.rotate % 4 !== 0;\r\n                        var frame = new math.Rectangle(region.x, region.y, swapWH ? region.height : region.width, swapWH ? region.width : region.height);\r\n                        var orig = new math.Rectangle(0, 0, region.originalWidth, region.originalHeight);\r\n                        var trim = new math.Rectangle(region.offsetX, region.originalHeight - region.height - region.offsetY, region.width, region.height);\r\n                        atlasRegion.texture = new core.Texture(atlasRegion.page.baseTexture, frame, orig, trim, region.rotate);\r\n                        atlasRegion.index = region.index;\r\n                        atlasRegion.texture.updateUvs();\r\n                        _this.regions.push(atlasRegion);\r\n                    }\r\n                }\r\n            };\r\n            iterateParser();\r\n        };\r\n        TextureAtlas.prototype.findRegion = function (name) {\r\n            for (var i = 0; i < this.regions.length; i++) {\r\n                if (this.regions[i].name == name) {\r\n                    return this.regions[i];\r\n                }\r\n            }\r\n            return null;\r\n        };\r\n        TextureAtlas.prototype.dispose = function () {\r\n            for (var i = 0; i < this.pages.length; i++) {\r\n                this.pages[i].baseTexture.dispose();\r\n            }\r\n        };\r\n        return TextureAtlas;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var TextureAtlasReader = /** @class */ (function () {\r\n        function TextureAtlasReader(text) {\r\n            this.index = 0;\r\n            this.lines = text.split(/\\r\\n|\\r|\\n/);\r\n        }\r\n        TextureAtlasReader.prototype.readLine = function () {\r\n            if (this.index >= this.lines.length)\r\n                return null;\r\n            return this.lines[this.index++];\r\n        };\r\n        TextureAtlasReader.prototype.readEntry = function (entry, line) {\r\n            if (line == null)\r\n                return 0;\r\n            line = line.trim();\r\n            if (line.length == 0)\r\n                return 0;\r\n            var colon = line.indexOf(':');\r\n            if (colon == -1)\r\n                return 0;\r\n            entry[0] = line.substr(0, colon).trim();\r\n            for (var i = 1, lastMatch = colon + 1;; i++) {\r\n                var comma = line.indexOf(',', lastMatch);\r\n                if (comma == -1) {\r\n                    entry[i] = line.substr(lastMatch).trim();\r\n                    return i;\r\n                }\r\n                entry[i] = line.substr(lastMatch, comma - lastMatch).trim();\r\n                lastMatch = comma + 1;\r\n                if (i == 4)\r\n                    return 4;\r\n            }\r\n        };\r\n        return TextureAtlasReader;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var TextureAtlasPage = /** @class */ (function () {\r\n        function TextureAtlasPage() {\r\n            this.minFilter = exports.TextureFilter.Nearest;\r\n            this.magFilter = exports.TextureFilter.Nearest;\r\n            this.uWrap = exports.TextureWrap.ClampToEdge;\r\n            this.vWrap = exports.TextureWrap.ClampToEdge;\r\n        }\r\n        TextureAtlasPage.prototype.setFilters = function () {\r\n            var tex = this.baseTexture;\r\n            var filter = this.minFilter;\r\n            if (filter == exports.TextureFilter.Linear) {\r\n                tex.scaleMode = constants.SCALE_MODES.LINEAR;\r\n            }\r\n            else if (this.minFilter == exports.TextureFilter.Nearest) {\r\n                tex.scaleMode = constants.SCALE_MODES.NEAREST;\r\n            }\r\n            else {\r\n                tex.mipmap = constants.MIPMAP_MODES.POW2;\r\n                if (filter == exports.TextureFilter.MipMapNearestNearest) {\r\n                    tex.scaleMode = constants.SCALE_MODES.NEAREST;\r\n                }\r\n                else {\r\n                    tex.scaleMode = constants.SCALE_MODES.LINEAR;\r\n                }\r\n            }\r\n        };\r\n        return TextureAtlasPage;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var TextureAtlasRegion = /** @class */ (function (_super) {\r\n        __extends$4(TextureAtlasRegion, _super);\r\n        function TextureAtlasRegion() {\r\n            return _super !== null && _super.apply(this, arguments) || this;\r\n        }\r\n        return TextureAtlasRegion;\r\n    }(TextureRegion));\n\n    var fround_polyfill = (function (array) {\r\n        return function (x) {\r\n            return array[0] = x, array[0];\r\n        };\r\n    })(new Float32Array(1));\r\n    var fround = Math.fround || fround_polyfill;\r\n    /**\r\n     * @public\r\n     */\r\n    var IntSet = /** @class */ (function () {\r\n        function IntSet() {\r\n            this.array = new Array();\r\n        }\r\n        IntSet.prototype.add = function (value) {\r\n            var contains = this.contains(value);\r\n            this.array[value | 0] = value | 0;\r\n            return !contains;\r\n        };\r\n        IntSet.prototype.contains = function (value) {\r\n            return this.array[value | 0] != undefined;\r\n        };\r\n        IntSet.prototype.remove = function (value) {\r\n            this.array[value | 0] = undefined;\r\n        };\r\n        IntSet.prototype.clear = function () {\r\n            this.array.length = 0;\r\n        };\r\n        return IntSet;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var StringSet = /** @class */ (function () {\r\n        function StringSet() {\r\n            this.entries = {};\r\n            this.size = 0;\r\n        }\r\n        StringSet.prototype.add = function (value) {\r\n            var contains = this.entries[value];\r\n            this.entries[value] = true;\r\n            if (!contains) {\r\n                this.size++;\r\n                return true;\r\n            }\r\n            return false;\r\n        };\r\n        StringSet.prototype.addAll = function (values) {\r\n            var oldSize = this.size;\r\n            for (var i = 0, n = values.length; i < n; i++)\r\n                this.add(values[i]);\r\n            return oldSize != this.size;\r\n        };\r\n        StringSet.prototype.contains = function (value) {\r\n            return this.entries[value];\r\n        };\r\n        StringSet.prototype.clear = function () {\r\n            this.entries = {};\r\n            this.size = 0;\r\n        };\r\n        return StringSet;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var Color = /** @class */ (function () {\r\n        function Color(r, g, b, a) {\r\n            if (r === void 0) { r = 0; }\r\n            if (g === void 0) { g = 0; }\r\n            if (b === void 0) { b = 0; }\r\n            if (a === void 0) { a = 0; }\r\n            this.r = r;\r\n            this.g = g;\r\n            this.b = b;\r\n            this.a = a;\r\n        }\r\n        Color.prototype.set = function (r, g, b, a) {\r\n            this.r = r;\r\n            this.g = g;\r\n            this.b = b;\r\n            this.a = a;\r\n            return this.clamp();\r\n        };\r\n        Color.prototype.setFromColor = function (c) {\r\n            this.r = c.r;\r\n            this.g = c.g;\r\n            this.b = c.b;\r\n            this.a = c.a;\r\n            return this;\r\n        };\r\n        Color.prototype.setFromString = function (hex) {\r\n            hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\r\n            this.r = parseInt(hex.substr(0, 2), 16) / 255;\r\n            this.g = parseInt(hex.substr(2, 2), 16) / 255;\r\n            this.b = parseInt(hex.substr(4, 2), 16) / 255;\r\n            this.a = hex.length != 8 ? 1 : parseInt(hex.substr(6, 2), 16) / 255;\r\n            return this;\r\n        };\r\n        Color.prototype.add = function (r, g, b, a) {\r\n            this.r += r;\r\n            this.g += g;\r\n            this.b += b;\r\n            this.a += a;\r\n            return this.clamp();\r\n        };\r\n        Color.prototype.clamp = function () {\r\n            if (this.r < 0)\r\n                this.r = 0;\r\n            else if (this.r > 1)\r\n                this.r = 1;\r\n            if (this.g < 0)\r\n                this.g = 0;\r\n            else if (this.g > 1)\r\n                this.g = 1;\r\n            if (this.b < 0)\r\n                this.b = 0;\r\n            else if (this.b > 1)\r\n                this.b = 1;\r\n            if (this.a < 0)\r\n                this.a = 0;\r\n            else if (this.a > 1)\r\n                this.a = 1;\r\n            return this;\r\n        };\r\n        Color.rgba8888ToColor = function (color, value) {\r\n            color.r = ((value & 0xff000000) >>> 24) / 255;\r\n            color.g = ((value & 0x00ff0000) >>> 16) / 255;\r\n            color.b = ((value & 0x0000ff00) >>> 8) / 255;\r\n            color.a = ((value & 0x000000ff)) / 255;\r\n        };\r\n        Color.rgb888ToColor = function (color, value) {\r\n            color.r = ((value & 0x00ff0000) >>> 16) / 255;\r\n            color.g = ((value & 0x0000ff00) >>> 8) / 255;\r\n            color.b = ((value & 0x000000ff)) / 255;\r\n        };\r\n        Color.fromString = function (hex) {\r\n            return new Color().setFromString(hex);\r\n        };\r\n        Color.WHITE = new Color(1, 1, 1, 1);\r\n        Color.RED = new Color(1, 0, 0, 1);\r\n        Color.GREEN = new Color(0, 1, 0, 1);\r\n        Color.BLUE = new Color(0, 0, 1, 1);\r\n        Color.MAGENTA = new Color(1, 0, 1, 1);\r\n        return Color;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var MathUtils = /** @class */ (function () {\r\n        function MathUtils() {\r\n        }\r\n        MathUtils.clamp = function (value, min, max) {\r\n            if (value < min)\r\n                return min;\r\n            if (value > max)\r\n                return max;\r\n            return value;\r\n        };\r\n        MathUtils.cosDeg = function (degrees) {\r\n            return Math.cos(degrees * MathUtils.degRad);\r\n        };\r\n        MathUtils.sinDeg = function (degrees) {\r\n            return Math.sin(degrees * MathUtils.degRad);\r\n        };\r\n        MathUtils.signum = function (value) {\r\n            return value > 0 ? 1 : value < 0 ? -1 : 0;\r\n        };\r\n        MathUtils.toInt = function (x) {\r\n            return x > 0 ? Math.floor(x) : Math.ceil(x);\r\n        };\r\n        MathUtils.cbrt = function (x) {\r\n            var y = Math.pow(Math.abs(x), 1 / 3);\r\n            return x < 0 ? -y : y;\r\n        };\r\n        MathUtils.randomTriangular = function (min, max) {\r\n            return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\r\n        };\r\n        MathUtils.randomTriangularWith = function (min, max, mode) {\r\n            var u = Math.random();\r\n            var d = max - min;\r\n            if (u <= (mode - min) / d)\r\n                return min + Math.sqrt(u * d * (mode - min));\r\n            return max - Math.sqrt((1 - u) * d * (max - mode));\r\n        };\r\n        MathUtils.isPowerOfTwo = function (value) {\r\n            return value && (value & (value - 1)) === 0;\r\n        };\r\n        MathUtils.PI = 3.1415927;\r\n        MathUtils.PI2 = MathUtils.PI * 2;\r\n        MathUtils.radiansToDegrees = 180 / MathUtils.PI;\r\n        MathUtils.radDeg = MathUtils.radiansToDegrees;\r\n        MathUtils.degreesToRadians = MathUtils.PI / 180;\r\n        MathUtils.degRad = MathUtils.degreesToRadians;\r\n        return MathUtils;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var Interpolation = /** @class */ (function () {\r\n        function Interpolation() {\r\n        }\r\n        Interpolation.prototype.apply = function (start, end, a) {\r\n            return start + (end - start) * this.applyInternal(a);\r\n        };\r\n        return Interpolation;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var Pow = /** @class */ (function (_super) {\r\n        __extends$4(Pow, _super);\r\n        function Pow(power) {\r\n            var _this = _super.call(this) || this;\r\n            _this.power = 2;\r\n            _this.power = power;\r\n            return _this;\r\n        }\r\n        Pow.prototype.applyInternal = function (a) {\r\n            if (a <= 0.5)\r\n                return Math.pow(a * 2, this.power) / 2;\r\n            return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\r\n        };\r\n        return Pow;\r\n    }(Interpolation));\r\n    /**\r\n     * @public\r\n     */\r\n    var PowOut = /** @class */ (function (_super) {\r\n        __extends$4(PowOut, _super);\r\n        function PowOut(power) {\r\n            return _super.call(this, power) || this;\r\n        }\r\n        PowOut.prototype.applyInternal = function (a) {\r\n            return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\r\n        };\r\n        return PowOut;\r\n    }(Pow));\r\n    /**\r\n     * @public\r\n     */\r\n    var Utils = /** @class */ (function () {\r\n        function Utils() {\r\n        }\r\n        Utils.arrayCopy = function (source, sourceStart, dest, destStart, numElements) {\r\n            for (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\r\n                dest[j] = source[i];\r\n            }\r\n        };\r\n        Utils.arrayFill = function (array, fromIndex, toIndex, value) {\r\n            for (var i = fromIndex; i < toIndex; i++)\r\n                array[i] = value;\r\n        };\r\n        Utils.setArraySize = function (array, size, value) {\r\n            if (value === void 0) { value = 0; }\r\n            var oldSize = array.length;\r\n            if (oldSize == size)\r\n                return array;\r\n            array.length = size;\r\n            if (oldSize < size) {\r\n                for (var i = oldSize; i < size; i++)\r\n                    array[i] = value;\r\n            }\r\n            return array;\r\n        };\r\n        Utils.ensureArrayCapacity = function (array, size, value) {\r\n            if (value === void 0) { value = 0; }\r\n            if (array.length >= size)\r\n                return array;\r\n            return Utils.setArraySize(array, size, value);\r\n        };\r\n        Utils.newArray = function (size, defaultValue) {\r\n            var array = new Array(size);\r\n            for (var i = 0; i < size; i++)\r\n                array[i] = defaultValue;\r\n            return array;\r\n        };\r\n        Utils.newFloatArray = function (size) {\r\n            if (Utils.SUPPORTS_TYPED_ARRAYS)\r\n                return new Float32Array(size);\r\n            else {\r\n                var array = new Array(size);\r\n                for (var i = 0; i < array.length; i++)\r\n                    array[i] = 0;\r\n                return array;\r\n            }\r\n        };\r\n        Utils.newShortArray = function (size) {\r\n            if (Utils.SUPPORTS_TYPED_ARRAYS)\r\n                return new Int16Array(size);\r\n            else {\r\n                var array = new Array(size);\r\n                for (var i = 0; i < array.length; i++)\r\n                    array[i] = 0;\r\n                return array;\r\n            }\r\n        };\r\n        Utils.toFloatArray = function (array) {\r\n            return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\r\n        };\r\n        Utils.toSinglePrecision = function (value) {\r\n            return Utils.SUPPORTS_TYPED_ARRAYS ? fround(value) : value;\r\n        };\r\n        // This function is used to fix WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109\r\n        Utils.webkit602BugfixHelper = function (alpha, blend) {\r\n        };\r\n        Utils.contains = function (array, element, identity) {\r\n            for (var i = 0; i < array.length; i++)\r\n                if (array[i] == element)\r\n                    return true;\r\n            return false;\r\n        };\r\n        Utils.enumValue = function (type, name) {\r\n            return type[name[0].toUpperCase() + name.slice(1)];\r\n        };\r\n        Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== \"undefined\";\r\n        return Utils;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var DebugUtils = /** @class */ (function () {\r\n        function DebugUtils() {\r\n        }\r\n        DebugUtils.logBones = function (skeleton) {\r\n            for (var i = 0; i < skeleton.bones.length; i++) {\r\n                var bone = skeleton.bones[i];\r\n                var mat = bone.matrix;\r\n                console.log(bone.data.name + \", \" + mat.a + \", \" + mat.b + \", \" + mat.c + \", \" + mat.d + \", \" + mat.tx + \", \" + mat.ty);\r\n            }\r\n        };\r\n        return DebugUtils;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var Pool = /** @class */ (function () {\r\n        function Pool(instantiator) {\r\n            this.items = new Array();\r\n            this.instantiator = instantiator;\r\n        }\r\n        Pool.prototype.obtain = function () {\r\n            return this.items.length > 0 ? this.items.pop() : this.instantiator();\r\n        };\r\n        Pool.prototype.free = function (item) {\r\n            if (item.reset)\r\n                item.reset();\r\n            this.items.push(item);\r\n        };\r\n        Pool.prototype.freeAll = function (items) {\r\n            for (var i = 0; i < items.length; i++)\r\n                this.free(items[i]);\r\n        };\r\n        Pool.prototype.clear = function () {\r\n            this.items.length = 0;\r\n        };\r\n        return Pool;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var Vector2 = /** @class */ (function () {\r\n        function Vector2(x, y) {\r\n            if (x === void 0) { x = 0; }\r\n            if (y === void 0) { y = 0; }\r\n            this.x = x;\r\n            this.y = y;\r\n        }\r\n        Vector2.prototype.set = function (x, y) {\r\n            this.x = x;\r\n            this.y = y;\r\n            return this;\r\n        };\r\n        Vector2.prototype.length = function () {\r\n            var x = this.x;\r\n            var y = this.y;\r\n            return Math.sqrt(x * x + y * y);\r\n        };\r\n        Vector2.prototype.normalize = function () {\r\n            var len = this.length();\r\n            if (len != 0) {\r\n                this.x /= len;\r\n                this.y /= len;\r\n            }\r\n            return this;\r\n        };\r\n        return Vector2;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var TimeKeeper = /** @class */ (function () {\r\n        function TimeKeeper() {\r\n            this.maxDelta = 0.064;\r\n            this.framesPerSecond = 0;\r\n            this.delta = 0;\r\n            this.totalTime = 0;\r\n            this.lastTime = Date.now() / 1000;\r\n            this.frameCount = 0;\r\n            this.frameTime = 0;\r\n        }\r\n        TimeKeeper.prototype.update = function () {\r\n            var now = Date.now() / 1000;\r\n            this.delta = now - this.lastTime;\r\n            this.frameTime += this.delta;\r\n            this.totalTime += this.delta;\r\n            if (this.delta > this.maxDelta)\r\n                this.delta = this.maxDelta;\r\n            this.lastTime = now;\r\n            this.frameCount++;\r\n            if (this.frameTime > 1) {\r\n                this.framesPerSecond = this.frameCount / this.frameTime;\r\n                this.frameTime = 0;\r\n                this.frameCount = 0;\r\n            }\r\n        };\r\n        return TimeKeeper;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var WindowedMean = /** @class */ (function () {\r\n        function WindowedMean(windowSize) {\r\n            if (windowSize === void 0) { windowSize = 32; }\r\n            this.addedValues = 0;\r\n            this.lastValue = 0;\r\n            this.mean = 0;\r\n            this.dirty = true;\r\n            this.values = new Array(windowSize);\r\n        }\r\n        WindowedMean.prototype.hasEnoughData = function () {\r\n            return this.addedValues >= this.values.length;\r\n        };\r\n        WindowedMean.prototype.addValue = function (value) {\r\n            if (this.addedValues < this.values.length)\r\n                this.addedValues++;\r\n            this.values[this.lastValue++] = value;\r\n            if (this.lastValue > this.values.length - 1)\r\n                this.lastValue = 0;\r\n            this.dirty = true;\r\n        };\r\n        WindowedMean.prototype.getMean = function () {\r\n            if (this.hasEnoughData()) {\r\n                if (this.dirty) {\r\n                    var mean = 0;\r\n                    for (var i = 0; i < this.values.length; i++)\r\n                        mean += this.values[i];\r\n                    this.mean = mean / this.values.length;\r\n                    this.dirty = false;\r\n                }\r\n                return this.mean;\r\n            }\r\n            return 0;\r\n        };\r\n        return WindowedMean;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var settings = {\r\n        yDown: true,\r\n        /**\r\n         * pixi-spine gives option to not fail at certain parsing errors\r\n         * spine-ts fails here\r\n         */\r\n        FAIL_ON_NON_EXISTING_SKIN: false,\r\n        /**\r\n         * past Spine.globalAutoUpdate\r\n         */\r\n        GLOBAL_AUTO_UPDATE: true,\r\n        /**\r\n         * past Spine.globalDelayLimit\r\n         */\r\n        GLOBAL_DELAY_LIMIT: 0,\r\n    };\n\n    var tempRgb = [0, 0, 0];\r\n    /**\r\n     * @public\r\n     */\r\n    var SpineSprite = /** @class */ (function (_super) {\r\n        __extends$4(SpineSprite, _super);\r\n        function SpineSprite() {\r\n            var _this = _super !== null && _super.apply(this, arguments) || this;\r\n            _this.region = null;\r\n            _this.attachment = null;\r\n            return _this;\r\n        }\r\n        return SpineSprite;\r\n    }(sprite.Sprite));\r\n    /**\r\n     * @public\r\n     */\r\n    var SpineMesh = /** @class */ (function (_super) {\r\n        __extends$4(SpineMesh, _super);\r\n        function SpineMesh(texture, vertices, uvs, indices, drawMode) {\r\n            var _this = _super.call(this, texture, vertices, uvs, indices, drawMode) || this;\r\n            _this.region = null;\r\n            _this.attachment = null;\r\n            return _this;\r\n        }\r\n        return SpineMesh;\r\n    }(meshExtras.SimpleMesh));\r\n    /**\r\n     * A class that enables the you to import and run your spine animations in pixi.\r\n     * The Spine animation data needs to be loaded using either the Loader or a SpineLoader before it can be used by this class\r\n     * See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source\r\n     *\r\n     * ```js\r\n     * let spineAnimation = new spine(spineData);\r\n     * ```\r\n     *\r\n     * @public\r\n     * @class\r\n     * @extends Container\r\n     * @memberof spine\r\n     * @param spineData {object} The spine data loaded from a spine atlas.\r\n     */\r\n    var SpineBase = /** @class */ (function (_super) {\r\n        __extends$4(SpineBase, _super);\r\n        function SpineBase(spineData) {\r\n            var _this = _super.call(this) || this;\r\n            if (!spineData) {\r\n                throw new Error('The spineData param is required.');\r\n            }\r\n            if ((typeof spineData) === \"string\") {\r\n                throw new Error('spineData param cant be string. Please use spine.Spine.fromAtlas(\"YOUR_RESOURCE_NAME\") from now on.');\r\n            }\r\n            /**\r\n             * The spineData object\r\n             *\r\n             * @member {object}\r\n             */\r\n            _this.spineData = spineData;\r\n            /**\r\n             * A spine Skeleton object\r\n             *\r\n             * @member {object}\r\n             */\r\n            _this.createSkeleton(spineData);\r\n            /**\r\n             * An array of containers\r\n             *\r\n             * @member {Container[]}\r\n             */\r\n            _this.slotContainers = [];\r\n            _this.tempClipContainers = [];\r\n            for (var i = 0, n = _this.skeleton.slots.length; i < n; i++) {\r\n                var slot = _this.skeleton.slots[i];\r\n                var attachment = slot.getAttachment();\r\n                var slotContainer = _this.newContainer();\r\n                _this.slotContainers.push(slotContainer);\r\n                _this.addChild(slotContainer);\r\n                _this.tempClipContainers.push(null);\r\n                if (!attachment) {\r\n                    continue;\r\n                }\r\n                if (attachment.type === exports.AttachmentType.Region) {\r\n                    var spriteName = attachment.region.name;\r\n                    var sprite = _this.createSprite(slot, attachment, spriteName);\r\n                    slot.currentSprite = sprite;\r\n                    slot.currentSpriteName = spriteName;\r\n                    slotContainer.addChild(sprite);\r\n                }\r\n                else if (attachment.type === exports.AttachmentType.Mesh) {\r\n                    var mesh = _this.createMesh(slot, attachment);\r\n                    slot.currentMesh = mesh;\r\n                    slot.currentMeshId = attachment.id;\r\n                    slot.currentMeshName = attachment.name;\r\n                    slotContainer.addChild(mesh);\r\n                }\r\n                else if (attachment.type === exports.AttachmentType.Clipping) {\r\n                    _this.createGraphics(slot, attachment);\r\n                    slotContainer.addChild(slot.clippingContainer);\r\n                    slotContainer.addChild(slot.currentGraphics);\r\n                }\r\n            }\r\n            /**\r\n             * The tint applied to all spine slots. This is a [r,g,b] value. A value of [1,1,1] will remove any tint effect.\r\n             *\r\n             * @member {number}\r\n             * @memberof spine.Spine#\r\n             */\r\n            _this.tintRgb = new Float32Array([1, 1, 1]);\r\n            _this.autoUpdate = true;\r\n            _this.visible = true;\r\n            return _this;\r\n        }\r\n        Object.defineProperty(SpineBase.prototype, \"autoUpdate\", {\r\n            /**\r\n             * If this flag is set to true, the spine animation will be automatically updated every\r\n             * time the object id drawn. The down side of this approach is that the delta time is\r\n             * automatically calculated and you could miss out on cool effects like slow motion,\r\n             * pause, skip ahead and the sorts. Most of these effects can be achieved even with\r\n             * autoUpdate enabled but are harder to achieve.\r\n             *\r\n             * @member {boolean}\r\n             * @memberof spine.Spine#\r\n             * @default true\r\n             */\r\n            get: function () {\r\n                return this._autoUpdate;\r\n            },\r\n            set: function (value) {\r\n                if (value !== this._autoUpdate) {\r\n                    this._autoUpdate = value;\r\n                    this.updateTransform = value ? SpineBase.prototype.autoUpdateTransform : display.Container.prototype.updateTransform;\r\n                }\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(SpineBase.prototype, \"tint\", {\r\n            /**\r\n             * The tint applied to the spine object. This is a hex value. A value of 0xFFFFFF will remove any tint effect.\r\n             *\r\n             * @member {number}\r\n             * @memberof spine.Spine#\r\n             * @default 0xFFFFFF\r\n             */\r\n            get: function () {\r\n                return utils.rgb2hex(this.tintRgb);\r\n            },\r\n            set: function (value) {\r\n                this.tintRgb = utils.hex2rgb(value, this.tintRgb);\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(SpineBase.prototype, \"delayLimit\", {\r\n            /**\r\n             * Limit value for the update dt with Spine.globalDelayLimit\r\n             * that can be overridden with localDelayLimit\r\n             * @return {number} - Maximum processed dt value for the update\r\n             */\r\n            get: function () {\r\n                var limit = typeof this.localDelayLimit !== \"undefined\" ?\r\n                    this.localDelayLimit : settings.GLOBAL_DELAY_LIMIT;\r\n                // If limit is 0, this means there is no limit for the delay\r\n                return limit || Number.MAX_VALUE;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        /**\r\n         * Update the spine skeleton and its animations by delta time (dt)\r\n         *\r\n         * @param dt {number} Delta time. Time by which the animation should be updated\r\n         */\r\n        SpineBase.prototype.update = function (dt) {\r\n            // Limit delta value to avoid animation jumps\r\n            var delayLimit = this.delayLimit;\r\n            if (dt > delayLimit)\r\n                dt = delayLimit;\r\n            this.state.update(dt);\r\n            this.state.apply(this.skeleton);\r\n            //check we haven't been destroyed via a spine event callback in state update\r\n            if (!this.skeleton)\r\n                return;\r\n            this.skeleton.updateWorldTransform();\r\n            var slots = this.skeleton.slots;\r\n            // in case pixi has double tint\r\n            var globalClr = this.color;\r\n            var light = null, dark = null;\r\n            if (globalClr) {\r\n                light = globalClr.light;\r\n                dark = globalClr.dark;\r\n            }\r\n            else {\r\n                light = this.tintRgb;\r\n            }\r\n            // let thack = false;\r\n            for (var i = 0, n = slots.length; i < n; i++) {\r\n                var slot = slots[i];\r\n                var attachment = slot.getAttachment();\r\n                var slotContainer = this.slotContainers[i];\r\n                if (!attachment) {\r\n                    slotContainer.visible = false;\r\n                    continue;\r\n                }\r\n                var spriteColor = null;\r\n                var attColor = attachment.color;\r\n                switch (attachment.type) {\r\n                    case exports.AttachmentType.Region:\r\n                        var region = attachment.region;\r\n                        if (region) {\r\n                            if (slot.currentMesh) {\r\n                                slot.currentMesh.visible = false;\r\n                                slot.currentMesh = null;\r\n                                slot.currentMeshId = undefined;\r\n                                slot.currentMeshName = undefined;\r\n                            }\r\n                            var ar = region;\r\n                            if (!slot.currentSpriteName || slot.currentSpriteName !== ar.name) {\r\n                                var spriteName = ar.name;\r\n                                if (slot.currentSprite) {\r\n                                    slot.currentSprite.visible = false;\r\n                                }\r\n                                slot.sprites = slot.sprites || {};\r\n                                if (slot.sprites[spriteName] !== undefined) {\r\n                                    slot.sprites[spriteName].visible = true;\r\n                                }\r\n                                else {\r\n                                    var sprite = this.createSprite(slot, attachment, spriteName);\r\n                                    slotContainer.addChild(sprite);\r\n                                }\r\n                                slot.currentSprite = slot.sprites[spriteName];\r\n                                slot.currentSpriteName = spriteName;\r\n                                // force sprite update when attachment name is same.\r\n                                // issues https://github.com/pixijs/pixi-spine/issues/318\r\n                            }\r\n                            else if (slot.currentSpriteName === ar.name && !slot.hackRegion) {\r\n                                this.setSpriteRegion(attachment, slot.currentSprite, region);\r\n                            }\r\n                        }\r\n                        var transform = slotContainer.transform;\r\n                        transform.setFromMatrix(slot.bone.matrix);\r\n                        if (slot.currentSprite.color) {\r\n                            //YAY! double - tint!\r\n                            spriteColor = slot.currentSprite.color;\r\n                        }\r\n                        else {\r\n                            tempRgb[0] = light[0] * slot.color.r * attColor.r;\r\n                            tempRgb[1] = light[1] * slot.color.g * attColor.g;\r\n                            tempRgb[2] = light[2] * slot.color.b * attColor.b;\r\n                            slot.currentSprite.tint = utils.rgb2hex(tempRgb);\r\n                        }\r\n                        slot.currentSprite.blendMode = slot.blendMode;\r\n                        break;\r\n                    case exports.AttachmentType.Mesh:\r\n                        if (slot.currentSprite) {\r\n                            //TODO: refactor this thing, switch it on and off for container\r\n                            slot.currentSprite.visible = false;\r\n                            slot.currentSprite = null;\r\n                            slot.currentSpriteName = undefined;\r\n                            //TODO: refactor this shit\r\n                            var transform_1 = new math.Transform();\r\n                            transform_1._parentID = -1;\r\n                            transform_1._worldID = slotContainer.transform._worldID;\r\n                            slotContainer.transform = transform_1;\r\n                        }\r\n                        var id = attachment.id;\r\n                        if (!slot.currentMeshId || slot.currentMeshId !== id) {\r\n                            var meshId = id;\r\n                            if (slot.currentMesh) {\r\n                                slot.currentMesh.visible = false;\r\n                            }\r\n                            slot.meshes = slot.meshes || {};\r\n                            if (slot.meshes[meshId] !== undefined) {\r\n                                slot.meshes[meshId].visible = true;\r\n                            }\r\n                            else {\r\n                                var mesh = this.createMesh(slot, attachment);\r\n                                slotContainer.addChild(mesh);\r\n                            }\r\n                            slot.currentMesh = slot.meshes[meshId];\r\n                            slot.currentMeshName = attachment.name;\r\n                            slot.currentMeshId = meshId;\r\n                        }\r\n                        attachment.computeWorldVerticesOld(slot, slot.currentMesh.vertices);\r\n                        if (slot.currentMesh.color) {\r\n                            // pixi-heaven\r\n                            spriteColor = slot.currentMesh.color;\r\n                        }\r\n                        else {\r\n                            tempRgb[0] = light[0] * slot.color.r * attColor.r;\r\n                            tempRgb[1] = light[1] * slot.color.g * attColor.g;\r\n                            tempRgb[2] = light[2] * slot.color.b * attColor.b;\r\n                            slot.currentMesh.tint = utils.rgb2hex(tempRgb);\r\n                        }\r\n                        slot.currentMesh.blendMode = slot.blendMode;\r\n                        break;\r\n                    case exports.AttachmentType.Clipping:\r\n                        if (!slot.currentGraphics) {\r\n                            this.createGraphics(slot, attachment);\r\n                            slotContainer.addChild(slot.clippingContainer);\r\n                            slotContainer.addChild(slot.currentGraphics);\r\n                        }\r\n                        this.updateGraphics(slot, attachment);\r\n                        slotContainer.alpha = 1.0;\r\n                        slotContainer.visible = true;\r\n                        continue;\r\n                    default:\r\n                        slotContainer.visible = false;\r\n                        continue;\r\n                }\r\n                slotContainer.visible = true;\r\n                // pixi has double tint\r\n                if (spriteColor) {\r\n                    var r0 = slot.color.r * attColor.r;\r\n                    var g0 = slot.color.g * attColor.g;\r\n                    var b0 = slot.color.b * attColor.b;\r\n                    //YAY! double-tint!\r\n                    spriteColor.setLight(light[0] * r0 + dark[0] * (1.0 - r0), light[1] * g0 + dark[1] * (1.0 - g0), light[2] * b0 + dark[2] * (1.0 - b0));\r\n                    if (slot.darkColor) {\r\n                        r0 = slot.darkColor.r;\r\n                        g0 = slot.darkColor.g;\r\n                        b0 = slot.darkColor.b;\r\n                    }\r\n                    else {\r\n                        r0 = 0.0;\r\n                        g0 = 0.0;\r\n                        b0 = 0.0;\r\n                    }\r\n                    spriteColor.setDark(light[0] * r0 + dark[0] * (1 - r0), light[1] * g0 + dark[1] * (1 - g0), light[2] * b0 + dark[2] * (1 - b0));\r\n                }\r\n                slotContainer.alpha = slot.color.a;\r\n            }\r\n            //== this is clipping implementation ===\r\n            //TODO: remove parent hacks when pixi masks allow it\r\n            var drawOrder = this.skeleton.drawOrder;\r\n            var clippingAttachment = null;\r\n            var clippingContainer = null;\r\n            for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n                var slot = slots[drawOrder[i].data.index];\r\n                var slotContainer = this.slotContainers[drawOrder[i].data.index];\r\n                if (!clippingContainer) {\r\n                    //Adding null check as it is possible for slotContainer.parent to be null in the event of a spine being disposed off in its loop callback\r\n                    if (slotContainer.parent !== null && slotContainer.parent !== this) {\r\n                        slotContainer.parent.removeChild(slotContainer);\r\n                        //silend add hack\r\n                        slotContainer.parent = this;\r\n                    }\r\n                }\r\n                if (slot.currentGraphics && slot.getAttachment()) {\r\n                    clippingContainer = slot.clippingContainer;\r\n                    clippingAttachment = slot.getAttachment();\r\n                    clippingContainer.children.length = 0;\r\n                    this.children[i] = slotContainer;\r\n                    if (clippingAttachment.endSlot === slot.data) {\r\n                        clippingAttachment.endSlot = null;\r\n                    }\r\n                }\r\n                else {\r\n                    if (clippingContainer) {\r\n                        var c = this.tempClipContainers[i];\r\n                        if (!c) {\r\n                            c = this.tempClipContainers[i] = this.newContainer();\r\n                            c.visible = false;\r\n                        }\r\n                        this.children[i] = c;\r\n                        //silent remove hack\r\n                        slotContainer.parent = null;\r\n                        clippingContainer.addChild(slotContainer);\r\n                        if (clippingAttachment.endSlot == slot.data) {\r\n                            clippingContainer.renderable = true;\r\n                            clippingContainer = null;\r\n                            clippingAttachment = null;\r\n                        }\r\n                    }\r\n                    else {\r\n                        this.children[i] = slotContainer;\r\n                    }\r\n                }\r\n            }\r\n        };\r\n        SpineBase.prototype.setSpriteRegion = function (attachment, sprite, region) {\r\n            // prevent setters calling when attachment and region is same\r\n            if (sprite.attachment === attachment && sprite.region === region) {\r\n                return;\r\n            }\r\n            sprite.region = region;\r\n            sprite.attachment = attachment;\r\n            sprite.texture = region.texture;\r\n            sprite.rotation = attachment.rotation * MathUtils.degRad;\r\n            sprite.position.x = attachment.x;\r\n            sprite.position.y = attachment.y;\r\n            sprite.alpha = attachment.color.a;\r\n            if (!region.size) {\r\n                sprite.scale.x = attachment.scaleX * attachment.width / region.originalWidth;\r\n                sprite.scale.y = -attachment.scaleY * attachment.height / region.originalHeight;\r\n            }\r\n            else {\r\n                //hacked!\r\n                sprite.scale.x = region.size.width / region.originalWidth;\r\n                sprite.scale.y = -region.size.height / region.originalHeight;\r\n            }\r\n        };\r\n        SpineBase.prototype.setMeshRegion = function (attachment, mesh, region) {\r\n            if (mesh.attachment === attachment && mesh.region === region) {\r\n                return;\r\n            }\r\n            mesh.region = region;\r\n            mesh.attachment = attachment;\r\n            mesh.texture = region.texture;\r\n            region.texture.updateUvs();\r\n            mesh.uvBuffer.update(attachment.regionUVs);\r\n        };\r\n        /**\r\n         * When autoupdate is set to yes this function is used as pixi's updateTransform function\r\n         *\r\n         * @private\r\n         */\r\n        SpineBase.prototype.autoUpdateTransform = function () {\r\n            if (settings.GLOBAL_AUTO_UPDATE) {\r\n                this.lastTime = this.lastTime || Date.now();\r\n                var timeDelta = (Date.now() - this.lastTime) * 0.001;\r\n                this.lastTime = Date.now();\r\n                this.update(timeDelta);\r\n            }\r\n            else {\r\n                this.lastTime = 0;\r\n            }\r\n            display.Container.prototype.updateTransform.call(this);\r\n        };\r\n        /**\r\n         * Create a new sprite to be used with core.RegionAttachment\r\n         *\r\n         * @param slot {spine.Slot} The slot to which the attachment is parented\r\n         * @param attachment {spine.RegionAttachment} The attachment that the sprite will represent\r\n         * @private\r\n         */\r\n        SpineBase.prototype.createSprite = function (slot, attachment, defName) {\r\n            var region = attachment.region;\r\n            if (slot.hackAttachment === attachment) {\r\n                region = slot.hackRegion;\r\n            }\r\n            var texture = region.texture;\r\n            var sprite = this.newSprite(texture);\r\n            sprite.anchor.set(0.5);\r\n            this.setSpriteRegion(attachment, sprite, attachment.region);\r\n            slot.sprites = slot.sprites || {};\r\n            slot.sprites[defName] = sprite;\r\n            return sprite;\r\n        };\r\n        /**\r\n         * Creates a Strip from the spine data\r\n         * @param slot {spine.Slot} The slot to which the attachment is parented\r\n         * @param attachment {spine.RegionAttachment} The attachment that the sprite will represent\r\n         * @private\r\n         */\r\n        SpineBase.prototype.createMesh = function (slot, attachment) {\r\n            var region = attachment.region;\r\n            if (slot.hackAttachment === attachment) {\r\n                region = slot.hackRegion;\r\n                slot.hackAttachment = null;\r\n                slot.hackRegion = null;\r\n            }\r\n            var strip = this.newMesh(region.texture, new Float32Array(attachment.regionUVs.length), attachment.regionUVs, new Uint16Array(attachment.triangles), constants.DRAW_MODES.TRIANGLES);\r\n            if (typeof strip._canvasPadding !== \"undefined\") {\r\n                strip._canvasPadding = 1.5;\r\n            }\r\n            strip.alpha = attachment.color.a;\r\n            strip.region = attachment.region;\r\n            this.setMeshRegion(attachment, strip, region);\r\n            slot.meshes = slot.meshes || {};\r\n            slot.meshes[attachment.id] = strip;\r\n            return strip;\r\n        };\r\n        //@ts-ignore\r\n        SpineBase.prototype.createGraphics = function (slot, clip) {\r\n            var graphics = this.newGraphics();\r\n            var poly = new math.Polygon([]);\r\n            graphics.clear();\r\n            graphics.beginFill(0xffffff, 1);\r\n            graphics.drawPolygon(poly);\r\n            graphics.renderable = false;\r\n            slot.currentGraphics = graphics;\r\n            slot.clippingContainer = this.newContainer();\r\n            slot.clippingContainer.mask = slot.currentGraphics;\r\n            return graphics;\r\n        };\r\n        SpineBase.prototype.updateGraphics = function (slot, clip) {\r\n            var geom = slot.currentGraphics.geometry;\r\n            var vertices = geom.graphicsData[0].shape.points;\r\n            var n = clip.worldVerticesLength;\r\n            vertices.length = n;\r\n            clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\r\n            geom.invalidate();\r\n        };\r\n        /**\r\n         * Changes texture in attachment in specific slot.\r\n         *\r\n         * PIXI runtime feature, it was made to satisfy our users.\r\n         *\r\n         * @param slotIndex {number}\r\n         * @param [texture = null] {PIXI.Texture} If null, take default (original) texture\r\n         * @param [size = null] {PIXI.Point} sometimes we need new size for region attachment, you can pass 'texture.orig' there\r\n         * @returns {boolean} Success flag\r\n         */\r\n        SpineBase.prototype.hackTextureBySlotIndex = function (slotIndex, texture, size) {\r\n            if (texture === void 0) { texture = null; }\r\n            if (size === void 0) { size = null; }\r\n            var slot = this.skeleton.slots[slotIndex];\r\n            if (!slot) {\r\n                return false;\r\n            }\r\n            var attachment = slot.getAttachment();\r\n            var region = attachment.region;\r\n            if (texture) {\r\n                region = new TextureRegion();\r\n                region.texture = texture;\r\n                region.size = size;\r\n                slot.hackRegion = region;\r\n                slot.hackAttachment = attachment;\r\n            }\r\n            else {\r\n                slot.hackRegion = null;\r\n                slot.hackAttachment = null;\r\n            }\r\n            if (slot.currentSprite && slot.currentSprite.region != region) {\r\n                this.setSpriteRegion(attachment, slot.currentSprite, region);\r\n                slot.currentSprite.region = region;\r\n            }\r\n            else if (slot.currentMesh && slot.currentMesh.region != region) {\r\n                this.setMeshRegion(attachment, slot.currentMesh, region);\r\n            }\r\n            return true;\r\n        };\r\n        /**\r\n         * Changes texture in attachment in specific slot.\r\n         *\r\n         * PIXI runtime feature, it was made to satisfy our users.\r\n         *\r\n         * @param slotName {string}\r\n         * @param [texture = null] {PIXI.Texture} If null, take default (original) texture\r\n         * @param [size = null] {PIXI.Point} sometimes we need new size for region attachment, you can pass 'texture.orig' there\r\n         * @returns {boolean} Success flag\r\n         */\r\n        SpineBase.prototype.hackTextureBySlotName = function (slotName, texture, size) {\r\n            if (texture === void 0) { texture = null; }\r\n            if (size === void 0) { size = null; }\r\n            var index = this.skeleton.findSlotIndex(slotName);\r\n            if (index == -1) {\r\n                return false;\r\n            }\r\n            return this.hackTextureBySlotIndex(index, texture, size);\r\n        };\r\n        /**\r\n         * Changes texture of an attachment\r\n         *\r\n         * PIXI runtime feature, it was made to satisfy our users.\r\n         *\r\n         * @param slotName {string}\r\n         * @param attachmentName {string}\r\n         * @param [texture = null] {PIXI.Texture} If null, take default (original) texture\r\n         * @param [size = null] {PIXI.Point} sometimes we need new size for region attachment, you can pass 'texture.orig' there\r\n         * @returns {boolean} Success flag\r\n         */\r\n        SpineBase.prototype.hackTextureAttachment = function (slotName, attachmentName, texture, size) {\r\n            if (size === void 0) { size = null; }\r\n            // changes the texture of an attachment at the skeleton level\r\n            var slotIndex = this.skeleton.findSlotIndex(slotName);\r\n            var attachment = this.skeleton.getAttachmentByName(slotName, attachmentName);\r\n            attachment.region.texture = texture;\r\n            var slot = this.skeleton.slots[slotIndex];\r\n            if (!slot) {\r\n                return false;\r\n            }\r\n            // gets the currently active attachment in this slot\r\n            var currentAttachment = slot.getAttachment();\r\n            if (attachmentName === currentAttachment.name) {\r\n                // if the attachment we are changing is currently active, change the the live texture\r\n                var region = attachment.region;\r\n                if (texture) {\r\n                    region = new TextureRegion();\r\n                    region.texture = texture;\r\n                    region.size = size;\r\n                    slot.hackRegion = region;\r\n                    slot.hackAttachment = currentAttachment;\r\n                }\r\n                else {\r\n                    slot.hackRegion = null;\r\n                    slot.hackAttachment = null;\r\n                }\r\n                if (slot.currentSprite && slot.currentSprite.region != region) {\r\n                    this.setSpriteRegion(currentAttachment, slot.currentSprite, region);\r\n                    slot.currentSprite.region = region;\r\n                }\r\n                else if (slot.currentMesh && slot.currentMesh.region != region) {\r\n                    this.setMeshRegion(currentAttachment, slot.currentMesh, region);\r\n                }\r\n                return true;\r\n            }\r\n            return false;\r\n        };\r\n        //those methods can be overriden to spawn different classes\r\n        SpineBase.prototype.newContainer = function () {\r\n            return new display.Container();\r\n        };\r\n        SpineBase.prototype.newSprite = function (tex) {\r\n            return new SpineSprite(tex);\r\n        };\r\n        SpineBase.prototype.newGraphics = function () {\r\n            return new graphics.Graphics();\r\n        };\r\n        SpineBase.prototype.newMesh = function (texture, vertices, uvs, indices, drawMode) {\r\n            return new SpineMesh(texture, vertices, uvs, indices, drawMode);\r\n        };\r\n        SpineBase.prototype.transformHack = function () {\r\n            return 1;\r\n        };\r\n        /**\r\n         * Hack for pixi-display and pixi-lights. Every attachment name ending with a suffix will be added to different layer\r\n         * @param nameSuffix\r\n         * @param group\r\n         * @param outGroup\r\n         */\r\n        SpineBase.prototype.hackAttachmentGroups = function (nameSuffix, group, outGroup) {\r\n            if (!nameSuffix) {\r\n                return undefined;\r\n            }\r\n            var list_d = [], list_n = [];\r\n            for (var i = 0, len = this.skeleton.slots.length; i < len; i++) {\r\n                var slot = this.skeleton.slots[i];\r\n                var name_1 = slot.currentSpriteName || slot.currentMeshName || \"\";\r\n                var target = slot.currentSprite || slot.currentMesh;\r\n                if (name_1.endsWith(nameSuffix)) {\r\n                    target.parentGroup = group;\r\n                    list_n.push(target);\r\n                }\r\n                else if (outGroup && target) {\r\n                    target.parentGroup = outGroup;\r\n                    list_d.push(target);\r\n                }\r\n            }\r\n            return [list_d, list_n];\r\n        };\r\n        SpineBase.prototype.destroy = function (options) {\r\n            for (var i = 0, n = this.skeleton.slots.length; i < n; i++) {\r\n                var slot = this.skeleton.slots[i];\r\n                for (var name_2 in slot.meshes) {\r\n                    slot.meshes[name_2].destroy(options);\r\n                }\r\n                slot.meshes = null;\r\n                for (var name_3 in slot.sprites) {\r\n                    slot.sprites[name_3].destroy(options);\r\n                }\r\n                slot.sprites = null;\r\n            }\r\n            for (var i = 0, n = this.slotContainers.length; i < n; i++) {\r\n                this.slotContainers[i].destroy(options);\r\n            }\r\n            this.spineData = null;\r\n            this.skeleton = null;\r\n            this.slotContainers = null;\r\n            this.stateData = null;\r\n            this.state = null;\r\n            this.tempClipContainers = null;\r\n            _super.prototype.destroy.call(this, options);\r\n        };\r\n        SpineBase.clippingPolygon = [];\r\n        return SpineBase;\r\n    }(display.Container));\r\n    /**\r\n     * The visibility of the spine object. If false the object will not be drawn,\r\n     * the updateTransform function will not be called, and the spine will not be automatically updated.\r\n     *\r\n     * @member {boolean}\r\n     * @memberof spine.Spine#\r\n     * @default true\r\n     */\r\n    Object.defineProperty(SpineBase.prototype, 'visible', {\r\n        get: function () {\r\n            return this._visible;\r\n        },\r\n        set: function (value) {\r\n            if (value !== this._visible) {\r\n                this._visible = value;\r\n                if (value) {\r\n                    this.lastTime = 0;\r\n                }\r\n            }\r\n        }\r\n    });\n\n    /* eslint-disable */\n\n    function isJson(resource) {\r\n        return resource.type === loaders.LoaderResource.TYPE.JSON;\r\n    }\r\n    function isBuffer(resource) {\r\n        return resource.xhrType === loaders.LoaderResource.XHR_RESPONSE_TYPE.BUFFER;\r\n    }\r\n    loaders.LoaderResource.setExtensionXhrType('skel', loaders.LoaderResource.XHR_RESPONSE_TYPE.BUFFER);\r\n    /**\r\n     * @public\r\n     */\r\n    var AbstractSpineParser = /** @class */ (function () {\r\n        function AbstractSpineParser() {\r\n        }\r\n        AbstractSpineParser.prototype.genMiddleware = function () {\r\n            var self = this;\r\n            return {\r\n                use: function (resource, next) {\r\n                    // skip if no data, its not json, or it isn't atlas data\r\n                    if (!resource.data) {\r\n                        return next();\r\n                    }\r\n                    var isJsonSpineModel = isJson(resource) && resource.data.bones;\r\n                    var isBinarySpineModel = isBuffer(resource) && (resource.extension === 'skel' || resource.metadata\r\n                        && resource.metadata.spineMetadata);\r\n                    if (!isJsonSpineModel && !isBinarySpineModel) {\r\n                        return next();\r\n                    }\r\n                    var parser = null;\r\n                    var dataToParse = resource.data;\r\n                    if (isJsonSpineModel) {\r\n                        parser = self.createJsonParser();\r\n                    }\r\n                    else {\r\n                        parser = self.createBinaryParser();\r\n                        if (resource.data instanceof ArrayBuffer) {\r\n                            dataToParse = new Uint8Array(resource.data);\r\n                        }\r\n                    }\r\n                    var metadata = (resource.metadata || {});\r\n                    var metadataSkeletonScale = metadata ? metadata.spineSkeletonScale : null;\r\n                    if (metadataSkeletonScale) {\r\n                        parser.scale = metadataSkeletonScale;\r\n                    }\r\n                    var metadataAtlas = metadata.spineAtlas;\r\n                    if (metadataAtlas === false) {\r\n                        return next();\r\n                    }\r\n                    if (metadataAtlas && metadataAtlas.pages) {\r\n                        self.parseData(resource, parser, metadataAtlas, dataToParse);\r\n                        return next();\r\n                    }\r\n                    var metadataAtlasSuffix = metadata.spineAtlasSuffix || '.atlas';\r\n                    /**\r\n                     * use a bit of hackery to load the atlas file, here we assume that the .json, .atlas and .png files\r\n                     * that correspond to the spine file are in the same base URL and that the .json and .atlas files\r\n                     * have the same name\r\n                     */\r\n                    var atlasPath = resource.url;\r\n                    var queryStringPos = atlasPath.indexOf('?');\r\n                    if (queryStringPos > 0) {\r\n                        //remove querystring\r\n                        atlasPath = atlasPath.substr(0, queryStringPos);\r\n                    }\r\n                    atlasPath = atlasPath.substr(0, atlasPath.lastIndexOf('.')) + metadataAtlasSuffix;\r\n                    // use atlas path as a params. (no need to use same atlas file name with json file name)\r\n                    if (metadata.spineAtlasFile) {\r\n                        atlasPath = metadata.spineAtlasFile;\r\n                    }\r\n                    //remove the baseUrl\r\n                    atlasPath = atlasPath.replace(this.baseUrl, '');\r\n                    var atlasOptions = {\r\n                        crossOrigin: resource.crossOrigin,\r\n                        xhrType: loaders.LoaderResource.XHR_RESPONSE_TYPE.TEXT,\r\n                        metadata: metadata.spineMetadata || null,\r\n                        parentResource: resource\r\n                    };\r\n                    var imageOptions = {\r\n                        crossOrigin: resource.crossOrigin,\r\n                        metadata: metadata.imageMetadata || null,\r\n                        parentResource: resource\r\n                    };\r\n                    var baseUrl = resource.url.substr(0, resource.url.lastIndexOf('/') + 1);\r\n                    //remove the baseUrl\r\n                    baseUrl = baseUrl.replace(this.baseUrl, '');\r\n                    var namePrefix = metadata.imageNamePrefix || (resource.name + '_atlas_page_');\r\n                    var adapter = metadata.images ? staticImageLoader(metadata.images)\r\n                        : metadata.image ? staticImageLoader({ 'default': metadata.image })\r\n                            : metadata.imageLoader ? metadata.imageLoader(this, namePrefix, baseUrl, imageOptions)\r\n                                : imageLoaderAdapter(this, namePrefix, baseUrl, imageOptions);\r\n                    function createSkeletonWithRawAtlas(rawData) {\r\n                        new TextureAtlas(rawData, adapter, function (spineAtlas) {\r\n                            if (spineAtlas) {\r\n                                self.parseData(resource, parser, spineAtlas, dataToParse);\r\n                            }\r\n                            next();\r\n                        });\r\n                    }\r\n                    if (metadata.atlasRawData) {\r\n                        createSkeletonWithRawAtlas(metadata.atlasRawData);\r\n                    }\r\n                    else {\r\n                        this.add(resource.name + '_atlas', atlasPath, atlasOptions, function (atlasResource) {\r\n                            if (!atlasResource.error) {\r\n                                createSkeletonWithRawAtlas(atlasResource.data);\r\n                            }\r\n                            else {\r\n                                next();\r\n                            }\r\n                        });\r\n                    }\r\n                }\r\n            };\r\n        };\r\n        return AbstractSpineParser;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    function imageLoaderAdapter(loader, namePrefix, baseUrl, imageOptions) {\r\n        if (baseUrl && baseUrl.lastIndexOf('/') !== (baseUrl.length - 1)) {\r\n            baseUrl += '/';\r\n        }\r\n        return function (line, callback) {\r\n            var name = namePrefix + line;\r\n            var url = baseUrl + line;\r\n            var cachedResource = loader.resources[name];\r\n            if (cachedResource) {\r\n                var done = function () {\r\n                    callback(cachedResource.texture.baseTexture);\r\n                };\r\n                if (cachedResource.texture) {\r\n                    done();\r\n                }\r\n                else {\r\n                    cachedResource.onAfterMiddleware.add(done);\r\n                }\r\n            }\r\n            else {\r\n                loader.add(name, url, imageOptions, function (resource) {\r\n                    if (!resource.error) {\r\n                        if (line.indexOf('-pma.') >= 0) {\r\n                            resource.texture.baseTexture.alphaMode = constants.ALPHA_MODES.PMA;\r\n                        }\r\n                        callback(resource.texture.baseTexture);\r\n                    }\r\n                    else {\r\n                        callback(null);\r\n                    }\r\n                });\r\n            }\r\n        };\r\n    }\r\n    /**\r\n     * @public\r\n     */\r\n    function syncImageLoaderAdapter(baseUrl, crossOrigin) {\r\n        if (baseUrl && baseUrl.lastIndexOf('/') !== (baseUrl.length - 1)) {\r\n            baseUrl += '/';\r\n        }\r\n        return function (line, callback) {\r\n            callback(core.BaseTexture.from(line, crossOrigin));\r\n        };\r\n    }\r\n    /**\r\n     * @public\r\n     */\r\n    function staticImageLoader(pages) {\r\n        return function (line, callback) {\r\n            var page = pages[line] || pages['default'];\r\n            if (page && page.baseTexture)\r\n                callback(page.baseTexture);\r\n            else\r\n                callback(page);\r\n        };\r\n    }\n\n    /* eslint-disable */\n\n    /*! *****************************************************************************\r\n    Copyright (c) Microsoft Corporation.\r\n\r\n    Permission to use, copy, modify, and/or distribute this software for any\r\n    purpose with or without fee is hereby granted.\r\n\r\n    THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\n    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\n    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\n    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\n    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\n    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\n    PERFORMANCE OF THIS SOFTWARE.\r\n    ***************************************************************************** */\r\n    /* global Reflect, Promise */\r\n\r\n    var extendStatics$3 = function(d, b) {\r\n        extendStatics$3 = Object.setPrototypeOf ||\r\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n        return extendStatics$3(d, b);\r\n    };\r\n\r\n    function __extends$3(d, b) {\r\n        if (typeof b !== \"function\" && b !== null)\r\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n        extendStatics$3(d, b);\r\n        function __() { this.constructor = d; }\r\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n    }\n\n    /**\r\n     * @public\r\n     */\r\n    var Attachment$2 = /** @class */ (function () {\r\n        function Attachment(name) {\r\n            if (name == null)\r\n                throw new Error(\"name cannot be null.\");\r\n            this.name = name;\r\n        }\r\n        return Attachment;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var VertexAttachment$2 = /** @class */ (function (_super) {\r\n        __extends$3(VertexAttachment, _super);\r\n        function VertexAttachment(name) {\r\n            var _this = _super.call(this, name) || this;\r\n            _this.id = (VertexAttachment.nextID++ & 65535) << 11;\r\n            _this.worldVerticesLength = 0;\r\n            _this.deformAttachment = _this;\r\n            return _this;\r\n        }\r\n        VertexAttachment.prototype.computeWorldVerticesOld = function (slot, worldVertices) {\r\n            this.computeWorldVertices(slot, 0, this.worldVerticesLength, worldVertices, 0, 2);\r\n        };\r\n        /** Transforms local vertices to world coordinates.\r\n         * @param start The index of the first local vertex value to transform. Each vertex has 2 values, x and y.\r\n         * @param count The number of world vertex values to output. Must be <= {@link #getWorldVerticesLength()} - start.\r\n         * @param worldVertices The output world vertices. Must have a length >= offset + count.\r\n         * @param offset The worldVertices index to begin writing values. */\r\n        VertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) {\r\n            count = offset + (count >> 1) * stride;\r\n            var skeleton = slot.bone.skeleton;\r\n            var deformArray = slot.deform;\r\n            var vertices = this.vertices;\r\n            var bones = this.bones;\r\n            if (bones == null) {\r\n                if (deformArray.length > 0)\r\n                    vertices = deformArray;\r\n                var mat = slot.bone.matrix;\r\n                var x = mat.tx;\r\n                var y = mat.ty;\r\n                var a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n                for (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) {\r\n                    var vx = vertices[v_1], vy = vertices[v_1 + 1];\r\n                    worldVertices[w] = vx * a + vy * b + x;\r\n                    worldVertices[w + 1] = vx * c + vy * d + y;\r\n                }\r\n                return;\r\n            }\r\n            var v = 0, skip = 0;\r\n            for (var i = 0; i < start; i += 2) {\r\n                var n = bones[v];\r\n                v += n + 1;\r\n                skip += n;\r\n            }\r\n            var skeletonBones = skeleton.bones;\r\n            if (deformArray.length == 0) {\r\n                for (var w = offset, b = skip * 3; w < count; w += stride) {\r\n                    var wx = 0, wy = 0;\r\n                    var n = bones[v++];\r\n                    n += v;\r\n                    for (; v < n; v++, b += 3) {\r\n                        var mat = skeletonBones[bones[v]].matrix;\r\n                        var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\r\n                        wx += (vx * mat.a + vy * mat.c + mat.tx) * weight;\r\n                        wy += (vx * mat.b + vy * mat.d + mat.ty) * weight;\r\n                    }\r\n                    worldVertices[w] = wx;\r\n                    worldVertices[w + 1] = wy;\r\n                }\r\n            }\r\n            else {\r\n                var deform = deformArray;\r\n                for (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\r\n                    var wx = 0, wy = 0;\r\n                    var n = bones[v++];\r\n                    n += v;\r\n                    for (; v < n; v++, b += 3, f += 2) {\r\n                        var mat = skeletonBones[bones[v]].matrix;\r\n                        var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\r\n                        wx += (vx * mat.a + vy * mat.c + mat.tx) * weight;\r\n                        wy += (vx * mat.b + vy * mat.d + mat.ty) * weight;\r\n                    }\r\n                    worldVertices[w] = wx;\r\n                    worldVertices[w + 1] = wy;\r\n                }\r\n            }\r\n        };\r\n        VertexAttachment.prototype.copyTo = function (attachment) {\r\n            if (this.bones != null) {\r\n                attachment.bones = new Array(this.bones.length);\r\n                Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\r\n            }\r\n            else\r\n                attachment.bones = null;\r\n            if (this.vertices != null) {\r\n                attachment.vertices = Utils.newFloatArray(this.vertices.length);\r\n                Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\r\n            }\r\n            else\r\n                attachment.vertices = null;\r\n            attachment.worldVerticesLength = this.worldVerticesLength;\r\n            attachment.deformAttachment = this.deformAttachment;\r\n        };\r\n        VertexAttachment.nextID = 0;\r\n        return VertexAttachment;\r\n    }(Attachment$2));\n\n    /**\r\n     * @public\r\n     */\r\n    var BoundingBoxAttachment$2 = /** @class */ (function (_super) {\r\n        __extends$3(BoundingBoxAttachment, _super);\r\n        function BoundingBoxAttachment(name) {\r\n            var _this = _super.call(this, name) || this;\r\n            _this.type = exports.AttachmentType.BoundingBox;\r\n            _this.color = new Color(1, 1, 1, 1);\r\n            return _this;\r\n        }\r\n        BoundingBoxAttachment.prototype.copy = function () {\r\n            var copy = new BoundingBoxAttachment(this.name);\r\n            this.copyTo(copy);\r\n            copy.color.setFromColor(this.color);\r\n            return copy;\r\n        };\r\n        return BoundingBoxAttachment;\r\n    }(VertexAttachment$2));\n\n    /**\r\n     * @public\r\n     */\r\n    var ClippingAttachment$2 = /** @class */ (function (_super) {\r\n        __extends$3(ClippingAttachment, _super);\r\n        function ClippingAttachment(name) {\r\n            var _this = _super.call(this, name) || this;\r\n            _this.type = exports.AttachmentType.Clipping;\r\n            // Nonessential.\r\n            _this.color = new Color(0.2275, 0.2275, 0.8078, 1); // ce3a3aff\r\n            return _this;\r\n        }\r\n        ClippingAttachment.prototype.copy = function () {\r\n            var copy = new ClippingAttachment(this.name);\r\n            this.copyTo(copy);\r\n            copy.endSlot = this.endSlot;\r\n            copy.color.setFromColor(this.color);\r\n            return copy;\r\n        };\r\n        return ClippingAttachment;\r\n    }(VertexAttachment$2));\n\n    /**\r\n     * @public\r\n     */\r\n    var MeshAttachment$2 = /** @class */ (function (_super) {\r\n        __extends$3(MeshAttachment, _super);\r\n        function MeshAttachment(name) {\r\n            var _this = _super.call(this, name) || this;\r\n            _this.type = exports.AttachmentType.Mesh;\r\n            _this.color = new Color(1, 1, 1, 1);\r\n            _this.tempColor = new Color(0, 0, 0, 0);\r\n            return _this;\r\n        }\r\n        MeshAttachment.prototype.getParentMesh = function () {\r\n            return this.parentMesh;\r\n        };\r\n        /** @param parentMesh May be null. */\r\n        MeshAttachment.prototype.setParentMesh = function (parentMesh) {\r\n            this.parentMesh = parentMesh;\r\n            if (parentMesh != null) {\r\n                this.bones = parentMesh.bones;\r\n                this.vertices = parentMesh.vertices;\r\n                this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n                this.regionUVs = parentMesh.regionUVs;\r\n                this.triangles = parentMesh.triangles;\r\n                this.hullLength = parentMesh.hullLength;\r\n                this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n            }\r\n        };\r\n        MeshAttachment.prototype.copy = function () {\r\n            if (this.parentMesh != null)\r\n                return this.newLinkedMesh();\r\n            var copy = new MeshAttachment(this.name);\r\n            copy.region = this.region;\r\n            copy.path = this.path;\r\n            copy.color.setFromColor(this.color);\r\n            this.copyTo(copy);\r\n            copy.regionUVs = new Float32Array(this.regionUVs.length);\r\n            Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\r\n            copy.triangles = new Array(this.triangles.length);\r\n            Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\r\n            copy.hullLength = this.hullLength;\r\n            // Nonessential.\r\n            if (this.edges != null) {\r\n                copy.edges = new Array(this.edges.length);\r\n                Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\r\n            }\r\n            copy.width = this.width;\r\n            copy.height = this.height;\r\n            return copy;\r\n        };\r\n        MeshAttachment.prototype.newLinkedMesh = function () {\r\n            var copy = new MeshAttachment(this.name);\r\n            copy.region = this.region;\r\n            copy.path = this.path;\r\n            copy.color.setFromColor(this.color);\r\n            copy.deformAttachment = this.deformAttachment;\r\n            copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this);\r\n            // copy.updateUVs();\r\n            return copy;\r\n        };\r\n        return MeshAttachment;\r\n    }(VertexAttachment$2));\n\n    /**\r\n     * @public\r\n     */\r\n    var PathAttachment$2 = /** @class */ (function (_super) {\r\n        __extends$3(PathAttachment, _super);\r\n        function PathAttachment(name) {\r\n            var _this = _super.call(this, name) || this;\r\n            _this.type = exports.AttachmentType.Path;\r\n            _this.closed = false;\r\n            _this.constantSpeed = false;\r\n            _this.color = new Color(1, 1, 1, 1);\r\n            return _this;\r\n        }\r\n        PathAttachment.prototype.copy = function () {\r\n            var copy = new PathAttachment(this.name);\r\n            this.copyTo(copy);\r\n            copy.lengths = new Array(this.lengths.length);\r\n            Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\r\n            copy.closed = closed;\r\n            copy.constantSpeed = this.constantSpeed;\r\n            copy.color.setFromColor(this.color);\r\n            return copy;\r\n        };\r\n        return PathAttachment;\r\n    }(VertexAttachment$2));\n\n    /**\r\n     * @public\r\n     */\r\n    var PointAttachment$2 = /** @class */ (function (_super) {\r\n        __extends$3(PointAttachment, _super);\r\n        function PointAttachment(name) {\r\n            var _this = _super.call(this, name) || this;\r\n            _this.type = exports.AttachmentType.Point;\r\n            _this.color = new Color(0.38, 0.94, 0, 1);\r\n            return _this;\r\n        }\r\n        PointAttachment.prototype.computeWorldPosition = function (bone, point) {\r\n            var mat = bone.matrix;\r\n            point.x = this.x * mat.a + this.y * mat.c + bone.worldX;\r\n            point.y = this.x * mat.b + this.y * mat.d + bone.worldY;\r\n            return point;\r\n        };\r\n        PointAttachment.prototype.computeWorldRotation = function (bone) {\r\n            var mat = bone.matrix;\r\n            var cos = MathUtils.cosDeg(this.rotation), sin = MathUtils.sinDeg(this.rotation);\r\n            var x = cos * mat.a + sin * mat.c;\r\n            var y = cos * mat.b + sin * mat.d;\r\n            return Math.atan2(y, x) * MathUtils.radDeg;\r\n        };\r\n        PointAttachment.prototype.copy = function () {\r\n            var copy = new PointAttachment(this.name);\r\n            copy.x = this.x;\r\n            copy.y = this.y;\r\n            copy.rotation = this.rotation;\r\n            copy.color.setFromColor(this.color);\r\n            return copy;\r\n        };\r\n        return PointAttachment;\r\n    }(VertexAttachment$2));\n\n    /**\r\n     * @public\r\n     */\r\n    var RegionAttachment$2 = /** @class */ (function (_super) {\r\n        __extends$3(RegionAttachment, _super);\r\n        function RegionAttachment(name) {\r\n            var _this = _super.call(this, name) || this;\r\n            _this.type = exports.AttachmentType.Region;\r\n            _this.x = 0;\r\n            _this.y = 0;\r\n            _this.scaleX = 1;\r\n            _this.scaleY = 1;\r\n            _this.rotation = 0;\r\n            _this.width = 0;\r\n            _this.height = 0;\r\n            _this.color = new Color(1, 1, 1, 1);\r\n            _this.offset = Utils.newFloatArray(8);\r\n            _this.uvs = Utils.newFloatArray(8);\r\n            _this.tempColor = new Color(1, 1, 1, 1);\r\n            return _this;\r\n        }\r\n        RegionAttachment.prototype.updateOffset = function () {\r\n            var regionScaleX = this.width / this.region.originalWidth * this.scaleX;\r\n            var regionScaleY = this.height / this.region.originalHeight * this.scaleY;\r\n            var localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\r\n            var localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\r\n            var localX2 = localX + this.region.width * regionScaleX;\r\n            var localY2 = localY + this.region.height * regionScaleY;\r\n            var radians = this.rotation * Math.PI / 180;\r\n            var cos = Math.cos(radians);\r\n            var sin = Math.sin(radians);\r\n            var localXCos = localX * cos + this.x;\r\n            var localXSin = localX * sin;\r\n            var localYCos = localY * cos + this.y;\r\n            var localYSin = localY * sin;\r\n            var localX2Cos = localX2 * cos + this.x;\r\n            var localX2Sin = localX2 * sin;\r\n            var localY2Cos = localY2 * cos + this.y;\r\n            var localY2Sin = localY2 * sin;\r\n            var offset = this.offset;\r\n            offset[RegionAttachment.OX1] = localXCos - localYSin;\r\n            offset[RegionAttachment.OY1] = localYCos + localXSin;\r\n            offset[RegionAttachment.OX2] = localXCos - localY2Sin;\r\n            offset[RegionAttachment.OY2] = localY2Cos + localXSin;\r\n            offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\r\n            offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\r\n            offset[RegionAttachment.OX4] = localX2Cos - localYSin;\r\n            offset[RegionAttachment.OY4] = localYCos + localX2Sin;\r\n        };\r\n        RegionAttachment.prototype.setRegion = function (region) {\r\n            this.region = region;\r\n            var uvs = this.uvs;\r\n            if (region.rotate) {\r\n                uvs[2] = region.u;\r\n                uvs[3] = region.v2;\r\n                uvs[4] = region.u;\r\n                uvs[5] = region.v;\r\n                uvs[6] = region.u2;\r\n                uvs[7] = region.v;\r\n                uvs[0] = region.u2;\r\n                uvs[1] = region.v2;\r\n            }\r\n            else {\r\n                uvs[0] = region.u;\r\n                uvs[1] = region.v2;\r\n                uvs[2] = region.u;\r\n                uvs[3] = region.v;\r\n                uvs[4] = region.u2;\r\n                uvs[5] = region.v;\r\n                uvs[6] = region.u2;\r\n                uvs[7] = region.v2;\r\n            }\r\n        };\r\n        RegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) {\r\n            var vertexOffset = this.offset;\r\n            var mat = bone.matrix;\r\n            var x = mat.tx, y = mat.ty;\r\n            var a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n            var offsetX = 0, offsetY = 0;\r\n            offsetX = vertexOffset[RegionAttachment.OX1];\r\n            offsetY = vertexOffset[RegionAttachment.OY1];\r\n            worldVertices[offset] = offsetX * a + offsetY * b + x; // br\r\n            worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n            offset += stride;\r\n            offsetX = vertexOffset[RegionAttachment.OX2];\r\n            offsetY = vertexOffset[RegionAttachment.OY2];\r\n            worldVertices[offset] = offsetX * a + offsetY * b + x; // bl\r\n            worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n            offset += stride;\r\n            offsetX = vertexOffset[RegionAttachment.OX3];\r\n            offsetY = vertexOffset[RegionAttachment.OY3];\r\n            worldVertices[offset] = offsetX * a + offsetY * b + x; // ul\r\n            worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n            offset += stride;\r\n            offsetX = vertexOffset[RegionAttachment.OX4];\r\n            offsetY = vertexOffset[RegionAttachment.OY4];\r\n            worldVertices[offset] = offsetX * a + offsetY * b + x; // ur\r\n            worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n        };\r\n        RegionAttachment.prototype.copy = function () {\r\n            var copy = new RegionAttachment(this.name);\r\n            copy.region = this.region;\r\n            copy.rendererObject = this.rendererObject;\r\n            copy.path = this.path;\r\n            copy.x = this.x;\r\n            copy.y = this.y;\r\n            copy.scaleX = this.scaleX;\r\n            copy.scaleY = this.scaleY;\r\n            copy.rotation = this.rotation;\r\n            copy.width = this.width;\r\n            copy.height = this.height;\r\n            Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\r\n            Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\r\n            copy.color.setFromColor(this.color);\r\n            return copy;\r\n        };\r\n        RegionAttachment.OX1 = 0;\r\n        RegionAttachment.OY1 = 1;\r\n        RegionAttachment.OX2 = 2;\r\n        RegionAttachment.OY2 = 3;\r\n        RegionAttachment.OX3 = 4;\r\n        RegionAttachment.OY3 = 5;\r\n        RegionAttachment.OX4 = 6;\r\n        RegionAttachment.OY4 = 7;\r\n        RegionAttachment.X1 = 0;\r\n        RegionAttachment.Y1 = 1;\r\n        RegionAttachment.C1R = 2;\r\n        RegionAttachment.C1G = 3;\r\n        RegionAttachment.C1B = 4;\r\n        RegionAttachment.C1A = 5;\r\n        RegionAttachment.U1 = 6;\r\n        RegionAttachment.V1 = 7;\r\n        RegionAttachment.X2 = 8;\r\n        RegionAttachment.Y2 = 9;\r\n        RegionAttachment.C2R = 10;\r\n        RegionAttachment.C2G = 11;\r\n        RegionAttachment.C2B = 12;\r\n        RegionAttachment.C2A = 13;\r\n        RegionAttachment.U2 = 14;\r\n        RegionAttachment.V2 = 15;\r\n        RegionAttachment.X3 = 16;\r\n        RegionAttachment.Y3 = 17;\r\n        RegionAttachment.C3R = 18;\r\n        RegionAttachment.C3G = 19;\r\n        RegionAttachment.C3B = 20;\r\n        RegionAttachment.C3A = 21;\r\n        RegionAttachment.U3 = 22;\r\n        RegionAttachment.V3 = 23;\r\n        RegionAttachment.X4 = 24;\r\n        RegionAttachment.Y4 = 25;\r\n        RegionAttachment.C4R = 26;\r\n        RegionAttachment.C4G = 27;\r\n        RegionAttachment.C4B = 28;\r\n        RegionAttachment.C4A = 29;\r\n        RegionAttachment.U4 = 30;\r\n        RegionAttachment.V4 = 31;\r\n        return RegionAttachment;\r\n    }(Attachment$2));\n\n    /**\r\n     * @public\r\n     */\r\n    var JitterEffect$2 = /** @class */ (function () {\r\n        function JitterEffect(jitterX, jitterY) {\r\n            this.jitterX = 0;\r\n            this.jitterY = 0;\r\n            this.jitterX = jitterX;\r\n            this.jitterY = jitterY;\r\n        }\r\n        JitterEffect.prototype.begin = function (skeleton) {\r\n        };\r\n        JitterEffect.prototype.transform = function (position, uv, light, dark) {\r\n            position.x += MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n            position.y += MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n        };\r\n        JitterEffect.prototype.end = function () {\r\n        };\r\n        return JitterEffect;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var SwirlEffect$2 = /** @class */ (function () {\r\n        function SwirlEffect(radius) {\r\n            this.centerX = 0;\r\n            this.centerY = 0;\r\n            this.radius = 0;\r\n            this.angle = 0;\r\n            this.worldX = 0;\r\n            this.worldY = 0;\r\n            this.radius = radius;\r\n        }\r\n        SwirlEffect.prototype.begin = function (skeleton) {\r\n            this.worldX = skeleton.x + this.centerX;\r\n            this.worldY = skeleton.y + this.centerY;\r\n        };\r\n        SwirlEffect.prototype.transform = function (position, uv, light, dark) {\r\n            var radAngle = this.angle * MathUtils.degreesToRadians;\r\n            var x = position.x - this.worldX;\r\n            var y = position.y - this.worldY;\r\n            var dist = Math.sqrt(x * x + y * y);\r\n            if (dist < this.radius) {\r\n                var theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\r\n                var cos = Math.cos(theta);\r\n                var sin = Math.sin(theta);\r\n                position.x = cos * x - sin * y + this.worldX;\r\n                position.y = sin * x + cos * y + this.worldY;\r\n            }\r\n        };\r\n        SwirlEffect.prototype.end = function () {\r\n        };\r\n        SwirlEffect.interpolation = new PowOut(2);\r\n        return SwirlEffect;\r\n    }());\n\n    /** A simple container for a list of timelines and a name. */\r\n    /**\r\n     * @public\r\n     */\r\n    var Animation$2 = /** @class */ (function () {\r\n        function Animation(name, timelines, duration) {\r\n            if (name == null)\r\n                throw new Error(\"name cannot be null.\");\r\n            if (timelines == null)\r\n                throw new Error(\"timelines cannot be null.\");\r\n            this.name = name;\r\n            this.timelines = timelines;\r\n            this.timelineIds = [];\r\n            for (var i = 0; i < timelines.length; i++)\r\n                this.timelineIds[timelines[i].getPropertyId()] = true;\r\n            this.duration = duration;\r\n        }\r\n        Animation.prototype.hasTimeline = function (id) {\r\n            return this.timelineIds[id] == true;\r\n        };\r\n        /** Applies all the animation's timelines to the specified skeleton.\r\n         *\r\n         * See Timeline {@link Timeline#apply(Skeleton, float, float, Array, float, MixBlend, MixDirection)}.\r\n         * @param loop If true, the animation repeats after {@link #getDuration()}.\r\n         * @param events May be null to ignore fired events. */\r\n        Animation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, blend, direction) {\r\n            if (skeleton == null)\r\n                throw new Error(\"skeleton cannot be null.\");\r\n            if (loop && this.duration != 0) {\r\n                time %= this.duration;\r\n                if (lastTime > 0)\r\n                    lastTime %= this.duration;\r\n            }\r\n            var timelines = this.timelines;\r\n            for (var i = 0, n = timelines.length; i < n; i++)\r\n                timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\r\n        };\r\n        /** @param target After the first and before the last value.\r\n         * @returns index of first value greater than the target. */\r\n        Animation.binarySearch = function (values, target, step) {\r\n            if (step === void 0) { step = 1; }\r\n            var low = 0;\r\n            var high = values.length / step - 2;\r\n            if (high == 0)\r\n                return step;\r\n            var current = high >>> 1;\r\n            while (true) {\r\n                if (values[(current + 1) * step] <= target)\r\n                    low = current + 1;\r\n                else\r\n                    high = current;\r\n                if (low == high)\r\n                    return (low + 1) * step;\r\n                current = (low + high) >>> 1;\r\n            }\r\n        };\r\n        Animation.linearSearch = function (values, target, step) {\r\n            for (var i = 0, last = values.length - step; i <= last; i += step)\r\n                if (values[i] > target)\r\n                    return i;\r\n            return -1;\r\n        };\r\n        return Animation;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var TimelineType$1;\r\n    (function (TimelineType) {\r\n        TimelineType[TimelineType[\"rotate\"] = 0] = \"rotate\";\r\n        TimelineType[TimelineType[\"translate\"] = 1] = \"translate\";\r\n        TimelineType[TimelineType[\"scale\"] = 2] = \"scale\";\r\n        TimelineType[TimelineType[\"shear\"] = 3] = \"shear\";\r\n        TimelineType[TimelineType[\"attachment\"] = 4] = \"attachment\";\r\n        TimelineType[TimelineType[\"color\"] = 5] = \"color\";\r\n        TimelineType[TimelineType[\"deform\"] = 6] = \"deform\";\r\n        TimelineType[TimelineType[\"event\"] = 7] = \"event\";\r\n        TimelineType[TimelineType[\"drawOrder\"] = 8] = \"drawOrder\";\r\n        TimelineType[TimelineType[\"ikConstraint\"] = 9] = \"ikConstraint\";\r\n        TimelineType[TimelineType[\"transformConstraint\"] = 10] = \"transformConstraint\";\r\n        TimelineType[TimelineType[\"pathConstraintPosition\"] = 11] = \"pathConstraintPosition\";\r\n        TimelineType[TimelineType[\"pathConstraintSpacing\"] = 12] = \"pathConstraintSpacing\";\r\n        TimelineType[TimelineType[\"pathConstraintMix\"] = 13] = \"pathConstraintMix\";\r\n        TimelineType[TimelineType[\"twoColor\"] = 14] = \"twoColor\";\r\n    })(TimelineType$1 || (TimelineType$1 = {}));\r\n    /** The base class for timelines that use interpolation between key frame values. */\r\n    /**\r\n     * @public\r\n     */\r\n    var CurveTimeline$2 = /** @class */ (function () {\r\n        function CurveTimeline(frameCount) {\r\n            if (frameCount <= 0)\r\n                throw new Error(\"frameCount must be > 0: \" + frameCount);\r\n            this.curves = Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\r\n        }\r\n        /** The number of key frames for this timeline. */\r\n        CurveTimeline.prototype.getFrameCount = function () {\r\n            return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\r\n        };\r\n        /** Sets the specified key frame to linear interpolation. */\r\n        CurveTimeline.prototype.setLinear = function (frameIndex) {\r\n            this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\r\n        };\r\n        /** Sets the specified key frame to stepped interpolation. */\r\n        CurveTimeline.prototype.setStepped = function (frameIndex) {\r\n            this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\r\n        };\r\n        /** Returns the interpolation type for the specified key frame.\r\n         * @returns Linear is 0, stepped is 1, Bezier is 2. */\r\n        CurveTimeline.prototype.getCurveType = function (frameIndex) {\r\n            var index = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n            if (index == this.curves.length)\r\n                return CurveTimeline.LINEAR;\r\n            var type = this.curves[index];\r\n            if (type == CurveTimeline.LINEAR)\r\n                return CurveTimeline.LINEAR;\r\n            if (type == CurveTimeline.STEPPED)\r\n                return CurveTimeline.STEPPED;\r\n            return CurveTimeline.BEZIER;\r\n        };\r\n        /** Sets the specified key frame to Bezier interpolation. `cx1` and `cx2` are from 0 to 1,\r\n         * representing the percent of time between the two key frames. `cy1` and `cy2` are the percent of the\r\n         * difference between the key frame's values. */\r\n        CurveTimeline.prototype.setCurve = function (frameIndex, cx1, cy1, cx2, cy2) {\r\n            var tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\r\n            var dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\r\n            var ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\r\n            var dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\r\n            var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n            var curves = this.curves;\r\n            curves[i++] = CurveTimeline.BEZIER;\r\n            var x = dfx, y = dfy;\r\n            for (var n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n                curves[i] = x;\r\n                curves[i + 1] = y;\r\n                dfx += ddfx;\r\n                dfy += ddfy;\r\n                ddfx += dddfx;\r\n                ddfy += dddfy;\r\n                x += dfx;\r\n                y += dfy;\r\n            }\r\n        };\r\n        /** Returns the interpolated percentage for the specified key frame and linear percentage. */\r\n        CurveTimeline.prototype.getCurvePercent = function (frameIndex, percent) {\r\n            percent = MathUtils.clamp(percent, 0, 1);\r\n            var curves = this.curves;\r\n            var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n            var type = curves[i];\r\n            if (type == CurveTimeline.LINEAR)\r\n                return percent;\r\n            if (type == CurveTimeline.STEPPED)\r\n                return 0;\r\n            i++;\r\n            var x = 0;\r\n            for (var start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n                x = curves[i];\r\n                if (x >= percent) {\r\n                    var prevX = void 0, prevY = void 0;\r\n                    if (i == start) {\r\n                        prevX = 0;\r\n                        prevY = 0;\r\n                    }\r\n                    else {\r\n                        prevX = curves[i - 2];\r\n                        prevY = curves[i - 1];\r\n                    }\r\n                    return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\r\n                }\r\n            }\r\n            var y = curves[i - 1];\r\n            return y + (1 - y) * (percent - x) / (1 - x); // Last point is 1,1.\r\n        };\r\n        CurveTimeline.LINEAR = 0;\r\n        CurveTimeline.STEPPED = 1;\r\n        CurveTimeline.BEZIER = 2;\r\n        CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;\r\n        return CurveTimeline;\r\n    }());\r\n    /** Changes a bone's local {@link Bone#rotation}. */\r\n    /**\r\n     * @public\r\n     */\r\n    var RotateTimeline$2 = /** @class */ (function (_super) {\r\n        __extends$3(RotateTimeline, _super);\r\n        function RotateTimeline(frameCount) {\r\n            var _this = _super.call(this, frameCount) || this;\r\n            _this.frames = Utils.newFloatArray(frameCount << 1);\r\n            return _this;\r\n        }\r\n        RotateTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType$1.rotate << 24) + this.boneIndex;\r\n        };\r\n        /** Sets the time and angle of the specified keyframe. */\r\n        RotateTimeline.prototype.setFrame = function (frameIndex, time, degrees) {\r\n            frameIndex <<= 1;\r\n            this.frames[frameIndex] = time;\r\n            this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\r\n        };\r\n        RotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var frames = this.frames;\r\n            var bone = skeleton.bones[this.boneIndex];\r\n            if (!bone.active)\r\n                return;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        bone.rotation = bone.data.rotation;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        var r_1 = bone.data.rotation - bone.rotation;\r\n                        bone.rotation += (r_1 - (16384 - ((16384.499999999996 - r_1 / 360) | 0)) * 360) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            if (time >= frames[frames.length - RotateTimeline.ENTRIES]) { // Time is after last frame.\r\n                var r_2 = frames[frames.length + RotateTimeline.PREV_ROTATION];\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        bone.rotation = bone.data.rotation + r_2 * alpha;\r\n                        break;\r\n                    case exports.MixBlend.first:\r\n                    case exports.MixBlend.replace:\r\n                        r_2 += bone.data.rotation - bone.rotation;\r\n                        r_2 -= (16384 - ((16384.499999999996 - r_2 / 360) | 0)) * 360; // Wrap within -180 and 180.\r\n                    case exports.MixBlend.add:\r\n                        bone.rotation += r_2 * alpha;\r\n                }\r\n                return;\r\n            }\r\n            // Interpolate between the previous frame and the current frame.\r\n            var frame = Animation$2.binarySearch(frames, time, RotateTimeline.ENTRIES);\r\n            var prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\r\n            var frameTime = frames[frame];\r\n            var percent = this.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\r\n            var r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\r\n            r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent;\r\n            switch (blend) {\r\n                case exports.MixBlend.setup:\r\n                    bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n                    break;\r\n                case exports.MixBlend.first:\r\n                case exports.MixBlend.replace:\r\n                    r += bone.data.rotation - bone.rotation;\r\n                case exports.MixBlend.add:\r\n                    bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n            }\r\n        };\r\n        RotateTimeline.ENTRIES = 2;\r\n        RotateTimeline.PREV_TIME = -2;\r\n        RotateTimeline.PREV_ROTATION = -1;\r\n        RotateTimeline.ROTATION = 1;\r\n        return RotateTimeline;\r\n    }(CurveTimeline$2));\r\n    /** Changes a bone's local {@link Bone#x} and {@link Bone#y}. */\r\n    /**\r\n     * @public\r\n     */\r\n    var TranslateTimeline$2 = /** @class */ (function (_super) {\r\n        __extends$3(TranslateTimeline, _super);\r\n        function TranslateTimeline(frameCount) {\r\n            var _this = _super.call(this, frameCount) || this;\r\n            _this.frames = Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\r\n            return _this;\r\n        }\r\n        TranslateTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType$1.translate << 24) + this.boneIndex;\r\n        };\r\n        /** Sets the time in seconds, x, and y values for the specified key frame. */\r\n        TranslateTimeline.prototype.setFrame = function (frameIndex, time, x, y) {\r\n            frameIndex *= TranslateTimeline.ENTRIES;\r\n            this.frames[frameIndex] = time;\r\n            this.frames[frameIndex + TranslateTimeline.X] = x;\r\n            this.frames[frameIndex + TranslateTimeline.Y] = y;\r\n        };\r\n        TranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var frames = this.frames;\r\n            var bone = skeleton.bones[this.boneIndex];\r\n            if (!bone.active)\r\n                return;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        bone.x = bone.data.x;\r\n                        bone.y = bone.data.y;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        bone.x += (bone.data.x - bone.x) * alpha;\r\n                        bone.y += (bone.data.y - bone.y) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var x = 0, y = 0;\r\n            if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) { // Time is after last frame.\r\n                x = frames[frames.length + TranslateTimeline.PREV_X];\r\n                y = frames[frames.length + TranslateTimeline.PREV_Y];\r\n            }\r\n            else {\r\n                // Interpolate between the previous frame and the current frame.\r\n                var frame = Animation$2.binarySearch(frames, time, TranslateTimeline.ENTRIES);\r\n                x = frames[frame + TranslateTimeline.PREV_X];\r\n                y = frames[frame + TranslateTimeline.PREV_Y];\r\n                var frameTime = frames[frame];\r\n                var percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\r\n                x += (frames[frame + TranslateTimeline.X] - x) * percent;\r\n                y += (frames[frame + TranslateTimeline.Y] - y) * percent;\r\n            }\r\n            switch (blend) {\r\n                case exports.MixBlend.setup:\r\n                    bone.x = bone.data.x + x * alpha;\r\n                    bone.y = bone.data.y + y * alpha;\r\n                    break;\r\n                case exports.MixBlend.first:\r\n                case exports.MixBlend.replace:\r\n                    bone.x += (bone.data.x + x - bone.x) * alpha;\r\n                    bone.y += (bone.data.y + y - bone.y) * alpha;\r\n                    break;\r\n                case exports.MixBlend.add:\r\n                    bone.x += x * alpha;\r\n                    bone.y += y * alpha;\r\n            }\r\n        };\r\n        TranslateTimeline.ENTRIES = 3;\r\n        TranslateTimeline.PREV_TIME = -3;\r\n        TranslateTimeline.PREV_X = -2;\r\n        TranslateTimeline.PREV_Y = -1;\r\n        TranslateTimeline.X = 1;\r\n        TranslateTimeline.Y = 2;\r\n        return TranslateTimeline;\r\n    }(CurveTimeline$2));\r\n    /** Changes a bone's local {@link Bone#scaleX)} and {@link Bone#scaleY}. */\r\n    /**\r\n     * @public\r\n     */\r\n    var ScaleTimeline$2 = /** @class */ (function (_super) {\r\n        __extends$3(ScaleTimeline, _super);\r\n        function ScaleTimeline(frameCount) {\r\n            return _super.call(this, frameCount) || this;\r\n        }\r\n        ScaleTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType$1.scale << 24) + this.boneIndex;\r\n        };\r\n        ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var frames = this.frames;\r\n            var bone = skeleton.bones[this.boneIndex];\r\n            if (!bone.active)\r\n                return;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        bone.scaleX = bone.data.scaleX;\r\n                        bone.scaleY = bone.data.scaleY;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n                        bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var x = 0, y = 0;\r\n            if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) { // Time is after last frame.\r\n                x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\r\n                y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\r\n            }\r\n            else {\r\n                // Interpolate between the previous frame and the current frame.\r\n                var frame = Animation$2.binarySearch(frames, time, ScaleTimeline.ENTRIES);\r\n                x = frames[frame + ScaleTimeline.PREV_X];\r\n                y = frames[frame + ScaleTimeline.PREV_Y];\r\n                var frameTime = frames[frame];\r\n                var percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\r\n                x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\r\n                y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\r\n            }\r\n            if (alpha == 1) {\r\n                if (blend == exports.MixBlend.add) {\r\n                    bone.scaleX += x - bone.data.scaleX;\r\n                    bone.scaleY += y - bone.data.scaleY;\r\n                }\r\n                else {\r\n                    bone.scaleX = x;\r\n                    bone.scaleY = y;\r\n                }\r\n            }\r\n            else {\r\n                var bx = 0, by = 0;\r\n                if (direction == exports.MixDirection.mixOut) {\r\n                    switch (blend) {\r\n                        case exports.MixBlend.setup:\r\n                            bx = bone.data.scaleX;\r\n                            by = bone.data.scaleY;\r\n                            bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n                            bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n                            break;\r\n                        case exports.MixBlend.first:\r\n                        case exports.MixBlend.replace:\r\n                            bx = bone.scaleX;\r\n                            by = bone.scaleY;\r\n                            bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n                            bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n                            break;\r\n                        case exports.MixBlend.add:\r\n                            bx = bone.scaleX;\r\n                            by = bone.scaleY;\r\n                            bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bone.data.scaleX) * alpha;\r\n                            bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - bone.data.scaleY) * alpha;\r\n                    }\r\n                }\r\n                else {\r\n                    switch (blend) {\r\n                        case exports.MixBlend.setup:\r\n                            bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\r\n                            by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\r\n                            bone.scaleX = bx + (x - bx) * alpha;\r\n                            bone.scaleY = by + (y - by) * alpha;\r\n                            break;\r\n                        case exports.MixBlend.first:\r\n                        case exports.MixBlend.replace:\r\n                            bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\r\n                            by = Math.abs(bone.scaleY) * MathUtils.signum(y);\r\n                            bone.scaleX = bx + (x - bx) * alpha;\r\n                            bone.scaleY = by + (y - by) * alpha;\r\n                            break;\r\n                        case exports.MixBlend.add:\r\n                            bx = MathUtils.signum(x);\r\n                            by = MathUtils.signum(y);\r\n                            bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha;\r\n                            bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha;\r\n                    }\r\n                }\r\n            }\r\n        };\r\n        return ScaleTimeline;\r\n    }(TranslateTimeline$2));\r\n    /** Changes a bone's local {@link Bone#shearX} and {@link Bone#shearY}. */\r\n    /**\r\n     * @public\r\n     */\r\n    var ShearTimeline$2 = /** @class */ (function (_super) {\r\n        __extends$3(ShearTimeline, _super);\r\n        function ShearTimeline(frameCount) {\r\n            return _super.call(this, frameCount) || this;\r\n        }\r\n        ShearTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType$1.shear << 24) + this.boneIndex;\r\n        };\r\n        ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var frames = this.frames;\r\n            var bone = skeleton.bones[this.boneIndex];\r\n            if (!bone.active)\r\n                return;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        bone.shearX = bone.data.shearX;\r\n                        bone.shearY = bone.data.shearY;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n                        bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var x = 0, y = 0;\r\n            if (time >= frames[frames.length - ShearTimeline.ENTRIES]) { // Time is after last frame.\r\n                x = frames[frames.length + ShearTimeline.PREV_X];\r\n                y = frames[frames.length + ShearTimeline.PREV_Y];\r\n            }\r\n            else {\r\n                // Interpolate between the previous frame and the current frame.\r\n                var frame = Animation$2.binarySearch(frames, time, ShearTimeline.ENTRIES);\r\n                x = frames[frame + ShearTimeline.PREV_X];\r\n                y = frames[frame + ShearTimeline.PREV_Y];\r\n                var frameTime = frames[frame];\r\n                var percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\r\n                x = x + (frames[frame + ShearTimeline.X] - x) * percent;\r\n                y = y + (frames[frame + ShearTimeline.Y] - y) * percent;\r\n            }\r\n            switch (blend) {\r\n                case exports.MixBlend.setup:\r\n                    bone.shearX = bone.data.shearX + x * alpha;\r\n                    bone.shearY = bone.data.shearY + y * alpha;\r\n                    break;\r\n                case exports.MixBlend.first:\r\n                case exports.MixBlend.replace:\r\n                    bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n                    bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n                    break;\r\n                case exports.MixBlend.add:\r\n                    bone.shearX += x * alpha;\r\n                    bone.shearY += y * alpha;\r\n            }\r\n        };\r\n        return ShearTimeline;\r\n    }(TranslateTimeline$2));\r\n    /** Changes a slot's {@link Slot#color}. */\r\n    /**\r\n     * @public\r\n     */\r\n    var ColorTimeline$1 = /** @class */ (function (_super) {\r\n        __extends$3(ColorTimeline, _super);\r\n        function ColorTimeline(frameCount) {\r\n            var _this = _super.call(this, frameCount) || this;\r\n            _this.frames = Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\r\n            return _this;\r\n        }\r\n        ColorTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType$1.color << 24) + this.slotIndex;\r\n        };\r\n        /** Sets the time in seconds, red, green, blue, and alpha for the specified key frame. */\r\n        ColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a) {\r\n            frameIndex *= ColorTimeline.ENTRIES;\r\n            this.frames[frameIndex] = time;\r\n            this.frames[frameIndex + ColorTimeline.R] = r;\r\n            this.frames[frameIndex + ColorTimeline.G] = g;\r\n            this.frames[frameIndex + ColorTimeline.B] = b;\r\n            this.frames[frameIndex + ColorTimeline.A] = a;\r\n        };\r\n        ColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var slot = skeleton.slots[this.slotIndex];\r\n            if (!slot.bone.active)\r\n                return;\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        slot.color.setFromColor(slot.data.color);\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        var color = slot.color, setup = slot.data.color;\r\n                        color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha);\r\n                }\r\n                return;\r\n            }\r\n            var r = 0, g = 0, b = 0, a = 0;\r\n            if (time >= frames[frames.length - ColorTimeline.ENTRIES]) { // Time is after last frame.\r\n                var i = frames.length;\r\n                r = frames[i + ColorTimeline.PREV_R];\r\n                g = frames[i + ColorTimeline.PREV_G];\r\n                b = frames[i + ColorTimeline.PREV_B];\r\n                a = frames[i + ColorTimeline.PREV_A];\r\n            }\r\n            else {\r\n                // Interpolate between the previous frame and the current frame.\r\n                var frame = Animation$2.binarySearch(frames, time, ColorTimeline.ENTRIES);\r\n                r = frames[frame + ColorTimeline.PREV_R];\r\n                g = frames[frame + ColorTimeline.PREV_G];\r\n                b = frames[frame + ColorTimeline.PREV_B];\r\n                a = frames[frame + ColorTimeline.PREV_A];\r\n                var frameTime = frames[frame];\r\n                var percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\r\n                r += (frames[frame + ColorTimeline.R] - r) * percent;\r\n                g += (frames[frame + ColorTimeline.G] - g) * percent;\r\n                b += (frames[frame + ColorTimeline.B] - b) * percent;\r\n                a += (frames[frame + ColorTimeline.A] - a) * percent;\r\n            }\r\n            if (alpha == 1)\r\n                slot.color.set(r, g, b, a);\r\n            else {\r\n                var color = slot.color;\r\n                if (blend == exports.MixBlend.setup)\r\n                    color.setFromColor(slot.data.color);\r\n                color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\r\n            }\r\n        };\r\n        ColorTimeline.ENTRIES = 5;\r\n        ColorTimeline.PREV_TIME = -5;\r\n        ColorTimeline.PREV_R = -4;\r\n        ColorTimeline.PREV_G = -3;\r\n        ColorTimeline.PREV_B = -2;\r\n        ColorTimeline.PREV_A = -1;\r\n        ColorTimeline.R = 1;\r\n        ColorTimeline.G = 2;\r\n        ColorTimeline.B = 3;\r\n        ColorTimeline.A = 4;\r\n        return ColorTimeline;\r\n    }(CurveTimeline$2));\r\n    /** Changes a slot's {@link Slot#color} and {@link Slot#darkColor} for two color tinting. */\r\n    /**\r\n     * @public\r\n     */\r\n    var TwoColorTimeline$1 = /** @class */ (function (_super) {\r\n        __extends$3(TwoColorTimeline, _super);\r\n        function TwoColorTimeline(frameCount) {\r\n            var _this = _super.call(this, frameCount) || this;\r\n            _this.frames = Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\r\n            return _this;\r\n        }\r\n        TwoColorTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType$1.twoColor << 24) + this.slotIndex;\r\n        };\r\n        /** Sets the time in seconds, light, and dark colors for the specified key frame. */\r\n        TwoColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a, r2, g2, b2) {\r\n            frameIndex *= TwoColorTimeline.ENTRIES;\r\n            this.frames[frameIndex] = time;\r\n            this.frames[frameIndex + TwoColorTimeline.R] = r;\r\n            this.frames[frameIndex + TwoColorTimeline.G] = g;\r\n            this.frames[frameIndex + TwoColorTimeline.B] = b;\r\n            this.frames[frameIndex + TwoColorTimeline.A] = a;\r\n            this.frames[frameIndex + TwoColorTimeline.R2] = r2;\r\n            this.frames[frameIndex + TwoColorTimeline.G2] = g2;\r\n            this.frames[frameIndex + TwoColorTimeline.B2] = b2;\r\n        };\r\n        TwoColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var slot = skeleton.slots[this.slotIndex];\r\n            if (!slot.bone.active)\r\n                return;\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        slot.color.setFromColor(slot.data.color);\r\n                        slot.darkColor.setFromColor(slot.data.darkColor);\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        var light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n                        light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha);\r\n                        dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\r\n                }\r\n                return;\r\n            }\r\n            var r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n            if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) { // Time is after last frame.\r\n                var i = frames.length;\r\n                r = frames[i + TwoColorTimeline.PREV_R];\r\n                g = frames[i + TwoColorTimeline.PREV_G];\r\n                b = frames[i + TwoColorTimeline.PREV_B];\r\n                a = frames[i + TwoColorTimeline.PREV_A];\r\n                r2 = frames[i + TwoColorTimeline.PREV_R2];\r\n                g2 = frames[i + TwoColorTimeline.PREV_G2];\r\n                b2 = frames[i + TwoColorTimeline.PREV_B2];\r\n            }\r\n            else {\r\n                // Interpolate between the previous frame and the current frame.\r\n                var frame = Animation$2.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\r\n                r = frames[frame + TwoColorTimeline.PREV_R];\r\n                g = frames[frame + TwoColorTimeline.PREV_G];\r\n                b = frames[frame + TwoColorTimeline.PREV_B];\r\n                a = frames[frame + TwoColorTimeline.PREV_A];\r\n                r2 = frames[frame + TwoColorTimeline.PREV_R2];\r\n                g2 = frames[frame + TwoColorTimeline.PREV_G2];\r\n                b2 = frames[frame + TwoColorTimeline.PREV_B2];\r\n                var frameTime = frames[frame];\r\n                var percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\r\n                r += (frames[frame + TwoColorTimeline.R] - r) * percent;\r\n                g += (frames[frame + TwoColorTimeline.G] - g) * percent;\r\n                b += (frames[frame + TwoColorTimeline.B] - b) * percent;\r\n                a += (frames[frame + TwoColorTimeline.A] - a) * percent;\r\n                r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\r\n                g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\r\n                b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\r\n            }\r\n            if (alpha == 1) {\r\n                slot.color.set(r, g, b, a);\r\n                slot.darkColor.set(r2, g2, b2, 1);\r\n            }\r\n            else {\r\n                var light = slot.color, dark = slot.darkColor;\r\n                if (blend == exports.MixBlend.setup) {\r\n                    light.setFromColor(slot.data.color);\r\n                    dark.setFromColor(slot.data.darkColor);\r\n                }\r\n                light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\r\n                dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\r\n            }\r\n        };\r\n        TwoColorTimeline.ENTRIES = 8;\r\n        TwoColorTimeline.PREV_TIME = -8;\r\n        TwoColorTimeline.PREV_R = -7;\r\n        TwoColorTimeline.PREV_G = -6;\r\n        TwoColorTimeline.PREV_B = -5;\r\n        TwoColorTimeline.PREV_A = -4;\r\n        TwoColorTimeline.PREV_R2 = -3;\r\n        TwoColorTimeline.PREV_G2 = -2;\r\n        TwoColorTimeline.PREV_B2 = -1;\r\n        TwoColorTimeline.R = 1;\r\n        TwoColorTimeline.G = 2;\r\n        TwoColorTimeline.B = 3;\r\n        TwoColorTimeline.A = 4;\r\n        TwoColorTimeline.R2 = 5;\r\n        TwoColorTimeline.G2 = 6;\r\n        TwoColorTimeline.B2 = 7;\r\n        return TwoColorTimeline;\r\n    }(CurveTimeline$2));\r\n    /** Changes a slot's {@link Slot#attachment}. */\r\n    /**\r\n     * @public\r\n     */\r\n    var AttachmentTimeline$2 = /** @class */ (function () {\r\n        function AttachmentTimeline(frameCount) {\r\n            this.frames = Utils.newFloatArray(frameCount);\r\n            this.attachmentNames = new Array(frameCount);\r\n        }\r\n        AttachmentTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType$1.attachment << 24) + this.slotIndex;\r\n        };\r\n        /** The number of key frames for this timeline. */\r\n        AttachmentTimeline.prototype.getFrameCount = function () {\r\n            return this.frames.length;\r\n        };\r\n        /** Sets the time in seconds and the attachment name for the specified key frame. */\r\n        AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) {\r\n            this.frames[frameIndex] = time;\r\n            this.attachmentNames[frameIndex] = attachmentName;\r\n        };\r\n        AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var slot = skeleton.slots[this.slotIndex];\r\n            if (!slot.bone.active)\r\n                return;\r\n            if (direction == exports.MixDirection.mixOut) {\r\n                if (blend == exports.MixBlend.setup)\r\n                    this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n                return;\r\n            }\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                if (blend == exports.MixBlend.setup || blend == exports.MixBlend.first)\r\n                    this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n                return;\r\n            }\r\n            var frameIndex = 0;\r\n            if (time >= frames[frames.length - 1]) // Time is after last frame.\r\n                frameIndex = frames.length - 1;\r\n            else\r\n                frameIndex = Animation$2.binarySearch(frames, time, 1) - 1;\r\n            var attachmentName = this.attachmentNames[frameIndex];\r\n            skeleton.slots[this.slotIndex]\r\n                .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n        };\r\n        AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) {\r\n            slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n        };\r\n        return AttachmentTimeline;\r\n    }());\r\n    var zeros$1 = null;\r\n    /** Changes a slot's {@link Slot#deform} to deform a {@link VertexAttachment}. */\r\n    /**\r\n     * @public\r\n     */\r\n    var DeformTimeline$2 = /** @class */ (function (_super) {\r\n        __extends$3(DeformTimeline, _super);\r\n        function DeformTimeline(frameCount) {\r\n            var _this = _super.call(this, frameCount) || this;\r\n            _this.frames = Utils.newFloatArray(frameCount);\r\n            _this.frameVertices = new Array(frameCount);\r\n            if (zeros$1 == null)\r\n                zeros$1 = Utils.newFloatArray(64);\r\n            return _this;\r\n        }\r\n        DeformTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType$1.deform << 27) + +this.attachment.id + this.slotIndex;\r\n        };\r\n        /** Sets the time in seconds and the vertices for the specified key frame.\r\n         * @param vertices Vertex positions for an unweighted VertexAttachment, or deform offsets if it has weights. */\r\n        DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) {\r\n            this.frames[frameIndex] = time;\r\n            this.frameVertices[frameIndex] = vertices;\r\n        };\r\n        DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            var slot = skeleton.slots[this.slotIndex];\r\n            if (!slot.bone.active)\r\n                return;\r\n            var slotAttachment = slot.getAttachment();\r\n            if (!(slotAttachment instanceof VertexAttachment$2) || !(slotAttachment.deformAttachment == this.attachment))\r\n                return;\r\n            var deformArray = slot.deform;\r\n            if (deformArray.length == 0)\r\n                blend = exports.MixBlend.setup;\r\n            var frameVertices = this.frameVertices;\r\n            var vertexCount = frameVertices[0].length;\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                var vertexAttachment = slotAttachment;\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        deformArray.length = 0;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        if (alpha == 1) {\r\n                            deformArray.length = 0;\r\n                            break;\r\n                        }\r\n                        var deform_1 = Utils.setArraySize(deformArray, vertexCount);\r\n                        if (vertexAttachment.bones == null) {\r\n                            // Unweighted vertex positions.\r\n                            var setupVertices = vertexAttachment.vertices;\r\n                            for (var i = 0; i < vertexCount; i++)\r\n                                deform_1[i] += (setupVertices[i] - deform_1[i]) * alpha;\r\n                        }\r\n                        else {\r\n                            // Weighted deform offsets.\r\n                            alpha = 1 - alpha;\r\n                            for (var i = 0; i < vertexCount; i++)\r\n                                deform_1[i] *= alpha;\r\n                        }\r\n                }\r\n                return;\r\n            }\r\n            var deform = Utils.setArraySize(deformArray, vertexCount);\r\n            if (time >= frames[frames.length - 1]) { // Time is after last frame.\r\n                var lastVertices = frameVertices[frames.length - 1];\r\n                if (alpha == 1) {\r\n                    if (blend == exports.MixBlend.add) {\r\n                        var vertexAttachment = slotAttachment;\r\n                        if (vertexAttachment.bones == null) {\r\n                            // Unweighted vertex positions, with alpha.\r\n                            var setupVertices = vertexAttachment.vertices;\r\n                            for (var i_1 = 0; i_1 < vertexCount; i_1++) {\r\n                                deform[i_1] += lastVertices[i_1] - setupVertices[i_1];\r\n                            }\r\n                        }\r\n                        else {\r\n                            // Weighted deform offsets, with alpha.\r\n                            for (var i_2 = 0; i_2 < vertexCount; i_2++)\r\n                                deform[i_2] += lastVertices[i_2];\r\n                        }\r\n                    }\r\n                    else {\r\n                        Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\r\n                    }\r\n                }\r\n                else {\r\n                    switch (blend) {\r\n                        case exports.MixBlend.setup: {\r\n                            var vertexAttachment_1 = slotAttachment;\r\n                            if (vertexAttachment_1.bones == null) {\r\n                                // Unweighted vertex positions, with alpha.\r\n                                var setupVertices = vertexAttachment_1.vertices;\r\n                                for (var i_3 = 0; i_3 < vertexCount; i_3++) {\r\n                                    var setup = setupVertices[i_3];\r\n                                    deform[i_3] = setup + (lastVertices[i_3] - setup) * alpha;\r\n                                }\r\n                            }\r\n                            else {\r\n                                // Weighted deform offsets, with alpha.\r\n                                for (var i_4 = 0; i_4 < vertexCount; i_4++)\r\n                                    deform[i_4] = lastVertices[i_4] * alpha;\r\n                            }\r\n                            break;\r\n                        }\r\n                        case exports.MixBlend.first:\r\n                        case exports.MixBlend.replace:\r\n                            for (var i_5 = 0; i_5 < vertexCount; i_5++)\r\n                                deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha;\r\n                            break;\r\n                        case exports.MixBlend.add:\r\n                            var vertexAttachment = slotAttachment;\r\n                            if (vertexAttachment.bones == null) {\r\n                                // Unweighted vertex positions, with alpha.\r\n                                var setupVertices = vertexAttachment.vertices;\r\n                                for (var i_6 = 0; i_6 < vertexCount; i_6++) {\r\n                                    deform[i_6] += (lastVertices[i_6] - setupVertices[i_6]) * alpha;\r\n                                }\r\n                            }\r\n                            else {\r\n                                // Weighted deform offsets, with alpha.\r\n                                for (var i_7 = 0; i_7 < vertexCount; i_7++)\r\n                                    deform[i_7] += lastVertices[i_7] * alpha;\r\n                            }\r\n                    }\r\n                }\r\n                return;\r\n            }\r\n            // Interpolate between the previous frame and the current frame.\r\n            var frame = Animation$2.binarySearch(frames, time);\r\n            var prevVertices = frameVertices[frame - 1];\r\n            var nextVertices = frameVertices[frame];\r\n            var frameTime = frames[frame];\r\n            var percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\r\n            if (alpha == 1) {\r\n                if (blend == exports.MixBlend.add) {\r\n                    var vertexAttachment = slotAttachment;\r\n                    if (vertexAttachment.bones == null) {\r\n                        // Unweighted vertex positions, with alpha.\r\n                        var setupVertices = vertexAttachment.vertices;\r\n                        for (var i_8 = 0; i_8 < vertexCount; i_8++) {\r\n                            var prev = prevVertices[i_8];\r\n                            deform[i_8] += prev + (nextVertices[i_8] - prev) * percent - setupVertices[i_8];\r\n                        }\r\n                    }\r\n                    else {\r\n                        // Weighted deform offsets, with alpha.\r\n                        for (var i_9 = 0; i_9 < vertexCount; i_9++) {\r\n                            var prev = prevVertices[i_9];\r\n                            deform[i_9] += prev + (nextVertices[i_9] - prev) * percent;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    for (var i_10 = 0; i_10 < vertexCount; i_10++) {\r\n                        var prev = prevVertices[i_10];\r\n                        deform[i_10] = prev + (nextVertices[i_10] - prev) * percent;\r\n                    }\r\n                }\r\n            }\r\n            else {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup: {\r\n                        var vertexAttachment_2 = slotAttachment;\r\n                        if (vertexAttachment_2.bones == null) {\r\n                            // Unweighted vertex positions, with alpha.\r\n                            var setupVertices = vertexAttachment_2.vertices;\r\n                            for (var i_11 = 0; i_11 < vertexCount; i_11++) {\r\n                                var prev = prevVertices[i_11], setup = setupVertices[i_11];\r\n                                deform[i_11] = setup + (prev + (nextVertices[i_11] - prev) * percent - setup) * alpha;\r\n                            }\r\n                        }\r\n                        else {\r\n                            // Weighted deform offsets, with alpha.\r\n                            for (var i_12 = 0; i_12 < vertexCount; i_12++) {\r\n                                var prev = prevVertices[i_12];\r\n                                deform[i_12] = (prev + (nextVertices[i_12] - prev) * percent) * alpha;\r\n                            }\r\n                        }\r\n                        break;\r\n                    }\r\n                    case exports.MixBlend.first:\r\n                    case exports.MixBlend.replace:\r\n                        for (var i_13 = 0; i_13 < vertexCount; i_13++) {\r\n                            var prev = prevVertices[i_13];\r\n                            deform[i_13] += (prev + (nextVertices[i_13] - prev) * percent - deform[i_13]) * alpha;\r\n                        }\r\n                        break;\r\n                    case exports.MixBlend.add:\r\n                        var vertexAttachment = slotAttachment;\r\n                        if (vertexAttachment.bones == null) {\r\n                            // Unweighted vertex positions, with alpha.\r\n                            var setupVertices = vertexAttachment.vertices;\r\n                            for (var i_14 = 0; i_14 < vertexCount; i_14++) {\r\n                                var prev = prevVertices[i_14];\r\n                                deform[i_14] += (prev + (nextVertices[i_14] - prev) * percent - setupVertices[i_14]) * alpha;\r\n                            }\r\n                        }\r\n                        else {\r\n                            // Weighted deform offsets, with alpha.\r\n                            for (var i_15 = 0; i_15 < vertexCount; i_15++) {\r\n                                var prev = prevVertices[i_15];\r\n                                deform[i_15] += (prev + (nextVertices[i_15] - prev) * percent) * alpha;\r\n                            }\r\n                        }\r\n                }\r\n            }\r\n        };\r\n        return DeformTimeline;\r\n    }(CurveTimeline$2));\r\n    /** Fires an {@link Event} when specific animation times are reached. */\r\n    /**\r\n     * @public\r\n     */\r\n    var EventTimeline$2 = /** @class */ (function () {\r\n        function EventTimeline(frameCount) {\r\n            this.frames = Utils.newFloatArray(frameCount);\r\n            this.events = new Array(frameCount);\r\n        }\r\n        EventTimeline.prototype.getPropertyId = function () {\r\n            return TimelineType$1.event << 24;\r\n        };\r\n        /** The number of key frames for this timeline. */\r\n        EventTimeline.prototype.getFrameCount = function () {\r\n            return this.frames.length;\r\n        };\r\n        /** Sets the time in seconds and the event for the specified key frame. */\r\n        EventTimeline.prototype.setFrame = function (frameIndex, event) {\r\n            this.frames[frameIndex] = event.time;\r\n            this.events[frameIndex] = event;\r\n        };\r\n        /** Fires events for frames > `lastTime` and <= `time`. */\r\n        EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            if (firedEvents == null)\r\n                return;\r\n            var frames = this.frames;\r\n            var frameCount = this.frames.length;\r\n            if (lastTime > time) { // Fire events after last time for looped animations.\r\n                this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\r\n                lastTime = -1;\r\n            }\r\n            else if (lastTime >= frames[frameCount - 1]) // Last time is after last frame.\r\n                return;\r\n            if (time < frames[0])\r\n                return; // Time is before first frame.\r\n            var frame = 0;\r\n            if (lastTime < frames[0])\r\n                frame = 0;\r\n            else {\r\n                frame = Animation$2.binarySearch(frames, lastTime);\r\n                var frameTime = frames[frame];\r\n                while (frame > 0) { // Fire multiple events with the same frame.\r\n                    if (frames[frame - 1] != frameTime)\r\n                        break;\r\n                    frame--;\r\n                }\r\n            }\r\n            for (; frame < frameCount && time >= frames[frame]; frame++)\r\n                firedEvents.push(this.events[frame]);\r\n        };\r\n        return EventTimeline;\r\n    }());\r\n    /** Changes a skeleton's {@link Skeleton#drawOrder}. */\r\n    /**\r\n     * @public\r\n     */\r\n    var DrawOrderTimeline$2 = /** @class */ (function () {\r\n        function DrawOrderTimeline(frameCount) {\r\n            this.frames = Utils.newFloatArray(frameCount);\r\n            this.drawOrders = new Array(frameCount);\r\n        }\r\n        DrawOrderTimeline.prototype.getPropertyId = function () {\r\n            return TimelineType$1.drawOrder << 24;\r\n        };\r\n        /** The number of key frames for this timeline. */\r\n        DrawOrderTimeline.prototype.getFrameCount = function () {\r\n            return this.frames.length;\r\n        };\r\n        /** Sets the time in seconds and the draw order for the specified key frame.\r\n         * @param drawOrder For each slot in {@link Skeleton#slots}, the index of the new draw order. May be null to use setup pose\r\n         *           draw order. */\r\n        DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) {\r\n            this.frames[frameIndex] = time;\r\n            this.drawOrders[frameIndex] = drawOrder;\r\n        };\r\n        DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            var drawOrder = skeleton.drawOrder;\r\n            var slots = skeleton.slots;\r\n            if (direction == exports.MixDirection.mixOut && blend == exports.MixBlend.setup) {\r\n                Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n                return;\r\n            }\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                if (blend == exports.MixBlend.setup || blend == exports.MixBlend.first)\r\n                    Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n                return;\r\n            }\r\n            var frame = 0;\r\n            if (time >= frames[frames.length - 1]) // Time is after last frame.\r\n                frame = frames.length - 1;\r\n            else\r\n                frame = Animation$2.binarySearch(frames, time) - 1;\r\n            var drawOrderToSetupIndex = this.drawOrders[frame];\r\n            if (drawOrderToSetupIndex == null)\r\n                Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\r\n            else {\r\n                for (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\r\n                    drawOrder[i] = slots[drawOrderToSetupIndex[i]];\r\n            }\r\n        };\r\n        return DrawOrderTimeline;\r\n    }());\r\n    /** Changes an IK constraint's {@link IkConstraint#mix}, {@link IkConstraint#softness},\r\n     * {@link IkConstraint#bendDirection}, {@link IkConstraint#stretch}, and {@link IkConstraint#compress}. */\r\n    /**\r\n     * @public\r\n     */\r\n    var IkConstraintTimeline$2 = /** @class */ (function (_super) {\r\n        __extends$3(IkConstraintTimeline, _super);\r\n        function IkConstraintTimeline(frameCount) {\r\n            var _this = _super.call(this, frameCount) || this;\r\n            _this.frames = Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\r\n            return _this;\r\n        }\r\n        IkConstraintTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType$1.ikConstraint << 24) + this.ikConstraintIndex;\r\n        };\r\n        /** Sets the time in seconds, mix, softness, bend direction, compress, and stretch for the specified key frame. */\r\n        IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, softness, bendDirection, compress, stretch) {\r\n            frameIndex *= IkConstraintTimeline.ENTRIES;\r\n            this.frames[frameIndex] = time;\r\n            this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\r\n            this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness;\r\n            this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\r\n            this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0;\r\n            this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0;\r\n        };\r\n        IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            var frames = this.frames;\r\n            var constraint = skeleton.ikConstraints[this.ikConstraintIndex];\r\n            if (!constraint.active)\r\n                return;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        constraint.mix = constraint.data.mix;\r\n                        constraint.softness = constraint.data.softness;\r\n                        constraint.bendDirection = constraint.data.bendDirection;\r\n                        constraint.compress = constraint.data.compress;\r\n                        constraint.stretch = constraint.data.stretch;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\r\n                        constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\r\n                        constraint.bendDirection = constraint.data.bendDirection;\r\n                        constraint.compress = constraint.data.compress;\r\n                        constraint.stretch = constraint.data.stretch;\r\n                }\r\n                return;\r\n            }\r\n            if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) { // Time is after last frame.\r\n                if (blend == exports.MixBlend.setup) {\r\n                    constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\r\n                    constraint.softness = constraint.data.softness\r\n                        + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha;\r\n                    if (direction == exports.MixDirection.mixOut) {\r\n                        constraint.bendDirection = constraint.data.bendDirection;\r\n                        constraint.compress = constraint.data.compress;\r\n                        constraint.stretch = constraint.data.stretch;\r\n                    }\r\n                    else {\r\n                        constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n                        constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n                        constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n                    }\r\n                }\r\n                else {\r\n                    constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\r\n                    constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha;\r\n                    if (direction == exports.MixDirection.mixIn) {\r\n                        constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n                        constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n                        constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n                    }\r\n                }\r\n                return;\r\n            }\r\n            // Interpolate between the previous frame and the current frame.\r\n            var frame = Animation$2.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\r\n            var mix = frames[frame + IkConstraintTimeline.PREV_MIX];\r\n            var softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS];\r\n            var frameTime = frames[frame];\r\n            var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\r\n            if (blend == exports.MixBlend.setup) {\r\n                constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\r\n                constraint.softness = constraint.data.softness\r\n                    + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha;\r\n                if (direction == exports.MixDirection.mixOut) {\r\n                    constraint.bendDirection = constraint.data.bendDirection;\r\n                    constraint.compress = constraint.data.compress;\r\n                    constraint.stretch = constraint.data.stretch;\r\n                }\r\n                else {\r\n                    constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n                    constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n                    constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n                }\r\n            }\r\n            else {\r\n                constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\r\n                constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha;\r\n                if (direction == exports.MixDirection.mixIn) {\r\n                    constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n                    constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n                    constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n                }\r\n            }\r\n        };\r\n        IkConstraintTimeline.ENTRIES = 6;\r\n        IkConstraintTimeline.PREV_TIME = -6;\r\n        IkConstraintTimeline.PREV_MIX = -5;\r\n        IkConstraintTimeline.PREV_SOFTNESS = -4;\r\n        IkConstraintTimeline.PREV_BEND_DIRECTION = -3;\r\n        IkConstraintTimeline.PREV_COMPRESS = -2;\r\n        IkConstraintTimeline.PREV_STRETCH = -1;\r\n        IkConstraintTimeline.MIX = 1;\r\n        IkConstraintTimeline.SOFTNESS = 2;\r\n        IkConstraintTimeline.BEND_DIRECTION = 3;\r\n        IkConstraintTimeline.COMPRESS = 4;\r\n        IkConstraintTimeline.STRETCH = 5;\r\n        return IkConstraintTimeline;\r\n    }(CurveTimeline$2));\r\n    /** Changes a transform constraint's {@link TransformConstraint#rotateMix}, {@link TransformConstraint#translateMix},\r\n     * {@link TransformConstraint#scaleMix}, and {@link TransformConstraint#shearMix}. */\r\n    /**\r\n     * @public\r\n     */\r\n    var TransformConstraintTimeline$2 = /** @class */ (function (_super) {\r\n        __extends$3(TransformConstraintTimeline, _super);\r\n        function TransformConstraintTimeline(frameCount) {\r\n            var _this = _super.call(this, frameCount) || this;\r\n            _this.frames = Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\r\n            return _this;\r\n        }\r\n        TransformConstraintTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType$1.transformConstraint << 24) + this.transformConstraintIndex;\r\n        };\r\n        /** The time in seconds, rotate mix, translate mix, scale mix, and shear mix for the specified key frame. */\r\n        TransformConstraintTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix) {\r\n            frameIndex *= TransformConstraintTimeline.ENTRIES;\r\n            this.frames[frameIndex] = time;\r\n            this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\r\n            this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\r\n            this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\r\n            this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\r\n        };\r\n        TransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            var frames = this.frames;\r\n            var constraint = skeleton.transformConstraints[this.transformConstraintIndex];\r\n            if (!constraint.active)\r\n                return;\r\n            if (time < frames[0]) {\r\n                var data = constraint.data;\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        constraint.rotateMix = data.rotateMix;\r\n                        constraint.translateMix = data.translateMix;\r\n                        constraint.scaleMix = data.scaleMix;\r\n                        constraint.shearMix = data.shearMix;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\r\n                        constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\r\n                        constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\r\n                        constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var rotate = 0, translate = 0, scale = 0, shear = 0;\r\n            if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) { // Time is after last frame.\r\n                var i = frames.length;\r\n                rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\r\n                translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\r\n                scale = frames[i + TransformConstraintTimeline.PREV_SCALE];\r\n                shear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\r\n            }\r\n            else {\r\n                // Interpolate between the previous frame and the current frame.\r\n                var frame = Animation$2.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\r\n                rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\r\n                translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\r\n                scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\r\n                shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\r\n                var frameTime = frames[frame];\r\n                var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\r\n                rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\r\n                translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\r\n                scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\r\n                shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\r\n            }\r\n            if (blend == exports.MixBlend.setup) {\r\n                var data = constraint.data;\r\n                constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\r\n                constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\r\n                constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\r\n                constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\r\n            }\r\n            else {\r\n                constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n                constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n                constraint.scaleMix += (scale - constraint.scaleMix) * alpha;\r\n                constraint.shearMix += (shear - constraint.shearMix) * alpha;\r\n            }\r\n        };\r\n        TransformConstraintTimeline.ENTRIES = 5;\r\n        TransformConstraintTimeline.PREV_TIME = -5;\r\n        TransformConstraintTimeline.PREV_ROTATE = -4;\r\n        TransformConstraintTimeline.PREV_TRANSLATE = -3;\r\n        TransformConstraintTimeline.PREV_SCALE = -2;\r\n        TransformConstraintTimeline.PREV_SHEAR = -1;\r\n        TransformConstraintTimeline.ROTATE = 1;\r\n        TransformConstraintTimeline.TRANSLATE = 2;\r\n        TransformConstraintTimeline.SCALE = 3;\r\n        TransformConstraintTimeline.SHEAR = 4;\r\n        return TransformConstraintTimeline;\r\n    }(CurveTimeline$2));\r\n    /** Changes a path constraint's {@link PathConstraint#position}. */\r\n    /**\r\n     * @public\r\n     */\r\n    var PathConstraintPositionTimeline$2 = /** @class */ (function (_super) {\r\n        __extends$3(PathConstraintPositionTimeline, _super);\r\n        function PathConstraintPositionTimeline(frameCount) {\r\n            var _this = _super.call(this, frameCount) || this;\r\n            _this.frames = Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\r\n            return _this;\r\n        }\r\n        PathConstraintPositionTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType$1.pathConstraintPosition << 24) + this.pathConstraintIndex;\r\n        };\r\n        /** Sets the time in seconds and path constraint position for the specified key frame. */\r\n        PathConstraintPositionTimeline.prototype.setFrame = function (frameIndex, time, value) {\r\n            frameIndex *= PathConstraintPositionTimeline.ENTRIES;\r\n            this.frames[frameIndex] = time;\r\n            this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\r\n        };\r\n        PathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            var frames = this.frames;\r\n            var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n            if (!constraint.active)\r\n                return;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        constraint.position = constraint.data.position;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        constraint.position += (constraint.data.position - constraint.position) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var position = 0;\r\n            if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES]) // Time is after last frame.\r\n                position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\r\n            else {\r\n                // Interpolate between the previous frame and the current frame.\r\n                var frame = Animation$2.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\r\n                position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\r\n                var frameTime = frames[frame];\r\n                var percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\r\n                position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\r\n            }\r\n            if (blend == exports.MixBlend.setup)\r\n                constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\r\n            else\r\n                constraint.position += (position - constraint.position) * alpha;\r\n        };\r\n        PathConstraintPositionTimeline.ENTRIES = 2;\r\n        PathConstraintPositionTimeline.PREV_TIME = -2;\r\n        PathConstraintPositionTimeline.PREV_VALUE = -1;\r\n        PathConstraintPositionTimeline.VALUE = 1;\r\n        return PathConstraintPositionTimeline;\r\n    }(CurveTimeline$2));\r\n    /** Changes a path constraint's {@link PathConstraint#spacing}. */\r\n    /**\r\n     * @public\r\n     */\r\n    var PathConstraintSpacingTimeline$2 = /** @class */ (function (_super) {\r\n        __extends$3(PathConstraintSpacingTimeline, _super);\r\n        function PathConstraintSpacingTimeline(frameCount) {\r\n            return _super.call(this, frameCount) || this;\r\n        }\r\n        PathConstraintSpacingTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType$1.pathConstraintSpacing << 24) + this.pathConstraintIndex;\r\n        };\r\n        PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            var frames = this.frames;\r\n            var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n            if (!constraint.active)\r\n                return;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        constraint.spacing = constraint.data.spacing;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var spacing = 0;\r\n            if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES]) // Time is after last frame.\r\n                spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\r\n            else {\r\n                // Interpolate between the previous frame and the current frame.\r\n                var frame = Animation$2.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\r\n                spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\r\n                var frameTime = frames[frame];\r\n                var percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\r\n                spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\r\n            }\r\n            if (blend == exports.MixBlend.setup)\r\n                constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\r\n            else\r\n                constraint.spacing += (spacing - constraint.spacing) * alpha;\r\n        };\r\n        return PathConstraintSpacingTimeline;\r\n    }(PathConstraintPositionTimeline$2));\r\n    /** Changes a transform constraint's {@link PathConstraint#rotateMix} and\r\n     * {@link TransformConstraint#translateMix}. */\r\n    /**\r\n     * @public\r\n     */\r\n    var PathConstraintMixTimeline$2 = /** @class */ (function (_super) {\r\n        __extends$3(PathConstraintMixTimeline, _super);\r\n        function PathConstraintMixTimeline(frameCount) {\r\n            var _this = _super.call(this, frameCount) || this;\r\n            _this.frames = Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\r\n            return _this;\r\n        }\r\n        PathConstraintMixTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType$1.pathConstraintMix << 24) + this.pathConstraintIndex;\r\n        };\r\n        /** The time in seconds, rotate mix, and translate mix for the specified key frame. */\r\n        PathConstraintMixTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix) {\r\n            frameIndex *= PathConstraintMixTimeline.ENTRIES;\r\n            this.frames[frameIndex] = time;\r\n            this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\r\n            this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\r\n        };\r\n        PathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            var frames = this.frames;\r\n            var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n            if (!constraint.active)\r\n                return;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        constraint.rotateMix = constraint.data.rotateMix;\r\n                        constraint.translateMix = constraint.data.translateMix;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\r\n                        constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var rotate = 0, translate = 0;\r\n            if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) { // Time is after last frame.\r\n                rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\r\n                translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n            }\r\n            else {\r\n                // Interpolate between the previous frame and the current frame.\r\n                var frame = Animation$2.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\r\n                rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\r\n                translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n                var frameTime = frames[frame];\r\n                var percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\r\n                rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\r\n                translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\r\n            }\r\n            if (blend == exports.MixBlend.setup) {\r\n                constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\r\n                constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\r\n            }\r\n            else {\r\n                constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n                constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n            }\r\n        };\r\n        PathConstraintMixTimeline.ENTRIES = 3;\r\n        PathConstraintMixTimeline.PREV_TIME = -3;\r\n        PathConstraintMixTimeline.PREV_ROTATE = -2;\r\n        PathConstraintMixTimeline.PREV_TRANSLATE = -1;\r\n        PathConstraintMixTimeline.ROTATE = 1;\r\n        PathConstraintMixTimeline.TRANSLATE = 2;\r\n        return PathConstraintMixTimeline;\r\n    }(CurveTimeline$2));\n\n    /** Applies animations over time, queues animations for later playback, mixes (crossfading) between animations, and applies\r\n     * multiple animations on top of each other (layering).\r\n     *\r\n     * See [Applying Animations](http://esotericsoftware.com/spine-applying-animations/) in the Spine Runtimes Guide. */\r\n    /**\r\n     * @public\r\n     */\r\n    var AnimationState$2 = /** @class */ (function () {\r\n        function AnimationState(data) {\r\n            /** The list of tracks that currently have animations, which may contain null entries. */\r\n            this.tracks = new Array();\r\n            /** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower\r\n             * or faster. Defaults to 1.\r\n             *\r\n             * See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */\r\n            this.timeScale = 1;\r\n            this.unkeyedState = 0;\r\n            this.events = new Array();\r\n            this.listeners = new Array();\r\n            this.queue = new EventQueue$2(this);\r\n            this.propertyIDs = new IntSet();\r\n            this.animationsChanged = false;\r\n            this.trackEntryPool = new Pool(function () { return new TrackEntry$2(); });\r\n            this.data = data;\r\n        }\r\n        /** Increments each track entry {@link TrackEntry#trackTime()}, setting queued animations as current if needed. */\r\n        AnimationState.prototype.update = function (delta) {\r\n            delta *= this.timeScale;\r\n            var tracks = this.tracks;\r\n            for (var i = 0, n = tracks.length; i < n; i++) {\r\n                var current = tracks[i];\r\n                if (current == null)\r\n                    continue;\r\n                current.animationLast = current.nextAnimationLast;\r\n                current.trackLast = current.nextTrackLast;\r\n                var currentDelta = delta * current.timeScale;\r\n                if (current.delay > 0) {\r\n                    current.delay -= currentDelta;\r\n                    if (current.delay > 0)\r\n                        continue;\r\n                    currentDelta = -current.delay;\r\n                    current.delay = 0;\r\n                }\r\n                var next = current.next;\r\n                if (next != null) {\r\n                    // When the next entry's delay is passed, change to the next entry, preserving leftover time.\r\n                    var nextTime = current.trackLast - next.delay;\r\n                    if (nextTime >= 0) {\r\n                        next.delay = 0;\r\n                        next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\r\n                        current.trackTime += currentDelta;\r\n                        this.setCurrent(i, next, true);\r\n                        while (next.mixingFrom != null) {\r\n                            next.mixTime += delta;\r\n                            next = next.mixingFrom;\r\n                        }\r\n                        continue;\r\n                    }\r\n                }\r\n                else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\r\n                    tracks[i] = null;\r\n                    this.queue.end(current);\r\n                    this.disposeNext(current);\r\n                    continue;\r\n                }\r\n                if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\r\n                    // End mixing from entries once all have completed.\r\n                    var from = current.mixingFrom;\r\n                    current.mixingFrom = null;\r\n                    if (from != null)\r\n                        from.mixingTo = null;\r\n                    while (from != null) {\r\n                        this.queue.end(from);\r\n                        from = from.mixingFrom;\r\n                    }\r\n                }\r\n                current.trackTime += currentDelta;\r\n            }\r\n            this.queue.drain();\r\n        };\r\n        /** Returns true when all mixing from entries are complete. */\r\n        AnimationState.prototype.updateMixingFrom = function (to, delta) {\r\n            var from = to.mixingFrom;\r\n            if (from == null)\r\n                return true;\r\n            var finished = this.updateMixingFrom(from, delta);\r\n            from.animationLast = from.nextAnimationLast;\r\n            from.trackLast = from.nextTrackLast;\r\n            // Require mixTime > 0 to ensure the mixing from entry was applied at least once.\r\n            if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\r\n                // Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame).\r\n                if (from.totalAlpha == 0 || to.mixDuration == 0) {\r\n                    to.mixingFrom = from.mixingFrom;\r\n                    if (from.mixingFrom != null)\r\n                        from.mixingFrom.mixingTo = to;\r\n                    to.interruptAlpha = from.interruptAlpha;\r\n                    this.queue.end(from);\r\n                }\r\n                return finished;\r\n            }\r\n            from.trackTime += delta * from.timeScale;\r\n            to.mixTime += delta;\r\n            return false;\r\n        };\r\n        /** Poses the skeleton using the track entry animations. There are no side effects other than invoking listeners, so the\r\n         * animation state can be applied to multiple skeletons to pose them identically.\r\n         * @returns True if any animations were applied. */\r\n        AnimationState.prototype.apply = function (skeleton) {\r\n            if (skeleton == null)\r\n                throw new Error(\"skeleton cannot be null.\");\r\n            if (this.animationsChanged)\r\n                this._animationsChanged();\r\n            var events = this.events;\r\n            var tracks = this.tracks;\r\n            var applied = false;\r\n            for (var i_1 = 0, n_1 = tracks.length; i_1 < n_1; i_1++) {\r\n                var current = tracks[i_1];\r\n                if (current == null || current.delay > 0)\r\n                    continue;\r\n                applied = true;\r\n                var blend = i_1 == 0 ? exports.MixBlend.first : current.mixBlend;\r\n                // Apply mixing from entries first.\r\n                var mix = current.alpha;\r\n                if (current.mixingFrom != null)\r\n                    mix *= this.applyMixingFrom(current, skeleton, blend);\r\n                else if (current.trackTime >= current.trackEnd && current.next == null)\r\n                    mix = 0;\r\n                // Apply current entry.\r\n                var animationLast = current.animationLast, animationTime = current.getAnimationTime();\r\n                var timelineCount = current.animation.timelines.length;\r\n                var timelines = current.animation.timelines;\r\n                if ((i_1 == 0 && mix == 1) || blend == exports.MixBlend.add) {\r\n                    for (var ii = 0; ii < timelineCount; ii++) {\r\n                        // Fixes issue #302 on IOS9 where mix, blend sometimes became undefined and caused assets\r\n                        // to sometimes stop rendering when using color correction, as their RGBA values become NaN.\r\n                        // (https://github.com/pixijs/pixi-spine/issues/302)\r\n                        Utils.webkit602BugfixHelper(mix, blend);\r\n                        var timeline = timelines[ii];\r\n                        if (timeline instanceof AttachmentTimeline$2)\r\n                            this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true);\r\n                        else\r\n                            timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, exports.MixDirection.mixIn);\r\n                    }\r\n                }\r\n                else {\r\n                    var timelineMode = current.timelineMode;\r\n                    var firstFrame = current.timelinesRotation.length == 0;\r\n                    if (firstFrame)\r\n                        Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\r\n                    var timelinesRotation = current.timelinesRotation;\r\n                    for (var ii = 0; ii < timelineCount; ii++) {\r\n                        var timeline_1 = timelines[ii];\r\n                        var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : exports.MixBlend.setup;\r\n                        if (timeline_1 instanceof RotateTimeline$2) {\r\n                            this.applyRotateTimeline(timeline_1, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);\r\n                        }\r\n                        else if (timeline_1 instanceof AttachmentTimeline$2) {\r\n                            this.applyAttachmentTimeline(timeline_1, skeleton, animationTime, blend, true);\r\n                        }\r\n                        else {\r\n                            // This fixes the WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109\r\n                            Utils.webkit602BugfixHelper(mix, blend);\r\n                            timeline_1.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, exports.MixDirection.mixIn);\r\n                        }\r\n                    }\r\n                }\r\n                this.queueEvents(current, animationTime);\r\n                events.length = 0;\r\n                current.nextAnimationLast = animationTime;\r\n                current.nextTrackLast = current.trackTime;\r\n            }\r\n            // Set slots attachments to the setup pose, if needed. This occurs if an animation that is mixing out sets attachments so\r\n            // subsequent timelines see any deform, but the subsequent timelines don't set an attachment (eg they are also mixing out or\r\n            // the time is before the first key).\r\n            var setupState = this.unkeyedState + AnimationState.SETUP;\r\n            var slots = skeleton.slots;\r\n            for (var i = 0, n = skeleton.slots.length; i < n; i++) {\r\n                var slot = slots[i];\r\n                if (slot.attachmentState == setupState) {\r\n                    var attachmentName = slot.data.attachmentName;\r\n                    slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n                }\r\n            }\r\n            this.unkeyedState += 2; // Increasing after each use avoids the need to reset attachmentState for every slot.\r\n            this.queue.drain();\r\n            return applied;\r\n        };\r\n        AnimationState.prototype.applyMixingFrom = function (to, skeleton, blend) {\r\n            var from = to.mixingFrom;\r\n            if (from.mixingFrom != null)\r\n                this.applyMixingFrom(from, skeleton, blend);\r\n            var mix = 0;\r\n            if (to.mixDuration == 0) { // Single frame mix to undo mixingFrom changes.\r\n                mix = 1;\r\n                if (blend == exports.MixBlend.first)\r\n                    blend = exports.MixBlend.setup;\r\n            }\r\n            else {\r\n                mix = to.mixTime / to.mixDuration;\r\n                if (mix > 1)\r\n                    mix = 1;\r\n                if (blend != exports.MixBlend.first)\r\n                    blend = from.mixBlend;\r\n            }\r\n            var events = mix < from.eventThreshold ? this.events : null;\r\n            var attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\r\n            var animationLast = from.animationLast, animationTime = from.getAnimationTime();\r\n            var timelineCount = from.animation.timelines.length;\r\n            var timelines = from.animation.timelines;\r\n            var alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\r\n            if (blend == exports.MixBlend.add) {\r\n                for (var i = 0; i < timelineCount; i++)\r\n                    timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, exports.MixDirection.mixOut);\r\n            }\r\n            else {\r\n                var timelineMode = from.timelineMode;\r\n                var timelineHoldMix = from.timelineHoldMix;\r\n                var firstFrame = from.timelinesRotation.length == 0;\r\n                if (firstFrame)\r\n                    Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\r\n                var timelinesRotation = from.timelinesRotation;\r\n                from.totalAlpha = 0;\r\n                for (var i = 0; i < timelineCount; i++) {\r\n                    var timeline = timelines[i];\r\n                    var direction = exports.MixDirection.mixOut;\r\n                    var timelineBlend = void 0;\r\n                    var alpha = 0;\r\n                    switch (timelineMode[i]) {\r\n                        case AnimationState.SUBSEQUENT:\r\n                            if (!drawOrder && timeline instanceof DrawOrderTimeline$2)\r\n                                continue;\r\n                            timelineBlend = blend;\r\n                            alpha = alphaMix;\r\n                            break;\r\n                        case AnimationState.FIRST:\r\n                            timelineBlend = exports.MixBlend.setup;\r\n                            alpha = alphaMix;\r\n                            break;\r\n                        case AnimationState.HOLD_SUBSEQUENT:\r\n                            timelineBlend = blend;\r\n                            alpha = alphaHold;\r\n                            break;\r\n                        case AnimationState.HOLD_FIRST:\r\n                            timelineBlend = exports.MixBlend.setup;\r\n                            alpha = alphaHold;\r\n                            break;\r\n                        default:\r\n                            timelineBlend = exports.MixBlend.setup;\r\n                            var holdMix = timelineHoldMix[i];\r\n                            alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\r\n                            break;\r\n                    }\r\n                    from.totalAlpha += alpha;\r\n                    if (timeline instanceof RotateTimeline$2)\r\n                        this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);\r\n                    else if (timeline instanceof AttachmentTimeline$2)\r\n                        this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments);\r\n                    else {\r\n                        // This fixes the WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109\r\n                        Utils.webkit602BugfixHelper(alpha, blend);\r\n                        if (drawOrder && timeline instanceof DrawOrderTimeline$2 && timelineBlend == exports.MixBlend.setup)\r\n                            direction = exports.MixDirection.mixIn;\r\n                        timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);\r\n                    }\r\n                }\r\n            }\r\n            if (to.mixDuration > 0)\r\n                this.queueEvents(from, animationTime);\r\n            this.events.length = 0;\r\n            from.nextAnimationLast = animationTime;\r\n            from.nextTrackLast = from.trackTime;\r\n            return mix;\r\n        };\r\n        AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) {\r\n            var slot = skeleton.slots[timeline.slotIndex];\r\n            if (!slot.bone.active)\r\n                return;\r\n            var frames = timeline.frames;\r\n            if (time < frames[0]) { // Time is before first frame.\r\n                if (blend == exports.MixBlend.setup || blend == exports.MixBlend.first)\r\n                    this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\r\n            }\r\n            else {\r\n                var frameIndex;\r\n                if (time >= frames[frames.length - 1]) // Time is after last frame.\r\n                    frameIndex = frames.length - 1;\r\n                else\r\n                    frameIndex = Animation$2.binarySearch(frames, time) - 1;\r\n                this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments);\r\n            }\r\n            // If an attachment wasn't set (ie before the first frame or attachments is false), set the setup attachment later.\r\n            if (slot.attachmentState <= this.unkeyedState)\r\n                slot.attachmentState = this.unkeyedState + AnimationState.SETUP;\r\n        };\r\n        AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) {\r\n            slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n            if (attachments)\r\n                slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;\r\n        };\r\n        AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\r\n            if (firstFrame)\r\n                timelinesRotation[i] = 0;\r\n            if (alpha == 1) {\r\n                timeline.apply(skeleton, 0, time, null, 1, blend, exports.MixDirection.mixIn);\r\n                return;\r\n            }\r\n            var rotateTimeline = timeline;\r\n            var frames = rotateTimeline.frames;\r\n            var bone = skeleton.bones[rotateTimeline.boneIndex];\r\n            if (!bone.active)\r\n                return;\r\n            var r1 = 0, r2 = 0;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        bone.rotation = bone.data.rotation;\r\n                    default:\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        r1 = bone.rotation;\r\n                        r2 = bone.data.rotation;\r\n                }\r\n            }\r\n            else {\r\n                r1 = blend == exports.MixBlend.setup ? bone.data.rotation : bone.rotation;\r\n                if (time >= frames[frames.length - RotateTimeline$2.ENTRIES]) // Time is after last frame.\r\n                    r2 = bone.data.rotation + frames[frames.length + RotateTimeline$2.PREV_ROTATION];\r\n                else {\r\n                    // Interpolate between the previous frame and the current frame.\r\n                    var frame = Animation$2.binarySearch(frames, time, RotateTimeline$2.ENTRIES);\r\n                    var prevRotation = frames[frame + RotateTimeline$2.PREV_ROTATION];\r\n                    var frameTime = frames[frame];\r\n                    var percent = rotateTimeline.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline$2.PREV_TIME] - frameTime));\r\n                    r2 = frames[frame + RotateTimeline$2.ROTATION] - prevRotation;\r\n                    r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n                    r2 = prevRotation + r2 * percent + bone.data.rotation;\r\n                    r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n                }\r\n            }\r\n            // Mix between rotations using the direction of the shortest route on the first frame while detecting crosses.\r\n            var total = 0, diff = r2 - r1;\r\n            diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\r\n            if (diff == 0) {\r\n                total = timelinesRotation[i];\r\n            }\r\n            else {\r\n                var lastTotal = 0, lastDiff = 0;\r\n                if (firstFrame) {\r\n                    lastTotal = 0;\r\n                    lastDiff = diff;\r\n                }\r\n                else {\r\n                    lastTotal = timelinesRotation[i]; // Angle and direction of mix, including loops.\r\n                    lastDiff = timelinesRotation[i + 1]; // Difference between bones.\r\n                }\r\n                var current = diff > 0, dir = lastTotal >= 0;\r\n                // Detect cross at 0 (not 180).\r\n                if (MathUtils.signum(lastDiff) != MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\r\n                    // A cross after a 360 rotation is a loop.\r\n                    if (Math.abs(lastTotal) > 180)\r\n                        lastTotal += 360 * MathUtils.signum(lastTotal);\r\n                    dir = current;\r\n                }\r\n                total = diff + lastTotal - lastTotal % 360; // Store loops as part of lastTotal.\r\n                if (dir != current)\r\n                    total += 360 * MathUtils.signum(lastTotal);\r\n                timelinesRotation[i] = total;\r\n            }\r\n            timelinesRotation[i + 1] = diff;\r\n            r1 += total * alpha;\r\n            bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\r\n        };\r\n        AnimationState.prototype.queueEvents = function (entry, animationTime) {\r\n            var animationStart = entry.animationStart, animationEnd = entry.animationEnd;\r\n            var duration = animationEnd - animationStart;\r\n            var trackLastWrapped = entry.trackLast % duration;\r\n            // Queue events before complete.\r\n            var events = this.events;\r\n            var i = 0, n = events.length;\r\n            for (; i < n; i++) {\r\n                var event_1 = events[i];\r\n                if (event_1.time < trackLastWrapped)\r\n                    break;\r\n                if (event_1.time > animationEnd)\r\n                    continue; // Discard events outside animation start/end.\r\n                this.queue.event(entry, event_1);\r\n            }\r\n            // Queue complete if completed a loop iteration or the animation.\r\n            var complete = false;\r\n            if (entry.loop)\r\n                complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\r\n            else\r\n                complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\r\n            if (complete)\r\n                this.queue.complete(entry);\r\n            // Queue events after complete.\r\n            for (; i < n; i++) {\r\n                var event_2 = events[i];\r\n                if (event_2.time < animationStart)\r\n                    continue; // Discard events outside animation start/end.\r\n                this.queue.event(entry, events[i]);\r\n            }\r\n        };\r\n        /** Removes all animations from all tracks, leaving skeletons in their current pose.\r\n         *\r\n         * It may be desired to use {@link AnimationState#setEmptyAnimation()} to mix the skeletons back to the setup pose,\r\n         * rather than leaving them in their current pose. */\r\n        AnimationState.prototype.clearTracks = function () {\r\n            var oldDrainDisabled = this.queue.drainDisabled;\r\n            this.queue.drainDisabled = true;\r\n            for (var i = 0, n = this.tracks.length; i < n; i++)\r\n                this.clearTrack(i);\r\n            this.tracks.length = 0;\r\n            this.queue.drainDisabled = oldDrainDisabled;\r\n            this.queue.drain();\r\n        };\r\n        /** Removes all animations from the track, leaving skeletons in their current pose.\r\n         *\r\n         * It may be desired to use {@link AnimationState#setEmptyAnimation()} to mix the skeletons back to the setup pose,\r\n         * rather than leaving them in their current pose. */\r\n        AnimationState.prototype.clearTrack = function (trackIndex) {\r\n            if (trackIndex >= this.tracks.length)\r\n                return;\r\n            var current = this.tracks[trackIndex];\r\n            if (current == null)\r\n                return;\r\n            this.queue.end(current);\r\n            this.disposeNext(current);\r\n            var entry = current;\r\n            while (true) {\r\n                var from = entry.mixingFrom;\r\n                if (from == null)\r\n                    break;\r\n                this.queue.end(from);\r\n                entry.mixingFrom = null;\r\n                entry.mixingTo = null;\r\n                entry = from;\r\n            }\r\n            this.tracks[current.trackIndex] = null;\r\n            this.queue.drain();\r\n        };\r\n        AnimationState.prototype.setCurrent = function (index, current, interrupt) {\r\n            var from = this.expandToIndex(index);\r\n            this.tracks[index] = current;\r\n            if (from != null) {\r\n                if (interrupt)\r\n                    this.queue.interrupt(from);\r\n                current.mixingFrom = from;\r\n                from.mixingTo = current;\r\n                current.mixTime = 0;\r\n                // Store the interrupted mix percentage.\r\n                if (from.mixingFrom != null && from.mixDuration > 0)\r\n                    current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\r\n                from.timelinesRotation.length = 0; // Reset rotation for mixing out, in case entry was mixed in.\r\n            }\r\n            this.queue.start(current);\r\n        };\r\n        /** Sets an animation by name.\r\n         *\r\n         * {@link #setAnimationWith(}. */\r\n        AnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) {\r\n            var animation = this.data.skeletonData.findAnimation(animationName);\r\n            if (animation == null)\r\n                throw new Error(\"Animation not found: \" + animationName);\r\n            return this.setAnimationWith(trackIndex, animation, loop);\r\n        };\r\n        /** Sets the current animation for a track, discarding any queued animations. If the formerly current track entry was never\r\n         * applied to a skeleton, it is replaced (not mixed from).\r\n         * @param loop If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its\r\n         *           duration. In either case {@link TrackEntry#trackEnd} determines when the track is cleared.\r\n         * @returns A track entry to allow further customization of animation playback. References to the track entry must not be kept\r\n         *         after the {@link AnimationStateListener#dispose()} event occurs. */\r\n        AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) {\r\n            if (animation == null)\r\n                throw new Error(\"animation cannot be null.\");\r\n            var interrupt = true;\r\n            var current = this.expandToIndex(trackIndex);\r\n            if (current != null) {\r\n                if (current.nextTrackLast == -1) {\r\n                    // Don't mix from an entry that was never applied.\r\n                    this.tracks[trackIndex] = current.mixingFrom;\r\n                    this.queue.interrupt(current);\r\n                    this.queue.end(current);\r\n                    this.disposeNext(current);\r\n                    current = current.mixingFrom;\r\n                    interrupt = false;\r\n                }\r\n                else\r\n                    this.disposeNext(current);\r\n            }\r\n            var entry = this.trackEntry(trackIndex, animation, loop, current);\r\n            this.setCurrent(trackIndex, entry, interrupt);\r\n            this.queue.drain();\r\n            return entry;\r\n        };\r\n        /** Queues an animation by name.\r\n         *\r\n         * See {@link #addAnimationWith()}. */\r\n        AnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) {\r\n            var animation = this.data.skeletonData.findAnimation(animationName);\r\n            if (animation == null)\r\n                throw new Error(\"Animation not found: \" + animationName);\r\n            return this.addAnimationWith(trackIndex, animation, loop, delay);\r\n        };\r\n        /** Adds an animation to be played after the current or last queued animation for a track. If the track is empty, it is\r\n         * equivalent to calling {@link #setAnimationWith()}.\r\n         * @param delay If > 0, sets {@link TrackEntry#delay}. If <= 0, the delay set is the duration of the previous track entry\r\n         *           minus any mix duration (from the {@link AnimationStateData}) plus the specified `delay` (ie the mix\r\n         *           ends at (`delay` = 0) or before (`delay` < 0) the previous track entry duration). If the\r\n         *           previous entry is looping, its next loop completion is used instead of its duration.\r\n         * @returns A track entry to allow further customization of animation playback. References to the track entry must not be kept\r\n         *         after the {@link AnimationStateListener#dispose()} event occurs. */\r\n        AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) {\r\n            if (animation == null)\r\n                throw new Error(\"animation cannot be null.\");\r\n            var last = this.expandToIndex(trackIndex);\r\n            if (last != null) {\r\n                while (last.next != null)\r\n                    last = last.next;\r\n            }\r\n            var entry = this.trackEntry(trackIndex, animation, loop, last);\r\n            if (last == null) {\r\n                this.setCurrent(trackIndex, entry, true);\r\n                this.queue.drain();\r\n            }\r\n            else {\r\n                last.next = entry;\r\n                if (delay <= 0) {\r\n                    var duration = last.animationEnd - last.animationStart;\r\n                    if (duration != 0) {\r\n                        if (last.loop)\r\n                            delay += duration * (1 + ((last.trackTime / duration) | 0));\r\n                        else\r\n                            delay += Math.max(duration, last.trackTime);\r\n                        delay -= this.data.getMix(last.animation, animation);\r\n                    }\r\n                    else\r\n                        delay = last.trackTime;\r\n                }\r\n            }\r\n            entry.delay = delay;\r\n            return entry;\r\n        };\r\n        /** Sets an empty animation for a track, discarding any queued animations, and sets the track entry's\r\n         * {@link TrackEntry#mixduration}. An empty animation has no timelines and serves as a placeholder for mixing in or out.\r\n         *\r\n         * Mixing out is done by setting an empty animation with a mix duration using either {@link #setEmptyAnimation()},\r\n         * {@link #setEmptyAnimations()}, or {@link #addEmptyAnimation()}. Mixing to an empty animation causes\r\n         * the previous animation to be applied less and less over the mix duration. Properties keyed in the previous animation\r\n         * transition to the value from lower tracks or to the setup pose value if no lower tracks key the property. A mix duration of\r\n         * 0 still mixes out over one frame.\r\n         *\r\n         * Mixing in is done by first setting an empty animation, then adding an animation using\r\n         * {@link #addAnimation()} and on the returned track entry, set the\r\n         * {@link TrackEntry#setMixDuration()}. Mixing from an empty animation causes the new animation to be applied more and\r\n         * more over the mix duration. Properties keyed in the new animation transition from the value from lower tracks or from the\r\n         * setup pose value if no lower tracks key the property to the value keyed in the new animation. */\r\n        AnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) {\r\n            var entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\r\n            entry.mixDuration = mixDuration;\r\n            entry.trackEnd = mixDuration;\r\n            return entry;\r\n        };\r\n        /** Adds an empty animation to be played after the current or last queued animation for a track, and sets the track entry's\r\n         * {@link TrackEntry#mixDuration}. If the track is empty, it is equivalent to calling\r\n         * {@link #setEmptyAnimation()}.\r\n         *\r\n         * See {@link #setEmptyAnimation()}.\r\n         * @param delay If > 0, sets {@link TrackEntry#delay}. If <= 0, the delay set is the duration of the previous track entry\r\n         *           minus any mix duration plus the specified `delay` (ie the mix ends at (`delay` = 0) or\r\n         *           before (`delay` < 0) the previous track entry duration). If the previous entry is looping, its next\r\n         *           loop completion is used instead of its duration.\r\n         * @return A track entry to allow further customization of animation playback. References to the track entry must not be kept\r\n         *         after the {@link AnimationStateListener#dispose()} event occurs. */\r\n        AnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) {\r\n            if (delay <= 0)\r\n                delay -= mixDuration;\r\n            var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\r\n            entry.mixDuration = mixDuration;\r\n            entry.trackEnd = mixDuration;\r\n            return entry;\r\n        };\r\n        /** Sets an empty animation for every track, discarding any queued animations, and mixes to it over the specified mix\r\n         * duration. */\r\n        AnimationState.prototype.setEmptyAnimations = function (mixDuration) {\r\n            var oldDrainDisabled = this.queue.drainDisabled;\r\n            this.queue.drainDisabled = true;\r\n            for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n                var current = this.tracks[i];\r\n                if (current != null)\r\n                    this.setEmptyAnimation(current.trackIndex, mixDuration);\r\n            }\r\n            this.queue.drainDisabled = oldDrainDisabled;\r\n            this.queue.drain();\r\n        };\r\n        AnimationState.prototype.expandToIndex = function (index) {\r\n            if (index < this.tracks.length)\r\n                return this.tracks[index];\r\n            Utils.ensureArrayCapacity(this.tracks, index + 1, null);\r\n            this.tracks.length = index + 1;\r\n            return null;\r\n        };\r\n        /** @param last May be null. */\r\n        AnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) {\r\n            var entry = this.trackEntryPool.obtain();\r\n            entry.trackIndex = trackIndex;\r\n            entry.animation = animation;\r\n            entry.loop = loop;\r\n            entry.holdPrevious = false;\r\n            entry.eventThreshold = 0;\r\n            entry.attachmentThreshold = 0;\r\n            entry.drawOrderThreshold = 0;\r\n            entry.animationStart = 0;\r\n            entry.animationEnd = animation.duration;\r\n            entry.animationLast = -1;\r\n            entry.nextAnimationLast = -1;\r\n            entry.delay = 0;\r\n            entry.trackTime = 0;\r\n            entry.trackLast = -1;\r\n            entry.nextTrackLast = -1;\r\n            entry.trackEnd = Number.MAX_VALUE;\r\n            entry.timeScale = 1;\r\n            entry.alpha = 1;\r\n            entry.interruptAlpha = 1;\r\n            entry.mixTime = 0;\r\n            entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\r\n            entry.mixBlend = exports.MixBlend.replace;\r\n            return entry;\r\n        };\r\n        AnimationState.prototype.disposeNext = function (entry) {\r\n            var next = entry.next;\r\n            while (next != null) {\r\n                this.queue.dispose(next);\r\n                next = next.next;\r\n            }\r\n            entry.next = null;\r\n        };\r\n        AnimationState.prototype._animationsChanged = function () {\r\n            this.animationsChanged = false;\r\n            this.propertyIDs.clear();\r\n            for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n                var entry = this.tracks[i];\r\n                if (entry == null)\r\n                    continue;\r\n                while (entry.mixingFrom != null)\r\n                    entry = entry.mixingFrom;\r\n                do {\r\n                    if (entry.mixingFrom == null || entry.mixBlend != exports.MixBlend.add)\r\n                        this.computeHold(entry);\r\n                    entry = entry.mixingTo;\r\n                } while (entry != null);\r\n            }\r\n        };\r\n        AnimationState.prototype.computeHold = function (entry) {\r\n            var to = entry.mixingTo;\r\n            var timelines = entry.animation.timelines;\r\n            var timelinesCount = entry.animation.timelines.length;\r\n            var timelineMode = Utils.setArraySize(entry.timelineMode, timelinesCount);\r\n            entry.timelineHoldMix.length = 0;\r\n            var timelineDipMix = Utils.setArraySize(entry.timelineHoldMix, timelinesCount);\r\n            var propertyIDs = this.propertyIDs;\r\n            if (to != null && to.holdPrevious) {\r\n                for (var i = 0; i < timelinesCount; i++) {\r\n                    timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT;\r\n                }\r\n                return;\r\n            }\r\n            outer: for (var i = 0; i < timelinesCount; i++) {\r\n                var timeline = timelines[i];\r\n                var id = timeline.getPropertyId();\r\n                if (!propertyIDs.add(id))\r\n                    timelineMode[i] = AnimationState.SUBSEQUENT;\r\n                else if (to == null || timeline instanceof AttachmentTimeline$2 || timeline instanceof DrawOrderTimeline$2\r\n                    || timeline instanceof EventTimeline$2 || !to.animation.hasTimeline(id)) {\r\n                    timelineMode[i] = AnimationState.FIRST;\r\n                }\r\n                else {\r\n                    for (var next = to.mixingTo; next != null; next = next.mixingTo) {\r\n                        if (next.animation.hasTimeline(id))\r\n                            continue;\r\n                        if (entry.mixDuration > 0) {\r\n                            timelineMode[i] = AnimationState.HOLD_MIX;\r\n                            timelineDipMix[i] = next;\r\n                            continue outer;\r\n                        }\r\n                        break;\r\n                    }\r\n                    timelineMode[i] = AnimationState.HOLD_FIRST;\r\n                }\r\n            }\r\n        };\r\n        /** Returns the track entry for the animation currently playing on the track, or null if no animation is currently playing. */\r\n        AnimationState.prototype.getCurrent = function (trackIndex) {\r\n            if (trackIndex >= this.tracks.length)\r\n                return null;\r\n            return this.tracks[trackIndex];\r\n        };\r\n        /** Adds a listener to receive events for all track entries. */\r\n        AnimationState.prototype.addListener = function (listener) {\r\n            if (listener == null)\r\n                throw new Error(\"listener cannot be null.\");\r\n            this.listeners.push(listener);\r\n        };\r\n        /** Removes the listener added with {@link #addListener()}. */\r\n        AnimationState.prototype.removeListener = function (listener) {\r\n            var index = this.listeners.indexOf(listener);\r\n            if (index >= 0)\r\n                this.listeners.splice(index, 1);\r\n        };\r\n        /** Removes all listeners added with {@link #addListener()}. */\r\n        AnimationState.prototype.clearListeners = function () {\r\n            this.listeners.length = 0;\r\n        };\r\n        /** Discards all listener notifications that have not yet been delivered. This can be useful to call from an\r\n         * {@link AnimationStateListener} when it is known that further notifications that may have been already queued for delivery\r\n         * are not wanted because new animations are being set. */\r\n        AnimationState.prototype.clearListenerNotifications = function () {\r\n            this.queue.clear();\r\n        };\r\n        AnimationState.prototype.setAnimationByName = function (trackIndex, animationName, loop) {\r\n            if (!AnimationState.deprecatedWarning1) {\r\n                AnimationState.deprecatedWarning1 = true;\r\n                console.warn(\"Spine Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.\");\r\n            }\r\n            this.setAnimation(trackIndex, animationName, loop);\r\n        };\r\n        AnimationState.prototype.addAnimationByName = function (trackIndex, animationName, loop, delay) {\r\n            if (!AnimationState.deprecatedWarning2) {\r\n                AnimationState.deprecatedWarning2 = true;\r\n                console.warn(\"Spine Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.\");\r\n            }\r\n            this.addAnimation(trackIndex, animationName, loop, delay);\r\n        };\r\n        AnimationState.prototype.hasAnimation = function (animationName) {\r\n            var animation = this.data.skeletonData.findAnimation(animationName);\r\n            return animation !== null;\r\n        };\r\n        AnimationState.prototype.hasAnimationByName = function (animationName) {\r\n            if (!AnimationState.deprecatedWarning3) {\r\n                AnimationState.deprecatedWarning3 = true;\r\n                console.warn(\"Spine Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.\");\r\n            }\r\n            return this.hasAnimation(animationName);\r\n        };\r\n        AnimationState.emptyAnimation = new Animation$2(\"<empty>\", [], 0);\r\n        /** 1. A previously applied timeline has set this property.\r\n         *\r\n         * Result: Mix from the current pose to the timeline pose. */\r\n        AnimationState.SUBSEQUENT = 0;\r\n        /** 1. This is the first timeline to set this property.\r\n         * 2. The next track entry applied after this one does not have a timeline to set this property.\r\n         *\r\n         * Result: Mix from the setup pose to the timeline pose. */\r\n        AnimationState.FIRST = 1;\r\n        /** 1) A previously applied timeline has set this property.<br>\r\n         * 2) The next track entry to be applied does have a timeline to set this property.<br>\r\n         * 3) The next track entry after that one does not have a timeline to set this property.<br>\r\n         * Result: Mix from the current pose to the timeline pose, but do not mix out. This avoids \"dipping\" when crossfading\r\n         * animations that key the same property. A subsequent timeline will set this property using a mix. */\r\n        AnimationState.HOLD_SUBSEQUENT = 2;\r\n        /** 1) This is the first timeline to set this property.<br>\r\n         * 2) The next track entry to be applied does have a timeline to set this property.<br>\r\n         * 3) The next track entry after that one does not have a timeline to set this property.<br>\r\n         * Result: Mix from the setup pose to the timeline pose, but do not mix out. This avoids \"dipping\" when crossfading animations\r\n         * that key the same property. A subsequent timeline will set this property using a mix. */\r\n        AnimationState.HOLD_FIRST = 3;\r\n        /** 1. This is the first timeline to set this property.\r\n         * 2. The next track entry to be applied does have a timeline to set this property.\r\n         * 3. The next track entry after that one does have a timeline to set this property.\r\n         * 4. timelineHoldMix stores the first subsequent track entry that does not have a timeline to set this property.\r\n         *\r\n         * Result: The same as HOLD except the mix percentage from the timelineHoldMix track entry is used. This handles when more than\r\n         * 2 track entries in a row have a timeline that sets the same property.\r\n         *\r\n         * Eg, A -> B -> C -> D where A, B, and C have a timeline setting same property, but D does not. When A is applied, to avoid\r\n         * \"dipping\" A is not mixed out, however D (the first entry that doesn't set the property) mixing in is used to mix out A\r\n         * (which affects B and C). Without using D to mix out, A would be applied fully until mixing completes, then snap into\r\n         * place. */\r\n        AnimationState.HOLD_MIX = 4;\r\n        AnimationState.SETUP = 1;\r\n        AnimationState.CURRENT = 2;\r\n        AnimationState.deprecatedWarning1 = false;\r\n        AnimationState.deprecatedWarning2 = false;\r\n        AnimationState.deprecatedWarning3 = false;\r\n        return AnimationState;\r\n    }());\r\n    /** Stores settings and other state for the playback of an animation on an {@link AnimationState} track.\r\n     *\r\n     * References to a track entry must not be kept after the {@link AnimationStateListener#dispose()} event occurs. */\r\n    /**\r\n     * @public\r\n     */\r\n    var TrackEntry$2 = /** @class */ (function () {\r\n        function TrackEntry() {\r\n            /** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which\r\n             * replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to\r\n             * the values from the lower tracks.\r\n             *\r\n             * The `mixBlend` can be set for a new track entry only before {@link AnimationState#apply()} is first\r\n             * called. */\r\n            this.mixBlend = exports.MixBlend.replace;\r\n            this.timelineMode = new Array();\r\n            this.timelineHoldMix = new Array();\r\n            this.timelinesRotation = new Array();\r\n        }\r\n        TrackEntry.prototype.reset = function () {\r\n            this.next = null;\r\n            this.mixingFrom = null;\r\n            this.mixingTo = null;\r\n            this.animation = null;\r\n            this.listener = null;\r\n            this.timelineMode.length = 0;\r\n            this.timelineHoldMix.length = 0;\r\n            this.timelinesRotation.length = 0;\r\n        };\r\n        /** Uses {@link #trackTime} to compute the `animationTime`, which is between {@link #animationStart}\r\n         * and {@link #animationEnd}. When the `trackTime` is 0, the `animationTime` is equal to the\r\n         * `animationStart` time. */\r\n        TrackEntry.prototype.getAnimationTime = function () {\r\n            if (this.loop) {\r\n                var duration = this.animationEnd - this.animationStart;\r\n                if (duration == 0)\r\n                    return this.animationStart;\r\n                return (this.trackTime % duration) + this.animationStart;\r\n            }\r\n            return Math.min(this.trackTime + this.animationStart, this.animationEnd);\r\n        };\r\n        TrackEntry.prototype.setAnimationLast = function (animationLast) {\r\n            this.animationLast = animationLast;\r\n            this.nextAnimationLast = animationLast;\r\n        };\r\n        /** Returns true if at least one loop has been completed.\r\n         *\r\n         * See {@link AnimationStateListener#complete()}. */\r\n        TrackEntry.prototype.isComplete = function () {\r\n            return this.trackTime >= this.animationEnd - this.animationStart;\r\n        };\r\n        /** Resets the rotation directions for mixing this entry's rotate timelines. This can be useful to avoid bones rotating the\r\n         * long way around when using {@link #alpha} and starting animations on other tracks.\r\n         *\r\n         * Mixing with {@link MixBlend#replace} involves finding a rotation between two others, which has two possible solutions:\r\n         * the short way or the long way around. The two rotations likely change over time, so which direction is the short or long\r\n         * way also changes. If the short way was always chosen, bones would flip to the other side when that direction became the\r\n         * long way. TrackEntry chooses the short way the first time it is applied and remembers that direction. */\r\n        TrackEntry.prototype.resetRotationDirections = function () {\r\n            this.timelinesRotation.length = 0;\r\n        };\r\n        Object.defineProperty(TrackEntry.prototype, \"time\", {\r\n            get: function () {\r\n                if (!TrackEntry.deprecatedWarning1) {\r\n                    TrackEntry.deprecatedWarning1 = true;\r\n                    console.warn(\"Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.\");\r\n                }\r\n                return this.trackTime;\r\n            },\r\n            set: function (value) {\r\n                if (!TrackEntry.deprecatedWarning1) {\r\n                    TrackEntry.deprecatedWarning1 = true;\r\n                    console.warn(\"Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.\");\r\n                }\r\n                this.trackTime = value;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(TrackEntry.prototype, \"endTime\", {\r\n            get: function () {\r\n                if (!TrackEntry.deprecatedWarning2) {\r\n                    TrackEntry.deprecatedWarning2 = true;\r\n                    console.warn(\"Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.\");\r\n                }\r\n                return this.trackTime;\r\n            },\r\n            set: function (value) {\r\n                if (!TrackEntry.deprecatedWarning2) {\r\n                    TrackEntry.deprecatedWarning2 = true;\r\n                    console.warn(\"Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.\");\r\n                }\r\n                this.trackTime = value;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        TrackEntry.prototype.loopsCount = function () {\r\n            return Math.floor(this.trackTime / this.trackEnd);\r\n        };\r\n        TrackEntry.deprecatedWarning1 = false;\r\n        TrackEntry.deprecatedWarning2 = false;\r\n        return TrackEntry;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var EventQueue$2 = /** @class */ (function () {\r\n        function EventQueue(animState) {\r\n            this.objects = [];\r\n            this.drainDisabled = false;\r\n            this.animState = animState;\r\n        }\r\n        EventQueue.prototype.start = function (entry) {\r\n            this.objects.push(EventType$2.start);\r\n            this.objects.push(entry);\r\n            this.animState.animationsChanged = true;\r\n        };\r\n        EventQueue.prototype.interrupt = function (entry) {\r\n            this.objects.push(EventType$2.interrupt);\r\n            this.objects.push(entry);\r\n        };\r\n        EventQueue.prototype.end = function (entry) {\r\n            this.objects.push(EventType$2.end);\r\n            this.objects.push(entry);\r\n            this.animState.animationsChanged = true;\r\n        };\r\n        EventQueue.prototype.dispose = function (entry) {\r\n            this.objects.push(EventType$2.dispose);\r\n            this.objects.push(entry);\r\n        };\r\n        EventQueue.prototype.complete = function (entry) {\r\n            this.objects.push(EventType$2.complete);\r\n            this.objects.push(entry);\r\n        };\r\n        EventQueue.prototype.event = function (entry, event) {\r\n            this.objects.push(EventType$2.event);\r\n            this.objects.push(entry);\r\n            this.objects.push(event);\r\n        };\r\n        EventQueue.prototype.deprecateStuff = function () {\r\n            if (!EventQueue.deprecatedWarning1) {\r\n                EventQueue.deprecatedWarning1 = true;\r\n                console.warn(\"Spine Deprecation Warning: onComplete, onStart, onEnd, onEvent art deprecated, please use listeners from now on. 'state.addListener({ complete: function(track, event) { } })'\");\r\n            }\r\n            return true;\r\n        };\r\n        EventQueue.prototype.drain = function () {\r\n            if (this.drainDisabled)\r\n                return;\r\n            this.drainDisabled = true;\r\n            var objects = this.objects;\r\n            var listeners = this.animState.listeners;\r\n            for (var i = 0; i < objects.length; i += 2) {\r\n                var type = objects[i];\r\n                var entry = objects[i + 1];\r\n                switch (type) {\r\n                    case EventType$2.start:\r\n                        if (entry.listener != null && entry.listener.start)\r\n                            entry.listener.start(entry);\r\n                        for (var ii = 0; ii < listeners.length; ii++)\r\n                            if (listeners[ii].start)\r\n                                listeners[ii].start(entry);\r\n                        //deprecation\r\n                        entry.onStart && this.deprecateStuff() && entry.onStart(entry.trackIndex);\r\n                        this.animState.onStart && this.deprecateStuff() && this.deprecateStuff && this.animState.onStart(entry.trackIndex);\r\n                        break;\r\n                    case EventType$2.interrupt:\r\n                        if (entry.listener != null && entry.listener.interrupt)\r\n                            entry.listener.interrupt(entry);\r\n                        for (var ii = 0; ii < listeners.length; ii++)\r\n                            if (listeners[ii].interrupt)\r\n                                listeners[ii].interrupt(entry);\r\n                        break;\r\n                    case EventType$2.end:\r\n                        if (entry.listener != null && entry.listener.end)\r\n                            entry.listener.end(entry);\r\n                        for (var ii = 0; ii < listeners.length; ii++)\r\n                            if (listeners[ii].end)\r\n                                listeners[ii].end(entry);\r\n                        //deprecation\r\n                        entry.onEnd && this.deprecateStuff() && entry.onEnd(entry.trackIndex);\r\n                        this.animState.onEnd && this.deprecateStuff() && this.animState.onEnd(entry.trackIndex);\r\n                    // Fall through.\r\n                    case EventType$2.dispose:\r\n                        if (entry.listener != null && entry.listener.dispose)\r\n                            entry.listener.dispose(entry);\r\n                        for (var ii = 0; ii < listeners.length; ii++)\r\n                            if (listeners[ii].dispose)\r\n                                listeners[ii].dispose(entry);\r\n                        this.animState.trackEntryPool.free(entry);\r\n                        break;\r\n                    case EventType$2.complete:\r\n                        if (entry.listener != null && entry.listener.complete)\r\n                            entry.listener.complete(entry);\r\n                        for (var ii = 0; ii < listeners.length; ii++)\r\n                            if (listeners[ii].complete)\r\n                                listeners[ii].complete(entry);\r\n                        //deprecation\r\n                        var count = MathUtils.toInt(entry.loopsCount());\r\n                        entry.onComplete && this.deprecateStuff() && entry.onComplete(entry.trackIndex, count);\r\n                        this.animState.onComplete && this.deprecateStuff() && this.animState.onComplete(entry.trackIndex, count);\r\n                        break;\r\n                    case EventType$2.event:\r\n                        var event_3 = objects[i++ + 2];\r\n                        if (entry.listener != null && entry.listener.event)\r\n                            entry.listener.event(entry, event_3);\r\n                        for (var ii = 0; ii < listeners.length; ii++)\r\n                            if (listeners[ii].event)\r\n                                listeners[ii].event(entry, event_3);\r\n                        //deprecation\r\n                        entry.onEvent && this.deprecateStuff() && entry.onEvent(entry.trackIndex, event_3);\r\n                        this.animState.onEvent && this.deprecateStuff() && this.animState.onEvent(entry.trackIndex, event_3);\r\n                        break;\r\n                }\r\n            }\r\n            this.clear();\r\n            this.drainDisabled = false;\r\n        };\r\n        EventQueue.prototype.clear = function () {\r\n            this.objects.length = 0;\r\n        };\r\n        EventQueue.deprecatedWarning1 = false;\r\n        return EventQueue;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var EventType$2;\r\n    (function (EventType) {\r\n        EventType[EventType[\"start\"] = 0] = \"start\";\r\n        EventType[EventType[\"interrupt\"] = 1] = \"interrupt\";\r\n        EventType[EventType[\"end\"] = 2] = \"end\";\r\n        EventType[EventType[\"dispose\"] = 3] = \"dispose\";\r\n        EventType[EventType[\"complete\"] = 4] = \"complete\";\r\n        EventType[EventType[\"event\"] = 5] = \"event\";\r\n    })(EventType$2 || (EventType$2 = {}));\r\n    /**\r\n     * @public\r\n     */\r\n    var AnimationStateAdapter$1 = /** @class */ (function () {\r\n        function AnimationStateAdapter() {\r\n        }\r\n        AnimationStateAdapter.prototype.start = function (entry) {\r\n        };\r\n        AnimationStateAdapter.prototype.interrupt = function (entry) {\r\n        };\r\n        AnimationStateAdapter.prototype.end = function (entry) {\r\n        };\r\n        AnimationStateAdapter.prototype.dispose = function (entry) {\r\n        };\r\n        AnimationStateAdapter.prototype.complete = function (entry) {\r\n        };\r\n        AnimationStateAdapter.prototype.event = function (entry, event) {\r\n        };\r\n        return AnimationStateAdapter;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var AnimationStateData$2 = /** @class */ (function () {\r\n        function AnimationStateData(skeletonData) {\r\n            this.animationToMixTime = {};\r\n            this.defaultMix = 0;\r\n            if (skeletonData == null)\r\n                throw new Error(\"skeletonData cannot be null.\");\r\n            this.skeletonData = skeletonData;\r\n        }\r\n        AnimationStateData.prototype.setMix = function (fromName, toName, duration) {\r\n            var from = this.skeletonData.findAnimation(fromName);\r\n            if (from == null)\r\n                throw new Error(\"Animation not found: \" + fromName);\r\n            var to = this.skeletonData.findAnimation(toName);\r\n            if (to == null)\r\n                throw new Error(\"Animation not found: \" + toName);\r\n            this.setMixWith(from, to, duration);\r\n        };\r\n        AnimationStateData.prototype.setMixByName = function (fromName, toName, duration) {\r\n            if (!AnimationStateData.deprecatedWarning1) {\r\n                AnimationStateData.deprecatedWarning1 = true;\r\n                console.warn(\"Deprecation Warning: AnimationStateData.setMixByName is deprecated, please use setMix from now on.\");\r\n            }\r\n            this.setMix(fromName, toName, duration);\r\n        };\r\n        AnimationStateData.prototype.setMixWith = function (from, to, duration) {\r\n            if (from == null)\r\n                throw new Error(\"from cannot be null.\");\r\n            if (to == null)\r\n                throw new Error(\"to cannot be null.\");\r\n            var key = from.name + \".\" + to.name;\r\n            this.animationToMixTime[key] = duration;\r\n        };\r\n        AnimationStateData.prototype.getMix = function (from, to) {\r\n            var key = from.name + \".\" + to.name;\r\n            var value = this.animationToMixTime[key];\r\n            return value === undefined ? this.defaultMix : value;\r\n        };\r\n        AnimationStateData.deprecatedWarning1 = false;\r\n        return AnimationStateData;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var AtlasAttachmentLoader$2 = /** @class */ (function () {\r\n        function AtlasAttachmentLoader(atlas) {\r\n            this.atlas = atlas;\r\n        }\r\n        /** @return May be null to not load an attachment. */\r\n        AtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) {\r\n            var region = this.atlas.findRegion(path);\r\n            if (region == null)\r\n                throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\r\n            var attachment = new RegionAttachment$2(name);\r\n            attachment.region = region;\r\n            return attachment;\r\n        };\r\n        /** @return May be null to not load an attachment. */\r\n        AtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {\r\n            var region = this.atlas.findRegion(path);\r\n            if (region == null)\r\n                throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\r\n            var attachment = new MeshAttachment$2(name);\r\n            attachment.region = region;\r\n            return attachment;\r\n        };\r\n        /** @return May be null to not load an attachment. */\r\n        AtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) {\r\n            return new BoundingBoxAttachment$2(name);\r\n        };\r\n        /** @return May be null to not load an attachment */\r\n        AtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) {\r\n            return new PathAttachment$2(name);\r\n        };\r\n        AtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) {\r\n            return new PointAttachment$2(name);\r\n        };\r\n        AtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) {\r\n            return new ClippingAttachment$2(name);\r\n        };\r\n        return AtlasAttachmentLoader;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var Bone$2 = /** @class */ (function () {\r\n        /** @param parent May be null. */\r\n        function Bone(data, skeleton, parent) {\r\n            //be careful! Spine b,c is c,b in pixi matrix\r\n            this.matrix = new math.Matrix();\r\n            this.children = new Array();\r\n            this.x = 0;\r\n            this.y = 0;\r\n            this.rotation = 0;\r\n            this.scaleX = 0;\r\n            this.scaleY = 0;\r\n            this.shearX = 0;\r\n            this.shearY = 0;\r\n            this.ax = 0;\r\n            this.ay = 0;\r\n            this.arotation = 0;\r\n            this.ascaleX = 0;\r\n            this.ascaleY = 0;\r\n            this.ashearX = 0;\r\n            this.ashearY = 0;\r\n            this.appliedValid = false;\r\n            this.sorted = false;\r\n            this.active = false;\r\n            if (data == null)\r\n                throw new Error(\"data cannot be null.\");\r\n            if (skeleton == null)\r\n                throw new Error(\"skeleton cannot be null.\");\r\n            this.data = data;\r\n            this.skeleton = skeleton;\r\n            this.parent = parent;\r\n            this.setToSetupPose();\r\n        }\r\n        Object.defineProperty(Bone.prototype, \"worldX\", {\r\n            get: function () {\r\n                return this.matrix.tx;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(Bone.prototype, \"worldY\", {\r\n            get: function () {\r\n                return this.matrix.ty;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Bone.prototype.isActive = function () {\r\n            return this.active;\r\n        };\r\n        /** Same as {@link #updateWorldTransform()}. This method exists for Bone to implement {@link Updatable}. */\r\n        Bone.prototype.update = function () {\r\n            this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n        };\r\n        /** Computes the world transform using the parent bone and this bone's local transform. */\r\n        Bone.prototype.updateWorldTransform = function () {\r\n            this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n        };\r\n        /** Computes the world transform using the parent bone and the specified local transform. */\r\n        Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) {\r\n            this.ax = x;\r\n            this.ay = y;\r\n            this.arotation = rotation;\r\n            this.ascaleX = scaleX;\r\n            this.ascaleY = scaleY;\r\n            this.ashearX = shearX;\r\n            this.ashearY = shearY;\r\n            this.appliedValid = true;\r\n            var parent = this.parent;\r\n            var m = this.matrix;\r\n            var sx = this.skeleton.scaleX;\r\n            var sy = settings.yDown ? -this.skeleton.scaleY : this.skeleton.scaleY;\r\n            if (parent == null) { // Root bone.\r\n                var skeleton = this.skeleton;\r\n                var rotationY = rotation + 90 + shearY;\r\n                m.a = MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\r\n                m.c = MathUtils.cosDeg(rotationY) * scaleY * sx;\r\n                m.b = MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\r\n                m.d = MathUtils.sinDeg(rotationY) * scaleY * sy;\r\n                m.tx = x * sx + skeleton.x;\r\n                m.ty = y * sy + skeleton.y;\r\n                return;\r\n            }\r\n            var pa = parent.matrix.a, pb = parent.matrix.c, pc = parent.matrix.b, pd = parent.matrix.d;\r\n            m.tx = pa * x + pb * y + parent.matrix.tx;\r\n            m.ty = pc * x + pd * y + parent.matrix.ty;\r\n            switch (this.data.transformMode) {\r\n                case exports.TransformMode.Normal: {\r\n                    var rotationY = rotation + 90 + shearY;\r\n                    var la = MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n                    var lb = MathUtils.cosDeg(rotationY) * scaleY;\r\n                    var lc = MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n                    var ld = MathUtils.sinDeg(rotationY) * scaleY;\r\n                    m.a = pa * la + pb * lc;\r\n                    m.c = pa * lb + pb * ld;\r\n                    m.b = pc * la + pd * lc;\r\n                    m.d = pc * lb + pd * ld;\r\n                    return;\r\n                }\r\n                case exports.TransformMode.OnlyTranslation: {\r\n                    var rotationY = rotation + 90 + shearY;\r\n                    m.a = MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n                    m.c = MathUtils.cosDeg(rotationY) * scaleY;\r\n                    m.b = MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n                    m.d = MathUtils.sinDeg(rotationY) * scaleY;\r\n                    break;\r\n                }\r\n                case exports.TransformMode.NoRotationOrReflection: {\r\n                    var s = pa * pa + pc * pc;\r\n                    var prx = 0;\r\n                    if (s > 0.0001) {\r\n                        s = Math.abs(pa * pd - pb * pc) / s;\r\n                        pa /= this.skeleton.scaleX;\r\n                        pc /= this.skeleton.scaleY;\r\n                        pb = pc * s;\r\n                        pd = pa * s;\r\n                        prx = Math.atan2(pc, pa) * MathUtils.radDeg;\r\n                    }\r\n                    else {\r\n                        pa = 0;\r\n                        pc = 0;\r\n                        prx = 90 - Math.atan2(pd, pb) * MathUtils.radDeg;\r\n                    }\r\n                    var rx = rotation + shearX - prx;\r\n                    var ry = rotation + shearY - prx + 90;\r\n                    var la = MathUtils.cosDeg(rx) * scaleX;\r\n                    var lb = MathUtils.cosDeg(ry) * scaleY;\r\n                    var lc = MathUtils.sinDeg(rx) * scaleX;\r\n                    var ld = MathUtils.sinDeg(ry) * scaleY;\r\n                    m.a = pa * la - pb * lc;\r\n                    m.c = pa * lb - pb * ld;\r\n                    m.b = pc * la + pd * lc;\r\n                    m.d = pc * lb + pd * ld;\r\n                    break;\r\n                }\r\n                case exports.TransformMode.NoScale:\r\n                case exports.TransformMode.NoScaleOrReflection: {\r\n                    var cos = MathUtils.cosDeg(rotation);\r\n                    var sin = MathUtils.sinDeg(rotation);\r\n                    var za = (pa * cos + pb * sin) / sx;\r\n                    var zc = (pc * cos + pd * sin) / sy;\r\n                    var s = Math.sqrt(za * za + zc * zc);\r\n                    if (s > 0.00001)\r\n                        s = 1 / s;\r\n                    za *= s;\r\n                    zc *= s;\r\n                    s = Math.sqrt(za * za + zc * zc);\r\n                    if (this.data.transformMode == exports.TransformMode.NoScale\r\n                        && (pa * pd - pb * pc < 0) != (settings.yDown ?\r\n                            (this.skeleton.scaleX < 0 != this.skeleton.scaleY > 0) :\r\n                            (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0)))\r\n                        s = -s;\r\n                    var r = Math.PI / 2 + Math.atan2(zc, za);\r\n                    var zb = Math.cos(r) * s;\r\n                    var zd = Math.sin(r) * s;\r\n                    var la = MathUtils.cosDeg(shearX) * scaleX;\r\n                    var lb = MathUtils.cosDeg(90 + shearY) * scaleY;\r\n                    var lc = MathUtils.sinDeg(shearX) * scaleX;\r\n                    var ld = MathUtils.sinDeg(90 + shearY) * scaleY;\r\n                    m.a = za * la + zb * lc;\r\n                    m.c = za * lb + zb * ld;\r\n                    m.b = zc * la + zd * lc;\r\n                    m.d = zc * lb + zd * ld;\r\n                    break;\r\n                }\r\n            }\r\n            m.a *= sx;\r\n            m.c *= sx;\r\n            m.b *= sy;\r\n            m.d *= sy;\r\n        };\r\n        Bone.prototype.setToSetupPose = function () {\r\n            var data = this.data;\r\n            this.x = data.x;\r\n            this.y = data.y;\r\n            this.rotation = data.rotation;\r\n            this.scaleX = data.scaleX;\r\n            this.scaleY = data.scaleY;\r\n            this.shearX = data.shearX;\r\n            this.shearY = data.shearY;\r\n        };\r\n        Bone.prototype.getWorldRotationX = function () {\r\n            return Math.atan2(this.matrix.b, this.matrix.a) * MathUtils.radDeg;\r\n        };\r\n        Bone.prototype.getWorldRotationY = function () {\r\n            return Math.atan2(this.matrix.d, this.matrix.c) * MathUtils.radDeg;\r\n        };\r\n        Bone.prototype.getWorldScaleX = function () {\r\n            var m = this.matrix;\r\n            return Math.sqrt(m.a * m.a + m.c * m.c);\r\n        };\r\n        Bone.prototype.getWorldScaleY = function () {\r\n            var m = this.matrix;\r\n            return Math.sqrt(m.b * m.b + m.d * m.d);\r\n        };\r\n        /** Computes the individual applied transform values from the world transform. This can be useful to perform processing using\r\n         * the applied transform after the world transform has been modified directly (eg, by a constraint).\r\n         * <p>\r\n         * Some information is ambiguous in the world transform, such as -1,-1 scale versus 180 rotation. */\r\n        Bone.prototype.updateAppliedTransform = function () {\r\n            this.appliedValid = true;\r\n            var parent = this.parent;\r\n            var m = this.matrix;\r\n            if (parent == null) {\r\n                this.ax = m.tx;\r\n                this.ay = m.ty;\r\n                this.arotation = Math.atan2(m.b, m.a) * MathUtils.radDeg;\r\n                this.ascaleX = Math.sqrt(m.a * m.a + m.b * m.b);\r\n                this.ascaleY = Math.sqrt(m.c * m.c + m.d * m.d);\r\n                this.ashearX = 0;\r\n                this.ashearY = Math.atan2(m.a * m.c + m.b * m.d, m.a * m.d - m.b * m.c) * MathUtils.radDeg;\r\n                return;\r\n            }\r\n            var pm = parent.matrix;\r\n            var pid = 1 / (pm.a * pm.d - pm.b * pm.c);\r\n            var dx = m.tx - pm.tx, dy = m.ty - pm.ty;\r\n            this.ax = (dx * pm.d * pid - dy * pm.c * pid);\r\n            this.ay = (dy * pm.a * pid - dx * pm.b * pid);\r\n            var ia = pid * pm.d;\r\n            var id = pid * pm.a;\r\n            var ib = pid * pm.c;\r\n            var ic = pid * pm.b;\r\n            var ra = ia * m.a - ib * m.b;\r\n            var rb = ia * m.c - ib * m.d;\r\n            var rc = id * m.b - ic * m.a;\r\n            var rd = id * m.d - ic * m.c;\r\n            this.ashearX = 0;\r\n            this.ascaleX = Math.sqrt(ra * ra + rc * rc);\r\n            if (this.ascaleX > 0.0001) {\r\n                var det = ra * rd - rb * rc;\r\n                this.ascaleY = det / this.ascaleX;\r\n                this.ashearY = Math.atan2(ra * rb + rc * rd, det) * MathUtils.radDeg;\r\n                this.arotation = Math.atan2(rc, ra) * MathUtils.radDeg;\r\n            }\r\n            else {\r\n                this.ascaleX = 0;\r\n                this.ascaleY = Math.sqrt(rb * rb + rd * rd);\r\n                this.ashearY = 0;\r\n                this.arotation = 90 - Math.atan2(rd, rb) * MathUtils.radDeg;\r\n            }\r\n        };\r\n        Bone.prototype.worldToLocal = function (world) {\r\n            var m = this.matrix;\r\n            var a = m.a, b = m.c, c = m.b, d = m.d;\r\n            var invDet = 1 / (a * d - b * c);\r\n            var x = world.x - m.tx, y = world.y - m.ty;\r\n            world.x = (x * d * invDet - y * b * invDet);\r\n            world.y = (y * a * invDet - x * c * invDet);\r\n            return world;\r\n        };\r\n        Bone.prototype.localToWorld = function (local) {\r\n            var m = this.matrix;\r\n            var x = local.x, y = local.y;\r\n            local.x = x * m.a + y * m.c + m.tx;\r\n            local.y = x * m.b + y * m.d + m.ty;\r\n            return local;\r\n        };\r\n        Bone.prototype.worldToLocalRotation = function (worldRotation) {\r\n            var sin = MathUtils.sinDeg(worldRotation), cos = MathUtils.cosDeg(worldRotation);\r\n            var mat = this.matrix;\r\n            return Math.atan2(mat.a * sin - mat.b * cos, mat.d * cos - mat.c * sin) * MathUtils.radDeg;\r\n        };\r\n        Bone.prototype.localToWorldRotation = function (localRotation) {\r\n            var sin = MathUtils.sinDeg(localRotation), cos = MathUtils.cosDeg(localRotation);\r\n            var mat = this.matrix;\r\n            return Math.atan2(cos * mat.b + sin * mat.d, cos * mat.a + sin * mat.c) * MathUtils.radDeg;\r\n        };\r\n        Bone.prototype.rotateWorld = function (degrees) {\r\n            var mat = this.matrix;\r\n            var a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n            var cos = MathUtils.cosDeg(degrees), sin = MathUtils.sinDeg(degrees);\r\n            mat.a = cos * a - sin * c;\r\n            mat.c = cos * b - sin * d;\r\n            mat.b = sin * a + cos * c;\r\n            mat.d = sin * b + cos * d;\r\n            this.appliedValid = false;\r\n        };\r\n        return Bone;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var BoneData$2 = /** @class */ (function () {\r\n        function BoneData(index, name, parent) {\r\n            this.x = 0;\r\n            this.y = 0;\r\n            this.rotation = 0;\r\n            this.scaleX = 1;\r\n            this.scaleY = 1;\r\n            this.shearX = 0;\r\n            this.shearY = 0;\r\n            this.transformMode = exports.TransformMode.Normal;\r\n            this.skinRequired = false;\r\n            this.color = new Color();\r\n            if (index < 0)\r\n                throw new Error(\"index must be >= 0.\");\r\n            if (name == null)\r\n                throw new Error(\"name cannot be null.\");\r\n            this.index = index;\r\n            this.name = name;\r\n            this.parent = parent;\r\n        }\r\n        return BoneData;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var ConstraintData$1 = /** @class */ (function () {\r\n        function ConstraintData(name, order, skinRequired) {\r\n            this.name = name;\r\n            this.order = order;\r\n            this.skinRequired = skinRequired;\r\n        }\r\n        return ConstraintData;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var Event$2 = /** @class */ (function () {\r\n        function Event(time, data) {\r\n            if (data == null)\r\n                throw new Error(\"data cannot be null.\");\r\n            this.time = time;\r\n            this.data = data;\r\n        }\r\n        return Event;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var EventData$2 = /** @class */ (function () {\r\n        function EventData(name) {\r\n            this.name = name;\r\n        }\r\n        return EventData;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var IkConstraint$2 = /** @class */ (function () {\r\n        function IkConstraint(data, skeleton) {\r\n            this.bendDirection = 0;\r\n            this.compress = false;\r\n            this.stretch = false;\r\n            this.mix = 1;\r\n            this.softness = 0;\r\n            this.active = false;\r\n            if (data == null)\r\n                throw new Error(\"data cannot be null.\");\r\n            if (skeleton == null)\r\n                throw new Error(\"skeleton cannot be null.\");\r\n            this.data = data;\r\n            this.mix = data.mix;\r\n            this.softness = data.softness;\r\n            this.bendDirection = data.bendDirection;\r\n            this.compress = data.compress;\r\n            this.stretch = data.stretch;\r\n            this.bones = new Array();\r\n            for (var i = 0; i < data.bones.length; i++)\r\n                this.bones.push(skeleton.findBone(data.bones[i].name));\r\n            this.target = skeleton.findBone(data.target.name);\r\n        }\r\n        IkConstraint.prototype.isActive = function () {\r\n            return this.active;\r\n        };\r\n        IkConstraint.prototype.apply = function () {\r\n            this.update();\r\n        };\r\n        IkConstraint.prototype.update = function () {\r\n            var target = this.target;\r\n            var bones = this.bones;\r\n            switch (bones.length) {\r\n                case 1:\r\n                    this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\r\n                    break;\r\n                case 2:\r\n                    this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix);\r\n                    break;\r\n            }\r\n        };\r\n        /** Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified in the world\r\n         * coordinate system. */\r\n        IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {\r\n            if (!bone.appliedValid)\r\n                bone.updateAppliedTransform();\r\n            var p = bone.parent.matrix;\r\n            var pa = p.a, pb = p.c, pc = p.b, pd = p.d;\r\n            var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\r\n            switch (bone.data.transformMode) {\r\n                case exports.TransformMode.OnlyTranslation:\r\n                    tx = targetX - bone.worldX;\r\n                    ty = targetY - bone.worldY;\r\n                    break;\r\n                case exports.TransformMode.NoRotationOrReflection:\r\n                    var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\r\n                    var sa = pa / bone.skeleton.scaleX;\r\n                    var sc = pc / bone.skeleton.scaleY;\r\n                    pb = -sc * s * bone.skeleton.scaleX;\r\n                    pd = sa * s * bone.skeleton.scaleY;\r\n                    rotationIK += Math.atan2(sc, sa) * MathUtils.radDeg;\r\n                // Fall through\r\n                default:\r\n                    var x = targetX - p.tx, y = targetY - p.ty;\r\n                    var d = pa * pd - pb * pc;\r\n                    tx = (x * pd - y * pb) / d - bone.ax;\r\n                    ty = (y * pa - x * pc) / d - bone.ay;\r\n            }\r\n            rotationIK += Math.atan2(ty, tx) * MathUtils.radDeg;\r\n            if (bone.ascaleX < 0)\r\n                rotationIK += 180;\r\n            if (rotationIK > 180)\r\n                rotationIK -= 360;\r\n            else if (rotationIK < -180)\r\n                rotationIK += 360;\r\n            var sx = bone.ascaleX, sy = bone.ascaleY;\r\n            if (compress || stretch) {\r\n                switch (bone.data.transformMode) {\r\n                    case exports.TransformMode.NoScale:\r\n                    case exports.TransformMode.NoScaleOrReflection:\r\n                        tx = targetX - bone.worldX;\r\n                        ty = targetY - bone.worldY;\r\n                }\r\n                var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\r\n                if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\r\n                    var s = (dd / b - 1) * alpha + 1;\r\n                    sx *= s;\r\n                    if (uniform)\r\n                        sy *= s;\r\n                }\r\n            }\r\n            bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);\r\n        };\r\n        /** Adjusts the parent and child bone rotations so the tip of the child is as close to the target position as possible. The\r\n         * target is specified in the world coordinate system.\r\n         * @param child A direct descendant of the parent bone. */\r\n        IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {\r\n            if (alpha == 0) {\r\n                child.updateWorldTransform();\r\n                return;\r\n            }\r\n            if (!parent.appliedValid)\r\n                parent.updateAppliedTransform();\r\n            if (!child.appliedValid)\r\n                child.updateAppliedTransform();\r\n            var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\r\n            var pmat = parent.matrix;\r\n            var os1 = 0, os2 = 0, s2 = 0;\r\n            if (psx < 0) {\r\n                psx = -psx;\r\n                os1 = 180;\r\n                s2 = -1;\r\n            }\r\n            else {\r\n                os1 = 0;\r\n                s2 = 1;\r\n            }\r\n            if (psy < 0) {\r\n                psy = -psy;\r\n                s2 = -s2;\r\n            }\r\n            if (csx < 0) {\r\n                csx = -csx;\r\n                os2 = 180;\r\n            }\r\n            else\r\n                os2 = 0;\r\n            var cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = pmat.a, b = pmat.c, c = pmat.b, d = pmat.d;\r\n            var u = Math.abs(psx - psy) <= 0.0001;\r\n            if (!u) {\r\n                cy = 0;\r\n                cwx = a * cx + pmat.tx;\r\n                cwy = c * cx + pmat.ty;\r\n            }\r\n            else {\r\n                cy = child.ay;\r\n                cwx = a * cx + b * cy + pmat.tx;\r\n                cwy = c * cx + d * cy + pmat.ty;\r\n            }\r\n            var pp = parent.parent.matrix;\r\n            a = pp.a;\r\n            b = pp.c;\r\n            c = pp.b;\r\n            d = pp.d;\r\n            var id = 1 / (a * d - b * c), x = cwx - pp.tx, y = cwy - pp.ty;\r\n            var dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n            var l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\r\n            if (l1 < 0.0001) {\r\n                this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\r\n                child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n                return;\r\n            }\r\n            x = targetX - pp.tx;\r\n            y = targetY - pp.ty;\r\n            var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\r\n            var dd = tx * tx + ty * ty;\r\n            if (softness != 0) {\r\n                softness *= psx * (csx + 1) / 2;\r\n                var td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\r\n                if (sd > 0) {\r\n                    var p = Math.min(1, sd / (softness * 2)) - 1;\r\n                    p = (sd - softness * (1 - p * p)) / td;\r\n                    tx -= p * tx;\r\n                    ty -= p * ty;\r\n                    dd = tx * tx + ty * ty;\r\n                }\r\n            }\r\n            outer: if (u) {\r\n                l2 *= psx;\r\n                var cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n                if (cos < -1)\r\n                    cos = -1;\r\n                else if (cos > 1) {\r\n                    cos = 1;\r\n                    if (stretch)\r\n                        sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\r\n                }\r\n                a2 = Math.acos(cos) * bendDir;\r\n                a = l1 + l2 * cos;\r\n                b = l2 * Math.sin(a2);\r\n                a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n            }\r\n            else {\r\n                a = psx * l2;\r\n                b = psy * l2;\r\n                var aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\r\n                c = bb * l1 * l1 + aa * dd - aa * bb;\r\n                var c1 = -2 * bb * l1, c2 = bb - aa;\r\n                d = c1 * c1 - 4 * c2 * c;\r\n                if (d >= 0) {\r\n                    var q = Math.sqrt(d);\r\n                    if (c1 < 0)\r\n                        q = -q;\r\n                    q = -(c1 + q) / 2;\r\n                    var r0 = q / c2, r1 = c / q;\r\n                    var r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n                    if (r * r <= dd) {\r\n                        y = Math.sqrt(dd - r * r) * bendDir;\r\n                        a1 = ta - Math.atan2(y, r);\r\n                        a2 = Math.atan2(y / psy, (r - l1) / psx);\r\n                        break outer;\r\n                    }\r\n                }\r\n                var minAngle = MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n                var maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n                c = -a * l1 / (aa - bb);\r\n                if (c >= -1 && c <= 1) {\r\n                    c = Math.acos(c);\r\n                    x = a * Math.cos(c) + l1;\r\n                    y = b * Math.sin(c);\r\n                    d = x * x + y * y;\r\n                    if (d < minDist) {\r\n                        minAngle = c;\r\n                        minDist = d;\r\n                        minX = x;\r\n                        minY = y;\r\n                    }\r\n                    if (d > maxDist) {\r\n                        maxAngle = c;\r\n                        maxDist = d;\r\n                        maxX = x;\r\n                        maxY = y;\r\n                    }\r\n                }\r\n                if (dd <= (minDist + maxDist) / 2) {\r\n                    a1 = ta - Math.atan2(minY * bendDir, minX);\r\n                    a2 = minAngle * bendDir;\r\n                }\r\n                else {\r\n                    a1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n                    a2 = maxAngle * bendDir;\r\n                }\r\n            }\r\n            var os = Math.atan2(cy, cx) * s2;\r\n            var rotation = parent.arotation;\r\n            a1 = (a1 - os) * MathUtils.radDeg + os1 - rotation;\r\n            if (a1 > 180)\r\n                a1 -= 360;\r\n            else if (a1 < -180)\r\n                a1 += 360;\r\n            parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\r\n            rotation = child.arotation;\r\n            a2 = ((a2 + os) * MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n            if (a2 > 180)\r\n                a2 -= 360;\r\n            else if (a2 < -180)\r\n                a2 += 360;\r\n            child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n        };\r\n        return IkConstraint;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var IkConstraintData$2 = /** @class */ (function (_super) {\r\n        __extends$3(IkConstraintData, _super);\r\n        function IkConstraintData(name) {\r\n            var _this = _super.call(this, name, 0, false) || this;\r\n            _this.bones = new Array();\r\n            _this.bendDirection = 1;\r\n            _this.compress = false;\r\n            _this.stretch = false;\r\n            _this.uniform = false;\r\n            _this.mix = 1;\r\n            _this.softness = 0;\r\n            return _this;\r\n        }\r\n        return IkConstraintData;\r\n    }(ConstraintData$1));\n\n    /**\r\n     * @public\r\n     */\r\n    var PathConstraintData$2 = /** @class */ (function (_super) {\r\n        __extends$3(PathConstraintData, _super);\r\n        function PathConstraintData(name) {\r\n            var _this = _super.call(this, name, 0, false) || this;\r\n            _this.bones = new Array();\r\n            return _this;\r\n        }\r\n        return PathConstraintData;\r\n    }(ConstraintData$1));\r\n    /**\r\n     * @public\r\n     */\r\n    var SpacingMode$2;\r\n    (function (SpacingMode) {\r\n        SpacingMode[SpacingMode[\"Length\"] = 0] = \"Length\";\r\n        SpacingMode[SpacingMode[\"Fixed\"] = 1] = \"Fixed\";\r\n        SpacingMode[SpacingMode[\"Percent\"] = 2] = \"Percent\";\r\n    })(SpacingMode$2 || (SpacingMode$2 = {}));\n\n    /**\r\n     * @public\r\n     */\r\n    var PathConstraint$2 = /** @class */ (function () {\r\n        function PathConstraint(data, skeleton) {\r\n            this.position = 0;\r\n            this.spacing = 0;\r\n            this.rotateMix = 0;\r\n            this.translateMix = 0;\r\n            this.spaces = new Array();\r\n            this.positions = new Array();\r\n            this.world = new Array();\r\n            this.curves = new Array();\r\n            this.lengths = new Array();\r\n            this.segments = new Array();\r\n            this.active = false;\r\n            if (data == null)\r\n                throw new Error(\"data cannot be null.\");\r\n            if (skeleton == null)\r\n                throw new Error(\"skeleton cannot be null.\");\r\n            this.data = data;\r\n            this.bones = new Array();\r\n            for (var i = 0, n = data.bones.length; i < n; i++)\r\n                this.bones.push(skeleton.findBone(data.bones[i].name));\r\n            this.target = skeleton.findSlot(data.target.name);\r\n            this.position = data.position;\r\n            this.spacing = data.spacing;\r\n            this.rotateMix = data.rotateMix;\r\n            this.translateMix = data.translateMix;\r\n        }\r\n        PathConstraint.prototype.isActive = function () {\r\n            return this.active;\r\n        };\r\n        PathConstraint.prototype.apply = function () {\r\n            this.update();\r\n        };\r\n        PathConstraint.prototype.update = function () {\r\n            var attachment = this.target.getAttachment();\r\n            if (!(attachment instanceof PathAttachment$2))\r\n                return;\r\n            var rotateMix = this.rotateMix, translateMix = this.translateMix;\r\n            var translate = translateMix > 0, rotate = rotateMix > 0;\r\n            if (!translate && !rotate)\r\n                return;\r\n            var data = this.data;\r\n            var spacingMode = data.spacingMode;\r\n            var lengthSpacing = spacingMode == SpacingMode$2.Length;\r\n            var rotateMode = data.rotateMode;\r\n            var tangents = rotateMode == exports.RotateMode.Tangent, scale = rotateMode == exports.RotateMode.ChainScale;\r\n            var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\r\n            var bones = this.bones;\r\n            var spaces = Utils.setArraySize(this.spaces, spacesCount), lengths = null;\r\n            var spacing = this.spacing;\r\n            if (scale || lengthSpacing) {\r\n                if (scale)\r\n                    lengths = Utils.setArraySize(this.lengths, boneCount);\r\n                for (var i = 0, n = spacesCount - 1; i < n;) {\r\n                    var bone = bones[i];\r\n                    var setupLength = bone.data.length;\r\n                    if (setupLength < PathConstraint.epsilon) {\r\n                        if (scale)\r\n                            lengths[i] = 0;\r\n                        spaces[++i] = 0;\r\n                    }\r\n                    else {\r\n                        var x = setupLength * bone.matrix.a, y = setupLength * bone.matrix.b;\r\n                        var length_1 = Math.sqrt(x * x + y * y);\r\n                        if (scale)\r\n                            lengths[i] = length_1;\r\n                        spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_1 / setupLength;\r\n                    }\r\n                }\r\n            }\r\n            else {\r\n                for (var i = 1; i < spacesCount; i++)\r\n                    spaces[i] = spacing;\r\n            }\r\n            var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == exports.PositionMode.Percent, spacingMode == SpacingMode$2.Percent);\r\n            var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\r\n            var tip = false;\r\n            if (offsetRotation == 0)\r\n                tip = rotateMode == exports.RotateMode.Chain;\r\n            else {\r\n                tip = false;\r\n                var p = this.target.bone.matrix;\r\n                offsetRotation *= p.a * p.d - p.b * p.c > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n            }\r\n            for (var i = 0, p = 3; i < boneCount; i++, p += 3) {\r\n                var bone = bones[i];\r\n                var mat = bone.matrix;\r\n                mat.tx += (boneX - mat.tx) * translateMix;\r\n                mat.ty += (boneY - mat.ty) * translateMix;\r\n                var x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\r\n                if (scale) {\r\n                    var length_2 = lengths[i];\r\n                    if (length_2 != 0) {\r\n                        var s = (Math.sqrt(dx * dx + dy * dy) / length_2 - 1) * rotateMix + 1;\r\n                        mat.a *= s;\r\n                        mat.b *= s;\r\n                    }\r\n                }\r\n                boneX = x;\r\n                boneY = y;\r\n                if (rotate) {\r\n                    var a = mat.a, b = mat.c, c = mat.b, d = mat.d, r = 0, cos = 0, sin = 0;\r\n                    if (tangents)\r\n                        r = positions[p - 1];\r\n                    else if (spaces[i + 1] == 0)\r\n                        r = positions[p + 2];\r\n                    else\r\n                        r = Math.atan2(dy, dx);\r\n                    r -= Math.atan2(c, a);\r\n                    if (tip) {\r\n                        cos = Math.cos(r);\r\n                        sin = Math.sin(r);\r\n                        var length_3 = bone.data.length;\r\n                        boneX += (length_3 * (cos * a - sin * c) - dx) * rotateMix;\r\n                        boneY += (length_3 * (sin * a + cos * c) - dy) * rotateMix;\r\n                    }\r\n                    else {\r\n                        r += offsetRotation;\r\n                    }\r\n                    if (r > MathUtils.PI)\r\n                        r -= MathUtils.PI2;\r\n                    else if (r < -MathUtils.PI) //\r\n                        r += MathUtils.PI2;\r\n                    r *= rotateMix;\r\n                    cos = Math.cos(r);\r\n                    sin = Math.sin(r);\r\n                    mat.a = cos * a - sin * c;\r\n                    mat.c = cos * b - sin * d;\r\n                    mat.b = sin * a + cos * c;\r\n                    mat.d = sin * b + cos * d;\r\n                }\r\n                bone.appliedValid = false;\r\n            }\r\n        };\r\n        PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) {\r\n            var target = this.target;\r\n            var position = this.position;\r\n            var spaces = this.spaces, out = Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null;\r\n            var closed = path.closed;\r\n            var verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\r\n            if (!path.constantSpeed) {\r\n                var lengths = path.lengths;\r\n                curveCount -= closed ? 1 : 2;\r\n                var pathLength_1 = lengths[curveCount];\r\n                if (percentPosition)\r\n                    position *= pathLength_1;\r\n                if (percentSpacing) {\r\n                    for (var i = 0; i < spacesCount; i++)\r\n                        spaces[i] *= pathLength_1;\r\n                }\r\n                world = Utils.setArraySize(this.world, 8);\r\n                for (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\r\n                    var space = spaces[i];\r\n                    position += space;\r\n                    var p = position;\r\n                    if (closed) {\r\n                        p %= pathLength_1;\r\n                        if (p < 0)\r\n                            p += pathLength_1;\r\n                        curve = 0;\r\n                    }\r\n                    else if (p < 0) {\r\n                        if (prevCurve != PathConstraint.BEFORE) {\r\n                            prevCurve = PathConstraint.BEFORE;\r\n                            path.computeWorldVertices(target, 2, 4, world, 0, 2);\r\n                        }\r\n                        this.addBeforePosition(p, world, 0, out, o);\r\n                        continue;\r\n                    }\r\n                    else if (p > pathLength_1) {\r\n                        if (prevCurve != PathConstraint.AFTER) {\r\n                            prevCurve = PathConstraint.AFTER;\r\n                            path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\r\n                        }\r\n                        this.addAfterPosition(p - pathLength_1, world, 0, out, o);\r\n                        continue;\r\n                    }\r\n                    // Determine curve containing position.\r\n                    for (;; curve++) {\r\n                        var length_4 = lengths[curve];\r\n                        if (p > length_4)\r\n                            continue;\r\n                        if (curve == 0)\r\n                            p /= length_4;\r\n                        else {\r\n                            var prev = lengths[curve - 1];\r\n                            p = (p - prev) / (length_4 - prev);\r\n                        }\r\n                        break;\r\n                    }\r\n                    if (curve != prevCurve) {\r\n                        prevCurve = curve;\r\n                        if (closed && curve == curveCount) {\r\n                            path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\r\n                            path.computeWorldVertices(target, 0, 4, world, 4, 2);\r\n                        }\r\n                        else\r\n                            path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\r\n                    }\r\n                    this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0));\r\n                }\r\n                return out;\r\n            }\r\n            // World vertices.\r\n            if (closed) {\r\n                verticesLength += 2;\r\n                world = Utils.setArraySize(this.world, verticesLength);\r\n                path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\r\n                path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\r\n                world[verticesLength - 2] = world[0];\r\n                world[verticesLength - 1] = world[1];\r\n            }\r\n            else {\r\n                curveCount--;\r\n                verticesLength -= 4;\r\n                world = Utils.setArraySize(this.world, verticesLength);\r\n                path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\r\n            }\r\n            // Curve lengths.\r\n            var curves = Utils.setArraySize(this.curves, curveCount);\r\n            var pathLength = 0;\r\n            var x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\r\n            var tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\r\n            for (var i = 0, w = 2; i < curveCount; i++, w += 6) {\r\n                cx1 = world[w];\r\n                cy1 = world[w + 1];\r\n                cx2 = world[w + 2];\r\n                cy2 = world[w + 3];\r\n                x2 = world[w + 4];\r\n                y2 = world[w + 5];\r\n                tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\r\n                tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\r\n                dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\r\n                dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\r\n                ddfx = tmpx * 2 + dddfx;\r\n                ddfy = tmpy * 2 + dddfy;\r\n                dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\r\n                dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\r\n                pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n                dfx += ddfx;\r\n                dfy += ddfy;\r\n                ddfx += dddfx;\r\n                ddfy += dddfy;\r\n                pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n                dfx += ddfx;\r\n                dfy += ddfy;\r\n                pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n                dfx += ddfx + dddfx;\r\n                dfy += ddfy + dddfy;\r\n                pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n                curves[i] = pathLength;\r\n                x1 = x2;\r\n                y1 = y2;\r\n            }\r\n            if (percentPosition)\r\n                position *= pathLength;\r\n            if (percentSpacing) {\r\n                for (var i = 0; i < spacesCount; i++)\r\n                    spaces[i] *= pathLength;\r\n            }\r\n            var segments = this.segments;\r\n            var curveLength = 0;\r\n            for (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\r\n                var space = spaces[i];\r\n                position += space;\r\n                var p = position;\r\n                if (closed) {\r\n                    p %= pathLength;\r\n                    if (p < 0)\r\n                        p += pathLength;\r\n                    curve = 0;\r\n                }\r\n                else if (p < 0) {\r\n                    this.addBeforePosition(p, world, 0, out, o);\r\n                    continue;\r\n                }\r\n                else if (p > pathLength) {\r\n                    this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\r\n                    continue;\r\n                }\r\n                // Determine curve containing position.\r\n                for (;; curve++) {\r\n                    var length_5 = curves[curve];\r\n                    if (p > length_5)\r\n                        continue;\r\n                    if (curve == 0)\r\n                        p /= length_5;\r\n                    else {\r\n                        var prev = curves[curve - 1];\r\n                        p = (p - prev) / (length_5 - prev);\r\n                    }\r\n                    break;\r\n                }\r\n                // Curve segment lengths.\r\n                if (curve != prevCurve) {\r\n                    prevCurve = curve;\r\n                    var ii = curve * 6;\r\n                    x1 = world[ii];\r\n                    y1 = world[ii + 1];\r\n                    cx1 = world[ii + 2];\r\n                    cy1 = world[ii + 3];\r\n                    cx2 = world[ii + 4];\r\n                    cy2 = world[ii + 5];\r\n                    x2 = world[ii + 6];\r\n                    y2 = world[ii + 7];\r\n                    tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\r\n                    tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\r\n                    dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\r\n                    dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\r\n                    ddfx = tmpx * 2 + dddfx;\r\n                    ddfy = tmpy * 2 + dddfy;\r\n                    dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\r\n                    dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\r\n                    curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\r\n                    segments[0] = curveLength;\r\n                    for (ii = 1; ii < 8; ii++) {\r\n                        dfx += ddfx;\r\n                        dfy += ddfy;\r\n                        ddfx += dddfx;\r\n                        ddfy += dddfy;\r\n                        curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n                        segments[ii] = curveLength;\r\n                    }\r\n                    dfx += ddfx;\r\n                    dfy += ddfy;\r\n                    curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n                    segments[8] = curveLength;\r\n                    dfx += ddfx + dddfx;\r\n                    dfy += ddfy + dddfy;\r\n                    curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n                    segments[9] = curveLength;\r\n                    segment = 0;\r\n                }\r\n                // Weight by segment length.\r\n                p *= curveLength;\r\n                for (;; segment++) {\r\n                    var length_6 = segments[segment];\r\n                    if (p > length_6)\r\n                        continue;\r\n                    if (segment == 0)\r\n                        p /= length_6;\r\n                    else {\r\n                        var prev = segments[segment - 1];\r\n                        p = segment + (p - prev) / (length_6 - prev);\r\n                    }\r\n                    break;\r\n                }\r\n                this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\r\n            }\r\n            return out;\r\n        };\r\n        PathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) {\r\n            var x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\r\n            out[o] = x1 + p * Math.cos(r);\r\n            out[o + 1] = y1 + p * Math.sin(r);\r\n            out[o + 2] = r;\r\n        };\r\n        PathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) {\r\n            var x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\r\n            out[o] = x1 + p * Math.cos(r);\r\n            out[o + 1] = y1 + p * Math.sin(r);\r\n            out[o + 2] = r;\r\n        };\r\n        PathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\r\n            if (p == 0 || isNaN(p))\r\n                p = 0.0001;\r\n            var tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\r\n            var ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\r\n            var x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\r\n            out[o] = x;\r\n            out[o + 1] = y;\r\n            if (tangents)\r\n                out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\r\n        };\r\n        PathConstraint.NONE = -1;\r\n        PathConstraint.BEFORE = -2;\r\n        PathConstraint.AFTER = -3;\r\n        PathConstraint.epsilon = 0.00001;\r\n        return PathConstraint;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var Slot$2 = /** @class */ (function () {\r\n        function Slot(data, bone) {\r\n            this.deform = new Array();\r\n            if (data == null)\r\n                throw new Error(\"data cannot be null.\");\r\n            if (bone == null)\r\n                throw new Error(\"bone cannot be null.\");\r\n            this.data = data;\r\n            this.bone = bone;\r\n            this.color = new Color();\r\n            this.darkColor = data.darkColor == null ? null : new Color();\r\n            this.setToSetupPose();\r\n            this.blendMode = this.data.blendMode;\r\n        }\r\n        /** @return May be null. */\r\n        Slot.prototype.getAttachment = function () {\r\n            return this.attachment;\r\n        };\r\n        /** Sets the attachment and if it changed, resets {@link #getAttachmentTime()} and clears {@link #getAttachmentVertices()}.\r\n         * @param attachment May be null. */\r\n        Slot.prototype.setAttachment = function (attachment) {\r\n            if (this.attachment == attachment)\r\n                return;\r\n            this.attachment = attachment;\r\n            this.attachmentTime = this.bone.skeleton.time;\r\n            this.deform.length = 0;\r\n        };\r\n        Slot.prototype.setAttachmentTime = function (time) {\r\n            this.attachmentTime = this.bone.skeleton.time - time;\r\n        };\r\n        /** Returns the time since the attachment was set. */\r\n        Slot.prototype.getAttachmentTime = function () {\r\n            return this.bone.skeleton.time - this.attachmentTime;\r\n        };\r\n        Slot.prototype.setToSetupPose = function () {\r\n            this.color.setFromColor(this.data.color);\r\n            if (this.darkColor != null)\r\n                this.darkColor.setFromColor(this.data.darkColor);\r\n            if (this.data.attachmentName == null)\r\n                this.attachment = null;\r\n            else {\r\n                this.attachment = null;\r\n                this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\r\n            }\r\n        };\r\n        return Slot;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var TransformConstraint$2 = /** @class */ (function () {\r\n        function TransformConstraint(data, skeleton) {\r\n            this.rotateMix = 0;\r\n            this.translateMix = 0;\r\n            this.scaleMix = 0;\r\n            this.shearMix = 0;\r\n            this.temp = new Vector2();\r\n            this.active = false;\r\n            if (data == null)\r\n                throw new Error(\"data cannot be null.\");\r\n            if (skeleton == null)\r\n                throw new Error(\"skeleton cannot be null.\");\r\n            this.data = data;\r\n            this.rotateMix = data.rotateMix;\r\n            this.translateMix = data.translateMix;\r\n            this.scaleMix = data.scaleMix;\r\n            this.shearMix = data.shearMix;\r\n            this.bones = new Array();\r\n            for (var i = 0; i < data.bones.length; i++)\r\n                this.bones.push(skeleton.findBone(data.bones[i].name));\r\n            this.target = skeleton.findBone(data.target.name);\r\n        }\r\n        TransformConstraint.prototype.isActive = function () {\r\n            return this.active;\r\n        };\r\n        TransformConstraint.prototype.apply = function () {\r\n            this.update();\r\n        };\r\n        TransformConstraint.prototype.update = function () {\r\n            if (this.data.local) {\r\n                if (this.data.relative)\r\n                    this.applyRelativeLocal();\r\n                else\r\n                    this.applyAbsoluteLocal();\r\n            }\r\n            else {\r\n                if (this.data.relative)\r\n                    this.applyRelativeWorld();\r\n                else\r\n                    this.applyAbsoluteWorld();\r\n            }\r\n        };\r\n        TransformConstraint.prototype.applyAbsoluteWorld = function () {\r\n            var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n            var target = this.target;\r\n            var targetMat = target.matrix;\r\n            var ta = targetMat.a, tb = targetMat.c, tc = targetMat.b, td = targetMat.d;\r\n            var degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n            var offsetRotation = this.data.offsetRotation * degRadReflect;\r\n            var offsetShearY = this.data.offsetShearY * degRadReflect;\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                var modified = false;\r\n                var mat = bone.matrix;\r\n                if (rotateMix != 0) {\r\n                    var a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n                    var r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\r\n                    if (r > MathUtils.PI)\r\n                        r -= MathUtils.PI2;\r\n                    else if (r < -MathUtils.PI)\r\n                        r += MathUtils.PI2;\r\n                    r *= rotateMix;\r\n                    var cos = Math.cos(r), sin = Math.sin(r);\r\n                    mat.a = cos * a - sin * c;\r\n                    mat.c = cos * b - sin * d;\r\n                    mat.b = sin * a + cos * c;\r\n                    mat.d = sin * b + cos * d;\r\n                    modified = true;\r\n                }\r\n                if (translateMix != 0) {\r\n                    var temp = this.temp;\r\n                    target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n                    mat.tx += (temp.x - mat.tx) * translateMix;\r\n                    mat.ty += (temp.y - mat.ty) * translateMix;\r\n                    modified = true;\r\n                }\r\n                if (scaleMix > 0) {\r\n                    var s = Math.sqrt(mat.a * mat.a + mat.b * mat.b);\r\n                    var ts = Math.sqrt(ta * ta + tc * tc);\r\n                    if (s > 0.00001)\r\n                        s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\r\n                    mat.a *= s;\r\n                    mat.b *= s;\r\n                    s = Math.sqrt(mat.c * mat.c + mat.d * mat.d);\r\n                    ts = Math.sqrt(tb * tb + td * td);\r\n                    if (s > 0.00001)\r\n                        s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\r\n                    mat.c *= s;\r\n                    mat.d *= s;\r\n                    modified = true;\r\n                }\r\n                if (shearMix > 0) {\r\n                    var b = mat.c, d = mat.d;\r\n                    var by = Math.atan2(d, b);\r\n                    var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(mat.b, mat.a));\r\n                    if (r > MathUtils.PI)\r\n                        r -= MathUtils.PI2;\r\n                    else if (r < -MathUtils.PI)\r\n                        r += MathUtils.PI2;\r\n                    r = by + (r + offsetShearY) * shearMix;\r\n                    var s = Math.sqrt(b * b + d * d);\r\n                    mat.c = Math.cos(r) * s;\r\n                    mat.d = Math.sin(r) * s;\r\n                    modified = true;\r\n                }\r\n                if (modified)\r\n                    bone.appliedValid = false;\r\n            }\r\n        };\r\n        TransformConstraint.prototype.applyRelativeWorld = function () {\r\n            var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n            var target = this.target;\r\n            var targetMat = target.matrix;\r\n            var ta = targetMat.a, tb = targetMat.c, tc = targetMat.b, td = targetMat.d;\r\n            var degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n            var offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                var modified = false;\r\n                var mat = bone.matrix;\r\n                if (rotateMix != 0) {\r\n                    var a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n                    var r = Math.atan2(tc, ta) + offsetRotation;\r\n                    if (r > MathUtils.PI)\r\n                        r -= MathUtils.PI2;\r\n                    else if (r < -MathUtils.PI)\r\n                        r += MathUtils.PI2;\r\n                    r *= rotateMix;\r\n                    var cos = Math.cos(r), sin = Math.sin(r);\r\n                    mat.a = cos * a - sin * c;\r\n                    mat.c = cos * b - sin * d;\r\n                    mat.b = sin * a + cos * c;\r\n                    mat.d = sin * b + cos * d;\r\n                    modified = true;\r\n                }\r\n                if (translateMix != 0) {\r\n                    var temp = this.temp;\r\n                    target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n                    mat.tx += temp.x * translateMix;\r\n                    mat.ty += temp.y * translateMix;\r\n                    modified = true;\r\n                }\r\n                if (scaleMix > 0) {\r\n                    var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\r\n                    mat.a *= s;\r\n                    mat.b *= s;\r\n                    s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\r\n                    mat.c *= s;\r\n                    mat.d *= s;\r\n                    modified = true;\r\n                }\r\n                if (shearMix > 0) {\r\n                    var r = Math.atan2(td, tb) - Math.atan2(tc, ta);\r\n                    if (r > MathUtils.PI)\r\n                        r -= MathUtils.PI2;\r\n                    else if (r < -MathUtils.PI)\r\n                        r += MathUtils.PI2;\r\n                    var b = mat.c, d = mat.d;\r\n                    r = Math.atan2(d, b) + (r - MathUtils.PI / 2 + offsetShearY) * shearMix;\r\n                    var s = Math.sqrt(b * b + d * d);\r\n                    mat.c = Math.cos(r) * s;\r\n                    mat.d = Math.sin(r) * s;\r\n                    modified = true;\r\n                }\r\n                if (modified)\r\n                    bone.appliedValid = false;\r\n            }\r\n        };\r\n        TransformConstraint.prototype.applyAbsoluteLocal = function () {\r\n            var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n            var target = this.target;\r\n            if (!target.appliedValid)\r\n                target.updateAppliedTransform();\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                if (!bone.appliedValid)\r\n                    bone.updateAppliedTransform();\r\n                var rotation = bone.arotation;\r\n                if (rotateMix != 0) {\r\n                    var r = target.arotation - rotation + this.data.offsetRotation;\r\n                    r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n                    rotation += r * rotateMix;\r\n                }\r\n                var x = bone.ax, y = bone.ay;\r\n                if (translateMix != 0) {\r\n                    x += (target.ax - x + this.data.offsetX) * translateMix;\r\n                    y += (target.ay - y + this.data.offsetY) * translateMix;\r\n                }\r\n                var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n                if (scaleMix > 0) {\r\n                    if (scaleX > 0.00001)\r\n                        scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\r\n                    if (scaleY > 0.00001)\r\n                        scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\r\n                }\r\n                var shearY = bone.ashearY;\r\n                if (shearMix > 0) {\r\n                    var r = target.ashearY - shearY + this.data.offsetShearY;\r\n                    r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n                    bone.shearY += r * shearMix;\r\n                }\r\n                bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n            }\r\n        };\r\n        TransformConstraint.prototype.applyRelativeLocal = function () {\r\n            var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n            var target = this.target;\r\n            if (!target.appliedValid)\r\n                target.updateAppliedTransform();\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                if (!bone.appliedValid)\r\n                    bone.updateAppliedTransform();\r\n                var rotation = bone.arotation;\r\n                if (rotateMix != 0)\r\n                    rotation += (target.arotation + this.data.offsetRotation) * rotateMix;\r\n                var x = bone.ax, y = bone.ay;\r\n                if (translateMix != 0) {\r\n                    x += (target.ax + this.data.offsetX) * translateMix;\r\n                    y += (target.ay + this.data.offsetY) * translateMix;\r\n                }\r\n                var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n                if (scaleMix > 0) {\r\n                    if (scaleX > 0.00001)\r\n                        scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\r\n                    if (scaleY > 0.00001)\r\n                        scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\r\n                }\r\n                var shearY = bone.ashearY;\r\n                if (shearMix > 0)\r\n                    shearY += (target.ashearY + this.data.offsetShearY) * shearMix;\r\n                bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n            }\r\n        };\r\n        return TransformConstraint;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var Skeleton$2 = /** @class */ (function () {\r\n        function Skeleton(data) {\r\n            this._updateCache = new Array();\r\n            this.updateCacheReset = new Array();\r\n            this.time = 0;\r\n            this.scaleX = 1;\r\n            this.scaleY = 1;\r\n            this.x = 0;\r\n            this.y = 0;\r\n            if (data == null)\r\n                throw new Error(\"data cannot be null.\");\r\n            this.data = data;\r\n            this.bones = new Array();\r\n            for (var i = 0; i < data.bones.length; i++) {\r\n                var boneData = data.bones[i];\r\n                var bone = void 0;\r\n                if (boneData.parent == null)\r\n                    bone = new Bone$2(boneData, this, null);\r\n                else {\r\n                    var parent_1 = this.bones[boneData.parent.index];\r\n                    bone = new Bone$2(boneData, this, parent_1);\r\n                    parent_1.children.push(bone);\r\n                }\r\n                this.bones.push(bone);\r\n            }\r\n            this.slots = new Array();\r\n            this.drawOrder = new Array();\r\n            for (var i = 0; i < data.slots.length; i++) {\r\n                var slotData = data.slots[i];\r\n                var bone = this.bones[slotData.boneData.index];\r\n                var slot = new Slot$2(slotData, bone);\r\n                this.slots.push(slot);\r\n                this.drawOrder.push(slot);\r\n            }\r\n            this.ikConstraints = new Array();\r\n            for (var i = 0; i < data.ikConstraints.length; i++) {\r\n                var ikConstraintData = data.ikConstraints[i];\r\n                this.ikConstraints.push(new IkConstraint$2(ikConstraintData, this));\r\n            }\r\n            this.transformConstraints = new Array();\r\n            for (var i = 0; i < data.transformConstraints.length; i++) {\r\n                var transformConstraintData = data.transformConstraints[i];\r\n                this.transformConstraints.push(new TransformConstraint$2(transformConstraintData, this));\r\n            }\r\n            this.pathConstraints = new Array();\r\n            for (var i = 0; i < data.pathConstraints.length; i++) {\r\n                var pathConstraintData = data.pathConstraints[i];\r\n                this.pathConstraints.push(new PathConstraint$2(pathConstraintData, this));\r\n            }\r\n            this.color = new Color(1, 1, 1, 1);\r\n            this.updateCache();\r\n        }\r\n        Skeleton.prototype.updateCache = function () {\r\n            var updateCache = this._updateCache;\r\n            updateCache.length = 0;\r\n            this.updateCacheReset.length = 0;\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                bone.sorted = bone.data.skinRequired;\r\n                bone.active = !bone.sorted;\r\n            }\r\n            if (this.skin != null) {\r\n                var skinBones = this.skin.bones;\r\n                for (var i = 0, n = this.skin.bones.length; i < n; i++) {\r\n                    var bone = this.bones[skinBones[i].index];\r\n                    do {\r\n                        bone.sorted = false;\r\n                        bone.active = true;\r\n                        bone = bone.parent;\r\n                    } while (bone != null);\r\n                }\r\n            }\r\n            // IK first, lowest hierarchy depth first.\r\n            var ikConstraints = this.ikConstraints;\r\n            var transformConstraints = this.transformConstraints;\r\n            var pathConstraints = this.pathConstraints;\r\n            var ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\r\n            var constraintCount = ikCount + transformCount + pathCount;\r\n            outer: for (var i = 0; i < constraintCount; i++) {\r\n                for (var ii = 0; ii < ikCount; ii++) {\r\n                    var constraint = ikConstraints[ii];\r\n                    if (constraint.data.order == i) {\r\n                        this.sortIkConstraint(constraint);\r\n                        continue outer;\r\n                    }\r\n                }\r\n                for (var ii = 0; ii < transformCount; ii++) {\r\n                    var constraint = transformConstraints[ii];\r\n                    if (constraint.data.order == i) {\r\n                        this.sortTransformConstraint(constraint);\r\n                        continue outer;\r\n                    }\r\n                }\r\n                for (var ii = 0; ii < pathCount; ii++) {\r\n                    var constraint = pathConstraints[ii];\r\n                    if (constraint.data.order == i) {\r\n                        this.sortPathConstraint(constraint);\r\n                        continue outer;\r\n                    }\r\n                }\r\n            }\r\n            for (var i = 0, n = bones.length; i < n; i++)\r\n                this.sortBone(bones[i]);\r\n        };\r\n        Skeleton.prototype.sortIkConstraint = function (constraint) {\r\n            constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && Utils.contains(this.skin.constraints, constraint.data, true)));\r\n            if (!constraint.active)\r\n                return;\r\n            var target = constraint.target;\r\n            this.sortBone(target);\r\n            var constrained = constraint.bones;\r\n            var parent = constrained[0];\r\n            this.sortBone(parent);\r\n            if (constrained.length > 1) {\r\n                var child = constrained[constrained.length - 1];\r\n                if (!(this._updateCache.indexOf(child) > -1))\r\n                    this.updateCacheReset.push(child);\r\n            }\r\n            this._updateCache.push(constraint);\r\n            this.sortReset(parent.children);\r\n            constrained[constrained.length - 1].sorted = true;\r\n        };\r\n        Skeleton.prototype.sortPathConstraint = function (constraint) {\r\n            constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && Utils.contains(this.skin.constraints, constraint.data, true)));\r\n            if (!constraint.active)\r\n                return;\r\n            var slot = constraint.target;\r\n            var slotIndex = slot.data.index;\r\n            var slotBone = slot.bone;\r\n            if (this.skin != null)\r\n                this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\r\n            if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\r\n                this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\r\n            for (var i = 0, n = this.data.skins.length; i < n; i++)\r\n                this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\r\n            var attachment = slot.getAttachment();\r\n            if (attachment instanceof PathAttachment$2)\r\n                this.sortPathConstraintAttachmentWith(attachment, slotBone);\r\n            var constrained = constraint.bones;\r\n            var boneCount = constrained.length;\r\n            for (var i = 0; i < boneCount; i++)\r\n                this.sortBone(constrained[i]);\r\n            this._updateCache.push(constraint);\r\n            for (var i = 0; i < boneCount; i++)\r\n                this.sortReset(constrained[i].children);\r\n            for (var i = 0; i < boneCount; i++)\r\n                constrained[i].sorted = true;\r\n        };\r\n        Skeleton.prototype.sortTransformConstraint = function (constraint) {\r\n            constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && Utils.contains(this.skin.constraints, constraint.data, true)));\r\n            if (!constraint.active)\r\n                return;\r\n            this.sortBone(constraint.target);\r\n            var constrained = constraint.bones;\r\n            var boneCount = constrained.length;\r\n            if (constraint.data.local) {\r\n                for (var i = 0; i < boneCount; i++) {\r\n                    var child = constrained[i];\r\n                    this.sortBone(child.parent);\r\n                    if (!(this._updateCache.indexOf(child) > -1))\r\n                        this.updateCacheReset.push(child);\r\n                }\r\n            }\r\n            else {\r\n                for (var i = 0; i < boneCount; i++) {\r\n                    this.sortBone(constrained[i]);\r\n                }\r\n            }\r\n            this._updateCache.push(constraint);\r\n            for (var ii = 0; ii < boneCount; ii++)\r\n                this.sortReset(constrained[ii].children);\r\n            for (var ii = 0; ii < boneCount; ii++)\r\n                constrained[ii].sorted = true;\r\n        };\r\n        Skeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) {\r\n            var attachments = skin.attachments[slotIndex];\r\n            if (!attachments)\r\n                return;\r\n            for (var key in attachments) {\r\n                this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\r\n            }\r\n        };\r\n        Skeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) {\r\n            if (!(attachment instanceof PathAttachment$2))\r\n                return;\r\n            var pathBones = attachment.bones;\r\n            if (pathBones == null)\r\n                this.sortBone(slotBone);\r\n            else {\r\n                var bones = this.bones;\r\n                var i = 0;\r\n                while (i < pathBones.length) {\r\n                    var boneCount = pathBones[i++];\r\n                    for (var n = i + boneCount; i < n; i++) {\r\n                        var boneIndex = pathBones[i];\r\n                        this.sortBone(bones[boneIndex]);\r\n                    }\r\n                }\r\n            }\r\n        };\r\n        Skeleton.prototype.sortBone = function (bone) {\r\n            if (bone.sorted)\r\n                return;\r\n            var parent = bone.parent;\r\n            if (parent != null)\r\n                this.sortBone(parent);\r\n            bone.sorted = true;\r\n            this._updateCache.push(bone);\r\n        };\r\n        Skeleton.prototype.sortReset = function (bones) {\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                if (!bone.active)\r\n                    continue;\r\n                if (bone.sorted)\r\n                    this.sortReset(bone.children);\r\n                bone.sorted = false;\r\n            }\r\n        };\r\n        /** Updates the world transform for each bone and applies constraints. */\r\n        Skeleton.prototype.updateWorldTransform = function () {\r\n            var updateCacheReset = this.updateCacheReset;\r\n            for (var i = 0, n = updateCacheReset.length; i < n; i++) {\r\n                var bone = updateCacheReset[i];\r\n                bone.ax = bone.x;\r\n                bone.ay = bone.y;\r\n                bone.arotation = bone.rotation;\r\n                bone.ascaleX = bone.scaleX;\r\n                bone.ascaleY = bone.scaleY;\r\n                bone.ashearX = bone.shearX;\r\n                bone.ashearY = bone.shearY;\r\n                bone.appliedValid = true;\r\n            }\r\n            var updateCache = this._updateCache;\r\n            for (var i = 0, n = updateCache.length; i < n; i++)\r\n                updateCache[i].update();\r\n        };\r\n        /** Sets the bones, constraints, and slots to their setup pose values. */\r\n        Skeleton.prototype.setToSetupPose = function () {\r\n            this.setBonesToSetupPose();\r\n            this.setSlotsToSetupPose();\r\n        };\r\n        /** Sets the bones and constraints to their setup pose values. */\r\n        Skeleton.prototype.setBonesToSetupPose = function () {\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++)\r\n                bones[i].setToSetupPose();\r\n            var ikConstraints = this.ikConstraints;\r\n            for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n                var constraint = ikConstraints[i];\r\n                constraint.mix = constraint.data.mix;\r\n                constraint.softness = constraint.data.softness;\r\n                constraint.bendDirection = constraint.data.bendDirection;\r\n                constraint.compress = constraint.data.compress;\r\n                constraint.stretch = constraint.data.stretch;\r\n            }\r\n            var transformConstraints = this.transformConstraints;\r\n            for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n                var constraint = transformConstraints[i];\r\n                var data = constraint.data;\r\n                constraint.rotateMix = data.rotateMix;\r\n                constraint.translateMix = data.translateMix;\r\n                constraint.scaleMix = data.scaleMix;\r\n                constraint.shearMix = data.shearMix;\r\n            }\r\n            var pathConstraints = this.pathConstraints;\r\n            for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n                var constraint = pathConstraints[i];\r\n                var data = constraint.data;\r\n                constraint.position = data.position;\r\n                constraint.spacing = data.spacing;\r\n                constraint.rotateMix = data.rotateMix;\r\n                constraint.translateMix = data.translateMix;\r\n            }\r\n        };\r\n        Skeleton.prototype.setSlotsToSetupPose = function () {\r\n            var slots = this.slots;\r\n            Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\r\n            for (var i = 0, n = slots.length; i < n; i++)\r\n                slots[i].setToSetupPose();\r\n        };\r\n        /** @return May return null. */\r\n        Skeleton.prototype.getRootBone = function () {\r\n            if (this.bones.length == 0)\r\n                return null;\r\n            return this.bones[0];\r\n        };\r\n        /** @return May be null. */\r\n        Skeleton.prototype.findBone = function (boneName) {\r\n            if (boneName == null)\r\n                throw new Error(\"boneName cannot be null.\");\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                if (bone.data.name == boneName)\r\n                    return bone;\r\n            }\r\n            return null;\r\n        };\r\n        /** @return -1 if the bone was not found. */\r\n        Skeleton.prototype.findBoneIndex = function (boneName) {\r\n            if (boneName == null)\r\n                throw new Error(\"boneName cannot be null.\");\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++)\r\n                if (bones[i].data.name == boneName)\r\n                    return i;\r\n            return -1;\r\n        };\r\n        /** @return May be null. */\r\n        Skeleton.prototype.findSlot = function (slotName) {\r\n            if (slotName == null)\r\n                throw new Error(\"slotName cannot be null.\");\r\n            var slots = this.slots;\r\n            for (var i = 0, n = slots.length; i < n; i++) {\r\n                var slot = slots[i];\r\n                if (slot.data.name == slotName)\r\n                    return slot;\r\n            }\r\n            return null;\r\n        };\r\n        /** @return -1 if the bone was not found. */\r\n        Skeleton.prototype.findSlotIndex = function (slotName) {\r\n            if (slotName == null)\r\n                throw new Error(\"slotName cannot be null.\");\r\n            var slots = this.slots;\r\n            for (var i = 0, n = slots.length; i < n; i++)\r\n                if (slots[i].data.name == slotName)\r\n                    return i;\r\n            return -1;\r\n        };\r\n        /** Sets a skin by name.\r\n         * @see #setSkin(Skin) */\r\n        Skeleton.prototype.setSkinByName = function (skinName) {\r\n            var skin = this.data.findSkin(skinName);\r\n            if (skin == null)\r\n                throw new Error(\"Skin not found: \" + skinName);\r\n            this.setSkin(skin);\r\n        };\r\n        /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default skin}.\r\n         * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no\r\n         * old skin, each slot's setup mode attachment is attached from the new skin.\r\n         * @param newSkin May be null. */\r\n        Skeleton.prototype.setSkin = function (newSkin) {\r\n            if (newSkin == this.skin)\r\n                return;\r\n            if (newSkin != null) {\r\n                if (this.skin != null)\r\n                    newSkin.attachAll(this, this.skin);\r\n                else {\r\n                    var slots = this.slots;\r\n                    for (var i = 0, n = slots.length; i < n; i++) {\r\n                        var slot = slots[i];\r\n                        var name_1 = slot.data.attachmentName;\r\n                        if (name_1 != null) {\r\n                            var attachment = newSkin.getAttachment(i, name_1);\r\n                            if (attachment != null)\r\n                                slot.setAttachment(attachment);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            this.skin = newSkin;\r\n            this.updateCache();\r\n        };\r\n        /** @return May be null. */\r\n        Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) {\r\n            return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\r\n        };\r\n        /** @return May be null. */\r\n        Skeleton.prototype.getAttachment = function (slotIndex, attachmentName) {\r\n            if (attachmentName == null)\r\n                throw new Error(\"attachmentName cannot be null.\");\r\n            if (this.skin != null) {\r\n                var attachment = this.skin.getAttachment(slotIndex, attachmentName);\r\n                if (attachment != null)\r\n                    return attachment;\r\n            }\r\n            if (this.data.defaultSkin != null)\r\n                return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\r\n            return null;\r\n        };\r\n        /** @param attachmentName May be null. */\r\n        Skeleton.prototype.setAttachment = function (slotName, attachmentName) {\r\n            if (slotName == null)\r\n                throw new Error(\"slotName cannot be null.\");\r\n            var slots = this.slots;\r\n            for (var i = 0, n = slots.length; i < n; i++) {\r\n                var slot = slots[i];\r\n                if (slot.data.name == slotName) {\r\n                    var attachment = null;\r\n                    if (attachmentName != null) {\r\n                        attachment = this.getAttachment(i, attachmentName);\r\n                        if (attachment == null)\r\n                            throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\r\n                    }\r\n                    slot.setAttachment(attachment);\r\n                    return;\r\n                }\r\n            }\r\n            throw new Error(\"Slot not found: \" + slotName);\r\n        };\r\n        /** @return May be null. */\r\n        Skeleton.prototype.findIkConstraint = function (constraintName) {\r\n            if (constraintName == null)\r\n                throw new Error(\"constraintName cannot be null.\");\r\n            var ikConstraints = this.ikConstraints;\r\n            for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n                var ikConstraint = ikConstraints[i];\r\n                if (ikConstraint.data.name == constraintName)\r\n                    return ikConstraint;\r\n            }\r\n            return null;\r\n        };\r\n        /** @return May be null. */\r\n        Skeleton.prototype.findTransformConstraint = function (constraintName) {\r\n            if (constraintName == null)\r\n                throw new Error(\"constraintName cannot be null.\");\r\n            var transformConstraints = this.transformConstraints;\r\n            for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n                var constraint = transformConstraints[i];\r\n                if (constraint.data.name == constraintName)\r\n                    return constraint;\r\n            }\r\n            return null;\r\n        };\r\n        /** @return May be null. */\r\n        Skeleton.prototype.findPathConstraint = function (constraintName) {\r\n            if (constraintName == null)\r\n                throw new Error(\"constraintName cannot be null.\");\r\n            var pathConstraints = this.pathConstraints;\r\n            for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n                var constraint = pathConstraints[i];\r\n                if (constraint.data.name == constraintName)\r\n                    return constraint;\r\n            }\r\n            return null;\r\n        };\r\n        /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n         * @param offset The distance from the skeleton origin to the bottom left corner of the AABB.\r\n         * @param size The width and height of the AABB.\r\n         * @param temp Working memory */\r\n        Skeleton.prototype.getBounds = function (offset, size, temp) {\r\n            if (temp === void 0) { temp = new Array(2); }\r\n            if (offset == null)\r\n                throw new Error(\"offset cannot be null.\");\r\n            if (size == null)\r\n                throw new Error(\"size cannot be null.\");\r\n            var drawOrder = this.drawOrder;\r\n            var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n            for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n                var slot = drawOrder[i];\r\n                if (!slot.bone.active)\r\n                    continue;\r\n                var verticesLength = 0;\r\n                var vertices = null;\r\n                var attachment = slot.getAttachment();\r\n                if (attachment instanceof RegionAttachment$2) {\r\n                    verticesLength = 8;\r\n                    vertices = Utils.setArraySize(temp, verticesLength, 0);\r\n                    attachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n                }\r\n                else if (attachment instanceof MeshAttachment$2) {\r\n                    var mesh = attachment;\r\n                    verticesLength = mesh.worldVerticesLength;\r\n                    vertices = Utils.setArraySize(temp, verticesLength, 0);\r\n                    mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\r\n                }\r\n                if (vertices != null) {\r\n                    for (var ii = 0, nn = vertices.length; ii < nn; ii += 2) {\r\n                        var x = vertices[ii], y = vertices[ii + 1];\r\n                        minX = Math.min(minX, x);\r\n                        minY = Math.min(minY, y);\r\n                        maxX = Math.max(maxX, x);\r\n                        maxY = Math.max(maxY, y);\r\n                    }\r\n                }\r\n            }\r\n            offset.set(minX, minY);\r\n            size.set(maxX - minX, maxY - minY);\r\n        };\r\n        Skeleton.prototype.update = function (delta) {\r\n            this.time += delta;\r\n        };\r\n        Object.defineProperty(Skeleton.prototype, \"flipX\", {\r\n            get: function () {\r\n                return this.scaleX == -1;\r\n            },\r\n            set: function (value) {\r\n                if (!Skeleton.deprecatedWarning1) {\r\n                    Skeleton.deprecatedWarning1 = true;\r\n                    console.warn(\"Spine Deprecation Warning: `Skeleton.flipX/flipY` was deprecated, please use scaleX/scaleY\");\r\n                }\r\n                this.scaleX = value ? 1.0 : -1.0;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(Skeleton.prototype, \"flipY\", {\r\n            get: function () {\r\n                return this.scaleY == -1;\r\n            },\r\n            set: function (value) {\r\n                if (!Skeleton.deprecatedWarning1) {\r\n                    Skeleton.deprecatedWarning1 = true;\r\n                    console.warn(\"Spine Deprecation Warning: `Skeleton.flipX/flipY` was deprecated, please use scaleX/scaleY\");\r\n                }\r\n                this.scaleY = value ? 1.0 : -1.0;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Skeleton.deprecatedWarning1 = false;\r\n        return Skeleton;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var SkeletonData$2 = /** @class */ (function () {\r\n        function SkeletonData() {\r\n            this.bones = new Array(); // Ordered parents first.\r\n            this.slots = new Array(); // Setup pose draw order.\r\n            this.skins = new Array();\r\n            this.events = new Array();\r\n            this.animations = new Array();\r\n            this.ikConstraints = new Array();\r\n            this.transformConstraints = new Array();\r\n            this.pathConstraints = new Array();\r\n            // Nonessential\r\n            this.fps = 0;\r\n        }\r\n        SkeletonData.prototype.findBone = function (boneName) {\r\n            if (boneName == null)\r\n                throw new Error(\"boneName cannot be null.\");\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                if (bone.name == boneName)\r\n                    return bone;\r\n            }\r\n            return null;\r\n        };\r\n        SkeletonData.prototype.findBoneIndex = function (boneName) {\r\n            if (boneName == null)\r\n                throw new Error(\"boneName cannot be null.\");\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++)\r\n                if (bones[i].name == boneName)\r\n                    return i;\r\n            return -1;\r\n        };\r\n        SkeletonData.prototype.findSlot = function (slotName) {\r\n            if (slotName == null)\r\n                throw new Error(\"slotName cannot be null.\");\r\n            var slots = this.slots;\r\n            for (var i = 0, n = slots.length; i < n; i++) {\r\n                var slot = slots[i];\r\n                if (slot.name == slotName)\r\n                    return slot;\r\n            }\r\n            return null;\r\n        };\r\n        SkeletonData.prototype.findSlotIndex = function (slotName) {\r\n            if (slotName == null)\r\n                throw new Error(\"slotName cannot be null.\");\r\n            var slots = this.slots;\r\n            for (var i = 0, n = slots.length; i < n; i++)\r\n                if (slots[i].name == slotName)\r\n                    return i;\r\n            return -1;\r\n        };\r\n        SkeletonData.prototype.findSkin = function (skinName) {\r\n            if (skinName == null)\r\n                throw new Error(\"skinName cannot be null.\");\r\n            var skins = this.skins;\r\n            for (var i = 0, n = skins.length; i < n; i++) {\r\n                var skin = skins[i];\r\n                if (skin.name == skinName)\r\n                    return skin;\r\n            }\r\n            return null;\r\n        };\r\n        SkeletonData.prototype.findEvent = function (eventDataName) {\r\n            if (eventDataName == null)\r\n                throw new Error(\"eventDataName cannot be null.\");\r\n            var events = this.events;\r\n            for (var i = 0, n = events.length; i < n; i++) {\r\n                var event_1 = events[i];\r\n                if (event_1.name == eventDataName)\r\n                    return event_1;\r\n            }\r\n            return null;\r\n        };\r\n        SkeletonData.prototype.findAnimation = function (animationName) {\r\n            if (animationName == null)\r\n                throw new Error(\"animationName cannot be null.\");\r\n            var animations = this.animations;\r\n            for (var i = 0, n = animations.length; i < n; i++) {\r\n                var animation = animations[i];\r\n                if (animation.name == animationName)\r\n                    return animation;\r\n            }\r\n            return null;\r\n        };\r\n        SkeletonData.prototype.findIkConstraint = function (constraintName) {\r\n            if (constraintName == null)\r\n                throw new Error(\"constraintName cannot be null.\");\r\n            var ikConstraints = this.ikConstraints;\r\n            for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n                var constraint = ikConstraints[i];\r\n                if (constraint.name == constraintName)\r\n                    return constraint;\r\n            }\r\n            return null;\r\n        };\r\n        SkeletonData.prototype.findTransformConstraint = function (constraintName) {\r\n            if (constraintName == null)\r\n                throw new Error(\"constraintName cannot be null.\");\r\n            var transformConstraints = this.transformConstraints;\r\n            for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n                var constraint = transformConstraints[i];\r\n                if (constraint.name == constraintName)\r\n                    return constraint;\r\n            }\r\n            return null;\r\n        };\r\n        SkeletonData.prototype.findPathConstraint = function (constraintName) {\r\n            if (constraintName == null)\r\n                throw new Error(\"constraintName cannot be null.\");\r\n            var pathConstraints = this.pathConstraints;\r\n            for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n                var constraint = pathConstraints[i];\r\n                if (constraint.name == constraintName)\r\n                    return constraint;\r\n            }\r\n            return null;\r\n        };\r\n        SkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) {\r\n            if (pathConstraintName == null)\r\n                throw new Error(\"pathConstraintName cannot be null.\");\r\n            var pathConstraints = this.pathConstraints;\r\n            for (var i = 0, n = pathConstraints.length; i < n; i++)\r\n                if (pathConstraints[i].name == pathConstraintName)\r\n                    return i;\r\n            return -1;\r\n        };\r\n        return SkeletonData;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var SlotData$2 = /** @class */ (function () {\r\n        function SlotData(index, name, boneData) {\r\n            this.color = new Color(1, 1, 1, 1);\r\n            if (index < 0)\r\n                throw new Error(\"index must be >= 0.\");\r\n            if (name == null)\r\n                throw new Error(\"name cannot be null.\");\r\n            if (boneData == null)\r\n                throw new Error(\"boneData cannot be null.\");\r\n            this.index = index;\r\n            this.name = name;\r\n            this.boneData = boneData;\r\n        }\r\n        return SlotData;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var TransformConstraintData$2 = /** @class */ (function (_super) {\r\n        __extends$3(TransformConstraintData, _super);\r\n        function TransformConstraintData(name) {\r\n            var _this = _super.call(this, name, 0, false) || this;\r\n            _this.bones = new Array();\r\n            _this.rotateMix = 0;\r\n            _this.translateMix = 0;\r\n            _this.scaleMix = 0;\r\n            _this.shearMix = 0;\r\n            _this.offsetRotation = 0;\r\n            _this.offsetX = 0;\r\n            _this.offsetY = 0;\r\n            _this.offsetScaleX = 0;\r\n            _this.offsetScaleY = 0;\r\n            _this.offsetShearY = 0;\r\n            _this.relative = false;\r\n            _this.local = false;\r\n            return _this;\r\n        }\r\n        return TransformConstraintData;\r\n    }(ConstraintData$1));\n\n    /**\r\n     * @public\r\n     */\r\n    var SkinEntry$1 = /** @class */ (function () {\r\n        function SkinEntry(slotIndex, name, attachment) {\r\n            this.slotIndex = slotIndex;\r\n            this.name = name;\r\n            this.attachment = attachment;\r\n        }\r\n        return SkinEntry;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var Skin$2 = /** @class */ (function () {\r\n        function Skin(name) {\r\n            this.attachments = new Array();\r\n            this.bones = Array();\r\n            this.constraints = new Array();\r\n            if (name == null)\r\n                throw new Error(\"name cannot be null.\");\r\n            this.name = name;\r\n        }\r\n        Skin.prototype.setAttachment = function (slotIndex, name, attachment) {\r\n            if (attachment == null)\r\n                throw new Error(\"attachment cannot be null.\");\r\n            var attachments = this.attachments;\r\n            if (slotIndex >= attachments.length)\r\n                attachments.length = slotIndex + 1;\r\n            if (!attachments[slotIndex])\r\n                attachments[slotIndex] = {};\r\n            attachments[slotIndex][name] = attachment;\r\n        };\r\n        Skin.prototype.addSkin = function (skin) {\r\n            for (var i = 0; i < skin.bones.length; i++) {\r\n                var bone = skin.bones[i];\r\n                var contained = false;\r\n                for (var j = 0; j < this.bones.length; j++) {\r\n                    if (this.bones[j] == bone) {\r\n                        contained = true;\r\n                        break;\r\n                    }\r\n                }\r\n                if (!contained)\r\n                    this.bones.push(bone);\r\n            }\r\n            for (var i = 0; i < skin.constraints.length; i++) {\r\n                var constraint = skin.constraints[i];\r\n                var contained = false;\r\n                for (var j = 0; j < this.constraints.length; j++) {\r\n                    if (this.constraints[j] == constraint) {\r\n                        contained = true;\r\n                        break;\r\n                    }\r\n                }\r\n                if (!contained)\r\n                    this.constraints.push(constraint);\r\n            }\r\n            var attachments = skin.getAttachments();\r\n            for (var i = 0; i < attachments.length; i++) {\r\n                var attachment = attachments[i];\r\n                this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n            }\r\n        };\r\n        Skin.prototype.copySkin = function (skin) {\r\n            for (var i = 0; i < skin.bones.length; i++) {\r\n                var bone = skin.bones[i];\r\n                var contained = false;\r\n                for (var j = 0; j < this.bones.length; j++) {\r\n                    if (this.bones[j] == bone) {\r\n                        contained = true;\r\n                        break;\r\n                    }\r\n                }\r\n                if (!contained)\r\n                    this.bones.push(bone);\r\n            }\r\n            for (var i = 0; i < skin.constraints.length; i++) {\r\n                var constraint = skin.constraints[i];\r\n                var contained = false;\r\n                for (var j = 0; j < this.constraints.length; j++) {\r\n                    if (this.constraints[j] == constraint) {\r\n                        contained = true;\r\n                        break;\r\n                    }\r\n                }\r\n                if (!contained)\r\n                    this.constraints.push(constraint);\r\n            }\r\n            var attachments = skin.getAttachments();\r\n            for (var i = 0; i < attachments.length; i++) {\r\n                var attachment = attachments[i];\r\n                if (attachment.attachment == null)\r\n                    continue;\r\n                if (attachment.attachment instanceof MeshAttachment$2) {\r\n                    attachment.attachment = attachment.attachment.newLinkedMesh();\r\n                    this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n                }\r\n                else {\r\n                    attachment.attachment = attachment.attachment.copy();\r\n                    this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n                }\r\n            }\r\n        };\r\n        /** @return May be null. */\r\n        Skin.prototype.getAttachment = function (slotIndex, name) {\r\n            var dictionary = this.attachments[slotIndex];\r\n            return dictionary ? dictionary[name] : null;\r\n        };\r\n        Skin.prototype.removeAttachment = function (slotIndex, name) {\r\n            var dictionary = this.attachments[slotIndex];\r\n            if (dictionary)\r\n                dictionary[name] = null;\r\n        };\r\n        Skin.prototype.getAttachments = function () {\r\n            var entries = new Array();\r\n            for (var i = 0; i < this.attachments.length; i++) {\r\n                var slotAttachments = this.attachments[i];\r\n                if (slotAttachments) {\r\n                    for (var name_1 in slotAttachments) {\r\n                        var attachment = slotAttachments[name_1];\r\n                        if (attachment)\r\n                            entries.push(new SkinEntry$1(i, name_1, attachment));\r\n                    }\r\n                }\r\n            }\r\n            return entries;\r\n        };\r\n        Skin.prototype.getAttachmentsForSlot = function (slotIndex, attachments) {\r\n            var slotAttachments = this.attachments[slotIndex];\r\n            if (slotAttachments) {\r\n                for (var name_2 in slotAttachments) {\r\n                    var attachment = slotAttachments[name_2];\r\n                    if (attachment)\r\n                        attachments.push(new SkinEntry$1(slotIndex, name_2, attachment));\r\n                }\r\n            }\r\n        };\r\n        Skin.prototype.clear = function () {\r\n            this.attachments.length = 0;\r\n            this.bones.length = 0;\r\n            this.constraints.length = 0;\r\n        };\r\n        /** Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached. */\r\n        Skin.prototype.attachAll = function (skeleton, oldSkin) {\r\n            var slotIndex = 0;\r\n            for (var i = 0; i < skeleton.slots.length; i++) {\r\n                var slot = skeleton.slots[i];\r\n                var slotAttachment = slot.getAttachment();\r\n                if (slotAttachment && slotIndex < oldSkin.attachments.length) {\r\n                    var dictionary = oldSkin.attachments[slotIndex];\r\n                    for (var key in dictionary) {\r\n                        var skinAttachment = dictionary[key];\r\n                        if (slotAttachment == skinAttachment) {\r\n                            var attachment = this.getAttachment(slotIndex, key);\r\n                            if (attachment != null)\r\n                                slot.setAttachment(attachment);\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n                slotIndex++;\r\n            }\r\n        };\r\n        return Skin;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var SkeletonBinary$1 = /** @class */ (function () {\r\n        function SkeletonBinary(attachmentLoader) {\r\n            this.scale = 1;\r\n            this.linkedMeshes = new Array();\r\n            this.attachmentLoader = attachmentLoader;\r\n        }\r\n        SkeletonBinary.prototype.readSkeletonData = function (binary) {\r\n            var scale = this.scale;\r\n            var skeletonData = new SkeletonData$2();\r\n            skeletonData.name = \"\"; // BOZO\r\n            var input = new BinaryInput(binary);\r\n            skeletonData.hash = input.readString();\r\n            skeletonData.version = input.readString();\r\n            if (skeletonData.version === '3.8.75') {\r\n                var error = \"Unsupported skeleton data, 3.8.75 is deprecated, please export with a newer version of Spine.\";\r\n                console.error(error);\r\n            }\r\n            skeletonData.x = input.readFloat();\r\n            skeletonData.y = input.readFloat();\r\n            skeletonData.width = input.readFloat();\r\n            skeletonData.height = input.readFloat();\r\n            var nonessential = input.readBoolean();\r\n            if (nonessential) {\r\n                skeletonData.fps = input.readFloat();\r\n                skeletonData.imagesPath = input.readString();\r\n                skeletonData.audioPath = input.readString();\r\n            }\r\n            var n = 0;\r\n            // Strings.\r\n            n = input.readInt(true);\r\n            for (var i = 0; i < n; i++)\r\n                input.strings.push(input.readString());\r\n            // Bones.\r\n            n = input.readInt(true);\r\n            for (var i = 0; i < n; i++) {\r\n                var name_1 = input.readString();\r\n                var parent_1 = i == 0 ? null : skeletonData.bones[input.readInt(true)];\r\n                var data = new BoneData$2(i, name_1, parent_1);\r\n                data.rotation = input.readFloat();\r\n                data.x = input.readFloat() * scale;\r\n                data.y = input.readFloat() * scale;\r\n                data.scaleX = input.readFloat();\r\n                data.scaleY = input.readFloat();\r\n                data.shearX = input.readFloat();\r\n                data.shearY = input.readFloat();\r\n                data.length = input.readFloat() * scale;\r\n                data.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)];\r\n                data.skinRequired = input.readBoolean();\r\n                if (nonessential)\r\n                    Color.rgba8888ToColor(data.color, input.readInt32());\r\n                skeletonData.bones.push(data);\r\n            }\r\n            // Slots.\r\n            n = input.readInt(true);\r\n            for (var i = 0; i < n; i++) {\r\n                var slotName = input.readString();\r\n                var boneData = skeletonData.bones[input.readInt(true)];\r\n                var data = new SlotData$2(i, slotName, boneData);\r\n                Color.rgba8888ToColor(data.color, input.readInt32());\r\n                var darkColor = input.readInt32();\r\n                if (darkColor != -1)\r\n                    Color.rgb888ToColor(data.darkColor = new Color(), darkColor);\r\n                data.attachmentName = input.readStringRef();\r\n                data.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)];\r\n                skeletonData.slots.push(data);\r\n            }\r\n            // IK constraints.\r\n            n = input.readInt(true);\r\n            for (var i = 0, nn = void 0; i < n; i++) {\r\n                var data = new IkConstraintData$2(input.readString());\r\n                data.order = input.readInt(true);\r\n                data.skinRequired = input.readBoolean();\r\n                nn = input.readInt(true);\r\n                for (var ii = 0; ii < nn; ii++)\r\n                    data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n                data.target = skeletonData.bones[input.readInt(true)];\r\n                data.mix = input.readFloat();\r\n                data.softness = input.readFloat() * scale;\r\n                data.bendDirection = input.readByte();\r\n                data.compress = input.readBoolean();\r\n                data.stretch = input.readBoolean();\r\n                data.uniform = input.readBoolean();\r\n                skeletonData.ikConstraints.push(data);\r\n            }\r\n            // Transform constraints.\r\n            n = input.readInt(true);\r\n            for (var i = 0, nn = void 0; i < n; i++) {\r\n                var data = new TransformConstraintData$2(input.readString());\r\n                data.order = input.readInt(true);\r\n                data.skinRequired = input.readBoolean();\r\n                nn = input.readInt(true);\r\n                for (var ii = 0; ii < nn; ii++)\r\n                    data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n                data.target = skeletonData.bones[input.readInt(true)];\r\n                data.local = input.readBoolean();\r\n                data.relative = input.readBoolean();\r\n                data.offsetRotation = input.readFloat();\r\n                data.offsetX = input.readFloat() * scale;\r\n                data.offsetY = input.readFloat() * scale;\r\n                data.offsetScaleX = input.readFloat();\r\n                data.offsetScaleY = input.readFloat();\r\n                data.offsetShearY = input.readFloat();\r\n                data.rotateMix = input.readFloat();\r\n                data.translateMix = input.readFloat();\r\n                data.scaleMix = input.readFloat();\r\n                data.shearMix = input.readFloat();\r\n                skeletonData.transformConstraints.push(data);\r\n            }\r\n            // Path constraints.\r\n            n = input.readInt(true);\r\n            for (var i = 0, nn = void 0; i < n; i++) {\r\n                var data = new PathConstraintData$2(input.readString());\r\n                data.order = input.readInt(true);\r\n                data.skinRequired = input.readBoolean();\r\n                nn = input.readInt(true);\r\n                for (var ii = 0; ii < nn; ii++)\r\n                    data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n                data.target = skeletonData.slots[input.readInt(true)];\r\n                data.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)];\r\n                data.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)];\r\n                data.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)];\r\n                data.offsetRotation = input.readFloat();\r\n                data.position = input.readFloat();\r\n                if (data.positionMode == exports.PositionMode.Fixed)\r\n                    data.position *= scale;\r\n                data.spacing = input.readFloat();\r\n                if (data.spacingMode == SpacingMode$2.Length || data.spacingMode == SpacingMode$2.Fixed)\r\n                    data.spacing *= scale;\r\n                data.rotateMix = input.readFloat();\r\n                data.translateMix = input.readFloat();\r\n                skeletonData.pathConstraints.push(data);\r\n            }\r\n            // Default skin.\r\n            var defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\r\n            if (defaultSkin != null) {\r\n                skeletonData.defaultSkin = defaultSkin;\r\n                skeletonData.skins.push(defaultSkin);\r\n            }\r\n            // Skins.\r\n            {\r\n                var i = skeletonData.skins.length;\r\n                Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\r\n                for (; i < n; i++)\r\n                    skeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential);\r\n            }\r\n            // Linked meshes.\r\n            n = this.linkedMeshes.length;\r\n            for (var i = 0; i < n; i++) {\r\n                var linkedMesh = this.linkedMeshes[i];\r\n                var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n                if (skin == null)\r\n                    throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n                var parent_2 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n                if (parent_2 == null)\r\n                    throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n                linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_2 : linkedMesh.mesh;\r\n                linkedMesh.mesh.setParentMesh(parent_2);\r\n                // linkedMesh.mesh.updateUVs();\r\n            }\r\n            this.linkedMeshes.length = 0;\r\n            // Events.\r\n            n = input.readInt(true);\r\n            for (var i = 0; i < n; i++) {\r\n                var data = new EventData$2(input.readStringRef());\r\n                data.intValue = input.readInt(false);\r\n                data.floatValue = input.readFloat();\r\n                data.stringValue = input.readString();\r\n                data.audioPath = input.readString();\r\n                if (data.audioPath != null) {\r\n                    data.volume = input.readFloat();\r\n                    data.balance = input.readFloat();\r\n                }\r\n                skeletonData.events.push(data);\r\n            }\r\n            // Animations.\r\n            n = input.readInt(true);\r\n            for (var i = 0; i < n; i++)\r\n                skeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData));\r\n            return skeletonData;\r\n        };\r\n        SkeletonBinary.prototype.readSkin = function (input, skeletonData, defaultSkin, nonessential) {\r\n            var skin = null;\r\n            var slotCount = 0;\r\n            if (defaultSkin) {\r\n                slotCount = input.readInt(true);\r\n                if (slotCount == 0)\r\n                    return null;\r\n                skin = new Skin$2(\"default\");\r\n            }\r\n            else {\r\n                skin = new Skin$2(input.readStringRef());\r\n                skin.bones.length = input.readInt(true);\r\n                for (var i = 0, n = skin.bones.length; i < n; i++)\r\n                    skin.bones[i] = skeletonData.bones[input.readInt(true)];\r\n                for (var i = 0, n = input.readInt(true); i < n; i++)\r\n                    skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\r\n                for (var i = 0, n = input.readInt(true); i < n; i++)\r\n                    skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\r\n                for (var i = 0, n = input.readInt(true); i < n; i++)\r\n                    skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\r\n                slotCount = input.readInt(true);\r\n            }\r\n            for (var i = 0; i < slotCount; i++) {\r\n                var slotIndex = input.readInt(true);\r\n                for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n                    var name_2 = input.readStringRef();\r\n                    var attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name_2, nonessential);\r\n                    if (attachment != null)\r\n                        skin.setAttachment(slotIndex, name_2, attachment);\r\n                }\r\n            }\r\n            return skin;\r\n        };\r\n        SkeletonBinary.prototype.readAttachment = function (input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\r\n            var scale = this.scale;\r\n            var name = input.readStringRef();\r\n            if (name == null)\r\n                name = attachmentName;\r\n            var typeIndex = input.readByte();\r\n            var type = SkeletonBinary.AttachmentTypeValues[typeIndex];\r\n            switch (type) {\r\n                case exports.AttachmentType.Region: {\r\n                    var path = input.readStringRef();\r\n                    var rotation = input.readFloat();\r\n                    var x = input.readFloat();\r\n                    var y = input.readFloat();\r\n                    var scaleX = input.readFloat();\r\n                    var scaleY = input.readFloat();\r\n                    var width = input.readFloat();\r\n                    var height = input.readFloat();\r\n                    var color = input.readInt32();\r\n                    if (path == null)\r\n                        path = name;\r\n                    var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n                    if (region == null)\r\n                        return null;\r\n                    region.path = path;\r\n                    region.x = x * scale;\r\n                    region.y = y * scale;\r\n                    region.scaleX = scaleX;\r\n                    region.scaleY = scaleY;\r\n                    region.rotation = rotation;\r\n                    region.width = width * scale;\r\n                    region.height = height * scale;\r\n                    Color.rgba8888ToColor(region.color, color);\r\n                    // region.updateOffset();\r\n                    return region;\r\n                }\r\n                case exports.AttachmentType.BoundingBox: {\r\n                    var vertexCount = input.readInt(true);\r\n                    var vertices = this.readVertices(input, vertexCount);\r\n                    var color = nonessential ? input.readInt32() : 0;\r\n                    var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n                    if (box == null)\r\n                        return null;\r\n                    box.worldVerticesLength = vertexCount << 1;\r\n                    box.vertices = vertices.vertices;\r\n                    box.bones = vertices.bones;\r\n                    if (nonessential)\r\n                        Color.rgba8888ToColor(box.color, color);\r\n                    return box;\r\n                }\r\n                case exports.AttachmentType.Mesh: {\r\n                    var path = input.readStringRef();\r\n                    var color = input.readInt32();\r\n                    var vertexCount = input.readInt(true);\r\n                    var uvs = this.readFloatArray(input, vertexCount << 1, 1);\r\n                    var triangles = this.readShortArray(input);\r\n                    var vertices = this.readVertices(input, vertexCount);\r\n                    var hullLength = input.readInt(true);\r\n                    var edges = null;\r\n                    var width = 0, height = 0;\r\n                    if (nonessential) {\r\n                        edges = this.readShortArray(input);\r\n                        width = input.readFloat();\r\n                        height = input.readFloat();\r\n                    }\r\n                    if (path == null)\r\n                        path = name;\r\n                    var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n                    if (mesh == null)\r\n                        return null;\r\n                    mesh.path = path;\r\n                    Color.rgba8888ToColor(mesh.color, color);\r\n                    mesh.bones = vertices.bones;\r\n                    mesh.vertices = vertices.vertices;\r\n                    mesh.worldVerticesLength = vertexCount << 1;\r\n                    mesh.triangles = triangles;\r\n                    mesh.regionUVs = new Float32Array(uvs);\r\n                    // mesh.updateUVs();\r\n                    mesh.hullLength = hullLength << 1;\r\n                    if (nonessential) {\r\n                        mesh.edges = edges;\r\n                        mesh.width = width * scale;\r\n                        mesh.height = height * scale;\r\n                    }\r\n                    return mesh;\r\n                }\r\n                case exports.AttachmentType.LinkedMesh: {\r\n                    var path = input.readStringRef();\r\n                    var color = input.readInt32();\r\n                    var skinName = input.readStringRef();\r\n                    var parent_3 = input.readStringRef();\r\n                    var inheritDeform = input.readBoolean();\r\n                    var width = 0, height = 0;\r\n                    if (nonessential) {\r\n                        width = input.readFloat();\r\n                        height = input.readFloat();\r\n                    }\r\n                    if (path == null)\r\n                        path = name;\r\n                    var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n                    if (mesh == null)\r\n                        return null;\r\n                    mesh.path = path;\r\n                    Color.rgba8888ToColor(mesh.color, color);\r\n                    if (nonessential) {\r\n                        mesh.width = width * scale;\r\n                        mesh.height = height * scale;\r\n                    }\r\n                    this.linkedMeshes.push(new LinkedMesh$1$1(mesh, skinName, slotIndex, parent_3, inheritDeform));\r\n                    return mesh;\r\n                }\r\n                case exports.AttachmentType.Path: {\r\n                    var closed_1 = input.readBoolean();\r\n                    var constantSpeed = input.readBoolean();\r\n                    var vertexCount = input.readInt(true);\r\n                    var vertices = this.readVertices(input, vertexCount);\r\n                    var lengths = Utils.newArray(vertexCount / 3, 0);\r\n                    for (var i = 0, n = lengths.length; i < n; i++)\r\n                        lengths[i] = input.readFloat() * scale;\r\n                    var color = nonessential ? input.readInt32() : 0;\r\n                    var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n                    if (path == null)\r\n                        return null;\r\n                    path.closed = closed_1;\r\n                    path.constantSpeed = constantSpeed;\r\n                    path.worldVerticesLength = vertexCount << 1;\r\n                    path.vertices = vertices.vertices;\r\n                    path.bones = vertices.bones;\r\n                    path.lengths = lengths;\r\n                    if (nonessential)\r\n                        Color.rgba8888ToColor(path.color, color);\r\n                    return path;\r\n                }\r\n                case exports.AttachmentType.Point: {\r\n                    var rotation = input.readFloat();\r\n                    var x = input.readFloat();\r\n                    var y = input.readFloat();\r\n                    var color = nonessential ? input.readInt32() : 0;\r\n                    var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n                    if (point == null)\r\n                        return null;\r\n                    point.x = x * scale;\r\n                    point.y = y * scale;\r\n                    point.rotation = rotation;\r\n                    if (nonessential)\r\n                        Color.rgba8888ToColor(point.color, color);\r\n                    return point;\r\n                }\r\n                case exports.AttachmentType.Clipping: {\r\n                    var endSlotIndex = input.readInt(true);\r\n                    var vertexCount = input.readInt(true);\r\n                    var vertices = this.readVertices(input, vertexCount);\r\n                    var color = nonessential ? input.readInt32() : 0;\r\n                    var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n                    if (clip == null)\r\n                        return null;\r\n                    clip.endSlot = skeletonData.slots[endSlotIndex];\r\n                    clip.worldVerticesLength = vertexCount << 1;\r\n                    clip.vertices = vertices.vertices;\r\n                    clip.bones = vertices.bones;\r\n                    if (nonessential)\r\n                        Color.rgba8888ToColor(clip.color, color);\r\n                    return clip;\r\n                }\r\n            }\r\n            return null;\r\n        };\r\n        SkeletonBinary.prototype.readVertices = function (input, vertexCount) {\r\n            var verticesLength = vertexCount << 1;\r\n            var vertices = new Vertices$1();\r\n            var scale = this.scale;\r\n            if (!input.readBoolean()) {\r\n                vertices.vertices = this.readFloatArray(input, verticesLength, scale);\r\n                return vertices;\r\n            }\r\n            var weights = new Array();\r\n            var bonesArray = new Array();\r\n            for (var i = 0; i < vertexCount; i++) {\r\n                var boneCount = input.readInt(true);\r\n                bonesArray.push(boneCount);\r\n                for (var ii = 0; ii < boneCount; ii++) {\r\n                    bonesArray.push(input.readInt(true));\r\n                    weights.push(input.readFloat() * scale);\r\n                    weights.push(input.readFloat() * scale);\r\n                    weights.push(input.readFloat());\r\n                }\r\n            }\r\n            vertices.vertices = Utils.toFloatArray(weights);\r\n            vertices.bones = bonesArray;\r\n            return vertices;\r\n        };\r\n        SkeletonBinary.prototype.readFloatArray = function (input, n, scale) {\r\n            var array = new Array(n);\r\n            if (scale == 1) {\r\n                for (var i = 0; i < n; i++)\r\n                    array[i] = input.readFloat();\r\n            }\r\n            else {\r\n                for (var i = 0; i < n; i++)\r\n                    array[i] = input.readFloat() * scale;\r\n            }\r\n            return array;\r\n        };\r\n        SkeletonBinary.prototype.readShortArray = function (input) {\r\n            var n = input.readInt(true);\r\n            var array = new Array(n);\r\n            for (var i = 0; i < n; i++)\r\n                array[i] = input.readShort();\r\n            return array;\r\n        };\r\n        SkeletonBinary.prototype.readAnimation = function (input, name, skeletonData) {\r\n            var timelines = new Array();\r\n            var scale = this.scale;\r\n            var duration = 0;\r\n            var tempColor1 = new Color();\r\n            var tempColor2 = new Color();\r\n            // Slot timelines.\r\n            for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n                var slotIndex = input.readInt(true);\r\n                for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n                    var timelineType = input.readByte();\r\n                    var frameCount = input.readInt(true);\r\n                    switch (timelineType) {\r\n                        case SkeletonBinary.SLOT_ATTACHMENT: {\r\n                            var timeline = new AttachmentTimeline$2(frameCount);\r\n                            timeline.slotIndex = slotIndex;\r\n                            for (var frameIndex = 0; frameIndex < frameCount; frameIndex++)\r\n                                timeline.setFrame(frameIndex, input.readFloat(), input.readStringRef());\r\n                            timelines.push(timeline);\r\n                            duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n                            break;\r\n                        }\r\n                        case SkeletonBinary.SLOT_COLOR: {\r\n                            var timeline = new ColorTimeline$1(frameCount);\r\n                            timeline.slotIndex = slotIndex;\r\n                            for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n                                var time = input.readFloat();\r\n                                Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n                                timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a);\r\n                                if (frameIndex < frameCount - 1)\r\n                                    this.readCurve(input, frameIndex, timeline);\r\n                            }\r\n                            timelines.push(timeline);\r\n                            duration = Math.max(duration, timeline.frames[(frameCount - 1) * ColorTimeline$1.ENTRIES]);\r\n                            break;\r\n                        }\r\n                        case SkeletonBinary.SLOT_TWO_COLOR: {\r\n                            var timeline = new TwoColorTimeline$1(frameCount);\r\n                            timeline.slotIndex = slotIndex;\r\n                            for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n                                var time = input.readFloat();\r\n                                Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n                                Color.rgb888ToColor(tempColor2, input.readInt32());\r\n                                timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r, tempColor2.g, tempColor2.b);\r\n                                if (frameIndex < frameCount - 1)\r\n                                    this.readCurve(input, frameIndex, timeline);\r\n                            }\r\n                            timelines.push(timeline);\r\n                            duration = Math.max(duration, timeline.frames[(frameCount - 1) * TwoColorTimeline$1.ENTRIES]);\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            // Bone timelines.\r\n            for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n                var boneIndex = input.readInt(true);\r\n                for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n                    var timelineType = input.readByte();\r\n                    var frameCount = input.readInt(true);\r\n                    switch (timelineType) {\r\n                        case SkeletonBinary.BONE_ROTATE: {\r\n                            var timeline = new RotateTimeline$2(frameCount);\r\n                            timeline.boneIndex = boneIndex;\r\n                            for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n                                timeline.setFrame(frameIndex, input.readFloat(), input.readFloat());\r\n                                if (frameIndex < frameCount - 1)\r\n                                    this.readCurve(input, frameIndex, timeline);\r\n                            }\r\n                            timelines.push(timeline);\r\n                            duration = Math.max(duration, timeline.frames[(frameCount - 1) * RotateTimeline$2.ENTRIES]);\r\n                            break;\r\n                        }\r\n                        case SkeletonBinary.BONE_TRANSLATE:\r\n                        case SkeletonBinary.BONE_SCALE:\r\n                        case SkeletonBinary.BONE_SHEAR: {\r\n                            var timeline = void 0;\r\n                            var timelineScale = 1;\r\n                            if (timelineType == SkeletonBinary.BONE_SCALE)\r\n                                timeline = new ScaleTimeline$2(frameCount);\r\n                            else if (timelineType == SkeletonBinary.BONE_SHEAR)\r\n                                timeline = new ShearTimeline$2(frameCount);\r\n                            else {\r\n                                timeline = new TranslateTimeline$2(frameCount);\r\n                                timelineScale = scale;\r\n                            }\r\n                            timeline.boneIndex = boneIndex;\r\n                            for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n                                timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale, input.readFloat() * timelineScale);\r\n                                if (frameIndex < frameCount - 1)\r\n                                    this.readCurve(input, frameIndex, timeline);\r\n                            }\r\n                            timelines.push(timeline);\r\n                            duration = Math.max(duration, timeline.frames[(frameCount - 1) * TranslateTimeline$2.ENTRIES]);\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            // IK constraint timelines.\r\n            for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n                var index = input.readInt(true);\r\n                var frameCount = input.readInt(true);\r\n                var timeline = new IkConstraintTimeline$2(frameCount);\r\n                timeline.ikConstraintIndex = index;\r\n                for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n                    timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());\r\n                    if (frameIndex < frameCount - 1)\r\n                        this.readCurve(input, frameIndex, timeline);\r\n                }\r\n                timelines.push(timeline);\r\n                duration = Math.max(duration, timeline.frames[(frameCount - 1) * IkConstraintTimeline$2.ENTRIES]);\r\n            }\r\n            // Transform constraint timelines.\r\n            for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n                var index = input.readInt(true);\r\n                var frameCount = input.readInt(true);\r\n                var timeline = new TransformConstraintTimeline$2(frameCount);\r\n                timeline.transformConstraintIndex = index;\r\n                for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n                    timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n                    if (frameIndex < frameCount - 1)\r\n                        this.readCurve(input, frameIndex, timeline);\r\n                }\r\n                timelines.push(timeline);\r\n                duration = Math.max(duration, timeline.frames[(frameCount - 1) * TransformConstraintTimeline$2.ENTRIES]);\r\n            }\r\n            // Path constraint timelines.\r\n            for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n                var index = input.readInt(true);\r\n                var data = skeletonData.pathConstraints[index];\r\n                for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n                    var timelineType = input.readByte();\r\n                    var frameCount = input.readInt(true);\r\n                    switch (timelineType) {\r\n                        case SkeletonBinary.PATH_POSITION:\r\n                        case SkeletonBinary.PATH_SPACING: {\r\n                            var timeline = void 0;\r\n                            var timelineScale = 1;\r\n                            if (timelineType == SkeletonBinary.PATH_SPACING) {\r\n                                timeline = new PathConstraintSpacingTimeline$2(frameCount);\r\n                                if (data.spacingMode == SpacingMode$2.Length || data.spacingMode == SpacingMode$2.Fixed)\r\n                                    timelineScale = scale;\r\n                            }\r\n                            else {\r\n                                timeline = new PathConstraintPositionTimeline$2(frameCount);\r\n                                if (data.positionMode == exports.PositionMode.Fixed)\r\n                                    timelineScale = scale;\r\n                            }\r\n                            timeline.pathConstraintIndex = index;\r\n                            for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n                                timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale);\r\n                                if (frameIndex < frameCount - 1)\r\n                                    this.readCurve(input, frameIndex, timeline);\r\n                            }\r\n                            timelines.push(timeline);\r\n                            duration = Math.max(duration, timeline.frames[(frameCount - 1) * PathConstraintPositionTimeline$2.ENTRIES]);\r\n                            break;\r\n                        }\r\n                        case SkeletonBinary.PATH_MIX: {\r\n                            var timeline = new PathConstraintMixTimeline$2(frameCount);\r\n                            timeline.pathConstraintIndex = index;\r\n                            for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n                                timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat());\r\n                                if (frameIndex < frameCount - 1)\r\n                                    this.readCurve(input, frameIndex, timeline);\r\n                            }\r\n                            timelines.push(timeline);\r\n                            duration = Math.max(duration, timeline.frames[(frameCount - 1) * PathConstraintMixTimeline$2.ENTRIES]);\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            // Deform timelines.\r\n            for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n                var skin = skeletonData.skins[input.readInt(true)];\r\n                for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n                    var slotIndex = input.readInt(true);\r\n                    for (var iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\r\n                        var attachment = skin.getAttachment(slotIndex, input.readStringRef());\r\n                        var weighted = attachment.bones != null;\r\n                        var vertices = attachment.vertices;\r\n                        var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n                        var frameCount = input.readInt(true);\r\n                        var timeline = new DeformTimeline$2(frameCount);\r\n                        timeline.slotIndex = slotIndex;\r\n                        timeline.attachment = attachment;\r\n                        for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n                            var time = input.readFloat();\r\n                            var deform = void 0;\r\n                            var end = input.readInt(true);\r\n                            if (end == 0)\r\n                                deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\r\n                            else {\r\n                                deform = Utils.newFloatArray(deformLength);\r\n                                var start = input.readInt(true);\r\n                                end += start;\r\n                                if (scale == 1) {\r\n                                    for (var v = start; v < end; v++)\r\n                                        deform[v] = input.readFloat();\r\n                                }\r\n                                else {\r\n                                    for (var v = start; v < end; v++)\r\n                                        deform[v] = input.readFloat() * scale;\r\n                                }\r\n                                if (!weighted) {\r\n                                    for (var v = 0, vn = deform.length; v < vn; v++)\r\n                                        deform[v] += vertices[v];\r\n                                }\r\n                            }\r\n                            timeline.setFrame(frameIndex, time, deform);\r\n                            if (frameIndex < frameCount - 1)\r\n                                this.readCurve(input, frameIndex, timeline);\r\n                        }\r\n                        timelines.push(timeline);\r\n                        duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n                    }\r\n                }\r\n            }\r\n            // Draw order timeline.\r\n            var drawOrderCount = input.readInt(true);\r\n            if (drawOrderCount > 0) {\r\n                var timeline = new DrawOrderTimeline$2(drawOrderCount);\r\n                var slotCount = skeletonData.slots.length;\r\n                for (var i = 0; i < drawOrderCount; i++) {\r\n                    var time = input.readFloat();\r\n                    var offsetCount = input.readInt(true);\r\n                    var drawOrder = Utils.newArray(slotCount, 0);\r\n                    for (var ii = slotCount - 1; ii >= 0; ii--)\r\n                        drawOrder[ii] = -1;\r\n                    var unchanged = Utils.newArray(slotCount - offsetCount, 0);\r\n                    var originalIndex = 0, unchangedIndex = 0;\r\n                    for (var ii = 0; ii < offsetCount; ii++) {\r\n                        var slotIndex = input.readInt(true);\r\n                        // Collect unchanged items.\r\n                        while (originalIndex != slotIndex)\r\n                            unchanged[unchangedIndex++] = originalIndex++;\r\n                        // Set changed items.\r\n                        drawOrder[originalIndex + input.readInt(true)] = originalIndex++;\r\n                    }\r\n                    // Collect remaining unchanged items.\r\n                    while (originalIndex < slotCount)\r\n                        unchanged[unchangedIndex++] = originalIndex++;\r\n                    // Fill in unchanged items.\r\n                    for (var ii = slotCount - 1; ii >= 0; ii--)\r\n                        if (drawOrder[ii] == -1)\r\n                            drawOrder[ii] = unchanged[--unchangedIndex];\r\n                    timeline.setFrame(i, time, drawOrder);\r\n                }\r\n                timelines.push(timeline);\r\n                duration = Math.max(duration, timeline.frames[drawOrderCount - 1]);\r\n            }\r\n            // Event timeline.\r\n            var eventCount = input.readInt(true);\r\n            if (eventCount > 0) {\r\n                var timeline = new EventTimeline$2(eventCount);\r\n                for (var i = 0; i < eventCount; i++) {\r\n                    var time = input.readFloat();\r\n                    var eventData = skeletonData.events[input.readInt(true)];\r\n                    var event_1 = new Event$2(time, eventData);\r\n                    event_1.intValue = input.readInt(false);\r\n                    event_1.floatValue = input.readFloat();\r\n                    event_1.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\r\n                    if (event_1.data.audioPath != null) {\r\n                        event_1.volume = input.readFloat();\r\n                        event_1.balance = input.readFloat();\r\n                    }\r\n                    timeline.setFrame(i, event_1);\r\n                }\r\n                timelines.push(timeline);\r\n                duration = Math.max(duration, timeline.frames[eventCount - 1]);\r\n            }\r\n            return new Animation$2(name, timelines, duration);\r\n        };\r\n        SkeletonBinary.prototype.readCurve = function (input, frameIndex, timeline) {\r\n            switch (input.readByte()) {\r\n                case SkeletonBinary.CURVE_STEPPED:\r\n                    timeline.setStepped(frameIndex);\r\n                    break;\r\n                case SkeletonBinary.CURVE_BEZIER:\r\n                    this.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n                    break;\r\n            }\r\n        };\r\n        SkeletonBinary.prototype.setCurve = function (timeline, frameIndex, cx1, cy1, cx2, cy2) {\r\n            timeline.setCurve(frameIndex, cx1, cy1, cx2, cy2);\r\n        };\r\n        SkeletonBinary.AttachmentTypeValues = [0 /*AttachmentType.Region*/, 1 /*AttachmentType.BoundingBox*/, 2 /*AttachmentType.Mesh*/, 3 /*AttachmentType.LinkedMesh*/, 4 /*AttachmentType.Path*/, 5 /*AttachmentType.Point*/, 6 /*AttachmentType.Clipping*/];\r\n        SkeletonBinary.TransformModeValues = [exports.TransformMode.Normal, exports.TransformMode.OnlyTranslation, exports.TransformMode.NoRotationOrReflection, exports.TransformMode.NoScale, exports.TransformMode.NoScaleOrReflection];\r\n        SkeletonBinary.PositionModeValues = [exports.PositionMode.Fixed, exports.PositionMode.Percent];\r\n        SkeletonBinary.SpacingModeValues = [SpacingMode$2.Length, SpacingMode$2.Fixed, SpacingMode$2.Percent];\r\n        SkeletonBinary.RotateModeValues = [exports.RotateMode.Tangent, exports.RotateMode.Chain, exports.RotateMode.ChainScale];\r\n        SkeletonBinary.BlendModeValues = [constants.BLEND_MODES.NORMAL, constants.BLEND_MODES.ADD, constants.BLEND_MODES.MULTIPLY, constants.BLEND_MODES.SCREEN];\r\n        SkeletonBinary.BONE_ROTATE = 0;\r\n        SkeletonBinary.BONE_TRANSLATE = 1;\r\n        SkeletonBinary.BONE_SCALE = 2;\r\n        SkeletonBinary.BONE_SHEAR = 3;\r\n        SkeletonBinary.SLOT_ATTACHMENT = 0;\r\n        SkeletonBinary.SLOT_COLOR = 1;\r\n        SkeletonBinary.SLOT_TWO_COLOR = 2;\r\n        SkeletonBinary.PATH_POSITION = 0;\r\n        SkeletonBinary.PATH_SPACING = 1;\r\n        SkeletonBinary.PATH_MIX = 2;\r\n        SkeletonBinary.CURVE_LINEAR = 0;\r\n        SkeletonBinary.CURVE_STEPPED = 1;\r\n        SkeletonBinary.CURVE_BEZIER = 2;\r\n        return SkeletonBinary;\r\n    }());\r\n    var LinkedMesh$1$1 = /** @class */ (function () {\r\n        function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n            this.mesh = mesh;\r\n            this.skin = skin;\r\n            this.slotIndex = slotIndex;\r\n            this.parent = parent;\r\n            this.inheritDeform = inheritDeform;\r\n        }\r\n        return LinkedMesh;\r\n    }());\r\n    var Vertices$1 = /** @class */ (function () {\r\n        function Vertices(bones, vertices) {\r\n            if (bones === void 0) { bones = null; }\r\n            if (vertices === void 0) { vertices = null; }\r\n            this.bones = bones;\r\n            this.vertices = vertices;\r\n        }\r\n        return Vertices;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var SkeletonBounds$2 = /** @class */ (function () {\r\n        function SkeletonBounds() {\r\n            this.minX = 0;\r\n            this.minY = 0;\r\n            this.maxX = 0;\r\n            this.maxY = 0;\r\n            this.boundingBoxes = new Array();\r\n            this.polygons = new Array();\r\n            this.polygonPool = new Pool(function () {\r\n                return Utils.newFloatArray(16);\r\n            });\r\n        }\r\n        SkeletonBounds.prototype.update = function (skeleton, updateAabb) {\r\n            if (skeleton == null)\r\n                throw new Error(\"skeleton cannot be null.\");\r\n            var boundingBoxes = this.boundingBoxes;\r\n            var polygons = this.polygons;\r\n            var polygonPool = this.polygonPool;\r\n            var slots = skeleton.slots;\r\n            var slotCount = slots.length;\r\n            boundingBoxes.length = 0;\r\n            polygonPool.freeAll(polygons);\r\n            polygons.length = 0;\r\n            for (var i = 0; i < slotCount; i++) {\r\n                var slot = slots[i];\r\n                if (!slot.bone.active)\r\n                    continue;\r\n                var attachment = slot.getAttachment();\r\n                if (attachment instanceof BoundingBoxAttachment$2) {\r\n                    var boundingBox = attachment;\r\n                    boundingBoxes.push(boundingBox);\r\n                    var polygon = polygonPool.obtain();\r\n                    if (polygon.length != boundingBox.worldVerticesLength) {\r\n                        polygon = Utils.newFloatArray(boundingBox.worldVerticesLength);\r\n                    }\r\n                    polygons.push(polygon);\r\n                    boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\r\n                }\r\n            }\r\n            if (updateAabb) {\r\n                this.aabbCompute();\r\n            }\r\n            else {\r\n                this.minX = Number.POSITIVE_INFINITY;\r\n                this.minY = Number.POSITIVE_INFINITY;\r\n                this.maxX = Number.NEGATIVE_INFINITY;\r\n                this.maxY = Number.NEGATIVE_INFINITY;\r\n            }\r\n        };\r\n        SkeletonBounds.prototype.aabbCompute = function () {\r\n            var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n            var polygons = this.polygons;\r\n            for (var i = 0, n = polygons.length; i < n; i++) {\r\n                var polygon = polygons[i];\r\n                var vertices = polygon;\r\n                for (var ii = 0, nn = polygon.length; ii < nn; ii += 2) {\r\n                    var x = vertices[ii];\r\n                    var y = vertices[ii + 1];\r\n                    minX = Math.min(minX, x);\r\n                    minY = Math.min(minY, y);\r\n                    maxX = Math.max(maxX, x);\r\n                    maxY = Math.max(maxY, y);\r\n                }\r\n            }\r\n            this.minX = minX;\r\n            this.minY = minY;\r\n            this.maxX = maxX;\r\n            this.maxY = maxY;\r\n        };\r\n        /** Returns true if the axis aligned bounding box contains the point. */\r\n        SkeletonBounds.prototype.aabbContainsPoint = function (x, y) {\r\n            return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\r\n        };\r\n        /** Returns true if the axis aligned bounding box intersects the line segment. */\r\n        SkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) {\r\n            var minX = this.minX;\r\n            var minY = this.minY;\r\n            var maxX = this.maxX;\r\n            var maxY = this.maxY;\r\n            if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\r\n                return false;\r\n            var m = (y2 - y1) / (x2 - x1);\r\n            var y = m * (minX - x1) + y1;\r\n            if (y > minY && y < maxY)\r\n                return true;\r\n            y = m * (maxX - x1) + y1;\r\n            if (y > minY && y < maxY)\r\n                return true;\r\n            var x = (minY - y1) / m + x1;\r\n            if (x > minX && x < maxX)\r\n                return true;\r\n            x = (maxY - y1) / m + x1;\r\n            if (x > minX && x < maxX)\r\n                return true;\r\n            return false;\r\n        };\r\n        /** Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds. */\r\n        SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) {\r\n            return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\r\n        };\r\n        /** Returns the first bounding box attachment that contains the point, or null. When doing many checks, it is usually more\r\n         * efficient to only call this method if {@link #aabbContainsPoint(float, float)} returns true. */\r\n        SkeletonBounds.prototype.containsPoint = function (x, y) {\r\n            var polygons = this.polygons;\r\n            for (var i = 0, n = polygons.length; i < n; i++)\r\n                if (this.containsPointPolygon(polygons[i], x, y))\r\n                    return this.boundingBoxes[i];\r\n            return null;\r\n        };\r\n        /** Returns true if the polygon contains the point. */\r\n        SkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) {\r\n            var vertices = polygon;\r\n            var nn = polygon.length;\r\n            var prevIndex = nn - 2;\r\n            var inside = false;\r\n            for (var ii = 0; ii < nn; ii += 2) {\r\n                var vertexY = vertices[ii + 1];\r\n                var prevY = vertices[prevIndex + 1];\r\n                if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\r\n                    var vertexX = vertices[ii];\r\n                    if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\r\n                        inside = !inside;\r\n                }\r\n                prevIndex = ii;\r\n            }\r\n            return inside;\r\n        };\r\n        /** Returns the first bounding box attachment that contains any part of the line segment, or null. When doing many checks, it\r\n         * is usually more efficient to only call this method if {@link #aabbIntersectsSegment(float, float, float, float)} returns\r\n         * true. */\r\n        SkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) {\r\n            var polygons = this.polygons;\r\n            for (var i = 0, n = polygons.length; i < n; i++)\r\n                if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\r\n                    return this.boundingBoxes[i];\r\n            return null;\r\n        };\r\n        /** Returns true if the polygon contains any part of the line segment. */\r\n        SkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) {\r\n            var vertices = polygon;\r\n            var nn = polygon.length;\r\n            var width12 = x1 - x2, height12 = y1 - y2;\r\n            var det1 = x1 * y2 - y1 * x2;\r\n            var x3 = vertices[nn - 2], y3 = vertices[nn - 1];\r\n            for (var ii = 0; ii < nn; ii += 2) {\r\n                var x4 = vertices[ii], y4 = vertices[ii + 1];\r\n                var det2 = x3 * y4 - y3 * x4;\r\n                var width34 = x3 - x4, height34 = y3 - y4;\r\n                var det3 = width12 * height34 - height12 * width34;\r\n                var x = (det1 * width34 - width12 * det2) / det3;\r\n                if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\r\n                    var y = (det1 * height34 - height12 * det2) / det3;\r\n                    if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1)))\r\n                        return true;\r\n                }\r\n                x3 = x4;\r\n                y3 = y4;\r\n            }\r\n            return false;\r\n        };\r\n        /** Returns the polygon for the specified bounding box, or null. */\r\n        SkeletonBounds.prototype.getPolygon = function (boundingBox) {\r\n            if (boundingBox == null)\r\n                throw new Error(\"boundingBox cannot be null.\");\r\n            var index = this.boundingBoxes.indexOf(boundingBox);\r\n            return index == -1 ? null : this.polygons[index];\r\n        };\r\n        SkeletonBounds.prototype.getWidth = function () {\r\n            return this.maxX - this.minX;\r\n        };\r\n        SkeletonBounds.prototype.getHeight = function () {\r\n            return this.maxY - this.minY;\r\n        };\r\n        return SkeletonBounds;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var SkeletonJson$2 = /** @class */ (function () {\r\n        function SkeletonJson(attachmentLoader) {\r\n            this.scale = 1;\r\n            this.linkedMeshes = new Array();\r\n            this.attachmentLoader = attachmentLoader;\r\n        }\r\n        SkeletonJson.prototype.readSkeletonData = function (json) {\r\n            var scale = this.scale;\r\n            var skeletonData = new SkeletonData$2();\r\n            var root = typeof (json) === \"string\" ? JSON.parse(json) : json;\r\n            // Skeleton\r\n            var skeletonMap = root.skeleton;\r\n            if (skeletonMap != null) {\r\n                skeletonData.hash = skeletonMap.hash;\r\n                skeletonData.version = skeletonMap.spine;\r\n                if (skeletonData.version.substr(0, 3) !== '3.8') {\r\n                    var error = \"Spine 3.8 loader cant load version \" + skeletonMap.spine + \". Please configure your pixi-spine bundle\";\r\n                    console.error(error);\r\n                }\r\n                if (skeletonData.version === '3.8.75') {\r\n                    var error = \"Unsupported skeleton data, 3.8.75 is deprecated, please export with a newer version of Spine.\";\r\n                    console.error(error);\r\n                }\r\n                skeletonData.x = skeletonMap.x;\r\n                skeletonData.y = skeletonMap.y;\r\n                skeletonData.width = skeletonMap.width;\r\n                skeletonData.height = skeletonMap.height;\r\n                skeletonData.fps = skeletonMap.fps;\r\n                skeletonData.imagesPath = skeletonMap.images;\r\n            }\r\n            // Bones\r\n            if (root.bones) {\r\n                for (var i = 0; i < root.bones.length; i++) {\r\n                    var boneMap = root.bones[i];\r\n                    var parent_1 = null;\r\n                    var parentName = this.getValue(boneMap, \"parent\", null);\r\n                    if (parentName != null) {\r\n                        parent_1 = skeletonData.findBone(parentName);\r\n                        if (parent_1 == null)\r\n                            throw new Error(\"Parent bone not found: \" + parentName);\r\n                    }\r\n                    var data = new BoneData$2(skeletonData.bones.length, boneMap.name, parent_1);\r\n                    data.length = this.getValue(boneMap, \"length\", 0) * scale;\r\n                    data.x = this.getValue(boneMap, \"x\", 0) * scale;\r\n                    data.y = this.getValue(boneMap, \"y\", 0) * scale;\r\n                    data.rotation = this.getValue(boneMap, \"rotation\", 0);\r\n                    data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\r\n                    data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\r\n                    data.shearX = this.getValue(boneMap, \"shearX\", 0);\r\n                    data.shearY = this.getValue(boneMap, \"shearY\", 0);\r\n                    data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\r\n                    data.skinRequired = this.getValue(boneMap, \"skin\", false);\r\n                    skeletonData.bones.push(data);\r\n                }\r\n            }\r\n            // Slots.\r\n            if (root.slots) {\r\n                for (var i = 0; i < root.slots.length; i++) {\r\n                    var slotMap = root.slots[i];\r\n                    var slotName = slotMap.name;\r\n                    var boneName = slotMap.bone;\r\n                    var boneData = skeletonData.findBone(boneName);\r\n                    if (boneData == null)\r\n                        throw new Error(\"Slot bone not found: \" + boneName);\r\n                    var data = new SlotData$2(skeletonData.slots.length, slotName, boneData);\r\n                    var color = this.getValue(slotMap, \"color\", null);\r\n                    if (color != null)\r\n                        data.color.setFromString(color);\r\n                    var dark = this.getValue(slotMap, \"dark\", null);\r\n                    if (dark != null) {\r\n                        data.darkColor = new Color(1, 1, 1, 1);\r\n                        data.darkColor.setFromString(dark);\r\n                    }\r\n                    data.attachmentName = this.getValue(slotMap, \"attachment\", null);\r\n                    data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\r\n                    skeletonData.slots.push(data);\r\n                }\r\n            }\r\n            // IK constraints\r\n            if (root.ik) {\r\n                for (var i = 0; i < root.ik.length; i++) {\r\n                    var constraintMap = root.ik[i];\r\n                    var data = new IkConstraintData$2(constraintMap.name);\r\n                    data.order = this.getValue(constraintMap, \"order\", 0);\r\n                    data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n                    for (var j = 0; j < constraintMap.bones.length; j++) {\r\n                        var boneName = constraintMap.bones[j];\r\n                        var bone = skeletonData.findBone(boneName);\r\n                        if (bone == null)\r\n                            throw new Error(\"IK bone not found: \" + boneName);\r\n                        data.bones.push(bone);\r\n                    }\r\n                    var targetName = constraintMap.target;\r\n                    data.target = skeletonData.findBone(targetName);\r\n                    if (data.target == null)\r\n                        throw new Error(\"IK target bone not found: \" + targetName);\r\n                    data.mix = this.getValue(constraintMap, \"mix\", 1);\r\n                    data.softness = this.getValue(constraintMap, \"softness\", 0) * scale;\r\n                    data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\r\n                    data.compress = this.getValue(constraintMap, \"compress\", false);\r\n                    data.stretch = this.getValue(constraintMap, \"stretch\", false);\r\n                    data.uniform = this.getValue(constraintMap, \"uniform\", false);\r\n                    skeletonData.ikConstraints.push(data);\r\n                }\r\n            }\r\n            // Transform constraints.\r\n            if (root.transform) {\r\n                for (var i = 0; i < root.transform.length; i++) {\r\n                    var constraintMap = root.transform[i];\r\n                    var data = new TransformConstraintData$2(constraintMap.name);\r\n                    data.order = this.getValue(constraintMap, \"order\", 0);\r\n                    data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n                    for (var j = 0; j < constraintMap.bones.length; j++) {\r\n                        var boneName = constraintMap.bones[j];\r\n                        var bone = skeletonData.findBone(boneName);\r\n                        if (bone == null)\r\n                            throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n                        data.bones.push(bone);\r\n                    }\r\n                    var targetName = constraintMap.target;\r\n                    data.target = skeletonData.findBone(targetName);\r\n                    if (data.target == null)\r\n                        throw new Error(\"Transform constraint target bone not found: \" + targetName);\r\n                    data.local = this.getValue(constraintMap, \"local\", false);\r\n                    data.relative = this.getValue(constraintMap, \"relative\", false);\r\n                    data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n                    data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\r\n                    data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\r\n                    data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\r\n                    data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\r\n                    data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\r\n                    data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n                    data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n                    data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\r\n                    data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\r\n                    skeletonData.transformConstraints.push(data);\r\n                }\r\n            }\r\n            // Path constraints.\r\n            if (root.path) {\r\n                for (var i = 0; i < root.path.length; i++) {\r\n                    var constraintMap = root.path[i];\r\n                    var data = new PathConstraintData$2(constraintMap.name);\r\n                    data.order = this.getValue(constraintMap, \"order\", 0);\r\n                    data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n                    for (var j = 0; j < constraintMap.bones.length; j++) {\r\n                        var boneName = constraintMap.bones[j];\r\n                        var bone = skeletonData.findBone(boneName);\r\n                        if (bone == null)\r\n                            throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n                        data.bones.push(bone);\r\n                    }\r\n                    var targetName = constraintMap.target;\r\n                    data.target = skeletonData.findSlot(targetName);\r\n                    if (data.target == null)\r\n                        throw new Error(\"Path target slot not found: \" + targetName);\r\n                    data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\r\n                    data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\r\n                    data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\r\n                    data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n                    data.position = this.getValue(constraintMap, \"position\", 0);\r\n                    if (data.positionMode == exports.PositionMode.Fixed)\r\n                        data.position *= scale;\r\n                    data.spacing = this.getValue(constraintMap, \"spacing\", 0);\r\n                    if (data.spacingMode == SpacingMode$2.Length || data.spacingMode == SpacingMode$2.Fixed)\r\n                        data.spacing *= scale;\r\n                    data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n                    data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n                    skeletonData.pathConstraints.push(data);\r\n                }\r\n            }\r\n            // Skins.\r\n            if (root.skins) {\r\n                for (var i = 0; i < root.skins.length; i++) {\r\n                    var skinMap = root.skins[i];\r\n                    var skin = new Skin$2(skinMap.name);\r\n                    if (skinMap.bones) {\r\n                        for (var ii = 0; ii < skinMap.bones.length; ii++) {\r\n                            var bone = skeletonData.findBone(skinMap.bones[ii]);\r\n                            if (bone == null)\r\n                                throw new Error(\"Skin bone not found: \" + skinMap.bones[i]);\r\n                            skin.bones.push(bone);\r\n                        }\r\n                    }\r\n                    if (skinMap.ik) {\r\n                        for (var ii = 0; ii < skinMap.ik.length; ii++) {\r\n                            var constraint = skeletonData.findIkConstraint(skinMap.ik[ii]);\r\n                            if (constraint == null)\r\n                                throw new Error(\"Skin IK constraint not found: \" + skinMap.ik[i]);\r\n                            skin.constraints.push(constraint);\r\n                        }\r\n                    }\r\n                    if (skinMap.transform) {\r\n                        for (var ii = 0; ii < skinMap.transform.length; ii++) {\r\n                            var constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]);\r\n                            if (constraint == null)\r\n                                throw new Error(\"Skin transform constraint not found: \" + skinMap.transform[i]);\r\n                            skin.constraints.push(constraint);\r\n                        }\r\n                    }\r\n                    if (skinMap.path) {\r\n                        for (var ii = 0; ii < skinMap.path.length; ii++) {\r\n                            var constraint = skeletonData.findPathConstraint(skinMap.path[ii]);\r\n                            if (constraint == null)\r\n                                throw new Error(\"Skin path constraint not found: \" + skinMap.path[i]);\r\n                            skin.constraints.push(constraint);\r\n                        }\r\n                    }\r\n                    for (var slotName in skinMap.attachments) {\r\n                        var slot = skeletonData.findSlot(slotName);\r\n                        if (slot == null)\r\n                            throw new Error(\"Slot not found: \" + slotName);\r\n                        var slotMap = skinMap.attachments[slotName];\r\n                        for (var entryName in slotMap) {\r\n                            var attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\r\n                            if (attachment != null)\r\n                                skin.setAttachment(slot.index, entryName, attachment);\r\n                        }\r\n                    }\r\n                    skeletonData.skins.push(skin);\r\n                    if (skin.name == \"default\")\r\n                        skeletonData.defaultSkin = skin;\r\n                }\r\n            }\r\n            // Linked meshes.\r\n            for (var i = 0, n = this.linkedMeshes.length; i < n; i++) {\r\n                var linkedMesh = this.linkedMeshes[i];\r\n                var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n                if (skin == null)\r\n                    throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n                var parent_2 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n                if (parent_2 == null)\r\n                    throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n                linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_2 : linkedMesh.mesh;\r\n                linkedMesh.mesh.setParentMesh(parent_2);\r\n                // linkedMesh.mesh.updateUVs();\r\n            }\r\n            this.linkedMeshes.length = 0;\r\n            // Events.\r\n            if (root.events) {\r\n                for (var eventName in root.events) {\r\n                    var eventMap = root.events[eventName];\r\n                    var data = new EventData$2(eventName);\r\n                    data.intValue = this.getValue(eventMap, \"int\", 0);\r\n                    data.floatValue = this.getValue(eventMap, \"float\", 0);\r\n                    data.stringValue = this.getValue(eventMap, \"string\", \"\");\r\n                    data.audioPath = this.getValue(eventMap, \"audio\", null);\r\n                    if (data.audioPath != null) {\r\n                        data.volume = this.getValue(eventMap, \"volume\", 1);\r\n                        data.balance = this.getValue(eventMap, \"balance\", 0);\r\n                    }\r\n                    skeletonData.events.push(data);\r\n                }\r\n            }\r\n            // Animations.\r\n            if (root.animations) {\r\n                for (var animationName in root.animations) {\r\n                    var animationMap = root.animations[animationName];\r\n                    this.readAnimation(animationMap, animationName, skeletonData);\r\n                }\r\n            }\r\n            return skeletonData;\r\n        };\r\n        SkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) {\r\n            var scale = this.scale;\r\n            name = this.getValue(map, \"name\", name);\r\n            var type = this.getValue(map, \"type\", \"region\");\r\n            switch (type) {\r\n                case \"region\": {\r\n                    var path = this.getValue(map, \"path\", name);\r\n                    var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n                    if (region == null)\r\n                        return null;\r\n                    region.path = path;\r\n                    region.x = this.getValue(map, \"x\", 0) * scale;\r\n                    region.y = this.getValue(map, \"y\", 0) * scale;\r\n                    region.scaleX = this.getValue(map, \"scaleX\", 1);\r\n                    region.scaleY = this.getValue(map, \"scaleY\", 1);\r\n                    region.rotation = this.getValue(map, \"rotation\", 0);\r\n                    region.width = map.width * scale;\r\n                    region.height = map.height * scale;\r\n                    var color = this.getValue(map, \"color\", null);\r\n                    if (color != null)\r\n                        region.color.setFromString(color);\r\n                    // region.updateOffset();\r\n                    return region;\r\n                }\r\n                case \"boundingbox\": {\r\n                    var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n                    if (box == null)\r\n                        return null;\r\n                    this.readVertices(map, box, map.vertexCount << 1);\r\n                    var color = this.getValue(map, \"color\", null);\r\n                    if (color != null)\r\n                        box.color.setFromString(color);\r\n                    return box;\r\n                }\r\n                case \"mesh\":\r\n                case \"linkedmesh\": {\r\n                    var path = this.getValue(map, \"path\", name);\r\n                    var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n                    if (mesh == null)\r\n                        return null;\r\n                    mesh.path = path;\r\n                    var color = this.getValue(map, \"color\", null);\r\n                    if (color != null)\r\n                        mesh.color.setFromString(color);\r\n                    mesh.width = this.getValue(map, \"width\", 0) * scale;\r\n                    mesh.height = this.getValue(map, \"height\", 0) * scale;\r\n                    var parent_3 = this.getValue(map, \"parent\", null);\r\n                    if (parent_3 != null) {\r\n                        this.linkedMeshes.push(new LinkedMesh$3(mesh, this.getValue(map, \"skin\", null), slotIndex, parent_3, this.getValue(map, \"deform\", true)));\r\n                        return mesh;\r\n                    }\r\n                    var uvs = map.uvs;\r\n                    this.readVertices(map, mesh, uvs.length);\r\n                    mesh.triangles = map.triangles;\r\n                    mesh.regionUVs = new Float32Array(uvs);\r\n                    // mesh.updateUVs();\r\n                    mesh.edges = this.getValue(map, \"edges\", null);\r\n                    mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\r\n                    return mesh;\r\n                }\r\n                case \"path\": {\r\n                    var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n                    if (path == null)\r\n                        return null;\r\n                    path.closed = this.getValue(map, \"closed\", false);\r\n                    path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\r\n                    var vertexCount = map.vertexCount;\r\n                    this.readVertices(map, path, vertexCount << 1);\r\n                    var lengths = Utils.newArray(vertexCount / 3, 0);\r\n                    for (var i = 0; i < map.lengths.length; i++)\r\n                        lengths[i] = map.lengths[i] * scale;\r\n                    path.lengths = lengths;\r\n                    var color = this.getValue(map, \"color\", null);\r\n                    if (color != null)\r\n                        path.color.setFromString(color);\r\n                    return path;\r\n                }\r\n                case \"point\": {\r\n                    var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n                    if (point == null)\r\n                        return null;\r\n                    point.x = this.getValue(map, \"x\", 0) * scale;\r\n                    point.y = this.getValue(map, \"y\", 0) * scale;\r\n                    point.rotation = this.getValue(map, \"rotation\", 0);\r\n                    var color = this.getValue(map, \"color\", null);\r\n                    if (color != null)\r\n                        point.color.setFromString(color);\r\n                    return point;\r\n                }\r\n                case \"clipping\": {\r\n                    var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n                    if (clip == null)\r\n                        return null;\r\n                    var end = this.getValue(map, \"end\", null);\r\n                    if (end != null) {\r\n                        var slot = skeletonData.findSlot(end);\r\n                        if (slot == null)\r\n                            throw new Error(\"Clipping end slot not found: \" + end);\r\n                        clip.endSlot = slot;\r\n                    }\r\n                    var vertexCount = map.vertexCount;\r\n                    this.readVertices(map, clip, vertexCount << 1);\r\n                    var color = this.getValue(map, \"color\", null);\r\n                    if (color != null)\r\n                        clip.color.setFromString(color);\r\n                    return clip;\r\n                }\r\n            }\r\n            return null;\r\n        };\r\n        SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) {\r\n            var scale = this.scale;\r\n            attachment.worldVerticesLength = verticesLength;\r\n            var vertices = map.vertices;\r\n            if (verticesLength == vertices.length) {\r\n                var scaledVertices = Utils.toFloatArray(vertices);\r\n                if (scale != 1) {\r\n                    for (var i = 0, n = vertices.length; i < n; i++)\r\n                        scaledVertices[i] *= scale;\r\n                }\r\n                attachment.vertices = scaledVertices;\r\n                return;\r\n            }\r\n            var weights = new Array();\r\n            var bones = new Array();\r\n            for (var i = 0, n = vertices.length; i < n;) {\r\n                var boneCount = vertices[i++];\r\n                bones.push(boneCount);\r\n                for (var nn = i + boneCount * 4; i < nn; i += 4) {\r\n                    bones.push(vertices[i]);\r\n                    weights.push(vertices[i + 1] * scale);\r\n                    weights.push(vertices[i + 2] * scale);\r\n                    weights.push(vertices[i + 3]);\r\n                }\r\n            }\r\n            attachment.bones = bones;\r\n            attachment.vertices = Utils.toFloatArray(weights);\r\n        };\r\n        SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) {\r\n            var scale = this.scale;\r\n            var timelines = new Array();\r\n            var duration = 0;\r\n            // Slot timelines.\r\n            if (map.slots) {\r\n                for (var slotName in map.slots) {\r\n                    var slotMap = map.slots[slotName];\r\n                    var slotIndex = skeletonData.findSlotIndex(slotName);\r\n                    if (slotIndex == -1)\r\n                        throw new Error(\"Slot not found: \" + slotName);\r\n                    for (var timelineName in slotMap) {\r\n                        var timelineMap = slotMap[timelineName];\r\n                        if (timelineName == \"attachment\") {\r\n                            var timeline = new AttachmentTimeline$2(timelineMap.length);\r\n                            timeline.slotIndex = slotIndex;\r\n                            var frameIndex = 0;\r\n                            for (var i = 0; i < timelineMap.length; i++) {\r\n                                var valueMap = timelineMap[i];\r\n                                timeline.setFrame(frameIndex++, this.getValue(valueMap, \"time\", 0), valueMap.name);\r\n                            }\r\n                            timelines.push(timeline);\r\n                            duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n                        }\r\n                        else if (timelineName == \"color\") {\r\n                            var timeline = new ColorTimeline$1(timelineMap.length);\r\n                            timeline.slotIndex = slotIndex;\r\n                            var frameIndex = 0;\r\n                            for (var i = 0; i < timelineMap.length; i++) {\r\n                                var valueMap = timelineMap[i];\r\n                                var color = new Color();\r\n                                color.setFromString(valueMap.color || \"ffffffff\");\r\n                                timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), color.r, color.g, color.b, color.a);\r\n                                this.readCurve(valueMap, timeline, frameIndex);\r\n                                frameIndex++;\r\n                            }\r\n                            timelines.push(timeline);\r\n                            duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * ColorTimeline$1.ENTRIES]);\r\n                        }\r\n                        else if (timelineName == \"twoColor\") {\r\n                            var timeline = new TwoColorTimeline$1(timelineMap.length);\r\n                            timeline.slotIndex = slotIndex;\r\n                            var frameIndex = 0;\r\n                            for (var i = 0; i < timelineMap.length; i++) {\r\n                                var valueMap = timelineMap[i];\r\n                                var light = new Color();\r\n                                var dark = new Color();\r\n                                light.setFromString(valueMap.light);\r\n                                dark.setFromString(valueMap.dark);\r\n                                timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\r\n                                this.readCurve(valueMap, timeline, frameIndex);\r\n                                frameIndex++;\r\n                            }\r\n                            timelines.push(timeline);\r\n                            duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * TwoColorTimeline$1.ENTRIES]);\r\n                        }\r\n                        else\r\n                            throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\r\n                    }\r\n                }\r\n            }\r\n            // Bone timelines.\r\n            if (map.bones) {\r\n                for (var boneName in map.bones) {\r\n                    var boneMap = map.bones[boneName];\r\n                    var boneIndex = skeletonData.findBoneIndex(boneName);\r\n                    if (boneIndex == -1)\r\n                        throw new Error(\"Bone not found: \" + boneName);\r\n                    for (var timelineName in boneMap) {\r\n                        var timelineMap = boneMap[timelineName];\r\n                        if (timelineName === \"rotate\") {\r\n                            var timeline = new RotateTimeline$2(timelineMap.length);\r\n                            timeline.boneIndex = boneIndex;\r\n                            var frameIndex = 0;\r\n                            for (var i = 0; i < timelineMap.length; i++) {\r\n                                var valueMap = timelineMap[i];\r\n                                timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"angle\", 0));\r\n                                this.readCurve(valueMap, timeline, frameIndex);\r\n                                frameIndex++;\r\n                            }\r\n                            timelines.push(timeline);\r\n                            duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * RotateTimeline$2.ENTRIES]);\r\n                        }\r\n                        else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\r\n                            var timeline = null;\r\n                            var timelineScale = 1, defaultValue = 0;\r\n                            if (timelineName === \"scale\") {\r\n                                timeline = new ScaleTimeline$2(timelineMap.length);\r\n                                defaultValue = 1;\r\n                            }\r\n                            else if (timelineName === \"shear\")\r\n                                timeline = new ShearTimeline$2(timelineMap.length);\r\n                            else {\r\n                                timeline = new TranslateTimeline$2(timelineMap.length);\r\n                                timelineScale = scale;\r\n                            }\r\n                            timeline.boneIndex = boneIndex;\r\n                            var frameIndex = 0;\r\n                            for (var i = 0; i < timelineMap.length; i++) {\r\n                                var valueMap = timelineMap[i];\r\n                                var x = this.getValue(valueMap, \"x\", defaultValue), y = this.getValue(valueMap, \"y\", defaultValue);\r\n                                timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), x * timelineScale, y * timelineScale);\r\n                                this.readCurve(valueMap, timeline, frameIndex);\r\n                                frameIndex++;\r\n                            }\r\n                            timelines.push(timeline);\r\n                            duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * TranslateTimeline$2.ENTRIES]);\r\n                        }\r\n                        else\r\n                            throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\r\n                    }\r\n                }\r\n            }\r\n            // IK constraint timelines.\r\n            if (map.ik) {\r\n                for (var constraintName in map.ik) {\r\n                    var constraintMap = map.ik[constraintName];\r\n                    var constraint = skeletonData.findIkConstraint(constraintName);\r\n                    var timeline = new IkConstraintTimeline$2(constraintMap.length);\r\n                    timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\r\n                    var frameIndex = 0;\r\n                    for (var i = 0; i < constraintMap.length; i++) {\r\n                        var valueMap = constraintMap[i];\r\n                        timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"softness\", 0) * scale, this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1, this.getValue(valueMap, \"compress\", false), this.getValue(valueMap, \"stretch\", false));\r\n                        this.readCurve(valueMap, timeline, frameIndex);\r\n                        frameIndex++;\r\n                    }\r\n                    timelines.push(timeline);\r\n                    duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * IkConstraintTimeline$2.ENTRIES]);\r\n                }\r\n            }\r\n            // Transform constraint timelines.\r\n            if (map.transform) {\r\n                for (var constraintName in map.transform) {\r\n                    var constraintMap = map.transform[constraintName];\r\n                    var constraint = skeletonData.findTransformConstraint(constraintName);\r\n                    var timeline = new TransformConstraintTimeline$2(constraintMap.length);\r\n                    timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\r\n                    var frameIndex = 0;\r\n                    for (var i = 0; i < constraintMap.length; i++) {\r\n                        var valueMap = constraintMap[i];\r\n                        timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\r\n                        this.readCurve(valueMap, timeline, frameIndex);\r\n                        frameIndex++;\r\n                    }\r\n                    timelines.push(timeline);\r\n                    duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * TransformConstraintTimeline$2.ENTRIES]);\r\n                }\r\n            }\r\n            // Path constraint timelines.\r\n            if (map.path) {\r\n                for (var constraintName in map.path) {\r\n                    var constraintMap = map.path[constraintName];\r\n                    var index = skeletonData.findPathConstraintIndex(constraintName);\r\n                    if (index == -1)\r\n                        throw new Error(\"Path constraint not found: \" + constraintName);\r\n                    var data = skeletonData.pathConstraints[index];\r\n                    for (var timelineName in constraintMap) {\r\n                        var timelineMap = constraintMap[timelineName];\r\n                        if (timelineName === \"position\" || timelineName === \"spacing\") {\r\n                            var timeline = null;\r\n                            var timelineScale = 1;\r\n                            if (timelineName === \"spacing\") {\r\n                                timeline = new PathConstraintSpacingTimeline$2(timelineMap.length);\r\n                                if (data.spacingMode == SpacingMode$2.Length || data.spacingMode == SpacingMode$2.Fixed)\r\n                                    timelineScale = scale;\r\n                            }\r\n                            else {\r\n                                timeline = new PathConstraintPositionTimeline$2(timelineMap.length);\r\n                                if (data.positionMode == exports.PositionMode.Fixed)\r\n                                    timelineScale = scale;\r\n                            }\r\n                            timeline.pathConstraintIndex = index;\r\n                            var frameIndex = 0;\r\n                            for (var i = 0; i < timelineMap.length; i++) {\r\n                                var valueMap = timelineMap[i];\r\n                                timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, timelineName, 0) * timelineScale);\r\n                                this.readCurve(valueMap, timeline, frameIndex);\r\n                                frameIndex++;\r\n                            }\r\n                            timelines.push(timeline);\r\n                            duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * PathConstraintPositionTimeline$2.ENTRIES]);\r\n                        }\r\n                        else if (timelineName === \"mix\") {\r\n                            var timeline = new PathConstraintMixTimeline$2(timelineMap.length);\r\n                            timeline.pathConstraintIndex = index;\r\n                            var frameIndex = 0;\r\n                            for (var i = 0; i < timelineMap.length; i++) {\r\n                                var valueMap = timelineMap[i];\r\n                                timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1));\r\n                                this.readCurve(valueMap, timeline, frameIndex);\r\n                                frameIndex++;\r\n                            }\r\n                            timelines.push(timeline);\r\n                            duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * PathConstraintMixTimeline$2.ENTRIES]);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            // Deform timelines.\r\n            if (map.deform) {\r\n                for (var deformName in map.deform) {\r\n                    var deformMap = map.deform[deformName];\r\n                    var skin = skeletonData.findSkin(deformName);\r\n                    if (skin == null) {\r\n                        if (settings.FAIL_ON_NON_EXISTING_SKIN) {\r\n                            throw new Error(\"Skin not found: \" + deformName);\r\n                        }\r\n                        else {\r\n                            continue;\r\n                        }\r\n                    }\r\n                    for (var slotName in deformMap) {\r\n                        var slotMap = deformMap[slotName];\r\n                        var slotIndex = skeletonData.findSlotIndex(slotName);\r\n                        if (slotIndex == -1)\r\n                            throw new Error(\"Slot not found: \" + slotMap.name);\r\n                        for (var timelineName in slotMap) {\r\n                            var timelineMap = slotMap[timelineName];\r\n                            var attachment = skin.getAttachment(slotIndex, timelineName);\r\n                            if (attachment == null)\r\n                                throw new Error(\"Deform attachment not found: \" + timelineMap.name);\r\n                            var weighted = attachment.bones != null;\r\n                            var vertices = attachment.vertices;\r\n                            var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n                            var timeline = new DeformTimeline$2(timelineMap.length);\r\n                            timeline.slotIndex = slotIndex;\r\n                            timeline.attachment = attachment;\r\n                            var frameIndex = 0;\r\n                            for (var j = 0; j < timelineMap.length; j++) {\r\n                                var valueMap = timelineMap[j];\r\n                                var deform = void 0;\r\n                                var verticesValue = this.getValue(valueMap, \"vertices\", null);\r\n                                if (verticesValue == null)\r\n                                    deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\r\n                                else {\r\n                                    deform = Utils.newFloatArray(deformLength);\r\n                                    var start = this.getValue(valueMap, \"offset\", 0);\r\n                                    Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\r\n                                    if (scale != 1) {\r\n                                        for (var i = start, n = i + verticesValue.length; i < n; i++)\r\n                                            deform[i] *= scale;\r\n                                    }\r\n                                    if (!weighted) {\r\n                                        for (var i = 0; i < deformLength; i++)\r\n                                            deform[i] += vertices[i];\r\n                                    }\r\n                                }\r\n                                timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), deform);\r\n                                this.readCurve(valueMap, timeline, frameIndex);\r\n                                frameIndex++;\r\n                            }\r\n                            timelines.push(timeline);\r\n                            duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            // Draw order timeline.\r\n            var drawOrderNode = map.drawOrder;\r\n            if (drawOrderNode == null)\r\n                drawOrderNode = map.draworder;\r\n            if (drawOrderNode != null) {\r\n                var timeline = new DrawOrderTimeline$2(drawOrderNode.length);\r\n                var slotCount = skeletonData.slots.length;\r\n                var frameIndex = 0;\r\n                for (var j = 0; j < drawOrderNode.length; j++) {\r\n                    var drawOrderMap = drawOrderNode[j];\r\n                    var drawOrder = null;\r\n                    var offsets = this.getValue(drawOrderMap, \"offsets\", null);\r\n                    if (offsets != null) {\r\n                        drawOrder = Utils.newArray(slotCount, -1);\r\n                        var unchanged = Utils.newArray(slotCount - offsets.length, 0);\r\n                        var originalIndex = 0, unchangedIndex = 0;\r\n                        for (var i = 0; i < offsets.length; i++) {\r\n                            var offsetMap = offsets[i];\r\n                            var slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\r\n                            if (slotIndex == -1)\r\n                                throw new Error(\"Slot not found: \" + offsetMap.slot);\r\n                            // Collect unchanged items.\r\n                            while (originalIndex != slotIndex)\r\n                                unchanged[unchangedIndex++] = originalIndex++;\r\n                            // Set changed items.\r\n                            drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\r\n                        }\r\n                        // Collect remaining unchanged items.\r\n                        while (originalIndex < slotCount)\r\n                            unchanged[unchangedIndex++] = originalIndex++;\r\n                        // Fill in unchanged items.\r\n                        for (var i = slotCount - 1; i >= 0; i--)\r\n                            if (drawOrder[i] == -1)\r\n                                drawOrder[i] = unchanged[--unchangedIndex];\r\n                    }\r\n                    timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, \"time\", 0), drawOrder);\r\n                }\r\n                timelines.push(timeline);\r\n                duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n            }\r\n            // Event timeline.\r\n            if (map.events) {\r\n                var timeline = new EventTimeline$2(map.events.length);\r\n                var frameIndex = 0;\r\n                for (var i = 0; i < map.events.length; i++) {\r\n                    var eventMap = map.events[i];\r\n                    var eventData = skeletonData.findEvent(eventMap.name);\r\n                    if (eventData == null)\r\n                        throw new Error(\"Event not found: \" + eventMap.name);\r\n                    var event_1 = new Event$2(Utils.toSinglePrecision(this.getValue(eventMap, \"time\", 0)), eventData);\r\n                    event_1.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\r\n                    event_1.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\r\n                    event_1.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\r\n                    if (event_1.data.audioPath != null) {\r\n                        event_1.volume = this.getValue(eventMap, \"volume\", 1);\r\n                        event_1.balance = this.getValue(eventMap, \"balance\", 0);\r\n                    }\r\n                    timeline.setFrame(frameIndex++, event_1);\r\n                }\r\n                timelines.push(timeline);\r\n                duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n            }\r\n            if (isNaN(duration)) {\r\n                throw new Error(\"Error while parsing animation, duration is NaN\");\r\n            }\r\n            skeletonData.animations.push(new Animation$2(name, timelines, duration));\r\n        };\r\n        SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {\r\n            if (!map.hasOwnProperty(\"curve\"))\r\n                return;\r\n            if (map.curve === \"stepped\")\r\n                timeline.setStepped(frameIndex);\r\n            else {\r\n                var curve = map.curve;\r\n                timeline.setCurve(frameIndex, curve, this.getValue(map, \"c2\", 0), this.getValue(map, \"c3\", 1), this.getValue(map, \"c4\", 1));\r\n            }\r\n        };\r\n        SkeletonJson.prototype.getValue = function (map, prop, defaultValue) {\r\n            return map[prop] !== undefined ? map[prop] : defaultValue;\r\n        };\r\n        SkeletonJson.blendModeFromString = function (str) {\r\n            str = str.toLowerCase();\r\n            if (str == \"normal\")\r\n                return constants.BLEND_MODES.NORMAL;\r\n            if (str == \"additive\")\r\n                return constants.BLEND_MODES.ADD;\r\n            if (str == \"multiply\")\r\n                return constants.BLEND_MODES.MULTIPLY;\r\n            if (str == \"screen\")\r\n                return constants.BLEND_MODES.SCREEN;\r\n            throw new Error(\"Unknown blend mode: \" + str);\r\n        };\r\n        SkeletonJson.positionModeFromString = function (str) {\r\n            str = str.toLowerCase();\r\n            if (str == \"fixed\")\r\n                return exports.PositionMode.Fixed;\r\n            if (str == \"percent\")\r\n                return exports.PositionMode.Percent;\r\n            throw new Error(\"Unknown position mode: \" + str);\r\n        };\r\n        SkeletonJson.spacingModeFromString = function (str) {\r\n            str = str.toLowerCase();\r\n            if (str == \"length\")\r\n                return SpacingMode$2.Length;\r\n            if (str == \"fixed\")\r\n                return SpacingMode$2.Fixed;\r\n            if (str == \"percent\")\r\n                return SpacingMode$2.Percent;\r\n            throw new Error(\"Unknown position mode: \" + str);\r\n        };\r\n        SkeletonJson.rotateModeFromString = function (str) {\r\n            str = str.toLowerCase();\r\n            if (str == \"tangent\")\r\n                return exports.RotateMode.Tangent;\r\n            if (str == \"chain\")\r\n                return exports.RotateMode.Chain;\r\n            if (str == \"chainscale\")\r\n                return exports.RotateMode.ChainScale;\r\n            throw new Error(\"Unknown rotate mode: \" + str);\r\n        };\r\n        SkeletonJson.transformModeFromString = function (str) {\r\n            str = str.toLowerCase();\r\n            if (str == \"normal\")\r\n                return exports.TransformMode.Normal;\r\n            if (str == \"onlytranslation\")\r\n                return exports.TransformMode.OnlyTranslation;\r\n            if (str == \"norotationorreflection\")\r\n                return exports.TransformMode.NoRotationOrReflection;\r\n            if (str == \"noscale\")\r\n                return exports.TransformMode.NoScale;\r\n            if (str == \"noscaleorreflection\")\r\n                return exports.TransformMode.NoScaleOrReflection;\r\n            throw new Error(\"Unknown transform mode: \" + str);\r\n        };\r\n        return SkeletonJson;\r\n    }());\r\n    var LinkedMesh$3 = /** @class */ (function () {\r\n        function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n            this.mesh = mesh;\r\n            this.skin = skin;\r\n            this.slotIndex = slotIndex;\r\n            this.parent = parent;\r\n            this.inheritDeform = inheritDeform;\r\n        }\r\n        return LinkedMesh;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var Spine$3 = /** @class */ (function (_super) {\r\n        __extends$3(Spine, _super);\r\n        function Spine() {\r\n            return _super !== null && _super.apply(this, arguments) || this;\r\n        }\r\n        Spine.prototype.createSkeleton = function (spineData) {\r\n            this.skeleton = new Skeleton$2(spineData);\r\n            this.skeleton.updateWorldTransform();\r\n            this.stateData = new AnimationStateData$2(spineData);\r\n            this.state = new AnimationState$2(this.stateData);\r\n        };\r\n        return Spine;\r\n    }(SpineBase));\n\n    var spine38 = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        Animation: Animation$2,\n        AnimationState: AnimationState$2,\n        AnimationStateAdapter: AnimationStateAdapter$1,\n        AnimationStateData: AnimationStateData$2,\n        AtlasAttachmentLoader: AtlasAttachmentLoader$2,\n        Attachment: Attachment$2,\n        AttachmentTimeline: AttachmentTimeline$2,\n        Bone: Bone$2,\n        BoneData: BoneData$2,\n        BoundingBoxAttachment: BoundingBoxAttachment$2,\n        ClippingAttachment: ClippingAttachment$2,\n        ColorTimeline: ColorTimeline$1,\n        ConstraintData: ConstraintData$1,\n        CurveTimeline: CurveTimeline$2,\n        DeformTimeline: DeformTimeline$2,\n        DrawOrderTimeline: DrawOrderTimeline$2,\n        Event: Event$2,\n        EventData: EventData$2,\n        EventQueue: EventQueue$2,\n        EventTimeline: EventTimeline$2,\n        get EventType () { return EventType$2; },\n        IkConstraint: IkConstraint$2,\n        IkConstraintData: IkConstraintData$2,\n        IkConstraintTimeline: IkConstraintTimeline$2,\n        JitterEffect: JitterEffect$2,\n        MeshAttachment: MeshAttachment$2,\n        PathAttachment: PathAttachment$2,\n        PathConstraint: PathConstraint$2,\n        PathConstraintData: PathConstraintData$2,\n        PathConstraintMixTimeline: PathConstraintMixTimeline$2,\n        PathConstraintPositionTimeline: PathConstraintPositionTimeline$2,\n        PathConstraintSpacingTimeline: PathConstraintSpacingTimeline$2,\n        PointAttachment: PointAttachment$2,\n        RegionAttachment: RegionAttachment$2,\n        RotateTimeline: RotateTimeline$2,\n        ScaleTimeline: ScaleTimeline$2,\n        ShearTimeline: ShearTimeline$2,\n        Skeleton: Skeleton$2,\n        SkeletonBinary: SkeletonBinary$1,\n        SkeletonBounds: SkeletonBounds$2,\n        SkeletonData: SkeletonData$2,\n        SkeletonJson: SkeletonJson$2,\n        Skin: Skin$2,\n        SkinEntry: SkinEntry$1,\n        Slot: Slot$2,\n        SlotData: SlotData$2,\n        get SpacingMode () { return SpacingMode$2; },\n        Spine: Spine$3,\n        SwirlEffect: SwirlEffect$2,\n        get TimelineType () { return TimelineType$1; },\n        TrackEntry: TrackEntry$2,\n        TransformConstraint: TransformConstraint$2,\n        TransformConstraintData: TransformConstraintData$2,\n        TransformConstraintTimeline: TransformConstraintTimeline$2,\n        TranslateTimeline: TranslateTimeline$2,\n        TwoColorTimeline: TwoColorTimeline$1,\n        VertexAttachment: VertexAttachment$2\n    });\n\n    /* eslint-disable */\n\n    /*! *****************************************************************************\r\n    Copyright (c) Microsoft Corporation.\r\n\r\n    Permission to use, copy, modify, and/or distribute this software for any\r\n    purpose with or without fee is hereby granted.\r\n\r\n    THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\n    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\n    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\n    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\n    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\n    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\n    PERFORMANCE OF THIS SOFTWARE.\r\n    ***************************************************************************** */\r\n    /* global Reflect, Promise */\r\n\r\n    var extendStatics$2 = function(d, b) {\r\n        extendStatics$2 = Object.setPrototypeOf ||\r\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n        return extendStatics$2(d, b);\r\n    };\r\n\r\n    function __extends$2(d, b) {\r\n        if (typeof b !== \"function\" && b !== null)\r\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n        extendStatics$2(d, b);\r\n        function __() { this.constructor = d; }\r\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n    }\n\n    /**\r\n     * @public\r\n     */\r\n    var Attachment$1 = /** @class */ (function () {\r\n        function Attachment(name) {\r\n            if (name == null)\r\n                throw new Error(\"name cannot be null.\");\r\n            this.name = name;\r\n        }\r\n        return Attachment;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var VertexAttachment$1 = /** @class */ (function (_super) {\r\n        __extends$2(VertexAttachment, _super);\r\n        function VertexAttachment(name) {\r\n            var _this = _super.call(this, name) || this;\r\n            _this.id = (VertexAttachment.nextID++ & 65535) << 11;\r\n            _this.worldVerticesLength = 0;\r\n            return _this;\r\n        }\r\n        VertexAttachment.prototype.computeWorldVerticesOld = function (slot, worldVertices) {\r\n            this.computeWorldVertices(slot, 0, this.worldVerticesLength, worldVertices, 0, 2);\r\n        };\r\n        /** Transforms local vertices to world coordinates.\r\n         * @param start The index of the first local vertex value to transform. Each vertex has 2 values, x and y.\r\n         * @param count The number of world vertex values to output. Must be <= {@link #getWorldVerticesLength()} - start.\r\n         * @param worldVertices The output world vertices. Must have a length >= offset + count.\r\n         * @param offset The worldVertices index to begin writing values. */\r\n        VertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) {\r\n            count = offset + (count >> 1) * stride;\r\n            var skeleton = slot.bone.skeleton;\r\n            var deformArray = slot.attachmentVertices;\r\n            var vertices = this.vertices;\r\n            var bones = this.bones;\r\n            if (bones == null) {\r\n                if (deformArray.length > 0)\r\n                    vertices = deformArray;\r\n                var mat = slot.bone.matrix;\r\n                var x = mat.tx;\r\n                var y = mat.ty;\r\n                var a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n                for (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) {\r\n                    var vx = vertices[v_1], vy = vertices[v_1 + 1];\r\n                    worldVertices[w] = vx * a + vy * b + x;\r\n                    worldVertices[w + 1] = vx * c + vy * d + y;\r\n                }\r\n                return;\r\n            }\r\n            var v = 0, skip = 0;\r\n            for (var i = 0; i < start; i += 2) {\r\n                var n = bones[v];\r\n                v += n + 1;\r\n                skip += n;\r\n            }\r\n            var skeletonBones = skeleton.bones;\r\n            if (deformArray.length == 0) {\r\n                for (var w = offset, b = skip * 3; w < count; w += stride) {\r\n                    var wx = 0, wy = 0;\r\n                    var n = bones[v++];\r\n                    n += v;\r\n                    for (; v < n; v++, b += 3) {\r\n                        var mat = skeletonBones[bones[v]].matrix;\r\n                        var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\r\n                        wx += (vx * mat.a + vy * mat.c + mat.tx) * weight;\r\n                        wy += (vx * mat.b + vy * mat.d + mat.ty) * weight;\r\n                    }\r\n                    worldVertices[w] = wx;\r\n                    worldVertices[w + 1] = wy;\r\n                }\r\n            }\r\n            else {\r\n                var deform = deformArray;\r\n                for (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\r\n                    var wx = 0, wy = 0;\r\n                    var n = bones[v++];\r\n                    n += v;\r\n                    for (; v < n; v++, b += 3, f += 2) {\r\n                        var mat = skeletonBones[bones[v]].matrix;\r\n                        var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\r\n                        wx += (vx * mat.a + vy * mat.c + mat.tx) * weight;\r\n                        wy += (vx * mat.b + vy * mat.d + mat.ty) * weight;\r\n                    }\r\n                    worldVertices[w] = wx;\r\n                    worldVertices[w + 1] = wy;\r\n                }\r\n            }\r\n        };\r\n        /** Returns true if a deform originally applied to the specified attachment should be applied to this attachment. */\r\n        VertexAttachment.prototype.applyDeform = function (sourceAttachment) {\r\n            return this == sourceAttachment;\r\n        };\r\n        VertexAttachment.nextID = 0;\r\n        return VertexAttachment;\r\n    }(Attachment$1));\n\n    /**\r\n     * @public\r\n     */\r\n    var BoundingBoxAttachment$1 = /** @class */ (function (_super) {\r\n        __extends$2(BoundingBoxAttachment, _super);\r\n        function BoundingBoxAttachment(name) {\r\n            var _this = _super.call(this, name) || this;\r\n            _this.type = exports.AttachmentType.BoundingBox;\r\n            _this.color = new Color(1, 1, 1, 1);\r\n            return _this;\r\n        }\r\n        return BoundingBoxAttachment;\r\n    }(VertexAttachment$1));\n\n    /**\r\n     * @public\r\n     */\r\n    var ClippingAttachment$1 = /** @class */ (function (_super) {\r\n        __extends$2(ClippingAttachment, _super);\r\n        function ClippingAttachment(name) {\r\n            var _this = _super.call(this, name) || this;\r\n            _this.type = exports.AttachmentType.Clipping;\r\n            // Nonessential.\r\n            _this.color = new Color(0.2275, 0.2275, 0.8078, 1); // ce3a3aff\r\n            return _this;\r\n        }\r\n        return ClippingAttachment;\r\n    }(VertexAttachment$1));\n\n    /**\r\n     * @public\r\n     */\r\n    var MeshAttachment$1 = /** @class */ (function (_super) {\r\n        __extends$2(MeshAttachment, _super);\r\n        function MeshAttachment(name) {\r\n            var _this = _super.call(this, name) || this;\r\n            _this.type = exports.AttachmentType.Mesh;\r\n            _this.color = new Color(1, 1, 1, 1);\r\n            _this.inheritDeform = false;\r\n            _this.tempColor = new Color(0, 0, 0, 0);\r\n            return _this;\r\n        }\r\n        MeshAttachment.prototype.applyDeform = function (sourceAttachment) {\r\n            return this == sourceAttachment || (this.inheritDeform && this.parentMesh == sourceAttachment);\r\n        };\r\n        MeshAttachment.prototype.getParentMesh = function () {\r\n            return this.parentMesh;\r\n        };\r\n        /** @param parentMesh May be null. */\r\n        MeshAttachment.prototype.setParentMesh = function (parentMesh) {\r\n            this.parentMesh = parentMesh;\r\n            if (parentMesh != null) {\r\n                this.bones = parentMesh.bones;\r\n                this.vertices = parentMesh.vertices;\r\n                this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n                this.regionUVs = parentMesh.regionUVs;\r\n                this.triangles = parentMesh.triangles;\r\n                this.hullLength = parentMesh.hullLength;\r\n                this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n            }\r\n        };\r\n        return MeshAttachment;\r\n    }(VertexAttachment$1));\n\n    /**\r\n     * @public\r\n     */\r\n    var PathAttachment$1 = /** @class */ (function (_super) {\r\n        __extends$2(PathAttachment, _super);\r\n        function PathAttachment(name) {\r\n            var _this = _super.call(this, name) || this;\r\n            _this.type = exports.AttachmentType.Path;\r\n            _this.closed = false;\r\n            _this.constantSpeed = false;\r\n            _this.color = new Color(1, 1, 1, 1);\r\n            return _this;\r\n        }\r\n        return PathAttachment;\r\n    }(VertexAttachment$1));\n\n    /**\r\n     * @public\r\n     */\r\n    var PointAttachment$1 = /** @class */ (function (_super) {\r\n        __extends$2(PointAttachment, _super);\r\n        function PointAttachment(name) {\r\n            var _this = _super.call(this, name) || this;\r\n            _this.type = exports.AttachmentType.Point;\r\n            _this.color = new Color(0.38, 0.94, 0, 1);\r\n            return _this;\r\n        }\r\n        PointAttachment.prototype.computeWorldPosition = function (bone, point) {\r\n            var mat = bone.matrix;\r\n            point.x = this.x * mat.a + this.y * mat.c + bone.worldX;\r\n            point.y = this.x * mat.b + this.y * mat.d + bone.worldY;\r\n            return point;\r\n        };\r\n        PointAttachment.prototype.computeWorldRotation = function (bone) {\r\n            var mat = bone.matrix;\r\n            var cos = MathUtils.cosDeg(this.rotation), sin = MathUtils.sinDeg(this.rotation);\r\n            var x = cos * mat.a + sin * mat.c;\r\n            var y = cos * mat.b + sin * mat.d;\r\n            return Math.atan2(y, x) * MathUtils.radDeg;\r\n        };\r\n        return PointAttachment;\r\n    }(VertexAttachment$1));\n\n    /**\r\n     * @public\r\n     */\r\n    var RegionAttachment$1 = /** @class */ (function (_super) {\r\n        __extends$2(RegionAttachment, _super);\r\n        function RegionAttachment(name) {\r\n            var _this = _super.call(this, name) || this;\r\n            _this.type = exports.AttachmentType.Region;\r\n            _this.x = 0;\r\n            _this.y = 0;\r\n            _this.scaleX = 1;\r\n            _this.scaleY = 1;\r\n            _this.rotation = 0;\r\n            _this.width = 0;\r\n            _this.height = 0;\r\n            _this.color = new Color(1, 1, 1, 1);\r\n            _this.offset = Utils.newFloatArray(8);\r\n            _this.uvs = Utils.newFloatArray(8);\r\n            _this.tempColor = new Color(1, 1, 1, 1);\r\n            return _this;\r\n        }\r\n        RegionAttachment.prototype.updateOffset = function () {\r\n            var regionScaleX = this.width / this.region.originalWidth * this.scaleX;\r\n            var regionScaleY = this.height / this.region.originalHeight * this.scaleY;\r\n            var localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\r\n            var localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\r\n            var localX2 = localX + this.region.width * regionScaleX;\r\n            var localY2 = localY + this.region.height * regionScaleY;\r\n            var radians = this.rotation * Math.PI / 180;\r\n            var cos = Math.cos(radians);\r\n            var sin = Math.sin(radians);\r\n            var localXCos = localX * cos + this.x;\r\n            var localXSin = localX * sin;\r\n            var localYCos = localY * cos + this.y;\r\n            var localYSin = localY * sin;\r\n            var localX2Cos = localX2 * cos + this.x;\r\n            var localX2Sin = localX2 * sin;\r\n            var localY2Cos = localY2 * cos + this.y;\r\n            var localY2Sin = localY2 * sin;\r\n            var offset = this.offset;\r\n            offset[RegionAttachment.OX1] = localXCos - localYSin;\r\n            offset[RegionAttachment.OY1] = localYCos + localXSin;\r\n            offset[RegionAttachment.OX2] = localXCos - localY2Sin;\r\n            offset[RegionAttachment.OY2] = localY2Cos + localXSin;\r\n            offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\r\n            offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\r\n            offset[RegionAttachment.OX4] = localX2Cos - localYSin;\r\n            offset[RegionAttachment.OY4] = localYCos + localX2Sin;\r\n        };\r\n        RegionAttachment.prototype.setRegion = function (region) {\r\n            this.region = region;\r\n            var uvs = this.uvs;\r\n            if (region.rotate) {\r\n                uvs[2] = region.u;\r\n                uvs[3] = region.v2;\r\n                uvs[4] = region.u;\r\n                uvs[5] = region.v;\r\n                uvs[6] = region.u2;\r\n                uvs[7] = region.v;\r\n                uvs[0] = region.u2;\r\n                uvs[1] = region.v2;\r\n            }\r\n            else {\r\n                uvs[0] = region.u;\r\n                uvs[1] = region.v2;\r\n                uvs[2] = region.u;\r\n                uvs[3] = region.v;\r\n                uvs[4] = region.u2;\r\n                uvs[5] = region.v;\r\n                uvs[6] = region.u2;\r\n                uvs[7] = region.v2;\r\n            }\r\n        };\r\n        RegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) {\r\n            var vertexOffset = this.offset;\r\n            var mat = bone.matrix;\r\n            var x = mat.tx, y = mat.ty;\r\n            var a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n            var offsetX = 0, offsetY = 0;\r\n            offsetX = vertexOffset[RegionAttachment.OX1];\r\n            offsetY = vertexOffset[RegionAttachment.OY1];\r\n            worldVertices[offset] = offsetX * a + offsetY * b + x; // br\r\n            worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n            offset += stride;\r\n            offsetX = vertexOffset[RegionAttachment.OX2];\r\n            offsetY = vertexOffset[RegionAttachment.OY2];\r\n            worldVertices[offset] = offsetX * a + offsetY * b + x; // bl\r\n            worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n            offset += stride;\r\n            offsetX = vertexOffset[RegionAttachment.OX3];\r\n            offsetY = vertexOffset[RegionAttachment.OY3];\r\n            worldVertices[offset] = offsetX * a + offsetY * b + x; // ul\r\n            worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n            offset += stride;\r\n            offsetX = vertexOffset[RegionAttachment.OX4];\r\n            offsetY = vertexOffset[RegionAttachment.OY4];\r\n            worldVertices[offset] = offsetX * a + offsetY * b + x; // ur\r\n            worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n        };\r\n        RegionAttachment.OX1 = 0;\r\n        RegionAttachment.OY1 = 1;\r\n        RegionAttachment.OX2 = 2;\r\n        RegionAttachment.OY2 = 3;\r\n        RegionAttachment.OX3 = 4;\r\n        RegionAttachment.OY3 = 5;\r\n        RegionAttachment.OX4 = 6;\r\n        RegionAttachment.OY4 = 7;\r\n        RegionAttachment.X1 = 0;\r\n        RegionAttachment.Y1 = 1;\r\n        RegionAttachment.C1R = 2;\r\n        RegionAttachment.C1G = 3;\r\n        RegionAttachment.C1B = 4;\r\n        RegionAttachment.C1A = 5;\r\n        RegionAttachment.U1 = 6;\r\n        RegionAttachment.V1 = 7;\r\n        RegionAttachment.X2 = 8;\r\n        RegionAttachment.Y2 = 9;\r\n        RegionAttachment.C2R = 10;\r\n        RegionAttachment.C2G = 11;\r\n        RegionAttachment.C2B = 12;\r\n        RegionAttachment.C2A = 13;\r\n        RegionAttachment.U2 = 14;\r\n        RegionAttachment.V2 = 15;\r\n        RegionAttachment.X3 = 16;\r\n        RegionAttachment.Y3 = 17;\r\n        RegionAttachment.C3R = 18;\r\n        RegionAttachment.C3G = 19;\r\n        RegionAttachment.C3B = 20;\r\n        RegionAttachment.C3A = 21;\r\n        RegionAttachment.U3 = 22;\r\n        RegionAttachment.V3 = 23;\r\n        RegionAttachment.X4 = 24;\r\n        RegionAttachment.Y4 = 25;\r\n        RegionAttachment.C4R = 26;\r\n        RegionAttachment.C4G = 27;\r\n        RegionAttachment.C4B = 28;\r\n        RegionAttachment.C4A = 29;\r\n        RegionAttachment.U4 = 30;\r\n        RegionAttachment.V4 = 31;\r\n        return RegionAttachment;\r\n    }(Attachment$1));\n\n    /**\r\n     * @public\r\n     */\r\n    var JitterEffect$1 = /** @class */ (function () {\r\n        function JitterEffect(jitterX, jitterY) {\r\n            this.jitterX = 0;\r\n            this.jitterY = 0;\r\n            this.jitterX = jitterX;\r\n            this.jitterY = jitterY;\r\n        }\r\n        JitterEffect.prototype.begin = function (skeleton) {\r\n        };\r\n        JitterEffect.prototype.transform = function (position, uv, light, dark) {\r\n            position.x += MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n            position.y += MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n        };\r\n        JitterEffect.prototype.end = function () {\r\n        };\r\n        return JitterEffect;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var SwirlEffect$1 = /** @class */ (function () {\r\n        function SwirlEffect(radius) {\r\n            this.centerX = 0;\r\n            this.centerY = 0;\r\n            this.radius = 0;\r\n            this.angle = 0;\r\n            this.worldX = 0;\r\n            this.worldY = 0;\r\n            this.radius = radius;\r\n        }\r\n        SwirlEffect.prototype.begin = function (skeleton) {\r\n            this.worldX = skeleton.x + this.centerX;\r\n            this.worldY = skeleton.y + this.centerY;\r\n        };\r\n        SwirlEffect.prototype.transform = function (position, uv, light, dark) {\r\n            var radAngle = this.angle * MathUtils.degreesToRadians;\r\n            var x = position.x - this.worldX;\r\n            var y = position.y - this.worldY;\r\n            var dist = Math.sqrt(x * x + y * y);\r\n            if (dist < this.radius) {\r\n                var theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\r\n                var cos = Math.cos(theta);\r\n                var sin = Math.sin(theta);\r\n                position.x = cos * x - sin * y + this.worldX;\r\n                position.y = sin * x + cos * y + this.worldY;\r\n            }\r\n        };\r\n        SwirlEffect.prototype.end = function () {\r\n        };\r\n        SwirlEffect.interpolation = new PowOut(2);\r\n        return SwirlEffect;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var Animation$1 = /** @class */ (function () {\r\n        function Animation(name, timelines, duration) {\r\n            if (name == null)\r\n                throw new Error(\"name cannot be null.\");\r\n            if (timelines == null)\r\n                throw new Error(\"timelines cannot be null.\");\r\n            this.name = name;\r\n            this.timelines = timelines;\r\n            this.duration = duration;\r\n        }\r\n        Animation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, blend, direction) {\r\n            if (skeleton == null)\r\n                throw new Error(\"skeleton cannot be null.\");\r\n            if (loop && this.duration != 0) {\r\n                time %= this.duration;\r\n                if (lastTime > 0)\r\n                    lastTime %= this.duration;\r\n            }\r\n            var timelines = this.timelines;\r\n            for (var i = 0, n = timelines.length; i < n; i++)\r\n                timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\r\n        };\r\n        Animation.binarySearch = function (values, target, step) {\r\n            if (step === void 0) { step = 1; }\r\n            var low = 0;\r\n            var high = values.length / step - 2;\r\n            if (high == 0)\r\n                return step;\r\n            var current = high >>> 1;\r\n            while (true) {\r\n                if (values[(current + 1) * step] <= target)\r\n                    low = current + 1;\r\n                else\r\n                    high = current;\r\n                if (low == high)\r\n                    return (low + 1) * step;\r\n                current = (low + high) >>> 1;\r\n            }\r\n        };\r\n        Animation.linearSearch = function (values, target, step) {\r\n            for (var i = 0, last = values.length - step; i <= last; i += step)\r\n                if (values[i] > target)\r\n                    return i;\r\n            return -1;\r\n        };\r\n        return Animation;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var TimelineType;\r\n    (function (TimelineType) {\r\n        TimelineType[TimelineType[\"rotate\"] = 0] = \"rotate\";\r\n        TimelineType[TimelineType[\"translate\"] = 1] = \"translate\";\r\n        TimelineType[TimelineType[\"scale\"] = 2] = \"scale\";\r\n        TimelineType[TimelineType[\"shear\"] = 3] = \"shear\";\r\n        TimelineType[TimelineType[\"attachment\"] = 4] = \"attachment\";\r\n        TimelineType[TimelineType[\"color\"] = 5] = \"color\";\r\n        TimelineType[TimelineType[\"deform\"] = 6] = \"deform\";\r\n        TimelineType[TimelineType[\"event\"] = 7] = \"event\";\r\n        TimelineType[TimelineType[\"drawOrder\"] = 8] = \"drawOrder\";\r\n        TimelineType[TimelineType[\"ikConstraint\"] = 9] = \"ikConstraint\";\r\n        TimelineType[TimelineType[\"transformConstraint\"] = 10] = \"transformConstraint\";\r\n        TimelineType[TimelineType[\"pathConstraintPosition\"] = 11] = \"pathConstraintPosition\";\r\n        TimelineType[TimelineType[\"pathConstraintSpacing\"] = 12] = \"pathConstraintSpacing\";\r\n        TimelineType[TimelineType[\"pathConstraintMix\"] = 13] = \"pathConstraintMix\";\r\n        TimelineType[TimelineType[\"twoColor\"] = 14] = \"twoColor\";\r\n    })(TimelineType || (TimelineType = {}));\r\n    /**\r\n     * @public\r\n     */\r\n    var CurveTimeline$1 = /** @class */ (function () {\r\n        function CurveTimeline(frameCount) {\r\n            if (frameCount <= 0)\r\n                throw new Error(\"frameCount must be > 0: \" + frameCount);\r\n            this.curves = Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\r\n        }\r\n        CurveTimeline.prototype.getFrameCount = function () {\r\n            return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\r\n        };\r\n        CurveTimeline.prototype.setLinear = function (frameIndex) {\r\n            this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\r\n        };\r\n        CurveTimeline.prototype.setStepped = function (frameIndex) {\r\n            this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\r\n        };\r\n        CurveTimeline.prototype.getCurveType = function (frameIndex) {\r\n            var index = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n            if (index == this.curves.length)\r\n                return CurveTimeline.LINEAR;\r\n            var type = this.curves[index];\r\n            if (type == CurveTimeline.LINEAR)\r\n                return CurveTimeline.LINEAR;\r\n            if (type == CurveTimeline.STEPPED)\r\n                return CurveTimeline.STEPPED;\r\n            return CurveTimeline.BEZIER;\r\n        };\r\n        /** Sets the control handle positions for an interpolation bezier curve used to transition from this keyframe to the next.\r\n         * cx1 and cx2 are from 0 to 1, representing the percent of time between the two keyframes. cy1 and cy2 are the percent of\r\n         * the difference between the keyframe's values. */\r\n        CurveTimeline.prototype.setCurve = function (frameIndex, cx1, cy1, cx2, cy2) {\r\n            var tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\r\n            var dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\r\n            var ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\r\n            var dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\r\n            var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n            var curves = this.curves;\r\n            curves[i++] = CurveTimeline.BEZIER;\r\n            var x = dfx, y = dfy;\r\n            for (var n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n                curves[i] = x;\r\n                curves[i + 1] = y;\r\n                dfx += ddfx;\r\n                dfy += ddfy;\r\n                ddfx += dddfx;\r\n                ddfy += dddfy;\r\n                x += dfx;\r\n                y += dfy;\r\n            }\r\n        };\r\n        CurveTimeline.prototype.getCurvePercent = function (frameIndex, percent) {\r\n            percent = MathUtils.clamp(percent, 0, 1);\r\n            var curves = this.curves;\r\n            var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n            var type = curves[i];\r\n            if (type == CurveTimeline.LINEAR)\r\n                return percent;\r\n            if (type == CurveTimeline.STEPPED)\r\n                return 0;\r\n            i++;\r\n            var x = 0;\r\n            for (var start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n                x = curves[i];\r\n                if (x >= percent) {\r\n                    var prevX = void 0, prevY = void 0;\r\n                    if (i == start) {\r\n                        prevX = 0;\r\n                        prevY = 0;\r\n                    }\r\n                    else {\r\n                        prevX = curves[i - 2];\r\n                        prevY = curves[i - 1];\r\n                    }\r\n                    return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\r\n                }\r\n            }\r\n            var y = curves[i - 1];\r\n            return y + (1 - y) * (percent - x) / (1 - x); // Last point is 1,1.\r\n        };\r\n        CurveTimeline.LINEAR = 0;\r\n        CurveTimeline.STEPPED = 1;\r\n        CurveTimeline.BEZIER = 2;\r\n        CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;\r\n        return CurveTimeline;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var RotateTimeline$1 = /** @class */ (function (_super) {\r\n        __extends$2(RotateTimeline, _super);\r\n        function RotateTimeline(frameCount) {\r\n            var _this = _super.call(this, frameCount) || this;\r\n            _this.frames = Utils.newFloatArray(frameCount << 1);\r\n            return _this;\r\n        }\r\n        RotateTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType.rotate << 24) + this.boneIndex;\r\n        };\r\n        /** Sets the time and angle of the specified keyframe. */\r\n        RotateTimeline.prototype.setFrame = function (frameIndex, time, degrees) {\r\n            frameIndex <<= 1;\r\n            this.frames[frameIndex] = time;\r\n            this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\r\n        };\r\n        RotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var frames = this.frames;\r\n            var bone = skeleton.bones[this.boneIndex];\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        bone.rotation = bone.data.rotation;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        var r_1 = bone.data.rotation - bone.rotation;\r\n                        bone.rotation += (r_1 - (16384 - ((16384.499999999996 - r_1 / 360) | 0)) * 360) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            if (time >= frames[frames.length - RotateTimeline.ENTRIES]) { // Time is after last frame.\r\n                var r_2 = frames[frames.length + RotateTimeline.PREV_ROTATION];\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        bone.rotation = bone.data.rotation + r_2 * alpha;\r\n                        break;\r\n                    case exports.MixBlend.first:\r\n                    case exports.MixBlend.replace:\r\n                        r_2 += bone.data.rotation - bone.rotation;\r\n                        r_2 -= (16384 - ((16384.499999999996 - r_2 / 360) | 0)) * 360; // Wrap within -180 and 180.\r\n                    case exports.MixBlend.add:\r\n                        bone.rotation += r_2 * alpha;\r\n                }\r\n                return;\r\n            }\r\n            // Interpolate between the previous frame and the current frame.\r\n            var frame = Animation$1.binarySearch(frames, time, RotateTimeline.ENTRIES);\r\n            var prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\r\n            var frameTime = frames[frame];\r\n            var percent = this.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\r\n            var r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\r\n            r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent;\r\n            switch (blend) {\r\n                case exports.MixBlend.setup:\r\n                    bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n                    break;\r\n                case exports.MixBlend.first:\r\n                case exports.MixBlend.replace:\r\n                    r += bone.data.rotation - bone.rotation;\r\n                case exports.MixBlend.add:\r\n                    bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n            }\r\n        };\r\n        RotateTimeline.ENTRIES = 2;\r\n        RotateTimeline.PREV_TIME = -2;\r\n        RotateTimeline.PREV_ROTATION = -1;\r\n        RotateTimeline.ROTATION = 1;\r\n        return RotateTimeline;\r\n    }(CurveTimeline$1));\r\n    /**\r\n     * @public\r\n     */\r\n    var TranslateTimeline$1 = /** @class */ (function (_super) {\r\n        __extends$2(TranslateTimeline, _super);\r\n        function TranslateTimeline(frameCount) {\r\n            var _this = _super.call(this, frameCount) || this;\r\n            _this.frames = Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\r\n            return _this;\r\n        }\r\n        TranslateTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType.translate << 24) + this.boneIndex;\r\n        };\r\n        /** Sets the time and value of the specified keyframe. */\r\n        TranslateTimeline.prototype.setFrame = function (frameIndex, time, x, y) {\r\n            frameIndex *= TranslateTimeline.ENTRIES;\r\n            this.frames[frameIndex] = time;\r\n            this.frames[frameIndex + TranslateTimeline.X] = x;\r\n            this.frames[frameIndex + TranslateTimeline.Y] = y;\r\n        };\r\n        TranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var frames = this.frames;\r\n            var bone = skeleton.bones[this.boneIndex];\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        bone.x = bone.data.x;\r\n                        bone.y = bone.data.y;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        bone.x += (bone.data.x - bone.x) * alpha;\r\n                        bone.y += (bone.data.y - bone.y) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var x = 0, y = 0;\r\n            if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) { // Time is after last frame.\r\n                x = frames[frames.length + TranslateTimeline.PREV_X];\r\n                y = frames[frames.length + TranslateTimeline.PREV_Y];\r\n            }\r\n            else {\r\n                // Interpolate between the previous frame and the current frame.\r\n                var frame = Animation$1.binarySearch(frames, time, TranslateTimeline.ENTRIES);\r\n                x = frames[frame + TranslateTimeline.PREV_X];\r\n                y = frames[frame + TranslateTimeline.PREV_Y];\r\n                var frameTime = frames[frame];\r\n                var percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\r\n                x += (frames[frame + TranslateTimeline.X] - x) * percent;\r\n                y += (frames[frame + TranslateTimeline.Y] - y) * percent;\r\n            }\r\n            switch (blend) {\r\n                case exports.MixBlend.setup:\r\n                    bone.x = bone.data.x + x * alpha;\r\n                    bone.y = bone.data.y + y * alpha;\r\n                    break;\r\n                case exports.MixBlend.first:\r\n                case exports.MixBlend.replace:\r\n                    bone.x += (bone.data.x + x - bone.x) * alpha;\r\n                    bone.y += (bone.data.y + y - bone.y) * alpha;\r\n                    break;\r\n                case exports.MixBlend.add:\r\n                    bone.x += x * alpha;\r\n                    bone.y += y * alpha;\r\n            }\r\n        };\r\n        TranslateTimeline.ENTRIES = 3;\r\n        TranslateTimeline.PREV_TIME = -3;\r\n        TranslateTimeline.PREV_X = -2;\r\n        TranslateTimeline.PREV_Y = -1;\r\n        TranslateTimeline.X = 1;\r\n        TranslateTimeline.Y = 2;\r\n        return TranslateTimeline;\r\n    }(CurveTimeline$1));\r\n    /**\r\n     * @public\r\n     */\r\n    var ScaleTimeline$1 = /** @class */ (function (_super) {\r\n        __extends$2(ScaleTimeline, _super);\r\n        function ScaleTimeline(frameCount) {\r\n            return _super.call(this, frameCount) || this;\r\n        }\r\n        ScaleTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType.scale << 24) + this.boneIndex;\r\n        };\r\n        ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var frames = this.frames;\r\n            var bone = skeleton.bones[this.boneIndex];\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        bone.scaleX = bone.data.scaleX;\r\n                        bone.scaleY = bone.data.scaleY;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n                        bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var x = 0, y = 0;\r\n            if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) { // Time is after last frame.\r\n                x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\r\n                y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\r\n            }\r\n            else {\r\n                // Interpolate between the previous frame and the current frame.\r\n                var frame = Animation$1.binarySearch(frames, time, ScaleTimeline.ENTRIES);\r\n                x = frames[frame + ScaleTimeline.PREV_X];\r\n                y = frames[frame + ScaleTimeline.PREV_Y];\r\n                var frameTime = frames[frame];\r\n                var percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\r\n                x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\r\n                y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\r\n            }\r\n            if (alpha == 1) {\r\n                if (blend == exports.MixBlend.add) {\r\n                    bone.scaleX += x - bone.data.scaleX;\r\n                    bone.scaleY += y - bone.data.scaleY;\r\n                }\r\n                else {\r\n                    bone.scaleX = x;\r\n                    bone.scaleY = y;\r\n                }\r\n            }\r\n            else {\r\n                var bx = 0, by = 0;\r\n                if (direction == exports.MixDirection.mixOut) {\r\n                    switch (blend) {\r\n                        case exports.MixBlend.setup:\r\n                            bx = bone.data.scaleX;\r\n                            by = bone.data.scaleY;\r\n                            bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n                            bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n                            break;\r\n                        case exports.MixBlend.first:\r\n                        case exports.MixBlend.replace:\r\n                            bx = bone.scaleX;\r\n                            by = bone.scaleY;\r\n                            bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n                            bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n                            break;\r\n                        case exports.MixBlend.add:\r\n                            bx = bone.scaleX;\r\n                            by = bone.scaleY;\r\n                            bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bone.data.scaleX) * alpha;\r\n                            bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - bone.data.scaleY) * alpha;\r\n                    }\r\n                }\r\n                else {\r\n                    switch (blend) {\r\n                        case exports.MixBlend.setup:\r\n                            bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\r\n                            by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\r\n                            bone.scaleX = bx + (x - bx) * alpha;\r\n                            bone.scaleY = by + (y - by) * alpha;\r\n                            break;\r\n                        case exports.MixBlend.first:\r\n                        case exports.MixBlend.replace:\r\n                            bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\r\n                            by = Math.abs(bone.scaleY) * MathUtils.signum(y);\r\n                            bone.scaleX = bx + (x - bx) * alpha;\r\n                            bone.scaleY = by + (y - by) * alpha;\r\n                            break;\r\n                        case exports.MixBlend.add:\r\n                            bx = MathUtils.signum(x);\r\n                            by = MathUtils.signum(y);\r\n                            bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha;\r\n                            bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha;\r\n                    }\r\n                }\r\n            }\r\n        };\r\n        return ScaleTimeline;\r\n    }(TranslateTimeline$1));\r\n    /**\r\n     * @public\r\n     */\r\n    var ShearTimeline$1 = /** @class */ (function (_super) {\r\n        __extends$2(ShearTimeline, _super);\r\n        function ShearTimeline(frameCount) {\r\n            return _super.call(this, frameCount) || this;\r\n        }\r\n        ShearTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType.shear << 24) + this.boneIndex;\r\n        };\r\n        ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var frames = this.frames;\r\n            var bone = skeleton.bones[this.boneIndex];\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        bone.shearX = bone.data.shearX;\r\n                        bone.shearY = bone.data.shearY;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n                        bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var x = 0, y = 0;\r\n            if (time >= frames[frames.length - ShearTimeline.ENTRIES]) { // Time is after last frame.\r\n                x = frames[frames.length + ShearTimeline.PREV_X];\r\n                y = frames[frames.length + ShearTimeline.PREV_Y];\r\n            }\r\n            else {\r\n                // Interpolate between the previous frame and the current frame.\r\n                var frame = Animation$1.binarySearch(frames, time, ShearTimeline.ENTRIES);\r\n                x = frames[frame + ShearTimeline.PREV_X];\r\n                y = frames[frame + ShearTimeline.PREV_Y];\r\n                var frameTime = frames[frame];\r\n                var percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\r\n                x = x + (frames[frame + ShearTimeline.X] - x) * percent;\r\n                y = y + (frames[frame + ShearTimeline.Y] - y) * percent;\r\n            }\r\n            switch (blend) {\r\n                case exports.MixBlend.setup:\r\n                    bone.shearX = bone.data.shearX + x * alpha;\r\n                    bone.shearY = bone.data.shearY + y * alpha;\r\n                    break;\r\n                case exports.MixBlend.first:\r\n                case exports.MixBlend.replace:\r\n                    bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n                    bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n                    break;\r\n                case exports.MixBlend.add:\r\n                    bone.shearX += x * alpha;\r\n                    bone.shearY += y * alpha;\r\n            }\r\n        };\r\n        return ShearTimeline;\r\n    }(TranslateTimeline$1));\r\n    /**\r\n     * @public\r\n     */\r\n    var ColorTimeline = /** @class */ (function (_super) {\r\n        __extends$2(ColorTimeline, _super);\r\n        function ColorTimeline(frameCount) {\r\n            var _this = _super.call(this, frameCount) || this;\r\n            _this.frames = Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\r\n            return _this;\r\n        }\r\n        ColorTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType.color << 24) + this.slotIndex;\r\n        };\r\n        /** Sets the time and value of the specified keyframe. */\r\n        ColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a) {\r\n            frameIndex *= ColorTimeline.ENTRIES;\r\n            this.frames[frameIndex] = time;\r\n            this.frames[frameIndex + ColorTimeline.R] = r;\r\n            this.frames[frameIndex + ColorTimeline.G] = g;\r\n            this.frames[frameIndex + ColorTimeline.B] = b;\r\n            this.frames[frameIndex + ColorTimeline.A] = a;\r\n        };\r\n        ColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var slot = skeleton.slots[this.slotIndex];\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        slot.color.setFromColor(slot.data.color);\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        var color = slot.color, setup = slot.data.color;\r\n                        color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha);\r\n                }\r\n                return;\r\n            }\r\n            var r = 0, g = 0, b = 0, a = 0;\r\n            if (time >= frames[frames.length - ColorTimeline.ENTRIES]) { // Time is after last frame.\r\n                var i = frames.length;\r\n                r = frames[i + ColorTimeline.PREV_R];\r\n                g = frames[i + ColorTimeline.PREV_G];\r\n                b = frames[i + ColorTimeline.PREV_B];\r\n                a = frames[i + ColorTimeline.PREV_A];\r\n            }\r\n            else {\r\n                // Interpolate between the previous frame and the current frame.\r\n                var frame = Animation$1.binarySearch(frames, time, ColorTimeline.ENTRIES);\r\n                r = frames[frame + ColorTimeline.PREV_R];\r\n                g = frames[frame + ColorTimeline.PREV_G];\r\n                b = frames[frame + ColorTimeline.PREV_B];\r\n                a = frames[frame + ColorTimeline.PREV_A];\r\n                var frameTime = frames[frame];\r\n                var percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\r\n                r += (frames[frame + ColorTimeline.R] - r) * percent;\r\n                g += (frames[frame + ColorTimeline.G] - g) * percent;\r\n                b += (frames[frame + ColorTimeline.B] - b) * percent;\r\n                a += (frames[frame + ColorTimeline.A] - a) * percent;\r\n            }\r\n            if (alpha == 1)\r\n                slot.color.set(r, g, b, a);\r\n            else {\r\n                var color = slot.color;\r\n                if (blend == exports.MixBlend.setup)\r\n                    color.setFromColor(slot.data.color);\r\n                color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\r\n            }\r\n        };\r\n        ColorTimeline.ENTRIES = 5;\r\n        ColorTimeline.PREV_TIME = -5;\r\n        ColorTimeline.PREV_R = -4;\r\n        ColorTimeline.PREV_G = -3;\r\n        ColorTimeline.PREV_B = -2;\r\n        ColorTimeline.PREV_A = -1;\r\n        ColorTimeline.R = 1;\r\n        ColorTimeline.G = 2;\r\n        ColorTimeline.B = 3;\r\n        ColorTimeline.A = 4;\r\n        return ColorTimeline;\r\n    }(CurveTimeline$1));\r\n    /**\r\n     * @public\r\n     */\r\n    var TwoColorTimeline = /** @class */ (function (_super) {\r\n        __extends$2(TwoColorTimeline, _super);\r\n        function TwoColorTimeline(frameCount) {\r\n            var _this = _super.call(this, frameCount) || this;\r\n            _this.frames = Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\r\n            return _this;\r\n        }\r\n        TwoColorTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType.twoColor << 24) + this.slotIndex;\r\n        };\r\n        /** Sets the time and value of the specified keyframe. */\r\n        TwoColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a, r2, g2, b2) {\r\n            frameIndex *= TwoColorTimeline.ENTRIES;\r\n            this.frames[frameIndex] = time;\r\n            this.frames[frameIndex + TwoColorTimeline.R] = r;\r\n            this.frames[frameIndex + TwoColorTimeline.G] = g;\r\n            this.frames[frameIndex + TwoColorTimeline.B] = b;\r\n            this.frames[frameIndex + TwoColorTimeline.A] = a;\r\n            this.frames[frameIndex + TwoColorTimeline.R2] = r2;\r\n            this.frames[frameIndex + TwoColorTimeline.G2] = g2;\r\n            this.frames[frameIndex + TwoColorTimeline.B2] = b2;\r\n        };\r\n        TwoColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var slot = skeleton.slots[this.slotIndex];\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        slot.color.setFromColor(slot.data.color);\r\n                        slot.darkColor.setFromColor(slot.data.darkColor);\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        var light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n                        light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha);\r\n                        dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\r\n                }\r\n                return;\r\n            }\r\n            var r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n            if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) { // Time is after last frame.\r\n                var i = frames.length;\r\n                r = frames[i + TwoColorTimeline.PREV_R];\r\n                g = frames[i + TwoColorTimeline.PREV_G];\r\n                b = frames[i + TwoColorTimeline.PREV_B];\r\n                a = frames[i + TwoColorTimeline.PREV_A];\r\n                r2 = frames[i + TwoColorTimeline.PREV_R2];\r\n                g2 = frames[i + TwoColorTimeline.PREV_G2];\r\n                b2 = frames[i + TwoColorTimeline.PREV_B2];\r\n            }\r\n            else {\r\n                // Interpolate between the previous frame and the current frame.\r\n                var frame = Animation$1.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\r\n                r = frames[frame + TwoColorTimeline.PREV_R];\r\n                g = frames[frame + TwoColorTimeline.PREV_G];\r\n                b = frames[frame + TwoColorTimeline.PREV_B];\r\n                a = frames[frame + TwoColorTimeline.PREV_A];\r\n                r2 = frames[frame + TwoColorTimeline.PREV_R2];\r\n                g2 = frames[frame + TwoColorTimeline.PREV_G2];\r\n                b2 = frames[frame + TwoColorTimeline.PREV_B2];\r\n                var frameTime = frames[frame];\r\n                var percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\r\n                r += (frames[frame + TwoColorTimeline.R] - r) * percent;\r\n                g += (frames[frame + TwoColorTimeline.G] - g) * percent;\r\n                b += (frames[frame + TwoColorTimeline.B] - b) * percent;\r\n                a += (frames[frame + TwoColorTimeline.A] - a) * percent;\r\n                r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\r\n                g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\r\n                b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\r\n            }\r\n            if (alpha == 1) {\r\n                slot.color.set(r, g, b, a);\r\n                slot.darkColor.set(r2, g2, b2, 1);\r\n            }\r\n            else {\r\n                var light = slot.color, dark = slot.darkColor;\r\n                if (blend == exports.MixBlend.setup) {\r\n                    light.setFromColor(slot.data.color);\r\n                    dark.setFromColor(slot.data.darkColor);\r\n                }\r\n                light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\r\n                dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\r\n            }\r\n        };\r\n        TwoColorTimeline.ENTRIES = 8;\r\n        TwoColorTimeline.PREV_TIME = -8;\r\n        TwoColorTimeline.PREV_R = -7;\r\n        TwoColorTimeline.PREV_G = -6;\r\n        TwoColorTimeline.PREV_B = -5;\r\n        TwoColorTimeline.PREV_A = -4;\r\n        TwoColorTimeline.PREV_R2 = -3;\r\n        TwoColorTimeline.PREV_G2 = -2;\r\n        TwoColorTimeline.PREV_B2 = -1;\r\n        TwoColorTimeline.R = 1;\r\n        TwoColorTimeline.G = 2;\r\n        TwoColorTimeline.B = 3;\r\n        TwoColorTimeline.A = 4;\r\n        TwoColorTimeline.R2 = 5;\r\n        TwoColorTimeline.G2 = 6;\r\n        TwoColorTimeline.B2 = 7;\r\n        return TwoColorTimeline;\r\n    }(CurveTimeline$1));\r\n    /**\r\n     * @public\r\n     */\r\n    var AttachmentTimeline$1 = /** @class */ (function () {\r\n        function AttachmentTimeline(frameCount) {\r\n            this.frames = Utils.newFloatArray(frameCount);\r\n            this.attachmentNames = new Array(frameCount);\r\n        }\r\n        AttachmentTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType.attachment << 24) + this.slotIndex;\r\n        };\r\n        AttachmentTimeline.prototype.getFrameCount = function () {\r\n            return this.frames.length;\r\n        };\r\n        /** Sets the time and value of the specified keyframe. */\r\n        AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) {\r\n            this.frames[frameIndex] = time;\r\n            this.attachmentNames[frameIndex] = attachmentName;\r\n        };\r\n        AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var slot = skeleton.slots[this.slotIndex];\r\n            if (direction == exports.MixDirection.mixOut && blend == exports.MixBlend.setup) {\r\n                var attachmentName_1 = slot.data.attachmentName;\r\n                slot.setAttachment(attachmentName_1 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_1));\r\n                return;\r\n            }\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                if (blend == exports.MixBlend.setup || blend == exports.MixBlend.first) {\r\n                    var attachmentName_2 = slot.data.attachmentName;\r\n                    slot.setAttachment(attachmentName_2 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_2));\r\n                }\r\n                return;\r\n            }\r\n            var frameIndex = 0;\r\n            if (time >= frames[frames.length - 1]) // Time is after last frame.\r\n                frameIndex = frames.length - 1;\r\n            else\r\n                frameIndex = Animation$1.binarySearch(frames, time, 1) - 1;\r\n            var attachmentName = this.attachmentNames[frameIndex];\r\n            skeleton.slots[this.slotIndex]\r\n                .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n        };\r\n        return AttachmentTimeline;\r\n    }());\r\n    var zeros = null;\r\n    /**\r\n     * @public\r\n     */\r\n    var DeformTimeline$1 = /** @class */ (function (_super) {\r\n        __extends$2(DeformTimeline, _super);\r\n        function DeformTimeline(frameCount) {\r\n            var _this = _super.call(this, frameCount) || this;\r\n            _this.frames = Utils.newFloatArray(frameCount);\r\n            _this.frameVertices = new Array(frameCount);\r\n            if (zeros == null)\r\n                zeros = Utils.newFloatArray(64);\r\n            return _this;\r\n        }\r\n        DeformTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType.deform << 27) + +this.attachment.id + this.slotIndex;\r\n        };\r\n        /** Sets the time of the specified keyframe. */\r\n        DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) {\r\n            this.frames[frameIndex] = time;\r\n            this.frameVertices[frameIndex] = vertices;\r\n        };\r\n        DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            var slot = skeleton.slots[this.slotIndex];\r\n            var slotAttachment = slot.getAttachment();\r\n            if (!(slotAttachment instanceof VertexAttachment$1) || !slotAttachment.applyDeform(this.attachment))\r\n                return;\r\n            var verticesArray = slot.attachmentVertices;\r\n            if (verticesArray.length == 0)\r\n                blend = exports.MixBlend.setup;\r\n            var frameVertices = this.frameVertices;\r\n            var vertexCount = frameVertices[0].length;\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                var vertexAttachment = slotAttachment;\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        verticesArray.length = 0;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        if (alpha == 1) {\r\n                            verticesArray.length = 0;\r\n                            break;\r\n                        }\r\n                        var vertices_1 = Utils.setArraySize(verticesArray, vertexCount);\r\n                        if (vertexAttachment.bones == null) {\r\n                            // Unweighted vertex positions.\r\n                            var setupVertices = vertexAttachment.vertices;\r\n                            for (var i = 0; i < vertexCount; i++)\r\n                                vertices_1[i] += (setupVertices[i] - vertices_1[i]) * alpha;\r\n                        }\r\n                        else {\r\n                            // Weighted deform offsets.\r\n                            alpha = 1 - alpha;\r\n                            for (var i = 0; i < vertexCount; i++)\r\n                                vertices_1[i] *= alpha;\r\n                        }\r\n                }\r\n                return;\r\n            }\r\n            var vertices = Utils.setArraySize(verticesArray, vertexCount);\r\n            if (time >= frames[frames.length - 1]) { // Time is after last frame.\r\n                var lastVertices = frameVertices[frames.length - 1];\r\n                if (alpha == 1) {\r\n                    if (blend == exports.MixBlend.add) {\r\n                        var vertexAttachment = slotAttachment;\r\n                        if (vertexAttachment.bones == null) {\r\n                            // Unweighted vertex positions, with alpha.\r\n                            var setupVertices = vertexAttachment.vertices;\r\n                            for (var i = 0; i < vertexCount; i++) {\r\n                                vertices[i] += lastVertices[i] - setupVertices[i];\r\n                            }\r\n                        }\r\n                        else {\r\n                            // Weighted deform offsets, with alpha.\r\n                            for (var i = 0; i < vertexCount; i++)\r\n                                vertices[i] += lastVertices[i];\r\n                        }\r\n                    }\r\n                    else {\r\n                        Utils.arrayCopy(lastVertices, 0, vertices, 0, vertexCount);\r\n                    }\r\n                }\r\n                else {\r\n                    switch (blend) {\r\n                        case exports.MixBlend.setup: {\r\n                            var vertexAttachment_1 = slotAttachment;\r\n                            if (vertexAttachment_1.bones == null) {\r\n                                // Unweighted vertex positions, with alpha.\r\n                                var setupVertices = vertexAttachment_1.vertices;\r\n                                for (var i = 0; i < vertexCount; i++) {\r\n                                    var setup = setupVertices[i];\r\n                                    vertices[i] = setup + (lastVertices[i] - setup) * alpha;\r\n                                }\r\n                            }\r\n                            else {\r\n                                // Weighted deform offsets, with alpha.\r\n                                for (var i = 0; i < vertexCount; i++)\r\n                                    vertices[i] = lastVertices[i] * alpha;\r\n                            }\r\n                            break;\r\n                        }\r\n                        case exports.MixBlend.first:\r\n                        case exports.MixBlend.replace:\r\n                            for (var i = 0; i < vertexCount; i++)\r\n                                vertices[i] += (lastVertices[i] - vertices[i]) * alpha;\r\n                        case exports.MixBlend.add:\r\n                            var vertexAttachment = slotAttachment;\r\n                            if (vertexAttachment.bones == null) {\r\n                                // Unweighted vertex positions, with alpha.\r\n                                var setupVertices = vertexAttachment.vertices;\r\n                                for (var i = 0; i < vertexCount; i++) {\r\n                                    vertices[i] += (lastVertices[i] - setupVertices[i]) * alpha;\r\n                                }\r\n                            }\r\n                            else {\r\n                                // Weighted deform offsets, with alpha.\r\n                                for (var i = 0; i < vertexCount; i++)\r\n                                    vertices[i] += lastVertices[i] * alpha;\r\n                            }\r\n                    }\r\n                }\r\n                return;\r\n            }\r\n            // Interpolate between the previous frame and the current frame.\r\n            var frame = Animation$1.binarySearch(frames, time);\r\n            var prevVertices = frameVertices[frame - 1];\r\n            var nextVertices = frameVertices[frame];\r\n            var frameTime = frames[frame];\r\n            var percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\r\n            if (alpha == 1) {\r\n                if (blend == exports.MixBlend.add) {\r\n                    var vertexAttachment = slotAttachment;\r\n                    if (vertexAttachment.bones == null) {\r\n                        // Unweighted vertex positions, with alpha.\r\n                        var setupVertices = vertexAttachment.vertices;\r\n                        for (var i = 0; i < vertexCount; i++) {\r\n                            var prev = prevVertices[i];\r\n                            vertices[i] += prev + (nextVertices[i] - prev) * percent - setupVertices[i];\r\n                        }\r\n                    }\r\n                    else {\r\n                        // Weighted deform offsets, with alpha.\r\n                        for (var i = 0; i < vertexCount; i++) {\r\n                            var prev = prevVertices[i];\r\n                            vertices[i] += prev + (nextVertices[i] - prev) * percent;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    for (var i = 0; i < vertexCount; i++) {\r\n                        var prev = prevVertices[i];\r\n                        vertices[i] = prev + (nextVertices[i] - prev) * percent;\r\n                    }\r\n                }\r\n            }\r\n            else {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup: {\r\n                        var vertexAttachment_2 = slotAttachment;\r\n                        if (vertexAttachment_2.bones == null) {\r\n                            // Unweighted vertex positions, with alpha.\r\n                            var setupVertices = vertexAttachment_2.vertices;\r\n                            for (var i = 0; i < vertexCount; i++) {\r\n                                var prev = prevVertices[i], setup = setupVertices[i];\r\n                                vertices[i] = setup + (prev + (nextVertices[i] - prev) * percent - setup) * alpha;\r\n                            }\r\n                        }\r\n                        else {\r\n                            // Weighted deform offsets, with alpha.\r\n                            for (var i = 0; i < vertexCount; i++) {\r\n                                var prev = prevVertices[i];\r\n                                vertices[i] = (prev + (nextVertices[i] - prev) * percent) * alpha;\r\n                            }\r\n                        }\r\n                        break;\r\n                    }\r\n                    case exports.MixBlend.first:\r\n                    case exports.MixBlend.replace:\r\n                        for (var i = 0; i < vertexCount; i++) {\r\n                            var prev = prevVertices[i];\r\n                            vertices[i] += (prev + (nextVertices[i] - prev) * percent - vertices[i]) * alpha;\r\n                        }\r\n                        break;\r\n                    case exports.MixBlend.add:\r\n                        var vertexAttachment = slotAttachment;\r\n                        if (vertexAttachment.bones == null) {\r\n                            // Unweighted vertex positions, with alpha.\r\n                            var setupVertices = vertexAttachment.vertices;\r\n                            for (var i = 0; i < vertexCount; i++) {\r\n                                var prev = prevVertices[i];\r\n                                vertices[i] += (prev + (nextVertices[i] - prev) * percent - setupVertices[i]) * alpha;\r\n                            }\r\n                        }\r\n                        else {\r\n                            // Weighted deform offsets, with alpha.\r\n                            for (var i = 0; i < vertexCount; i++) {\r\n                                var prev = prevVertices[i];\r\n                                vertices[i] += (prev + (nextVertices[i] - prev) * percent) * alpha;\r\n                            }\r\n                        }\r\n                }\r\n            }\r\n        };\r\n        return DeformTimeline;\r\n    }(CurveTimeline$1));\r\n    /**\r\n     * @public\r\n     */\r\n    var EventTimeline$1 = /** @class */ (function () {\r\n        function EventTimeline(frameCount) {\r\n            this.frames = Utils.newFloatArray(frameCount);\r\n            this.events = new Array(frameCount);\r\n        }\r\n        EventTimeline.prototype.getPropertyId = function () {\r\n            return TimelineType.event << 24;\r\n        };\r\n        EventTimeline.prototype.getFrameCount = function () {\r\n            return this.frames.length;\r\n        };\r\n        /** Sets the time of the specified keyframe. */\r\n        EventTimeline.prototype.setFrame = function (frameIndex, event) {\r\n            this.frames[frameIndex] = event.time;\r\n            this.events[frameIndex] = event;\r\n        };\r\n        /** Fires events for frames > lastTime and <= time. */\r\n        EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            if (firedEvents == null)\r\n                return;\r\n            var frames = this.frames;\r\n            var frameCount = this.frames.length;\r\n            if (lastTime > time) { // Fire events after last time for looped animations.\r\n                this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\r\n                lastTime = -1;\r\n            }\r\n            else if (lastTime >= frames[frameCount - 1]) // Last time is after last frame.\r\n                return;\r\n            if (time < frames[0])\r\n                return; // Time is before first frame.\r\n            var frame = 0;\r\n            if (lastTime < frames[0])\r\n                frame = 0;\r\n            else {\r\n                frame = Animation$1.binarySearch(frames, lastTime);\r\n                var frameTime = frames[frame];\r\n                while (frame > 0) { // Fire multiple events with the same frame.\r\n                    if (frames[frame - 1] != frameTime)\r\n                        break;\r\n                    frame--;\r\n                }\r\n            }\r\n            for (; frame < frameCount && time >= frames[frame]; frame++)\r\n                firedEvents.push(this.events[frame]);\r\n        };\r\n        return EventTimeline;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var DrawOrderTimeline$1 = /** @class */ (function () {\r\n        function DrawOrderTimeline(frameCount) {\r\n            this.frames = Utils.newFloatArray(frameCount);\r\n            this.drawOrders = new Array(frameCount);\r\n        }\r\n        DrawOrderTimeline.prototype.getPropertyId = function () {\r\n            return TimelineType.drawOrder << 24;\r\n        };\r\n        DrawOrderTimeline.prototype.getFrameCount = function () {\r\n            return this.frames.length;\r\n        };\r\n        /** Sets the time of the specified keyframe.\r\n         * @param drawOrder May be null to use bind pose draw order. */\r\n        DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) {\r\n            this.frames[frameIndex] = time;\r\n            this.drawOrders[frameIndex] = drawOrder;\r\n        };\r\n        DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            var drawOrder = skeleton.drawOrder;\r\n            var slots = skeleton.slots;\r\n            if (direction == exports.MixDirection.mixOut && blend == exports.MixBlend.setup) {\r\n                Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n                return;\r\n            }\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                if (blend == exports.MixBlend.setup || blend == exports.MixBlend.first)\r\n                    Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n                return;\r\n            }\r\n            var frame = 0;\r\n            if (time >= frames[frames.length - 1]) // Time is after last frame.\r\n                frame = frames.length - 1;\r\n            else\r\n                frame = Animation$1.binarySearch(frames, time) - 1;\r\n            var drawOrderToSetupIndex = this.drawOrders[frame];\r\n            if (drawOrderToSetupIndex == null)\r\n                Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\r\n            else {\r\n                for (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\r\n                    drawOrder[i] = slots[drawOrderToSetupIndex[i]];\r\n            }\r\n        };\r\n        return DrawOrderTimeline;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var IkConstraintTimeline$1 = /** @class */ (function (_super) {\r\n        __extends$2(IkConstraintTimeline, _super);\r\n        function IkConstraintTimeline(frameCount) {\r\n            var _this = _super.call(this, frameCount) || this;\r\n            _this.frames = Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\r\n            return _this;\r\n        }\r\n        IkConstraintTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex;\r\n        };\r\n        /** Sets the time, mix and bend direction of the specified keyframe. */\r\n        IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, bendDirection, compress, stretch) {\r\n            frameIndex *= IkConstraintTimeline.ENTRIES;\r\n            this.frames[frameIndex] = time;\r\n            this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\r\n            this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\r\n            this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0;\r\n            this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0;\r\n        };\r\n        IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            var frames = this.frames;\r\n            var constraint = skeleton.ikConstraints[this.ikConstraintIndex];\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        constraint.mix = constraint.data.mix;\r\n                        constraint.bendDirection = constraint.data.bendDirection;\r\n                        constraint.compress = constraint.data.compress;\r\n                        constraint.stretch = constraint.data.stretch;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\r\n                        constraint.bendDirection = constraint.data.bendDirection;\r\n                        constraint.compress = constraint.data.compress;\r\n                        constraint.stretch = constraint.data.stretch;\r\n                }\r\n                return;\r\n            }\r\n            if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) { // Time is after last frame.\r\n                if (blend == exports.MixBlend.setup) {\r\n                    constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\r\n                    if (direction == exports.MixDirection.mixOut) {\r\n                        constraint.bendDirection = constraint.data.bendDirection;\r\n                        constraint.compress = constraint.data.compress;\r\n                        constraint.stretch = constraint.data.stretch;\r\n                    }\r\n                    else {\r\n                        constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n                        constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n                        constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n                    }\r\n                }\r\n                else {\r\n                    constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\r\n                    if (direction == exports.MixDirection.mixIn) {\r\n                        constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n                        constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n                        constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n                    }\r\n                }\r\n                return;\r\n            }\r\n            // Interpolate between the previous frame and the current frame.\r\n            var frame = Animation$1.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\r\n            var mix = frames[frame + IkConstraintTimeline.PREV_MIX];\r\n            var frameTime = frames[frame];\r\n            var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\r\n            if (blend == exports.MixBlend.setup) {\r\n                constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\r\n                if (direction == exports.MixDirection.mixOut) {\r\n                    constraint.bendDirection = constraint.data.bendDirection;\r\n                    constraint.compress = constraint.data.compress;\r\n                    constraint.stretch = constraint.data.stretch;\r\n                }\r\n                else {\r\n                    constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n                    constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n                    constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n                }\r\n            }\r\n            else {\r\n                constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\r\n                if (direction == exports.MixDirection.mixIn) {\r\n                    constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n                    constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n                    constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n                }\r\n            }\r\n        };\r\n        IkConstraintTimeline.ENTRIES = 5;\r\n        IkConstraintTimeline.PREV_TIME = -5;\r\n        IkConstraintTimeline.PREV_MIX = -4;\r\n        IkConstraintTimeline.PREV_BEND_DIRECTION = -3;\r\n        IkConstraintTimeline.PREV_COMPRESS = -2;\r\n        IkConstraintTimeline.PREV_STRETCH = -1;\r\n        IkConstraintTimeline.MIX = 1;\r\n        IkConstraintTimeline.BEND_DIRECTION = 2;\r\n        IkConstraintTimeline.COMPRESS = 3;\r\n        IkConstraintTimeline.STRETCH = 4;\r\n        return IkConstraintTimeline;\r\n    }(CurveTimeline$1));\r\n    /**\r\n     * @public\r\n     */\r\n    var TransformConstraintTimeline$1 = /** @class */ (function (_super) {\r\n        __extends$2(TransformConstraintTimeline, _super);\r\n        function TransformConstraintTimeline(frameCount) {\r\n            var _this = _super.call(this, frameCount) || this;\r\n            _this.frames = Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\r\n            return _this;\r\n        }\r\n        TransformConstraintTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex;\r\n        };\r\n        /** Sets the time and mixes of the specified keyframe. */\r\n        TransformConstraintTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix) {\r\n            frameIndex *= TransformConstraintTimeline.ENTRIES;\r\n            this.frames[frameIndex] = time;\r\n            this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\r\n            this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\r\n            this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\r\n            this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\r\n        };\r\n        TransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            var frames = this.frames;\r\n            var constraint = skeleton.transformConstraints[this.transformConstraintIndex];\r\n            if (time < frames[0]) {\r\n                var data = constraint.data;\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        constraint.rotateMix = data.rotateMix;\r\n                        constraint.translateMix = data.translateMix;\r\n                        constraint.scaleMix = data.scaleMix;\r\n                        constraint.shearMix = data.shearMix;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\r\n                        constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\r\n                        constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\r\n                        constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var rotate = 0, translate = 0, scale = 0, shear = 0;\r\n            if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) { // Time is after last frame.\r\n                var i = frames.length;\r\n                rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\r\n                translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\r\n                scale = frames[i + TransformConstraintTimeline.PREV_SCALE];\r\n                shear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\r\n            }\r\n            else {\r\n                // Interpolate between the previous frame and the current frame.\r\n                var frame = Animation$1.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\r\n                rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\r\n                translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\r\n                scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\r\n                shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\r\n                var frameTime = frames[frame];\r\n                var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\r\n                rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\r\n                translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\r\n                scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\r\n                shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\r\n            }\r\n            if (blend == exports.MixBlend.setup) {\r\n                var data = constraint.data;\r\n                constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\r\n                constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\r\n                constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\r\n                constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\r\n            }\r\n            else {\r\n                constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n                constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n                constraint.scaleMix += (scale - constraint.scaleMix) * alpha;\r\n                constraint.shearMix += (shear - constraint.shearMix) * alpha;\r\n            }\r\n        };\r\n        TransformConstraintTimeline.ENTRIES = 5;\r\n        TransformConstraintTimeline.PREV_TIME = -5;\r\n        TransformConstraintTimeline.PREV_ROTATE = -4;\r\n        TransformConstraintTimeline.PREV_TRANSLATE = -3;\r\n        TransformConstraintTimeline.PREV_SCALE = -2;\r\n        TransformConstraintTimeline.PREV_SHEAR = -1;\r\n        TransformConstraintTimeline.ROTATE = 1;\r\n        TransformConstraintTimeline.TRANSLATE = 2;\r\n        TransformConstraintTimeline.SCALE = 3;\r\n        TransformConstraintTimeline.SHEAR = 4;\r\n        return TransformConstraintTimeline;\r\n    }(CurveTimeline$1));\r\n    /**\r\n     * @public\r\n     */\r\n    var PathConstraintPositionTimeline$1 = /** @class */ (function (_super) {\r\n        __extends$2(PathConstraintPositionTimeline, _super);\r\n        function PathConstraintPositionTimeline(frameCount) {\r\n            var _this = _super.call(this, frameCount) || this;\r\n            _this.frames = Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\r\n            return _this;\r\n        }\r\n        PathConstraintPositionTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex;\r\n        };\r\n        /** Sets the time and value of the specified keyframe. */\r\n        PathConstraintPositionTimeline.prototype.setFrame = function (frameIndex, time, value) {\r\n            frameIndex *= PathConstraintPositionTimeline.ENTRIES;\r\n            this.frames[frameIndex] = time;\r\n            this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\r\n        };\r\n        PathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            var frames = this.frames;\r\n            var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        constraint.position = constraint.data.position;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        constraint.position += (constraint.data.position - constraint.position) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var position = 0;\r\n            if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES]) // Time is after last frame.\r\n                position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\r\n            else {\r\n                // Interpolate between the previous frame and the current frame.\r\n                var frame = Animation$1.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\r\n                position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\r\n                var frameTime = frames[frame];\r\n                var percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\r\n                position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\r\n            }\r\n            if (blend == exports.MixBlend.setup)\r\n                constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\r\n            else\r\n                constraint.position += (position - constraint.position) * alpha;\r\n        };\r\n        PathConstraintPositionTimeline.ENTRIES = 2;\r\n        PathConstraintPositionTimeline.PREV_TIME = -2;\r\n        PathConstraintPositionTimeline.PREV_VALUE = -1;\r\n        PathConstraintPositionTimeline.VALUE = 1;\r\n        return PathConstraintPositionTimeline;\r\n    }(CurveTimeline$1));\r\n    /**\r\n     * @public\r\n     */\r\n    var PathConstraintSpacingTimeline$1 = /** @class */ (function (_super) {\r\n        __extends$2(PathConstraintSpacingTimeline, _super);\r\n        function PathConstraintSpacingTimeline(frameCount) {\r\n            return _super.call(this, frameCount) || this;\r\n        }\r\n        PathConstraintSpacingTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex;\r\n        };\r\n        PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            var frames = this.frames;\r\n            var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        constraint.spacing = constraint.data.spacing;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var spacing = 0;\r\n            if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES]) // Time is after last frame.\r\n                spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\r\n            else {\r\n                // Interpolate between the previous frame and the current frame.\r\n                var frame = Animation$1.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\r\n                spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\r\n                var frameTime = frames[frame];\r\n                var percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\r\n                spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\r\n            }\r\n            if (blend == exports.MixBlend.setup)\r\n                constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\r\n            else\r\n                constraint.spacing += (spacing - constraint.spacing) * alpha;\r\n        };\r\n        return PathConstraintSpacingTimeline;\r\n    }(PathConstraintPositionTimeline$1));\r\n    /**\r\n     * @public\r\n     */\r\n    var PathConstraintMixTimeline$1 = /** @class */ (function (_super) {\r\n        __extends$2(PathConstraintMixTimeline, _super);\r\n        function PathConstraintMixTimeline(frameCount) {\r\n            var _this = _super.call(this, frameCount) || this;\r\n            _this.frames = Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\r\n            return _this;\r\n        }\r\n        PathConstraintMixTimeline.prototype.getPropertyId = function () {\r\n            return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex;\r\n        };\r\n        /** Sets the time and mixes of the specified keyframe. */\r\n        PathConstraintMixTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix) {\r\n            frameIndex *= PathConstraintMixTimeline.ENTRIES;\r\n            this.frames[frameIndex] = time;\r\n            this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\r\n            this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\r\n        };\r\n        PathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            var frames = this.frames;\r\n            var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        constraint.rotateMix = constraint.data.rotateMix;\r\n                        constraint.translateMix = constraint.data.translateMix;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\r\n                        constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var rotate = 0, translate = 0;\r\n            if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) { // Time is after last frame.\r\n                rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\r\n                translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n            }\r\n            else {\r\n                // Interpolate between the previous frame and the current frame.\r\n                var frame = Animation$1.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\r\n                rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\r\n                translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n                var frameTime = frames[frame];\r\n                var percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\r\n                rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\r\n                translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\r\n            }\r\n            if (blend == exports.MixBlend.setup) {\r\n                constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\r\n                constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\r\n            }\r\n            else {\r\n                constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n                constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n            }\r\n        };\r\n        PathConstraintMixTimeline.ENTRIES = 3;\r\n        PathConstraintMixTimeline.PREV_TIME = -3;\r\n        PathConstraintMixTimeline.PREV_ROTATE = -2;\r\n        PathConstraintMixTimeline.PREV_TRANSLATE = -1;\r\n        PathConstraintMixTimeline.ROTATE = 1;\r\n        PathConstraintMixTimeline.TRANSLATE = 2;\r\n        return PathConstraintMixTimeline;\r\n    }(CurveTimeline$1));\n\n    /**\r\n     * @public\r\n     */\r\n    var AnimationState$1 = /** @class */ (function () {\r\n        function AnimationState(data) {\r\n            this.tracks = new Array();\r\n            this.events = new Array();\r\n            this.listeners = new Array();\r\n            this.queue = new EventQueue$1(this);\r\n            this.propertyIDs = new IntSet();\r\n            this.animationsChanged = false;\r\n            this.timeScale = 1;\r\n            this.trackEntryPool = new Pool(function () { return new TrackEntry$1(); });\r\n            this.data = data;\r\n        }\r\n        AnimationState.prototype.update = function (delta) {\r\n            delta *= this.timeScale;\r\n            var tracks = this.tracks;\r\n            for (var i = 0, n = tracks.length; i < n; i++) {\r\n                var current = tracks[i];\r\n                if (current == null)\r\n                    continue;\r\n                current.animationLast = current.nextAnimationLast;\r\n                current.trackLast = current.nextTrackLast;\r\n                var currentDelta = delta * current.timeScale;\r\n                if (current.delay > 0) {\r\n                    current.delay -= currentDelta;\r\n                    if (current.delay > 0)\r\n                        continue;\r\n                    currentDelta = -current.delay;\r\n                    current.delay = 0;\r\n                }\r\n                var next = current.next;\r\n                if (next != null) {\r\n                    // When the next entry's delay is passed, change to the next entry, preserving leftover time.\r\n                    var nextTime = current.trackLast - next.delay;\r\n                    if (nextTime >= 0) {\r\n                        next.delay = 0;\r\n                        next.trackTime = current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\r\n                        current.trackTime += currentDelta;\r\n                        this.setCurrent(i, next, true);\r\n                        while (next.mixingFrom != null) {\r\n                            next.mixTime += delta;\r\n                            next = next.mixingFrom;\r\n                        }\r\n                        continue;\r\n                    }\r\n                }\r\n                else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\r\n                    tracks[i] = null;\r\n                    this.queue.end(current);\r\n                    this.disposeNext(current);\r\n                    continue;\r\n                }\r\n                if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\r\n                    // End mixing from entries once all have completed.\r\n                    var from = current.mixingFrom;\r\n                    current.mixingFrom = null;\r\n                    if (from != null)\r\n                        from.mixingTo = null;\r\n                    while (from != null) {\r\n                        this.queue.end(from);\r\n                        from = from.mixingFrom;\r\n                    }\r\n                }\r\n                current.trackTime += currentDelta;\r\n            }\r\n            this.queue.drain();\r\n        };\r\n        AnimationState.prototype.updateMixingFrom = function (to, delta) {\r\n            var from = to.mixingFrom;\r\n            if (from == null)\r\n                return true;\r\n            var finished = this.updateMixingFrom(from, delta);\r\n            from.animationLast = from.nextAnimationLast;\r\n            from.trackLast = from.nextTrackLast;\r\n            // Require mixTime > 0 to ensure the mixing from entry was applied at least once.\r\n            if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\r\n                // Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame).\r\n                if (from.totalAlpha == 0 || to.mixDuration == 0) {\r\n                    to.mixingFrom = from.mixingFrom;\r\n                    if (from.mixingFrom != null)\r\n                        from.mixingFrom.mixingTo = to;\r\n                    to.interruptAlpha = from.interruptAlpha;\r\n                    this.queue.end(from);\r\n                }\r\n                return finished;\r\n            }\r\n            from.trackTime += delta * from.timeScale;\r\n            to.mixTime += delta;\r\n            return false;\r\n        };\r\n        AnimationState.prototype.apply = function (skeleton) {\r\n            if (skeleton == null)\r\n                throw new Error(\"skeleton cannot be null.\");\r\n            if (this.animationsChanged)\r\n                this._animationsChanged();\r\n            var events = this.events;\r\n            var tracks = this.tracks;\r\n            var applied = false;\r\n            for (var i = 0, n = tracks.length; i < n; i++) {\r\n                var current = tracks[i];\r\n                if (current == null || current.delay > 0)\r\n                    continue;\r\n                applied = true;\r\n                var blend = i == 0 ? exports.MixBlend.first : current.mixBlend;\r\n                // Apply mixing from entries first.\r\n                var mix = current.alpha;\r\n                if (current.mixingFrom != null)\r\n                    mix *= this.applyMixingFrom(current, skeleton, blend);\r\n                else if (current.trackTime >= current.trackEnd && current.next == null)\r\n                    mix = 0;\r\n                // Apply current entry.\r\n                var animationLast = current.animationLast, animationTime = current.getAnimationTime();\r\n                var timelineCount = current.animation.timelines.length;\r\n                var timelines = current.animation.timelines;\r\n                if ((i == 0 && mix == 1) || blend == exports.MixBlend.add) {\r\n                    for (var ii = 0; ii < timelineCount; ii++) {\r\n                        // Fixes issue #302 on IOS9 where mix, blend sometimes became undefined and caused assets\r\n                        // to sometimes stop rendering when using color correction, as their RGBA values become NaN.\r\n                        // (https://github.com/pixijs/pixi-spine/issues/302)\r\n                        Utils.webkit602BugfixHelper(mix, blend);\r\n                        timelines[ii].apply(skeleton, animationLast, animationTime, events, mix, blend, exports.MixDirection.mixIn);\r\n                    }\r\n                }\r\n                else {\r\n                    var timelineMode = current.timelineMode;\r\n                    var firstFrame = current.timelinesRotation.length == 0;\r\n                    if (firstFrame)\r\n                        Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\r\n                    var timelinesRotation = current.timelinesRotation;\r\n                    for (var ii = 0; ii < timelineCount; ii++) {\r\n                        var timeline = timelines[ii];\r\n                        var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : exports.MixBlend.setup;\r\n                        if (timeline instanceof RotateTimeline$1) {\r\n                            this.applyRotateTimeline(timeline, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);\r\n                        }\r\n                        else {\r\n                            // This fixes the WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109\r\n                            Utils.webkit602BugfixHelper(mix, blend);\r\n                            timeline.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, exports.MixDirection.mixIn);\r\n                        }\r\n                    }\r\n                }\r\n                this.queueEvents(current, animationTime);\r\n                events.length = 0;\r\n                current.nextAnimationLast = animationTime;\r\n                current.nextTrackLast = current.trackTime;\r\n            }\r\n            this.queue.drain();\r\n            return applied;\r\n        };\r\n        AnimationState.prototype.applyMixingFrom = function (to, skeleton, blend) {\r\n            var from = to.mixingFrom;\r\n            if (from.mixingFrom != null)\r\n                this.applyMixingFrom(from, skeleton, blend);\r\n            var mix = 0;\r\n            if (to.mixDuration == 0) { // Single frame mix to undo mixingFrom changes.\r\n                mix = 1;\r\n                if (blend == exports.MixBlend.first)\r\n                    blend = exports.MixBlend.setup;\r\n            }\r\n            else {\r\n                mix = to.mixTime / to.mixDuration;\r\n                if (mix > 1)\r\n                    mix = 1;\r\n                if (blend != exports.MixBlend.first)\r\n                    blend = from.mixBlend;\r\n            }\r\n            var events = mix < from.eventThreshold ? this.events : null;\r\n            var attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\r\n            var animationLast = from.animationLast, animationTime = from.getAnimationTime();\r\n            var timelineCount = from.animation.timelines.length;\r\n            var timelines = from.animation.timelines;\r\n            var alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\r\n            if (blend == exports.MixBlend.add) {\r\n                for (var i = 0; i < timelineCount; i++)\r\n                    timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, exports.MixDirection.mixOut);\r\n            }\r\n            else {\r\n                var timelineMode = from.timelineMode;\r\n                var timelineHoldMix = from.timelineHoldMix;\r\n                var firstFrame = from.timelinesRotation.length == 0;\r\n                if (firstFrame)\r\n                    Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\r\n                var timelinesRotation = from.timelinesRotation;\r\n                from.totalAlpha = 0;\r\n                for (var i = 0; i < timelineCount; i++) {\r\n                    var timeline = timelines[i];\r\n                    var direction = exports.MixDirection.mixOut;\r\n                    var timelineBlend = void 0;\r\n                    var alpha = 0;\r\n                    switch (timelineMode[i]) {\r\n                        case AnimationState.SUBSEQUENT:\r\n                            if (!attachments && timeline instanceof AttachmentTimeline$1)\r\n                                continue;\r\n                            if (!drawOrder && timeline instanceof DrawOrderTimeline$1)\r\n                                continue;\r\n                            timelineBlend = blend;\r\n                            alpha = alphaMix;\r\n                            break;\r\n                        case AnimationState.FIRST:\r\n                            timelineBlend = exports.MixBlend.setup;\r\n                            alpha = alphaMix;\r\n                            break;\r\n                        case AnimationState.HOLD:\r\n                            timelineBlend = exports.MixBlend.setup;\r\n                            alpha = alphaHold;\r\n                            break;\r\n                        default:\r\n                            timelineBlend = exports.MixBlend.setup;\r\n                            var holdMix = timelineHoldMix[i];\r\n                            alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\r\n                            break;\r\n                    }\r\n                    from.totalAlpha += alpha;\r\n                    if (timeline instanceof RotateTimeline$1)\r\n                        this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);\r\n                    else {\r\n                        // This fixes the WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109\r\n                        Utils.webkit602BugfixHelper(alpha, blend);\r\n                        if (timelineBlend == exports.MixBlend.setup) {\r\n                            if (timeline instanceof AttachmentTimeline$1) {\r\n                                if (attachments)\r\n                                    direction = exports.MixDirection.mixOut;\r\n                            }\r\n                            else if (timeline instanceof DrawOrderTimeline$1) {\r\n                                if (drawOrder)\r\n                                    direction = exports.MixDirection.mixOut;\r\n                            }\r\n                        }\r\n                        timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);\r\n                    }\r\n                }\r\n            }\r\n            if (to.mixDuration > 0)\r\n                this.queueEvents(from, animationTime);\r\n            this.events.length = 0;\r\n            from.nextAnimationLast = animationTime;\r\n            from.nextTrackLast = from.trackTime;\r\n            return mix;\r\n        };\r\n        AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\r\n            if (firstFrame)\r\n                timelinesRotation[i] = 0;\r\n            if (alpha == 1) {\r\n                timeline.apply(skeleton, 0, time, null, 1, blend, exports.MixDirection.mixIn);\r\n                return;\r\n            }\r\n            var rotateTimeline = timeline;\r\n            var frames = rotateTimeline.frames;\r\n            var bone = skeleton.bones[rotateTimeline.boneIndex];\r\n            var r1 = 0, r2 = 0;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        bone.rotation = bone.data.rotation;\r\n                    default:\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        r1 = bone.rotation;\r\n                        r2 = bone.data.rotation;\r\n                }\r\n            }\r\n            else {\r\n                r1 = blend == exports.MixBlend.setup ? bone.data.rotation : bone.rotation;\r\n                if (time >= frames[frames.length - RotateTimeline$1.ENTRIES]) // Time is after last frame.\r\n                    r2 = bone.data.rotation + frames[frames.length + RotateTimeline$1.PREV_ROTATION];\r\n                else {\r\n                    // Interpolate between the previous frame and the current frame.\r\n                    var frame = Animation$1.binarySearch(frames, time, RotateTimeline$1.ENTRIES);\r\n                    var prevRotation = frames[frame + RotateTimeline$1.PREV_ROTATION];\r\n                    var frameTime = frames[frame];\r\n                    var percent = rotateTimeline.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline$1.PREV_TIME] - frameTime));\r\n                    r2 = frames[frame + RotateTimeline$1.ROTATION] - prevRotation;\r\n                    r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n                    r2 = prevRotation + r2 * percent + bone.data.rotation;\r\n                    r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n                }\r\n            }\r\n            // Mix between rotations using the direction of the shortest route on the first frame while detecting crosses.\r\n            var total = 0, diff = r2 - r1;\r\n            diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\r\n            if (diff == 0) {\r\n                total = timelinesRotation[i];\r\n            }\r\n            else {\r\n                var lastTotal = 0, lastDiff = 0;\r\n                if (firstFrame) {\r\n                    lastTotal = 0;\r\n                    lastDiff = diff;\r\n                }\r\n                else {\r\n                    lastTotal = timelinesRotation[i]; // Angle and direction of mix, including loops.\r\n                    lastDiff = timelinesRotation[i + 1]; // Difference between bones.\r\n                }\r\n                var current = diff > 0, dir = lastTotal >= 0;\r\n                // Detect cross at 0 (not 180).\r\n                if (MathUtils.signum(lastDiff) != MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\r\n                    // A cross after a 360 rotation is a loop.\r\n                    if (Math.abs(lastTotal) > 180)\r\n                        lastTotal += 360 * MathUtils.signum(lastTotal);\r\n                    dir = current;\r\n                }\r\n                total = diff + lastTotal - lastTotal % 360; // Store loops as part of lastTotal.\r\n                if (dir != current)\r\n                    total += 360 * MathUtils.signum(lastTotal);\r\n                timelinesRotation[i] = total;\r\n            }\r\n            timelinesRotation[i + 1] = diff;\r\n            r1 += total * alpha;\r\n            bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\r\n        };\r\n        AnimationState.prototype.queueEvents = function (entry, animationTime) {\r\n            var animationStart = entry.animationStart, animationEnd = entry.animationEnd;\r\n            var duration = animationEnd - animationStart;\r\n            var trackLastWrapped = entry.trackLast % duration;\r\n            // Queue events before complete.\r\n            var events = this.events;\r\n            var i = 0, n = events.length;\r\n            for (; i < n; i++) {\r\n                var event_1 = events[i];\r\n                if (event_1.time < trackLastWrapped)\r\n                    break;\r\n                if (event_1.time > animationEnd)\r\n                    continue; // Discard events outside animation start/end.\r\n                this.queue.event(entry, event_1);\r\n            }\r\n            // Queue complete if completed a loop iteration or the animation.\r\n            var complete = false;\r\n            if (entry.loop)\r\n                complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\r\n            else\r\n                complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\r\n            if (complete)\r\n                this.queue.complete(entry);\r\n            // Queue events after complete.\r\n            for (; i < n; i++) {\r\n                var event_2 = events[i];\r\n                if (event_2.time < animationStart)\r\n                    continue; // Discard events outside animation start/end.\r\n                this.queue.event(entry, events[i]);\r\n            }\r\n        };\r\n        AnimationState.prototype.clearTracks = function () {\r\n            var oldDrainDisabled = this.queue.drainDisabled;\r\n            this.queue.drainDisabled = true;\r\n            for (var i = 0, n = this.tracks.length; i < n; i++)\r\n                this.clearTrack(i);\r\n            this.tracks.length = 0;\r\n            this.queue.drainDisabled = oldDrainDisabled;\r\n            this.queue.drain();\r\n        };\r\n        AnimationState.prototype.clearTrack = function (trackIndex) {\r\n            if (trackIndex >= this.tracks.length)\r\n                return;\r\n            var current = this.tracks[trackIndex];\r\n            if (current == null)\r\n                return;\r\n            this.queue.end(current);\r\n            this.disposeNext(current);\r\n            var entry = current;\r\n            while (true) {\r\n                var from = entry.mixingFrom;\r\n                if (from == null)\r\n                    break;\r\n                this.queue.end(from);\r\n                entry.mixingFrom = null;\r\n                entry.mixingTo = null;\r\n                entry = from;\r\n            }\r\n            this.tracks[current.trackIndex] = null;\r\n            this.queue.drain();\r\n        };\r\n        AnimationState.prototype.setCurrent = function (index, current, interrupt) {\r\n            var from = this.expandToIndex(index);\r\n            this.tracks[index] = current;\r\n            if (from != null) {\r\n                if (interrupt)\r\n                    this.queue.interrupt(from);\r\n                current.mixingFrom = from;\r\n                from.mixingTo = current;\r\n                current.mixTime = 0;\r\n                // Store the interrupted mix percentage.\r\n                if (from.mixingFrom != null && from.mixDuration > 0)\r\n                    current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\r\n                from.timelinesRotation.length = 0; // Reset rotation for mixing out, in case entry was mixed in.\r\n            }\r\n            this.queue.start(current);\r\n        };\r\n        AnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) {\r\n            var animation = this.data.skeletonData.findAnimation(animationName);\r\n            if (animation == null)\r\n                throw new Error(\"Animation not found: \" + animationName);\r\n            return this.setAnimationWith(trackIndex, animation, loop);\r\n        };\r\n        AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) {\r\n            if (animation == null)\r\n                throw new Error(\"animation cannot be null.\");\r\n            var interrupt = true;\r\n            var current = this.expandToIndex(trackIndex);\r\n            if (current != null) {\r\n                if (current.nextTrackLast == -1) {\r\n                    // Don't mix from an entry that was never applied.\r\n                    this.tracks[trackIndex] = current.mixingFrom;\r\n                    this.queue.interrupt(current);\r\n                    this.queue.end(current);\r\n                    this.disposeNext(current);\r\n                    current = current.mixingFrom;\r\n                    interrupt = false;\r\n                }\r\n                else\r\n                    this.disposeNext(current);\r\n            }\r\n            var entry = this.trackEntry(trackIndex, animation, loop, current);\r\n            this.setCurrent(trackIndex, entry, interrupt);\r\n            this.queue.drain();\r\n            return entry;\r\n        };\r\n        AnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) {\r\n            var animation = this.data.skeletonData.findAnimation(animationName);\r\n            if (animation == null)\r\n                throw new Error(\"Animation not found: \" + animationName);\r\n            return this.addAnimationWith(trackIndex, animation, loop, delay);\r\n        };\r\n        AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) {\r\n            if (animation == null)\r\n                throw new Error(\"animation cannot be null.\");\r\n            var last = this.expandToIndex(trackIndex);\r\n            if (last != null) {\r\n                while (last.next != null)\r\n                    last = last.next;\r\n            }\r\n            var entry = this.trackEntry(trackIndex, animation, loop, last);\r\n            if (last == null) {\r\n                this.setCurrent(trackIndex, entry, true);\r\n                this.queue.drain();\r\n            }\r\n            else {\r\n                last.next = entry;\r\n                if (delay <= 0) {\r\n                    var duration = last.animationEnd - last.animationStart;\r\n                    if (duration != 0) {\r\n                        if (last.loop)\r\n                            delay += duration * (1 + ((last.trackTime / duration) | 0));\r\n                        else\r\n                            delay += Math.max(duration, last.trackTime);\r\n                        delay -= this.data.getMix(last.animation, animation);\r\n                    }\r\n                    else\r\n                        delay = last.trackTime;\r\n                }\r\n            }\r\n            entry.delay = delay;\r\n            return entry;\r\n        };\r\n        AnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) {\r\n            var entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\r\n            entry.mixDuration = mixDuration;\r\n            entry.trackEnd = mixDuration;\r\n            return entry;\r\n        };\r\n        AnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) {\r\n            if (delay <= 0)\r\n                delay -= mixDuration;\r\n            var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\r\n            entry.mixDuration = mixDuration;\r\n            entry.trackEnd = mixDuration;\r\n            return entry;\r\n        };\r\n        AnimationState.prototype.setEmptyAnimations = function (mixDuration) {\r\n            var oldDrainDisabled = this.queue.drainDisabled;\r\n            this.queue.drainDisabled = true;\r\n            for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n                var current = this.tracks[i];\r\n                if (current != null)\r\n                    this.setEmptyAnimation(current.trackIndex, mixDuration);\r\n            }\r\n            this.queue.drainDisabled = oldDrainDisabled;\r\n            this.queue.drain();\r\n        };\r\n        AnimationState.prototype.expandToIndex = function (index) {\r\n            if (index < this.tracks.length)\r\n                return this.tracks[index];\r\n            Utils.ensureArrayCapacity(this.tracks, index - this.tracks.length + 1, null);\r\n            this.tracks.length = index + 1;\r\n            return null;\r\n        };\r\n        AnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) {\r\n            var entry = this.trackEntryPool.obtain();\r\n            entry.trackIndex = trackIndex;\r\n            entry.animation = animation;\r\n            entry.loop = loop;\r\n            entry.holdPrevious = false;\r\n            entry.eventThreshold = 0;\r\n            entry.attachmentThreshold = 0;\r\n            entry.drawOrderThreshold = 0;\r\n            entry.animationStart = 0;\r\n            entry.animationEnd = animation.duration;\r\n            entry.animationLast = -1;\r\n            entry.nextAnimationLast = -1;\r\n            entry.delay = 0;\r\n            entry.trackTime = 0;\r\n            entry.trackLast = -1;\r\n            entry.nextTrackLast = -1;\r\n            entry.trackEnd = Number.MAX_VALUE;\r\n            entry.timeScale = 1;\r\n            entry.alpha = 1;\r\n            entry.interruptAlpha = 1;\r\n            entry.mixTime = 0;\r\n            entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\r\n            return entry;\r\n        };\r\n        AnimationState.prototype.disposeNext = function (entry) {\r\n            var next = entry.next;\r\n            while (next != null) {\r\n                this.queue.dispose(next);\r\n                next = next.next;\r\n            }\r\n            entry.next = null;\r\n        };\r\n        AnimationState.prototype._animationsChanged = function () {\r\n            this.animationsChanged = false;\r\n            this.propertyIDs.clear();\r\n            for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n                var entry = this.tracks[i];\r\n                if (entry == null)\r\n                    continue;\r\n                while (entry.mixingFrom != null)\r\n                    entry = entry.mixingFrom;\r\n                do {\r\n                    if (entry.mixingFrom == null || entry.mixBlend != exports.MixBlend.add)\r\n                        this.setTimelineModes(entry);\r\n                    entry = entry.mixingTo;\r\n                } while (entry != null);\r\n            }\r\n        };\r\n        AnimationState.prototype.setTimelineModes = function (entry) {\r\n            var to = entry.mixingTo;\r\n            var timelines = entry.animation.timelines;\r\n            var timelinesCount = entry.animation.timelines.length;\r\n            var timelineMode = Utils.setArraySize(entry.timelineMode, timelinesCount);\r\n            entry.timelineHoldMix.length = 0;\r\n            var timelineDipMix = Utils.setArraySize(entry.timelineHoldMix, timelinesCount);\r\n            var propertyIDs = this.propertyIDs;\r\n            if (to != null && to.holdPrevious) {\r\n                for (var i = 0; i < timelinesCount; i++) {\r\n                    propertyIDs.add(timelines[i].getPropertyId());\r\n                    timelineMode[i] = AnimationState.HOLD;\r\n                }\r\n                return;\r\n            }\r\n            outer: for (var i = 0; i < timelinesCount; i++) {\r\n                var id = timelines[i].getPropertyId();\r\n                if (!propertyIDs.add(id))\r\n                    timelineMode[i] = AnimationState.SUBSEQUENT;\r\n                else if (to == null || !this.hasTimeline(to, id))\r\n                    timelineMode[i] = AnimationState.FIRST;\r\n                else {\r\n                    for (var next = to.mixingTo; next != null; next = next.mixingTo) {\r\n                        if (this.hasTimeline(next, id))\r\n                            continue;\r\n                        if (entry.mixDuration > 0) {\r\n                            timelineMode[i] = AnimationState.HOLD_MIX;\r\n                            timelineDipMix[i] = next;\r\n                            continue outer;\r\n                        }\r\n                        break;\r\n                    }\r\n                    timelineMode[i] = AnimationState.HOLD;\r\n                }\r\n            }\r\n        };\r\n        AnimationState.prototype.hasTimeline = function (entry, id) {\r\n            var timelines = entry.animation.timelines;\r\n            for (var i = 0, n = timelines.length; i < n; i++)\r\n                if (timelines[i].getPropertyId() == id)\r\n                    return true;\r\n            return false;\r\n        };\r\n        AnimationState.prototype.getCurrent = function (trackIndex) {\r\n            if (trackIndex >= this.tracks.length)\r\n                return null;\r\n            return this.tracks[trackIndex];\r\n        };\r\n        AnimationState.prototype.addListener = function (listener) {\r\n            if (listener == null)\r\n                throw new Error(\"listener cannot be null.\");\r\n            this.listeners.push(listener);\r\n        };\r\n        /** Removes the listener added with {@link #addListener(AnimationStateListener)}. */\r\n        AnimationState.prototype.removeListener = function (listener) {\r\n            var index = this.listeners.indexOf(listener);\r\n            if (index >= 0)\r\n                this.listeners.splice(index, 1);\r\n        };\r\n        AnimationState.prototype.clearListeners = function () {\r\n            this.listeners.length = 0;\r\n        };\r\n        AnimationState.prototype.clearListenerNotifications = function () {\r\n            this.queue.clear();\r\n        };\r\n        AnimationState.prototype.setAnimationByName = function (trackIndex, animationName, loop) {\r\n            if (!AnimationState.deprecatedWarning1) {\r\n                AnimationState.deprecatedWarning1 = true;\r\n                console.warn(\"Spine Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.\");\r\n            }\r\n            this.setAnimation(trackIndex, animationName, loop);\r\n        };\r\n        AnimationState.prototype.addAnimationByName = function (trackIndex, animationName, loop, delay) {\r\n            if (!AnimationState.deprecatedWarning2) {\r\n                AnimationState.deprecatedWarning2 = true;\r\n                console.warn(\"Spine Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.\");\r\n            }\r\n            this.addAnimation(trackIndex, animationName, loop, delay);\r\n        };\r\n        AnimationState.prototype.hasAnimation = function (animationName) {\r\n            var animation = this.data.skeletonData.findAnimation(animationName);\r\n            return animation !== null;\r\n        };\r\n        AnimationState.prototype.hasAnimationByName = function (animationName) {\r\n            if (!AnimationState.deprecatedWarning3) {\r\n                AnimationState.deprecatedWarning3 = true;\r\n                console.warn(\"Spine Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.\");\r\n            }\r\n            return this.hasAnimation(animationName);\r\n        };\r\n        AnimationState.emptyAnimation = new Animation$1(\"<empty>\", [], 0);\r\n        AnimationState.SUBSEQUENT = 0;\r\n        AnimationState.FIRST = 1;\r\n        AnimationState.HOLD = 2;\r\n        AnimationState.HOLD_MIX = 3;\r\n        AnimationState.deprecatedWarning1 = false;\r\n        AnimationState.deprecatedWarning2 = false;\r\n        AnimationState.deprecatedWarning3 = false;\r\n        return AnimationState;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var TrackEntry$1 = /** @class */ (function () {\r\n        function TrackEntry() {\r\n            this.mixBlend = exports.MixBlend.replace;\r\n            this.timelineMode = new Array();\r\n            this.timelineHoldMix = new Array();\r\n            this.timelinesRotation = new Array();\r\n        }\r\n        TrackEntry.prototype.reset = function () {\r\n            this.next = null;\r\n            this.mixingFrom = null;\r\n            this.mixingTo = null;\r\n            this.animation = null;\r\n            this.listener = null;\r\n            this.timelineMode.length = 0;\r\n            this.timelineHoldMix.length = 0;\r\n            this.timelinesRotation.length = 0;\r\n        };\r\n        TrackEntry.prototype.getAnimationTime = function () {\r\n            if (this.loop) {\r\n                var duration = this.animationEnd - this.animationStart;\r\n                if (duration == 0)\r\n                    return this.animationStart;\r\n                return (this.trackTime % duration) + this.animationStart;\r\n            }\r\n            return Math.min(this.trackTime + this.animationStart, this.animationEnd);\r\n        };\r\n        TrackEntry.prototype.setAnimationLast = function (animationLast) {\r\n            this.animationLast = animationLast;\r\n            this.nextAnimationLast = animationLast;\r\n        };\r\n        TrackEntry.prototype.isComplete = function () {\r\n            return this.trackTime >= this.animationEnd - this.animationStart;\r\n        };\r\n        TrackEntry.prototype.resetRotationDirections = function () {\r\n            this.timelinesRotation.length = 0;\r\n        };\r\n        Object.defineProperty(TrackEntry.prototype, \"time\", {\r\n            get: function () {\r\n                if (!TrackEntry.deprecatedWarning1) {\r\n                    TrackEntry.deprecatedWarning1 = true;\r\n                    console.warn(\"Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.\");\r\n                }\r\n                return this.trackTime;\r\n            },\r\n            set: function (value) {\r\n                if (!TrackEntry.deprecatedWarning1) {\r\n                    TrackEntry.deprecatedWarning1 = true;\r\n                    console.warn(\"Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.\");\r\n                }\r\n                this.trackTime = value;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(TrackEntry.prototype, \"endTime\", {\r\n            get: function () {\r\n                if (!TrackEntry.deprecatedWarning2) {\r\n                    TrackEntry.deprecatedWarning2 = true;\r\n                    console.warn(\"Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.\");\r\n                }\r\n                return this.trackTime;\r\n            },\r\n            set: function (value) {\r\n                if (!TrackEntry.deprecatedWarning2) {\r\n                    TrackEntry.deprecatedWarning2 = true;\r\n                    console.warn(\"Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.\");\r\n                }\r\n                this.trackTime = value;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        TrackEntry.prototype.loopsCount = function () {\r\n            return Math.floor(this.trackTime / this.trackEnd);\r\n        };\r\n        TrackEntry.deprecatedWarning1 = false;\r\n        TrackEntry.deprecatedWarning2 = false;\r\n        return TrackEntry;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var EventQueue$1 = /** @class */ (function () {\r\n        function EventQueue(animState) {\r\n            this.objects = [];\r\n            this.drainDisabled = false;\r\n            this.animState = animState;\r\n        }\r\n        EventQueue.prototype.start = function (entry) {\r\n            this.objects.push(EventType$1.start);\r\n            this.objects.push(entry);\r\n            this.animState.animationsChanged = true;\r\n        };\r\n        EventQueue.prototype.interrupt = function (entry) {\r\n            this.objects.push(EventType$1.interrupt);\r\n            this.objects.push(entry);\r\n        };\r\n        EventQueue.prototype.end = function (entry) {\r\n            this.objects.push(EventType$1.end);\r\n            this.objects.push(entry);\r\n            this.animState.animationsChanged = true;\r\n        };\r\n        EventQueue.prototype.dispose = function (entry) {\r\n            this.objects.push(EventType$1.dispose);\r\n            this.objects.push(entry);\r\n        };\r\n        EventQueue.prototype.complete = function (entry) {\r\n            this.objects.push(EventType$1.complete);\r\n            this.objects.push(entry);\r\n        };\r\n        EventQueue.prototype.event = function (entry, event) {\r\n            this.objects.push(EventType$1.event);\r\n            this.objects.push(entry);\r\n            this.objects.push(event);\r\n        };\r\n        EventQueue.prototype.deprecateStuff = function () {\r\n            if (!EventQueue.deprecatedWarning1) {\r\n                EventQueue.deprecatedWarning1 = true;\r\n                console.warn(\"Spine Deprecation Warning: onComplete, onStart, onEnd, onEvent art deprecated, please use listeners from now on. 'state.addListener({ complete: function(track, event) { } })'\");\r\n            }\r\n            return true;\r\n        };\r\n        EventQueue.prototype.drain = function () {\r\n            if (this.drainDisabled)\r\n                return;\r\n            this.drainDisabled = true;\r\n            var objects = this.objects;\r\n            var listeners = this.animState.listeners;\r\n            for (var i = 0; i < objects.length; i += 2) {\r\n                var type = objects[i];\r\n                var entry = objects[i + 1];\r\n                switch (type) {\r\n                    case EventType$1.start:\r\n                        if (entry.listener != null && entry.listener.start)\r\n                            entry.listener.start(entry);\r\n                        for (var ii = 0; ii < listeners.length; ii++)\r\n                            if (listeners[ii].start)\r\n                                listeners[ii].start(entry);\r\n                        //deprecation\r\n                        entry.onStart && this.deprecateStuff() && entry.onStart(entry.trackIndex);\r\n                        this.animState.onStart && this.deprecateStuff() && this.deprecateStuff && this.animState.onStart(entry.trackIndex);\r\n                        break;\r\n                    case EventType$1.interrupt:\r\n                        if (entry.listener != null && entry.listener.interrupt)\r\n                            entry.listener.interrupt(entry);\r\n                        for (var ii = 0; ii < listeners.length; ii++)\r\n                            if (listeners[ii].interrupt)\r\n                                listeners[ii].interrupt(entry);\r\n                        break;\r\n                    case EventType$1.end:\r\n                        if (entry.listener != null && entry.listener.end)\r\n                            entry.listener.end(entry);\r\n                        for (var ii = 0; ii < listeners.length; ii++)\r\n                            if (listeners[ii].end)\r\n                                listeners[ii].end(entry);\r\n                        //deprecation\r\n                        entry.onEnd && this.deprecateStuff() && entry.onEnd(entry.trackIndex);\r\n                        this.animState.onEnd && this.deprecateStuff() && this.animState.onEnd(entry.trackIndex);\r\n                    // Fall through.\r\n                    case EventType$1.dispose:\r\n                        if (entry.listener != null && entry.listener.dispose)\r\n                            entry.listener.dispose(entry);\r\n                        for (var ii = 0; ii < listeners.length; ii++)\r\n                            if (listeners[ii].dispose)\r\n                                listeners[ii].dispose(entry);\r\n                        this.animState.trackEntryPool.free(entry);\r\n                        break;\r\n                    case EventType$1.complete:\r\n                        if (entry.listener != null && entry.listener.complete)\r\n                            entry.listener.complete(entry);\r\n                        for (var ii = 0; ii < listeners.length; ii++)\r\n                            if (listeners[ii].complete)\r\n                                listeners[ii].complete(entry);\r\n                        //deprecation\r\n                        var count = MathUtils.toInt(entry.loopsCount());\r\n                        entry.onComplete && this.deprecateStuff() && entry.onComplete(entry.trackIndex, count);\r\n                        this.animState.onComplete && this.deprecateStuff() && this.animState.onComplete(entry.trackIndex, count);\r\n                        break;\r\n                    case EventType$1.event:\r\n                        var event_3 = objects[i++ + 2];\r\n                        if (entry.listener != null && entry.listener.event)\r\n                            entry.listener.event(entry, event_3);\r\n                        for (var ii = 0; ii < listeners.length; ii++)\r\n                            if (listeners[ii].event)\r\n                                listeners[ii].event(entry, event_3);\r\n                        //deprecation\r\n                        entry.onEvent && this.deprecateStuff() && entry.onEvent(entry.trackIndex, event_3);\r\n                        this.animState.onEvent && this.deprecateStuff() && this.animState.onEvent(entry.trackIndex, event_3);\r\n                        break;\r\n                }\r\n            }\r\n            this.clear();\r\n            this.drainDisabled = false;\r\n        };\r\n        EventQueue.prototype.clear = function () {\r\n            this.objects.length = 0;\r\n        };\r\n        EventQueue.deprecatedWarning1 = false;\r\n        return EventQueue;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var EventType$1;\r\n    (function (EventType) {\r\n        EventType[EventType[\"start\"] = 0] = \"start\";\r\n        EventType[EventType[\"interrupt\"] = 1] = \"interrupt\";\r\n        EventType[EventType[\"end\"] = 2] = \"end\";\r\n        EventType[EventType[\"dispose\"] = 3] = \"dispose\";\r\n        EventType[EventType[\"complete\"] = 4] = \"complete\";\r\n        EventType[EventType[\"event\"] = 5] = \"event\";\r\n    })(EventType$1 || (EventType$1 = {}));\r\n    /**\r\n     * @public\r\n     */\r\n    var AnimationStateAdapter2 = /** @class */ (function () {\r\n        function AnimationStateAdapter2() {\r\n        }\r\n        AnimationStateAdapter2.prototype.start = function (entry) {\r\n        };\r\n        AnimationStateAdapter2.prototype.interrupt = function (entry) {\r\n        };\r\n        AnimationStateAdapter2.prototype.end = function (entry) {\r\n        };\r\n        AnimationStateAdapter2.prototype.dispose = function (entry) {\r\n        };\r\n        AnimationStateAdapter2.prototype.complete = function (entry) {\r\n        };\r\n        AnimationStateAdapter2.prototype.event = function (entry, event) {\r\n        };\r\n        return AnimationStateAdapter2;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var AnimationStateData$1 = /** @class */ (function () {\r\n        function AnimationStateData(skeletonData) {\r\n            this.animationToMixTime = {};\r\n            this.defaultMix = 0;\r\n            if (skeletonData == null)\r\n                throw new Error(\"skeletonData cannot be null.\");\r\n            this.skeletonData = skeletonData;\r\n        }\r\n        AnimationStateData.prototype.setMix = function (fromName, toName, duration) {\r\n            var from = this.skeletonData.findAnimation(fromName);\r\n            if (from == null)\r\n                throw new Error(\"Animation not found: \" + fromName);\r\n            var to = this.skeletonData.findAnimation(toName);\r\n            if (to == null)\r\n                throw new Error(\"Animation not found: \" + toName);\r\n            this.setMixWith(from, to, duration);\r\n        };\r\n        AnimationStateData.prototype.setMixByName = function (fromName, toName, duration) {\r\n            if (!AnimationStateData.deprecatedWarning1) {\r\n                AnimationStateData.deprecatedWarning1 = true;\r\n                console.warn(\"Deprecation Warning: AnimationStateData.setMixByName is deprecated, please use setMix from now on.\");\r\n            }\r\n            this.setMix(fromName, toName, duration);\r\n        };\r\n        AnimationStateData.prototype.setMixWith = function (from, to, duration) {\r\n            if (from == null)\r\n                throw new Error(\"from cannot be null.\");\r\n            if (to == null)\r\n                throw new Error(\"to cannot be null.\");\r\n            var key = from.name + \".\" + to.name;\r\n            this.animationToMixTime[key] = duration;\r\n        };\r\n        AnimationStateData.prototype.getMix = function (from, to) {\r\n            var key = from.name + \".\" + to.name;\r\n            var value = this.animationToMixTime[key];\r\n            return value === undefined ? this.defaultMix : value;\r\n        };\r\n        AnimationStateData.deprecatedWarning1 = false;\r\n        return AnimationStateData;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var AtlasAttachmentLoader$1 = /** @class */ (function () {\r\n        function AtlasAttachmentLoader(atlas) {\r\n            this.atlas = atlas;\r\n        }\r\n        /** @return May be null to not load an attachment. */\r\n        AtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) {\r\n            var region = this.atlas.findRegion(path);\r\n            if (region == null)\r\n                throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\r\n            var attachment = new RegionAttachment$1(name);\r\n            attachment.region = region;\r\n            return attachment;\r\n        };\r\n        /** @return May be null to not load an attachment. */\r\n        AtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {\r\n            var region = this.atlas.findRegion(path);\r\n            if (region == null)\r\n                throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\r\n            var attachment = new MeshAttachment$1(name);\r\n            attachment.region = region;\r\n            return attachment;\r\n        };\r\n        /** @return May be null to not load an attachment. */\r\n        AtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) {\r\n            return new BoundingBoxAttachment$1(name);\r\n        };\r\n        /** @return May be null to not load an attachment */\r\n        AtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) {\r\n            return new PathAttachment$1(name);\r\n        };\r\n        AtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) {\r\n            return new PointAttachment$1(name);\r\n        };\r\n        AtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) {\r\n            return new ClippingAttachment$1(name);\r\n        };\r\n        return AtlasAttachmentLoader;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var Bone$1 = /** @class */ (function () {\r\n        /** @param parent May be null. */\r\n        function Bone(data, skeleton, parent) {\r\n            //be careful! Spine b,c is c,b in pixi matrix\r\n            this.matrix = new math.Matrix();\r\n            this.children = new Array();\r\n            this.x = 0;\r\n            this.y = 0;\r\n            this.rotation = 0;\r\n            this.scaleX = 0;\r\n            this.scaleY = 0;\r\n            this.shearX = 0;\r\n            this.shearY = 0;\r\n            this.ax = 0;\r\n            this.ay = 0;\r\n            this.arotation = 0;\r\n            this.ascaleX = 0;\r\n            this.ascaleY = 0;\r\n            this.ashearX = 0;\r\n            this.ashearY = 0;\r\n            this.appliedValid = false;\r\n            this.sorted = false;\r\n            if (data == null)\r\n                throw new Error(\"data cannot be null.\");\r\n            if (skeleton == null)\r\n                throw new Error(\"skeleton cannot be null.\");\r\n            this.data = data;\r\n            this.skeleton = skeleton;\r\n            this.parent = parent;\r\n            this.setToSetupPose();\r\n        }\r\n        Object.defineProperty(Bone.prototype, \"worldX\", {\r\n            get: function () {\r\n                return this.matrix.tx;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(Bone.prototype, \"worldY\", {\r\n            get: function () {\r\n                return this.matrix.ty;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        /** Same as {@link #updateWorldTransform()}. This method exists for Bone to implement {@link Updatable}. */\r\n        Bone.prototype.update = function () {\r\n            this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n        };\r\n        /** Computes the world transform using the parent bone and this bone's local transform. */\r\n        Bone.prototype.updateWorldTransform = function () {\r\n            this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n        };\r\n        /** Computes the world transform using the parent bone and the specified local transform. */\r\n        Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) {\r\n            this.ax = x;\r\n            this.ay = y;\r\n            this.arotation = rotation;\r\n            this.ascaleX = scaleX;\r\n            this.ascaleY = scaleY;\r\n            this.ashearX = shearX;\r\n            this.ashearY = shearY;\r\n            this.appliedValid = true;\r\n            var parent = this.parent;\r\n            var m = this.matrix;\r\n            var sx = this.skeleton.scaleX;\r\n            var sy = settings.yDown ? -this.skeleton.scaleY : this.skeleton.scaleY;\r\n            if (parent == null) { // Root bone.\r\n                var skeleton = this.skeleton;\r\n                var rotationY = rotation + 90 + shearY;\r\n                m.a = MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\r\n                m.c = MathUtils.cosDeg(rotationY) * scaleY * sx;\r\n                m.b = MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\r\n                m.d = MathUtils.sinDeg(rotationY) * scaleY * sy;\r\n                m.tx = x * sx + skeleton.x;\r\n                m.ty = y * sy + skeleton.y;\r\n                return;\r\n            }\r\n            var pa = parent.matrix.a, pb = parent.matrix.c, pc = parent.matrix.b, pd = parent.matrix.d;\r\n            m.tx = pa * x + pb * y + parent.matrix.tx;\r\n            m.ty = pc * x + pd * y + parent.matrix.ty;\r\n            switch (this.data.transformMode) {\r\n                case exports.TransformMode.Normal: {\r\n                    var rotationY = rotation + 90 + shearY;\r\n                    var la = MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n                    var lb = MathUtils.cosDeg(rotationY) * scaleY;\r\n                    var lc = MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n                    var ld = MathUtils.sinDeg(rotationY) * scaleY;\r\n                    m.a = pa * la + pb * lc;\r\n                    m.c = pa * lb + pb * ld;\r\n                    m.b = pc * la + pd * lc;\r\n                    m.d = pc * lb + pd * ld;\r\n                    return;\r\n                }\r\n                case exports.TransformMode.OnlyTranslation: {\r\n                    var rotationY = rotation + 90 + shearY;\r\n                    m.a = MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n                    m.c = MathUtils.cosDeg(rotationY) * scaleY;\r\n                    m.b = MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n                    m.d = MathUtils.sinDeg(rotationY) * scaleY;\r\n                    break;\r\n                }\r\n                case exports.TransformMode.NoRotationOrReflection: {\r\n                    var s = pa * pa + pc * pc;\r\n                    var prx = 0;\r\n                    if (s > 0.0001) {\r\n                        s = Math.abs(pa * pd - pb * pc) / s;\r\n                        pb = pc * s;\r\n                        pd = pa * s;\r\n                        prx = Math.atan2(pc, pa) * MathUtils.radDeg;\r\n                    }\r\n                    else {\r\n                        pa = 0;\r\n                        pc = 0;\r\n                        prx = 90 - Math.atan2(pd, pb) * MathUtils.radDeg;\r\n                    }\r\n                    var rx = rotation + shearX - prx;\r\n                    var ry = rotation + shearY - prx + 90;\r\n                    var la = MathUtils.cosDeg(rx) * scaleX;\r\n                    var lb = MathUtils.cosDeg(ry) * scaleY;\r\n                    var lc = MathUtils.sinDeg(rx) * scaleX;\r\n                    var ld = MathUtils.sinDeg(ry) * scaleY;\r\n                    m.a = pa * la - pb * lc;\r\n                    m.c = pa * lb - pb * ld;\r\n                    m.b = pc * la + pd * lc;\r\n                    m.d = pc * lb + pd * ld;\r\n                    break;\r\n                }\r\n                case exports.TransformMode.NoScale:\r\n                case exports.TransformMode.NoScaleOrReflection: {\r\n                    var cos = MathUtils.cosDeg(rotation);\r\n                    var sin = MathUtils.sinDeg(rotation);\r\n                    var za = (pa * cos + pb * sin) / sx;\r\n                    var zc = (pc * cos + pd * sin) / sy;\r\n                    var s = Math.sqrt(za * za + zc * zc);\r\n                    if (s > 0.00001)\r\n                        s = 1 / s;\r\n                    za *= s;\r\n                    zc *= s;\r\n                    s = Math.sqrt(za * za + zc * zc);\r\n                    if (this.data.transformMode == exports.TransformMode.NoScale\r\n                        && (pa * pd - pb * pc < 0) != (settings.yDown ?\r\n                            (this.skeleton.scaleX < 0 != this.skeleton.scaleY > 0) :\r\n                            (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0)))\r\n                        s = -s;\r\n                    var r = Math.PI / 2 + Math.atan2(zc, za);\r\n                    var zb = Math.cos(r) * s;\r\n                    var zd = Math.sin(r) * s;\r\n                    var la = MathUtils.cosDeg(shearX) * scaleX;\r\n                    var lb = MathUtils.cosDeg(90 + shearY) * scaleY;\r\n                    var lc = MathUtils.sinDeg(shearX) * scaleX;\r\n                    var ld = MathUtils.sinDeg(90 + shearY) * scaleY;\r\n                    m.a = za * la + zb * lc;\r\n                    m.c = za * lb + zb * ld;\r\n                    m.b = zc * la + zd * lc;\r\n                    m.d = zc * lb + zd * ld;\r\n                    break;\r\n                }\r\n            }\r\n            m.a *= sx;\r\n            m.c *= sx;\r\n            m.b *= sy;\r\n            m.d *= sy;\r\n        };\r\n        Bone.prototype.setToSetupPose = function () {\r\n            var data = this.data;\r\n            this.x = data.x;\r\n            this.y = data.y;\r\n            this.rotation = data.rotation;\r\n            this.scaleX = data.scaleX;\r\n            this.scaleY = data.scaleY;\r\n            this.shearX = data.shearX;\r\n            this.shearY = data.shearY;\r\n        };\r\n        Bone.prototype.getWorldRotationX = function () {\r\n            return Math.atan2(this.matrix.b, this.matrix.a) * MathUtils.radDeg;\r\n        };\r\n        Bone.prototype.getWorldRotationY = function () {\r\n            return Math.atan2(this.matrix.d, this.matrix.c) * MathUtils.radDeg;\r\n        };\r\n        Bone.prototype.getWorldScaleX = function () {\r\n            var m = this.matrix;\r\n            return Math.sqrt(m.a * m.a + m.c * m.c);\r\n        };\r\n        Bone.prototype.getWorldScaleY = function () {\r\n            var m = this.matrix;\r\n            return Math.sqrt(m.b * m.b + m.d * m.d);\r\n        };\r\n        /** Computes the individual applied transform values from the world transform. This can be useful to perform processing using\r\n         * the applied transform after the world transform has been modified directly (eg, by a constraint).\r\n         * <p>\r\n         * Some information is ambiguous in the world transform, such as -1,-1 scale versus 180 rotation. */\r\n        Bone.prototype.updateAppliedTransform = function () {\r\n            this.appliedValid = true;\r\n            var parent = this.parent;\r\n            var m = this.matrix;\r\n            if (parent == null) {\r\n                this.ax = m.tx;\r\n                this.ay = m.ty;\r\n                this.arotation = Math.atan2(m.b, m.a) * MathUtils.radDeg;\r\n                this.ascaleX = Math.sqrt(m.a * m.a + m.b * m.b);\r\n                this.ascaleY = Math.sqrt(m.c * m.c + m.d * m.d);\r\n                this.ashearX = 0;\r\n                this.ashearY = Math.atan2(m.a * m.c + m.b * m.d, m.a * m.d - m.b * m.c) * MathUtils.radDeg;\r\n                return;\r\n            }\r\n            var pm = parent.matrix;\r\n            var pid = 1 / (pm.a * pm.d - pm.b * pm.c);\r\n            var dx = m.tx - pm.tx, dy = m.ty - pm.ty;\r\n            this.ax = (dx * pm.d * pid - dy * pm.c * pid);\r\n            this.ay = (dy * pm.a * pid - dx * pm.b * pid);\r\n            var ia = pid * pm.d;\r\n            var id = pid * pm.a;\r\n            var ib = pid * pm.c;\r\n            var ic = pid * pm.b;\r\n            var ra = ia * m.a - ib * m.b;\r\n            var rb = ia * m.c - ib * m.d;\r\n            var rc = id * m.b - ic * m.a;\r\n            var rd = id * m.d - ic * m.c;\r\n            this.ashearX = 0;\r\n            this.ascaleX = Math.sqrt(ra * ra + rc * rc);\r\n            if (this.ascaleX > 0.0001) {\r\n                var det = ra * rd - rb * rc;\r\n                this.ascaleY = det / this.ascaleX;\r\n                this.ashearY = Math.atan2(ra * rb + rc * rd, det) * MathUtils.radDeg;\r\n                this.arotation = Math.atan2(rc, ra) * MathUtils.radDeg;\r\n            }\r\n            else {\r\n                this.ascaleX = 0;\r\n                this.ascaleY = Math.sqrt(rb * rb + rd * rd);\r\n                this.ashearY = 0;\r\n                this.arotation = 90 - Math.atan2(rd, rb) * MathUtils.radDeg;\r\n            }\r\n        };\r\n        Bone.prototype.worldToLocal = function (world) {\r\n            var m = this.matrix;\r\n            var a = m.a, b = m.c, c = m.b, d = m.d;\r\n            var invDet = 1 / (a * d - b * c);\r\n            var x = world.x - m.tx, y = world.y - m.ty;\r\n            world.x = (x * d * invDet - y * b * invDet);\r\n            world.y = (y * a * invDet - x * c * invDet);\r\n            return world;\r\n        };\r\n        Bone.prototype.localToWorld = function (local) {\r\n            var m = this.matrix;\r\n            var x = local.x, y = local.y;\r\n            local.x = x * m.a + y * m.c + m.tx;\r\n            local.y = x * m.b + y * m.d + m.ty;\r\n            return local;\r\n        };\r\n        Bone.prototype.worldToLocalRotation = function (worldRotation) {\r\n            var sin = MathUtils.sinDeg(worldRotation), cos = MathUtils.cosDeg(worldRotation);\r\n            var mat = this.matrix;\r\n            return Math.atan2(mat.a * sin - mat.b * cos, mat.d * cos - mat.c * sin) * MathUtils.radDeg;\r\n        };\r\n        Bone.prototype.localToWorldRotation = function (localRotation) {\r\n            var sin = MathUtils.sinDeg(localRotation), cos = MathUtils.cosDeg(localRotation);\r\n            var mat = this.matrix;\r\n            return Math.atan2(cos * mat.b + sin * mat.d, cos * mat.a + sin * mat.c) * MathUtils.radDeg;\r\n        };\r\n        Bone.prototype.rotateWorld = function (degrees) {\r\n            var mat = this.matrix;\r\n            var a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n            var cos = MathUtils.cosDeg(degrees), sin = MathUtils.sinDeg(degrees);\r\n            mat.a = cos * a - sin * c;\r\n            mat.c = cos * b - sin * d;\r\n            mat.b = sin * a + cos * c;\r\n            mat.d = sin * b + cos * d;\r\n            this.appliedValid = false;\r\n        };\r\n        return Bone;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var BoneData$1 = /** @class */ (function () {\r\n        function BoneData(index, name, parent) {\r\n            this.x = 0;\r\n            this.y = 0;\r\n            this.rotation = 0;\r\n            this.scaleX = 1;\r\n            this.scaleY = 1;\r\n            this.shearX = 0;\r\n            this.shearY = 0;\r\n            this.transformMode = exports.TransformMode.Normal;\r\n            if (index < 0)\r\n                throw new Error(\"index must be >= 0.\");\r\n            if (name == null)\r\n                throw new Error(\"name cannot be null.\");\r\n            this.index = index;\r\n            this.name = name;\r\n            this.parent = parent;\r\n        }\r\n        return BoneData;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var Event$1 = /** @class */ (function () {\r\n        function Event(time, data) {\r\n            if (data == null)\r\n                throw new Error(\"data cannot be null.\");\r\n            this.time = time;\r\n            this.data = data;\r\n        }\r\n        return Event;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var EventData$1 = /** @class */ (function () {\r\n        function EventData(name) {\r\n            this.name = name;\r\n        }\r\n        return EventData;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var IkConstraint$1 = /** @class */ (function () {\r\n        function IkConstraint(data, skeleton) {\r\n            this.bendDirection = 0;\r\n            this.compress = false;\r\n            this.stretch = false;\r\n            this.mix = 1;\r\n            if (data == null)\r\n                throw new Error(\"data cannot be null.\");\r\n            if (skeleton == null)\r\n                throw new Error(\"skeleton cannot be null.\");\r\n            this.data = data;\r\n            this.mix = data.mix;\r\n            this.bendDirection = data.bendDirection;\r\n            this.compress = data.compress;\r\n            this.stretch = data.stretch;\r\n            this.bones = new Array();\r\n            for (var i = 0; i < data.bones.length; i++)\r\n                this.bones.push(skeleton.findBone(data.bones[i].name));\r\n            this.target = skeleton.findBone(data.target.name);\r\n        }\r\n        IkConstraint.prototype.getOrder = function () {\r\n            return this.data.order;\r\n        };\r\n        IkConstraint.prototype.apply = function () {\r\n            this.update();\r\n        };\r\n        IkConstraint.prototype.update = function () {\r\n            var target = this.target;\r\n            var bones = this.bones;\r\n            switch (bones.length) {\r\n                case 1:\r\n                    this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\r\n                    break;\r\n                case 2:\r\n                    this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.mix);\r\n                    break;\r\n            }\r\n        };\r\n        /** Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified in the world\r\n         * coordinate system. */\r\n        IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {\r\n            if (!bone.appliedValid)\r\n                bone.updateAppliedTransform();\r\n            var p = bone.parent.matrix;\r\n            var id = 1 / (p.a * p.d - p.b * p.c);\r\n            var x = targetX - p.tx, y = targetY - p.ty;\r\n            var tx = (x * p.d - y * p.c) * id - bone.ax, ty = (y * p.a - x * p.b) * id - bone.ay;\r\n            var rotationIK = Math.atan2(ty, tx) * MathUtils.radDeg - bone.ashearX - bone.arotation;\r\n            if (bone.ascaleX < 0)\r\n                rotationIK += 180;\r\n            if (rotationIK > 180)\r\n                rotationIK -= 360;\r\n            else if (rotationIK < -180)\r\n                rotationIK += 360;\r\n            var sx = bone.ascaleX, sy = bone.ascaleY;\r\n            if (compress || stretch) {\r\n                var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\r\n                if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\r\n                    var s = (dd / b - 1) * alpha + 1;\r\n                    sx *= s;\r\n                    if (uniform)\r\n                        sy *= s;\r\n                }\r\n            }\r\n            bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);\r\n        };\r\n        /** Adjusts the parent and child bone rotations so the tip of the child is as close to the target position as possible. The\r\n         * target is specified in the world coordinate system.\r\n         * @param child A direct descendant of the parent bone. */\r\n        IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, alpha) {\r\n            if (alpha == 0) {\r\n                child.updateWorldTransform();\r\n                return;\r\n            }\r\n            if (!parent.appliedValid)\r\n                parent.updateAppliedTransform();\r\n            if (!child.appliedValid)\r\n                child.updateAppliedTransform();\r\n            var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\r\n            var pmat = parent.matrix;\r\n            var os1 = 0, os2 = 0, s2 = 0;\r\n            if (psx < 0) {\r\n                psx = -psx;\r\n                os1 = 180;\r\n                s2 = -1;\r\n            }\r\n            else {\r\n                os1 = 0;\r\n                s2 = 1;\r\n            }\r\n            if (psy < 0) {\r\n                psy = -psy;\r\n                s2 = -s2;\r\n            }\r\n            if (csx < 0) {\r\n                csx = -csx;\r\n                os2 = 180;\r\n            }\r\n            else\r\n                os2 = 0;\r\n            var cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = pmat.a, b = pmat.c, c = pmat.b, d = pmat.d;\r\n            var u = Math.abs(psx - psy) <= 0.0001;\r\n            if (!u) {\r\n                cy = 0;\r\n                cwx = a * cx + pmat.tx;\r\n                cwy = c * cx + pmat.ty;\r\n            }\r\n            else {\r\n                cy = child.ay;\r\n                cwx = a * cx + b * cy + pmat.tx;\r\n                cwy = c * cx + d * cy + pmat.ty;\r\n            }\r\n            var pp = parent.parent.matrix;\r\n            a = pp.a;\r\n            b = pp.c;\r\n            c = pp.b;\r\n            d = pp.d;\r\n            var id = 1 / (a * d - b * c), x = targetX - pp.tx, y = targetY - pp.ty;\r\n            var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py, dd = tx * tx + ty * ty;\r\n            x = cwx - pp.tx;\r\n            y = cwy - pp.ty;\r\n            var dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n            var l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1 = 0, a2 = 0;\r\n            outer: if (u) {\r\n                l2 *= psx;\r\n                var cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n                if (cos < -1)\r\n                    cos = -1;\r\n                else if (cos > 1) {\r\n                    cos = 1;\r\n                    if (stretch && l1 + l2 > 0.0001)\r\n                        sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\r\n                }\r\n                a2 = Math.acos(cos) * bendDir;\r\n                a = l1 + l2 * cos;\r\n                b = l2 * Math.sin(a2);\r\n                a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n            }\r\n            else {\r\n                a = psx * l2;\r\n                b = psy * l2;\r\n                var aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\r\n                c = bb * l1 * l1 + aa * dd - aa * bb;\r\n                var c1 = -2 * bb * l1, c2 = bb - aa;\r\n                d = c1 * c1 - 4 * c2 * c;\r\n                if (d >= 0) {\r\n                    var q = Math.sqrt(d);\r\n                    if (c1 < 0)\r\n                        q = -q;\r\n                    q = -(c1 + q) / 2;\r\n                    var r0 = q / c2, r1 = c / q;\r\n                    var r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n                    if (r * r <= dd) {\r\n                        y = Math.sqrt(dd - r * r) * bendDir;\r\n                        a1 = ta - Math.atan2(y, r);\r\n                        a2 = Math.atan2(y / psy, (r - l1) / psx);\r\n                        break outer;\r\n                    }\r\n                }\r\n                var minAngle = MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n                var maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n                c = -a * l1 / (aa - bb);\r\n                if (c >= -1 && c <= 1) {\r\n                    c = Math.acos(c);\r\n                    x = a * Math.cos(c) + l1;\r\n                    y = b * Math.sin(c);\r\n                    d = x * x + y * y;\r\n                    if (d < minDist) {\r\n                        minAngle = c;\r\n                        minDist = d;\r\n                        minX = x;\r\n                        minY = y;\r\n                    }\r\n                    if (d > maxDist) {\r\n                        maxAngle = c;\r\n                        maxDist = d;\r\n                        maxX = x;\r\n                        maxY = y;\r\n                    }\r\n                }\r\n                if (dd <= (minDist + maxDist) / 2) {\r\n                    a1 = ta - Math.atan2(minY * bendDir, minX);\r\n                    a2 = minAngle * bendDir;\r\n                }\r\n                else {\r\n                    a1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n                    a2 = maxAngle * bendDir;\r\n                }\r\n            }\r\n            var os = Math.atan2(cy, cx) * s2;\r\n            var rotation = parent.arotation;\r\n            a1 = (a1 - os) * MathUtils.radDeg + os1 - rotation;\r\n            if (a1 > 180)\r\n                a1 -= 360;\r\n            else if (a1 < -180)\r\n                a1 += 360;\r\n            parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\r\n            rotation = child.arotation;\r\n            a2 = ((a2 + os) * MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n            if (a2 > 180)\r\n                a2 -= 360;\r\n            else if (a2 < -180)\r\n                a2 += 360;\r\n            child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n        };\r\n        return IkConstraint;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var IkConstraintData$1 = /** @class */ (function () {\r\n        function IkConstraintData(name) {\r\n            this.order = 0;\r\n            this.bones = new Array();\r\n            this.bendDirection = 1;\r\n            this.compress = false;\r\n            this.stretch = false;\r\n            this.uniform = false;\r\n            this.mix = 1;\r\n            this.name = name;\r\n        }\r\n        return IkConstraintData;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var PathConstraintData$1 = /** @class */ (function () {\r\n        function PathConstraintData(name) {\r\n            this.order = 0;\r\n            this.bones = new Array();\r\n            this.name = name;\r\n        }\r\n        return PathConstraintData;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var SpacingMode$1;\r\n    (function (SpacingMode) {\r\n        SpacingMode[SpacingMode[\"Length\"] = 0] = \"Length\";\r\n        SpacingMode[SpacingMode[\"Fixed\"] = 1] = \"Fixed\";\r\n        SpacingMode[SpacingMode[\"Percent\"] = 2] = \"Percent\";\r\n    })(SpacingMode$1 || (SpacingMode$1 = {}));\n\n    /**\r\n     * @public\r\n     */\r\n    var PathConstraint$1 = /** @class */ (function () {\r\n        function PathConstraint(data, skeleton) {\r\n            this.position = 0;\r\n            this.spacing = 0;\r\n            this.rotateMix = 0;\r\n            this.translateMix = 0;\r\n            this.spaces = new Array();\r\n            this.positions = new Array();\r\n            this.world = new Array();\r\n            this.curves = new Array();\r\n            this.lengths = new Array();\r\n            this.segments = new Array();\r\n            if (data == null)\r\n                throw new Error(\"data cannot be null.\");\r\n            if (skeleton == null)\r\n                throw new Error(\"skeleton cannot be null.\");\r\n            this.data = data;\r\n            this.bones = new Array();\r\n            for (var i = 0, n = data.bones.length; i < n; i++)\r\n                this.bones.push(skeleton.findBone(data.bones[i].name));\r\n            this.target = skeleton.findSlot(data.target.name);\r\n            this.position = data.position;\r\n            this.spacing = data.spacing;\r\n            this.rotateMix = data.rotateMix;\r\n            this.translateMix = data.translateMix;\r\n        }\r\n        PathConstraint.prototype.apply = function () {\r\n            this.update();\r\n        };\r\n        PathConstraint.prototype.update = function () {\r\n            var attachment = this.target.getAttachment();\r\n            if (!(attachment instanceof PathAttachment$1))\r\n                return;\r\n            var rotateMix = this.rotateMix, translateMix = this.translateMix;\r\n            var translate = translateMix > 0, rotate = rotateMix > 0;\r\n            if (!translate && !rotate)\r\n                return;\r\n            var data = this.data;\r\n            var spacingMode = data.spacingMode;\r\n            var lengthSpacing = spacingMode == SpacingMode$1.Length;\r\n            var rotateMode = data.rotateMode;\r\n            var tangents = rotateMode == exports.RotateMode.Tangent, scale = rotateMode == exports.RotateMode.ChainScale;\r\n            var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\r\n            var bones = this.bones;\r\n            var spaces = Utils.setArraySize(this.spaces, spacesCount), lengths = null;\r\n            var spacing = this.spacing;\r\n            if (scale || lengthSpacing) {\r\n                if (scale)\r\n                    lengths = Utils.setArraySize(this.lengths, boneCount);\r\n                for (var i = 0, n = spacesCount - 1; i < n;) {\r\n                    var bone = bones[i];\r\n                    var setupLength = bone.data.length;\r\n                    if (setupLength < PathConstraint.epsilon) {\r\n                        if (scale)\r\n                            lengths[i] = 0;\r\n                        spaces[++i] = 0;\r\n                    }\r\n                    else {\r\n                        var x = setupLength * bone.matrix.a, y = setupLength * bone.matrix.b;\r\n                        var length_1 = Math.sqrt(x * x + y * y);\r\n                        if (scale)\r\n                            lengths[i] = length_1;\r\n                        spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_1 / setupLength;\r\n                    }\r\n                }\r\n            }\r\n            else {\r\n                for (var i = 1; i < spacesCount; i++)\r\n                    spaces[i] = spacing;\r\n            }\r\n            var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == exports.PositionMode.Percent, spacingMode == SpacingMode$1.Percent);\r\n            var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\r\n            var tip = false;\r\n            if (offsetRotation == 0)\r\n                tip = rotateMode == exports.RotateMode.Chain;\r\n            else {\r\n                tip = false;\r\n                var p = this.target.bone.matrix;\r\n                offsetRotation *= p.a * p.d - p.b * p.c > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n            }\r\n            for (var i = 0, p = 3; i < boneCount; i++, p += 3) {\r\n                var bone = bones[i];\r\n                var mat = bone.matrix;\r\n                mat.tx += (boneX - mat.tx) * translateMix;\r\n                mat.ty += (boneY - mat.ty) * translateMix;\r\n                var x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\r\n                if (scale) {\r\n                    var length_2 = lengths[i];\r\n                    if (length_2 != 0) {\r\n                        var s = (Math.sqrt(dx * dx + dy * dy) / length_2 - 1) * rotateMix + 1;\r\n                        mat.a *= s;\r\n                        mat.b *= s;\r\n                    }\r\n                }\r\n                boneX = x;\r\n                boneY = y;\r\n                if (rotate) {\r\n                    var a = mat.a, b = mat.c, c = mat.b, d = mat.d, r = 0, cos = 0, sin = 0;\r\n                    if (tangents)\r\n                        r = positions[p - 1];\r\n                    else if (spaces[i + 1] == 0)\r\n                        r = positions[p + 2];\r\n                    else\r\n                        r = Math.atan2(dy, dx);\r\n                    r -= Math.atan2(c, a);\r\n                    if (tip) {\r\n                        cos = Math.cos(r);\r\n                        sin = Math.sin(r);\r\n                        var length_3 = bone.data.length;\r\n                        boneX += (length_3 * (cos * a - sin * c) - dx) * rotateMix;\r\n                        boneY += (length_3 * (sin * a + cos * c) - dy) * rotateMix;\r\n                    }\r\n                    else {\r\n                        r += offsetRotation;\r\n                    }\r\n                    if (r > MathUtils.PI)\r\n                        r -= MathUtils.PI2;\r\n                    else if (r < -MathUtils.PI) //\r\n                        r += MathUtils.PI2;\r\n                    r *= rotateMix;\r\n                    cos = Math.cos(r);\r\n                    sin = Math.sin(r);\r\n                    mat.a = cos * a - sin * c;\r\n                    mat.c = cos * b - sin * d;\r\n                    mat.b = sin * a + cos * c;\r\n                    mat.d = sin * b + cos * d;\r\n                }\r\n                bone.appliedValid = false;\r\n            }\r\n        };\r\n        PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) {\r\n            var target = this.target;\r\n            var position = this.position;\r\n            var spaces = this.spaces, out = Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null;\r\n            var closed = path.closed;\r\n            var verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\r\n            if (!path.constantSpeed) {\r\n                var lengths = path.lengths;\r\n                curveCount -= closed ? 1 : 2;\r\n                var pathLength_1 = lengths[curveCount];\r\n                if (percentPosition)\r\n                    position *= pathLength_1;\r\n                if (percentSpacing) {\r\n                    for (var i = 0; i < spacesCount; i++)\r\n                        spaces[i] *= pathLength_1;\r\n                }\r\n                world = Utils.setArraySize(this.world, 8);\r\n                for (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\r\n                    var space = spaces[i];\r\n                    position += space;\r\n                    var p = position;\r\n                    if (closed) {\r\n                        p %= pathLength_1;\r\n                        if (p < 0)\r\n                            p += pathLength_1;\r\n                        curve = 0;\r\n                    }\r\n                    else if (p < 0) {\r\n                        if (prevCurve != PathConstraint.BEFORE) {\r\n                            prevCurve = PathConstraint.BEFORE;\r\n                            path.computeWorldVertices(target, 2, 4, world, 0, 2);\r\n                        }\r\n                        this.addBeforePosition(p, world, 0, out, o);\r\n                        continue;\r\n                    }\r\n                    else if (p > pathLength_1) {\r\n                        if (prevCurve != PathConstraint.AFTER) {\r\n                            prevCurve = PathConstraint.AFTER;\r\n                            path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\r\n                        }\r\n                        this.addAfterPosition(p - pathLength_1, world, 0, out, o);\r\n                        continue;\r\n                    }\r\n                    // Determine curve containing position.\r\n                    for (;; curve++) {\r\n                        var length_4 = lengths[curve];\r\n                        if (p > length_4)\r\n                            continue;\r\n                        if (curve == 0)\r\n                            p /= length_4;\r\n                        else {\r\n                            var prev = lengths[curve - 1];\r\n                            p = (p - prev) / (length_4 - prev);\r\n                        }\r\n                        break;\r\n                    }\r\n                    if (curve != prevCurve) {\r\n                        prevCurve = curve;\r\n                        if (closed && curve == curveCount) {\r\n                            path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\r\n                            path.computeWorldVertices(target, 0, 4, world, 4, 2);\r\n                        }\r\n                        else\r\n                            path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\r\n                    }\r\n                    this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0));\r\n                }\r\n                return out;\r\n            }\r\n            // World vertices.\r\n            if (closed) {\r\n                verticesLength += 2;\r\n                world = Utils.setArraySize(this.world, verticesLength);\r\n                path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\r\n                path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\r\n                world[verticesLength - 2] = world[0];\r\n                world[verticesLength - 1] = world[1];\r\n            }\r\n            else {\r\n                curveCount--;\r\n                verticesLength -= 4;\r\n                world = Utils.setArraySize(this.world, verticesLength);\r\n                path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\r\n            }\r\n            // Curve lengths.\r\n            var curves = Utils.setArraySize(this.curves, curveCount);\r\n            var pathLength = 0;\r\n            var x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\r\n            var tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\r\n            for (var i = 0, w = 2; i < curveCount; i++, w += 6) {\r\n                cx1 = world[w];\r\n                cy1 = world[w + 1];\r\n                cx2 = world[w + 2];\r\n                cy2 = world[w + 3];\r\n                x2 = world[w + 4];\r\n                y2 = world[w + 5];\r\n                tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\r\n                tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\r\n                dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\r\n                dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\r\n                ddfx = tmpx * 2 + dddfx;\r\n                ddfy = tmpy * 2 + dddfy;\r\n                dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\r\n                dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\r\n                pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n                dfx += ddfx;\r\n                dfy += ddfy;\r\n                ddfx += dddfx;\r\n                ddfy += dddfy;\r\n                pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n                dfx += ddfx;\r\n                dfy += ddfy;\r\n                pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n                dfx += ddfx + dddfx;\r\n                dfy += ddfy + dddfy;\r\n                pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n                curves[i] = pathLength;\r\n                x1 = x2;\r\n                y1 = y2;\r\n            }\r\n            if (percentPosition)\r\n                position *= pathLength;\r\n            if (percentSpacing) {\r\n                for (var i = 0; i < spacesCount; i++)\r\n                    spaces[i] *= pathLength;\r\n            }\r\n            var segments = this.segments;\r\n            var curveLength = 0;\r\n            for (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\r\n                var space = spaces[i];\r\n                position += space;\r\n                var p = position;\r\n                if (closed) {\r\n                    p %= pathLength;\r\n                    if (p < 0)\r\n                        p += pathLength;\r\n                    curve = 0;\r\n                }\r\n                else if (p < 0) {\r\n                    this.addBeforePosition(p, world, 0, out, o);\r\n                    continue;\r\n                }\r\n                else if (p > pathLength) {\r\n                    this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\r\n                    continue;\r\n                }\r\n                // Determine curve containing position.\r\n                for (;; curve++) {\r\n                    var length_5 = curves[curve];\r\n                    if (p > length_5)\r\n                        continue;\r\n                    if (curve == 0)\r\n                        p /= length_5;\r\n                    else {\r\n                        var prev = curves[curve - 1];\r\n                        p = (p - prev) / (length_5 - prev);\r\n                    }\r\n                    break;\r\n                }\r\n                // Curve segment lengths.\r\n                if (curve != prevCurve) {\r\n                    prevCurve = curve;\r\n                    var ii = curve * 6;\r\n                    x1 = world[ii];\r\n                    y1 = world[ii + 1];\r\n                    cx1 = world[ii + 2];\r\n                    cy1 = world[ii + 3];\r\n                    cx2 = world[ii + 4];\r\n                    cy2 = world[ii + 5];\r\n                    x2 = world[ii + 6];\r\n                    y2 = world[ii + 7];\r\n                    tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\r\n                    tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\r\n                    dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\r\n                    dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\r\n                    ddfx = tmpx * 2 + dddfx;\r\n                    ddfy = tmpy * 2 + dddfy;\r\n                    dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\r\n                    dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\r\n                    curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\r\n                    segments[0] = curveLength;\r\n                    for (ii = 1; ii < 8; ii++) {\r\n                        dfx += ddfx;\r\n                        dfy += ddfy;\r\n                        ddfx += dddfx;\r\n                        ddfy += dddfy;\r\n                        curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n                        segments[ii] = curveLength;\r\n                    }\r\n                    dfx += ddfx;\r\n                    dfy += ddfy;\r\n                    curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n                    segments[8] = curveLength;\r\n                    dfx += ddfx + dddfx;\r\n                    dfy += ddfy + dddfy;\r\n                    curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n                    segments[9] = curveLength;\r\n                    segment = 0;\r\n                }\r\n                // Weight by segment length.\r\n                p *= curveLength;\r\n                for (;; segment++) {\r\n                    var length_6 = segments[segment];\r\n                    if (p > length_6)\r\n                        continue;\r\n                    if (segment == 0)\r\n                        p /= length_6;\r\n                    else {\r\n                        var prev = segments[segment - 1];\r\n                        p = segment + (p - prev) / (length_6 - prev);\r\n                    }\r\n                    break;\r\n                }\r\n                this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\r\n            }\r\n            return out;\r\n        };\r\n        PathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) {\r\n            var x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\r\n            out[o] = x1 + p * Math.cos(r);\r\n            out[o + 1] = y1 + p * Math.sin(r);\r\n            out[o + 2] = r;\r\n        };\r\n        PathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) {\r\n            var x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\r\n            out[o] = x1 + p * Math.cos(r);\r\n            out[o + 1] = y1 + p * Math.sin(r);\r\n            out[o + 2] = r;\r\n        };\r\n        PathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\r\n            if (p == 0 || isNaN(p))\r\n                p = 0.0001;\r\n            var tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\r\n            var ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\r\n            var x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\r\n            out[o] = x;\r\n            out[o + 1] = y;\r\n            if (tangents)\r\n                out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\r\n        };\r\n        PathConstraint.prototype.getOrder = function () {\r\n            return this.data.order;\r\n        };\r\n        PathConstraint.NONE = -1;\r\n        PathConstraint.BEFORE = -2;\r\n        PathConstraint.AFTER = -3;\r\n        PathConstraint.epsilon = 0.00001;\r\n        return PathConstraint;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var Slot$1 = /** @class */ (function () {\r\n        function Slot(data, bone) {\r\n            this.attachmentVertices = new Array();\r\n            if (data == null)\r\n                throw new Error(\"data cannot be null.\");\r\n            if (bone == null)\r\n                throw new Error(\"bone cannot be null.\");\r\n            this.data = data;\r\n            this.bone = bone;\r\n            this.color = new Color();\r\n            this.darkColor = data.darkColor == null ? null : new Color();\r\n            this.setToSetupPose();\r\n            this.blendMode = this.data.blendMode;\r\n        }\r\n        /** @return May be null. */\r\n        Slot.prototype.getAttachment = function () {\r\n            return this.attachment;\r\n        };\r\n        /** Sets the attachment and if it changed, resets {@link #getAttachmentTime()} and clears {@link #getAttachmentVertices()}.\r\n         * @param attachment May be null. */\r\n        Slot.prototype.setAttachment = function (attachment) {\r\n            if (this.attachment == attachment)\r\n                return;\r\n            this.attachment = attachment;\r\n            this.attachmentTime = this.bone.skeleton.time;\r\n            this.attachmentVertices.length = 0;\r\n        };\r\n        Slot.prototype.setAttachmentTime = function (time) {\r\n            this.attachmentTime = this.bone.skeleton.time - time;\r\n        };\r\n        /** Returns the time since the attachment was set. */\r\n        Slot.prototype.getAttachmentTime = function () {\r\n            return this.bone.skeleton.time - this.attachmentTime;\r\n        };\r\n        Slot.prototype.setToSetupPose = function () {\r\n            this.color.setFromColor(this.data.color);\r\n            if (this.darkColor != null)\r\n                this.darkColor.setFromColor(this.data.darkColor);\r\n            if (this.data.attachmentName == null)\r\n                this.attachment = null;\r\n            else {\r\n                this.attachment = null;\r\n                this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\r\n            }\r\n        };\r\n        return Slot;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var TransformConstraint$1 = /** @class */ (function () {\r\n        function TransformConstraint(data, skeleton) {\r\n            this.rotateMix = 0;\r\n            this.translateMix = 0;\r\n            this.scaleMix = 0;\r\n            this.shearMix = 0;\r\n            this.temp = new Vector2();\r\n            if (data == null)\r\n                throw new Error(\"data cannot be null.\");\r\n            if (skeleton == null)\r\n                throw new Error(\"skeleton cannot be null.\");\r\n            this.data = data;\r\n            this.rotateMix = data.rotateMix;\r\n            this.translateMix = data.translateMix;\r\n            this.scaleMix = data.scaleMix;\r\n            this.shearMix = data.shearMix;\r\n            this.bones = new Array();\r\n            for (var i = 0; i < data.bones.length; i++)\r\n                this.bones.push(skeleton.findBone(data.bones[i].name));\r\n            this.target = skeleton.findBone(data.target.name);\r\n        }\r\n        TransformConstraint.prototype.apply = function () {\r\n            this.update();\r\n        };\r\n        TransformConstraint.prototype.update = function () {\r\n            if (this.data.local) {\r\n                if (this.data.relative)\r\n                    this.applyRelativeLocal();\r\n                else\r\n                    this.applyAbsoluteLocal();\r\n            }\r\n            else {\r\n                if (this.data.relative)\r\n                    this.applyRelativeWorld();\r\n                else\r\n                    this.applyAbsoluteWorld();\r\n            }\r\n        };\r\n        TransformConstraint.prototype.applyAbsoluteWorld = function () {\r\n            var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n            var target = this.target;\r\n            var targetMat = target.matrix;\r\n            var ta = targetMat.a, tb = targetMat.c, tc = targetMat.b, td = targetMat.d;\r\n            var degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n            var offsetRotation = this.data.offsetRotation * degRadReflect;\r\n            var offsetShearY = this.data.offsetShearY * degRadReflect;\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                var modified = false;\r\n                var mat = bone.matrix;\r\n                if (rotateMix != 0) {\r\n                    var a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n                    var r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\r\n                    if (r > MathUtils.PI)\r\n                        r -= MathUtils.PI2;\r\n                    else if (r < -MathUtils.PI)\r\n                        r += MathUtils.PI2;\r\n                    r *= rotateMix;\r\n                    var cos = Math.cos(r), sin = Math.sin(r);\r\n                    mat.a = cos * a - sin * c;\r\n                    mat.c = cos * b - sin * d;\r\n                    mat.b = sin * a + cos * c;\r\n                    mat.d = sin * b + cos * d;\r\n                    modified = true;\r\n                }\r\n                if (translateMix != 0) {\r\n                    var temp = this.temp;\r\n                    target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n                    mat.tx += (temp.x - mat.tx) * translateMix;\r\n                    mat.ty += (temp.y - mat.ty) * translateMix;\r\n                    modified = true;\r\n                }\r\n                if (scaleMix > 0) {\r\n                    var s = Math.sqrt(mat.a * mat.a + mat.b * mat.b);\r\n                    var ts = Math.sqrt(ta * ta + tc * tc);\r\n                    if (s > 0.00001)\r\n                        s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\r\n                    mat.a *= s;\r\n                    mat.b *= s;\r\n                    s = Math.sqrt(mat.c * mat.c + mat.d * mat.d);\r\n                    ts = Math.sqrt(tb * tb + td * td);\r\n                    if (s > 0.00001)\r\n                        s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\r\n                    mat.c *= s;\r\n                    mat.d *= s;\r\n                    modified = true;\r\n                }\r\n                if (shearMix > 0) {\r\n                    var b = mat.c, d = mat.d;\r\n                    var by = Math.atan2(d, b);\r\n                    var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(mat.b, mat.a));\r\n                    if (r > MathUtils.PI)\r\n                        r -= MathUtils.PI2;\r\n                    else if (r < -MathUtils.PI)\r\n                        r += MathUtils.PI2;\r\n                    r = by + (r + offsetShearY) * shearMix;\r\n                    var s = Math.sqrt(b * b + d * d);\r\n                    mat.c = Math.cos(r) * s;\r\n                    mat.d = Math.sin(r) * s;\r\n                    modified = true;\r\n                }\r\n                if (modified)\r\n                    bone.appliedValid = false;\r\n            }\r\n        };\r\n        TransformConstraint.prototype.applyRelativeWorld = function () {\r\n            var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n            var target = this.target;\r\n            var targetMat = target.matrix;\r\n            var ta = targetMat.a, tb = targetMat.c, tc = targetMat.b, td = targetMat.d;\r\n            var degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n            var offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                var modified = false;\r\n                var mat = bone.matrix;\r\n                if (rotateMix != 0) {\r\n                    var a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n                    var r = Math.atan2(tc, ta) + offsetRotation;\r\n                    if (r > MathUtils.PI)\r\n                        r -= MathUtils.PI2;\r\n                    else if (r < -MathUtils.PI)\r\n                        r += MathUtils.PI2;\r\n                    r *= rotateMix;\r\n                    var cos = Math.cos(r), sin = Math.sin(r);\r\n                    mat.a = cos * a - sin * c;\r\n                    mat.c = cos * b - sin * d;\r\n                    mat.b = sin * a + cos * c;\r\n                    mat.d = sin * b + cos * d;\r\n                    modified = true;\r\n                }\r\n                if (translateMix != 0) {\r\n                    var temp = this.temp;\r\n                    target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n                    mat.tx += temp.x * translateMix;\r\n                    mat.ty += temp.y * translateMix;\r\n                    modified = true;\r\n                }\r\n                if (scaleMix > 0) {\r\n                    var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\r\n                    mat.a *= s;\r\n                    mat.b *= s;\r\n                    s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\r\n                    mat.c *= s;\r\n                    mat.d *= s;\r\n                    modified = true;\r\n                }\r\n                if (shearMix > 0) {\r\n                    var r = Math.atan2(td, tb) - Math.atan2(tc, ta);\r\n                    if (r > MathUtils.PI)\r\n                        r -= MathUtils.PI2;\r\n                    else if (r < -MathUtils.PI)\r\n                        r += MathUtils.PI2;\r\n                    var b = mat.c, d = mat.d;\r\n                    r = Math.atan2(d, b) + (r - MathUtils.PI / 2 + offsetShearY) * shearMix;\r\n                    var s = Math.sqrt(b * b + d * d);\r\n                    mat.c = Math.cos(r) * s;\r\n                    mat.d = Math.sin(r) * s;\r\n                    modified = true;\r\n                }\r\n                if (modified)\r\n                    bone.appliedValid = false;\r\n            }\r\n        };\r\n        TransformConstraint.prototype.applyAbsoluteLocal = function () {\r\n            var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n            var target = this.target;\r\n            if (!target.appliedValid)\r\n                target.updateAppliedTransform();\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                if (!bone.appliedValid)\r\n                    bone.updateAppliedTransform();\r\n                var rotation = bone.arotation;\r\n                if (rotateMix != 0) {\r\n                    var r = target.arotation - rotation + this.data.offsetRotation;\r\n                    r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n                    rotation += r * rotateMix;\r\n                }\r\n                var x = bone.ax, y = bone.ay;\r\n                if (translateMix != 0) {\r\n                    x += (target.ax - x + this.data.offsetX) * translateMix;\r\n                    y += (target.ay - y + this.data.offsetY) * translateMix;\r\n                }\r\n                var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n                if (scaleMix > 0) {\r\n                    if (scaleX > 0.00001)\r\n                        scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\r\n                    if (scaleY > 0.00001)\r\n                        scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\r\n                }\r\n                var shearY = bone.ashearY;\r\n                if (shearMix > 0) {\r\n                    var r = target.ashearY - shearY + this.data.offsetShearY;\r\n                    r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n                    bone.shearY += r * shearMix;\r\n                }\r\n                bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n            }\r\n        };\r\n        TransformConstraint.prototype.applyRelativeLocal = function () {\r\n            var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n            var target = this.target;\r\n            if (!target.appliedValid)\r\n                target.updateAppliedTransform();\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                if (!bone.appliedValid)\r\n                    bone.updateAppliedTransform();\r\n                var rotation = bone.arotation;\r\n                if (rotateMix != 0)\r\n                    rotation += (target.arotation + this.data.offsetRotation) * rotateMix;\r\n                var x = bone.ax, y = bone.ay;\r\n                if (translateMix != 0) {\r\n                    x += (target.ax + this.data.offsetX) * translateMix;\r\n                    y += (target.ay + this.data.offsetY) * translateMix;\r\n                }\r\n                var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n                if (scaleMix > 0) {\r\n                    if (scaleX > 0.00001)\r\n                        scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\r\n                    if (scaleY > 0.00001)\r\n                        scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\r\n                }\r\n                var shearY = bone.ashearY;\r\n                if (shearMix > 0)\r\n                    shearY += (target.ashearY + this.data.offsetShearY) * shearMix;\r\n                bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n            }\r\n        };\r\n        TransformConstraint.prototype.getOrder = function () {\r\n            return this.data.order;\r\n        };\r\n        return TransformConstraint;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var Skeleton$1 = /** @class */ (function () {\r\n        function Skeleton(data) {\r\n            this._updateCache = new Array();\r\n            this.updateCacheReset = new Array();\r\n            this.time = 0;\r\n            this.scaleX = 1;\r\n            this.scaleY = 1;\r\n            this.x = 0;\r\n            this.y = 0;\r\n            if (data == null)\r\n                throw new Error(\"data cannot be null.\");\r\n            this.data = data;\r\n            this.bones = new Array();\r\n            for (var i = 0; i < data.bones.length; i++) {\r\n                var boneData = data.bones[i];\r\n                var bone = void 0;\r\n                if (boneData.parent == null)\r\n                    bone = new Bone$1(boneData, this, null);\r\n                else {\r\n                    var parent_1 = this.bones[boneData.parent.index];\r\n                    bone = new Bone$1(boneData, this, parent_1);\r\n                    parent_1.children.push(bone);\r\n                }\r\n                this.bones.push(bone);\r\n            }\r\n            this.slots = new Array();\r\n            this.drawOrder = new Array();\r\n            for (var i = 0; i < data.slots.length; i++) {\r\n                var slotData = data.slots[i];\r\n                var bone = this.bones[slotData.boneData.index];\r\n                var slot = new Slot$1(slotData, bone);\r\n                this.slots.push(slot);\r\n                this.drawOrder.push(slot);\r\n            }\r\n            this.ikConstraints = new Array();\r\n            for (var i = 0; i < data.ikConstraints.length; i++) {\r\n                var ikConstraintData = data.ikConstraints[i];\r\n                this.ikConstraints.push(new IkConstraint$1(ikConstraintData, this));\r\n            }\r\n            this.transformConstraints = new Array();\r\n            for (var i = 0; i < data.transformConstraints.length; i++) {\r\n                var transformConstraintData = data.transformConstraints[i];\r\n                this.transformConstraints.push(new TransformConstraint$1(transformConstraintData, this));\r\n            }\r\n            this.pathConstraints = new Array();\r\n            for (var i = 0; i < data.pathConstraints.length; i++) {\r\n                var pathConstraintData = data.pathConstraints[i];\r\n                this.pathConstraints.push(new PathConstraint$1(pathConstraintData, this));\r\n            }\r\n            this.color = new Color(1, 1, 1, 1);\r\n            this.updateCache();\r\n        }\r\n        Skeleton.prototype.updateCache = function () {\r\n            var updateCache = this._updateCache;\r\n            updateCache.length = 0;\r\n            this.updateCacheReset.length = 0;\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++)\r\n                bones[i].sorted = false;\r\n            // IK first, lowest hierarchy depth first.\r\n            var ikConstraints = this.ikConstraints;\r\n            var transformConstraints = this.transformConstraints;\r\n            var pathConstraints = this.pathConstraints;\r\n            var ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\r\n            var constraintCount = ikCount + transformCount + pathCount;\r\n            outer: for (var i = 0; i < constraintCount; i++) {\r\n                for (var ii = 0; ii < ikCount; ii++) {\r\n                    var constraint = ikConstraints[ii];\r\n                    if (constraint.data.order == i) {\r\n                        this.sortIkConstraint(constraint);\r\n                        continue outer;\r\n                    }\r\n                }\r\n                for (var ii = 0; ii < transformCount; ii++) {\r\n                    var constraint = transformConstraints[ii];\r\n                    if (constraint.data.order == i) {\r\n                        this.sortTransformConstraint(constraint);\r\n                        continue outer;\r\n                    }\r\n                }\r\n                for (var ii = 0; ii < pathCount; ii++) {\r\n                    var constraint = pathConstraints[ii];\r\n                    if (constraint.data.order == i) {\r\n                        this.sortPathConstraint(constraint);\r\n                        continue outer;\r\n                    }\r\n                }\r\n            }\r\n            for (var i = 0, n = bones.length; i < n; i++)\r\n                this.sortBone(bones[i]);\r\n        };\r\n        Skeleton.prototype.sortIkConstraint = function (constraint) {\r\n            var target = constraint.target;\r\n            this.sortBone(target);\r\n            var constrained = constraint.bones;\r\n            var parent = constrained[0];\r\n            this.sortBone(parent);\r\n            if (constrained.length > 1) {\r\n                var child = constrained[constrained.length - 1];\r\n                if (!(this._updateCache.indexOf(child) > -1))\r\n                    this.updateCacheReset.push(child);\r\n            }\r\n            this._updateCache.push(constraint);\r\n            this.sortReset(parent.children);\r\n            constrained[constrained.length - 1].sorted = true;\r\n        };\r\n        Skeleton.prototype.sortPathConstraint = function (constraint) {\r\n            var slot = constraint.target;\r\n            var slotIndex = slot.data.index;\r\n            var slotBone = slot.bone;\r\n            if (this.skin != null)\r\n                this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\r\n            if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\r\n                this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\r\n            for (var i = 0, n = this.data.skins.length; i < n; i++)\r\n                this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\r\n            var attachment = slot.getAttachment();\r\n            if (attachment instanceof PathAttachment$1)\r\n                this.sortPathConstraintAttachmentWith(attachment, slotBone);\r\n            var constrained = constraint.bones;\r\n            var boneCount = constrained.length;\r\n            for (var i = 0; i < boneCount; i++)\r\n                this.sortBone(constrained[i]);\r\n            this._updateCache.push(constraint);\r\n            for (var i = 0; i < boneCount; i++)\r\n                this.sortReset(constrained[i].children);\r\n            for (var i = 0; i < boneCount; i++)\r\n                constrained[i].sorted = true;\r\n        };\r\n        Skeleton.prototype.sortTransformConstraint = function (constraint) {\r\n            this.sortBone(constraint.target);\r\n            var constrained = constraint.bones;\r\n            var boneCount = constrained.length;\r\n            if (constraint.data.local) {\r\n                for (var i = 0; i < boneCount; i++) {\r\n                    var child = constrained[i];\r\n                    this.sortBone(child.parent);\r\n                    if (!(this._updateCache.indexOf(child) > -1))\r\n                        this.updateCacheReset.push(child);\r\n                }\r\n            }\r\n            else {\r\n                for (var i = 0; i < boneCount; i++) {\r\n                    this.sortBone(constrained[i]);\r\n                }\r\n            }\r\n            this._updateCache.push(constraint);\r\n            for (var ii = 0; ii < boneCount; ii++)\r\n                this.sortReset(constrained[ii].children);\r\n            for (var ii = 0; ii < boneCount; ii++)\r\n                constrained[ii].sorted = true;\r\n        };\r\n        Skeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) {\r\n            var attachments = skin.attachments[slotIndex];\r\n            if (!attachments)\r\n                return;\r\n            for (var key in attachments) {\r\n                this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\r\n            }\r\n        };\r\n        Skeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) {\r\n            if (!(attachment instanceof PathAttachment$1))\r\n                return;\r\n            var pathBones = attachment.bones;\r\n            if (pathBones == null)\r\n                this.sortBone(slotBone);\r\n            else {\r\n                var bones = this.bones;\r\n                var i = 0;\r\n                while (i < pathBones.length) {\r\n                    var boneCount = pathBones[i++];\r\n                    for (var n = i + boneCount; i < n; i++) {\r\n                        var boneIndex = pathBones[i];\r\n                        this.sortBone(bones[boneIndex]);\r\n                    }\r\n                }\r\n            }\r\n        };\r\n        Skeleton.prototype.sortBone = function (bone) {\r\n            if (bone.sorted)\r\n                return;\r\n            var parent = bone.parent;\r\n            if (parent != null)\r\n                this.sortBone(parent);\r\n            bone.sorted = true;\r\n            this._updateCache.push(bone);\r\n        };\r\n        Skeleton.prototype.sortReset = function (bones) {\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                if (bone.sorted)\r\n                    this.sortReset(bone.children);\r\n                bone.sorted = false;\r\n            }\r\n        };\r\n        /** Updates the world transform for each bone and applies constraints. */\r\n        Skeleton.prototype.updateWorldTransform = function () {\r\n            var updateCacheReset = this.updateCacheReset;\r\n            for (var i = 0, n = updateCacheReset.length; i < n; i++) {\r\n                var bone = updateCacheReset[i];\r\n                bone.ax = bone.x;\r\n                bone.ay = bone.y;\r\n                bone.arotation = bone.rotation;\r\n                bone.ascaleX = bone.scaleX;\r\n                bone.ascaleY = bone.scaleY;\r\n                bone.ashearX = bone.shearX;\r\n                bone.ashearY = bone.shearY;\r\n                bone.appliedValid = true;\r\n            }\r\n            var updateCache = this._updateCache;\r\n            for (var i = 0, n = updateCache.length; i < n; i++)\r\n                updateCache[i].update();\r\n        };\r\n        /** Sets the bones, constraints, and slots to their setup pose values. */\r\n        Skeleton.prototype.setToSetupPose = function () {\r\n            this.setBonesToSetupPose();\r\n            this.setSlotsToSetupPose();\r\n        };\r\n        /** Sets the bones and constraints to their setup pose values. */\r\n        Skeleton.prototype.setBonesToSetupPose = function () {\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++)\r\n                bones[i].setToSetupPose();\r\n            var ikConstraints = this.ikConstraints;\r\n            for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n                var constraint = ikConstraints[i];\r\n                constraint.bendDirection = constraint.data.bendDirection;\r\n                constraint.mix = constraint.data.mix;\r\n            }\r\n            var transformConstraints = this.transformConstraints;\r\n            for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n                var constraint = transformConstraints[i];\r\n                var data = constraint.data;\r\n                constraint.rotateMix = data.rotateMix;\r\n                constraint.translateMix = data.translateMix;\r\n                constraint.scaleMix = data.scaleMix;\r\n                constraint.shearMix = data.shearMix;\r\n            }\r\n            var pathConstraints = this.pathConstraints;\r\n            for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n                var constraint = pathConstraints[i];\r\n                var data = constraint.data;\r\n                constraint.position = data.position;\r\n                constraint.spacing = data.spacing;\r\n                constraint.rotateMix = data.rotateMix;\r\n                constraint.translateMix = data.translateMix;\r\n            }\r\n        };\r\n        Skeleton.prototype.setSlotsToSetupPose = function () {\r\n            var slots = this.slots;\r\n            Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\r\n            for (var i = 0, n = slots.length; i < n; i++)\r\n                slots[i].setToSetupPose();\r\n        };\r\n        /** @return May return null. */\r\n        Skeleton.prototype.getRootBone = function () {\r\n            if (this.bones.length == 0)\r\n                return null;\r\n            return this.bones[0];\r\n        };\r\n        /** @return May be null. */\r\n        Skeleton.prototype.findBone = function (boneName) {\r\n            if (boneName == null)\r\n                throw new Error(\"boneName cannot be null.\");\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                if (bone.data.name == boneName)\r\n                    return bone;\r\n            }\r\n            return null;\r\n        };\r\n        /** @return -1 if the bone was not found. */\r\n        Skeleton.prototype.findBoneIndex = function (boneName) {\r\n            if (boneName == null)\r\n                throw new Error(\"boneName cannot be null.\");\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++)\r\n                if (bones[i].data.name == boneName)\r\n                    return i;\r\n            return -1;\r\n        };\r\n        /** @return May be null. */\r\n        Skeleton.prototype.findSlot = function (slotName) {\r\n            if (slotName == null)\r\n                throw new Error(\"slotName cannot be null.\");\r\n            var slots = this.slots;\r\n            for (var i = 0, n = slots.length; i < n; i++) {\r\n                var slot = slots[i];\r\n                if (slot.data.name == slotName)\r\n                    return slot;\r\n            }\r\n            return null;\r\n        };\r\n        /** @return -1 if the bone was not found. */\r\n        Skeleton.prototype.findSlotIndex = function (slotName) {\r\n            if (slotName == null)\r\n                throw new Error(\"slotName cannot be null.\");\r\n            var slots = this.slots;\r\n            for (var i = 0, n = slots.length; i < n; i++)\r\n                if (slots[i].data.name == slotName)\r\n                    return i;\r\n            return -1;\r\n        };\r\n        /** Sets a skin by name.\r\n         * @see #setSkin(Skin) */\r\n        Skeleton.prototype.setSkinByName = function (skinName) {\r\n            var skin = this.data.findSkin(skinName);\r\n            if (skin == null)\r\n                throw new Error(\"Skin not found: \" + skinName);\r\n            this.setSkin(skin);\r\n        };\r\n        /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default skin}.\r\n         * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no\r\n         * old skin, each slot's setup mode attachment is attached from the new skin.\r\n         * @param newSkin May be null. */\r\n        Skeleton.prototype.setSkin = function (newSkin) {\r\n            if (newSkin != null) {\r\n                if (this.skin != null)\r\n                    newSkin.attachAll(this, this.skin);\r\n                else {\r\n                    var slots = this.slots;\r\n                    for (var i = 0, n = slots.length; i < n; i++) {\r\n                        var slot = slots[i];\r\n                        var name_1 = slot.data.attachmentName;\r\n                        if (name_1 != null) {\r\n                            var attachment = newSkin.getAttachment(i, name_1);\r\n                            if (attachment != null)\r\n                                slot.setAttachment(attachment);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            this.skin = newSkin;\r\n        };\r\n        /** @return May be null. */\r\n        Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) {\r\n            return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\r\n        };\r\n        /** @return May be null. */\r\n        Skeleton.prototype.getAttachment = function (slotIndex, attachmentName) {\r\n            if (attachmentName == null)\r\n                throw new Error(\"attachmentName cannot be null.\");\r\n            if (this.skin != null) {\r\n                var attachment = this.skin.getAttachment(slotIndex, attachmentName);\r\n                if (attachment != null)\r\n                    return attachment;\r\n            }\r\n            if (this.data.defaultSkin != null)\r\n                return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\r\n            return null;\r\n        };\r\n        /** @param attachmentName May be null. */\r\n        Skeleton.prototype.setAttachment = function (slotName, attachmentName) {\r\n            if (slotName == null)\r\n                throw new Error(\"slotName cannot be null.\");\r\n            var slots = this.slots;\r\n            for (var i = 0, n = slots.length; i < n; i++) {\r\n                var slot = slots[i];\r\n                if (slot.data.name == slotName) {\r\n                    var attachment = null;\r\n                    if (attachmentName != null) {\r\n                        attachment = this.getAttachment(i, attachmentName);\r\n                        if (attachment == null)\r\n                            throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\r\n                    }\r\n                    slot.setAttachment(attachment);\r\n                    return;\r\n                }\r\n            }\r\n            throw new Error(\"Slot not found: \" + slotName);\r\n        };\r\n        /** @return May be null. */\r\n        Skeleton.prototype.findIkConstraint = function (constraintName) {\r\n            if (constraintName == null)\r\n                throw new Error(\"constraintName cannot be null.\");\r\n            var ikConstraints = this.ikConstraints;\r\n            for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n                var ikConstraint = ikConstraints[i];\r\n                if (ikConstraint.data.name == constraintName)\r\n                    return ikConstraint;\r\n            }\r\n            return null;\r\n        };\r\n        /** @return May be null. */\r\n        Skeleton.prototype.findTransformConstraint = function (constraintName) {\r\n            if (constraintName == null)\r\n                throw new Error(\"constraintName cannot be null.\");\r\n            var transformConstraints = this.transformConstraints;\r\n            for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n                var constraint = transformConstraints[i];\r\n                if (constraint.data.name == constraintName)\r\n                    return constraint;\r\n            }\r\n            return null;\r\n        };\r\n        /** @return May be null. */\r\n        Skeleton.prototype.findPathConstraint = function (constraintName) {\r\n            if (constraintName == null)\r\n                throw new Error(\"constraintName cannot be null.\");\r\n            var pathConstraints = this.pathConstraints;\r\n            for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n                var constraint = pathConstraints[i];\r\n                if (constraint.data.name == constraintName)\r\n                    return constraint;\r\n            }\r\n            return null;\r\n        };\r\n        /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n         * @param offset The distance from the skeleton origin to the bottom left corner of the AABB.\r\n         * @param size The width and height of the AABB.\r\n         * @param temp Working memory */\r\n        Skeleton.prototype.getBounds = function (offset, size, temp) {\r\n            if (offset == null)\r\n                throw new Error(\"offset cannot be null.\");\r\n            if (size == null)\r\n                throw new Error(\"size cannot be null.\");\r\n            var drawOrder = this.drawOrder;\r\n            var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n            for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n                var slot = drawOrder[i];\r\n                var verticesLength = 0;\r\n                var vertices = null;\r\n                var attachment = slot.getAttachment();\r\n                if (attachment instanceof RegionAttachment$1) {\r\n                    verticesLength = 8;\r\n                    vertices = Utils.setArraySize(temp, verticesLength, 0);\r\n                    attachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n                }\r\n                else if (attachment instanceof MeshAttachment$1) {\r\n                    var mesh = attachment;\r\n                    verticesLength = mesh.worldVerticesLength;\r\n                    vertices = Utils.setArraySize(temp, verticesLength, 0);\r\n                    mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\r\n                }\r\n                if (vertices != null) {\r\n                    for (var ii = 0, nn = vertices.length; ii < nn; ii += 2) {\r\n                        var x = vertices[ii], y = vertices[ii + 1];\r\n                        minX = Math.min(minX, x);\r\n                        minY = Math.min(minY, y);\r\n                        maxX = Math.max(maxX, x);\r\n                        maxY = Math.max(maxY, y);\r\n                    }\r\n                }\r\n            }\r\n            offset.set(minX, minY);\r\n            size.set(maxX - minX, maxY - minY);\r\n        };\r\n        Skeleton.prototype.update = function (delta) {\r\n            this.time += delta;\r\n        };\r\n        Object.defineProperty(Skeleton.prototype, \"flipX\", {\r\n            get: function () {\r\n                return this.scaleX == -1;\r\n            },\r\n            set: function (value) {\r\n                if (!Skeleton.deprecatedWarning1) {\r\n                    Skeleton.deprecatedWarning1 = true;\r\n                    console.warn(\"Spine Deprecation Warning: `Skeleton.flipX/flipY` was deprecated, please use scaleX/scaleY\");\r\n                }\r\n                this.scaleX = value ? 1.0 : -1.0;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(Skeleton.prototype, \"flipY\", {\r\n            get: function () {\r\n                return this.scaleY == -1;\r\n            },\r\n            set: function (value) {\r\n                if (!Skeleton.deprecatedWarning1) {\r\n                    Skeleton.deprecatedWarning1 = true;\r\n                    console.warn(\"Spine Deprecation Warning: `Skeleton.flipX/flipY` was deprecated, please use scaleX/scaleY\");\r\n                }\r\n                this.scaleY = value ? 1.0 : -1.0;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Skeleton.deprecatedWarning1 = false;\r\n        return Skeleton;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var SkeletonBounds$1 = /** @class */ (function () {\r\n        function SkeletonBounds() {\r\n            this.minX = 0;\r\n            this.minY = 0;\r\n            this.maxX = 0;\r\n            this.maxY = 0;\r\n            this.boundingBoxes = new Array();\r\n            this.polygons = new Array();\r\n            this.polygonPool = new Pool(function () {\r\n                return Utils.newFloatArray(16);\r\n            });\r\n        }\r\n        SkeletonBounds.prototype.update = function (skeleton, updateAabb) {\r\n            if (skeleton == null)\r\n                throw new Error(\"skeleton cannot be null.\");\r\n            var boundingBoxes = this.boundingBoxes;\r\n            var polygons = this.polygons;\r\n            var polygonPool = this.polygonPool;\r\n            var slots = skeleton.slots;\r\n            var slotCount = slots.length;\r\n            boundingBoxes.length = 0;\r\n            polygonPool.freeAll(polygons);\r\n            polygons.length = 0;\r\n            for (var i = 0; i < slotCount; i++) {\r\n                var slot = slots[i];\r\n                var attachment = slot.getAttachment();\r\n                if (attachment instanceof BoundingBoxAttachment$1) {\r\n                    var boundingBox = attachment;\r\n                    boundingBoxes.push(boundingBox);\r\n                    var polygon = polygonPool.obtain();\r\n                    if (polygon.length != boundingBox.worldVerticesLength) {\r\n                        polygon = Utils.newFloatArray(boundingBox.worldVerticesLength);\r\n                    }\r\n                    polygons.push(polygon);\r\n                    boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\r\n                }\r\n            }\r\n            if (updateAabb) {\r\n                this.aabbCompute();\r\n            }\r\n            else {\r\n                this.minX = Number.POSITIVE_INFINITY;\r\n                this.minY = Number.POSITIVE_INFINITY;\r\n                this.maxX = Number.NEGATIVE_INFINITY;\r\n                this.maxY = Number.NEGATIVE_INFINITY;\r\n            }\r\n        };\r\n        SkeletonBounds.prototype.aabbCompute = function () {\r\n            var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n            var polygons = this.polygons;\r\n            for (var i = 0, n = polygons.length; i < n; i++) {\r\n                var polygon = polygons[i];\r\n                var vertices = polygon;\r\n                for (var ii = 0, nn = polygon.length; ii < nn; ii += 2) {\r\n                    var x = vertices[ii];\r\n                    var y = vertices[ii + 1];\r\n                    minX = Math.min(minX, x);\r\n                    minY = Math.min(minY, y);\r\n                    maxX = Math.max(maxX, x);\r\n                    maxY = Math.max(maxY, y);\r\n                }\r\n            }\r\n            this.minX = minX;\r\n            this.minY = minY;\r\n            this.maxX = maxX;\r\n            this.maxY = maxY;\r\n        };\r\n        /** Returns true if the axis aligned bounding box contains the point. */\r\n        SkeletonBounds.prototype.aabbContainsPoint = function (x, y) {\r\n            return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\r\n        };\r\n        /** Returns true if the axis aligned bounding box intersects the line segment. */\r\n        SkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) {\r\n            var minX = this.minX;\r\n            var minY = this.minY;\r\n            var maxX = this.maxX;\r\n            var maxY = this.maxY;\r\n            if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\r\n                return false;\r\n            var m = (y2 - y1) / (x2 - x1);\r\n            var y = m * (minX - x1) + y1;\r\n            if (y > minY && y < maxY)\r\n                return true;\r\n            y = m * (maxX - x1) + y1;\r\n            if (y > minY && y < maxY)\r\n                return true;\r\n            var x = (minY - y1) / m + x1;\r\n            if (x > minX && x < maxX)\r\n                return true;\r\n            x = (maxY - y1) / m + x1;\r\n            if (x > minX && x < maxX)\r\n                return true;\r\n            return false;\r\n        };\r\n        /** Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds. */\r\n        SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) {\r\n            return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\r\n        };\r\n        /** Returns the first bounding box attachment that contains the point, or null. When doing many checks, it is usually more\r\n         * efficient to only call this method if {@link #aabbContainsPoint(float, float)} returns true. */\r\n        SkeletonBounds.prototype.containsPoint = function (x, y) {\r\n            var polygons = this.polygons;\r\n            for (var i = 0, n = polygons.length; i < n; i++)\r\n                if (this.containsPointPolygon(polygons[i], x, y))\r\n                    return this.boundingBoxes[i];\r\n            return null;\r\n        };\r\n        /** Returns true if the polygon contains the point. */\r\n        SkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) {\r\n            var vertices = polygon;\r\n            var nn = polygon.length;\r\n            var prevIndex = nn - 2;\r\n            var inside = false;\r\n            for (var ii = 0; ii < nn; ii += 2) {\r\n                var vertexY = vertices[ii + 1];\r\n                var prevY = vertices[prevIndex + 1];\r\n                if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\r\n                    var vertexX = vertices[ii];\r\n                    if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\r\n                        inside = !inside;\r\n                }\r\n                prevIndex = ii;\r\n            }\r\n            return inside;\r\n        };\r\n        /** Returns the first bounding box attachment that contains any part of the line segment, or null. When doing many checks, it\r\n         * is usually more efficient to only call this method if {@link #aabbIntersectsSegment(float, float, float, float)} returns\r\n         * true. */\r\n        SkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) {\r\n            var polygons = this.polygons;\r\n            for (var i = 0, n = polygons.length; i < n; i++)\r\n                if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\r\n                    return this.boundingBoxes[i];\r\n            return null;\r\n        };\r\n        /** Returns true if the polygon contains any part of the line segment. */\r\n        SkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) {\r\n            var vertices = polygon;\r\n            var nn = polygon.length;\r\n            var width12 = x1 - x2, height12 = y1 - y2;\r\n            var det1 = x1 * y2 - y1 * x2;\r\n            var x3 = vertices[nn - 2], y3 = vertices[nn - 1];\r\n            for (var ii = 0; ii < nn; ii += 2) {\r\n                var x4 = vertices[ii], y4 = vertices[ii + 1];\r\n                var det2 = x3 * y4 - y3 * x4;\r\n                var width34 = x3 - x4, height34 = y3 - y4;\r\n                var det3 = width12 * height34 - height12 * width34;\r\n                var x = (det1 * width34 - width12 * det2) / det3;\r\n                if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\r\n                    var y = (det1 * height34 - height12 * det2) / det3;\r\n                    if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1)))\r\n                        return true;\r\n                }\r\n                x3 = x4;\r\n                y3 = y4;\r\n            }\r\n            return false;\r\n        };\r\n        /** Returns the polygon for the specified bounding box, or null. */\r\n        SkeletonBounds.prototype.getPolygon = function (boundingBox) {\r\n            if (boundingBox == null)\r\n                throw new Error(\"boundingBox cannot be null.\");\r\n            var index = this.boundingBoxes.indexOf(boundingBox);\r\n            return index == -1 ? null : this.polygons[index];\r\n        };\r\n        SkeletonBounds.prototype.getWidth = function () {\r\n            return this.maxX - this.minX;\r\n        };\r\n        SkeletonBounds.prototype.getHeight = function () {\r\n            return this.maxY - this.minY;\r\n        };\r\n        return SkeletonBounds;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var SkeletonData$1 = /** @class */ (function () {\r\n        function SkeletonData() {\r\n            this.bones = new Array(); // Ordered parents first.\r\n            this.slots = new Array(); // Setup pose draw order.\r\n            this.skins = new Array();\r\n            this.events = new Array();\r\n            this.animations = new Array();\r\n            this.ikConstraints = new Array();\r\n            this.transformConstraints = new Array();\r\n            this.pathConstraints = new Array();\r\n            // Nonessential\r\n            this.fps = 0;\r\n        }\r\n        SkeletonData.prototype.findBone = function (boneName) {\r\n            if (boneName == null)\r\n                throw new Error(\"boneName cannot be null.\");\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                if (bone.name == boneName)\r\n                    return bone;\r\n            }\r\n            return null;\r\n        };\r\n        SkeletonData.prototype.findBoneIndex = function (boneName) {\r\n            if (boneName == null)\r\n                throw new Error(\"boneName cannot be null.\");\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++)\r\n                if (bones[i].name == boneName)\r\n                    return i;\r\n            return -1;\r\n        };\r\n        SkeletonData.prototype.findSlot = function (slotName) {\r\n            if (slotName == null)\r\n                throw new Error(\"slotName cannot be null.\");\r\n            var slots = this.slots;\r\n            for (var i = 0, n = slots.length; i < n; i++) {\r\n                var slot = slots[i];\r\n                if (slot.name == slotName)\r\n                    return slot;\r\n            }\r\n            return null;\r\n        };\r\n        SkeletonData.prototype.findSlotIndex = function (slotName) {\r\n            if (slotName == null)\r\n                throw new Error(\"slotName cannot be null.\");\r\n            var slots = this.slots;\r\n            for (var i = 0, n = slots.length; i < n; i++)\r\n                if (slots[i].name == slotName)\r\n                    return i;\r\n            return -1;\r\n        };\r\n        SkeletonData.prototype.findSkin = function (skinName) {\r\n            if (skinName == null)\r\n                throw new Error(\"skinName cannot be null.\");\r\n            var skins = this.skins;\r\n            for (var i = 0, n = skins.length; i < n; i++) {\r\n                var skin = skins[i];\r\n                if (skin.name == skinName)\r\n                    return skin;\r\n            }\r\n            return null;\r\n        };\r\n        SkeletonData.prototype.findEvent = function (eventDataName) {\r\n            if (eventDataName == null)\r\n                throw new Error(\"eventDataName cannot be null.\");\r\n            var events = this.events;\r\n            for (var i = 0, n = events.length; i < n; i++) {\r\n                var event_1 = events[i];\r\n                if (event_1.name == eventDataName)\r\n                    return event_1;\r\n            }\r\n            return null;\r\n        };\r\n        SkeletonData.prototype.findAnimation = function (animationName) {\r\n            if (animationName == null)\r\n                throw new Error(\"animationName cannot be null.\");\r\n            var animations = this.animations;\r\n            for (var i = 0, n = animations.length; i < n; i++) {\r\n                var animation = animations[i];\r\n                if (animation.name == animationName)\r\n                    return animation;\r\n            }\r\n            return null;\r\n        };\r\n        SkeletonData.prototype.findIkConstraint = function (constraintName) {\r\n            if (constraintName == null)\r\n                throw new Error(\"constraintName cannot be null.\");\r\n            var ikConstraints = this.ikConstraints;\r\n            for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n                var constraint = ikConstraints[i];\r\n                if (constraint.name == constraintName)\r\n                    return constraint;\r\n            }\r\n            return null;\r\n        };\r\n        SkeletonData.prototype.findTransformConstraint = function (constraintName) {\r\n            if (constraintName == null)\r\n                throw new Error(\"constraintName cannot be null.\");\r\n            var transformConstraints = this.transformConstraints;\r\n            for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n                var constraint = transformConstraints[i];\r\n                if (constraint.name == constraintName)\r\n                    return constraint;\r\n            }\r\n            return null;\r\n        };\r\n        SkeletonData.prototype.findPathConstraint = function (constraintName) {\r\n            if (constraintName == null)\r\n                throw new Error(\"constraintName cannot be null.\");\r\n            var pathConstraints = this.pathConstraints;\r\n            for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n                var constraint = pathConstraints[i];\r\n                if (constraint.name == constraintName)\r\n                    return constraint;\r\n            }\r\n            return null;\r\n        };\r\n        SkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) {\r\n            if (pathConstraintName == null)\r\n                throw new Error(\"pathConstraintName cannot be null.\");\r\n            var pathConstraints = this.pathConstraints;\r\n            for (var i = 0, n = pathConstraints.length; i < n; i++)\r\n                if (pathConstraints[i].name == pathConstraintName)\r\n                    return i;\r\n            return -1;\r\n        };\r\n        return SkeletonData;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var SlotData$1 = /** @class */ (function () {\r\n        function SlotData(index, name, boneData) {\r\n            this.color = new Color(1, 1, 1, 1);\r\n            if (index < 0)\r\n                throw new Error(\"index must be >= 0.\");\r\n            if (name == null)\r\n                throw new Error(\"name cannot be null.\");\r\n            if (boneData == null)\r\n                throw new Error(\"boneData cannot be null.\");\r\n            this.index = index;\r\n            this.name = name;\r\n            this.boneData = boneData;\r\n        }\r\n        return SlotData;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var TransformConstraintData$1 = /** @class */ (function () {\r\n        function TransformConstraintData(name) {\r\n            this.order = 0;\r\n            this.bones = new Array();\r\n            this.rotateMix = 0;\r\n            this.translateMix = 0;\r\n            this.scaleMix = 0;\r\n            this.shearMix = 0;\r\n            this.offsetRotation = 0;\r\n            this.offsetX = 0;\r\n            this.offsetY = 0;\r\n            this.offsetScaleX = 0;\r\n            this.offsetScaleY = 0;\r\n            this.offsetShearY = 0;\r\n            this.relative = false;\r\n            this.local = false;\r\n            if (name == null)\r\n                throw new Error(\"name cannot be null.\");\r\n            this.name = name;\r\n        }\r\n        return TransformConstraintData;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var Skin$1 = /** @class */ (function () {\r\n        function Skin(name) {\r\n            this.attachments = new Array();\r\n            if (name == null)\r\n                throw new Error(\"name cannot be null.\");\r\n            this.name = name;\r\n        }\r\n        Skin.prototype.addAttachment = function (slotIndex, name, attachment) {\r\n            if (attachment == null)\r\n                throw new Error(\"attachment cannot be null.\");\r\n            var attachments = this.attachments;\r\n            if (slotIndex >= attachments.length)\r\n                attachments.length = slotIndex + 1;\r\n            if (!attachments[slotIndex])\r\n                attachments[slotIndex] = {};\r\n            attachments[slotIndex][name] = attachment;\r\n        };\r\n        /** @return May be null. */\r\n        Skin.prototype.getAttachment = function (slotIndex, name) {\r\n            var dictionary = this.attachments[slotIndex];\r\n            return dictionary ? dictionary[name] : null;\r\n        };\r\n        /** Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached. */\r\n        Skin.prototype.attachAll = function (skeleton, oldSkin) {\r\n            var slotIndex = 0;\r\n            for (var i = 0; i < skeleton.slots.length; i++) {\r\n                var slot = skeleton.slots[i];\r\n                var slotAttachment = slot.getAttachment();\r\n                if (slotAttachment && slotIndex < oldSkin.attachments.length) {\r\n                    var dictionary = oldSkin.attachments[slotIndex];\r\n                    for (var key in dictionary) {\r\n                        var skinAttachment = dictionary[key];\r\n                        if (slotAttachment == skinAttachment) {\r\n                            var attachment = this.getAttachment(slotIndex, key);\r\n                            if (attachment != null)\r\n                                slot.setAttachment(attachment);\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n                slotIndex++;\r\n            }\r\n        };\r\n        return Skin;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var SkeletonJson$1 = /** @class */ (function () {\r\n        function SkeletonJson(attachmentLoader) {\r\n            this.scale = 1;\r\n            this.linkedMeshes = new Array();\r\n            this.attachmentLoader = attachmentLoader;\r\n        }\r\n        SkeletonJson.prototype.readSkeletonData = function (json) {\r\n            var scale = this.scale;\r\n            var skeletonData = new SkeletonData$1();\r\n            var root = typeof (json) === \"string\" ? JSON.parse(json) : json;\r\n            // Skeleton\r\n            var skeletonMap = root.skeleton;\r\n            if (skeletonMap != null) {\r\n                skeletonData.hash = skeletonMap.hash;\r\n                skeletonData.version = skeletonMap.spine;\r\n                skeletonData.width = skeletonMap.width;\r\n                skeletonData.height = skeletonMap.height;\r\n                skeletonData.fps = skeletonMap.fps;\r\n                skeletonData.imagesPath = skeletonMap.images;\r\n            }\r\n            // Bones\r\n            if (root.bones) {\r\n                for (var i = 0; i < root.bones.length; i++) {\r\n                    var boneMap = root.bones[i];\r\n                    var parent_1 = null;\r\n                    var parentName = this.getValue(boneMap, \"parent\", null);\r\n                    if (parentName != null) {\r\n                        parent_1 = skeletonData.findBone(parentName);\r\n                        if (parent_1 == null)\r\n                            throw new Error(\"Parent bone not found: \" + parentName);\r\n                    }\r\n                    var data = new BoneData$1(skeletonData.bones.length, boneMap.name, parent_1);\r\n                    data.length = this.getValue(boneMap, \"length\", 0) * scale;\r\n                    data.x = this.getValue(boneMap, \"x\", 0) * scale;\r\n                    data.y = this.getValue(boneMap, \"y\", 0) * scale;\r\n                    data.rotation = this.getValue(boneMap, \"rotation\", 0);\r\n                    data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\r\n                    data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\r\n                    data.shearX = this.getValue(boneMap, \"shearX\", 0);\r\n                    data.shearY = this.getValue(boneMap, \"shearY\", 0);\r\n                    data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\r\n                    skeletonData.bones.push(data);\r\n                }\r\n            }\r\n            // Slots.\r\n            if (root.slots) {\r\n                for (var i = 0; i < root.slots.length; i++) {\r\n                    var slotMap = root.slots[i];\r\n                    var slotName = slotMap.name;\r\n                    var boneName = slotMap.bone;\r\n                    var boneData = skeletonData.findBone(boneName);\r\n                    if (boneData == null)\r\n                        throw new Error(\"Slot bone not found: \" + boneName);\r\n                    var data = new SlotData$1(skeletonData.slots.length, slotName, boneData);\r\n                    var color = this.getValue(slotMap, \"color\", null);\r\n                    if (color != null)\r\n                        data.color.setFromString(color);\r\n                    var dark = this.getValue(slotMap, \"dark\", null);\r\n                    if (dark != null) {\r\n                        data.darkColor = new Color(1, 1, 1, 1);\r\n                        data.darkColor.setFromString(dark);\r\n                    }\r\n                    data.attachmentName = this.getValue(slotMap, \"attachment\", null);\r\n                    data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\r\n                    skeletonData.slots.push(data);\r\n                }\r\n            }\r\n            // IK constraints\r\n            if (root.ik) {\r\n                for (var i = 0; i < root.ik.length; i++) {\r\n                    var constraintMap = root.ik[i];\r\n                    var data = new IkConstraintData$1(constraintMap.name);\r\n                    data.order = this.getValue(constraintMap, \"order\", 0);\r\n                    for (var j = 0; j < constraintMap.bones.length; j++) {\r\n                        var boneName = constraintMap.bones[j];\r\n                        var bone = skeletonData.findBone(boneName);\r\n                        if (bone == null)\r\n                            throw new Error(\"IK bone not found: \" + boneName);\r\n                        data.bones.push(bone);\r\n                    }\r\n                    var targetName = constraintMap.target;\r\n                    data.target = skeletonData.findBone(targetName);\r\n                    if (data.target == null)\r\n                        throw new Error(\"IK target bone not found: \" + targetName);\r\n                    data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\r\n                    data.mix = this.getValue(constraintMap, \"mix\", 1);\r\n                    skeletonData.ikConstraints.push(data);\r\n                }\r\n            }\r\n            // Transform constraints.\r\n            if (root.transform) {\r\n                for (var i = 0; i < root.transform.length; i++) {\r\n                    var constraintMap = root.transform[i];\r\n                    var data = new TransformConstraintData$1(constraintMap.name);\r\n                    data.order = this.getValue(constraintMap, \"order\", 0);\r\n                    for (var j = 0; j < constraintMap.bones.length; j++) {\r\n                        var boneName = constraintMap.bones[j];\r\n                        var bone = skeletonData.findBone(boneName);\r\n                        if (bone == null)\r\n                            throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n                        data.bones.push(bone);\r\n                    }\r\n                    var targetName = constraintMap.target;\r\n                    data.target = skeletonData.findBone(targetName);\r\n                    if (data.target == null)\r\n                        throw new Error(\"Transform constraint target bone not found: \" + targetName);\r\n                    data.local = this.getValue(constraintMap, \"local\", false);\r\n                    data.relative = this.getValue(constraintMap, \"relative\", false);\r\n                    data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n                    data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\r\n                    data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\r\n                    data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\r\n                    data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\r\n                    data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\r\n                    data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n                    data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n                    data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\r\n                    data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\r\n                    skeletonData.transformConstraints.push(data);\r\n                }\r\n            }\r\n            // Path constraints.\r\n            if (root.path) {\r\n                for (var i = 0; i < root.path.length; i++) {\r\n                    var constraintMap = root.path[i];\r\n                    var data = new PathConstraintData$1(constraintMap.name);\r\n                    data.order = this.getValue(constraintMap, \"order\", 0);\r\n                    for (var j = 0; j < constraintMap.bones.length; j++) {\r\n                        var boneName = constraintMap.bones[j];\r\n                        var bone = skeletonData.findBone(boneName);\r\n                        if (bone == null)\r\n                            throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n                        data.bones.push(bone);\r\n                    }\r\n                    var targetName = constraintMap.target;\r\n                    data.target = skeletonData.findSlot(targetName);\r\n                    if (data.target == null)\r\n                        throw new Error(\"Path target slot not found: \" + targetName);\r\n                    data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\r\n                    data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\r\n                    data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\r\n                    data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n                    data.position = this.getValue(constraintMap, \"position\", 0);\r\n                    if (data.positionMode == exports.PositionMode.Fixed)\r\n                        data.position *= scale;\r\n                    data.spacing = this.getValue(constraintMap, \"spacing\", 0);\r\n                    if (data.spacingMode == SpacingMode$1.Length || data.spacingMode == SpacingMode$1.Fixed)\r\n                        data.spacing *= scale;\r\n                    data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n                    data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n                    skeletonData.pathConstraints.push(data);\r\n                }\r\n            }\r\n            // Skins.\r\n            if (root.skins) {\r\n                for (var skinName in root.skins) {\r\n                    var skinMap = root.skins[skinName];\r\n                    var skin = new Skin$1(skinName);\r\n                    for (var slotName in skinMap) {\r\n                        var slotIndex = skeletonData.findSlotIndex(slotName);\r\n                        if (slotIndex == -1)\r\n                            throw new Error(\"Slot not found: \" + slotName);\r\n                        var slotMap = skinMap[slotName];\r\n                        for (var entryName in slotMap) {\r\n                            var attachment = this.readAttachment(slotMap[entryName], skin, slotIndex, entryName, skeletonData);\r\n                            if (attachment != null)\r\n                                skin.addAttachment(slotIndex, entryName, attachment);\r\n                        }\r\n                    }\r\n                    skeletonData.skins.push(skin);\r\n                    if (skin.name == \"default\")\r\n                        skeletonData.defaultSkin = skin;\r\n                }\r\n            }\r\n            // Linked meshes.\r\n            for (var i = 0, n = this.linkedMeshes.length; i < n; i++) {\r\n                var linkedMesh = this.linkedMeshes[i];\r\n                var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n                if (skin == null)\r\n                    throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n                var parent_2 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n                if (parent_2 == null)\r\n                    throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n                linkedMesh.mesh.setParentMesh(parent_2);\r\n                //linkedMesh.mesh.updateUVs();\r\n            }\r\n            this.linkedMeshes.length = 0;\r\n            // Events.\r\n            if (root.events) {\r\n                for (var eventName in root.events) {\r\n                    var eventMap = root.events[eventName];\r\n                    var data = new EventData$1(eventName);\r\n                    data.intValue = this.getValue(eventMap, \"int\", 0);\r\n                    data.floatValue = this.getValue(eventMap, \"float\", 0);\r\n                    data.stringValue = this.getValue(eventMap, \"string\", \"\");\r\n                    data.audioPath = this.getValue(eventMap, \"audio\", null);\r\n                    if (data.audioPath != null) {\r\n                        data.volume = this.getValue(eventMap, \"volume\", 1);\r\n                        data.balance = this.getValue(eventMap, \"balance\", 0);\r\n                    }\r\n                    skeletonData.events.push(data);\r\n                }\r\n            }\r\n            // Animations.\r\n            if (root.animations) {\r\n                for (var animationName in root.animations) {\r\n                    var animationMap = root.animations[animationName];\r\n                    this.readAnimation(animationMap, animationName, skeletonData);\r\n                }\r\n            }\r\n            return skeletonData;\r\n        };\r\n        SkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) {\r\n            var scale = this.scale;\r\n            name = this.getValue(map, \"name\", name);\r\n            var type = this.getValue(map, \"type\", \"region\");\r\n            switch (type) {\r\n                case \"region\": {\r\n                    var path = this.getValue(map, \"path\", name);\r\n                    var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n                    if (region == null)\r\n                        return null;\r\n                    region.path = path;\r\n                    region.x = this.getValue(map, \"x\", 0) * scale;\r\n                    region.y = this.getValue(map, \"y\", 0) * scale;\r\n                    region.scaleX = this.getValue(map, \"scaleX\", 1);\r\n                    region.scaleY = this.getValue(map, \"scaleY\", 1);\r\n                    region.rotation = this.getValue(map, \"rotation\", 0);\r\n                    region.width = map.width * scale;\r\n                    region.height = map.height * scale;\r\n                    var color = this.getValue(map, \"color\", null);\r\n                    if (color != null)\r\n                        region.color.setFromString(color);\r\n                    //region.updateOffset();\r\n                    return region;\r\n                }\r\n                case \"boundingbox\": {\r\n                    var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n                    if (box == null)\r\n                        return null;\r\n                    this.readVertices(map, box, map.vertexCount << 1);\r\n                    var color = this.getValue(map, \"color\", null);\r\n                    if (color != null)\r\n                        box.color.setFromString(color);\r\n                    return box;\r\n                }\r\n                case \"mesh\":\r\n                case \"linkedmesh\": {\r\n                    var path = this.getValue(map, \"path\", name);\r\n                    var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n                    if (mesh == null)\r\n                        return null;\r\n                    mesh.path = path;\r\n                    var color = this.getValue(map, \"color\", null);\r\n                    if (color != null)\r\n                        mesh.color.setFromString(color);\r\n                    var parent_3 = this.getValue(map, \"parent\", null);\r\n                    if (parent_3 != null) {\r\n                        mesh.inheritDeform = this.getValue(map, \"deform\", true);\r\n                        this.linkedMeshes.push(new LinkedMesh$2(mesh, this.getValue(map, \"skin\", null), slotIndex, parent_3));\r\n                        return mesh;\r\n                    }\r\n                    var uvs = map.uvs;\r\n                    this.readVertices(map, mesh, uvs.length);\r\n                    mesh.triangles = map.triangles;\r\n                    mesh.regionUVs = new Float32Array(uvs);\r\n                    //mesh.updateUVs();\r\n                    mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\r\n                    return mesh;\r\n                }\r\n                case \"path\": {\r\n                    var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n                    if (path == null)\r\n                        return null;\r\n                    path.closed = this.getValue(map, \"closed\", false);\r\n                    path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\r\n                    var vertexCount = map.vertexCount;\r\n                    this.readVertices(map, path, vertexCount << 1);\r\n                    var lengths = Utils.newArray(vertexCount / 3, 0);\r\n                    for (var i = 0; i < map.lengths.length; i++)\r\n                        lengths[i] = map.lengths[i] * scale;\r\n                    path.lengths = lengths;\r\n                    var color = this.getValue(map, \"color\", null);\r\n                    if (color != null)\r\n                        path.color.setFromString(color);\r\n                    return path;\r\n                }\r\n                case \"point\": {\r\n                    var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n                    if (point == null)\r\n                        return null;\r\n                    point.x = this.getValue(map, \"x\", 0) * scale;\r\n                    point.y = this.getValue(map, \"y\", 0) * scale;\r\n                    point.rotation = this.getValue(map, \"rotation\", 0);\r\n                    var color = this.getValue(map, \"color\", null);\r\n                    if (color != null)\r\n                        point.color.setFromString(color);\r\n                    return point;\r\n                }\r\n                case \"clipping\": {\r\n                    var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n                    if (clip == null)\r\n                        return null;\r\n                    var end = this.getValue(map, \"end\", null);\r\n                    if (end != null) {\r\n                        var slot = skeletonData.findSlot(end);\r\n                        if (slot == null)\r\n                            throw new Error(\"Clipping end slot not found: \" + end);\r\n                        clip.endSlot = slot;\r\n                    }\r\n                    var vertexCount = map.vertexCount;\r\n                    this.readVertices(map, clip, vertexCount << 1);\r\n                    var color = this.getValue(map, \"color\", null);\r\n                    if (color != null)\r\n                        clip.color.setFromString(color);\r\n                    return clip;\r\n                }\r\n            }\r\n            return null;\r\n        };\r\n        SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) {\r\n            var scale = this.scale;\r\n            attachment.worldVerticesLength = verticesLength;\r\n            var vertices = map.vertices;\r\n            if (verticesLength == vertices.length) {\r\n                var scaledVertices = Utils.toFloatArray(vertices);\r\n                if (scale != 1) {\r\n                    for (var i = 0, n = vertices.length; i < n; i++)\r\n                        scaledVertices[i] *= scale;\r\n                }\r\n                attachment.vertices = scaledVertices;\r\n                return;\r\n            }\r\n            var weights = new Array();\r\n            var bones = new Array();\r\n            for (var i = 0, n = vertices.length; i < n;) {\r\n                var boneCount = vertices[i++];\r\n                bones.push(boneCount);\r\n                for (var nn = i + boneCount * 4; i < nn; i += 4) {\r\n                    bones.push(vertices[i]);\r\n                    weights.push(vertices[i + 1] * scale);\r\n                    weights.push(vertices[i + 2] * scale);\r\n                    weights.push(vertices[i + 3]);\r\n                }\r\n            }\r\n            attachment.bones = bones;\r\n            attachment.vertices = Utils.toFloatArray(weights);\r\n        };\r\n        SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) {\r\n            var scale = this.scale;\r\n            var timelines = new Array();\r\n            var duration = 0;\r\n            // Slot timelines.\r\n            if (map.slots) {\r\n                for (var slotName in map.slots) {\r\n                    var slotMap = map.slots[slotName];\r\n                    var slotIndex = skeletonData.findSlotIndex(slotName);\r\n                    if (slotIndex == -1)\r\n                        throw new Error(\"Slot not found: \" + slotName);\r\n                    for (var timelineName in slotMap) {\r\n                        var timelineMap = slotMap[timelineName];\r\n                        if (timelineName == \"attachment\") {\r\n                            var timeline = new AttachmentTimeline$1(timelineMap.length);\r\n                            timeline.slotIndex = slotIndex;\r\n                            var frameIndex = 0;\r\n                            for (var i = 0; i < timelineMap.length; i++) {\r\n                                var valueMap = timelineMap[i];\r\n                                timeline.setFrame(frameIndex++, valueMap.time, valueMap.name);\r\n                            }\r\n                            timelines.push(timeline);\r\n                            duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n                        }\r\n                        else if (timelineName == \"color\") {\r\n                            var timeline = new ColorTimeline(timelineMap.length);\r\n                            timeline.slotIndex = slotIndex;\r\n                            var frameIndex = 0;\r\n                            for (var i = 0; i < timelineMap.length; i++) {\r\n                                var valueMap = timelineMap[i];\r\n                                var color = new Color();\r\n                                color.setFromString(valueMap.color || \"ffffffff\");\r\n                                timeline.setFrame(frameIndex, valueMap.time, color.r, color.g, color.b, color.a);\r\n                                this.readCurve(valueMap, timeline, frameIndex);\r\n                                frameIndex++;\r\n                            }\r\n                            timelines.push(timeline);\r\n                            duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * ColorTimeline.ENTRIES]);\r\n                        }\r\n                        else if (timelineName == \"twoColor\") {\r\n                            var timeline = new TwoColorTimeline(timelineMap.length);\r\n                            timeline.slotIndex = slotIndex;\r\n                            var frameIndex = 0;\r\n                            for (var i = 0; i < timelineMap.length; i++) {\r\n                                var valueMap = timelineMap[i];\r\n                                var light = new Color();\r\n                                var dark = new Color();\r\n                                light.setFromString(valueMap.light);\r\n                                dark.setFromString(valueMap.dark);\r\n                                timeline.setFrame(frameIndex, valueMap.time, light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\r\n                                this.readCurve(valueMap, timeline, frameIndex);\r\n                                frameIndex++;\r\n                            }\r\n                            timelines.push(timeline);\r\n                            duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * TwoColorTimeline.ENTRIES]);\r\n                        }\r\n                        else\r\n                            throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\r\n                    }\r\n                }\r\n            }\r\n            // Bone timelines.\r\n            if (map.bones) {\r\n                for (var boneName in map.bones) {\r\n                    var boneMap = map.bones[boneName];\r\n                    var boneIndex = skeletonData.findBoneIndex(boneName);\r\n                    if (boneIndex == -1)\r\n                        throw new Error(\"Bone not found: \" + boneName);\r\n                    for (var timelineName in boneMap) {\r\n                        var timelineMap = boneMap[timelineName];\r\n                        if (timelineName === \"rotate\") {\r\n                            var timeline = new RotateTimeline$1(timelineMap.length);\r\n                            timeline.boneIndex = boneIndex;\r\n                            var frameIndex = 0;\r\n                            for (var i = 0; i < timelineMap.length; i++) {\r\n                                var valueMap = timelineMap[i];\r\n                                timeline.setFrame(frameIndex, valueMap.time, valueMap.angle);\r\n                                this.readCurve(valueMap, timeline, frameIndex);\r\n                                frameIndex++;\r\n                            }\r\n                            timelines.push(timeline);\r\n                            duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * RotateTimeline$1.ENTRIES]);\r\n                        }\r\n                        else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\r\n                            var timeline = null;\r\n                            var timelineScale = 1;\r\n                            if (timelineName === \"scale\")\r\n                                timeline = new ScaleTimeline$1(timelineMap.length);\r\n                            else if (timelineName === \"shear\")\r\n                                timeline = new ShearTimeline$1(timelineMap.length);\r\n                            else {\r\n                                timeline = new TranslateTimeline$1(timelineMap.length);\r\n                                timelineScale = scale;\r\n                            }\r\n                            timeline.boneIndex = boneIndex;\r\n                            var frameIndex = 0;\r\n                            for (var i = 0; i < timelineMap.length; i++) {\r\n                                var valueMap = timelineMap[i];\r\n                                var x = this.getValue(valueMap, \"x\", 0), y = this.getValue(valueMap, \"y\", 0);\r\n                                timeline.setFrame(frameIndex, valueMap.time, x * timelineScale, y * timelineScale);\r\n                                this.readCurve(valueMap, timeline, frameIndex);\r\n                                frameIndex++;\r\n                            }\r\n                            timelines.push(timeline);\r\n                            duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * TranslateTimeline$1.ENTRIES]);\r\n                        }\r\n                        else\r\n                            throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\r\n                    }\r\n                }\r\n            }\r\n            // IK constraint timelines.\r\n            if (map.ik) {\r\n                for (var constraintName in map.ik) {\r\n                    var constraintMap = map.ik[constraintName];\r\n                    var constraint = skeletonData.findIkConstraint(constraintName);\r\n                    var timeline = new IkConstraintTimeline$1(constraintMap.length);\r\n                    timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\r\n                    var frameIndex = 0;\r\n                    for (var i = 0; i < constraintMap.length; i++) {\r\n                        var valueMap = constraintMap[i];\r\n                        timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1, this.getValue(valueMap, \"compress\", false), this.getValue(valueMap, \"stretch\", false));\r\n                        this.readCurve(valueMap, timeline, frameIndex);\r\n                        frameIndex++;\r\n                    }\r\n                    timelines.push(timeline);\r\n                    duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * IkConstraintTimeline$1.ENTRIES]);\r\n                }\r\n            }\r\n            // Transform constraint timelines.\r\n            if (map.transform) {\r\n                for (var constraintName in map.transform) {\r\n                    var constraintMap = map.transform[constraintName];\r\n                    var constraint = skeletonData.findTransformConstraint(constraintName);\r\n                    var timeline = new TransformConstraintTimeline$1(constraintMap.length);\r\n                    timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\r\n                    var frameIndex = 0;\r\n                    for (var i = 0; i < constraintMap.length; i++) {\r\n                        var valueMap = constraintMap[i];\r\n                        timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\r\n                        this.readCurve(valueMap, timeline, frameIndex);\r\n                        frameIndex++;\r\n                    }\r\n                    timelines.push(timeline);\r\n                    duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * TransformConstraintTimeline$1.ENTRIES]);\r\n                }\r\n            }\r\n            // Path constraint timelines.\r\n            if (map.paths) {\r\n                for (var constraintName in map.paths) {\r\n                    var constraintMap = map.paths[constraintName];\r\n                    var index = skeletonData.findPathConstraintIndex(constraintName);\r\n                    if (index == -1)\r\n                        throw new Error(\"Path constraint not found: \" + constraintName);\r\n                    var data = skeletonData.pathConstraints[index];\r\n                    for (var timelineName in constraintMap) {\r\n                        var timelineMap = constraintMap[timelineName];\r\n                        if (timelineName === \"position\" || timelineName === \"spacing\") {\r\n                            var timeline = null;\r\n                            var timelineScale = 1;\r\n                            if (timelineName === \"spacing\") {\r\n                                timeline = new PathConstraintSpacingTimeline$1(timelineMap.length);\r\n                                if (data.spacingMode == SpacingMode$1.Length || data.spacingMode == SpacingMode$1.Fixed)\r\n                                    timelineScale = scale;\r\n                            }\r\n                            else {\r\n                                timeline = new PathConstraintPositionTimeline$1(timelineMap.length);\r\n                                if (data.positionMode == exports.PositionMode.Fixed)\r\n                                    timelineScale = scale;\r\n                            }\r\n                            timeline.pathConstraintIndex = index;\r\n                            var frameIndex = 0;\r\n                            for (var i = 0; i < timelineMap.length; i++) {\r\n                                var valueMap = timelineMap[i];\r\n                                timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, timelineName, 0) * timelineScale);\r\n                                this.readCurve(valueMap, timeline, frameIndex);\r\n                                frameIndex++;\r\n                            }\r\n                            timelines.push(timeline);\r\n                            duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * PathConstraintPositionTimeline$1.ENTRIES]);\r\n                        }\r\n                        else if (timelineName === \"mix\") {\r\n                            var timeline = new PathConstraintMixTimeline$1(timelineMap.length);\r\n                            timeline.pathConstraintIndex = index;\r\n                            var frameIndex = 0;\r\n                            for (var i = 0; i < timelineMap.length; i++) {\r\n                                var valueMap = timelineMap[i];\r\n                                timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1));\r\n                                this.readCurve(valueMap, timeline, frameIndex);\r\n                                frameIndex++;\r\n                            }\r\n                            timelines.push(timeline);\r\n                            duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * PathConstraintMixTimeline$1.ENTRIES]);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            // Deform timelines.\r\n            if (map.deform) {\r\n                for (var deformName in map.deform) {\r\n                    var deformMap = map.deform[deformName];\r\n                    var skin = skeletonData.findSkin(deformName);\r\n                    if (skin == null) {\r\n                        if (settings.FAIL_ON_NON_EXISTING_SKIN) {\r\n                            throw new Error(\"Skin not found: \" + deformName);\r\n                        }\r\n                        else {\r\n                            continue;\r\n                        }\r\n                    }\r\n                    for (var slotName in deformMap) {\r\n                        var slotMap = deformMap[slotName];\r\n                        var slotIndex = skeletonData.findSlotIndex(slotName);\r\n                        if (slotIndex == -1)\r\n                            throw new Error(\"Slot not found: \" + slotMap.name);\r\n                        for (var timelineName in slotMap) {\r\n                            var timelineMap = slotMap[timelineName];\r\n                            var attachment = skin.getAttachment(slotIndex, timelineName);\r\n                            if (attachment == null)\r\n                                throw new Error(\"Deform attachment not found: \" + timelineMap.name);\r\n                            var weighted = attachment.bones != null;\r\n                            var vertices = attachment.vertices;\r\n                            var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n                            var timeline = new DeformTimeline$1(timelineMap.length);\r\n                            timeline.slotIndex = slotIndex;\r\n                            timeline.attachment = attachment;\r\n                            var frameIndex = 0;\r\n                            for (var j = 0; j < timelineMap.length; j++) {\r\n                                var valueMap = timelineMap[j];\r\n                                var deform = void 0;\r\n                                var verticesValue = this.getValue(valueMap, \"vertices\", null);\r\n                                if (verticesValue == null)\r\n                                    deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\r\n                                else {\r\n                                    deform = Utils.newFloatArray(deformLength);\r\n                                    var start = this.getValue(valueMap, \"offset\", 0);\r\n                                    Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\r\n                                    if (scale != 1) {\r\n                                        for (var i = start, n = i + verticesValue.length; i < n; i++)\r\n                                            deform[i] *= scale;\r\n                                    }\r\n                                    if (!weighted) {\r\n                                        for (var i = 0; i < deformLength; i++)\r\n                                            deform[i] += vertices[i];\r\n                                    }\r\n                                }\r\n                                timeline.setFrame(frameIndex, valueMap.time, deform);\r\n                                this.readCurve(valueMap, timeline, frameIndex);\r\n                                frameIndex++;\r\n                            }\r\n                            timelines.push(timeline);\r\n                            duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            // Draw order timeline.\r\n            var drawOrderNode = map.drawOrder;\r\n            if (drawOrderNode == null)\r\n                drawOrderNode = map.draworder;\r\n            if (drawOrderNode != null) {\r\n                var timeline = new DrawOrderTimeline$1(drawOrderNode.length);\r\n                var slotCount = skeletonData.slots.length;\r\n                var frameIndex = 0;\r\n                for (var j = 0; j < drawOrderNode.length; j++) {\r\n                    var drawOrderMap = drawOrderNode[j];\r\n                    var drawOrder = null;\r\n                    var offsets = this.getValue(drawOrderMap, \"offsets\", null);\r\n                    if (offsets != null) {\r\n                        drawOrder = Utils.newArray(slotCount, -1);\r\n                        var unchanged = Utils.newArray(slotCount - offsets.length, 0);\r\n                        var originalIndex = 0, unchangedIndex = 0;\r\n                        for (var i = 0; i < offsets.length; i++) {\r\n                            var offsetMap = offsets[i];\r\n                            var slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\r\n                            if (slotIndex == -1)\r\n                                throw new Error(\"Slot not found: \" + offsetMap.slot);\r\n                            // Collect unchanged items.\r\n                            while (originalIndex != slotIndex)\r\n                                unchanged[unchangedIndex++] = originalIndex++;\r\n                            // Set changed items.\r\n                            drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\r\n                        }\r\n                        // Collect remaining unchanged items.\r\n                        while (originalIndex < slotCount)\r\n                            unchanged[unchangedIndex++] = originalIndex++;\r\n                        // Fill in unchanged items.\r\n                        for (var i = slotCount - 1; i >= 0; i--)\r\n                            if (drawOrder[i] == -1)\r\n                                drawOrder[i] = unchanged[--unchangedIndex];\r\n                    }\r\n                    timeline.setFrame(frameIndex++, drawOrderMap.time, drawOrder);\r\n                }\r\n                timelines.push(timeline);\r\n                duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n            }\r\n            // Event timeline.\r\n            if (map.events) {\r\n                var timeline = new EventTimeline$1(map.events.length);\r\n                var frameIndex = 0;\r\n                for (var i = 0; i < map.events.length; i++) {\r\n                    var eventMap = map.events[i];\r\n                    var eventData = skeletonData.findEvent(eventMap.name);\r\n                    if (eventData == null)\r\n                        throw new Error(\"Event not found: \" + eventMap.name);\r\n                    var event_1 = new Event$1(Utils.toSinglePrecision(eventMap.time), eventData);\r\n                    event_1.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\r\n                    event_1.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\r\n                    event_1.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\r\n                    if (event_1.data.audioPath != null) {\r\n                        event_1.volume = this.getValue(eventMap, \"volume\", 1);\r\n                        event_1.balance = this.getValue(eventMap, \"balance\", 0);\r\n                    }\r\n                    timeline.setFrame(frameIndex++, event_1);\r\n                }\r\n                timelines.push(timeline);\r\n                duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n            }\r\n            if (isNaN(duration)) {\r\n                throw new Error(\"Error while parsing animation, duration is NaN\");\r\n            }\r\n            skeletonData.animations.push(new Animation$1(name, timelines, duration));\r\n        };\r\n        SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {\r\n            if (!map.curve)\r\n                return;\r\n            if (map.curve === \"stepped\")\r\n                timeline.setStepped(frameIndex);\r\n            else if (Object.prototype.toString.call(map.curve) === '[object Array]') {\r\n                var curve = map.curve;\r\n                timeline.setCurve(frameIndex, curve[0], curve[1], curve[2], curve[3]);\r\n            }\r\n        };\r\n        SkeletonJson.prototype.getValue = function (map, prop, defaultValue) {\r\n            return map[prop] !== undefined ? map[prop] : defaultValue;\r\n        };\r\n        SkeletonJson.blendModeFromString = function (str) {\r\n            str = str.toLowerCase();\r\n            if (str == \"normal\")\r\n                return constants.BLEND_MODES.NORMAL;\r\n            if (str == \"additive\")\r\n                return constants.BLEND_MODES.ADD;\r\n            if (str == \"multiply\")\r\n                return constants.BLEND_MODES.MULTIPLY;\r\n            if (str == \"screen\")\r\n                return constants.BLEND_MODES.SCREEN;\r\n            throw new Error(\"Unknown blend mode: \" + str);\r\n        };\r\n        SkeletonJson.positionModeFromString = function (str) {\r\n            str = str.toLowerCase();\r\n            if (str == \"fixed\")\r\n                return exports.PositionMode.Fixed;\r\n            if (str == \"percent\")\r\n                return exports.PositionMode.Percent;\r\n            throw new Error(\"Unknown position mode: \" + str);\r\n        };\r\n        SkeletonJson.spacingModeFromString = function (str) {\r\n            str = str.toLowerCase();\r\n            if (str == \"length\")\r\n                return SpacingMode$1.Length;\r\n            if (str == \"fixed\")\r\n                return SpacingMode$1.Fixed;\r\n            if (str == \"percent\")\r\n                return SpacingMode$1.Percent;\r\n            throw new Error(\"Unknown position mode: \" + str);\r\n        };\r\n        SkeletonJson.rotateModeFromString = function (str) {\r\n            str = str.toLowerCase();\r\n            if (str == \"tangent\")\r\n                return exports.RotateMode.Tangent;\r\n            if (str == \"chain\")\r\n                return exports.RotateMode.Chain;\r\n            if (str == \"chainscale\")\r\n                return exports.RotateMode.ChainScale;\r\n            throw new Error(\"Unknown rotate mode: \" + str);\r\n        };\r\n        SkeletonJson.transformModeFromString = function (str) {\r\n            str = str.toLowerCase();\r\n            if (str == \"normal\")\r\n                return exports.TransformMode.Normal;\r\n            if (str == \"onlytranslation\")\r\n                return exports.TransformMode.OnlyTranslation;\r\n            if (str == \"norotationorreflection\")\r\n                return exports.TransformMode.NoRotationOrReflection;\r\n            if (str == \"noscale\")\r\n                return exports.TransformMode.NoScale;\r\n            if (str == \"noscaleorreflection\")\r\n                return exports.TransformMode.NoScaleOrReflection;\r\n            throw new Error(\"Unknown transform mode: \" + str);\r\n        };\r\n        return SkeletonJson;\r\n    }());\r\n    var LinkedMesh$2 = /** @class */ (function () {\r\n        function LinkedMesh(mesh, skin, slotIndex, parent) {\r\n            this.mesh = mesh;\r\n            this.skin = skin;\r\n            this.slotIndex = slotIndex;\r\n            this.parent = parent;\r\n        }\r\n        return LinkedMesh;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var Spine$2 = /** @class */ (function (_super) {\r\n        __extends$2(Spine, _super);\r\n        function Spine() {\r\n            return _super !== null && _super.apply(this, arguments) || this;\r\n        }\r\n        Spine.prototype.createSkeleton = function (spineData) {\r\n            this.skeleton = new Skeleton$1(spineData);\r\n            this.skeleton.updateWorldTransform();\r\n            this.stateData = new AnimationStateData$1(spineData);\r\n            this.state = new AnimationState$1(this.stateData);\r\n        };\r\n        return Spine;\r\n    }(SpineBase));\n\n    var spine37 = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        Animation: Animation$1,\n        AnimationState: AnimationState$1,\n        AnimationStateAdapter2: AnimationStateAdapter2,\n        AnimationStateData: AnimationStateData$1,\n        AtlasAttachmentLoader: AtlasAttachmentLoader$1,\n        Attachment: Attachment$1,\n        AttachmentTimeline: AttachmentTimeline$1,\n        Bone: Bone$1,\n        BoneData: BoneData$1,\n        BoundingBoxAttachment: BoundingBoxAttachment$1,\n        ClippingAttachment: ClippingAttachment$1,\n        ColorTimeline: ColorTimeline,\n        CurveTimeline: CurveTimeline$1,\n        DeformTimeline: DeformTimeline$1,\n        DrawOrderTimeline: DrawOrderTimeline$1,\n        Event: Event$1,\n        EventData: EventData$1,\n        EventQueue: EventQueue$1,\n        EventTimeline: EventTimeline$1,\n        get EventType () { return EventType$1; },\n        IkConstraint: IkConstraint$1,\n        IkConstraintData: IkConstraintData$1,\n        IkConstraintTimeline: IkConstraintTimeline$1,\n        JitterEffect: JitterEffect$1,\n        MeshAttachment: MeshAttachment$1,\n        PathAttachment: PathAttachment$1,\n        PathConstraint: PathConstraint$1,\n        PathConstraintData: PathConstraintData$1,\n        PathConstraintMixTimeline: PathConstraintMixTimeline$1,\n        PathConstraintPositionTimeline: PathConstraintPositionTimeline$1,\n        PathConstraintSpacingTimeline: PathConstraintSpacingTimeline$1,\n        PointAttachment: PointAttachment$1,\n        RegionAttachment: RegionAttachment$1,\n        RotateTimeline: RotateTimeline$1,\n        ScaleTimeline: ScaleTimeline$1,\n        ShearTimeline: ShearTimeline$1,\n        Skeleton: Skeleton$1,\n        SkeletonBounds: SkeletonBounds$1,\n        SkeletonData: SkeletonData$1,\n        SkeletonJson: SkeletonJson$1,\n        Skin: Skin$1,\n        Slot: Slot$1,\n        SlotData: SlotData$1,\n        get SpacingMode () { return SpacingMode$1; },\n        Spine: Spine$2,\n        SwirlEffect: SwirlEffect$1,\n        get TimelineType () { return TimelineType; },\n        TrackEntry: TrackEntry$1,\n        TransformConstraint: TransformConstraint$1,\n        TransformConstraintData: TransformConstraintData$1,\n        TransformConstraintTimeline: TransformConstraintTimeline$1,\n        TranslateTimeline: TranslateTimeline$1,\n        TwoColorTimeline: TwoColorTimeline,\n        VertexAttachment: VertexAttachment$1\n    });\n\n    /* eslint-disable */\n\n    /*! *****************************************************************************\r\n    Copyright (c) Microsoft Corporation.\r\n\r\n    Permission to use, copy, modify, and/or distribute this software for any\r\n    purpose with or without fee is hereby granted.\r\n\r\n    THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\n    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\n    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\n    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\n    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\n    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\n    PERFORMANCE OF THIS SOFTWARE.\r\n    ***************************************************************************** */\r\n    /* global Reflect, Promise */\r\n\r\n    var extendStatics$1 = function(d, b) {\r\n        extendStatics$1 = Object.setPrototypeOf ||\r\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n        return extendStatics$1(d, b);\r\n    };\r\n\r\n    function __extends$1(d, b) {\r\n        if (typeof b !== \"function\" && b !== null)\r\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n        extendStatics$1(d, b);\r\n        function __() { this.constructor = d; }\r\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n    }\n\n    /**\r\n     * The base class for all attachments.\r\n     * @public\r\n     */\r\n    var Attachment = /** @class */ (function () {\r\n        function Attachment(name) {\r\n            if (!name)\r\n                throw new Error(\"name cannot be null.\");\r\n            this.name = name;\r\n        }\r\n        return Attachment;\r\n    }());\r\n    /**\r\n     * Base class for an attachment with vertices that are transformed by one or more bones and can be deformed by a slot's\r\n     * {@link Slot#deform}.\r\n     * @public\r\n     */\r\n    var VertexAttachment = /** @class */ (function (_super) {\r\n        __extends$1(VertexAttachment, _super);\r\n        function VertexAttachment(name) {\r\n            var _this = _super.call(this, name) || this;\r\n            /** The unique ID for this attachment. */\r\n            _this.id = VertexAttachment.nextID++;\r\n            /** The maximum number of world vertex values that can be output by\r\n             * {@link #computeWorldVertices()} using the `count` parameter. */\r\n            _this.worldVerticesLength = 0;\r\n            /** Deform keys for the deform attachment are also applied to this attachment. May be null if no deform keys should be applied. */\r\n            _this.deformAttachment = _this;\r\n            return _this;\r\n        }\r\n        VertexAttachment.prototype.computeWorldVerticesOld = function (slot, worldVertices) {\r\n            this.computeWorldVertices(slot, 0, this.worldVerticesLength, worldVertices, 0, 2);\r\n        };\r\n        /** Transforms the attachment's local {@link #vertices} to world coordinates. If the slot's {@link Slot#deform} is\r\n         * not empty, it is used to deform the vertices.\r\n         *\r\n         * See [World transforms](http://esotericsoftware.com/spine-runtime-skeletons#World-transforms) in the Spine\r\n         * Runtimes Guide.\r\n         * @param start The index of the first {@link #vertices} value to transform. Each vertex has 2 values, x and y.\r\n         * @param count The number of world vertex values to output. Must be <= {@link #worldVerticesLength} - `start`.\r\n         * @param worldVertices The output world vertices. Must have a length >= `offset` + `count` *\r\n         *           `stride` / 2.\r\n         * @param offset The `worldVertices` index to begin writing values.\r\n         * @param stride The number of `worldVertices` entries between the value pairs written. */\r\n        VertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) {\r\n            count = offset + (count >> 1) * stride;\r\n            var skeleton = slot.bone.skeleton;\r\n            var deformArray = slot.deform;\r\n            var vertices = this.vertices;\r\n            var bones = this.bones;\r\n            if (!bones) {\r\n                if (deformArray.length > 0)\r\n                    vertices = deformArray;\r\n                var mat = slot.bone.matrix;\r\n                var x = mat.tx;\r\n                var y = mat.ty;\r\n                var a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n                for (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) {\r\n                    var vx = vertices[v_1], vy = vertices[v_1 + 1];\r\n                    worldVertices[w] = vx * a + vy * b + x;\r\n                    worldVertices[w + 1] = vx * c + vy * d + y;\r\n                }\r\n                return;\r\n            }\r\n            var v = 0, skip = 0;\r\n            for (var i = 0; i < start; i += 2) {\r\n                var n = bones[v];\r\n                v += n + 1;\r\n                skip += n;\r\n            }\r\n            var skeletonBones = skeleton.bones;\r\n            if (deformArray.length == 0) {\r\n                for (var w = offset, b = skip * 3; w < count; w += stride) {\r\n                    var wx = 0, wy = 0;\r\n                    var n = bones[v++];\r\n                    n += v;\r\n                    for (; v < n; v++, b += 3) {\r\n                        var mat = skeletonBones[bones[v]].matrix;\r\n                        var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\r\n                        wx += (vx * mat.a + vy * mat.c + mat.tx) * weight;\r\n                        wy += (vx * mat.b + vy * mat.d + mat.ty) * weight;\r\n                    }\r\n                    worldVertices[w] = wx;\r\n                    worldVertices[w + 1] = wy;\r\n                }\r\n            }\r\n            else {\r\n                var deform = deformArray;\r\n                for (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\r\n                    var wx = 0, wy = 0;\r\n                    var n = bones[v++];\r\n                    n += v;\r\n                    for (; v < n; v++, b += 3, f += 2) {\r\n                        var mat = skeletonBones[bones[v]].matrix;\r\n                        var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\r\n                        wx += (vx * mat.a + vy * mat.c + mat.tx) * weight;\r\n                        wy += (vx * mat.b + vy * mat.d + mat.ty) * weight;\r\n                    }\r\n                    worldVertices[w] = wx;\r\n                    worldVertices[w + 1] = wy;\r\n                }\r\n            }\r\n        };\r\n        /** Does not copy id (generated) or name (set on construction). **/\r\n        VertexAttachment.prototype.copyTo = function (attachment) {\r\n            if (this.bones) {\r\n                attachment.bones = new Array(this.bones.length);\r\n                Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\r\n            }\r\n            else\r\n                attachment.bones = null;\r\n            if (this.vertices) {\r\n                attachment.vertices = Utils.newFloatArray(this.vertices.length);\r\n                Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\r\n            }\r\n            else\r\n                attachment.vertices = null;\r\n            attachment.worldVerticesLength = this.worldVerticesLength;\r\n            attachment.deformAttachment = this.deformAttachment;\r\n        };\r\n        VertexAttachment.nextID = 0;\r\n        return VertexAttachment;\r\n    }(Attachment));\n\n    /**\r\n     * @public\r\n     */\r\n    var BoundingBoxAttachment = /** @class */ (function (_super) {\r\n        __extends$1(BoundingBoxAttachment, _super);\r\n        function BoundingBoxAttachment(name) {\r\n            var _this = _super.call(this, name) || this;\r\n            _this.type = exports.AttachmentType.BoundingBox;\r\n            _this.color = new Color(1, 1, 1, 1);\r\n            return _this;\r\n        }\r\n        BoundingBoxAttachment.prototype.copy = function () {\r\n            var copy = new BoundingBoxAttachment(this.name);\r\n            this.copyTo(copy);\r\n            copy.color.setFromColor(this.color);\r\n            return copy;\r\n        };\r\n        return BoundingBoxAttachment;\r\n    }(VertexAttachment));\n\n    /**\r\n     * @public\r\n     */\r\n    var ClippingAttachment = /** @class */ (function (_super) {\r\n        __extends$1(ClippingAttachment, _super);\r\n        function ClippingAttachment(name) {\r\n            var _this = _super.call(this, name) || this;\r\n            _this.type = exports.AttachmentType.Clipping;\r\n            // Nonessential.\r\n            /** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons\r\n             * are not usually rendered at runtime. */\r\n            _this.color = new Color(0.2275, 0.2275, 0.8078, 1); // ce3a3aff\r\n            return _this;\r\n        }\r\n        ClippingAttachment.prototype.copy = function () {\r\n            var copy = new ClippingAttachment(this.name);\r\n            this.copyTo(copy);\r\n            copy.endSlot = this.endSlot;\r\n            copy.color.setFromColor(this.color);\r\n            return copy;\r\n        };\r\n        return ClippingAttachment;\r\n    }(VertexAttachment));\n\n    /**\r\n     * @public\r\n     */\r\n    var MeshAttachment = /** @class */ (function (_super) {\r\n        __extends$1(MeshAttachment, _super);\r\n        function MeshAttachment(name) {\r\n            var _this = _super.call(this, name) || this;\r\n            _this.type = exports.AttachmentType.Mesh;\r\n            /** The color to tint the mesh. */\r\n            _this.color = new Color(1, 1, 1, 1);\r\n            _this.tempColor = new Color(0, 0, 0, 0);\r\n            return _this;\r\n        }\r\n        /** The parent mesh if this is a linked mesh, else null. A linked mesh shares the {@link #bones}, {@link #vertices},\r\n         * {@link #regionUVs}, {@link #triangles}, {@link #hullLength}, {@link #edges}, {@link #width}, and {@link #height} with the\r\n         * parent mesh, but may have a different {@link #name} or {@link #path} (and therefore a different texture). */\r\n        MeshAttachment.prototype.getParentMesh = function () {\r\n            return this.parentMesh;\r\n        };\r\n        /** @param parentMesh May be null. */\r\n        MeshAttachment.prototype.setParentMesh = function (parentMesh) {\r\n            this.parentMesh = parentMesh;\r\n            if (parentMesh) {\r\n                this.bones = parentMesh.bones;\r\n                this.vertices = parentMesh.vertices;\r\n                this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n                this.regionUVs = parentMesh.regionUVs;\r\n                this.triangles = parentMesh.triangles;\r\n                this.hullLength = parentMesh.hullLength;\r\n                this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n            }\r\n        };\r\n        MeshAttachment.prototype.copy = function () {\r\n            if (this.parentMesh)\r\n                return this.newLinkedMesh();\r\n            var copy = new MeshAttachment(this.name);\r\n            copy.region = this.region;\r\n            copy.path = this.path;\r\n            copy.color.setFromColor(this.color);\r\n            this.copyTo(copy);\r\n            copy.regionUVs = new Float32Array(this.regionUVs.length);\r\n            Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\r\n            copy.triangles = new Array(this.triangles.length);\r\n            Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\r\n            copy.hullLength = this.hullLength;\r\n            // Nonessential.\r\n            if (this.edges) {\r\n                copy.edges = new Array(this.edges.length);\r\n                Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\r\n            }\r\n            copy.width = this.width;\r\n            copy.height = this.height;\r\n            return copy;\r\n        };\r\n        /** Returns a new mesh with the {@link #parentMesh} set to this mesh's parent mesh, if any, else to this mesh. **/\r\n        MeshAttachment.prototype.newLinkedMesh = function () {\r\n            var copy = new MeshAttachment(this.name);\r\n            copy.region = this.region;\r\n            copy.path = this.path;\r\n            copy.color.setFromColor(this.color);\r\n            copy.deformAttachment = this.deformAttachment;\r\n            copy.setParentMesh(this.parentMesh ? this.parentMesh : this);\r\n            // copy.updateUVs();\r\n            return copy;\r\n        };\r\n        return MeshAttachment;\r\n    }(VertexAttachment));\n\n    /**\r\n     * @public\r\n     */\r\n    var PathAttachment = /** @class */ (function (_super) {\r\n        __extends$1(PathAttachment, _super);\r\n        function PathAttachment(name) {\r\n            var _this = _super.call(this, name) || this;\r\n            _this.type = exports.AttachmentType.Path;\r\n            /** If true, the start and end knots are connected. */\r\n            _this.closed = false;\r\n            /** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer\r\n             * calculations are performed but calculating positions along the path is less accurate. */\r\n            _this.constantSpeed = false;\r\n            /** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually\r\n             * rendered at runtime. */\r\n            _this.color = new Color(1, 1, 1, 1);\r\n            return _this;\r\n        }\r\n        PathAttachment.prototype.copy = function () {\r\n            var copy = new PathAttachment(this.name);\r\n            this.copyTo(copy);\r\n            copy.lengths = new Array(this.lengths.length);\r\n            Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\r\n            copy.closed = closed;\r\n            copy.constantSpeed = this.constantSpeed;\r\n            copy.color.setFromColor(this.color);\r\n            return copy;\r\n        };\r\n        return PathAttachment;\r\n    }(VertexAttachment));\n\n    /**\r\n     * @public\r\n     */\r\n    var PointAttachment = /** @class */ (function (_super) {\r\n        __extends$1(PointAttachment, _super);\r\n        function PointAttachment(name) {\r\n            var _this = _super.call(this, name) || this;\r\n            _this.type = exports.AttachmentType.Point;\r\n            /** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments\r\n             * are not usually rendered at runtime. */\r\n            _this.color = new Color(0.38, 0.94, 0, 1);\r\n            return _this;\r\n        }\r\n        PointAttachment.prototype.computeWorldPosition = function (bone, point) {\r\n            var mat = bone.matrix;\r\n            point.x = this.x * mat.a + this.y * mat.c + bone.worldX;\r\n            point.y = this.x * mat.b + this.y * mat.d + bone.worldY;\r\n            return point;\r\n        };\r\n        PointAttachment.prototype.computeWorldRotation = function (bone) {\r\n            var mat = bone.matrix;\r\n            var cos = MathUtils.cosDeg(this.rotation), sin = MathUtils.sinDeg(this.rotation);\r\n            var x = cos * mat.a + sin * mat.c;\r\n            var y = cos * mat.b + sin * mat.d;\r\n            return Math.atan2(y, x) * MathUtils.radDeg;\r\n        };\r\n        PointAttachment.prototype.copy = function () {\r\n            var copy = new PointAttachment(this.name);\r\n            copy.x = this.x;\r\n            copy.y = this.y;\r\n            copy.rotation = this.rotation;\r\n            copy.color.setFromColor(this.color);\r\n            return copy;\r\n        };\r\n        return PointAttachment;\r\n    }(VertexAttachment));\n\n    /**\r\n     * @public\r\n     */\r\n    var RegionAttachment = /** @class */ (function (_super) {\r\n        __extends$1(RegionAttachment, _super);\r\n        function RegionAttachment(name) {\r\n            var _this = _super.call(this, name) || this;\r\n            _this.type = exports.AttachmentType.Region;\r\n            /** The local x translation. */\r\n            _this.x = 0;\r\n            /** The local y translation. */\r\n            _this.y = 0;\r\n            /** The local scaleX. */\r\n            _this.scaleX = 1;\r\n            /** The local scaleY. */\r\n            _this.scaleY = 1;\r\n            /** The local rotation. */\r\n            _this.rotation = 0;\r\n            /** The width of the region attachment in Spine. */\r\n            _this.width = 0;\r\n            /** The height of the region attachment in Spine. */\r\n            _this.height = 0;\r\n            /** The color to tint the region attachment. */\r\n            _this.color = new Color(1, 1, 1, 1);\r\n            /** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.\r\n             *\r\n             * See {@link #updateOffset()}. */\r\n            _this.offset = Utils.newFloatArray(8);\r\n            _this.uvs = Utils.newFloatArray(8);\r\n            _this.tempColor = new Color(1, 1, 1, 1);\r\n            return _this;\r\n        }\r\n        /** Calculates the {@link #offset} using the region settings. Must be called after changing region settings. */\r\n        RegionAttachment.prototype.updateOffset = function () {\r\n            var regionScaleX = this.width / this.region.originalWidth * this.scaleX;\r\n            var regionScaleY = this.height / this.region.originalHeight * this.scaleY;\r\n            var localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\r\n            var localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\r\n            var localX2 = localX + this.region.width * regionScaleX;\r\n            var localY2 = localY + this.region.height * regionScaleY;\r\n            var radians = this.rotation * Math.PI / 180;\r\n            var cos = Math.cos(radians);\r\n            var sin = Math.sin(radians);\r\n            var localXCos = localX * cos + this.x;\r\n            var localXSin = localX * sin;\r\n            var localYCos = localY * cos + this.y;\r\n            var localYSin = localY * sin;\r\n            var localX2Cos = localX2 * cos + this.x;\r\n            var localX2Sin = localX2 * sin;\r\n            var localY2Cos = localY2 * cos + this.y;\r\n            var localY2Sin = localY2 * sin;\r\n            var offset = this.offset;\r\n            offset[RegionAttachment.OX1] = localXCos - localYSin;\r\n            offset[RegionAttachment.OY1] = localYCos + localXSin;\r\n            offset[RegionAttachment.OX2] = localXCos - localY2Sin;\r\n            offset[RegionAttachment.OY2] = localY2Cos + localXSin;\r\n            offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\r\n            offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\r\n            offset[RegionAttachment.OX4] = localX2Cos - localYSin;\r\n            offset[RegionAttachment.OY4] = localYCos + localX2Sin;\r\n        };\r\n        RegionAttachment.prototype.setRegion = function (region) {\r\n            this.region = region;\r\n            var uvs = this.uvs;\r\n            if (region.degrees == 90) {\r\n                uvs[2] = region.u;\r\n                uvs[3] = region.v2;\r\n                uvs[4] = region.u;\r\n                uvs[5] = region.v;\r\n                uvs[6] = region.u2;\r\n                uvs[7] = region.v;\r\n                uvs[0] = region.u2;\r\n                uvs[1] = region.v2;\r\n            }\r\n            else {\r\n                uvs[0] = region.u;\r\n                uvs[1] = region.v2;\r\n                uvs[2] = region.u;\r\n                uvs[3] = region.v;\r\n                uvs[4] = region.u2;\r\n                uvs[5] = region.v;\r\n                uvs[6] = region.u2;\r\n                uvs[7] = region.v2;\r\n            }\r\n        };\r\n        /** Transforms the attachment's four vertices to world coordinates.\r\n         *\r\n         * See [World transforms](http://esotericsoftware.com/spine-runtime-skeletons#World-transforms) in the Spine\r\n         * Runtimes Guide.\r\n         * @param worldVertices The output world vertices. Must have a length >= `offset` + 8.\r\n         * @param offset The `worldVertices` index to begin writing values.\r\n         * @param stride The number of `worldVertices` entries between the value pairs written. */\r\n        RegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) {\r\n            var vertexOffset = this.offset;\r\n            var mat = bone.matrix;\r\n            var x = mat.tx, y = mat.ty;\r\n            var a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n            var offsetX = 0, offsetY = 0;\r\n            offsetX = vertexOffset[RegionAttachment.OX1];\r\n            offsetY = vertexOffset[RegionAttachment.OY1];\r\n            worldVertices[offset] = offsetX * a + offsetY * b + x; // br\r\n            worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n            offset += stride;\r\n            offsetX = vertexOffset[RegionAttachment.OX2];\r\n            offsetY = vertexOffset[RegionAttachment.OY2];\r\n            worldVertices[offset] = offsetX * a + offsetY * b + x; // bl\r\n            worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n            offset += stride;\r\n            offsetX = vertexOffset[RegionAttachment.OX3];\r\n            offsetY = vertexOffset[RegionAttachment.OY3];\r\n            worldVertices[offset] = offsetX * a + offsetY * b + x; // ul\r\n            worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n            offset += stride;\r\n            offsetX = vertexOffset[RegionAttachment.OX4];\r\n            offsetY = vertexOffset[RegionAttachment.OY4];\r\n            worldVertices[offset] = offsetX * a + offsetY * b + x; // ur\r\n            worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n        };\r\n        RegionAttachment.prototype.copy = function () {\r\n            var copy = new RegionAttachment(this.name);\r\n            copy.region = this.region;\r\n            copy.rendererObject = this.rendererObject;\r\n            copy.path = this.path;\r\n            copy.x = this.x;\r\n            copy.y = this.y;\r\n            copy.scaleX = this.scaleX;\r\n            copy.scaleY = this.scaleY;\r\n            copy.rotation = this.rotation;\r\n            copy.width = this.width;\r\n            copy.height = this.height;\r\n            Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\r\n            Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\r\n            copy.color.setFromColor(this.color);\r\n            return copy;\r\n        };\r\n        RegionAttachment.OX1 = 0;\r\n        RegionAttachment.OY1 = 1;\r\n        RegionAttachment.OX2 = 2;\r\n        RegionAttachment.OY2 = 3;\r\n        RegionAttachment.OX3 = 4;\r\n        RegionAttachment.OY3 = 5;\r\n        RegionAttachment.OX4 = 6;\r\n        RegionAttachment.OY4 = 7;\r\n        RegionAttachment.X1 = 0;\r\n        RegionAttachment.Y1 = 1;\r\n        RegionAttachment.C1R = 2;\r\n        RegionAttachment.C1G = 3;\r\n        RegionAttachment.C1B = 4;\r\n        RegionAttachment.C1A = 5;\r\n        RegionAttachment.U1 = 6;\r\n        RegionAttachment.V1 = 7;\r\n        RegionAttachment.X2 = 8;\r\n        RegionAttachment.Y2 = 9;\r\n        RegionAttachment.C2R = 10;\r\n        RegionAttachment.C2G = 11;\r\n        RegionAttachment.C2B = 12;\r\n        RegionAttachment.C2A = 13;\r\n        RegionAttachment.U2 = 14;\r\n        RegionAttachment.V2 = 15;\r\n        RegionAttachment.X3 = 16;\r\n        RegionAttachment.Y3 = 17;\r\n        RegionAttachment.C3R = 18;\r\n        RegionAttachment.C3G = 19;\r\n        RegionAttachment.C3B = 20;\r\n        RegionAttachment.C3A = 21;\r\n        RegionAttachment.U3 = 22;\r\n        RegionAttachment.V3 = 23;\r\n        RegionAttachment.X4 = 24;\r\n        RegionAttachment.Y4 = 25;\r\n        RegionAttachment.C4R = 26;\r\n        RegionAttachment.C4G = 27;\r\n        RegionAttachment.C4B = 28;\r\n        RegionAttachment.C4A = 29;\r\n        RegionAttachment.U4 = 30;\r\n        RegionAttachment.V4 = 31;\r\n        return RegionAttachment;\r\n    }(Attachment));\n\n    /**\r\n     * @public\r\n     */\r\n    var JitterEffect = /** @class */ (function () {\r\n        function JitterEffect(jitterX, jitterY) {\r\n            this.jitterX = 0;\r\n            this.jitterY = 0;\r\n            this.jitterX = jitterX;\r\n            this.jitterY = jitterY;\r\n        }\r\n        //@ts-ignore\r\n        JitterEffect.prototype.begin = function (skeleton) {\r\n        };\r\n        //@ts-ignore\r\n        JitterEffect.prototype.transform = function (position, uv, light, dark) {\r\n            position.x += MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n            position.y += MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n        };\r\n        JitterEffect.prototype.end = function () {\r\n        };\r\n        return JitterEffect;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var SwirlEffect = /** @class */ (function () {\r\n        function SwirlEffect(radius) {\r\n            this.centerX = 0;\r\n            this.centerY = 0;\r\n            this.radius = 0;\r\n            this.angle = 0;\r\n            this.worldX = 0;\r\n            this.worldY = 0;\r\n            this.radius = radius;\r\n        }\r\n        SwirlEffect.prototype.begin = function (skeleton) {\r\n            this.worldX = skeleton.x + this.centerX;\r\n            this.worldY = skeleton.y + this.centerY;\r\n        };\r\n        //@ts-ignore\r\n        SwirlEffect.prototype.transform = function (position, uv, light, dark) {\r\n            var radAngle = this.angle * MathUtils.degreesToRadians;\r\n            var x = position.x - this.worldX;\r\n            var y = position.y - this.worldY;\r\n            var dist = Math.sqrt(x * x + y * y);\r\n            if (dist < this.radius) {\r\n                var theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\r\n                var cos = Math.cos(theta);\r\n                var sin = Math.sin(theta);\r\n                position.x = cos * x - sin * y + this.worldX;\r\n                position.y = sin * x + cos * y + this.worldY;\r\n            }\r\n        };\r\n        SwirlEffect.prototype.end = function () {\r\n        };\r\n        SwirlEffect.interpolation = new PowOut(2);\r\n        return SwirlEffect;\r\n    }());\n\n    /**\r\n     * A simple container for a list of timelines and a name.\r\n     * @public\r\n     * */\r\n    var Animation = /** @class */ (function () {\r\n        function Animation(name, timelines, duration) {\r\n            this.timelines = null;\r\n            this.timelineIds = null;\r\n            if (!name)\r\n                throw new Error(\"name cannot be null.\");\r\n            this.name = name;\r\n            this.setTimelines(timelines);\r\n            this.duration = duration;\r\n        }\r\n        Animation.prototype.setTimelines = function (timelines) {\r\n            if (!timelines)\r\n                throw new Error(\"timelines cannot be null.\");\r\n            this.timelines = timelines;\r\n            this.timelineIds = new StringSet();\r\n            for (var i = 0; i < timelines.length; i++)\r\n                this.timelineIds.addAll(timelines[i].getPropertyIds());\r\n        };\r\n        Animation.prototype.hasTimeline = function (ids) {\r\n            for (var i = 0; i < ids.length; i++)\r\n                if (this.timelineIds.contains(ids[i]))\r\n                    return true;\r\n            return false;\r\n        };\r\n        /** Applies all the animation's timelines to the specified skeleton.\r\n         *\r\n         * See Timeline {@link Timeline#apply(Skeleton, float, float, Array, float, MixBlend, MixDirection)}.\r\n         * @param loop If true, the animation repeats after {@link #getDuration()}.\r\n         * @param events May be null to ignore fired events. */\r\n        Animation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, blend, direction) {\r\n            if (!skeleton)\r\n                throw new Error(\"skeleton cannot be null.\");\r\n            if (loop && this.duration != 0) {\r\n                time %= this.duration;\r\n                if (lastTime > 0)\r\n                    lastTime %= this.duration;\r\n            }\r\n            var timelines = this.timelines;\r\n            for (var i = 0, n = timelines.length; i < n; i++)\r\n                timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\r\n        };\r\n        return Animation;\r\n    }());\r\n    var Property = {\r\n        rotate: 0,\r\n        x: 1,\r\n        y: 2,\r\n        scaleX: 3,\r\n        scaleY: 4,\r\n        shearX: 5,\r\n        shearY: 6,\r\n        rgb: 7,\r\n        alpha: 8,\r\n        rgb2: 9,\r\n        attachment: 10,\r\n        deform: 11,\r\n        event: 12,\r\n        drawOrder: 13,\r\n        ikConstraint: 14,\r\n        transformConstraint: 15,\r\n        pathConstraintPosition: 16,\r\n        pathConstraintSpacing: 17,\r\n        pathConstraintMix: 18\r\n    };\r\n    /** The interface for all timelines.\r\n     * @public\r\n     * */\r\n    var Timeline = /** @class */ (function () {\r\n        function Timeline(frameCount, propertyIds) {\r\n            this.propertyIds = null;\r\n            this.frames = null;\r\n            this.propertyIds = propertyIds;\r\n            this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());\r\n        }\r\n        Timeline.prototype.getPropertyIds = function () {\r\n            return this.propertyIds;\r\n        };\r\n        Timeline.prototype.getFrameEntries = function () {\r\n            return 1;\r\n        };\r\n        Timeline.prototype.getFrameCount = function () {\r\n            return this.frames.length / this.getFrameEntries();\r\n        };\r\n        Timeline.prototype.getDuration = function () {\r\n            return this.frames[this.frames.length - this.getFrameEntries()];\r\n        };\r\n        Timeline.search1 = function (frames, time) {\r\n            var n = frames.length;\r\n            for (var i = 1; i < n; i++)\r\n                if (frames[i] > time)\r\n                    return i - 1;\r\n            return n - 1;\r\n        };\r\n        Timeline.search = function (frames, time, step) {\r\n            var n = frames.length;\r\n            for (var i = step; i < n; i += step)\r\n                if (frames[i] > time)\r\n                    return i - step;\r\n            return n - step;\r\n        };\r\n        return Timeline;\r\n    }());\r\n    /** The base class for timelines that use interpolation between key frame values.\r\n     * @public\r\n     * */\r\n    var CurveTimeline = /** @class */ (function (_super) {\r\n        __extends$1(CurveTimeline, _super);\r\n        function CurveTimeline(frameCount, bezierCount, propertyIds) {\r\n            var _this = _super.call(this, frameCount, propertyIds) || this;\r\n            _this.curves = null; // type, x, y, ...\r\n            _this.curves = Utils.newFloatArray(frameCount + bezierCount * 18 /*BEZIER_SIZE*/);\r\n            _this.curves[frameCount - 1] = 1 /*STEPPED*/;\r\n            return _this;\r\n        }\r\n        /** Sets the specified key frame to linear interpolation. */\r\n        CurveTimeline.prototype.setLinear = function (frame) {\r\n            this.curves[frame] = 0 /*LINEAR*/;\r\n        };\r\n        /** Sets the specified key frame to stepped interpolation. */\r\n        CurveTimeline.prototype.setStepped = function (frame) {\r\n            this.curves[frame] = 1 /*STEPPED*/;\r\n        };\r\n        /** Shrinks the storage for Bezier curves, for use when <code>bezierCount</code> (specified in the constructor) was larger\r\n         * than the actual number of Bezier curves. */\r\n        CurveTimeline.prototype.shrink = function (bezierCount) {\r\n            var size = this.getFrameCount() + bezierCount * 18 /*BEZIER_SIZE*/;\r\n            if (this.curves.length > size) {\r\n                var newCurves = Utils.newFloatArray(size);\r\n                Utils.arrayCopy(this.curves, 0, newCurves, 0, size);\r\n                this.curves = newCurves;\r\n            }\r\n        };\r\n        /** Stores the segments for the specified Bezier curve. For timelines that modify multiple values, there may be more than\r\n         * one curve per frame.\r\n         * @param bezier The ordinal of this Bezier curve for this timeline, between 0 and <code>bezierCount - 1</code> (specified\r\n         *           in the constructor), inclusive.\r\n         * @param frame Between 0 and <code>frameCount - 1</code>, inclusive.\r\n         * @param value The index of the value for this frame that this curve is used for.\r\n         * @param time1 The time for the first key.\r\n         * @param value1 The value for the first key.\r\n         * @param cx1 The time for the first Bezier handle.\r\n         * @param cy1 The value for the first Bezier handle.\r\n         * @param cx2 The time of the second Bezier handle.\r\n         * @param cy2 The value for the second Bezier handle.\r\n         * @param time2 The time for the second key.\r\n         * @param value2 The value for the second key. */\r\n        CurveTimeline.prototype.setBezier = function (bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\r\n            var curves = this.curves;\r\n            var i = this.getFrameCount() + bezier * 18 /*BEZIER_SIZE*/;\r\n            if (value == 0)\r\n                curves[frame] = 2 /*BEZIER*/ + i;\r\n            var tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = (value1 - cy1 * 2 + cy2) * 0.03;\r\n            var dddx = ((cx1 - cx2) * 3 - time1 + time2) * 0.006, dddy = ((cy1 - cy2) * 3 - value1 + value2) * 0.006;\r\n            var ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\r\n            var dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = (cy1 - value1) * 0.3 + tmpy + dddy * 0.16666667;\r\n            var x = time1 + dx, y = value1 + dy;\r\n            for (var n = i + 18 /*BEZIER_SIZE*/; i < n; i += 2) {\r\n                curves[i] = x;\r\n                curves[i + 1] = y;\r\n                dx += ddx;\r\n                dy += ddy;\r\n                ddx += dddx;\r\n                ddy += dddy;\r\n                x += dx;\r\n                y += dy;\r\n            }\r\n        };\r\n        /** Returns the Bezier interpolated value for the specified time.\r\n         * @param frameIndex The index into {@link #getFrames()} for the values of the frame before <code>time</code>.\r\n         * @param valueOffset The offset from <code>frameIndex</code> to the value this curve is used for.\r\n         * @param i The index of the Bezier segments. See {@link #getCurveType(int)}. */\r\n        CurveTimeline.prototype.getBezierValue = function (time, frameIndex, valueOffset, i) {\r\n            var curves = this.curves;\r\n            if (curves[i] > time) {\r\n                var x_1 = this.frames[frameIndex], y_1 = this.frames[frameIndex + valueOffset];\r\n                return y_1 + (time - x_1) / (curves[i] - x_1) * (curves[i + 1] - y_1);\r\n            }\r\n            var n = i + 18 /*BEZIER_SIZE*/;\r\n            for (i += 2; i < n; i += 2) {\r\n                if (curves[i] >= time) {\r\n                    var x_2 = curves[i - 2], y_2 = curves[i - 1];\r\n                    return y_2 + (time - x_2) / (curves[i] - x_2) * (curves[i + 1] - y_2);\r\n                }\r\n            }\r\n            frameIndex += this.getFrameEntries();\r\n            var x = curves[n - 2], y = curves[n - 1];\r\n            return y + (time - x) / (this.frames[frameIndex] - x) * (this.frames[frameIndex + valueOffset] - y);\r\n        };\r\n        return CurveTimeline;\r\n    }(Timeline));\r\n    /**\r\n     * @public\r\n     */\r\n    var CurveTimeline1 = /** @class */ (function (_super) {\r\n        __extends$1(CurveTimeline1, _super);\r\n        function CurveTimeline1(frameCount, bezierCount, propertyId) {\r\n            return _super.call(this, frameCount, bezierCount, [propertyId]) || this;\r\n        }\r\n        CurveTimeline1.prototype.getFrameEntries = function () {\r\n            return 2 /*ENTRIES*/;\r\n        };\r\n        /** Sets the time and value for the specified frame.\r\n         * @param frame Between 0 and <code>frameCount</code>, inclusive.\r\n         * @param time The frame time in seconds. */\r\n        CurveTimeline1.prototype.setFrame = function (frame, time, value) {\r\n            frame <<= 1;\r\n            this.frames[frame] = time;\r\n            this.frames[frame + 1 /*VALUE*/] = value;\r\n        };\r\n        /** Returns the interpolated value for the specified time. */\r\n        CurveTimeline1.prototype.getCurveValue = function (time) {\r\n            var frames = this.frames;\r\n            var i = frames.length - 2;\r\n            for (var ii = 2; ii <= i; ii += 2) {\r\n                if (frames[ii] > time) {\r\n                    i = ii - 2;\r\n                    break;\r\n                }\r\n            }\r\n            var curveType = this.curves[i >> 1];\r\n            switch (curveType) {\r\n                case 0 /*LINEAR*/:\r\n                    var before = frames[i], value = frames[i + 1 /*VALUE*/];\r\n                    return value + (time - before) / (frames[i + 2 /*ENTRIES*/] - before) * (frames[i + 2 /*ENTRIES*/ + 1 /*VALUE*/] - value);\r\n                case 1 /*STEPPED*/:\r\n                    return frames[i + 1 /*VALUE*/];\r\n            }\r\n            return this.getBezierValue(time, i, 1 /*VALUE*/, curveType - 2 /*BEZIER*/);\r\n        };\r\n        return CurveTimeline1;\r\n    }(CurveTimeline));\r\n    /** The base class for a {@link CurveTimeline} which sets two properties.\r\n     * @public\r\n     * */\r\n    var CurveTimeline2 = /** @class */ (function (_super) {\r\n        __extends$1(CurveTimeline2, _super);\r\n        /** @param bezierCount The maximum number of Bezier curves. See {@link #shrink(int)}.\r\n         * @param propertyIds Unique identifiers for the properties the timeline modifies. */\r\n        function CurveTimeline2(frameCount, bezierCount, propertyId1, propertyId2) {\r\n            return _super.call(this, frameCount, bezierCount, [propertyId1, propertyId2]) || this;\r\n        }\r\n        CurveTimeline2.prototype.getFrameEntries = function () {\r\n            return 3 /*ENTRIES*/;\r\n        };\r\n        /** Sets the time and values for the specified frame.\r\n         * @param frame Between 0 and <code>frameCount</code>, inclusive.\r\n         * @param time The frame time in seconds. */\r\n        CurveTimeline2.prototype.setFrame = function (frame, time, value1, value2) {\r\n            frame *= 3 /*ENTRIES*/;\r\n            this.frames[frame] = time;\r\n            this.frames[frame + 1 /*VALUE1*/] = value1;\r\n            this.frames[frame + 2 /*VALUE2*/] = value2;\r\n        };\r\n        return CurveTimeline2;\r\n    }(CurveTimeline));\r\n    /** Changes a bone's local {@link Bone#rotation}.\r\n     * @public\r\n     * */\r\n    var RotateTimeline = /** @class */ (function (_super) {\r\n        __extends$1(RotateTimeline, _super);\r\n        function RotateTimeline(frameCount, bezierCount, boneIndex) {\r\n            var _this = _super.call(this, frameCount, bezierCount, Property.rotate + \"|\" + boneIndex) || this;\r\n            _this.boneIndex = 0;\r\n            _this.boneIndex = boneIndex;\r\n            return _this;\r\n        }\r\n        RotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var bone = skeleton.bones[this.boneIndex];\r\n            if (!bone.active)\r\n                return;\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        bone.rotation = bone.data.rotation;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        bone.rotation += (bone.data.rotation - bone.rotation) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var r = this.getCurveValue(time);\r\n            switch (blend) {\r\n                case exports.MixBlend.setup:\r\n                    bone.rotation = bone.data.rotation + r * alpha;\r\n                    break;\r\n                case exports.MixBlend.first:\r\n                case exports.MixBlend.replace:\r\n                    r += bone.data.rotation - bone.rotation;\r\n                case exports.MixBlend.add:\r\n                    bone.rotation += r * alpha;\r\n            }\r\n        };\r\n        return RotateTimeline;\r\n    }(CurveTimeline1));\r\n    /** Changes a bone's local {@link Bone#x} and {@link Bone#y}.\r\n     * @public\r\n     * */\r\n    var TranslateTimeline = /** @class */ (function (_super) {\r\n        __extends$1(TranslateTimeline, _super);\r\n        function TranslateTimeline(frameCount, bezierCount, boneIndex) {\r\n            var _this = _super.call(this, frameCount, bezierCount, Property.x + \"|\" + boneIndex, Property.y + \"|\" + boneIndex) || this;\r\n            _this.boneIndex = 0;\r\n            _this.boneIndex = boneIndex;\r\n            return _this;\r\n        }\r\n        TranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var bone = skeleton.bones[this.boneIndex];\r\n            if (!bone.active)\r\n                return;\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        bone.x = bone.data.x;\r\n                        bone.y = bone.data.y;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        bone.x += (bone.data.x - bone.x) * alpha;\r\n                        bone.y += (bone.data.y - bone.y) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var x = 0, y = 0;\r\n            var i = Timeline.search(frames, time, 3 /*ENTRIES*/);\r\n            var curveType = this.curves[i / 3 /*ENTRIES*/];\r\n            switch (curveType) {\r\n                case 0 /*LINEAR*/:\r\n                    var before = frames[i];\r\n                    x = frames[i + 1 /*VALUE1*/];\r\n                    y = frames[i + 2 /*VALUE2*/];\r\n                    var t = (time - before) / (frames[i + 3 /*ENTRIES*/] - before);\r\n                    x += (frames[i + 3 /*ENTRIES*/ + 1 /*VALUE1*/] - x) * t;\r\n                    y += (frames[i + 3 /*ENTRIES*/ + 2 /*VALUE2*/] - y) * t;\r\n                    break;\r\n                case 1 /*STEPPED*/:\r\n                    x = frames[i + 1 /*VALUE1*/];\r\n                    y = frames[i + 2 /*VALUE2*/];\r\n                    break;\r\n                default:\r\n                    x = this.getBezierValue(time, i, 1 /*VALUE1*/, curveType - 2 /*BEZIER*/);\r\n                    y = this.getBezierValue(time, i, 2 /*VALUE2*/, curveType + 18 /*BEZIER_SIZE*/ - 2 /*BEZIER*/);\r\n            }\r\n            switch (blend) {\r\n                case exports.MixBlend.setup:\r\n                    bone.x = bone.data.x + x * alpha;\r\n                    bone.y = bone.data.y + y * alpha;\r\n                    break;\r\n                case exports.MixBlend.first:\r\n                case exports.MixBlend.replace:\r\n                    bone.x += (bone.data.x + x - bone.x) * alpha;\r\n                    bone.y += (bone.data.y + y - bone.y) * alpha;\r\n                    break;\r\n                case exports.MixBlend.add:\r\n                    bone.x += x * alpha;\r\n                    bone.y += y * alpha;\r\n            }\r\n        };\r\n        return TranslateTimeline;\r\n    }(CurveTimeline2));\r\n    /** Changes a bone's local {@link Bone#x}.\r\n     * @public\r\n     * */\r\n    var TranslateXTimeline = /** @class */ (function (_super) {\r\n        __extends$1(TranslateXTimeline, _super);\r\n        function TranslateXTimeline(frameCount, bezierCount, boneIndex) {\r\n            var _this = _super.call(this, frameCount, bezierCount, Property.x + \"|\" + boneIndex) || this;\r\n            _this.boneIndex = 0;\r\n            _this.boneIndex = boneIndex;\r\n            return _this;\r\n        }\r\n        TranslateXTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var bone = skeleton.bones[this.boneIndex];\r\n            if (!bone.active)\r\n                return;\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        bone.x = bone.data.x;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        bone.x += (bone.data.x - bone.x) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var x = this.getCurveValue(time);\r\n            switch (blend) {\r\n                case exports.MixBlend.setup:\r\n                    bone.x = bone.data.x + x * alpha;\r\n                    break;\r\n                case exports.MixBlend.first:\r\n                case exports.MixBlend.replace:\r\n                    bone.x += (bone.data.x + x - bone.x) * alpha;\r\n                    break;\r\n                case exports.MixBlend.add:\r\n                    bone.x += x * alpha;\r\n            }\r\n        };\r\n        return TranslateXTimeline;\r\n    }(CurveTimeline1));\r\n    /** Changes a bone's local {@link Bone#x}.\r\n     * @public\r\n     * */\r\n    var TranslateYTimeline = /** @class */ (function (_super) {\r\n        __extends$1(TranslateYTimeline, _super);\r\n        function TranslateYTimeline(frameCount, bezierCount, boneIndex) {\r\n            var _this = _super.call(this, frameCount, bezierCount, Property.y + \"|\" + boneIndex) || this;\r\n            _this.boneIndex = 0;\r\n            _this.boneIndex = boneIndex;\r\n            return _this;\r\n        }\r\n        TranslateYTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var bone = skeleton.bones[this.boneIndex];\r\n            if (!bone.active)\r\n                return;\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        bone.y = bone.data.y;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        bone.y += (bone.data.y - bone.y) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var y = this.getCurveValue(time);\r\n            switch (blend) {\r\n                case exports.MixBlend.setup:\r\n                    bone.y = bone.data.y + y * alpha;\r\n                    break;\r\n                case exports.MixBlend.first:\r\n                case exports.MixBlend.replace:\r\n                    bone.y += (bone.data.y + y - bone.y) * alpha;\r\n                    break;\r\n                case exports.MixBlend.add:\r\n                    bone.y += y * alpha;\r\n            }\r\n        };\r\n        return TranslateYTimeline;\r\n    }(CurveTimeline1));\r\n    /** Changes a bone's local {@link Bone#scaleX)} and {@link Bone#scaleY}.\r\n     * @public\r\n     * */\r\n    var ScaleTimeline = /** @class */ (function (_super) {\r\n        __extends$1(ScaleTimeline, _super);\r\n        function ScaleTimeline(frameCount, bezierCount, boneIndex) {\r\n            var _this = _super.call(this, frameCount, bezierCount, Property.scaleX + \"|\" + boneIndex, Property.scaleY + \"|\" + boneIndex) || this;\r\n            _this.boneIndex = 0;\r\n            _this.boneIndex = boneIndex;\r\n            return _this;\r\n        }\r\n        ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var bone = skeleton.bones[this.boneIndex];\r\n            if (!bone.active)\r\n                return;\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        bone.scaleX = bone.data.scaleX;\r\n                        bone.scaleY = bone.data.scaleY;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n                        bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var x, y;\r\n            var i = Timeline.search(frames, time, 3 /*ENTRIES*/);\r\n            var curveType = this.curves[i / 3 /*ENTRIES*/];\r\n            switch (curveType) {\r\n                case 0 /*LINEAR*/:\r\n                    var before = frames[i];\r\n                    x = frames[i + 1 /*VALUE1*/];\r\n                    y = frames[i + 2 /*VALUE2*/];\r\n                    var t = (time - before) / (frames[i + 3 /*ENTRIES*/] - before);\r\n                    x += (frames[i + 3 /*ENTRIES*/ + 1 /*VALUE1*/] - x) * t;\r\n                    y += (frames[i + 3 /*ENTRIES*/ + 2 /*VALUE2*/] - y) * t;\r\n                    break;\r\n                case 1 /*STEPPED*/:\r\n                    x = frames[i + 1 /*VALUE1*/];\r\n                    y = frames[i + 2 /*VALUE2*/];\r\n                    break;\r\n                default:\r\n                    x = this.getBezierValue(time, i, 1 /*VALUE1*/, curveType - 2 /*BEZIER*/);\r\n                    y = this.getBezierValue(time, i, 2 /*VALUE2*/, curveType + 18 /*BEZIER_SIZE*/ - 2 /*BEZIER*/);\r\n            }\r\n            x *= bone.data.scaleX;\r\n            y *= bone.data.scaleY;\r\n            if (alpha == 1) {\r\n                if (blend == exports.MixBlend.add) {\r\n                    bone.scaleX += x - bone.data.scaleX;\r\n                    bone.scaleY += y - bone.data.scaleY;\r\n                }\r\n                else {\r\n                    bone.scaleX = x;\r\n                    bone.scaleY = y;\r\n                }\r\n            }\r\n            else {\r\n                var bx = 0, by = 0;\r\n                if (direction == exports.MixDirection.mixOut) {\r\n                    switch (blend) {\r\n                        case exports.MixBlend.setup:\r\n                            bx = bone.data.scaleX;\r\n                            by = bone.data.scaleY;\r\n                            bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n                            bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n                            break;\r\n                        case exports.MixBlend.first:\r\n                        case exports.MixBlend.replace:\r\n                            bx = bone.scaleX;\r\n                            by = bone.scaleY;\r\n                            bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n                            bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n                            break;\r\n                        case exports.MixBlend.add:\r\n                            bone.scaleX += (x - bone.data.scaleX) * alpha;\r\n                            bone.scaleY += (y - bone.data.scaleY) * alpha;\r\n                    }\r\n                }\r\n                else {\r\n                    switch (blend) {\r\n                        case exports.MixBlend.setup:\r\n                            bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\r\n                            by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\r\n                            bone.scaleX = bx + (x - bx) * alpha;\r\n                            bone.scaleY = by + (y - by) * alpha;\r\n                            break;\r\n                        case exports.MixBlend.first:\r\n                        case exports.MixBlend.replace:\r\n                            bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\r\n                            by = Math.abs(bone.scaleY) * MathUtils.signum(y);\r\n                            bone.scaleX = bx + (x - bx) * alpha;\r\n                            bone.scaleY = by + (y - by) * alpha;\r\n                            break;\r\n                        case exports.MixBlend.add:\r\n                            bone.scaleX += (x - bone.data.scaleX) * alpha;\r\n                            bone.scaleY += (y - bone.data.scaleY) * alpha;\r\n                    }\r\n                }\r\n            }\r\n        };\r\n        return ScaleTimeline;\r\n    }(CurveTimeline2));\r\n    /** Changes a bone's local {@link Bone#scaleX)} and {@link Bone#scaleY}.\r\n     * @public\r\n     * */\r\n    var ScaleXTimeline = /** @class */ (function (_super) {\r\n        __extends$1(ScaleXTimeline, _super);\r\n        function ScaleXTimeline(frameCount, bezierCount, boneIndex) {\r\n            var _this = _super.call(this, frameCount, bezierCount, Property.scaleX + \"|\" + boneIndex) || this;\r\n            _this.boneIndex = 0;\r\n            _this.boneIndex = boneIndex;\r\n            return _this;\r\n        }\r\n        ScaleXTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var bone = skeleton.bones[this.boneIndex];\r\n            if (!bone.active)\r\n                return;\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        bone.scaleX = bone.data.scaleX;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var x = this.getCurveValue(time) * bone.data.scaleX;\r\n            if (alpha == 1) {\r\n                if (blend == exports.MixBlend.add)\r\n                    bone.scaleX += x - bone.data.scaleX;\r\n                else\r\n                    bone.scaleX = x;\r\n            }\r\n            else {\r\n                // Mixing out uses sign of setup or current pose, else use sign of key.\r\n                var bx = 0;\r\n                if (direction == exports.MixDirection.mixOut) {\r\n                    switch (blend) {\r\n                        case exports.MixBlend.setup:\r\n                            bx = bone.data.scaleX;\r\n                            bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n                            break;\r\n                        case exports.MixBlend.first:\r\n                        case exports.MixBlend.replace:\r\n                            bx = bone.scaleX;\r\n                            bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n                            break;\r\n                        case exports.MixBlend.add:\r\n                            bone.scaleX += (x - bone.data.scaleX) * alpha;\r\n                    }\r\n                }\r\n                else {\r\n                    switch (blend) {\r\n                        case exports.MixBlend.setup:\r\n                            bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\r\n                            bone.scaleX = bx + (x - bx) * alpha;\r\n                            break;\r\n                        case exports.MixBlend.first:\r\n                        case exports.MixBlend.replace:\r\n                            bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\r\n                            bone.scaleX = bx + (x - bx) * alpha;\r\n                            break;\r\n                        case exports.MixBlend.add:\r\n                            bone.scaleX += (x - bone.data.scaleX) * alpha;\r\n                    }\r\n                }\r\n            }\r\n        };\r\n        return ScaleXTimeline;\r\n    }(CurveTimeline1));\r\n    /** Changes a bone's local {@link Bone#scaleX)} and {@link Bone#scaleY}.\r\n     * @public\r\n     * */\r\n    var ScaleYTimeline = /** @class */ (function (_super) {\r\n        __extends$1(ScaleYTimeline, _super);\r\n        function ScaleYTimeline(frameCount, bezierCount, boneIndex) {\r\n            var _this = _super.call(this, frameCount, bezierCount, Property.scaleY + \"|\" + boneIndex) || this;\r\n            _this.boneIndex = 0;\r\n            _this.boneIndex = boneIndex;\r\n            return _this;\r\n        }\r\n        ScaleYTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var bone = skeleton.bones[this.boneIndex];\r\n            if (!bone.active)\r\n                return;\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        bone.scaleY = bone.data.scaleY;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var y = this.getCurveValue(time) * bone.data.scaleY;\r\n            if (alpha == 1) {\r\n                if (blend == exports.MixBlend.add)\r\n                    bone.scaleY += y - bone.data.scaleY;\r\n                else\r\n                    bone.scaleY = y;\r\n            }\r\n            else {\r\n                // Mixing out uses sign of setup or current pose, else use sign of key.\r\n                var by = 0;\r\n                if (direction == exports.MixDirection.mixOut) {\r\n                    switch (blend) {\r\n                        case exports.MixBlend.setup:\r\n                            by = bone.data.scaleY;\r\n                            bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n                            break;\r\n                        case exports.MixBlend.first:\r\n                        case exports.MixBlend.replace:\r\n                            by = bone.scaleY;\r\n                            bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n                            break;\r\n                        case exports.MixBlend.add:\r\n                            bone.scaleY += (y - bone.data.scaleY) * alpha;\r\n                    }\r\n                }\r\n                else {\r\n                    switch (blend) {\r\n                        case exports.MixBlend.setup:\r\n                            by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\r\n                            bone.scaleY = by + (y - by) * alpha;\r\n                            break;\r\n                        case exports.MixBlend.first:\r\n                        case exports.MixBlend.replace:\r\n                            by = Math.abs(bone.scaleY) * MathUtils.signum(y);\r\n                            bone.scaleY = by + (y - by) * alpha;\r\n                            break;\r\n                        case exports.MixBlend.add:\r\n                            bone.scaleY += (y - bone.data.scaleY) * alpha;\r\n                    }\r\n                }\r\n            }\r\n        };\r\n        return ScaleYTimeline;\r\n    }(CurveTimeline1));\r\n    /** Changes a bone's local {@link Bone#shearX} and {@link Bone#shearY}.\r\n     * @public\r\n     * */\r\n    var ShearTimeline = /** @class */ (function (_super) {\r\n        __extends$1(ShearTimeline, _super);\r\n        function ShearTimeline(frameCount, bezierCount, boneIndex) {\r\n            var _this = _super.call(this, frameCount, bezierCount, Property.shearX + \"|\" + boneIndex, Property.shearY + \"|\" + boneIndex) || this;\r\n            _this.boneIndex = 0;\r\n            _this.boneIndex = boneIndex;\r\n            return _this;\r\n        }\r\n        ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var bone = skeleton.bones[this.boneIndex];\r\n            if (!bone.active)\r\n                return;\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        bone.shearX = bone.data.shearX;\r\n                        bone.shearY = bone.data.shearY;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n                        bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var x = 0, y = 0;\r\n            var i = Timeline.search(frames, time, 3 /*ENTRIES*/);\r\n            var curveType = this.curves[i / 3 /*ENTRIES*/];\r\n            switch (curveType) {\r\n                case 0 /*LINEAR*/:\r\n                    var before = frames[i];\r\n                    x = frames[i + 1 /*VALUE1*/];\r\n                    y = frames[i + 2 /*VALUE2*/];\r\n                    var t = (time - before) / (frames[i + 3 /*ENTRIES*/] - before);\r\n                    x += (frames[i + 3 /*ENTRIES*/ + 1 /*VALUE1*/] - x) * t;\r\n                    y += (frames[i + 3 /*ENTRIES*/ + 2 /*VALUE2*/] - y) * t;\r\n                    break;\r\n                case 1 /*STEPPED*/:\r\n                    x = frames[i + 1 /*VALUE1*/];\r\n                    y = frames[i + 2 /*VALUE2*/];\r\n                    break;\r\n                default:\r\n                    x = this.getBezierValue(time, i, 1 /*VALUE1*/, curveType - 2 /*BEZIER*/);\r\n                    y = this.getBezierValue(time, i, 2 /*VALUE2*/, curveType + 18 /*BEZIER_SIZE*/ - 2 /*BEZIER*/);\r\n            }\r\n            switch (blend) {\r\n                case exports.MixBlend.setup:\r\n                    bone.shearX = bone.data.shearX + x * alpha;\r\n                    bone.shearY = bone.data.shearY + y * alpha;\r\n                    break;\r\n                case exports.MixBlend.first:\r\n                case exports.MixBlend.replace:\r\n                    bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n                    bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n                    break;\r\n                case exports.MixBlend.add:\r\n                    bone.shearX += x * alpha;\r\n                    bone.shearY += y * alpha;\r\n            }\r\n        };\r\n        return ShearTimeline;\r\n    }(CurveTimeline2));\r\n    /** Changes a bone's local {@link Bone#shearX} and {@link Bone#shearY}.\r\n     * @public\r\n     * */\r\n    var ShearXTimeline = /** @class */ (function (_super) {\r\n        __extends$1(ShearXTimeline, _super);\r\n        function ShearXTimeline(frameCount, bezierCount, boneIndex) {\r\n            var _this = _super.call(this, frameCount, bezierCount, Property.shearX + \"|\" + boneIndex) || this;\r\n            _this.boneIndex = 0;\r\n            _this.boneIndex = boneIndex;\r\n            return _this;\r\n        }\r\n        ShearXTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var bone = skeleton.bones[this.boneIndex];\r\n            if (!bone.active)\r\n                return;\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        bone.shearX = bone.data.shearX;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var x = this.getCurveValue(time);\r\n            switch (blend) {\r\n                case exports.MixBlend.setup:\r\n                    bone.shearX = bone.data.shearX + x * alpha;\r\n                    break;\r\n                case exports.MixBlend.first:\r\n                case exports.MixBlend.replace:\r\n                    bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n                    break;\r\n                case exports.MixBlend.add:\r\n                    bone.shearX += x * alpha;\r\n            }\r\n        };\r\n        return ShearXTimeline;\r\n    }(CurveTimeline1));\r\n    /** Changes a bone's local {@link Bone#shearX} and {@link Bone#shearY}.\r\n     * @public\r\n     * */\r\n    var ShearYTimeline = /** @class */ (function (_super) {\r\n        __extends$1(ShearYTimeline, _super);\r\n        function ShearYTimeline(frameCount, bezierCount, boneIndex) {\r\n            var _this = _super.call(this, frameCount, bezierCount, Property.shearY + \"|\" + boneIndex) || this;\r\n            _this.boneIndex = 0;\r\n            _this.boneIndex = boneIndex;\r\n            return _this;\r\n        }\r\n        ShearYTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var bone = skeleton.bones[this.boneIndex];\r\n            if (!bone.active)\r\n                return;\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        bone.shearY = bone.data.shearY;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var y = this.getCurveValue(time);\r\n            switch (blend) {\r\n                case exports.MixBlend.setup:\r\n                    bone.shearY = bone.data.shearY + y * alpha;\r\n                    break;\r\n                case exports.MixBlend.first:\r\n                case exports.MixBlend.replace:\r\n                    bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n                    break;\r\n                case exports.MixBlend.add:\r\n                    bone.shearY += y * alpha;\r\n            }\r\n        };\r\n        return ShearYTimeline;\r\n    }(CurveTimeline1));\r\n    /** Changes a slot's {@link Slot#color}.\r\n     * @public\r\n     * */\r\n    var RGBATimeline = /** @class */ (function (_super) {\r\n        __extends$1(RGBATimeline, _super);\r\n        function RGBATimeline(frameCount, bezierCount, slotIndex) {\r\n            var _this = _super.call(this, frameCount, bezierCount, [\r\n                Property.rgb + \"|\" + slotIndex,\r\n                Property.alpha + \"|\" + slotIndex\r\n            ]) || this;\r\n            _this.slotIndex = 0;\r\n            _this.slotIndex = slotIndex;\r\n            return _this;\r\n        }\r\n        RGBATimeline.prototype.getFrameEntries = function () {\r\n            return 5 /*ENTRIES*/;\r\n        };\r\n        /** Sets the time in seconds, red, green, blue, and alpha for the specified key frame. */\r\n        RGBATimeline.prototype.setFrame = function (frame, time, r, g, b, a) {\r\n            frame *= 5 /*ENTRIES*/;\r\n            this.frames[frame] = time;\r\n            this.frames[frame + 1 /*R*/] = r;\r\n            this.frames[frame + 2 /*G*/] = g;\r\n            this.frames[frame + 3 /*B*/] = b;\r\n            this.frames[frame + 4 /*A*/] = a;\r\n        };\r\n        RGBATimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var slot = skeleton.slots[this.slotIndex];\r\n            if (!slot.bone.active)\r\n                return;\r\n            var frames = this.frames;\r\n            var color = slot.color;\r\n            if (time < frames[0]) {\r\n                var setup = slot.data.color;\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        color.setFromColor(setup);\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha);\r\n                }\r\n                return;\r\n            }\r\n            var r = 0, g = 0, b = 0, a = 0;\r\n            var i = Timeline.search(frames, time, 5 /*ENTRIES*/);\r\n            var curveType = this.curves[i / 5 /*ENTRIES*/];\r\n            switch (curveType) {\r\n                case 0 /*LINEAR*/:\r\n                    var before = frames[i];\r\n                    r = frames[i + 1 /*R*/];\r\n                    g = frames[i + 2 /*G*/];\r\n                    b = frames[i + 3 /*B*/];\r\n                    a = frames[i + 4 /*A*/];\r\n                    var t = (time - before) / (frames[i + 5 /*ENTRIES*/] - before);\r\n                    r += (frames[i + 5 /*ENTRIES*/ + 1 /*R*/] - r) * t;\r\n                    g += (frames[i + 5 /*ENTRIES*/ + 2 /*G*/] - g) * t;\r\n                    b += (frames[i + 5 /*ENTRIES*/ + 3 /*B*/] - b) * t;\r\n                    a += (frames[i + 5 /*ENTRIES*/ + 4 /*A*/] - a) * t;\r\n                    break;\r\n                case 1 /*STEPPED*/:\r\n                    r = frames[i + 1 /*R*/];\r\n                    g = frames[i + 2 /*G*/];\r\n                    b = frames[i + 3 /*B*/];\r\n                    a = frames[i + 4 /*A*/];\r\n                    break;\r\n                default:\r\n                    r = this.getBezierValue(time, i, 1 /*R*/, curveType - 2 /*BEZIER*/);\r\n                    g = this.getBezierValue(time, i, 2 /*G*/, curveType + 18 /*BEZIER_SIZE*/ - 2 /*BEZIER*/);\r\n                    b = this.getBezierValue(time, i, 3 /*B*/, curveType + 18 /*BEZIER_SIZE*/ * 2 - 2 /*BEZIER*/);\r\n                    a = this.getBezierValue(time, i, 4 /*A*/, curveType + 18 /*BEZIER_SIZE*/ * 3 - 2 /*BEZIER*/);\r\n            }\r\n            if (alpha == 1)\r\n                color.set(r, g, b, a);\r\n            else {\r\n                if (blend == exports.MixBlend.setup)\r\n                    color.setFromColor(slot.data.color);\r\n                color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\r\n            }\r\n        };\r\n        return RGBATimeline;\r\n    }(CurveTimeline));\r\n    /** Changes a slot's {@link Slot#color}.\r\n     * @public\r\n     * */\r\n    var RGBTimeline = /** @class */ (function (_super) {\r\n        __extends$1(RGBTimeline, _super);\r\n        function RGBTimeline(frameCount, bezierCount, slotIndex) {\r\n            var _this = _super.call(this, frameCount, bezierCount, [\r\n                Property.rgb + \"|\" + slotIndex\r\n            ]) || this;\r\n            _this.slotIndex = 0;\r\n            _this.slotIndex = slotIndex;\r\n            return _this;\r\n        }\r\n        RGBTimeline.prototype.getFrameEntries = function () {\r\n            return 4 /*ENTRIES*/;\r\n        };\r\n        /** Sets the time in seconds, red, green, blue, and alpha for the specified key frame. */\r\n        RGBTimeline.prototype.setFrame = function (frame, time, r, g, b) {\r\n            frame <<= 2;\r\n            this.frames[frame] = time;\r\n            this.frames[frame + 1 /*R*/] = r;\r\n            this.frames[frame + 2 /*G*/] = g;\r\n            this.frames[frame + 3 /*B*/] = b;\r\n        };\r\n        RGBTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var slot = skeleton.slots[this.slotIndex];\r\n            if (!slot.bone.active)\r\n                return;\r\n            var frames = this.frames;\r\n            var color = slot.color;\r\n            if (time < frames[0]) {\r\n                var setup = slot.data.color;\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        color.r = setup.r;\r\n                        color.g = setup.g;\r\n                        color.b = setup.b;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        color.r += (setup.r - color.r) * alpha;\r\n                        color.g += (setup.g - color.g) * alpha;\r\n                        color.b += (setup.b - color.b) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var r = 0, g = 0, b = 0;\r\n            var i = Timeline.search(frames, time, 4 /*ENTRIES*/);\r\n            var curveType = this.curves[i >> 2];\r\n            switch (curveType) {\r\n                case 0 /*LINEAR*/:\r\n                    var before = frames[i];\r\n                    r = frames[i + 1 /*R*/];\r\n                    g = frames[i + 2 /*G*/];\r\n                    b = frames[i + 3 /*B*/];\r\n                    var t = (time - before) / (frames[i + 4 /*ENTRIES*/] - before);\r\n                    r += (frames[i + 4 /*ENTRIES*/ + 1 /*R*/] - r) * t;\r\n                    g += (frames[i + 4 /*ENTRIES*/ + 2 /*G*/] - g) * t;\r\n                    b += (frames[i + 4 /*ENTRIES*/ + 3 /*B*/] - b) * t;\r\n                    break;\r\n                case 1 /*STEPPED*/:\r\n                    r = frames[i + 1 /*R*/];\r\n                    g = frames[i + 2 /*G*/];\r\n                    b = frames[i + 3 /*B*/];\r\n                    break;\r\n                default:\r\n                    r = this.getBezierValue(time, i, 1 /*R*/, curveType - 2 /*BEZIER*/);\r\n                    g = this.getBezierValue(time, i, 2 /*G*/, curveType + 18 /*BEZIER_SIZE*/ - 2 /*BEZIER*/);\r\n                    b = this.getBezierValue(time, i, 3 /*B*/, curveType + 18 /*BEZIER_SIZE*/ * 2 - 2 /*BEZIER*/);\r\n            }\r\n            if (alpha == 1) {\r\n                color.r = r;\r\n                color.g = g;\r\n                color.b = b;\r\n            }\r\n            else {\r\n                if (blend == exports.MixBlend.setup) {\r\n                    var setup = slot.data.color;\r\n                    color.r = setup.r;\r\n                    color.g = setup.g;\r\n                    color.b = setup.b;\r\n                }\r\n                color.r += (r - color.r) * alpha;\r\n                color.g += (g - color.g) * alpha;\r\n                color.b += (b - color.b) * alpha;\r\n            }\r\n        };\r\n        return RGBTimeline;\r\n    }(CurveTimeline));\r\n    /** Changes a bone's local {@link Bone#shearX} and {@link Bone#shearY}.\r\n     * @public\r\n     * */\r\n    var AlphaTimeline = /** @class */ (function (_super) {\r\n        __extends$1(AlphaTimeline, _super);\r\n        function AlphaTimeline(frameCount, bezierCount, slotIndex) {\r\n            var _this = _super.call(this, frameCount, bezierCount, Property.alpha + \"|\" + slotIndex) || this;\r\n            _this.slotIndex = 0;\r\n            _this.slotIndex = slotIndex;\r\n            return _this;\r\n        }\r\n        AlphaTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var slot = skeleton.slots[this.slotIndex];\r\n            if (!slot.bone.active)\r\n                return;\r\n            var color = slot.color;\r\n            if (time < this.frames[0]) { // Time is before first frame.\r\n                var setup = slot.data.color;\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        color.a = setup.a;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        color.a += (setup.a - color.a) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var a = this.getCurveValue(time);\r\n            if (alpha == 1)\r\n                color.a = a;\r\n            else {\r\n                if (blend == exports.MixBlend.setup)\r\n                    color.a = slot.data.color.a;\r\n                color.a += (a - color.a) * alpha;\r\n            }\r\n        };\r\n        return AlphaTimeline;\r\n    }(CurveTimeline1));\r\n    /** Changes a slot's {@link Slot#color} and {@link Slot#darkColor} for two color tinting.\r\n     * @public\r\n     * */\r\n    var RGBA2Timeline = /** @class */ (function (_super) {\r\n        __extends$1(RGBA2Timeline, _super);\r\n        function RGBA2Timeline(frameCount, bezierCount, slotIndex) {\r\n            var _this = _super.call(this, frameCount, bezierCount, [\r\n                Property.rgb + \"|\" + slotIndex,\r\n                Property.alpha + \"|\" + slotIndex,\r\n                Property.rgb2 + \"|\" + slotIndex\r\n            ]) || this;\r\n            _this.slotIndex = 0;\r\n            _this.slotIndex = slotIndex;\r\n            return _this;\r\n        }\r\n        RGBA2Timeline.prototype.getFrameEntries = function () {\r\n            return 8 /*ENTRIES*/;\r\n        };\r\n        /** Sets the time in seconds, light, and dark colors for the specified key frame. */\r\n        RGBA2Timeline.prototype.setFrame = function (frame, time, r, g, b, a, r2, g2, b2) {\r\n            frame <<= 3;\r\n            this.frames[frame] = time;\r\n            this.frames[frame + 1 /*R*/] = r;\r\n            this.frames[frame + 2 /*G*/] = g;\r\n            this.frames[frame + 3 /*B*/] = b;\r\n            this.frames[frame + 4 /*A*/] = a;\r\n            this.frames[frame + 5 /*R2*/] = r2;\r\n            this.frames[frame + 6 /*G2*/] = g2;\r\n            this.frames[frame + 7 /*B2*/] = b2;\r\n        };\r\n        RGBA2Timeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var slot = skeleton.slots[this.slotIndex];\r\n            if (!slot.bone.active)\r\n                return;\r\n            var frames = this.frames;\r\n            var light = slot.color, dark = slot.darkColor;\r\n            if (time < frames[0]) {\r\n                var setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        light.setFromColor(setupLight);\r\n                        dark.r = setupDark.r;\r\n                        dark.g = setupDark.g;\r\n                        dark.b = setupDark.b;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha);\r\n                        dark.r += (setupDark.r - dark.r) * alpha;\r\n                        dark.g += (setupDark.g - dark.g) * alpha;\r\n                        dark.b += (setupDark.b - dark.b) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n            var i = Timeline.search(frames, time, 8 /*ENTRIES*/);\r\n            var curveType = this.curves[i >> 3];\r\n            switch (curveType) {\r\n                case 0 /*LINEAR*/:\r\n                    var before = frames[i];\r\n                    r = frames[i + 1 /*R*/];\r\n                    g = frames[i + 2 /*G*/];\r\n                    b = frames[i + 3 /*B*/];\r\n                    a = frames[i + 4 /*A*/];\r\n                    r2 = frames[i + 5 /*R2*/];\r\n                    g2 = frames[i + 6 /*G2*/];\r\n                    b2 = frames[i + 7 /*B2*/];\r\n                    var t = (time - before) / (frames[i + 8 /*ENTRIES*/] - before);\r\n                    r += (frames[i + 8 /*ENTRIES*/ + 1 /*R*/] - r) * t;\r\n                    g += (frames[i + 8 /*ENTRIES*/ + 2 /*G*/] - g) * t;\r\n                    b += (frames[i + 8 /*ENTRIES*/ + 3 /*B*/] - b) * t;\r\n                    a += (frames[i + 8 /*ENTRIES*/ + 4 /*A*/] - a) * t;\r\n                    r2 += (frames[i + 8 /*ENTRIES*/ + 5 /*R2*/] - r2) * t;\r\n                    g2 += (frames[i + 8 /*ENTRIES*/ + 6 /*G2*/] - g2) * t;\r\n                    b2 += (frames[i + 8 /*ENTRIES*/ + 7 /*B2*/] - b2) * t;\r\n                    break;\r\n                case 1 /*STEPPED*/:\r\n                    r = frames[i + 1 /*R*/];\r\n                    g = frames[i + 2 /*G*/];\r\n                    b = frames[i + 3 /*B*/];\r\n                    a = frames[i + 4 /*A*/];\r\n                    r2 = frames[i + 5 /*R2*/];\r\n                    g2 = frames[i + 6 /*G2*/];\r\n                    b2 = frames[i + 7 /*B2*/];\r\n                    break;\r\n                default:\r\n                    r = this.getBezierValue(time, i, 1 /*R*/, curveType - 2 /*BEZIER*/);\r\n                    g = this.getBezierValue(time, i, 2 /*G*/, curveType + 18 /*BEZIER_SIZE*/ - 2 /*BEZIER*/);\r\n                    b = this.getBezierValue(time, i, 3 /*B*/, curveType + 18 /*BEZIER_SIZE*/ * 2 - 2 /*BEZIER*/);\r\n                    a = this.getBezierValue(time, i, 4 /*A*/, curveType + 18 /*BEZIER_SIZE*/ * 3 - 2 /*BEZIER*/);\r\n                    r2 = this.getBezierValue(time, i, 5 /*R2*/, curveType + 18 /*BEZIER_SIZE*/ * 4 - 2 /*BEZIER*/);\r\n                    g2 = this.getBezierValue(time, i, 6 /*G2*/, curveType + 18 /*BEZIER_SIZE*/ * 5 - 2 /*BEZIER*/);\r\n                    b2 = this.getBezierValue(time, i, 7 /*B2*/, curveType + 18 /*BEZIER_SIZE*/ * 6 - 2 /*BEZIER*/);\r\n            }\r\n            if (alpha == 1) {\r\n                light.set(r, g, b, a);\r\n                dark.r = r2;\r\n                dark.g = g2;\r\n                dark.b = b2;\r\n            }\r\n            else {\r\n                if (blend == exports.MixBlend.setup) {\r\n                    light.setFromColor(slot.data.color);\r\n                    var setupDark = slot.data.darkColor;\r\n                    dark.r = setupDark.r;\r\n                    dark.g = setupDark.g;\r\n                    dark.b = setupDark.b;\r\n                }\r\n                light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\r\n                dark.r += (r2 - dark.r) * alpha;\r\n                dark.g += (g2 - dark.g) * alpha;\r\n                dark.b += (b2 - dark.b) * alpha;\r\n            }\r\n        };\r\n        return RGBA2Timeline;\r\n    }(CurveTimeline));\r\n    /** Changes a slot's {@link Slot#color} and {@link Slot#darkColor} for two color tinting.\r\n     * @public\r\n     * */\r\n    var RGB2Timeline = /** @class */ (function (_super) {\r\n        __extends$1(RGB2Timeline, _super);\r\n        function RGB2Timeline(frameCount, bezierCount, slotIndex) {\r\n            var _this = _super.call(this, frameCount, bezierCount, [\r\n                Property.rgb + \"|\" + slotIndex,\r\n                Property.rgb2 + \"|\" + slotIndex\r\n            ]) || this;\r\n            _this.slotIndex = 0;\r\n            _this.slotIndex = slotIndex;\r\n            return _this;\r\n        }\r\n        RGB2Timeline.prototype.getFrameEntries = function () {\r\n            return 7 /*ENTRIES*/;\r\n        };\r\n        /** Sets the time in seconds, light, and dark colors for the specified key frame. */\r\n        RGB2Timeline.prototype.setFrame = function (frame, time, r, g, b, r2, g2, b2) {\r\n            frame *= 7 /*ENTRIES*/;\r\n            this.frames[frame] = time;\r\n            this.frames[frame + 1 /*R*/] = r;\r\n            this.frames[frame + 2 /*G*/] = g;\r\n            this.frames[frame + 3 /*B*/] = b;\r\n            this.frames[frame + 4 /*R2*/] = r2;\r\n            this.frames[frame + 5 /*G2*/] = g2;\r\n            this.frames[frame + 6 /*B2*/] = b2;\r\n        };\r\n        RGB2Timeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var slot = skeleton.slots[this.slotIndex];\r\n            if (!slot.bone.active)\r\n                return;\r\n            var frames = this.frames;\r\n            var light = slot.color, dark = slot.darkColor;\r\n            if (time < frames[0]) {\r\n                var setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        light.r = setupLight.r;\r\n                        light.g = setupLight.g;\r\n                        light.b = setupLight.b;\r\n                        dark.r = setupDark.r;\r\n                        dark.g = setupDark.g;\r\n                        dark.b = setupDark.b;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        light.r += (setupLight.r - light.r) * alpha;\r\n                        light.g += (setupLight.g - light.g) * alpha;\r\n                        light.b += (setupLight.b - light.b) * alpha;\r\n                        dark.r += (setupDark.r - dark.r) * alpha;\r\n                        dark.g += (setupDark.g - dark.g) * alpha;\r\n                        dark.b += (setupDark.b - dark.b) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var r = 0, g = 0, b = 0, r2 = 0, g2 = 0, b2 = 0;\r\n            var i = Timeline.search(frames, time, 7 /*ENTRIES*/);\r\n            var curveType = this.curves[i / 7 /*ENTRIES*/];\r\n            switch (curveType) {\r\n                case 0 /*LINEAR*/:\r\n                    var before = frames[i];\r\n                    r = frames[i + 1 /*R*/];\r\n                    g = frames[i + 2 /*G*/];\r\n                    b = frames[i + 3 /*B*/];\r\n                    r2 = frames[i + 4 /*R2*/];\r\n                    g2 = frames[i + 5 /*G2*/];\r\n                    b2 = frames[i + 6 /*B2*/];\r\n                    var t = (time - before) / (frames[i + 7 /*ENTRIES*/] - before);\r\n                    r += (frames[i + 7 /*ENTRIES*/ + 1 /*R*/] - r) * t;\r\n                    g += (frames[i + 7 /*ENTRIES*/ + 2 /*G*/] - g) * t;\r\n                    b += (frames[i + 7 /*ENTRIES*/ + 3 /*B*/] - b) * t;\r\n                    r2 += (frames[i + 7 /*ENTRIES*/ + 4 /*R2*/] - r2) * t;\r\n                    g2 += (frames[i + 7 /*ENTRIES*/ + 5 /*G2*/] - g2) * t;\r\n                    b2 += (frames[i + 7 /*ENTRIES*/ + 6 /*B2*/] - b2) * t;\r\n                    break;\r\n                case 1 /*STEPPED*/:\r\n                    r = frames[i + 1 /*R*/];\r\n                    g = frames[i + 2 /*G*/];\r\n                    b = frames[i + 3 /*B*/];\r\n                    r2 = frames[i + 4 /*R2*/];\r\n                    g2 = frames[i + 5 /*G2*/];\r\n                    b2 = frames[i + 6 /*B2*/];\r\n                    break;\r\n                default:\r\n                    r = this.getBezierValue(time, i, 1 /*R*/, curveType - 2 /*BEZIER*/);\r\n                    g = this.getBezierValue(time, i, 2 /*G*/, curveType + 18 /*BEZIER_SIZE*/ - 2 /*BEZIER*/);\r\n                    b = this.getBezierValue(time, i, 3 /*B*/, curveType + 18 /*BEZIER_SIZE*/ * 2 - 2 /*BEZIER*/);\r\n                    r2 = this.getBezierValue(time, i, 4 /*R2*/, curveType + 18 /*BEZIER_SIZE*/ * 3 - 2 /*BEZIER*/);\r\n                    g2 = this.getBezierValue(time, i, 5 /*G2*/, curveType + 18 /*BEZIER_SIZE*/ * 4 - 2 /*BEZIER*/);\r\n                    b2 = this.getBezierValue(time, i, 6 /*B2*/, curveType + 18 /*BEZIER_SIZE*/ * 5 - 2 /*BEZIER*/);\r\n            }\r\n            if (alpha == 1) {\r\n                light.r = r;\r\n                light.g = g;\r\n                light.b = b;\r\n                dark.r = r2;\r\n                dark.g = g2;\r\n                dark.b = b2;\r\n            }\r\n            else {\r\n                if (blend == exports.MixBlend.setup) {\r\n                    var setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n                    light.r = setupLight.r;\r\n                    light.g = setupLight.g;\r\n                    light.b = setupLight.b;\r\n                    dark.r = setupDark.r;\r\n                    dark.g = setupDark.g;\r\n                    dark.b = setupDark.b;\r\n                }\r\n                light.r += (r - light.r) * alpha;\r\n                light.g += (g - light.g) * alpha;\r\n                light.b += (b - light.b) * alpha;\r\n                dark.r += (r2 - dark.r) * alpha;\r\n                dark.g += (g2 - dark.g) * alpha;\r\n                dark.b += (b2 - dark.b) * alpha;\r\n            }\r\n        };\r\n        return RGB2Timeline;\r\n    }(CurveTimeline));\r\n    /** Changes a slot's {@link Slot#attachment}.\r\n     * @public\r\n     * */\r\n    var AttachmentTimeline = /** @class */ (function (_super) {\r\n        __extends$1(AttachmentTimeline, _super);\r\n        function AttachmentTimeline(frameCount, slotIndex) {\r\n            var _this = _super.call(this, frameCount, [\r\n                Property.attachment + \"|\" + slotIndex\r\n            ]) || this;\r\n            _this.slotIndex = 0;\r\n            _this.slotIndex = slotIndex;\r\n            _this.attachmentNames = new Array(frameCount);\r\n            return _this;\r\n        }\r\n        AttachmentTimeline.prototype.getFrameCount = function () {\r\n            return this.frames.length;\r\n        };\r\n        /** Sets the time in seconds and the attachment name for the specified key frame. */\r\n        AttachmentTimeline.prototype.setFrame = function (frame, time, attachmentName) {\r\n            this.frames[frame] = time;\r\n            this.attachmentNames[frame] = attachmentName;\r\n        };\r\n        AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n            var slot = skeleton.slots[this.slotIndex];\r\n            if (!slot.bone.active)\r\n                return;\r\n            if (direction == exports.MixDirection.mixOut) {\r\n                if (blend == exports.MixBlend.setup)\r\n                    this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n                return;\r\n            }\r\n            if (time < this.frames[0]) {\r\n                if (blend == exports.MixBlend.setup || blend == exports.MixBlend.first)\r\n                    this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n                return;\r\n            }\r\n            this.setAttachment(skeleton, slot, this.attachmentNames[Timeline.search1(this.frames, time)]);\r\n        };\r\n        AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) {\r\n            slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n        };\r\n        return AttachmentTimeline;\r\n    }(Timeline));\r\n    /** Changes a slot's {@link Slot#deform} to deform a {@link VertexAttachment}.\r\n     * @public\r\n     * */\r\n    var DeformTimeline = /** @class */ (function (_super) {\r\n        __extends$1(DeformTimeline, _super);\r\n        function DeformTimeline(frameCount, bezierCount, slotIndex, attachment) {\r\n            var _this = _super.call(this, frameCount, bezierCount, [\r\n                Property.deform + \"|\" + slotIndex + \"|\" + attachment.id\r\n            ]) || this;\r\n            _this.slotIndex = 0;\r\n            /** The attachment that will be deformed. */\r\n            _this.attachment = null;\r\n            /** The vertices for each key frame. */\r\n            _this.vertices = null;\r\n            _this.slotIndex = slotIndex;\r\n            _this.attachment = attachment;\r\n            _this.vertices = new Array(frameCount);\r\n            return _this;\r\n        }\r\n        DeformTimeline.prototype.getFrameCount = function () {\r\n            return this.frames.length;\r\n        };\r\n        /** Sets the time in seconds and the vertices for the specified key frame.\r\n         * @param vertices Vertex positions for an unweighted VertexAttachment, or deform offsets if it has weights. */\r\n        DeformTimeline.prototype.setFrame = function (frame, time, vertices) {\r\n            this.frames[frame] = time;\r\n            this.vertices[frame] = vertices;\r\n        };\r\n        /** @param value1 Ignored (0 is used for a deform timeline).\r\n         * @param value2 Ignored (1 is used for a deform timeline). */\r\n        DeformTimeline.prototype.setBezier = function (bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\r\n            var curves = this.curves;\r\n            var i = this.getFrameCount() + bezier * 18 /*BEZIER_SIZE*/;\r\n            if (value == 0)\r\n                curves[frame] = 2 /*BEZIER*/ + i;\r\n            var tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = cy2 * 0.03 - cy1 * 0.06;\r\n            var dddx = ((cx1 - cx2) * 3 - time1 + time2) * 0.006, dddy = (cy1 - cy2 + 0.33333333) * 0.018;\r\n            var ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\r\n            var dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = cy1 * 0.3 + tmpy + dddy * 0.16666667;\r\n            var x = time1 + dx, y = dy;\r\n            for (var n = i + 18 /*BEZIER_SIZE*/; i < n; i += 2) {\r\n                curves[i] = x;\r\n                curves[i + 1] = y;\r\n                dx += ddx;\r\n                dy += ddy;\r\n                ddx += dddx;\r\n                ddy += dddy;\r\n                x += dx;\r\n                y += dy;\r\n            }\r\n        };\r\n        DeformTimeline.prototype.getCurvePercent = function (time, frame) {\r\n            var curves = this.curves;\r\n            var i = curves[frame];\r\n            switch (i) {\r\n                case 0 /*LINEAR*/:\r\n                    var x_3 = this.frames[frame];\r\n                    return (time - x_3) / (this.frames[frame + this.getFrameEntries()] - x_3);\r\n                case 1 /*STEPPED*/:\r\n                    return 0;\r\n            }\r\n            i -= 2 /*BEZIER*/;\r\n            if (curves[i] > time) {\r\n                var x_4 = this.frames[frame];\r\n                return curves[i + 1] * (time - x_4) / (curves[i] - x_4);\r\n            }\r\n            var n = i + 18 /*BEZIER_SIZE*/;\r\n            for (i += 2; i < n; i += 2) {\r\n                if (curves[i] >= time) {\r\n                    var x_5 = curves[i - 2], y_3 = curves[i - 1];\r\n                    return y_3 + (time - x_5) / (curves[i] - x_5) * (curves[i + 1] - y_3);\r\n                }\r\n            }\r\n            var x = curves[n - 2], y = curves[n - 1];\r\n            return y + (1 - y) * (time - x) / (this.frames[frame + this.getFrameEntries()] - x);\r\n        };\r\n        DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            var slot = skeleton.slots[this.slotIndex];\r\n            if (!slot.bone.active)\r\n                return;\r\n            var slotAttachment = slot.getAttachment();\r\n            if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.deformAttachment != this.attachment)\r\n                return;\r\n            var deform = slot.deform;\r\n            if (deform.length == 0)\r\n                blend = exports.MixBlend.setup;\r\n            var vertices = this.vertices;\r\n            var vertexCount = vertices[0].length;\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                var vertexAttachment = slotAttachment;\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        deform.length = 0;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        if (alpha == 1) {\r\n                            deform.length = 0;\r\n                            return;\r\n                        }\r\n                        deform.length = vertexCount;\r\n                        if (!vertexAttachment.bones) {\r\n                            // Unweighted vertex positions.\r\n                            var setupVertices = vertexAttachment.vertices;\r\n                            for (var i = 0; i < vertexCount; i++)\r\n                                deform[i] += (setupVertices[i] - deform[i]) * alpha;\r\n                        }\r\n                        else {\r\n                            // Weighted deform offsets.\r\n                            alpha = 1 - alpha;\r\n                            for (var i = 0; i < vertexCount; i++)\r\n                                deform[i] *= alpha;\r\n                        }\r\n                }\r\n                return;\r\n            }\r\n            deform.length = vertexCount;\r\n            if (time >= frames[frames.length - 1]) { // Time is after last frame.\r\n                var lastVertices = vertices[frames.length - 1];\r\n                if (alpha == 1) {\r\n                    if (blend == exports.MixBlend.add) {\r\n                        var vertexAttachment = slotAttachment;\r\n                        if (!vertexAttachment.bones) {\r\n                            // Unweighted vertex positions, with alpha.\r\n                            var setupVertices = vertexAttachment.vertices;\r\n                            for (var i_1 = 0; i_1 < vertexCount; i_1++)\r\n                                deform[i_1] += lastVertices[i_1] - setupVertices[i_1];\r\n                        }\r\n                        else {\r\n                            // Weighted deform offsets, with alpha.\r\n                            for (var i_2 = 0; i_2 < vertexCount; i_2++)\r\n                                deform[i_2] += lastVertices[i_2];\r\n                        }\r\n                    }\r\n                    else\r\n                        Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\r\n                }\r\n                else {\r\n                    switch (blend) {\r\n                        case exports.MixBlend.setup: {\r\n                            var vertexAttachment_1 = slotAttachment;\r\n                            if (!vertexAttachment_1.bones) {\r\n                                // Unweighted vertex positions, with alpha.\r\n                                var setupVertices = vertexAttachment_1.vertices;\r\n                                for (var i_3 = 0; i_3 < vertexCount; i_3++) {\r\n                                    var setup = setupVertices[i_3];\r\n                                    deform[i_3] = setup + (lastVertices[i_3] - setup) * alpha;\r\n                                }\r\n                            }\r\n                            else {\r\n                                // Weighted deform offsets, with alpha.\r\n                                for (var i_4 = 0; i_4 < vertexCount; i_4++)\r\n                                    deform[i_4] = lastVertices[i_4] * alpha;\r\n                            }\r\n                            break;\r\n                        }\r\n                        case exports.MixBlend.first:\r\n                        case exports.MixBlend.replace:\r\n                            for (var i_5 = 0; i_5 < vertexCount; i_5++)\r\n                                deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha;\r\n                            break;\r\n                        case exports.MixBlend.add:\r\n                            var vertexAttachment = slotAttachment;\r\n                            if (!vertexAttachment.bones) {\r\n                                // Unweighted vertex positions, with alpha.\r\n                                var setupVertices = vertexAttachment.vertices;\r\n                                for (var i_6 = 0; i_6 < vertexCount; i_6++)\r\n                                    deform[i_6] += (lastVertices[i_6] - setupVertices[i_6]) * alpha;\r\n                            }\r\n                            else {\r\n                                // Weighted deform offsets, with alpha.\r\n                                for (var i_7 = 0; i_7 < vertexCount; i_7++)\r\n                                    deform[i_7] += lastVertices[i_7] * alpha;\r\n                            }\r\n                    }\r\n                }\r\n                return;\r\n            }\r\n            // Interpolate between the previous frame and the current frame.\r\n            var frame = Timeline.search1(frames, time);\r\n            var percent = this.getCurvePercent(time, frame);\r\n            var prevVertices = vertices[frame];\r\n            var nextVertices = vertices[frame + 1];\r\n            if (alpha == 1) {\r\n                if (blend == exports.MixBlend.add) {\r\n                    var vertexAttachment = slotAttachment;\r\n                    if (!vertexAttachment.bones) {\r\n                        // Unweighted vertex positions, with alpha.\r\n                        var setupVertices = vertexAttachment.vertices;\r\n                        for (var i_8 = 0; i_8 < vertexCount; i_8++) {\r\n                            var prev = prevVertices[i_8];\r\n                            deform[i_8] += prev + (nextVertices[i_8] - prev) * percent - setupVertices[i_8];\r\n                        }\r\n                    }\r\n                    else {\r\n                        // Weighted deform offsets, with alpha.\r\n                        for (var i_9 = 0; i_9 < vertexCount; i_9++) {\r\n                            var prev = prevVertices[i_9];\r\n                            deform[i_9] += prev + (nextVertices[i_9] - prev) * percent;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    for (var i_10 = 0; i_10 < vertexCount; i_10++) {\r\n                        var prev = prevVertices[i_10];\r\n                        deform[i_10] = prev + (nextVertices[i_10] - prev) * percent;\r\n                    }\r\n                }\r\n            }\r\n            else {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup: {\r\n                        var vertexAttachment_2 = slotAttachment;\r\n                        if (!vertexAttachment_2.bones) {\r\n                            // Unweighted vertex positions, with alpha.\r\n                            var setupVertices = vertexAttachment_2.vertices;\r\n                            for (var i_11 = 0; i_11 < vertexCount; i_11++) {\r\n                                var prev = prevVertices[i_11], setup = setupVertices[i_11];\r\n                                deform[i_11] = setup + (prev + (nextVertices[i_11] - prev) * percent - setup) * alpha;\r\n                            }\r\n                        }\r\n                        else {\r\n                            // Weighted deform offsets, with alpha.\r\n                            for (var i_12 = 0; i_12 < vertexCount; i_12++) {\r\n                                var prev = prevVertices[i_12];\r\n                                deform[i_12] = (prev + (nextVertices[i_12] - prev) * percent) * alpha;\r\n                            }\r\n                        }\r\n                        break;\r\n                    }\r\n                    case exports.MixBlend.first:\r\n                    case exports.MixBlend.replace:\r\n                        for (var i_13 = 0; i_13 < vertexCount; i_13++) {\r\n                            var prev = prevVertices[i_13];\r\n                            deform[i_13] += (prev + (nextVertices[i_13] - prev) * percent - deform[i_13]) * alpha;\r\n                        }\r\n                        break;\r\n                    case exports.MixBlend.add:\r\n                        var vertexAttachment = slotAttachment;\r\n                        if (!vertexAttachment.bones) {\r\n                            // Unweighted vertex positions, with alpha.\r\n                            var setupVertices = vertexAttachment.vertices;\r\n                            for (var i_14 = 0; i_14 < vertexCount; i_14++) {\r\n                                var prev = prevVertices[i_14];\r\n                                deform[i_14] += (prev + (nextVertices[i_14] - prev) * percent - setupVertices[i_14]) * alpha;\r\n                            }\r\n                        }\r\n                        else {\r\n                            // Weighted deform offsets, with alpha.\r\n                            for (var i_15 = 0; i_15 < vertexCount; i_15++) {\r\n                                var prev = prevVertices[i_15];\r\n                                deform[i_15] += (prev + (nextVertices[i_15] - prev) * percent) * alpha;\r\n                            }\r\n                        }\r\n                }\r\n            }\r\n        };\r\n        return DeformTimeline;\r\n    }(CurveTimeline));\r\n    /** Fires an {@link Event} when specific animation times are reached.\r\n     * @public\r\n     * */\r\n    var EventTimeline = /** @class */ (function (_super) {\r\n        __extends$1(EventTimeline, _super);\r\n        function EventTimeline(frameCount) {\r\n            var _this = _super.call(this, frameCount, EventTimeline.propertyIds) || this;\r\n            /** The event for each key frame. */\r\n            _this.events = null;\r\n            _this.events = new Array(frameCount);\r\n            return _this;\r\n        }\r\n        EventTimeline.prototype.getFrameCount = function () {\r\n            return this.frames.length;\r\n        };\r\n        /** Sets the time in seconds and the event for the specified key frame. */\r\n        EventTimeline.prototype.setFrame = function (frame, event) {\r\n            this.frames[frame] = event.time;\r\n            this.events[frame] = event;\r\n        };\r\n        /** Fires events for frames > `lastTime` and <= `time`. */\r\n        EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            if (!firedEvents)\r\n                return;\r\n            var frames = this.frames;\r\n            var frameCount = this.frames.length;\r\n            if (lastTime > time) { // Fire events after last time for looped animations.\r\n                this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\r\n                lastTime = -1;\r\n            }\r\n            else if (lastTime >= frames[frameCount - 1]) // Last time is after last frame.\r\n                return;\r\n            if (time < frames[0])\r\n                return; // Time is before first frame.\r\n            var i = 0;\r\n            if (lastTime < frames[0])\r\n                i = 0;\r\n            else {\r\n                i = Timeline.search1(frames, lastTime) + 1;\r\n                var frameTime = frames[i];\r\n                while (i > 0) { // Fire multiple events with the same frame.\r\n                    if (frames[i - 1] != frameTime)\r\n                        break;\r\n                    i--;\r\n                }\r\n            }\r\n            for (; i < frameCount && time >= frames[i]; i++)\r\n                firedEvents.push(this.events[i]);\r\n        };\r\n        EventTimeline.propertyIds = [\"\" + Property.event];\r\n        return EventTimeline;\r\n    }(Timeline));\r\n    /** Changes a skeleton's {@link Skeleton#drawOrder}.\r\n     * @public\r\n     * */\r\n    var DrawOrderTimeline = /** @class */ (function (_super) {\r\n        __extends$1(DrawOrderTimeline, _super);\r\n        function DrawOrderTimeline(frameCount) {\r\n            var _this = _super.call(this, frameCount, DrawOrderTimeline.propertyIds) || this;\r\n            /** The draw order for each key frame. See {@link #setFrame(int, float, int[])}. */\r\n            _this.drawOrders = null;\r\n            _this.drawOrders = new Array(frameCount);\r\n            return _this;\r\n        }\r\n        DrawOrderTimeline.prototype.getFrameCount = function () {\r\n            return this.frames.length;\r\n        };\r\n        /** Sets the time in seconds and the draw order for the specified key frame.\r\n         * @param drawOrder For each slot in {@link Skeleton#slots}, the index of the new draw order. May be null to use setup pose\r\n         *           draw order. */\r\n        DrawOrderTimeline.prototype.setFrame = function (frame, time, drawOrder) {\r\n            this.frames[frame] = time;\r\n            this.drawOrders[frame] = drawOrder;\r\n        };\r\n        DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            if (direction == exports.MixDirection.mixOut) {\r\n                if (blend == exports.MixBlend.setup)\r\n                    Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n                return;\r\n            }\r\n            if (time < this.frames[0]) {\r\n                if (blend == exports.MixBlend.setup || blend == exports.MixBlend.first)\r\n                    Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n                return;\r\n            }\r\n            var drawOrderToSetupIndex = this.drawOrders[Timeline.search1(this.frames, time)];\r\n            if (!drawOrderToSetupIndex)\r\n                Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n            else {\r\n                var drawOrder = skeleton.drawOrder;\r\n                var slots = skeleton.slots;\r\n                for (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\r\n                    drawOrder[i] = slots[drawOrderToSetupIndex[i]];\r\n            }\r\n        };\r\n        DrawOrderTimeline.propertyIds = [\"\" + Property.drawOrder];\r\n        return DrawOrderTimeline;\r\n    }(Timeline));\r\n    /** Changes an IK constraint's {@link IkConstraint#mix}, {@link IkConstraint#softness},\r\n     * {@link IkConstraint#bendDirection}, {@link IkConstraint#stretch}, and {@link IkConstraint#compress}.\r\n     * @public\r\n     * */\r\n    var IkConstraintTimeline = /** @class */ (function (_super) {\r\n        __extends$1(IkConstraintTimeline, _super);\r\n        function IkConstraintTimeline(frameCount, bezierCount, ikConstraintIndex) {\r\n            var _this = _super.call(this, frameCount, bezierCount, [\r\n                Property.ikConstraint + \"|\" + ikConstraintIndex\r\n            ]) || this;\r\n            /** The index of the IK constraint slot in {@link Skeleton#ikConstraints} that will be changed. */\r\n            _this.ikConstraintIndex = 0;\r\n            _this.ikConstraintIndex = ikConstraintIndex;\r\n            return _this;\r\n        }\r\n        IkConstraintTimeline.prototype.getFrameEntries = function () {\r\n            return 6 /*ENTRIES*/;\r\n        };\r\n        /** Sets the time in seconds, mix, softness, bend direction, compress, and stretch for the specified key frame. */\r\n        IkConstraintTimeline.prototype.setFrame = function (frame, time, mix, softness, bendDirection, compress, stretch) {\r\n            frame *= 6 /*ENTRIES*/;\r\n            this.frames[frame] = time;\r\n            this.frames[frame + 1 /*MIX*/] = mix;\r\n            this.frames[frame + 2 /*SOFTNESS*/] = softness;\r\n            this.frames[frame + 3 /*BEND_DIRECTION*/] = bendDirection;\r\n            this.frames[frame + 4 /*COMPRESS*/] = compress ? 1 : 0;\r\n            this.frames[frame + 5 /*STRETCH*/] = stretch ? 1 : 0;\r\n        };\r\n        IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            var constraint = skeleton.ikConstraints[this.ikConstraintIndex];\r\n            if (!constraint.active)\r\n                return;\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        constraint.mix = constraint.data.mix;\r\n                        constraint.softness = constraint.data.softness;\r\n                        constraint.bendDirection = constraint.data.bendDirection;\r\n                        constraint.compress = constraint.data.compress;\r\n                        constraint.stretch = constraint.data.stretch;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\r\n                        constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\r\n                        constraint.bendDirection = constraint.data.bendDirection;\r\n                        constraint.compress = constraint.data.compress;\r\n                        constraint.stretch = constraint.data.stretch;\r\n                }\r\n                return;\r\n            }\r\n            var mix = 0, softness = 0;\r\n            var i = Timeline.search(frames, time, 6 /*ENTRIES*/);\r\n            var curveType = this.curves[i / 6 /*ENTRIES*/];\r\n            switch (curveType) {\r\n                case 0 /*LINEAR*/:\r\n                    var before = frames[i];\r\n                    mix = frames[i + 1 /*MIX*/];\r\n                    softness = frames[i + 2 /*SOFTNESS*/];\r\n                    var t = (time - before) / (frames[i + 6 /*ENTRIES*/] - before);\r\n                    mix += (frames[i + 6 /*ENTRIES*/ + 1 /*MIX*/] - mix) * t;\r\n                    softness += (frames[i + 6 /*ENTRIES*/ + 2 /*SOFTNESS*/] - softness) * t;\r\n                    break;\r\n                case 1 /*STEPPED*/:\r\n                    mix = frames[i + 1 /*MIX*/];\r\n                    softness = frames[i + 2 /*SOFTNESS*/];\r\n                    break;\r\n                default:\r\n                    mix = this.getBezierValue(time, i, 1 /*MIX*/, curveType - 2 /*BEZIER*/);\r\n                    softness = this.getBezierValue(time, i, 2 /*SOFTNESS*/, curveType + 18 /*BEZIER_SIZE*/ - 2 /*BEZIER*/);\r\n            }\r\n            if (blend == exports.MixBlend.setup) {\r\n                constraint.mix = constraint.data.mix + (mix - constraint.data.mix) * alpha;\r\n                constraint.softness = constraint.data.softness + (softness - constraint.data.softness) * alpha;\r\n                if (direction == exports.MixDirection.mixOut) {\r\n                    constraint.bendDirection = constraint.data.bendDirection;\r\n                    constraint.compress = constraint.data.compress;\r\n                    constraint.stretch = constraint.data.stretch;\r\n                }\r\n                else {\r\n                    constraint.bendDirection = frames[i + 3 /*BEND_DIRECTION*/];\r\n                    constraint.compress = frames[i + 4 /*COMPRESS*/] != 0;\r\n                    constraint.stretch = frames[i + 5 /*STRETCH*/] != 0;\r\n                }\r\n            }\r\n            else {\r\n                constraint.mix += (mix - constraint.mix) * alpha;\r\n                constraint.softness += (softness - constraint.softness) * alpha;\r\n                if (direction == exports.MixDirection.mixIn) {\r\n                    constraint.bendDirection = frames[i + 3 /*BEND_DIRECTION*/];\r\n                    constraint.compress = frames[i + 4 /*COMPRESS*/] != 0;\r\n                    constraint.stretch = frames[i + 5 /*STRETCH*/] != 0;\r\n                }\r\n            }\r\n        };\r\n        return IkConstraintTimeline;\r\n    }(CurveTimeline));\r\n    /** Changes a transform constraint's {@link TransformConstraint#rotateMix}, {@link TransformConstraint#translateMix},\r\n     * {@link TransformConstraint#scaleMix}, and {@link TransformConstraint#shearMix}.\r\n     * @public\r\n     * */\r\n    var TransformConstraintTimeline = /** @class */ (function (_super) {\r\n        __extends$1(TransformConstraintTimeline, _super);\r\n        function TransformConstraintTimeline(frameCount, bezierCount, transformConstraintIndex) {\r\n            var _this = _super.call(this, frameCount, bezierCount, [\r\n                Property.transformConstraint + \"|\" + transformConstraintIndex\r\n            ]) || this;\r\n            /** The index of the transform constraint slot in {@link Skeleton#transformConstraints} that will be changed. */\r\n            _this.transformConstraintIndex = 0;\r\n            _this.transformConstraintIndex = transformConstraintIndex;\r\n            return _this;\r\n        }\r\n        TransformConstraintTimeline.prototype.getFrameEntries = function () {\r\n            return 7 /*ENTRIES*/;\r\n        };\r\n        /** The time in seconds, rotate mix, translate mix, scale mix, and shear mix for the specified key frame. */\r\n        TransformConstraintTimeline.prototype.setFrame = function (frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY) {\r\n            var frames = this.frames;\r\n            frame *= 7 /*ENTRIES*/;\r\n            frames[frame] = time;\r\n            frames[frame + 1 /*ROTATE*/] = mixRotate;\r\n            frames[frame + 2 /*X*/] = mixX;\r\n            frames[frame + 3 /*Y*/] = mixY;\r\n            frames[frame + 4 /*SCALEX*/] = mixScaleX;\r\n            frames[frame + 5 /*SCALEY*/] = mixScaleY;\r\n            frames[frame + 6 /*SHEARY*/] = mixShearY;\r\n        };\r\n        TransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            var constraint = skeleton.transformConstraints[this.transformConstraintIndex];\r\n            if (!constraint.active)\r\n                return;\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                var data = constraint.data;\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        constraint.mixRotate = data.mixRotate;\r\n                        constraint.mixX = data.mixX;\r\n                        constraint.mixY = data.mixY;\r\n                        constraint.mixScaleX = data.mixScaleX;\r\n                        constraint.mixScaleY = data.mixScaleY;\r\n                        constraint.mixShearY = data.mixShearY;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        constraint.mixRotate += (data.mixRotate - constraint.mixRotate) * alpha;\r\n                        constraint.mixX += (data.mixX - constraint.mixX) * alpha;\r\n                        constraint.mixY += (data.mixY - constraint.mixY) * alpha;\r\n                        constraint.mixScaleX += (data.mixScaleX - constraint.mixScaleX) * alpha;\r\n                        constraint.mixScaleY += (data.mixScaleY - constraint.mixScaleY) * alpha;\r\n                        constraint.mixShearY += (data.mixShearY - constraint.mixShearY) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var rotate, x, y, scaleX, scaleY, shearY;\r\n            var i = Timeline.search(frames, time, 7 /*ENTRIES*/);\r\n            var curveType = this.curves[i / 7 /*ENTRIES*/];\r\n            switch (curveType) {\r\n                case 0 /*LINEAR*/:\r\n                    var before = frames[i];\r\n                    rotate = frames[i + 1 /*ROTATE*/];\r\n                    x = frames[i + 2 /*X*/];\r\n                    y = frames[i + 3 /*Y*/];\r\n                    scaleX = frames[i + 4 /*SCALEX*/];\r\n                    scaleY = frames[i + 5 /*SCALEY*/];\r\n                    shearY = frames[i + 6 /*SHEARY*/];\r\n                    var t = (time - before) / (frames[i + 7 /*ENTRIES*/] - before);\r\n                    rotate += (frames[i + 7 /*ENTRIES*/ + 1 /*ROTATE*/] - rotate) * t;\r\n                    x += (frames[i + 7 /*ENTRIES*/ + 2 /*X*/] - x) * t;\r\n                    y += (frames[i + 7 /*ENTRIES*/ + 3 /*Y*/] - y) * t;\r\n                    scaleX += (frames[i + 7 /*ENTRIES*/ + 4 /*SCALEX*/] - scaleX) * t;\r\n                    scaleY += (frames[i + 7 /*ENTRIES*/ + 5 /*SCALEY*/] - scaleY) * t;\r\n                    shearY += (frames[i + 7 /*ENTRIES*/ + 6 /*SHEARY*/] - shearY) * t;\r\n                    break;\r\n                case 1 /*STEPPED*/:\r\n                    rotate = frames[i + 1 /*ROTATE*/];\r\n                    x = frames[i + 2 /*X*/];\r\n                    y = frames[i + 3 /*Y*/];\r\n                    scaleX = frames[i + 4 /*SCALEX*/];\r\n                    scaleY = frames[i + 5 /*SCALEY*/];\r\n                    shearY = frames[i + 6 /*SHEARY*/];\r\n                    break;\r\n                default:\r\n                    rotate = this.getBezierValue(time, i, 1 /*ROTATE*/, curveType - 2 /*BEZIER*/);\r\n                    x = this.getBezierValue(time, i, 2 /*X*/, curveType + 18 /*BEZIER_SIZE*/ - 2 /*BEZIER*/);\r\n                    y = this.getBezierValue(time, i, 3 /*Y*/, curveType + 18 /*BEZIER_SIZE*/ * 2 - 2 /*BEZIER*/);\r\n                    scaleX = this.getBezierValue(time, i, 4 /*SCALEX*/, curveType + 18 /*BEZIER_SIZE*/ * 3 - 2 /*BEZIER*/);\r\n                    scaleY = this.getBezierValue(time, i, 5 /*SCALEY*/, curveType + 18 /*BEZIER_SIZE*/ * 4 - 2 /*BEZIER*/);\r\n                    shearY = this.getBezierValue(time, i, 6 /*SHEARY*/, curveType + 18 /*BEZIER_SIZE*/ * 5 - 2 /*BEZIER*/);\r\n            }\r\n            if (blend == exports.MixBlend.setup) {\r\n                var data = constraint.data;\r\n                constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\r\n                constraint.mixX = data.mixX + (x - data.mixX) * alpha;\r\n                constraint.mixY = data.mixY + (y - data.mixY) * alpha;\r\n                constraint.mixScaleX = data.mixScaleX + (scaleX - data.mixScaleX) * alpha;\r\n                constraint.mixScaleY = data.mixScaleY + (scaleY - data.mixScaleY) * alpha;\r\n                constraint.mixShearY = data.mixShearY + (shearY - data.mixShearY) * alpha;\r\n            }\r\n            else {\r\n                constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\r\n                constraint.mixX += (x - constraint.mixX) * alpha;\r\n                constraint.mixY += (y - constraint.mixY) * alpha;\r\n                constraint.mixScaleX += (scaleX - constraint.mixScaleX) * alpha;\r\n                constraint.mixScaleY += (scaleY - constraint.mixScaleY) * alpha;\r\n                constraint.mixShearY += (shearY - constraint.mixShearY) * alpha;\r\n            }\r\n        };\r\n        return TransformConstraintTimeline;\r\n    }(CurveTimeline));\r\n    /** Changes a path constraint's {@link PathConstraint#position}.\r\n     * @public\r\n     * */\r\n    var PathConstraintPositionTimeline = /** @class */ (function (_super) {\r\n        __extends$1(PathConstraintPositionTimeline, _super);\r\n        function PathConstraintPositionTimeline(frameCount, bezierCount, pathConstraintIndex) {\r\n            var _this = _super.call(this, frameCount, bezierCount, Property.pathConstraintPosition + \"|\" + pathConstraintIndex) || this;\r\n            /** The index of the path constraint slot in {@link Skeleton#pathConstraints} that will be changed. */\r\n            _this.pathConstraintIndex = 0;\r\n            _this.pathConstraintIndex = pathConstraintIndex;\r\n            return _this;\r\n        }\r\n        PathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n            if (!constraint.active)\r\n                return;\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        constraint.position = constraint.data.position;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        constraint.position += (constraint.data.position - constraint.position) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var position = this.getCurveValue(time);\r\n            if (blend == exports.MixBlend.setup)\r\n                constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\r\n            else\r\n                constraint.position += (position - constraint.position) * alpha;\r\n        };\r\n        return PathConstraintPositionTimeline;\r\n    }(CurveTimeline1));\r\n    /** Changes a path constraint's {@link PathConstraint#spacing}.\r\n     * @public\r\n     * */\r\n    var PathConstraintSpacingTimeline = /** @class */ (function (_super) {\r\n        __extends$1(PathConstraintSpacingTimeline, _super);\r\n        function PathConstraintSpacingTimeline(frameCount, bezierCount, pathConstraintIndex) {\r\n            var _this = _super.call(this, frameCount, bezierCount, Property.pathConstraintSpacing + \"|\" + pathConstraintIndex) || this;\r\n            /** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */\r\n            _this.pathConstraintIndex = 0;\r\n            _this.pathConstraintIndex = pathConstraintIndex;\r\n            return _this;\r\n        }\r\n        PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n            if (!constraint.active)\r\n                return;\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        constraint.spacing = constraint.data.spacing;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var spacing = this.getCurveValue(time);\r\n            if (blend == exports.MixBlend.setup)\r\n                constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\r\n            else\r\n                constraint.spacing += (spacing - constraint.spacing) * alpha;\r\n        };\r\n        return PathConstraintSpacingTimeline;\r\n    }(CurveTimeline1));\r\n    /** Changes a transform constraint's {@link PathConstraint#getMixRotate()}, {@link PathConstraint#getMixX()}, and\r\n     * {@link PathConstraint#getMixY()}.\r\n     * @public\r\n     * */\r\n    var PathConstraintMixTimeline = /** @class */ (function (_super) {\r\n        __extends$1(PathConstraintMixTimeline, _super);\r\n        function PathConstraintMixTimeline(frameCount, bezierCount, pathConstraintIndex) {\r\n            var _this = _super.call(this, frameCount, bezierCount, [\r\n                Property.pathConstraintMix + \"|\" + pathConstraintIndex\r\n            ]) || this;\r\n            /** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */\r\n            _this.pathConstraintIndex = 0;\r\n            _this.pathConstraintIndex = pathConstraintIndex;\r\n            return _this;\r\n        }\r\n        PathConstraintMixTimeline.prototype.getFrameEntries = function () {\r\n            return 4 /*ENTRIES*/;\r\n        };\r\n        PathConstraintMixTimeline.prototype.setFrame = function (frame, time, mixRotate, mixX, mixY) {\r\n            var frames = this.frames;\r\n            frame <<= 2;\r\n            frames[frame] = time;\r\n            frames[frame + 1 /*ROTATE*/] = mixRotate;\r\n            frames[frame + 2 /*X*/] = mixX;\r\n            frames[frame + 3 /*Y*/] = mixY;\r\n        };\r\n        PathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n            var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n            if (!constraint.active)\r\n                return;\r\n            var frames = this.frames;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        constraint.mixRotate = constraint.data.mixRotate;\r\n                        constraint.mixX = constraint.data.mixX;\r\n                        constraint.mixY = constraint.data.mixY;\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        constraint.mixRotate += (constraint.data.mixRotate - constraint.mixRotate) * alpha;\r\n                        constraint.mixX += (constraint.data.mixX - constraint.mixX) * alpha;\r\n                        constraint.mixY += (constraint.data.mixY - constraint.mixY) * alpha;\r\n                }\r\n                return;\r\n            }\r\n            var rotate, x, y;\r\n            var i = Timeline.search(frames, time, 4 /*ENTRIES*/);\r\n            var curveType = this.curves[i >> 2];\r\n            switch (curveType) {\r\n                case 0 /*LINEAR*/:\r\n                    var before = frames[i];\r\n                    rotate = frames[i + 1 /*ROTATE*/];\r\n                    x = frames[i + 2 /*X*/];\r\n                    y = frames[i + 3 /*Y*/];\r\n                    var t = (time - before) / (frames[i + 4 /*ENTRIES*/] - before);\r\n                    rotate += (frames[i + 4 /*ENTRIES*/ + 1 /*ROTATE*/] - rotate) * t;\r\n                    x += (frames[i + 4 /*ENTRIES*/ + 2 /*X*/] - x) * t;\r\n                    y += (frames[i + 4 /*ENTRIES*/ + 3 /*Y*/] - y) * t;\r\n                    break;\r\n                case 1 /*STEPPED*/:\r\n                    rotate = frames[i + 1 /*ROTATE*/];\r\n                    x = frames[i + 2 /*X*/];\r\n                    y = frames[i + 3 /*Y*/];\r\n                    break;\r\n                default:\r\n                    rotate = this.getBezierValue(time, i, 1 /*ROTATE*/, curveType - 2 /*BEZIER*/);\r\n                    x = this.getBezierValue(time, i, 2 /*X*/, curveType + 18 /*BEZIER_SIZE*/ - 2 /*BEZIER*/);\r\n                    y = this.getBezierValue(time, i, 3 /*Y*/, curveType + 18 /*BEZIER_SIZE*/ * 2 - 2 /*BEZIER*/);\r\n            }\r\n            if (blend == exports.MixBlend.setup) {\r\n                var data = constraint.data;\r\n                constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\r\n                constraint.mixX = data.mixX + (x - data.mixX) * alpha;\r\n                constraint.mixY = data.mixY + (y - data.mixY) * alpha;\r\n            }\r\n            else {\r\n                constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\r\n                constraint.mixX += (x - constraint.mixX) * alpha;\r\n                constraint.mixY += (y - constraint.mixY) * alpha;\r\n            }\r\n        };\r\n        return PathConstraintMixTimeline;\r\n    }(CurveTimeline));\n\n    /** Applies animations over time, queues animations for later playback, mixes (crossfading) between animations, and applies\r\n     * multiple animations on top of each other (layering).\r\n     *\r\n     * See [Applying Animations](http://esotericsoftware.com/spine-applying-animations/) in the Spine Runtimes Guide.\r\n     * @public\r\n     * */\r\n    var AnimationState = /** @class */ (function () {\r\n        function AnimationState(data) {\r\n            /** The AnimationStateData to look up mix durations. */\r\n            this.data = null;\r\n            /** The list of tracks that currently have animations, which may contain null entries. */\r\n            this.tracks = new Array();\r\n            /** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower\r\n             * or faster. Defaults to 1.\r\n             *\r\n             * See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */\r\n            this.timeScale = 1;\r\n            this.unkeyedState = 0;\r\n            this.events = new Array();\r\n            this.listeners = new Array();\r\n            this.queue = new EventQueue(this);\r\n            this.propertyIDs = new StringSet();\r\n            this.animationsChanged = false;\r\n            this.trackEntryPool = new Pool(function () { return new TrackEntry(); });\r\n            this.data = data;\r\n        }\r\n        AnimationState.emptyAnimation = function () {\r\n            if (!_emptyAnimation)\r\n                _emptyAnimation = new Animation(\"<empty>\", [], 0);\r\n            return _emptyAnimation;\r\n        };\r\n        /** Increments each track entry {@link TrackEntry#trackTime()}, setting queued animations as current if needed. */\r\n        AnimationState.prototype.update = function (delta) {\r\n            delta *= this.timeScale;\r\n            var tracks = this.tracks;\r\n            for (var i = 0, n = tracks.length; i < n; i++) {\r\n                var current = tracks[i];\r\n                if (!current)\r\n                    continue;\r\n                current.animationLast = current.nextAnimationLast;\r\n                current.trackLast = current.nextTrackLast;\r\n                var currentDelta = delta * current.timeScale;\r\n                if (current.delay > 0) {\r\n                    current.delay -= currentDelta;\r\n                    if (current.delay > 0)\r\n                        continue;\r\n                    currentDelta = -current.delay;\r\n                    current.delay = 0;\r\n                }\r\n                var next = current.next;\r\n                if (next) {\r\n                    // When the next entry's delay is passed, change to the next entry, preserving leftover time.\r\n                    var nextTime = current.trackLast - next.delay;\r\n                    if (nextTime >= 0) {\r\n                        next.delay = 0;\r\n                        next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\r\n                        current.trackTime += currentDelta;\r\n                        this.setCurrent(i, next, true);\r\n                        while (next.mixingFrom) {\r\n                            next.mixTime += delta;\r\n                            next = next.mixingFrom;\r\n                        }\r\n                        continue;\r\n                    }\r\n                }\r\n                else if (current.trackLast >= current.trackEnd && !current.mixingFrom) {\r\n                    tracks[i] = null;\r\n                    this.queue.end(current);\r\n                    this.clearNext(current);\r\n                    continue;\r\n                }\r\n                if (current.mixingFrom && this.updateMixingFrom(current, delta)) {\r\n                    // End mixing from entries once all have completed.\r\n                    var from = current.mixingFrom;\r\n                    current.mixingFrom = null;\r\n                    if (from)\r\n                        from.mixingTo = null;\r\n                    while (from) {\r\n                        this.queue.end(from);\r\n                        from = from.mixingFrom;\r\n                    }\r\n                }\r\n                current.trackTime += currentDelta;\r\n            }\r\n            this.queue.drain();\r\n        };\r\n        /** Returns true when all mixing from entries are complete. */\r\n        AnimationState.prototype.updateMixingFrom = function (to, delta) {\r\n            var from = to.mixingFrom;\r\n            if (!from)\r\n                return true;\r\n            var finished = this.updateMixingFrom(from, delta);\r\n            from.animationLast = from.nextAnimationLast;\r\n            from.trackLast = from.nextTrackLast;\r\n            // Require mixTime > 0 to ensure the mixing from entry was applied at least once.\r\n            if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\r\n                // Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame).\r\n                if (from.totalAlpha == 0 || to.mixDuration == 0) {\r\n                    to.mixingFrom = from.mixingFrom;\r\n                    if (from.mixingFrom)\r\n                        from.mixingFrom.mixingTo = to;\r\n                    to.interruptAlpha = from.interruptAlpha;\r\n                    this.queue.end(from);\r\n                }\r\n                return finished;\r\n            }\r\n            from.trackTime += delta * from.timeScale;\r\n            to.mixTime += delta;\r\n            return false;\r\n        };\r\n        /** Poses the skeleton using the track entry animations. There are no side effects other than invoking listeners, so the\r\n         * animation state can be applied to multiple skeletons to pose them identically.\r\n         * @returns True if any animations were applied. */\r\n        AnimationState.prototype.apply = function (skeleton) {\r\n            if (!skeleton)\r\n                throw new Error(\"skeleton cannot be null.\");\r\n            if (this.animationsChanged)\r\n                this._animationsChanged();\r\n            var events = this.events;\r\n            var tracks = this.tracks;\r\n            var applied = false;\r\n            for (var i_1 = 0, n_1 = tracks.length; i_1 < n_1; i_1++) {\r\n                var current = tracks[i_1];\r\n                if (!current || current.delay > 0)\r\n                    continue;\r\n                applied = true;\r\n                var blend = i_1 == 0 ? exports.MixBlend.first : current.mixBlend;\r\n                // Apply mixing from entries first.\r\n                var mix = current.alpha;\r\n                if (current.mixingFrom)\r\n                    mix *= this.applyMixingFrom(current, skeleton, blend);\r\n                else if (current.trackTime >= current.trackEnd && !current.next)\r\n                    mix = 0;\r\n                // Apply current entry.\r\n                var animationLast = current.animationLast, animationTime = current.getAnimationTime(), applyTime = animationTime;\r\n                var applyEvents = events;\r\n                if (current.reverse) {\r\n                    applyTime = current.animation.duration - applyTime;\r\n                    applyEvents = null;\r\n                }\r\n                var timelines = current.animation.timelines;\r\n                var timelineCount = timelines.length;\r\n                if ((i_1 == 0 && mix == 1) || blend == exports.MixBlend.add) {\r\n                    for (var ii = 0; ii < timelineCount; ii++) {\r\n                        // Fixes issue #302 on IOS9 where mix, blend sometimes became undefined and caused assets\r\n                        // to sometimes stop rendering when using color correction, as their RGBA values become NaN.\r\n                        // (https://github.com/pixijs/pixi-spine/issues/302)\r\n                        Utils.webkit602BugfixHelper(mix, blend);\r\n                        var timeline = timelines[ii];\r\n                        if (timeline instanceof AttachmentTimeline)\r\n                            this.applyAttachmentTimeline(timeline, skeleton, applyTime, blend, true);\r\n                        else\r\n                            timeline.apply(skeleton, animationLast, applyTime, applyEvents, mix, blend, exports.MixDirection.mixIn);\r\n                    }\r\n                }\r\n                else {\r\n                    var timelineMode = current.timelineMode;\r\n                    var firstFrame = current.timelinesRotation.length != timelineCount << 1;\r\n                    if (firstFrame)\r\n                        current.timelinesRotation.length = timelineCount << 1;\r\n                    for (var ii = 0; ii < timelineCount; ii++) {\r\n                        var timeline_1 = timelines[ii];\r\n                        var timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : exports.MixBlend.setup;\r\n                        if (timeline_1 instanceof RotateTimeline) {\r\n                            this.applyRotateTimeline(timeline_1, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);\r\n                        }\r\n                        else if (timeline_1 instanceof AttachmentTimeline) {\r\n                            this.applyAttachmentTimeline(timeline_1, skeleton, applyTime, blend, true);\r\n                        }\r\n                        else {\r\n                            // This fixes the WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109\r\n                            Utils.webkit602BugfixHelper(mix, blend);\r\n                            timeline_1.apply(skeleton, animationLast, applyTime, applyEvents, mix, timelineBlend, exports.MixDirection.mixIn);\r\n                        }\r\n                    }\r\n                }\r\n                this.queueEvents(current, animationTime);\r\n                events.length = 0;\r\n                current.nextAnimationLast = animationTime;\r\n                current.nextTrackLast = current.trackTime;\r\n            }\r\n            // Set slots attachments to the setup pose, if needed. This occurs if an animation that is mixing out sets attachments so\r\n            // subsequent timelines see any deform, but the subsequent timelines don't set an attachment (eg they are also mixing out or\r\n            // the time is before the first key).\r\n            var setupState = this.unkeyedState + SETUP;\r\n            var slots = skeleton.slots;\r\n            for (var i = 0, n = skeleton.slots.length; i < n; i++) {\r\n                var slot = slots[i];\r\n                if (slot.attachmentState == setupState) {\r\n                    var attachmentName = slot.data.attachmentName;\r\n                    slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n                }\r\n            }\r\n            this.unkeyedState += 2; // Increasing after each use avoids the need to reset attachmentState for every slot.\r\n            this.queue.drain();\r\n            return applied;\r\n        };\r\n        AnimationState.prototype.applyMixingFrom = function (to, skeleton, blend) {\r\n            var from = to.mixingFrom;\r\n            if (from.mixingFrom)\r\n                this.applyMixingFrom(from, skeleton, blend);\r\n            var mix = 0;\r\n            if (to.mixDuration == 0) { // Single frame mix to undo mixingFrom changes.\r\n                mix = 1;\r\n                if (blend == exports.MixBlend.first)\r\n                    blend = exports.MixBlend.setup;\r\n            }\r\n            else {\r\n                mix = to.mixTime / to.mixDuration;\r\n                if (mix > 1)\r\n                    mix = 1;\r\n                if (blend != exports.MixBlend.first)\r\n                    blend = from.mixBlend;\r\n            }\r\n            var attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\r\n            var timelines = from.animation.timelines;\r\n            var timelineCount = timelines.length;\r\n            var alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\r\n            var animationLast = from.animationLast, animationTime = from.getAnimationTime(), applyTime = animationTime;\r\n            var events = null;\r\n            if (from.reverse)\r\n                applyTime = from.animation.duration - applyTime;\r\n            else if (mix < from.eventThreshold)\r\n                events = this.events;\r\n            if (blend == exports.MixBlend.add) {\r\n                for (var i = 0; i < timelineCount; i++)\r\n                    timelines[i].apply(skeleton, animationLast, applyTime, events, alphaMix, blend, exports.MixDirection.mixOut);\r\n            }\r\n            else {\r\n                var timelineMode = from.timelineMode;\r\n                var timelineHoldMix = from.timelineHoldMix;\r\n                var firstFrame = from.timelinesRotation.length != timelineCount << 1;\r\n                if (firstFrame)\r\n                    from.timelinesRotation.length = timelineCount << 1;\r\n                from.totalAlpha = 0;\r\n                for (var i = 0; i < timelineCount; i++) {\r\n                    var timeline = timelines[i];\r\n                    var direction = exports.MixDirection.mixOut;\r\n                    var timelineBlend = void 0;\r\n                    var alpha = 0;\r\n                    switch (timelineMode[i]) {\r\n                        case SUBSEQUENT:\r\n                            if (!drawOrder && timeline instanceof DrawOrderTimeline)\r\n                                continue;\r\n                            timelineBlend = blend;\r\n                            alpha = alphaMix;\r\n                            break;\r\n                        case FIRST:\r\n                            timelineBlend = exports.MixBlend.setup;\r\n                            alpha = alphaMix;\r\n                            break;\r\n                        case HOLD_SUBSEQUENT:\r\n                            timelineBlend = blend;\r\n                            alpha = alphaHold;\r\n                            break;\r\n                        case HOLD_FIRST:\r\n                            timelineBlend = exports.MixBlend.setup;\r\n                            alpha = alphaHold;\r\n                            break;\r\n                        default:\r\n                            timelineBlend = exports.MixBlend.setup;\r\n                            var holdMix = timelineHoldMix[i];\r\n                            alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\r\n                            break;\r\n                    }\r\n                    from.totalAlpha += alpha;\r\n                    if (timeline instanceof RotateTimeline)\r\n                        this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);\r\n                    else if (timeline instanceof AttachmentTimeline)\r\n                        this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);\r\n                    else {\r\n                        // This fixes the WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109\r\n                        Utils.webkit602BugfixHelper(alpha, blend);\r\n                        if (drawOrder && timeline instanceof DrawOrderTimeline && timelineBlend == exports.MixBlend.setup)\r\n                            direction = exports.MixDirection.mixIn;\r\n                        timeline.apply(skeleton, animationLast, applyTime, events, alpha, timelineBlend, direction);\r\n                    }\r\n                }\r\n            }\r\n            if (to.mixDuration > 0)\r\n                this.queueEvents(from, animationTime);\r\n            this.events.length = 0;\r\n            from.nextAnimationLast = animationTime;\r\n            from.nextTrackLast = from.trackTime;\r\n            return mix;\r\n        };\r\n        AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) {\r\n            var slot = skeleton.slots[timeline.slotIndex];\r\n            if (!slot.bone.active)\r\n                return;\r\n            if (time < timeline.frames[0]) { // Time is before first frame.\r\n                if (blend == exports.MixBlend.setup || blend == exports.MixBlend.first)\r\n                    this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\r\n            }\r\n            else\r\n                this.setAttachment(skeleton, slot, timeline.attachmentNames[Timeline.search1(timeline.frames, time)], attachments);\r\n            // If an attachment wasn't set (ie before the first frame or attachments is false), set the setup attachment later.\r\n            if (slot.attachmentState <= this.unkeyedState)\r\n                slot.attachmentState = this.unkeyedState + SETUP;\r\n        };\r\n        AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) {\r\n            slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n            if (attachments)\r\n                slot.attachmentState = this.unkeyedState + CURRENT;\r\n        };\r\n        AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\r\n            if (firstFrame)\r\n                timelinesRotation[i] = 0;\r\n            if (alpha == 1) {\r\n                timeline.apply(skeleton, 0, time, null, 1, blend, exports.MixDirection.mixIn);\r\n                return;\r\n            }\r\n            var bone = skeleton.bones[timeline.boneIndex];\r\n            if (!bone.active)\r\n                return;\r\n            var frames = timeline.frames;\r\n            var r1 = 0, r2 = 0;\r\n            if (time < frames[0]) {\r\n                switch (blend) {\r\n                    case exports.MixBlend.setup:\r\n                        bone.rotation = bone.data.rotation;\r\n                    default:\r\n                        return;\r\n                    case exports.MixBlend.first:\r\n                        r1 = bone.rotation;\r\n                        r2 = bone.data.rotation;\r\n                }\r\n            }\r\n            else {\r\n                r1 = blend == exports.MixBlend.setup ? bone.data.rotation : bone.rotation;\r\n                r2 = bone.data.rotation + timeline.getCurveValue(time);\r\n            }\r\n            // Mix between rotations using the direction of the shortest route on the first frame while detecting crosses.\r\n            var total = 0, diff = r2 - r1;\r\n            diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\r\n            if (diff == 0) {\r\n                total = timelinesRotation[i];\r\n            }\r\n            else {\r\n                var lastTotal = 0, lastDiff = 0;\r\n                if (firstFrame) {\r\n                    lastTotal = 0;\r\n                    lastDiff = diff;\r\n                }\r\n                else {\r\n                    lastTotal = timelinesRotation[i]; // Angle and direction of mix, including loops.\r\n                    lastDiff = timelinesRotation[i + 1]; // Difference between bones.\r\n                }\r\n                var current = diff > 0, dir = lastTotal >= 0;\r\n                // Detect cross at 0 (not 180).\r\n                if (MathUtils.signum(lastDiff) != MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\r\n                    // A cross after a 360 rotation is a loop.\r\n                    if (Math.abs(lastTotal) > 180)\r\n                        lastTotal += 360 * MathUtils.signum(lastTotal);\r\n                    dir = current;\r\n                }\r\n                total = diff + lastTotal - lastTotal % 360; // Store loops as part of lastTotal.\r\n                if (dir != current)\r\n                    total += 360 * MathUtils.signum(lastTotal);\r\n                timelinesRotation[i] = total;\r\n            }\r\n            timelinesRotation[i + 1] = diff;\r\n            bone.rotation = r1 + total * alpha;\r\n        };\r\n        AnimationState.prototype.queueEvents = function (entry, animationTime) {\r\n            var animationStart = entry.animationStart, animationEnd = entry.animationEnd;\r\n            var duration = animationEnd - animationStart;\r\n            var trackLastWrapped = entry.trackLast % duration;\r\n            // Queue events before complete.\r\n            var events = this.events;\r\n            var i = 0, n = events.length;\r\n            for (; i < n; i++) {\r\n                var event_1 = events[i];\r\n                if (event_1.time < trackLastWrapped)\r\n                    break;\r\n                if (event_1.time > animationEnd)\r\n                    continue; // Discard events outside animation start/end.\r\n                this.queue.event(entry, event_1);\r\n            }\r\n            // Queue complete if completed a loop iteration or the animation.\r\n            var complete = false;\r\n            if (entry.loop)\r\n                complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\r\n            else\r\n                complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\r\n            if (complete)\r\n                this.queue.complete(entry);\r\n            // Queue events after complete.\r\n            for (; i < n; i++) {\r\n                var event_2 = events[i];\r\n                if (event_2.time < animationStart)\r\n                    continue; // Discard events outside animation start/end.\r\n                this.queue.event(entry, event_2);\r\n            }\r\n        };\r\n        /** Removes all animations from all tracks, leaving skeletons in their current pose.\r\n         *\r\n         * It may be desired to use {@link AnimationState#setEmptyAnimation()} to mix the skeletons back to the setup pose,\r\n         * rather than leaving them in their current pose. */\r\n        AnimationState.prototype.clearTracks = function () {\r\n            var oldDrainDisabled = this.queue.drainDisabled;\r\n            this.queue.drainDisabled = true;\r\n            for (var i = 0, n = this.tracks.length; i < n; i++)\r\n                this.clearTrack(i);\r\n            this.tracks.length = 0;\r\n            this.queue.drainDisabled = oldDrainDisabled;\r\n            this.queue.drain();\r\n        };\r\n        /** Removes all animations from the track, leaving skeletons in their current pose.\r\n         *\r\n         * It may be desired to use {@link AnimationState#setEmptyAnimation()} to mix the skeletons back to the setup pose,\r\n         * rather than leaving them in their current pose. */\r\n        AnimationState.prototype.clearTrack = function (trackIndex) {\r\n            if (trackIndex >= this.tracks.length)\r\n                return;\r\n            var current = this.tracks[trackIndex];\r\n            if (!current)\r\n                return;\r\n            this.queue.end(current);\r\n            this.clearNext(current);\r\n            var entry = current;\r\n            while (true) {\r\n                var from = entry.mixingFrom;\r\n                if (!from)\r\n                    break;\r\n                this.queue.end(from);\r\n                entry.mixingFrom = null;\r\n                entry.mixingTo = null;\r\n                entry = from;\r\n            }\r\n            this.tracks[current.trackIndex] = null;\r\n            this.queue.drain();\r\n        };\r\n        AnimationState.prototype.setCurrent = function (index, current, interrupt) {\r\n            var from = this.expandToIndex(index);\r\n            this.tracks[index] = current;\r\n            current.previous = null;\r\n            if (from) {\r\n                if (interrupt)\r\n                    this.queue.interrupt(from);\r\n                current.mixingFrom = from;\r\n                from.mixingTo = current;\r\n                current.mixTime = 0;\r\n                // Store the interrupted mix percentage.\r\n                if (from.mixingFrom && from.mixDuration > 0)\r\n                    current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\r\n                from.timelinesRotation.length = 0; // Reset rotation for mixing out, in case entry was mixed in.\r\n            }\r\n            this.queue.start(current);\r\n        };\r\n        /** Sets an animation by name.\r\n         *\r\n         * See {@link #setAnimationWith()}. */\r\n        AnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) {\r\n            if (loop === void 0) { loop = false; }\r\n            var animation = this.data.skeletonData.findAnimation(animationName);\r\n            if (!animation)\r\n                throw new Error(\"Animation not found: \" + animationName);\r\n            return this.setAnimationWith(trackIndex, animation, loop);\r\n        };\r\n        /** Sets the current animation for a track, discarding any queued animations. If the formerly current track entry was never\r\n         * applied to a skeleton, it is replaced (not mixed from).\r\n         * @param loop If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its\r\n         *           duration. In either case {@link TrackEntry#trackEnd} determines when the track is cleared.\r\n         * @returns A track entry to allow further customization of animation playback. References to the track entry must not be kept\r\n         *         after the {@link AnimationStateListener#dispose()} event occurs. */\r\n        AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) {\r\n            if (loop === void 0) { loop = false; }\r\n            if (!animation)\r\n                throw new Error(\"animation cannot be null.\");\r\n            var interrupt = true;\r\n            var current = this.expandToIndex(trackIndex);\r\n            if (current) {\r\n                if (current.nextTrackLast == -1) {\r\n                    // Don't mix from an entry that was never applied.\r\n                    this.tracks[trackIndex] = current.mixingFrom;\r\n                    this.queue.interrupt(current);\r\n                    this.queue.end(current);\r\n                    this.clearNext(current);\r\n                    current = current.mixingFrom;\r\n                    interrupt = false;\r\n                }\r\n                else\r\n                    this.clearNext(current);\r\n            }\r\n            var entry = this.trackEntry(trackIndex, animation, loop, current);\r\n            this.setCurrent(trackIndex, entry, interrupt);\r\n            this.queue.drain();\r\n            return entry;\r\n        };\r\n        /** Queues an animation by name.\r\n         *\r\n         * See {@link #addAnimationWith()}. */\r\n        AnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) {\r\n            if (loop === void 0) { loop = false; }\r\n            if (delay === void 0) { delay = 0; }\r\n            var animation = this.data.skeletonData.findAnimation(animationName);\r\n            if (!animation)\r\n                throw new Error(\"Animation not found: \" + animationName);\r\n            return this.addAnimationWith(trackIndex, animation, loop, delay);\r\n        };\r\n        /** Adds an animation to be played after the current or last queued animation for a track. If the track is empty, it is\r\n         * equivalent to calling {@link #setAnimationWith()}.\r\n         * @param delay If > 0, sets {@link TrackEntry#delay}. If <= 0, the delay set is the duration of the previous track entry\r\n         *           minus any mix duration (from the {@link AnimationStateData}) plus the specified `delay` (ie the mix\r\n         *           ends at (`delay` = 0) or before (`delay` < 0) the previous track entry duration). If the\r\n         *           previous entry is looping, its next loop completion is used instead of its duration.\r\n         * @returns A track entry to allow further customization of animation playback. References to the track entry must not be kept\r\n         *         after the {@link AnimationStateListener#dispose()} event occurs. */\r\n        AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) {\r\n            if (loop === void 0) { loop = false; }\r\n            if (delay === void 0) { delay = 0; }\r\n            if (!animation)\r\n                throw new Error(\"animation cannot be null.\");\r\n            var last = this.expandToIndex(trackIndex);\r\n            if (last) {\r\n                while (last.next)\r\n                    last = last.next;\r\n            }\r\n            var entry = this.trackEntry(trackIndex, animation, loop, last);\r\n            if (!last) {\r\n                this.setCurrent(trackIndex, entry, true);\r\n                this.queue.drain();\r\n            }\r\n            else {\r\n                last.next = entry;\r\n                entry.previous = last;\r\n                if (delay <= 0)\r\n                    delay += last.getTrackComplete() - entry.mixDuration;\r\n            }\r\n            entry.delay = delay;\r\n            return entry;\r\n        };\r\n        /** Sets an empty animation for a track, discarding any queued animations, and sets the track entry's\r\n         * {@link TrackEntry#mixduration}. An empty animation has no timelines and serves as a placeholder for mixing in or out.\r\n         *\r\n         * Mixing out is done by setting an empty animation with a mix duration using either {@link #setEmptyAnimation()},\r\n         * {@link #setEmptyAnimations()}, or {@link #addEmptyAnimation()}. Mixing to an empty animation causes\r\n         * the previous animation to be applied less and less over the mix duration. Properties keyed in the previous animation\r\n         * transition to the value from lower tracks or to the setup pose value if no lower tracks key the property. A mix duration of\r\n         * 0 still mixes out over one frame.\r\n         *\r\n         * Mixing in is done by first setting an empty animation, then adding an animation using\r\n         * {@link #addAnimation()} and on the returned track entry, set the\r\n         * {@link TrackEntry#setMixDuration()}. Mixing from an empty animation causes the new animation to be applied more and\r\n         * more over the mix duration. Properties keyed in the new animation transition from the value from lower tracks or from the\r\n         * setup pose value if no lower tracks key the property to the value keyed in the new animation. */\r\n        AnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) {\r\n            if (mixDuration === void 0) { mixDuration = 0; }\r\n            var entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation(), false);\r\n            entry.mixDuration = mixDuration;\r\n            entry.trackEnd = mixDuration;\r\n            return entry;\r\n        };\r\n        /** Adds an empty animation to be played after the current or last queued animation for a track, and sets the track entry's\r\n         * {@link TrackEntry#mixDuration}. If the track is empty, it is equivalent to calling\r\n         * {@link #setEmptyAnimation()}.\r\n         *\r\n         * See {@link #setEmptyAnimation()}.\r\n         * @param delay If > 0, sets {@link TrackEntry#delay}. If <= 0, the delay set is the duration of the previous track entry\r\n         *           minus any mix duration plus the specified `delay` (ie the mix ends at (`delay` = 0) or\r\n         *           before (`delay` < 0) the previous track entry duration). If the previous entry is looping, its next\r\n         *           loop completion is used instead of its duration.\r\n         * @return A track entry to allow further customization of animation playback. References to the track entry must not be kept\r\n         *         after the {@link AnimationStateListener#dispose()} event occurs. */\r\n        AnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) {\r\n            if (mixDuration === void 0) { mixDuration = 0; }\r\n            if (delay === void 0) { delay = 0; }\r\n            var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation(), false, delay);\r\n            if (delay <= 0)\r\n                entry.delay += entry.mixDuration - mixDuration;\r\n            entry.mixDuration = mixDuration;\r\n            entry.trackEnd = mixDuration;\r\n            return entry;\r\n        };\r\n        /** Sets an empty animation for every track, discarding any queued animations, and mixes to it over the specified mix\r\n         * duration. */\r\n        AnimationState.prototype.setEmptyAnimations = function (mixDuration) {\r\n            if (mixDuration === void 0) { mixDuration = 0; }\r\n            var oldDrainDisabled = this.queue.drainDisabled;\r\n            this.queue.drainDisabled = true;\r\n            for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n                var current = this.tracks[i];\r\n                if (current)\r\n                    this.setEmptyAnimation(current.trackIndex, mixDuration);\r\n            }\r\n            this.queue.drainDisabled = oldDrainDisabled;\r\n            this.queue.drain();\r\n        };\r\n        AnimationState.prototype.expandToIndex = function (index) {\r\n            if (index < this.tracks.length)\r\n                return this.tracks[index];\r\n            Utils.ensureArrayCapacity(this.tracks, index + 1, null);\r\n            this.tracks.length = index + 1;\r\n            return null;\r\n        };\r\n        /** @param last May be null. */\r\n        AnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) {\r\n            var entry = this.trackEntryPool.obtain();\r\n            entry.reset();\r\n            entry.trackIndex = trackIndex;\r\n            entry.animation = animation;\r\n            entry.loop = loop;\r\n            entry.holdPrevious = false;\r\n            entry.eventThreshold = 0;\r\n            entry.attachmentThreshold = 0;\r\n            entry.drawOrderThreshold = 0;\r\n            entry.animationStart = 0;\r\n            entry.animationEnd = animation.duration;\r\n            entry.animationLast = -1;\r\n            entry.nextAnimationLast = -1;\r\n            entry.delay = 0;\r\n            entry.trackTime = 0;\r\n            entry.trackLast = -1;\r\n            entry.nextTrackLast = -1;\r\n            entry.trackEnd = Number.MAX_VALUE;\r\n            entry.timeScale = 1;\r\n            entry.alpha = 1;\r\n            entry.interruptAlpha = 1;\r\n            entry.mixTime = 0;\r\n            entry.mixDuration = !last ? 0 : this.data.getMix(last.animation, animation);\r\n            entry.mixBlend = exports.MixBlend.replace;\r\n            return entry;\r\n        };\r\n        /** Removes the {@link TrackEntry#getNext() next entry} and all entries after it for the specified entry. */\r\n        AnimationState.prototype.clearNext = function (entry) {\r\n            var next = entry.next;\r\n            while (next) {\r\n                this.queue.dispose(next);\r\n                next = next.next;\r\n            }\r\n            entry.next = null;\r\n        };\r\n        AnimationState.prototype._animationsChanged = function () {\r\n            this.animationsChanged = false;\r\n            this.propertyIDs.clear();\r\n            var tracks = this.tracks;\r\n            for (var i = 0, n = tracks.length; i < n; i++) {\r\n                var entry = tracks[i];\r\n                if (!entry)\r\n                    continue;\r\n                while (entry.mixingFrom)\r\n                    entry = entry.mixingFrom;\r\n                do {\r\n                    if (!entry.mixingTo || entry.mixBlend != exports.MixBlend.add)\r\n                        this.computeHold(entry);\r\n                    entry = entry.mixingTo;\r\n                } while (entry);\r\n            }\r\n        };\r\n        AnimationState.prototype.computeHold = function (entry) {\r\n            var to = entry.mixingTo;\r\n            var timelines = entry.animation.timelines;\r\n            var timelinesCount = entry.animation.timelines.length;\r\n            var timelineMode = entry.timelineMode;\r\n            timelineMode.length = timelinesCount;\r\n            var timelineHoldMix = entry.timelineHoldMix;\r\n            timelineHoldMix.length = 0;\r\n            var propertyIDs = this.propertyIDs;\r\n            if (to && to.holdPrevious) {\r\n                for (var i = 0; i < timelinesCount; i++)\r\n                    timelineMode[i] = propertyIDs.addAll(timelines[i].getPropertyIds()) ? HOLD_FIRST : HOLD_SUBSEQUENT;\r\n                return;\r\n            }\r\n            outer: for (var i = 0; i < timelinesCount; i++) {\r\n                var timeline = timelines[i];\r\n                var ids = timeline.getPropertyIds();\r\n                if (!propertyIDs.addAll(ids))\r\n                    timelineMode[i] = SUBSEQUENT;\r\n                else if (!to || timeline instanceof AttachmentTimeline || timeline instanceof DrawOrderTimeline\r\n                    || timeline instanceof EventTimeline || !to.animation.hasTimeline(ids)) {\r\n                    timelineMode[i] = FIRST;\r\n                }\r\n                else {\r\n                    for (var next = to.mixingTo; next; next = next.mixingTo) {\r\n                        if (next.animation.hasTimeline(ids))\r\n                            continue;\r\n                        if (entry.mixDuration > 0) {\r\n                            timelineMode[i] = HOLD_MIX;\r\n                            timelineHoldMix[i] = next;\r\n                            continue outer;\r\n                        }\r\n                        break;\r\n                    }\r\n                    timelineMode[i] = HOLD_FIRST;\r\n                }\r\n            }\r\n        };\r\n        /** Returns the track entry for the animation currently playing on the track, or null if no animation is currently playing. */\r\n        AnimationState.prototype.getCurrent = function (trackIndex) {\r\n            if (trackIndex >= this.tracks.length)\r\n                return null;\r\n            return this.tracks[trackIndex];\r\n        };\r\n        /** Adds a listener to receive events for all track entries. */\r\n        AnimationState.prototype.addListener = function (listener) {\r\n            if (!listener)\r\n                throw new Error(\"listener cannot be null.\");\r\n            this.listeners.push(listener);\r\n        };\r\n        /** Removes the listener added with {@link #addListener()}. */\r\n        AnimationState.prototype.removeListener = function (listener) {\r\n            var index = this.listeners.indexOf(listener);\r\n            if (index >= 0)\r\n                this.listeners.splice(index, 1);\r\n        };\r\n        /** Removes all listeners added with {@link #addListener()}. */\r\n        AnimationState.prototype.clearListeners = function () {\r\n            this.listeners.length = 0;\r\n        };\r\n        /** Discards all listener notifications that have not yet been delivered. This can be useful to call from an\r\n         * {@link AnimationStateListener} when it is known that further notifications that may have been already queued for delivery\r\n         * are not wanted because new animations are being set. */\r\n        AnimationState.prototype.clearListenerNotifications = function () {\r\n            this.queue.clear();\r\n        };\r\n        AnimationState.prototype.setAnimationByName = function (trackIndex, animationName, loop) {\r\n            if (!AnimationState.deprecatedWarning1) {\r\n                AnimationState.deprecatedWarning1 = true;\r\n                console.warn(\"Spine Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.\");\r\n            }\r\n            this.setAnimation(trackIndex, animationName, loop);\r\n        };\r\n        AnimationState.prototype.addAnimationByName = function (trackIndex, animationName, loop, delay) {\r\n            if (!AnimationState.deprecatedWarning2) {\r\n                AnimationState.deprecatedWarning2 = true;\r\n                console.warn(\"Spine Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.\");\r\n            }\r\n            this.addAnimation(trackIndex, animationName, loop, delay);\r\n        };\r\n        AnimationState.prototype.hasAnimation = function (animationName) {\r\n            var animation = this.data.skeletonData.findAnimation(animationName);\r\n            return animation !== null;\r\n        };\r\n        AnimationState.prototype.hasAnimationByName = function (animationName) {\r\n            if (!AnimationState.deprecatedWarning3) {\r\n                AnimationState.deprecatedWarning3 = true;\r\n                console.warn(\"Spine Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.\");\r\n            }\r\n            return this.hasAnimation(animationName);\r\n        };\r\n        AnimationState.deprecatedWarning1 = false;\r\n        AnimationState.deprecatedWarning2 = false;\r\n        AnimationState.deprecatedWarning3 = false;\r\n        return AnimationState;\r\n    }());\r\n    /** Stores settings and other state for the playback of an animation on an {@link AnimationState} track.\r\n     *\r\n     * References to a track entry must not be kept after the {@link AnimationStateListener#dispose()} event occurs.\r\n     * @public\r\n     * */\r\n    var TrackEntry = /** @class */ (function () {\r\n        function TrackEntry() {\r\n            /** The animation to apply for this track entry. */\r\n            this.animation = null;\r\n            this.previous = null;\r\n            /** The animation queued to start after this animation, or null. `next` makes up a linked list. */\r\n            this.next = null;\r\n            /** The track entry for the previous animation when mixing from the previous animation to this animation, or null if no\r\n             * mixing is currently occuring. When mixing from multiple animations, `mixingFrom` makes up a linked list. */\r\n            this.mixingFrom = null;\r\n            /** The track entry for the next animation when mixing from this animation to the next animation, or null if no mixing is\r\n             * currently occuring. When mixing to multiple animations, `mixingTo` makes up a linked list. */\r\n            this.mixingTo = null;\r\n            /** The listener for events generated by this track entry, or null.\r\n             *\r\n             * A track entry returned from {@link AnimationState#setAnimation()} is already the current animation\r\n             * for the track, so the track entry listener {@link AnimationStateListener#start()} will not be called. */\r\n            this.listener = null;\r\n            /** The index of the track where this track entry is either current or queued.\r\n             *\r\n             * See {@link AnimationState#getCurrent()}. */\r\n            this.trackIndex = 0;\r\n            /** If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its\r\n             * duration. */\r\n            this.loop = false;\r\n            /** If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead\r\n             * of being mixed out.\r\n             *\r\n             * When mixing between animations that key the same property, if a lower track also keys that property then the value will\r\n             * briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0%\r\n             * while the second animation mixes from 0% to 100%. Setting `holdPrevious` to true applies the first animation\r\n             * at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which\r\n             * keys the property, only when a higher track also keys the property.\r\n             *\r\n             * Snapping will occur if `holdPrevious` is true and this animation does not key all the same properties as the\r\n             * previous animation. */\r\n            this.holdPrevious = false;\r\n            this.reverse = false;\r\n            /** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the\r\n             * `eventThreshold`, event timelines are applied while this animation is being mixed out. Defaults to 0, so event\r\n             * timelines are not applied while this animation is being mixed out. */\r\n            this.eventThreshold = 0;\r\n            /** When the mix percentage ({@link #mixtime} / {@link #mixDuration}) is less than the\r\n             * `attachmentThreshold`, attachment timelines are applied while this animation is being mixed out. Defaults to\r\n             * 0, so attachment timelines are not applied while this animation is being mixed out. */\r\n            this.attachmentThreshold = 0;\r\n            /** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the\r\n             * `drawOrderThreshold`, draw order timelines are applied while this animation is being mixed out. Defaults to 0,\r\n             * so draw order timelines are not applied while this animation is being mixed out. */\r\n            this.drawOrderThreshold = 0;\r\n            /** Seconds when this animation starts, both initially and after looping. Defaults to 0.\r\n             *\r\n             * When changing the `animationStart` time, it often makes sense to set {@link #animationLast} to the same\r\n             * value to prevent timeline keys before the start time from triggering. */\r\n            this.animationStart = 0;\r\n            /** Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will\r\n             * loop back to {@link #animationStart} at this time. Defaults to the animation {@link Animation#duration}. */\r\n            this.animationEnd = 0;\r\n            /** The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this\r\n             * animation is applied, event timelines will fire all events between the `animationLast` time (exclusive) and\r\n             * `animationTime` (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation\r\n             * is applied. */\r\n            this.animationLast = 0;\r\n            this.nextAnimationLast = 0;\r\n            /** Seconds to postpone playing the animation. When this track entry is the current track entry, `delay`\r\n             * postpones incrementing the {@link #trackTime}. When this track entry is queued, `delay` is the time from\r\n             * the start of the previous animation to when this track entry will become the current track entry (ie when the previous\r\n             * track entry {@link TrackEntry#trackTime} >= this track entry's `delay`).\r\n             *\r\n             * {@link #timeScale} affects the delay. */\r\n            this.delay = 0;\r\n            /** Current time in seconds this track entry has been the current track entry. The track time determines\r\n             * {@link #animationTime}. The track time can be set to start the animation at a time other than 0, without affecting\r\n             * looping. */\r\n            this.trackTime = 0;\r\n            this.trackLast = 0;\r\n            this.nextTrackLast = 0;\r\n            /** The track time in seconds when this animation will be removed from the track. Defaults to the highest possible float\r\n             * value, meaning the animation will be applied until a new animation is set or the track is cleared. If the track end time\r\n             * is reached, no other animations are queued for playback, and mixing from any previous animations is complete, then the\r\n             * properties keyed by the animation are set to the setup pose and the track is cleared.\r\n             *\r\n             * It may be desired to use {@link AnimationState#addEmptyAnimation()} rather than have the animation\r\n             * abruptly cease being applied. */\r\n            this.trackEnd = 0;\r\n            /** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or\r\n             * faster. Defaults to 1.\r\n             *\r\n             * {@link #mixTime} is not affected by track entry time scale, so {@link #mixDuration} may need to be adjusted to\r\n             * match the animation speed.\r\n             *\r\n             * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the\r\n             * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, assuming time scale to be 1. If\r\n             * the time scale is not 1, the delay may need to be adjusted.\r\n             *\r\n             * See AnimationState {@link AnimationState#timeScale} for affecting all animations. */\r\n            this.timeScale = 0;\r\n            /** Values < 1 mix this animation with the skeleton's current pose (usually the pose resulting from lower tracks). Defaults\r\n             * to 1, which overwrites the skeleton's current pose with this animation.\r\n             *\r\n             * Typically track 0 is used to completely pose the skeleton, then alpha is used on higher tracks. It doesn't make sense to\r\n             * use alpha on track 0 if the skeleton pose is from the last frame render. */\r\n            this.alpha = 0;\r\n            /** Seconds from 0 to the {@link #getMixDuration()} when mixing from the previous animation to this animation. May be\r\n             * slightly more than `mixDuration` when the mix is complete. */\r\n            this.mixTime = 0;\r\n            /** Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData\r\n             * {@link AnimationStateData#getMix()} based on the animation before this animation (if any).\r\n             *\r\n             * A mix duration of 0 still mixes out over one frame to provide the track entry being mixed out a chance to revert the\r\n             * properties it was animating.\r\n             *\r\n             * The `mixDuration` can be set manually rather than use the value from\r\n             * {@link AnimationStateData#getMix()}. In that case, the `mixDuration` can be set for a new\r\n             * track entry only before {@link AnimationState#update(float)} is first called.\r\n             *\r\n             * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the\r\n             * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, not a mix duration set\r\n             * afterward. */\r\n            this.mixDuration = 0;\r\n            this.interruptAlpha = 0;\r\n            this.totalAlpha = 0;\r\n            /** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which\r\n             * replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to\r\n             * the values from the lower tracks.\r\n             *\r\n             * The `mixBlend` can be set for a new track entry only before {@link AnimationState#apply()} is first\r\n             * called. */\r\n            this.mixBlend = exports.MixBlend.replace;\r\n            this.timelineMode = new Array();\r\n            this.timelineHoldMix = new Array();\r\n            this.timelinesRotation = new Array();\r\n        }\r\n        TrackEntry.prototype.reset = function () {\r\n            this.next = null;\r\n            this.previous = null;\r\n            this.mixingFrom = null;\r\n            this.mixingTo = null;\r\n            this.animation = null;\r\n            this.listener = null;\r\n            this.timelineMode.length = 0;\r\n            this.timelineHoldMix.length = 0;\r\n            this.timelinesRotation.length = 0;\r\n        };\r\n        /** Uses {@link #trackTime} to compute the `animationTime`, which is between {@link #animationStart}\r\n         * and {@link #animationEnd}. When the `trackTime` is 0, the `animationTime` is equal to the\r\n         * `animationStart` time. */\r\n        TrackEntry.prototype.getAnimationTime = function () {\r\n            if (this.loop) {\r\n                var duration = this.animationEnd - this.animationStart;\r\n                if (duration == 0)\r\n                    return this.animationStart;\r\n                return (this.trackTime % duration) + this.animationStart;\r\n            }\r\n            return Math.min(this.trackTime + this.animationStart, this.animationEnd);\r\n        };\r\n        TrackEntry.prototype.setAnimationLast = function (animationLast) {\r\n            this.animationLast = animationLast;\r\n            this.nextAnimationLast = animationLast;\r\n        };\r\n        /** Returns true if at least one loop has been completed.\r\n         *\r\n         * See {@link AnimationStateListener#complete()}. */\r\n        TrackEntry.prototype.isComplete = function () {\r\n            return this.trackTime >= this.animationEnd - this.animationStart;\r\n        };\r\n        /** Resets the rotation directions for mixing this entry's rotate timelines. This can be useful to avoid bones rotating the\r\n         * long way around when using {@link #alpha} and starting animations on other tracks.\r\n         *\r\n         * Mixing with {@link MixBlend#replace} involves finding a rotation between two others, which has two possible solutions:\r\n         * the short way or the long way around. The two rotations likely change over time, so which direction is the short or long\r\n         * way also changes. If the short way was always chosen, bones would flip to the other side when that direction became the\r\n         * long way. TrackEntry chooses the short way the first time it is applied and remembers that direction. */\r\n        TrackEntry.prototype.resetRotationDirections = function () {\r\n            this.timelinesRotation.length = 0;\r\n        };\r\n        TrackEntry.prototype.getTrackComplete = function () {\r\n            var duration = this.animationEnd - this.animationStart;\r\n            if (duration != 0) {\r\n                if (this.loop)\r\n                    return duration * (1 + ((this.trackTime / duration) | 0)); // Completion of next loop.\r\n                if (this.trackTime < duration)\r\n                    return duration; // Before duration.\r\n            }\r\n            return this.trackTime; // Next update.\r\n        };\r\n        Object.defineProperty(TrackEntry.prototype, \"time\", {\r\n            get: function () {\r\n                if (!TrackEntry.deprecatedWarning1) {\r\n                    TrackEntry.deprecatedWarning1 = true;\r\n                    console.warn(\"Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.\");\r\n                }\r\n                return this.trackTime;\r\n            },\r\n            set: function (value) {\r\n                if (!TrackEntry.deprecatedWarning1) {\r\n                    TrackEntry.deprecatedWarning1 = true;\r\n                    console.warn(\"Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.\");\r\n                }\r\n                this.trackTime = value;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(TrackEntry.prototype, \"endTime\", {\r\n            get: function () {\r\n                if (!TrackEntry.deprecatedWarning2) {\r\n                    TrackEntry.deprecatedWarning2 = true;\r\n                    console.warn(\"Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.\");\r\n                }\r\n                return this.trackTime;\r\n            },\r\n            set: function (value) {\r\n                if (!TrackEntry.deprecatedWarning2) {\r\n                    TrackEntry.deprecatedWarning2 = true;\r\n                    console.warn(\"Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.\");\r\n                }\r\n                this.trackTime = value;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        TrackEntry.prototype.loopsCount = function () {\r\n            return Math.floor(this.trackTime / this.trackEnd);\r\n        };\r\n        TrackEntry.deprecatedWarning1 = false;\r\n        TrackEntry.deprecatedWarning2 = false;\r\n        return TrackEntry;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var EventQueue = /** @class */ (function () {\r\n        function EventQueue(animState) {\r\n            this.objects = [];\r\n            this.drainDisabled = false;\r\n            this.animState = null;\r\n            this.animState = animState;\r\n        }\r\n        EventQueue.prototype.start = function (entry) {\r\n            this.objects.push(EventType.start);\r\n            this.objects.push(entry);\r\n            this.animState.animationsChanged = true;\r\n        };\r\n        EventQueue.prototype.interrupt = function (entry) {\r\n            this.objects.push(EventType.interrupt);\r\n            this.objects.push(entry);\r\n        };\r\n        EventQueue.prototype.end = function (entry) {\r\n            this.objects.push(EventType.end);\r\n            this.objects.push(entry);\r\n            this.animState.animationsChanged = true;\r\n        };\r\n        EventQueue.prototype.dispose = function (entry) {\r\n            this.objects.push(EventType.dispose);\r\n            this.objects.push(entry);\r\n        };\r\n        EventQueue.prototype.complete = function (entry) {\r\n            this.objects.push(EventType.complete);\r\n            this.objects.push(entry);\r\n        };\r\n        EventQueue.prototype.event = function (entry, event) {\r\n            this.objects.push(EventType.event);\r\n            this.objects.push(entry);\r\n            this.objects.push(event);\r\n        };\r\n        EventQueue.prototype.drain = function () {\r\n            if (this.drainDisabled)\r\n                return;\r\n            this.drainDisabled = true;\r\n            var objects = this.objects;\r\n            var listeners = this.animState.listeners;\r\n            for (var i = 0; i < objects.length; i += 2) {\r\n                var type = objects[i];\r\n                var entry = objects[i + 1];\r\n                switch (type) {\r\n                    case EventType.start:\r\n                        if (entry.listener && entry.listener.start)\r\n                            entry.listener.start(entry);\r\n                        for (var ii = 0; ii < listeners.length; ii++)\r\n                            if (listeners[ii].start)\r\n                                listeners[ii].start(entry);\r\n                        break;\r\n                    case EventType.interrupt:\r\n                        if (entry.listener && entry.listener.interrupt)\r\n                            entry.listener.interrupt(entry);\r\n                        for (var ii = 0; ii < listeners.length; ii++)\r\n                            if (listeners[ii].interrupt)\r\n                                listeners[ii].interrupt(entry);\r\n                        break;\r\n                    case EventType.end:\r\n                        if (entry.listener && entry.listener.end)\r\n                            entry.listener.end(entry);\r\n                        for (var ii = 0; ii < listeners.length; ii++)\r\n                            if (listeners[ii].end)\r\n                                listeners[ii].end(entry);\r\n                    // Fall through.\r\n                    case EventType.dispose:\r\n                        if (entry.listener && entry.listener.dispose)\r\n                            entry.listener.dispose(entry);\r\n                        for (var ii = 0; ii < listeners.length; ii++)\r\n                            if (listeners[ii].dispose)\r\n                                listeners[ii].dispose(entry);\r\n                        this.animState.trackEntryPool.free(entry);\r\n                        break;\r\n                    case EventType.complete:\r\n                        if (entry.listener && entry.listener.complete)\r\n                            entry.listener.complete(entry);\r\n                        for (var ii = 0; ii < listeners.length; ii++)\r\n                            if (listeners[ii].complete)\r\n                                listeners[ii].complete(entry);\r\n                        break;\r\n                    case EventType.event:\r\n                        var event_3 = objects[i++ + 2];\r\n                        if (entry.listener && entry.listener.event)\r\n                            entry.listener.event(entry, event_3);\r\n                        for (var ii = 0; ii < listeners.length; ii++)\r\n                            if (listeners[ii].event)\r\n                                listeners[ii].event(entry, event_3);\r\n                        break;\r\n                }\r\n            }\r\n            this.clear();\r\n            this.drainDisabled = false;\r\n        };\r\n        EventQueue.prototype.clear = function () {\r\n            this.objects.length = 0;\r\n        };\r\n        return EventQueue;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var EventType;\r\n    (function (EventType) {\r\n        EventType[EventType[\"start\"] = 0] = \"start\";\r\n        EventType[EventType[\"interrupt\"] = 1] = \"interrupt\";\r\n        EventType[EventType[\"end\"] = 2] = \"end\";\r\n        EventType[EventType[\"dispose\"] = 3] = \"dispose\";\r\n        EventType[EventType[\"complete\"] = 4] = \"complete\";\r\n        EventType[EventType[\"event\"] = 5] = \"event\";\r\n    })(EventType || (EventType = {}));\r\n    /**\r\n     * @public\r\n     */\r\n    var AnimationStateAdapter = /** @class */ (function () {\r\n        function AnimationStateAdapter() {\r\n        }\r\n        AnimationStateAdapter.prototype.start = function (entry) {\r\n        };\r\n        AnimationStateAdapter.prototype.interrupt = function (entry) {\r\n        };\r\n        AnimationStateAdapter.prototype.end = function (entry) {\r\n        };\r\n        AnimationStateAdapter.prototype.dispose = function (entry) {\r\n        };\r\n        AnimationStateAdapter.prototype.complete = function (entry) {\r\n        };\r\n        AnimationStateAdapter.prototype.event = function (entry, event) {\r\n        };\r\n        return AnimationStateAdapter;\r\n    }());\r\n    /** 1. A previously applied timeline has set this property.\r\n     *\r\n     * Result: Mix from the current pose to the timeline pose. */\r\n    var SUBSEQUENT = 0;\r\n    /** 1. This is the first timeline to set this property.\r\n     * 2. The next track entry applied after this one does not have a timeline to set this property.\r\n     *\r\n     * Result: Mix from the setup pose to the timeline pose. */\r\n    var FIRST = 1;\r\n    /** 1) A previously applied timeline has set this property.<br>\r\n     * 2) The next track entry to be applied does have a timeline to set this property.<br>\r\n     * 3) The next track entry after that one does not have a timeline to set this property.<br>\r\n     * Result: Mix from the current pose to the timeline pose, but do not mix out. This avoids \"dipping\" when crossfading\r\n     * animations that key the same property. A subsequent timeline will set this property using a mix. */\r\n    var HOLD_SUBSEQUENT = 2;\r\n    /** 1) This is the first timeline to set this property.<br>\r\n     * 2) The next track entry to be applied does have a timeline to set this property.<br>\r\n     * 3) The next track entry after that one does not have a timeline to set this property.<br>\r\n     * Result: Mix from the setup pose to the timeline pose, but do not mix out. This avoids \"dipping\" when crossfading animations\r\n     * that key the same property. A subsequent timeline will set this property using a mix. */\r\n    var HOLD_FIRST = 3;\r\n    /** 1. This is the first timeline to set this property.\r\n     * 2. The next track entry to be applied does have a timeline to set this property.\r\n     * 3. The next track entry after that one does have a timeline to set this property.\r\n     * 4. timelineHoldMix stores the first subsequent track entry that does not have a timeline to set this property.\r\n     *\r\n     * Result: The same as HOLD except the mix percentage from the timelineHoldMix track entry is used. This handles when more than\r\n     * 2 track entries in a row have a timeline that sets the same property.\r\n     *\r\n     * Eg, A -> B -> C -> D where A, B, and C have a timeline setting same property, but D does not. When A is applied, to avoid\r\n     * \"dipping\" A is not mixed out, however D (the first entry that doesn't set the property) mixing in is used to mix out A\r\n     * (which affects B and C). Without using D to mix out, A would be applied fully until mixing completes, then snap into\r\n     * place. */\r\n    var HOLD_MIX = 4;\r\n    var SETUP = 1;\r\n    var CURRENT = 2;\r\n    var _emptyAnimation = null;\n\n    /** Stores mix (crossfade) durations to be applied when {@link AnimationState} animations are changed.\r\n     * @public\r\n     * */\r\n    var AnimationStateData = /** @class */ (function () {\r\n        function AnimationStateData(skeletonData) {\r\n            this.animationToMixTime = {};\r\n            /** The mix duration to use when no mix duration has been defined between two animations. */\r\n            this.defaultMix = 0;\r\n            if (skeletonData == null)\r\n                throw new Error(\"skeletonData cannot be null.\");\r\n            this.skeletonData = skeletonData;\r\n        }\r\n        /** Sets a mix duration by animation name.\r\n         *\r\n         * See {@link #setMixWith()}. */\r\n        AnimationStateData.prototype.setMix = function (fromName, toName, duration) {\r\n            var from = this.skeletonData.findAnimation(fromName);\r\n            if (from == null)\r\n                throw new Error(\"Animation not found: \" + fromName);\r\n            var to = this.skeletonData.findAnimation(toName);\r\n            if (to == null)\r\n                throw new Error(\"Animation not found: \" + toName);\r\n            this.setMixWith(from, to, duration);\r\n        };\r\n        /** Sets the mix duration when changing from the specified animation to the other.\r\n         *\r\n         * See {@link TrackEntry#mixDuration}. */\r\n        AnimationStateData.prototype.setMixWith = function (from, to, duration) {\r\n            if (from == null)\r\n                throw new Error(\"from cannot be null.\");\r\n            if (to == null)\r\n                throw new Error(\"to cannot be null.\");\r\n            var key = from.name + \".\" + to.name;\r\n            this.animationToMixTime[key] = duration;\r\n        };\r\n        /** Returns the mix duration to use when changing from the specified animation to the other, or the {@link #defaultMix} if\r\n         * no mix duration has been set. */\r\n        AnimationStateData.prototype.getMix = function (from, to) {\r\n            var key = from.name + \".\" + to.name;\r\n            var value = this.animationToMixTime[key];\r\n            return value === undefined ? this.defaultMix : value;\r\n        };\r\n        return AnimationStateData;\r\n    }());\n\n    /**\r\n     * @public\r\n     */\r\n    var AtlasAttachmentLoader = /** @class */ (function () {\r\n        function AtlasAttachmentLoader(atlas) {\r\n            this.atlas = atlas;\r\n        }\r\n        /** @return May be null to not load an attachment. */\r\n        // @ts-ignore\r\n        AtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) {\r\n            var region = this.atlas.findRegion(path);\r\n            if (region == null)\r\n                throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\r\n            var attachment = new RegionAttachment(name);\r\n            attachment.region = region;\r\n            return attachment;\r\n        };\r\n        /** @return May be null to not load an attachment. */\r\n        // @ts-ignore\r\n        AtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {\r\n            var region = this.atlas.findRegion(path);\r\n            if (region == null)\r\n                throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\r\n            var attachment = new MeshAttachment(name);\r\n            attachment.region = region;\r\n            return attachment;\r\n        };\r\n        /** @return May be null to not load an attachment. */\r\n        // @ts-ignore\r\n        AtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) {\r\n            return new BoundingBoxAttachment(name);\r\n        };\r\n        /** @return May be null to not load an attachment */\r\n        // @ts-ignore\r\n        AtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) {\r\n            return new PathAttachment(name);\r\n        };\r\n        // @ts-ignore\r\n        AtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) {\r\n            return new PointAttachment(name);\r\n        };\r\n        // @ts-ignore\r\n        AtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) {\r\n            return new ClippingAttachment(name);\r\n        };\r\n        return AtlasAttachmentLoader;\r\n    }());\n\n    /** Stores a bone's current pose.\r\n     *\r\n     * A bone has a local transform which is used to compute its world transform. A bone also has an applied transform, which is a\r\n     * local transform that can be applied to compute the world transform. The local transform and applied transform may differ if a\r\n     * constraint or application code modifies the world transform after it was computed from the local transform.\r\n     * @public\r\n     * */\r\n    var Bone = /** @class */ (function () {\r\n        /** @param parent May be null. */\r\n        function Bone(data, skeleton, parent) {\r\n            //be careful! Spine b,c is c,b in pixi matrix\r\n            this.matrix = new math.Matrix();\r\n            /** The immediate children of this bone. */\r\n            this.children = new Array();\r\n            /** The local x translation. */\r\n            this.x = 0;\r\n            /** The local y translation. */\r\n            this.y = 0;\r\n            /** The local rotation in degrees, counter clockwise. */\r\n            this.rotation = 0;\r\n            /** The local scaleX. */\r\n            this.scaleX = 0;\r\n            /** The local scaleY. */\r\n            this.scaleY = 0;\r\n            /** The local shearX. */\r\n            this.shearX = 0;\r\n            /** The local shearY. */\r\n            this.shearY = 0;\r\n            /** The applied local x translation. */\r\n            this.ax = 0;\r\n            /** The applied local y translation. */\r\n            this.ay = 0;\r\n            /** The applied local rotation in degrees, counter clockwise. */\r\n            this.arotation = 0;\r\n            /** The applied local scaleX. */\r\n            this.ascaleX = 0;\r\n            /** The applied local scaleY. */\r\n            this.ascaleY = 0;\r\n            /** The applied local shearX. */\r\n            this.ashearX = 0;\r\n            /** The applied local shearY. */\r\n            this.ashearY = 0;\r\n            this.sorted = false;\r\n            this.active = false;\r\n            if (!data)\r\n                throw new Error(\"data cannot be null.\");\r\n            if (!skeleton)\r\n                throw new Error(\"skeleton cannot be null.\");\r\n            this.data = data;\r\n            this.skeleton = skeleton;\r\n            this.parent = parent;\r\n            this.setToSetupPose();\r\n        }\r\n        Object.defineProperty(Bone.prototype, \"worldX\", {\r\n            get: function () {\r\n                return this.matrix.tx;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(Bone.prototype, \"worldY\", {\r\n            get: function () {\r\n                return this.matrix.ty;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        /** Returns false when the bone has not been computed because {@link BoneData#skinRequired} is true and the\r\n         * {@link Skeleton#skin active skin} does not {@link Skin#bones contain} this bone. */\r\n        Bone.prototype.isActive = function () {\r\n            return this.active;\r\n        };\r\n        /** Computes the world transform using the parent bone and this bone's local applied transform. */\r\n        Bone.prototype.update = function () {\r\n            this.updateWorldTransformWith(this.ax, this.ay, this.arotation, this.ascaleX, this.ascaleY, this.ashearX, this.ashearY);\r\n        };\r\n        /** Computes the world transform using the parent bone and this bone's local transform.\r\n         *\r\n         * See {@link #updateWorldTransformWith()}. */\r\n        Bone.prototype.updateWorldTransform = function () {\r\n            this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n        };\r\n        /** Computes the world transform using the parent bone and the specified local transform. The applied transform is set to the\r\n         * specified local transform. Child bones are not updated.\r\n         *\r\n         * See [World transforms](http://esotericsoftware.com/spine-runtime-skeletons#World-transforms) in the Spine\r\n         * Runtimes Guide. */\r\n        Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) {\r\n            this.ax = x;\r\n            this.ay = y;\r\n            this.arotation = rotation;\r\n            this.ascaleX = scaleX;\r\n            this.ascaleY = scaleY;\r\n            this.ashearX = shearX;\r\n            this.ashearY = shearY;\r\n            var parent = this.parent;\r\n            var m = this.matrix;\r\n            var sx = this.skeleton.scaleX;\r\n            var sy = settings.yDown ? -this.skeleton.scaleY : this.skeleton.scaleY;\r\n            if (!parent) { // Root bone.\r\n                var skeleton = this.skeleton;\r\n                var rotationY = rotation + 90 + shearY;\r\n                m.a = MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\r\n                m.c = MathUtils.cosDeg(rotationY) * scaleY * sx;\r\n                m.b = MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\r\n                m.d = MathUtils.sinDeg(rotationY) * scaleY * sy;\r\n                m.tx = x * sx + skeleton.x;\r\n                m.ty = y * sy + skeleton.y;\r\n                return;\r\n            }\r\n            var pa = parent.matrix.a, pb = parent.matrix.c, pc = parent.matrix.b, pd = parent.matrix.d;\r\n            m.tx = pa * x + pb * y + parent.matrix.tx;\r\n            m.ty = pc * x + pd * y + parent.matrix.ty;\r\n            switch (this.data.transformMode) {\r\n                case exports.TransformMode.Normal: {\r\n                    var rotationY = rotation + 90 + shearY;\r\n                    var la = MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n                    var lb = MathUtils.cosDeg(rotationY) * scaleY;\r\n                    var lc = MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n                    var ld = MathUtils.sinDeg(rotationY) * scaleY;\r\n                    m.a = pa * la + pb * lc;\r\n                    m.c = pa * lb + pb * ld;\r\n                    m.b = pc * la + pd * lc;\r\n                    m.d = pc * lb + pd * ld;\r\n                    return;\r\n                }\r\n                case exports.TransformMode.OnlyTranslation: {\r\n                    var rotationY = rotation + 90 + shearY;\r\n                    m.a = MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n                    m.c = MathUtils.cosDeg(rotationY) * scaleY;\r\n                    m.b = MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n                    m.d = MathUtils.sinDeg(rotationY) * scaleY;\r\n                    break;\r\n                }\r\n                case exports.TransformMode.NoRotationOrReflection: {\r\n                    var s = pa * pa + pc * pc;\r\n                    var prx = 0;\r\n                    if (s > 0.0001) {\r\n                        s = Math.abs(pa * pd - pb * pc) / s;\r\n                        pa /= this.skeleton.scaleX;\r\n                        pc /= this.skeleton.scaleY;\r\n                        pb = pc * s;\r\n                        pd = pa * s;\r\n                        prx = Math.atan2(pc, pa) * MathUtils.radDeg;\r\n                    }\r\n                    else {\r\n                        pa = 0;\r\n                        pc = 0;\r\n                        prx = 90 - Math.atan2(pd, pb) * MathUtils.radDeg;\r\n                    }\r\n                    var rx = rotation + shearX - prx;\r\n                    var ry = rotation + shearY - prx + 90;\r\n                    var la = MathUtils.cosDeg(rx) * scaleX;\r\n                    var lb = MathUtils.cosDeg(ry) * scaleY;\r\n                    var lc = MathUtils.sinDeg(rx) * scaleX;\r\n                    var ld = MathUtils.sinDeg(ry) * scaleY;\r\n                    m.a = pa * la - pb * lc;\r\n                    m.c = pa * lb - pb * ld;\r\n                    m.b = pc * la + pd * lc;\r\n                    m.d = pc * lb + pd * ld;\r\n                    break;\r\n                }\r\n                case exports.TransformMode.NoScale:\r\n                case exports.TransformMode.NoScaleOrReflection: {\r\n                    var cos = MathUtils.cosDeg(rotation);\r\n                    var sin = MathUtils.sinDeg(rotation);\r\n                    var za = (pa * cos + pb * sin) / sx;\r\n                    var zc = (pc * cos + pd * sin) / sy;\r\n                    var s = Math.sqrt(za * za + zc * zc);\r\n                    if (s > 0.00001)\r\n                        s = 1 / s;\r\n                    za *= s;\r\n                    zc *= s;\r\n                    s = Math.sqrt(za * za + zc * zc);\r\n                    if (this.data.transformMode == exports.TransformMode.NoScale\r\n                        && (pa * pd - pb * pc < 0) != (settings.yDown ?\r\n                            (this.skeleton.scaleX < 0 != this.skeleton.scaleY > 0) :\r\n                            (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0)))\r\n                        s = -s;\r\n                    var r = Math.PI / 2 + Math.atan2(zc, za);\r\n                    var zb = Math.cos(r) * s;\r\n                    var zd = Math.sin(r) * s;\r\n                    var la = MathUtils.cosDeg(shearX) * scaleX;\r\n                    var lb = MathUtils.cosDeg(90 + shearY) * scaleY;\r\n                    var lc = MathUtils.sinDeg(shearX) * scaleX;\r\n                    var ld = MathUtils.sinDeg(90 + shearY) * scaleY;\r\n                    m.a = za * la + zb * lc;\r\n                    m.c = za * lb + zb * ld;\r\n                    m.b = zc * la + zd * lc;\r\n                    m.d = zc * lb + zd * ld;\r\n                    break;\r\n                }\r\n            }\r\n            m.a *= sx;\r\n            m.c *= sx;\r\n            m.b *= sy;\r\n            m.d *= sy;\r\n        };\r\n        /** Sets this bone's local transform to the setup pose. */\r\n        Bone.prototype.setToSetupPose = function () {\r\n            var data = this.data;\r\n            this.x = data.x;\r\n            this.y = data.y;\r\n            this.rotation = data.rotation;\r\n            this.scaleX = data.scaleX;\r\n            this.scaleY = data.scaleY;\r\n            this.shearX = data.shearX;\r\n            this.shearY = data.shearY;\r\n        };\r\n        /** The world rotation for the X axis, calculated using {@link #a} and {@link #c}. */\r\n        Bone.prototype.getWorldRotationX = function () {\r\n            return Math.atan2(this.matrix.b, this.matrix.a) * MathUtils.radDeg;\r\n        };\r\n        /** The world rotation for the Y axis, calculated using {@link #b} and {@link #d}. */\r\n        Bone.prototype.getWorldRotationY = function () {\r\n            return Math.atan2(this.matrix.d, this.matrix.c) * MathUtils.radDeg;\r\n        };\r\n        /** The magnitude (always positive) of the world scale X, calculated using {@link #a} and {@link #c}. */\r\n        Bone.prototype.getWorldScaleX = function () {\r\n            var m = this.matrix;\r\n            return Math.sqrt(m.a * m.a + m.b * m.b);\r\n        };\r\n        /** The magnitude (always positive) of the world scale Y, calculated using {@link #b} and {@link #d}. */\r\n        Bone.prototype.getWorldScaleY = function () {\r\n            var m = this.matrix;\r\n            return Math.sqrt(m.c * m.c + m.d * m.d);\r\n        };\r\n        /** Computes the applied transform values from the world transform.\r\n         *\r\n         * If the world transform is modified (by a constraint, {@link #rotateWorld(float)}, etc) then this method should be called so\r\n         * the applied transform matches the world transform. The applied transform may be needed by other code (eg to apply other\r\n         * constraints).\r\n         *\r\n         * Some information is ambiguous in the world transform, such as -1,-1 scale versus 180 rotation. The applied transform after\r\n         * calling this method is equivalent to the local transform used to compute the world transform, but may not be identical. */\r\n        Bone.prototype.updateAppliedTransform = function () {\r\n            var parent = this.parent;\r\n            var m = this.matrix;\r\n            if (!parent) {\r\n                this.ax = m.tx;\r\n                this.ay = m.ty;\r\n                this.arotation = Math.atan2(m.b, m.a) * MathUtils.radDeg;\r\n                this.ascaleX = Math.sqrt(m.a * m.a + m.b * m.b);\r\n                this.ascaleY = Math.sqrt(m.c * m.c + m.d * m.d);\r\n                this.ashearX = 0;\r\n                this.ashearY = Math.atan2(m.a * m.c + m.b * m.d, m.a * m.d - m.b * m.c) * MathUtils.radDeg;\r\n                return;\r\n            }\r\n            var pm = parent.matrix;\r\n            var pid = 1 / (pm.a * pm.d - pm.b * pm.c);\r\n            var dx = m.tx - pm.tx, dy = m.ty - pm.ty;\r\n            this.ax = (dx * pm.d * pid - dy * pm.c * pid);\r\n            this.ay = (dy * pm.a * pid - dx * pm.b * pid);\r\n            var ia = pid * pm.d;\r\n            var id = pid * pm.a;\r\n            var ib = pid * pm.c;\r\n            var ic = pid * pm.b;\r\n            var ra = ia * m.a - ib * m.b;\r\n            var rb = ia * m.c - ib * m.d;\r\n            var rc = id * m.b - ic * m.a;\r\n            var rd = id * m.d - ic * m.c;\r\n            this.ashearX = 0;\r\n            this.ascaleX = Math.sqrt(ra * ra + rc * rc);\r\n            if (this.ascaleX > 0.0001) {\r\n                var det = ra * rd - rb * rc;\r\n                this.ascaleY = det / this.ascaleX;\r\n                this.ashearY = Math.atan2(ra * rb + rc * rd, det) * MathUtils.radDeg;\r\n                this.arotation = Math.atan2(rc, ra) * MathUtils.radDeg;\r\n            }\r\n            else {\r\n                this.ascaleX = 0;\r\n                this.ascaleY = Math.sqrt(rb * rb + rd * rd);\r\n                this.ashearY = 0;\r\n                this.arotation = 90 - Math.atan2(rd, rb) * MathUtils.radDeg;\r\n            }\r\n        };\r\n        /** Transforms a point from world coordinates to the bone's local coordinates. */\r\n        Bone.prototype.worldToLocal = function (world) {\r\n            var m = this.matrix;\r\n            var a = m.a, b = m.c, c = m.b, d = m.d;\r\n            var invDet = 1 / (a * d - b * c);\r\n            var x = world.x - m.tx, y = world.y - m.ty;\r\n            world.x = (x * d * invDet - y * b * invDet);\r\n            world.y = (y * a * invDet - x * c * invDet);\r\n            return world;\r\n        };\r\n        /** Transforms a point from the bone's local coordinates to world coordinates. */\r\n        Bone.prototype.localToWorld = function (local) {\r\n            var m = this.matrix;\r\n            var x = local.x, y = local.y;\r\n            local.x = x * m.a + y * m.c + m.tx;\r\n            local.y = x * m.b + y * m.d + m.ty;\r\n            return local;\r\n        };\r\n        /** Transforms a world rotation to a local rotation. */\r\n        Bone.prototype.worldToLocalRotation = function (worldRotation) {\r\n            var sin = MathUtils.sinDeg(worldRotation), cos = MathUtils.cosDeg(worldRotation);\r\n            var mat = this.matrix;\r\n            return Math.atan2(mat.a * sin - mat.b * cos, mat.d * cos - mat.c * sin) * MathUtils.radDeg;\r\n        };\r\n        /** Transforms a local rotation to a world rotation. */\r\n        Bone.prototype.localToWorldRotation = function (localRotation) {\r\n            localRotation -= this.rotation - this.shearX;\r\n            var sin = MathUtils.sinDeg(localRotation), cos = MathUtils.cosDeg(localRotation);\r\n            var mat = this.matrix;\r\n            return Math.atan2(cos * mat.b + sin * mat.d, cos * mat.a + sin * mat.c) * MathUtils.radDeg;\r\n        };\r\n        /** Rotates the world transform the specified amount.\r\n         * <p>\r\n         * After changes are made to the world transform, {@link #updateAppliedTransform()} should be called and {@link #update()} will\r\n         * need to be called on any child bones, recursively. */\r\n        Bone.prototype.rotateWorld = function (degrees) {\r\n            var mat = this.matrix;\r\n            var a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n            var cos = MathUtils.cosDeg(degrees), sin = MathUtils.sinDeg(degrees);\r\n            mat.a = cos * a - sin * c;\r\n            mat.c = cos * b - sin * d;\r\n            mat.b = sin * a + cos * c;\r\n            mat.d = sin * b + cos * d;\r\n        };\r\n        return Bone;\r\n    }());\n\n    /** Stores the setup pose for a {@link Bone}.\r\n     * @public\r\n     * */\r\n    var BoneData = /** @class */ (function () {\r\n        function BoneData(index, name, parent) {\r\n            /** The local x translation. */\r\n            this.x = 0;\r\n            /** The local y translation. */\r\n            this.y = 0;\r\n            /** The local rotation. */\r\n            this.rotation = 0;\r\n            /** The local scaleX. */\r\n            this.scaleX = 1;\r\n            /** The local scaleY. */\r\n            this.scaleY = 1;\r\n            /** The local shearX. */\r\n            this.shearX = 0;\r\n            /** The local shearX. */\r\n            this.shearY = 0;\r\n            /** The transform mode for how parent world transforms affect this bone. */\r\n            this.transformMode = exports.TransformMode.Normal;\r\n            /** When true, {@link Skeleton#updateWorldTransform()} only updates this bone if the {@link Skeleton#skin} contains this\r\n             * bone.\r\n             * @see Skin#bones */\r\n            this.skinRequired = false;\r\n            /** The color of the bone as it was in Spine. Available only when nonessential data was exported. Bones are not usually\r\n             * rendered at runtime. */\r\n            this.color = new Color();\r\n            if (index < 0)\r\n                throw new Error(\"index must be >= 0.\");\r\n            if (name == null)\r\n                throw new Error(\"name cannot be null.\");\r\n            this.index = index;\r\n            this.name = name;\r\n            this.parent = parent;\r\n        }\r\n        return BoneData;\r\n    }());\n\n    /** The base class for all constraint datas.\r\n     * @public\r\n     * */\r\n    var ConstraintData = /** @class */ (function () {\r\n        function ConstraintData(name, order, skinRequired) {\r\n            this.name = name;\r\n            this.order = order;\r\n            this.skinRequired = skinRequired;\r\n        }\r\n        return ConstraintData;\r\n    }());\n\n    /** Stores the current pose values for an {@link Event}.\r\n     *\r\n     * See Timeline {@link Timeline#apply()},\r\n     * AnimationStateListener {@link AnimationStateListener#event()}, and\r\n     * [Events](http://esotericsoftware.com/spine-events) in the Spine User Guide.\r\n     * @public\r\n     * */\r\n    var Event = /** @class */ (function () {\r\n        function Event(time, data) {\r\n            if (data == null)\r\n                throw new Error(\"data cannot be null.\");\r\n            this.time = time;\r\n            this.data = data;\r\n        }\r\n        return Event;\r\n    }());\n\n    /** Stores the setup pose values for an {@link Event}.\r\n     *\r\n     * See [Events](http://esotericsoftware.com/spine-events) in the Spine User Guide.\r\n     * @public\r\n     * */\r\n    var EventData = /** @class */ (function () {\r\n        function EventData(name) {\r\n            this.name = name;\r\n        }\r\n        return EventData;\r\n    }());\n\n    /** Stores the current pose for an IK constraint. An IK constraint adjusts the rotation of 1 or 2 constrained bones so the tip of\r\n     * the last bone is as close to the target bone as possible.\r\n     *\r\n     * See [IK constraints](http://esotericsoftware.com/spine-ik-constraints) in the Spine User Guide.\r\n     * @public\r\n     * */\r\n    var IkConstraint = /** @class */ (function () {\r\n        function IkConstraint(data, skeleton) {\r\n            /** Controls the bend direction of the IK bones, either 1 or -1. */\r\n            this.bendDirection = 0;\r\n            /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */\r\n            this.compress = false;\r\n            /** When true, if the target is out of range, the parent bone is scaled to reach it. If more than one bone is being constrained\r\n             * and the parent bone has local nonuniform scale, stretch is not applied. */\r\n            this.stretch = false;\r\n            /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */\r\n            this.mix = 1;\r\n            /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */\r\n            this.softness = 0;\r\n            this.active = false;\r\n            if (!data)\r\n                throw new Error(\"data cannot be null.\");\r\n            if (!skeleton)\r\n                throw new Error(\"skeleton cannot be null.\");\r\n            this.data = data;\r\n            this.mix = data.mix;\r\n            this.softness = data.softness;\r\n            this.bendDirection = data.bendDirection;\r\n            this.compress = data.compress;\r\n            this.stretch = data.stretch;\r\n            this.bones = new Array();\r\n            for (var i = 0; i < data.bones.length; i++)\r\n                this.bones.push(skeleton.findBone(data.bones[i].name));\r\n            this.target = skeleton.findBone(data.target.name);\r\n        }\r\n        IkConstraint.prototype.isActive = function () {\r\n            return this.active;\r\n        };\r\n        IkConstraint.prototype.update = function () {\r\n            if (this.mix == 0)\r\n                return;\r\n            var target = this.target;\r\n            var bones = this.bones;\r\n            switch (bones.length) {\r\n                case 1:\r\n                    this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\r\n                    break;\r\n                case 2:\r\n                    this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.data.uniform, this.softness, this.mix);\r\n                    break;\r\n            }\r\n        };\r\n        /** Applies 1 bone IK. The target is specified in the world coordinate system. */\r\n        IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {\r\n            var p = bone.parent.matrix;\r\n            var pa = p.a, pb = p.c, pc = p.b, pd = p.d;\r\n            var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\r\n            switch (bone.data.transformMode) {\r\n                case exports.TransformMode.OnlyTranslation:\r\n                    tx = targetX - bone.worldX;\r\n                    ty = targetY - bone.worldY;\r\n                    break;\r\n                case exports.TransformMode.NoRotationOrReflection:\r\n                    var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\r\n                    var sa = pa / bone.skeleton.scaleX;\r\n                    var sc = pc / bone.skeleton.scaleY;\r\n                    pb = -sc * s * bone.skeleton.scaleX;\r\n                    pd = sa * s * bone.skeleton.scaleY;\r\n                    rotationIK += Math.atan2(sc, sa) * MathUtils.radDeg;\r\n                // Fall through\r\n                default:\r\n                    var x = targetX - p.tx, y = targetY - p.ty;\r\n                    var d = pa * pd - pb * pc;\r\n                    tx = (x * pd - y * pb) / d - bone.ax;\r\n                    ty = (y * pa - x * pc) / d - bone.ay;\r\n            }\r\n            rotationIK += Math.atan2(ty, tx) * MathUtils.radDeg;\r\n            if (bone.ascaleX < 0)\r\n                rotationIK += 180;\r\n            if (rotationIK > 180)\r\n                rotationIK -= 360;\r\n            else if (rotationIK < -180)\r\n                rotationIK += 360;\r\n            var sx = bone.ascaleX, sy = bone.ascaleY;\r\n            if (compress || stretch) {\r\n                switch (bone.data.transformMode) {\r\n                    case exports.TransformMode.NoScale:\r\n                    case exports.TransformMode.NoScaleOrReflection:\r\n                        tx = targetX - bone.worldX;\r\n                        ty = targetY - bone.worldY;\r\n                }\r\n                var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\r\n                if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\r\n                    var s = (dd / b - 1) * alpha + 1;\r\n                    sx *= s;\r\n                    if (uniform)\r\n                        sy *= s;\r\n                }\r\n            }\r\n            bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);\r\n        };\r\n        /** Applies 2 bone IK. The target is specified in the world coordinate system.\r\n         * @param child A direct descendant of the parent bone. */\r\n        IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, uniform, softness, alpha) {\r\n            var px = parent.ax, py = parent.ay, psx = parent.ascaleX, psy = parent.ascaleY, sx = psx, sy = psy, csx = child.ascaleX;\r\n            var pmat = parent.matrix;\r\n            var os1 = 0, os2 = 0, s2 = 0;\r\n            if (psx < 0) {\r\n                psx = -psx;\r\n                os1 = 180;\r\n                s2 = -1;\r\n            }\r\n            else {\r\n                os1 = 0;\r\n                s2 = 1;\r\n            }\r\n            if (psy < 0) {\r\n                psy = -psy;\r\n                s2 = -s2;\r\n            }\r\n            if (csx < 0) {\r\n                csx = -csx;\r\n                os2 = 180;\r\n            }\r\n            else\r\n                os2 = 0;\r\n            var cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = pmat.a, b = pmat.c, c = pmat.b, d = pmat.d;\r\n            var u = Math.abs(psx - psy) <= 0.0001;\r\n            if (!u || stretch) {\r\n                cy = 0;\r\n                cwx = a * cx + pmat.tx;\r\n                cwy = c * cx + pmat.ty;\r\n            }\r\n            else {\r\n                cy = child.ay;\r\n                cwx = a * cx + b * cy + pmat.tx;\r\n                cwy = c * cx + d * cy + pmat.ty;\r\n            }\r\n            var pp = parent.parent.matrix;\r\n            a = pp.a;\r\n            b = pp.c;\r\n            c = pp.b;\r\n            d = pp.d;\r\n            var id = 1 / (a * d - b * c), x = cwx - pp.tx, y = cwy - pp.ty;\r\n            var dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n            var l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\r\n            if (l1 < 0.0001) {\r\n                this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\r\n                child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n                return;\r\n            }\r\n            x = targetX - pp.tx;\r\n            y = targetY - pp.ty;\r\n            var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\r\n            var dd = tx * tx + ty * ty;\r\n            if (softness != 0) {\r\n                softness *= psx * (csx + 1) * 0.5;\r\n                var td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\r\n                if (sd > 0) {\r\n                    var p = Math.min(1, sd / (softness * 2)) - 1;\r\n                    p = (sd - softness * (1 - p * p)) / td;\r\n                    tx -= p * tx;\r\n                    ty -= p * ty;\r\n                    dd = tx * tx + ty * ty;\r\n                }\r\n            }\r\n            outer: if (u) {\r\n                l2 *= psx;\r\n                var cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n                if (cos < -1) {\r\n                    cos = -1;\r\n                    a2 = Math.PI * bendDir;\r\n                }\r\n                else if (cos > 1) {\r\n                    cos = 1;\r\n                    a2 = 0;\r\n                    if (stretch) {\r\n                        a = (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\r\n                        sx *= a;\r\n                        if (uniform)\r\n                            sy *= a;\r\n                    }\r\n                }\r\n                else\r\n                    a2 = Math.acos(cos) * bendDir;\r\n                a = l1 + l2 * cos;\r\n                b = l2 * Math.sin(a2);\r\n                a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n            }\r\n            else {\r\n                a = psx * l2;\r\n                b = psy * l2;\r\n                var aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\r\n                c = bb * l1 * l1 + aa * dd - aa * bb;\r\n                var c1 = -2 * bb * l1, c2 = bb - aa;\r\n                d = c1 * c1 - 4 * c2 * c;\r\n                if (d >= 0) {\r\n                    var q = Math.sqrt(d);\r\n                    if (c1 < 0)\r\n                        q = -q;\r\n                    q = -(c1 + q) * 0.5;\r\n                    var r0 = q / c2, r1 = c / q;\r\n                    var r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n                    if (r * r <= dd) {\r\n                        y = Math.sqrt(dd - r * r) * bendDir;\r\n                        a1 = ta - Math.atan2(y, r);\r\n                        a2 = Math.atan2(y / psy, (r - l1) / psx);\r\n                        break outer;\r\n                    }\r\n                }\r\n                var minAngle = MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n                var maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n                c = -a * l1 / (aa - bb);\r\n                if (c >= -1 && c <= 1) {\r\n                    c = Math.acos(c);\r\n                    x = a * Math.cos(c) + l1;\r\n                    y = b * Math.sin(c);\r\n                    d = x * x + y * y;\r\n                    if (d < minDist) {\r\n                        minAngle = c;\r\n                        minDist = d;\r\n                        minX = x;\r\n                        minY = y;\r\n                    }\r\n                    if (d > maxDist) {\r\n                        maxAngle = c;\r\n                        maxDist = d;\r\n                        maxX = x;\r\n                        maxY = y;\r\n                    }\r\n                }\r\n                if (dd <= (minDist + maxDist) * 0.5) {\r\n                    a1 = ta - Math.atan2(minY * bendDir, minX);\r\n                    a2 = minAngle * bendDir;\r\n                }\r\n                else {\r\n                    a1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n                    a2 = maxAngle * bendDir;\r\n                }\r\n            }\r\n            var os = Math.atan2(cy, cx) * s2;\r\n            var rotation = parent.arotation;\r\n            a1 = (a1 - os) * MathUtils.radDeg + os1 - rotation;\r\n            if (a1 > 180)\r\n                a1 -= 360;\r\n            else if (a1 < -180) //\r\n                a1 += 360;\r\n            parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, sy, 0, 0);\r\n            rotation = child.arotation;\r\n            a2 = ((a2 + os) * MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n            if (a2 > 180)\r\n                a2 -= 360;\r\n            else if (a2 < -180) //\r\n                a2 += 360;\r\n            child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n        };\r\n        return IkConstraint;\r\n    }());\n\n    /** Stores the setup pose for an {@link IkConstraint}.\r\n     * <p>\r\n     * See [IK constraints](http://esotericsoftware.com/spine-ik-constraints) in the Spine User Guide.\r\n     * @public\r\n     * */\r\n    var IkConstraintData = /** @class */ (function (_super) {\r\n        __extends$1(IkConstraintData, _super);\r\n        function IkConstraintData(name) {\r\n            var _this = _super.call(this, name, 0, false) || this;\r\n            /** The bones that are constrained by this IK constraint. */\r\n            _this.bones = new Array();\r\n            /** Controls the bend direction of the IK bones, either 1 or -1. */\r\n            _this.bendDirection = 1;\r\n            /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */\r\n            _this.compress = false;\r\n            /** When true, if the target is out of range, the parent bone is scaled to reach it. If more than one bone is being constrained\r\n             * and the parent bone has local nonuniform scale, stretch is not applied. */\r\n            _this.stretch = false;\r\n            /** When true, only a single bone is being constrained, and {@link #getCompress()} or {@link #getStretch()} is used, the bone\r\n             * is scaled on both the X and Y axes. */\r\n            _this.uniform = false;\r\n            /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */\r\n            _this.mix = 1;\r\n            /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */\r\n            _this.softness = 0;\r\n            return _this;\r\n        }\r\n        return IkConstraintData;\r\n    }(ConstraintData));\n\n    /** Stores the setup pose for a {@link PathConstraint}.\r\n     *\r\n     * See [Path constraints](http://esotericsoftware.com/spine-path-constraints) in the Spine User Guide.\r\n     * @public\r\n     * */\r\n    var PathConstraintData = /** @class */ (function (_super) {\r\n        __extends$1(PathConstraintData, _super);\r\n        function PathConstraintData(name) {\r\n            var _this = _super.call(this, name, 0, false) || this;\r\n            /** The bones that will be modified by this path constraint. */\r\n            _this.bones = new Array();\r\n            _this.mixRotate = 0;\r\n            _this.mixX = 0;\r\n            _this.mixY = 0;\r\n            return _this;\r\n        }\r\n        return PathConstraintData;\r\n    }(ConstraintData));\r\n    /** Controls how bones after the first bone are positioned along the path.\r\n     *\r\n     * [Spacing mode](http://esotericsoftware.com/spine-path-constraints#Spacing-mode) in the Spine User Guide.\r\n     * @public\r\n     * */\r\n    var SpacingMode;\r\n    (function (SpacingMode) {\r\n        SpacingMode[SpacingMode[\"Length\"] = 0] = \"Length\";\r\n        SpacingMode[SpacingMode[\"Fixed\"] = 1] = \"Fixed\";\r\n        SpacingMode[SpacingMode[\"Percent\"] = 2] = \"Percent\";\r\n        SpacingMode[SpacingMode[\"Proportional\"] = 3] = \"Proportional\";\r\n    })(SpacingMode || (SpacingMode = {}));\n\n    /** Stores the current pose for a path constraint. A path constraint adjusts the rotation, translation, and scale of the\r\n     * constrained bones so they follow a {@link PathAttachment}.\r\n     *\r\n     * See [Path constraints](http://esotericsoftware.com/spine-path-constraints) in the Spine User Guide.\r\n     * @public\r\n     * */\r\n    var PathConstraint = /** @class */ (function () {\r\n        function PathConstraint(data, skeleton) {\r\n            /** The position along the path. */\r\n            this.position = 0;\r\n            /** The spacing between bones. */\r\n            this.spacing = 0;\r\n            this.mixRotate = 0;\r\n            this.mixX = 0;\r\n            this.mixY = 0;\r\n            this.spaces = new Array();\r\n            this.positions = new Array();\r\n            this.world = new Array();\r\n            this.curves = new Array();\r\n            this.lengths = new Array();\r\n            this.segments = new Array();\r\n            this.active = false;\r\n            if (data == null)\r\n                throw new Error(\"data cannot be null.\");\r\n            if (skeleton == null)\r\n                throw new Error(\"skeleton cannot be null.\");\r\n            this.data = data;\r\n            this.bones = new Array();\r\n            for (var i = 0, n = data.bones.length; i < n; i++)\r\n                this.bones.push(skeleton.findBone(data.bones[i].name));\r\n            this.target = skeleton.findSlot(data.target.name);\r\n            this.position = data.position;\r\n            this.spacing = data.spacing;\r\n            this.mixRotate = data.mixRotate;\r\n            this.mixX = data.mixX;\r\n            this.mixY = data.mixY;\r\n        }\r\n        PathConstraint.prototype.isActive = function () {\r\n            return this.active;\r\n        };\r\n        PathConstraint.prototype.update = function () {\r\n            var attachment = this.target.getAttachment();\r\n            if (!(attachment instanceof PathAttachment))\r\n                return;\r\n            var mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY;\r\n            if (mixRotate == 0 && mixX == 0 && mixY == 0)\r\n                return;\r\n            var data = this.data;\r\n            var tangents = data.rotateMode == exports.RotateMode.Tangent, scale = data.rotateMode == exports.RotateMode.ChainScale;\r\n            var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\r\n            var bones = this.bones;\r\n            var spaces = Utils.setArraySize(this.spaces, spacesCount), lengths = scale ? this.lengths = Utils.setArraySize(this.lengths, boneCount) : null;\r\n            var spacing = this.spacing;\r\n            switch (data.spacingMode) {\r\n                case SpacingMode.Percent:\r\n                    if (scale) {\r\n                        for (var i = 0, n = spacesCount - 1; i < n; i++) {\r\n                            var bone = bones[i];\r\n                            var setupLength = bone.data.length;\r\n                            if (setupLength < PathConstraint.epsilon)\r\n                                lengths[i] = 0;\r\n                            else {\r\n                                var x = setupLength * bone.matrix.a, y = setupLength * bone.matrix.b;\r\n                                lengths[i] = Math.sqrt(x * x + y * y);\r\n                            }\r\n                        }\r\n                    }\r\n                    Utils.arrayFill(spaces, 1, spacesCount, spacing);\r\n                    break;\r\n                case SpacingMode.Proportional:\r\n                    var sum = 0;\r\n                    for (var i = 0, n = spacesCount - 1; i < n;) {\r\n                        var bone = bones[i];\r\n                        var setupLength = bone.data.length;\r\n                        if (setupLength < PathConstraint.epsilon) {\r\n                            if (scale)\r\n                                lengths[i] = 0;\r\n                            spaces[++i] = spacing;\r\n                        }\r\n                        else {\r\n                            var x = setupLength * bone.matrix.a, y = setupLength * bone.matrix.b;\r\n                            var length_1 = Math.sqrt(x * x + y * y);\r\n                            if (scale)\r\n                                lengths[i] = length_1;\r\n                            spaces[++i] = length_1;\r\n                            sum += length_1;\r\n                        }\r\n                    }\r\n                    if (sum > 0) {\r\n                        sum = spacesCount / sum * spacing;\r\n                        for (var i = 1; i < spacesCount; i++)\r\n                            spaces[i] *= sum;\r\n                    }\r\n                    break;\r\n                default:\r\n                    var lengthSpacing = data.spacingMode == SpacingMode.Length;\r\n                    for (var i = 0, n = spacesCount - 1; i < n;) {\r\n                        var bone = bones[i];\r\n                        var setupLength = bone.data.length;\r\n                        if (setupLength < PathConstraint.epsilon) {\r\n                            if (scale)\r\n                                lengths[i] = 0;\r\n                            spaces[++i] = spacing;\r\n                        }\r\n                        else {\r\n                            var x = setupLength * bone.matrix.a, y = setupLength * bone.matrix.b;\r\n                            var length_2 = Math.sqrt(x * x + y * y);\r\n                            if (scale)\r\n                                lengths[i] = length_2;\r\n                            spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_2 / setupLength;\r\n                        }\r\n                    }\r\n            }\r\n            var positions = this.computeWorldPositions(attachment, spacesCount, tangents);\r\n            var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\r\n            var tip = false;\r\n            if (offsetRotation == 0)\r\n                tip = data.rotateMode == exports.RotateMode.Chain;\r\n            else {\r\n                tip = false;\r\n                var p = this.target.bone.matrix;\r\n                offsetRotation *= p.a * p.d - p.b * p.c > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n            }\r\n            for (var i = 0, p = 3; i < boneCount; i++, p += 3) {\r\n                var bone = bones[i];\r\n                var mat = bone.matrix;\r\n                mat.tx += (boneX - mat.tx) * mixX;\r\n                mat.ty += (boneY - mat.ty) * mixY;\r\n                var x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\r\n                if (scale) {\r\n                    var length_3 = lengths[i];\r\n                    if (length_3 != 0) {\r\n                        var s = (Math.sqrt(dx * dx + dy * dy) / length_3 - 1) * mixRotate + 1;\r\n                        mat.a *= s;\r\n                        mat.b *= s;\r\n                    }\r\n                }\r\n                boneX = x;\r\n                boneY = y;\r\n                if (mixRotate > 0) {\r\n                    var a = mat.a, b = mat.c, c = mat.b, d = mat.d, r = 0, cos = 0, sin = 0;\r\n                    if (tangents)\r\n                        r = positions[p - 1];\r\n                    else if (spaces[i + 1] == 0)\r\n                        r = positions[p + 2];\r\n                    else\r\n                        r = Math.atan2(dy, dx);\r\n                    r -= Math.atan2(c, a);\r\n                    if (tip) {\r\n                        cos = Math.cos(r);\r\n                        sin = Math.sin(r);\r\n                        var length_4 = bone.data.length;\r\n                        boneX += (length_4 * (cos * a - sin * c) - dx) * mixRotate;\r\n                        boneY += (length_4 * (sin * a + cos * c) - dy) * mixRotate;\r\n                    }\r\n                    else {\r\n                        r += offsetRotation;\r\n                    }\r\n                    if (r > MathUtils.PI)\r\n                        r -= MathUtils.PI2;\r\n                    else if (r < -MathUtils.PI) //\r\n                        r += MathUtils.PI2;\r\n                    r *= mixRotate;\r\n                    cos = Math.cos(r);\r\n                    sin = Math.sin(r);\r\n                    mat.a = cos * a - sin * c;\r\n                    mat.c = cos * b - sin * d;\r\n                    mat.b = sin * a + cos * c;\r\n                    mat.d = sin * b + cos * d;\r\n                }\r\n                bone.updateAppliedTransform();\r\n            }\r\n        };\r\n        PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents) {\r\n            var target = this.target;\r\n            var position = this.position;\r\n            var spaces = this.spaces, out = Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null;\r\n            var closed = path.closed;\r\n            var verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\r\n            if (!path.constantSpeed) {\r\n                var lengths = path.lengths;\r\n                curveCount -= closed ? 1 : 2;\r\n                var pathLength_1 = lengths[curveCount];\r\n                if (this.data.positionMode == exports.PositionMode.Percent)\r\n                    position *= pathLength_1;\r\n                var multiplier_1;\r\n                switch (this.data.spacingMode) {\r\n                    case SpacingMode.Percent:\r\n                        multiplier_1 = pathLength_1;\r\n                        break;\r\n                    case SpacingMode.Proportional:\r\n                        multiplier_1 = pathLength_1 / spacesCount;\r\n                        break;\r\n                    default:\r\n                        multiplier_1 = 1;\r\n                }\r\n                world = Utils.setArraySize(this.world, 8);\r\n                for (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\r\n                    var space = spaces[i] * multiplier_1;\r\n                    position += space;\r\n                    var p = position;\r\n                    if (closed) {\r\n                        p %= pathLength_1;\r\n                        if (p < 0)\r\n                            p += pathLength_1;\r\n                        curve = 0;\r\n                    }\r\n                    else if (p < 0) {\r\n                        if (prevCurve != PathConstraint.BEFORE) {\r\n                            prevCurve = PathConstraint.BEFORE;\r\n                            path.computeWorldVertices(target, 2, 4, world, 0, 2);\r\n                        }\r\n                        this.addBeforePosition(p, world, 0, out, o);\r\n                        continue;\r\n                    }\r\n                    else if (p > pathLength_1) {\r\n                        if (prevCurve != PathConstraint.AFTER) {\r\n                            prevCurve = PathConstraint.AFTER;\r\n                            path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\r\n                        }\r\n                        this.addAfterPosition(p - pathLength_1, world, 0, out, o);\r\n                        continue;\r\n                    }\r\n                    // Determine curve containing position.\r\n                    for (;; curve++) {\r\n                        var length_5 = lengths[curve];\r\n                        if (p > length_5)\r\n                            continue;\r\n                        if (curve == 0)\r\n                            p /= length_5;\r\n                        else {\r\n                            var prev = lengths[curve - 1];\r\n                            p = (p - prev) / (length_5 - prev);\r\n                        }\r\n                        break;\r\n                    }\r\n                    if (curve != prevCurve) {\r\n                        prevCurve = curve;\r\n                        if (closed && curve == curveCount) {\r\n                            path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\r\n                            path.computeWorldVertices(target, 0, 4, world, 4, 2);\r\n                        }\r\n                        else\r\n                            path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\r\n                    }\r\n                    this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0));\r\n                }\r\n                return out;\r\n            }\r\n            // World vertices.\r\n            if (closed) {\r\n                verticesLength += 2;\r\n                world = Utils.setArraySize(this.world, verticesLength);\r\n                path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\r\n                path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\r\n                world[verticesLength - 2] = world[0];\r\n                world[verticesLength - 1] = world[1];\r\n            }\r\n            else {\r\n                curveCount--;\r\n                verticesLength -= 4;\r\n                world = Utils.setArraySize(this.world, verticesLength);\r\n                path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\r\n            }\r\n            // Curve lengths.\r\n            var curves = Utils.setArraySize(this.curves, curveCount);\r\n            var pathLength = 0;\r\n            var x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\r\n            var tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\r\n            for (var i = 0, w = 2; i < curveCount; i++, w += 6) {\r\n                cx1 = world[w];\r\n                cy1 = world[w + 1];\r\n                cx2 = world[w + 2];\r\n                cy2 = world[w + 3];\r\n                x2 = world[w + 4];\r\n                y2 = world[w + 5];\r\n                tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\r\n                tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\r\n                dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\r\n                dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\r\n                ddfx = tmpx * 2 + dddfx;\r\n                ddfy = tmpy * 2 + dddfy;\r\n                dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\r\n                dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\r\n                pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n                dfx += ddfx;\r\n                dfy += ddfy;\r\n                ddfx += dddfx;\r\n                ddfy += dddfy;\r\n                pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n                dfx += ddfx;\r\n                dfy += ddfy;\r\n                pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n                dfx += ddfx + dddfx;\r\n                dfy += ddfy + dddfy;\r\n                pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n                curves[i] = pathLength;\r\n                x1 = x2;\r\n                y1 = y2;\r\n            }\r\n            if (this.data.positionMode == exports.PositionMode.Percent)\r\n                position *= pathLength;\r\n            var multiplier = 0;\r\n            switch (this.data.spacingMode) {\r\n                case SpacingMode.Percent:\r\n                    multiplier = pathLength;\r\n                    break;\r\n                case SpacingMode.Proportional:\r\n                    multiplier = pathLength / spacesCount;\r\n                    break;\r\n                default:\r\n                    multiplier = 1;\r\n            }\r\n            var segments = this.segments;\r\n            var curveLength = 0;\r\n            for (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\r\n                var space = spaces[i] * multiplier;\r\n                position += space;\r\n                var p = position;\r\n                if (closed) {\r\n                    p %= pathLength;\r\n                    if (p < 0)\r\n                        p += pathLength;\r\n                    curve = 0;\r\n                }\r\n                else if (p < 0) {\r\n                    this.addBeforePosition(p, world, 0, out, o);\r\n                    continue;\r\n                }\r\n                else if (p > pathLength) {\r\n                    this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\r\n                    continue;\r\n                }\r\n                // Determine curve containing position.\r\n                for (;; curve++) {\r\n                    var length_6 = curves[curve];\r\n                    if (p > length_6)\r\n                        continue;\r\n                    if (curve == 0)\r\n                        p /= length_6;\r\n                    else {\r\n                        var prev = curves[curve - 1];\r\n                        p = (p - prev) / (length_6 - prev);\r\n                    }\r\n                    break;\r\n                }\r\n                // Curve segment lengths.\r\n                if (curve != prevCurve) {\r\n                    prevCurve = curve;\r\n                    var ii = curve * 6;\r\n                    x1 = world[ii];\r\n                    y1 = world[ii + 1];\r\n                    cx1 = world[ii + 2];\r\n                    cy1 = world[ii + 3];\r\n                    cx2 = world[ii + 4];\r\n                    cy2 = world[ii + 5];\r\n                    x2 = world[ii + 6];\r\n                    y2 = world[ii + 7];\r\n                    tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\r\n                    tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\r\n                    dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\r\n                    dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\r\n                    ddfx = tmpx * 2 + dddfx;\r\n                    ddfy = tmpy * 2 + dddfy;\r\n                    dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\r\n                    dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\r\n                    curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\r\n                    segments[0] = curveLength;\r\n                    for (ii = 1; ii < 8; ii++) {\r\n                        dfx += ddfx;\r\n                        dfy += ddfy;\r\n                        ddfx += dddfx;\r\n                        ddfy += dddfy;\r\n                        curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n                        segments[ii] = curveLength;\r\n                    }\r\n                    dfx += ddfx;\r\n                    dfy += ddfy;\r\n                    curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n                    segments[8] = curveLength;\r\n                    dfx += ddfx + dddfx;\r\n                    dfy += ddfy + dddfy;\r\n                    curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n                    segments[9] = curveLength;\r\n                    segment = 0;\r\n                }\r\n                // Weight by segment length.\r\n                p *= curveLength;\r\n                for (;; segment++) {\r\n                    var length_7 = segments[segment];\r\n                    if (p > length_7)\r\n                        continue;\r\n                    if (segment == 0)\r\n                        p /= length_7;\r\n                    else {\r\n                        var prev = segments[segment - 1];\r\n                        p = segment + (p - prev) / (length_7 - prev);\r\n                    }\r\n                    break;\r\n                }\r\n                this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\r\n            }\r\n            return out;\r\n        };\r\n        PathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) {\r\n            var x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\r\n            out[o] = x1 + p * Math.cos(r);\r\n            out[o + 1] = y1 + p * Math.sin(r);\r\n            out[o + 2] = r;\r\n        };\r\n        PathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) {\r\n            var x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\r\n            out[o] = x1 + p * Math.cos(r);\r\n            out[o + 1] = y1 + p * Math.sin(r);\r\n            out[o + 2] = r;\r\n        };\r\n        PathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\r\n            if (p == 0 || isNaN(p)) {\r\n                out[o] = x1;\r\n                out[o + 1] = y1;\r\n                out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n                return;\r\n            }\r\n            var tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\r\n            var ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\r\n            var x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\r\n            out[o] = x;\r\n            out[o + 1] = y;\r\n            if (tangents) {\r\n                if (p < 0.001)\r\n                    out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n                else\r\n                    out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\r\n            }\r\n        };\r\n        PathConstraint.NONE = -1;\r\n        PathConstraint.BEFORE = -2;\r\n        PathConstraint.AFTER = -3;\r\n        PathConstraint.epsilon = 0.00001;\r\n        return PathConstraint;\r\n    }());\n\n    /** Stores a slot's current pose. Slots organize attachments for {@link Skeleton#drawOrder} purposes and provide a place to store\r\n     * state for an attachment. State cannot be stored in an attachment itself because attachments are stateless and may be shared\r\n     * across multiple skeletons.\r\n     * @public\r\n     * */\r\n    var Slot = /** @class */ (function () {\r\n        function Slot(data, bone) {\r\n            /** Values to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a\r\n             * weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions.\r\n             *\r\n             * See {@link VertexAttachment#computeWorldVertices()} and {@link DeformTimeline}. */\r\n            this.deform = new Array();\r\n            if (data == null)\r\n                throw new Error(\"data cannot be null.\");\r\n            if (bone == null)\r\n                throw new Error(\"bone cannot be null.\");\r\n            this.data = data;\r\n            this.bone = bone;\r\n            this.color = new Color();\r\n            this.darkColor = data.darkColor == null ? null : new Color();\r\n            this.setToSetupPose();\r\n            this.blendMode = this.data.blendMode;\r\n        }\r\n        /** The skeleton this slot belongs to. */\r\n        Slot.prototype.getSkeleton = function () {\r\n            return this.bone.skeleton;\r\n        };\r\n        /** The current attachment for the slot, or null if the slot has no attachment. */\r\n        Slot.prototype.getAttachment = function () {\r\n            return this.attachment;\r\n        };\r\n        /** Sets the slot's attachment and, if the attachment changed, resets {@link #attachmentTime} and clears {@link #deform}.\r\n         * @param attachment May be null. */\r\n        Slot.prototype.setAttachment = function (attachment) {\r\n            if (this.attachment == attachment)\r\n                return;\r\n            this.attachment = attachment;\r\n            this.attachmentTime = this.bone.skeleton.time;\r\n            this.deform.length = 0;\r\n        };\r\n        Slot.prototype.setAttachmentTime = function (time) {\r\n            this.attachmentTime = this.bone.skeleton.time - time;\r\n        };\r\n        /** The time that has elapsed since the last time the attachment was set or cleared. Relies on Skeleton\r\n         * {@link Skeleton#time}. */\r\n        Slot.prototype.getAttachmentTime = function () {\r\n            return this.bone.skeleton.time - this.attachmentTime;\r\n        };\r\n        /** Sets this slot to the setup pose. */\r\n        Slot.prototype.setToSetupPose = function () {\r\n            this.color.setFromColor(this.data.color);\r\n            if (this.darkColor != null)\r\n                this.darkColor.setFromColor(this.data.darkColor);\r\n            if (this.data.attachmentName == null)\r\n                this.attachment = null;\r\n            else {\r\n                this.attachment = null;\r\n                this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\r\n            }\r\n        };\r\n        return Slot;\r\n    }());\n\n    /** Stores the current pose for a transform constraint. A transform constraint adjusts the world transform of the constrained\r\n     * bones to match that of the target bone.\r\n     *\r\n     * See [Transform constraints](http://esotericsoftware.com/spine-transform-constraints) in the Spine User Guide.\r\n     * @public\r\n     * */\r\n    var TransformConstraint = /** @class */ (function () {\r\n        function TransformConstraint(data, skeleton) {\r\n            this.mixRotate = 0;\r\n            this.mixX = 0;\r\n            this.mixY = 0;\r\n            this.mixScaleX = 0;\r\n            this.mixScaleY = 0;\r\n            this.mixShearY = 0;\r\n            this.temp = new Vector2();\r\n            this.active = false;\r\n            if (!data)\r\n                throw new Error(\"data cannot be null.\");\r\n            if (!skeleton)\r\n                throw new Error(\"skeleton cannot be null.\");\r\n            this.data = data;\r\n            this.mixRotate = data.mixRotate;\r\n            this.mixX = data.mixX;\r\n            this.mixY = data.mixY;\r\n            this.mixScaleX = data.mixScaleX;\r\n            this.mixScaleY = data.mixScaleY;\r\n            this.mixShearY = data.mixShearY;\r\n            this.bones = new Array();\r\n            for (var i = 0; i < data.bones.length; i++)\r\n                this.bones.push(skeleton.findBone(data.bones[i].name));\r\n            this.target = skeleton.findBone(data.target.name);\r\n        }\r\n        TransformConstraint.prototype.isActive = function () {\r\n            return this.active;\r\n        };\r\n        TransformConstraint.prototype.update = function () {\r\n            if (this.mixRotate == 0 && this.mixX == 0 && this.mixY == 0 && this.mixScaleX == 0 && this.mixScaleX == 0 && this.mixShearY == 0)\r\n                return;\r\n            if (this.data.local) {\r\n                if (this.data.relative)\r\n                    this.applyRelativeLocal();\r\n                else\r\n                    this.applyAbsoluteLocal();\r\n            }\r\n            else {\r\n                if (this.data.relative)\r\n                    this.applyRelativeWorld();\r\n                else\r\n                    this.applyAbsoluteWorld();\r\n            }\r\n        };\r\n        TransformConstraint.prototype.applyAbsoluteWorld = function () {\r\n            var mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\r\n            var translate = mixX != 0 || mixY != 0;\r\n            var target = this.target;\r\n            var targetMat = target.matrix;\r\n            var ta = targetMat.a, tb = targetMat.c, tc = targetMat.b, td = targetMat.d;\r\n            var degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n            var offsetRotation = this.data.offsetRotation * degRadReflect;\r\n            var offsetShearY = this.data.offsetShearY * degRadReflect;\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                var mat = bone.matrix;\r\n                if (mixRotate != 0) {\r\n                    var a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n                    var r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\r\n                    if (r > MathUtils.PI)\r\n                        r -= MathUtils.PI2;\r\n                    else if (r < -MathUtils.PI) //\r\n                        r += MathUtils.PI2;\r\n                    r *= mixRotate;\r\n                    var cos = Math.cos(r), sin = Math.sin(r);\r\n                    mat.a = cos * a - sin * c;\r\n                    mat.c = cos * b - sin * d;\r\n                    mat.b = sin * a + cos * c;\r\n                    mat.d = sin * b + cos * d;\r\n                }\r\n                if (translate) {\r\n                    var temp = this.temp;\r\n                    target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n                    mat.tx += (temp.x - mat.tx) * mixX;\r\n                    mat.ty += (temp.y - mat.ty) * mixY;\r\n                }\r\n                if (mixScaleX != 0) {\r\n                    var s = Math.sqrt(mat.a * mat.a + mat.b * mat.b);\r\n                    if (s != 0)\r\n                        s = (s + (Math.sqrt(ta * ta + tc * tc) - s + this.data.offsetScaleX) * mixScaleX) / s;\r\n                    mat.a *= s;\r\n                    mat.b *= s;\r\n                }\r\n                if (mixScaleY != 0) {\r\n                    var s = Math.sqrt(mat.c * mat.c + mat.d * mat.d);\r\n                    if (s != 0)\r\n                        s = (s + (Math.sqrt(tb * tb + td * td) - s + this.data.offsetScaleY) * mixScaleY) / s;\r\n                    mat.c *= s;\r\n                    mat.d *= s;\r\n                }\r\n                if (mixShearY > 0) {\r\n                    var b = mat.c, d = mat.d;\r\n                    var by = Math.atan2(d, b);\r\n                    var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(mat.b, mat.a));\r\n                    if (r > MathUtils.PI)\r\n                        r -= MathUtils.PI2;\r\n                    else if (r < -MathUtils.PI) //\r\n                        r += MathUtils.PI2;\r\n                    r = by + (r + offsetShearY) * mixShearY;\r\n                    var s = Math.sqrt(b * b + d * d);\r\n                    mat.c = Math.cos(r) * s;\r\n                    mat.d = Math.sin(r) * s;\r\n                }\r\n                bone.updateAppliedTransform();\r\n            }\r\n        };\r\n        TransformConstraint.prototype.applyRelativeWorld = function () {\r\n            var mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\r\n            var translate = mixX != 0 || mixY != 0;\r\n            var target = this.target;\r\n            var targetMat = target.matrix;\r\n            var ta = targetMat.a, tb = targetMat.c, tc = targetMat.b, td = targetMat.d;\r\n            var degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n            var offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                var mat = bone.matrix;\r\n                if (mixRotate != 0) {\r\n                    var a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n                    var r = Math.atan2(tc, ta) + offsetRotation;\r\n                    if (r > MathUtils.PI)\r\n                        r -= MathUtils.PI2;\r\n                    else if (r < -MathUtils.PI) //\r\n                        r += MathUtils.PI2;\r\n                    r *= mixRotate;\r\n                    var cos = Math.cos(r), sin = Math.sin(r);\r\n                    mat.a = cos * a - sin * c;\r\n                    mat.c = cos * b - sin * d;\r\n                    mat.b = sin * a + cos * c;\r\n                    mat.d = sin * b + cos * d;\r\n                }\r\n                if (translate) {\r\n                    var temp = this.temp;\r\n                    target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n                    mat.tx += temp.x * mixX;\r\n                    mat.ty += temp.y * mixY;\r\n                }\r\n                if (mixScaleX != 0) {\r\n                    var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * mixScaleX + 1;\r\n                    mat.a *= s;\r\n                    mat.b *= s;\r\n                }\r\n                if (mixScaleY != 0) {\r\n                    var s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * mixScaleY + 1;\r\n                    mat.c *= s;\r\n                    mat.d *= s;\r\n                }\r\n                if (mixShearY > 0) {\r\n                    var r = Math.atan2(td, tb) - Math.atan2(tc, ta);\r\n                    if (r > MathUtils.PI)\r\n                        r -= MathUtils.PI2;\r\n                    else if (r < -MathUtils.PI) //\r\n                        r += MathUtils.PI2;\r\n                    var b = mat.c, d = mat.d;\r\n                    r = Math.atan2(d, b) + (r - MathUtils.PI / 2 + offsetShearY) * mixShearY;\r\n                    var s = Math.sqrt(b * b + d * d);\r\n                    mat.c = Math.cos(r) * s;\r\n                    mat.d = Math.sin(r) * s;\r\n                }\r\n                bone.updateAppliedTransform();\r\n            }\r\n        };\r\n        TransformConstraint.prototype.applyAbsoluteLocal = function () {\r\n            var mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\r\n            var target = this.target;\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                var rotation = bone.arotation;\r\n                if (mixRotate != 0) {\r\n                    var r = target.arotation - rotation + this.data.offsetRotation;\r\n                    r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n                    rotation += r * mixRotate;\r\n                }\r\n                var x = bone.ax, y = bone.ay;\r\n                x += (target.ax - x + this.data.offsetX) * mixX;\r\n                y += (target.ay - y + this.data.offsetY) * mixY;\r\n                var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n                if (mixScaleX != 0 && scaleX != 0)\r\n                    scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * mixScaleX) / scaleX;\r\n                if (mixScaleY != 0 && scaleY != 0)\r\n                    scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * mixScaleY) / scaleY;\r\n                var shearY = bone.ashearY;\r\n                if (mixShearY != 0) {\r\n                    var r = target.ashearY - shearY + this.data.offsetShearY;\r\n                    r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n                    shearY += r * mixShearY;\r\n                }\r\n                bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n            }\r\n        };\r\n        TransformConstraint.prototype.applyRelativeLocal = function () {\r\n            var mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\r\n            var target = this.target;\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                var rotation = bone.arotation + (target.arotation + this.data.offsetRotation) * mixRotate;\r\n                var x = bone.ax + (target.ax + this.data.offsetX) * mixX;\r\n                var y = bone.ay + (target.ay + this.data.offsetY) * mixY;\r\n                var scaleX = bone.ascaleX * (((target.ascaleX - 1 + this.data.offsetScaleX) * mixScaleX) + 1);\r\n                var scaleY = bone.ascaleY * (((target.ascaleY - 1 + this.data.offsetScaleY) * mixScaleY) + 1);\r\n                var shearY = bone.ashearY + (target.ashearY + this.data.offsetShearY) * mixShearY;\r\n                bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n            }\r\n        };\r\n        return TransformConstraint;\r\n    }());\n\n    /** Stores the current pose for a skeleton.\r\n     *\r\n     * See [Instance objects](http://esotericsoftware.com/spine-runtime-architecture#Instance-objects) in the Spine Runtimes Guide.\r\n     * @public\r\n     * */\r\n    var Skeleton = /** @class */ (function () {\r\n        function Skeleton(data) {\r\n            /** The skeleton's setup pose data. */\r\n            this.data = null;\r\n            /** The skeleton's bones, sorted parent first. The root bone is always the first bone. */\r\n            this.bones = null;\r\n            /** The skeleton's slots. */\r\n            this.slots = null;\r\n            /** The skeleton's slots in the order they should be drawn. The returned array may be modified to change the draw order. */\r\n            this.drawOrder = null;\r\n            /** The skeleton's IK constraints. */\r\n            this.ikConstraints = null;\r\n            /** The skeleton's transform constraints. */\r\n            this.transformConstraints = null;\r\n            /** The skeleton's path constraints. */\r\n            this.pathConstraints = null;\r\n            /** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link #updateCache()}. */\r\n            this._updateCache = new Array();\r\n            /** The skeleton's current skin. May be null. */\r\n            this.skin = null;\r\n            /** The color to tint all the skeleton's attachments. */\r\n            this.color = null;\r\n            /** Returns the skeleton's time. This can be used for tracking, such as with Slot {@link Slot#attachmentTime}.\r\n             * <p>\r\n             * See {@link #update()}. */\r\n            this.time = 0;\r\n            /** Scales the entire skeleton on the X axis. This affects all bones, even if the bone's transform mode disallows scale\r\n             * inheritance. */\r\n            this.scaleX = 1;\r\n            /** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale\r\n             * inheritance. */\r\n            this.scaleY = 1;\r\n            /** Sets the skeleton X position, which is added to the root bone worldX position. */\r\n            this.x = 0;\r\n            /** Sets the skeleton Y position, which is added to the root bone worldY position. */\r\n            this.y = 0;\r\n            if (!data)\r\n                throw new Error(\"data cannot be null.\");\r\n            this.data = data;\r\n            this.bones = new Array();\r\n            for (var i = 0; i < data.bones.length; i++) {\r\n                var boneData = data.bones[i];\r\n                var bone = void 0;\r\n                if (!boneData.parent)\r\n                    bone = new Bone(boneData, this, null);\r\n                else {\r\n                    var parent_1 = this.bones[boneData.parent.index];\r\n                    bone = new Bone(boneData, this, parent_1);\r\n                    parent_1.children.push(bone);\r\n                }\r\n                this.bones.push(bone);\r\n            }\r\n            this.slots = new Array();\r\n            this.drawOrder = new Array();\r\n            for (var i = 0; i < data.slots.length; i++) {\r\n                var slotData = data.slots[i];\r\n                var bone = this.bones[slotData.boneData.index];\r\n                var slot = new Slot(slotData, bone);\r\n                this.slots.push(slot);\r\n                this.drawOrder.push(slot);\r\n            }\r\n            this.ikConstraints = new Array();\r\n            for (var i = 0; i < data.ikConstraints.length; i++) {\r\n                var ikConstraintData = data.ikConstraints[i];\r\n                this.ikConstraints.push(new IkConstraint(ikConstraintData, this));\r\n            }\r\n            this.transformConstraints = new Array();\r\n            for (var i = 0; i < data.transformConstraints.length; i++) {\r\n                var transformConstraintData = data.transformConstraints[i];\r\n                this.transformConstraints.push(new TransformConstraint(transformConstraintData, this));\r\n            }\r\n            this.pathConstraints = new Array();\r\n            for (var i = 0; i < data.pathConstraints.length; i++) {\r\n                var pathConstraintData = data.pathConstraints[i];\r\n                this.pathConstraints.push(new PathConstraint(pathConstraintData, this));\r\n            }\r\n            this.color = new Color(1, 1, 1, 1);\r\n            this.updateCache();\r\n        }\r\n        /** Caches information about bones and constraints. Must be called if the {@link #getSkin()} is modified or if bones,\r\n         * constraints, or weighted path attachments are added or removed. */\r\n        Skeleton.prototype.updateCache = function () {\r\n            var updateCache = this._updateCache;\r\n            updateCache.length = 0;\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                bone.sorted = bone.data.skinRequired;\r\n                bone.active = !bone.sorted;\r\n            }\r\n            if (this.skin) {\r\n                var skinBones = this.skin.bones;\r\n                for (var i = 0, n = this.skin.bones.length; i < n; i++) {\r\n                    var bone = this.bones[skinBones[i].index];\r\n                    do {\r\n                        bone.sorted = false;\r\n                        bone.active = true;\r\n                        bone = bone.parent;\r\n                    } while (bone);\r\n                }\r\n            }\r\n            // IK first, lowest hierarchy depth first.\r\n            var ikConstraints = this.ikConstraints;\r\n            var transformConstraints = this.transformConstraints;\r\n            var pathConstraints = this.pathConstraints;\r\n            var ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\r\n            var constraintCount = ikCount + transformCount + pathCount;\r\n            outer: for (var i = 0; i < constraintCount; i++) {\r\n                for (var ii = 0; ii < ikCount; ii++) {\r\n                    var constraint = ikConstraints[ii];\r\n                    if (constraint.data.order == i) {\r\n                        this.sortIkConstraint(constraint);\r\n                        continue outer;\r\n                    }\r\n                }\r\n                for (var ii = 0; ii < transformCount; ii++) {\r\n                    var constraint = transformConstraints[ii];\r\n                    if (constraint.data.order == i) {\r\n                        this.sortTransformConstraint(constraint);\r\n                        continue outer;\r\n                    }\r\n                }\r\n                for (var ii = 0; ii < pathCount; ii++) {\r\n                    var constraint = pathConstraints[ii];\r\n                    if (constraint.data.order == i) {\r\n                        this.sortPathConstraint(constraint);\r\n                        continue outer;\r\n                    }\r\n                }\r\n            }\r\n            for (var i = 0, n = bones.length; i < n; i++)\r\n                this.sortBone(bones[i]);\r\n        };\r\n        Skeleton.prototype.sortIkConstraint = function (constraint) {\r\n            constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin && Utils.contains(this.skin.constraints, constraint.data, true)));\r\n            if (!constraint.active)\r\n                return;\r\n            var target = constraint.target;\r\n            this.sortBone(target);\r\n            var constrained = constraint.bones;\r\n            var parent = constrained[0];\r\n            this.sortBone(parent);\r\n            if (constrained.length == 1) {\r\n                this._updateCache.push(constraint);\r\n                this.sortReset(parent.children);\r\n            }\r\n            else {\r\n                var child = constrained[constrained.length - 1];\r\n                this.sortBone(child);\r\n                this._updateCache.push(constraint);\r\n                this.sortReset(parent.children);\r\n                child.sorted = true;\r\n            }\r\n        };\r\n        Skeleton.prototype.sortPathConstraint = function (constraint) {\r\n            constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin && Utils.contains(this.skin.constraints, constraint.data, true)));\r\n            if (!constraint.active)\r\n                return;\r\n            var slot = constraint.target;\r\n            var slotIndex = slot.data.index;\r\n            var slotBone = slot.bone;\r\n            if (this.skin)\r\n                this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\r\n            if (this.data.defaultSkin && this.data.defaultSkin != this.skin)\r\n                this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\r\n            for (var i = 0, n = this.data.skins.length; i < n; i++)\r\n                this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\r\n            var attachment = slot.getAttachment();\r\n            if (attachment instanceof PathAttachment)\r\n                this.sortPathConstraintAttachmentWith(attachment, slotBone);\r\n            var constrained = constraint.bones;\r\n            var boneCount = constrained.length;\r\n            for (var i = 0; i < boneCount; i++)\r\n                this.sortBone(constrained[i]);\r\n            this._updateCache.push(constraint);\r\n            for (var i = 0; i < boneCount; i++)\r\n                this.sortReset(constrained[i].children);\r\n            for (var i = 0; i < boneCount; i++)\r\n                constrained[i].sorted = true;\r\n        };\r\n        Skeleton.prototype.sortTransformConstraint = function (constraint) {\r\n            constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin && Utils.contains(this.skin.constraints, constraint.data, true)));\r\n            if (!constraint.active)\r\n                return;\r\n            this.sortBone(constraint.target);\r\n            var constrained = constraint.bones;\r\n            var boneCount = constrained.length;\r\n            if (constraint.data.local) {\r\n                for (var i = 0; i < boneCount; i++) {\r\n                    var child = constrained[i];\r\n                    this.sortBone(child.parent);\r\n                    this.sortBone(child);\r\n                }\r\n            }\r\n            else {\r\n                for (var i = 0; i < boneCount; i++) {\r\n                    this.sortBone(constrained[i]);\r\n                }\r\n            }\r\n            this._updateCache.push(constraint);\r\n            for (var i = 0; i < boneCount; i++)\r\n                this.sortReset(constrained[i].children);\r\n            for (var i = 0; i < boneCount; i++)\r\n                constrained[i].sorted = true;\r\n        };\r\n        Skeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) {\r\n            var attachments = skin.attachments[slotIndex];\r\n            if (!attachments)\r\n                return;\r\n            for (var key in attachments) {\r\n                this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\r\n            }\r\n        };\r\n        Skeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) {\r\n            if (!(attachment instanceof PathAttachment))\r\n                return;\r\n            var pathBones = attachment.bones;\r\n            if (!pathBones)\r\n                this.sortBone(slotBone);\r\n            else {\r\n                var bones = this.bones;\r\n                for (var i = 0, n = pathBones.length; i < n;) {\r\n                    var nn = pathBones[i++];\r\n                    nn += i;\r\n                    while (i < nn)\r\n                        this.sortBone(bones[pathBones[i++]]);\r\n                }\r\n            }\r\n        };\r\n        Skeleton.prototype.sortBone = function (bone) {\r\n            if (bone.sorted)\r\n                return;\r\n            var parent = bone.parent;\r\n            if (parent)\r\n                this.sortBone(parent);\r\n            bone.sorted = true;\r\n            this._updateCache.push(bone);\r\n        };\r\n        Skeleton.prototype.sortReset = function (bones) {\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                if (!bone.active)\r\n                    continue;\r\n                if (bone.sorted)\r\n                    this.sortReset(bone.children);\r\n                bone.sorted = false;\r\n            }\r\n        };\r\n        /** Updates the world transform for each bone and applies all constraints.\r\n         *\r\n         * See [World transforms](http://esotericsoftware.com/spine-runtime-skeletons#World-transforms) in the Spine\r\n         * Runtimes Guide. */\r\n        Skeleton.prototype.updateWorldTransform = function () {\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                bone.ax = bone.x;\r\n                bone.ay = bone.y;\r\n                bone.arotation = bone.rotation;\r\n                bone.ascaleX = bone.scaleX;\r\n                bone.ascaleY = bone.scaleY;\r\n                bone.ashearX = bone.shearX;\r\n                bone.ashearY = bone.shearY;\r\n            }\r\n            var updateCache = this._updateCache;\r\n            for (var i = 0, n = updateCache.length; i < n; i++)\r\n                updateCache[i].update();\r\n        };\r\n        Skeleton.prototype.updateWorldTransformWith = function (parent) {\r\n            // Apply the parent bone transform to the root bone. The root bone always inherits scale, rotation and reflection.\r\n            var rootBone = this.getRootBone();\r\n            var pa = parent.matrix.a, pb = parent.matrix.c, pc = parent.matrix.b, pd = parent.matrix.d;\r\n            rootBone.matrix.tx = pa * this.x + pb * this.y + parent.worldX;\r\n            rootBone.matrix.ty = pc * this.x + pd * this.y + parent.worldY;\r\n            var rotationY = rootBone.rotation + 90 + rootBone.shearY;\r\n            var la = MathUtils.cosDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\r\n            var lb = MathUtils.cosDeg(rotationY) * rootBone.scaleY;\r\n            var lc = MathUtils.sinDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\r\n            var ld = MathUtils.sinDeg(rotationY) * rootBone.scaleY;\r\n            var sx = this.scaleX;\r\n            var sy = settings.yDown ? -this.scaleY : this.scaleY;\r\n            rootBone.matrix.a = (pa * la + pb * lc) * sx;\r\n            rootBone.matrix.c = (pa * lb + pb * ld) * sx;\r\n            rootBone.matrix.b = (pc * la + pd * lc) * sy;\r\n            rootBone.matrix.d = (pc * lb + pd * ld) * sy;\r\n            // Update everything except root bone.\r\n            var updateCache = this._updateCache;\r\n            for (var i = 0, n = updateCache.length; i < n; i++) {\r\n                var updatable = updateCache[i];\r\n                if (updatable != rootBone)\r\n                    updatable.update();\r\n            }\r\n        };\r\n        /** Sets the bones, constraints, and slots to their setup pose values. */\r\n        Skeleton.prototype.setToSetupPose = function () {\r\n            this.setBonesToSetupPose();\r\n            this.setSlotsToSetupPose();\r\n        };\r\n        /** Sets the bones and constraints to their setup pose values. */\r\n        Skeleton.prototype.setBonesToSetupPose = function () {\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++)\r\n                bones[i].setToSetupPose();\r\n            var ikConstraints = this.ikConstraints;\r\n            for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n                var constraint = ikConstraints[i];\r\n                constraint.mix = constraint.data.mix;\r\n                constraint.softness = constraint.data.softness;\r\n                constraint.bendDirection = constraint.data.bendDirection;\r\n                constraint.compress = constraint.data.compress;\r\n                constraint.stretch = constraint.data.stretch;\r\n            }\r\n            var transformConstraints = this.transformConstraints;\r\n            for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n                var constraint = transformConstraints[i];\r\n                var data = constraint.data;\r\n                constraint.mixRotate = data.mixRotate;\r\n                constraint.mixX = data.mixX;\r\n                constraint.mixY = data.mixY;\r\n                constraint.mixScaleX = data.mixScaleX;\r\n                constraint.mixScaleY = data.mixScaleY;\r\n                constraint.mixShearY = data.mixShearY;\r\n            }\r\n            var pathConstraints = this.pathConstraints;\r\n            for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n                var constraint = pathConstraints[i];\r\n                var data = constraint.data;\r\n                constraint.position = data.position;\r\n                constraint.spacing = data.spacing;\r\n                constraint.mixRotate = data.mixRotate;\r\n                constraint.mixX = data.mixX;\r\n                constraint.mixY = data.mixY;\r\n            }\r\n        };\r\n        /** Sets the slots and draw order to their setup pose values. */\r\n        Skeleton.prototype.setSlotsToSetupPose = function () {\r\n            var slots = this.slots;\r\n            Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\r\n            for (var i = 0, n = slots.length; i < n; i++)\r\n                slots[i].setToSetupPose();\r\n        };\r\n        /** @returns May return null. */\r\n        Skeleton.prototype.getRootBone = function () {\r\n            if (this.bones.length == 0)\r\n                return null;\r\n            return this.bones[0];\r\n        };\r\n        /** @returns May be null. */\r\n        Skeleton.prototype.findBone = function (boneName) {\r\n            if (!boneName)\r\n                throw new Error(\"boneName cannot be null.\");\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                if (bone.data.name == boneName)\r\n                    return bone;\r\n            }\r\n            return null;\r\n        };\r\n        /** @returns -1 if the bone was not found. */\r\n        Skeleton.prototype.findBoneIndex = function (boneName) {\r\n            if (!boneName)\r\n                throw new Error(\"boneName cannot be null.\");\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++)\r\n                if (bones[i].data.name == boneName)\r\n                    return i;\r\n            return -1;\r\n        };\r\n        /** Finds a slot by comparing each slot's name. It is more efficient to cache the results of this method than to call it\r\n         * repeatedly.\r\n         * @returns May be null. */\r\n        Skeleton.prototype.findSlot = function (slotName) {\r\n            if (!slotName)\r\n                throw new Error(\"slotName cannot be null.\");\r\n            var slots = this.slots;\r\n            for (var i = 0, n = slots.length; i < n; i++) {\r\n                var slot = slots[i];\r\n                if (slot.data.name == slotName)\r\n                    return slot;\r\n            }\r\n            return null;\r\n        };\r\n        /** @returns -1 if the bone was not found. */\r\n        Skeleton.prototype.findSlotIndex = function (slotName) {\r\n            if (!slotName)\r\n                throw new Error(\"slotName cannot be null.\");\r\n            var slots = this.slots;\r\n            for (var i = 0, n = slots.length; i < n; i++)\r\n                if (slots[i].data.name == slotName)\r\n                    return i;\r\n            return -1;\r\n        };\r\n        /** Sets a skin by name.\r\n         *\r\n         * See {@link #setSkin()}. */\r\n        Skeleton.prototype.setSkinByName = function (skinName) {\r\n            var skin = this.data.findSkin(skinName);\r\n            if (!skin)\r\n                throw new Error(\"Skin not found: \" + skinName);\r\n            this.setSkin(skin);\r\n        };\r\n        /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#defaultSkin default skin}. If the\r\n         * skin is changed, {@link #updateCache()} is called.\r\n         *\r\n         * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no\r\n         * old skin, each slot's setup mode attachment is attached from the new skin.\r\n         *\r\n         * After changing the skin, the visible attachments can be reset to those attached in the setup pose by calling\r\n         * {@link #setSlotsToSetupPose()}. Also, often {@link AnimationState#apply()} is called before the next time the\r\n         * skeleton is rendered to allow any attachment keys in the current animation(s) to hide or show attachments from the new skin.\r\n         * @param newSkin May be null. */\r\n        Skeleton.prototype.setSkin = function (newSkin) {\r\n            if (newSkin == this.skin)\r\n                return;\r\n            if (newSkin) {\r\n                if (this.skin)\r\n                    newSkin.attachAll(this, this.skin);\r\n                else {\r\n                    var slots = this.slots;\r\n                    for (var i = 0, n = slots.length; i < n; i++) {\r\n                        var slot = slots[i];\r\n                        var name_1 = slot.data.attachmentName;\r\n                        if (name_1) {\r\n                            var attachment = newSkin.getAttachment(i, name_1);\r\n                            if (attachment)\r\n                                slot.setAttachment(attachment);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            this.skin = newSkin;\r\n            this.updateCache();\r\n        };\r\n        /** Finds an attachment by looking in the {@link #skin} and {@link SkeletonData#defaultSkin} using the slot name and attachment\r\n         * name.\r\n         *\r\n         * See {@link #getAttachment()}.\r\n         * @returns May be null. */\r\n        Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) {\r\n            return this.getAttachment(this.data.findSlot(slotName).index, attachmentName);\r\n        };\r\n        /** Finds an attachment by looking in the {@link #skin} and {@link SkeletonData#defaultSkin} using the slot index and\r\n         * attachment name. First the skin is checked and if the attachment was not found, the default skin is checked.\r\n         *\r\n         * See [Runtime skins](http://esotericsoftware.com/spine-runtime-skins) in the Spine Runtimes Guide.\r\n         * @returns May be null. */\r\n        Skeleton.prototype.getAttachment = function (slotIndex, attachmentName) {\r\n            if (!attachmentName)\r\n                throw new Error(\"attachmentName cannot be null.\");\r\n            if (this.skin) {\r\n                var attachment = this.skin.getAttachment(slotIndex, attachmentName);\r\n                if (attachment)\r\n                    return attachment;\r\n            }\r\n            if (this.data.defaultSkin)\r\n                return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\r\n            return null;\r\n        };\r\n        /** A convenience method to set an attachment by finding the slot with {@link #findSlot()}, finding the attachment with\r\n         * {@link #getAttachment()}, then setting the slot's {@link Slot#attachment}.\r\n         * @param attachmentName May be null to clear the slot's attachment. */\r\n        Skeleton.prototype.setAttachment = function (slotName, attachmentName) {\r\n            if (!slotName)\r\n                throw new Error(\"slotName cannot be null.\");\r\n            var slots = this.slots;\r\n            for (var i = 0, n = slots.length; i < n; i++) {\r\n                var slot = slots[i];\r\n                if (slot.data.name == slotName) {\r\n                    var attachment = null;\r\n                    if (attachmentName) {\r\n                        attachment = this.getAttachment(i, attachmentName);\r\n                        if (!attachment)\r\n                            throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\r\n                    }\r\n                    slot.setAttachment(attachment);\r\n                    return;\r\n                }\r\n            }\r\n            throw new Error(\"Slot not found: \" + slotName);\r\n        };\r\n        /** Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results of this method\r\n         * than to call it repeatedly.\r\n         * @return May be null. */\r\n        Skeleton.prototype.findIkConstraint = function (constraintName) {\r\n            if (!constraintName)\r\n                throw new Error(\"constraintName cannot be null.\");\r\n            var ikConstraints = this.ikConstraints;\r\n            for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n                var ikConstraint = ikConstraints[i];\r\n                if (ikConstraint.data.name == constraintName)\r\n                    return ikConstraint;\r\n            }\r\n            return null;\r\n        };\r\n        /** Finds a transform constraint by comparing each transform constraint's name. It is more efficient to cache the results of\r\n         * this method than to call it repeatedly.\r\n         * @return May be null. */\r\n        Skeleton.prototype.findTransformConstraint = function (constraintName) {\r\n            if (!constraintName)\r\n                throw new Error(\"constraintName cannot be null.\");\r\n            var transformConstraints = this.transformConstraints;\r\n            for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n                var constraint = transformConstraints[i];\r\n                if (constraint.data.name == constraintName)\r\n                    return constraint;\r\n            }\r\n            return null;\r\n        };\r\n        /** Finds a path constraint by comparing each path constraint's name. It is more efficient to cache the results of this method\r\n         * than to call it repeatedly.\r\n         * @return May be null. */\r\n        Skeleton.prototype.findPathConstraint = function (constraintName) {\r\n            if (!constraintName)\r\n                throw new Error(\"constraintName cannot be null.\");\r\n            var pathConstraints = this.pathConstraints;\r\n            for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n                var constraint = pathConstraints[i];\r\n                if (constraint.data.name == constraintName)\r\n                    return constraint;\r\n            }\r\n            return null;\r\n        };\r\n        /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose as `{ x: number, y: number, width: number, height: number }`.\r\n         * Note that this method will create temporary objects which can add to garbage collection pressure. Use `getBounds()` if garbage collection is a concern. */\r\n        Skeleton.prototype.getBoundsRect = function () {\r\n            var offset = new Vector2();\r\n            var size = new Vector2();\r\n            this.getBounds(offset, size);\r\n            return { x: offset.x, y: offset.y, width: size.x, height: size.y };\r\n        };\r\n        /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n         * @param offset An output value, the distance from the skeleton origin to the bottom left corner of the AABB.\r\n         * @param size An output value, the width and height of the AABB.\r\n         * @param temp Working memory to temporarily store attachments' computed world vertices. */\r\n        Skeleton.prototype.getBounds = function (offset, size, temp) {\r\n            if (temp === void 0) { temp = new Array(2); }\r\n            if (!offset)\r\n                throw new Error(\"offset cannot be null.\");\r\n            if (!size)\r\n                throw new Error(\"size cannot be null.\");\r\n            var drawOrder = this.drawOrder;\r\n            var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n            for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n                var slot = drawOrder[i];\r\n                if (!slot.bone.active)\r\n                    continue;\r\n                var verticesLength = 0;\r\n                var vertices = null;\r\n                var attachment = slot.getAttachment();\r\n                if (attachment instanceof RegionAttachment) {\r\n                    verticesLength = 8;\r\n                    vertices = Utils.setArraySize(temp, verticesLength, 0);\r\n                    attachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n                }\r\n                else if (attachment instanceof MeshAttachment) {\r\n                    var mesh = attachment;\r\n                    verticesLength = mesh.worldVerticesLength;\r\n                    vertices = Utils.setArraySize(temp, verticesLength, 0);\r\n                    mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\r\n                }\r\n                if (vertices) {\r\n                    for (var ii = 0, nn = vertices.length; ii < nn; ii += 2) {\r\n                        var x = vertices[ii], y = vertices[ii + 1];\r\n                        minX = Math.min(minX, x);\r\n                        minY = Math.min(minY, y);\r\n                        maxX = Math.max(maxX, x);\r\n                        maxY = Math.max(maxY, y);\r\n                    }\r\n                }\r\n            }\r\n            offset.set(minX, minY);\r\n            size.set(maxX - minX, maxY - minY);\r\n        };\r\n        /** Increments the skeleton's {@link #time}. */\r\n        Skeleton.prototype.update = function (delta) {\r\n            this.time += delta;\r\n        };\r\n        Object.defineProperty(Skeleton.prototype, \"flipX\", {\r\n            get: function () {\r\n                return this.scaleX == -1;\r\n            },\r\n            set: function (value) {\r\n                if (!Skeleton.deprecatedWarning1) {\r\n                    Skeleton.deprecatedWarning1 = true;\r\n                    console.warn(\"Spine Deprecation Warning: `Skeleton.flipX/flipY` was deprecated, please use scaleX/scaleY\");\r\n                }\r\n                this.scaleX = value ? 1.0 : -1.0;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Object.defineProperty(Skeleton.prototype, \"flipY\", {\r\n            get: function () {\r\n                return this.scaleY == -1;\r\n            },\r\n            set: function (value) {\r\n                if (!Skeleton.deprecatedWarning1) {\r\n                    Skeleton.deprecatedWarning1 = true;\r\n                    console.warn(\"Spine Deprecation Warning: `Skeleton.flipX/flipY` was deprecated, please use scaleX/scaleY\");\r\n                }\r\n                this.scaleY = value ? 1.0 : -1.0;\r\n            },\r\n            enumerable: false,\r\n            configurable: true\r\n        });\r\n        Skeleton.deprecatedWarning1 = false;\r\n        return Skeleton;\r\n    }());\n\n    /** Stores the setup pose and all of the stateless data for a skeleton.\r\n     *\r\n     * See [Data objects](http://esotericsoftware.com/spine-runtime-architecture#Data-objects) in the Spine Runtimes\r\n     * Guide.\r\n     * @public\r\n     * */\r\n    var SkeletonData = /** @class */ (function () {\r\n        function SkeletonData() {\r\n            /** The skeleton's name, which by default is the name of the skeleton data file, if possible. May be null. */\r\n            this.name = null;\r\n            /** The skeleton's bones, sorted parent first. The root bone is always the first bone. */\r\n            this.bones = new Array(); // Ordered parents first.\r\n            /** The skeleton's slots. */\r\n            this.slots = new Array(); // Setup pose draw order.\r\n            this.skins = new Array();\r\n            /** The skeleton's default skin. By default this skin contains all attachments that were not in a skin in Spine.\r\n             *\r\n             * See {@link Skeleton#getAttachmentByName()}.\r\n             * May be null. */\r\n            this.defaultSkin = null;\r\n            /** The skeleton's events. */\r\n            this.events = new Array();\r\n            /** The skeleton's animations. */\r\n            this.animations = new Array();\r\n            /** The skeleton's IK constraints. */\r\n            this.ikConstraints = new Array();\r\n            /** The skeleton's transform constraints. */\r\n            this.transformConstraints = new Array();\r\n            /** The skeleton's path constraints. */\r\n            this.pathConstraints = new Array();\r\n            /** The X coordinate of the skeleton's axis aligned bounding box in the setup pose. */\r\n            this.x = 0;\r\n            /** The Y coordinate of the skeleton's axis aligned bounding box in the setup pose. */\r\n            this.y = 0;\r\n            /** The width of the skeleton's axis aligned bounding box in the setup pose. */\r\n            this.width = 0;\r\n            /** The height of the skeleton's axis aligned bounding box in the setup pose. */\r\n            this.height = 0;\r\n            /** The Spine version used to export the skeleton data, or null. */\r\n            this.version = null;\r\n            /** The skeleton data hash. This value will change if any of the skeleton data has changed. May be null. */\r\n            this.hash = null;\r\n            // Nonessential\r\n            /** The dopesheet FPS in Spine. Available only when nonessential data was exported. */\r\n            this.fps = 0;\r\n            /** The path to the images directory as defined in Spine. Available only when nonessential data was exported. May be null. */\r\n            this.imagesPath = null;\r\n            /** The path to the audio directory as defined in Spine. Available only when nonessential data was exported. May be null. */\r\n            this.audioPath = null;\r\n        }\r\n        /** Finds a bone by comparing each bone's name. It is more efficient to cache the results of this method than to call it\r\n         * multiple times.\r\n         * @returns May be null. */\r\n        SkeletonData.prototype.findBone = function (boneName) {\r\n            if (!boneName)\r\n                throw new Error(\"boneName cannot be null.\");\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++) {\r\n                var bone = bones[i];\r\n                if (bone.name == boneName)\r\n                    return bone;\r\n            }\r\n            return null;\r\n        };\r\n        /** removed from spine-ts runtime **/\r\n        SkeletonData.prototype.findBoneIndex = function (boneName) {\r\n            if (!boneName)\r\n                throw new Error(\"boneName cannot be null.\");\r\n            var bones = this.bones;\r\n            for (var i = 0, n = bones.length; i < n; i++)\r\n                if (bones[i].name == boneName)\r\n                    return i;\r\n            return -1;\r\n        };\r\n        /** Finds a slot by comparing each slot's name. It is more efficient to cache the results of this method than to call it\r\n         * multiple times.\r\n         * @returns May be null. */\r\n        SkeletonData.prototype.findSlot = function (slotName) {\r\n            if (!slotName)\r\n                throw new Error(\"slotName cannot be null.\");\r\n            var slots = this.slots;\r\n            for (var i = 0, n = slots.length; i < n; i++) {\r\n                var slot = slots[i];\r\n                if (slot.name == slotName)\r\n                    return slot;\r\n            }\r\n            return null;\r\n        };\r\n        /** removed from spine-ts runtime **/\r\n        SkeletonData.prototype.findSlotIndex = function (slotName) {\r\n            if (!slotName)\r\n                throw new Error(\"slotName cannot be null.\");\r\n            var slots = this.slots;\r\n            for (var i = 0, n = slots.length; i < n; i++)\r\n                if (slots[i].name == slotName)\r\n                    return i;\r\n            return -1;\r\n        };\r\n        /** Finds a skin by comparing each skin's name. It is more efficient to cache the results of this method than to call it\r\n         * multiple times.\r\n         * @returns May be null. */\r\n        SkeletonData.prototype.findSkin = function (skinName) {\r\n            if (!skinName)\r\n                throw new Error(\"skinName cannot be null.\");\r\n            var skins = this.skins;\r\n            for (var i = 0, n = skins.length; i < n; i++) {\r\n                var skin = skins[i];\r\n                if (skin.name == skinName)\r\n                    return skin;\r\n            }\r\n            return null;\r\n        };\r\n        /** Finds an event by comparing each events's name. It is more efficient to cache the results of this method than to call it\r\n         * multiple times.\r\n         * @returns May be null. */\r\n        SkeletonData.prototype.findEvent = function (eventDataName) {\r\n            if (!eventDataName)\r\n                throw new Error(\"eventDataName cannot be null.\");\r\n            var events = this.events;\r\n            for (var i = 0, n = events.length; i < n; i++) {\r\n                var event_1 = events[i];\r\n                if (event_1.name == eventDataName)\r\n                    return event_1;\r\n            }\r\n            return null;\r\n        };\r\n        /** Finds an animation by comparing each animation's name. It is more efficient to cache the results of this method than to\r\n         * call it multiple times.\r\n         * @returns May be null. */\r\n        SkeletonData.prototype.findAnimation = function (animationName) {\r\n            if (!animationName)\r\n                throw new Error(\"animationName cannot be null.\");\r\n            var animations = this.animations;\r\n            for (var i = 0, n = animations.length; i < n; i++) {\r\n                var animation = animations[i];\r\n                if (animation.name == animationName)\r\n                    return animation;\r\n            }\r\n            return null;\r\n        };\r\n        /** Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results of this method\r\n         * than to call it multiple times.\r\n         * @return May be null. */\r\n        SkeletonData.prototype.findIkConstraint = function (constraintName) {\r\n            if (!constraintName)\r\n                throw new Error(\"constraintName cannot be null.\");\r\n            var ikConstraints = this.ikConstraints;\r\n            for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n                var constraint = ikConstraints[i];\r\n                if (constraint.name == constraintName)\r\n                    return constraint;\r\n            }\r\n            return null;\r\n        };\r\n        /** Finds a transform constraint by comparing each transform constraint's name. It is more efficient to cache the results of\r\n         * this method than to call it multiple times.\r\n         * @return May be null. */\r\n        SkeletonData.prototype.findTransformConstraint = function (constraintName) {\r\n            if (!constraintName)\r\n                throw new Error(\"constraintName cannot be null.\");\r\n            var transformConstraints = this.transformConstraints;\r\n            for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n                var constraint = transformConstraints[i];\r\n                if (constraint.name == constraintName)\r\n                    return constraint;\r\n            }\r\n            return null;\r\n        };\r\n        /** Finds a path constraint by comparing each path constraint's name. It is more efficient to cache the results of this method\r\n         * than to call it multiple times.\r\n         * @return May be null. */\r\n        SkeletonData.prototype.findPathConstraint = function (constraintName) {\r\n            if (!constraintName)\r\n                throw new Error(\"constraintName cannot be null.\");\r\n            var pathConstraints = this.pathConstraints;\r\n            for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n                var constraint = pathConstraints[i];\r\n                if (constraint.name == constraintName)\r\n                    return constraint;\r\n            }\r\n            return null;\r\n        };\r\n        /** removed from spine-ts runtime **/ SkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) {\r\n            if (pathConstraintName == null)\r\n                throw new Error(\"pathConstraintName cannot be null.\");\r\n            var pathConstraints = this.pathConstraints;\r\n            for (var i = 0, n = pathConstraints.length; i < n; i++)\r\n                if (pathConstraints[i].name == pathConstraintName)\r\n                    return i;\r\n            return -1;\r\n        };\r\n        return SkeletonData;\r\n    }());\n\n    /** Stores the setup pose for a {@link Slot}.\r\n     * @public\r\n     * */\r\n    var SlotData = /** @class */ (function () {\r\n        function SlotData(index, name, boneData) {\r\n            /** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two\r\n             * color tinting. */\r\n            this.color = new Color(1, 1, 1, 1);\r\n            if (index < 0)\r\n                throw new Error(\"index must be >= 0.\");\r\n            if (!name)\r\n                throw new Error(\"name cannot be null.\");\r\n            if (!boneData)\r\n                throw new Error(\"boneData cannot be null.\");\r\n            this.index = index;\r\n            this.name = name;\r\n            this.boneData = boneData;\r\n        }\r\n        return SlotData;\r\n    }());\n\n    /** Stores the setup pose for a {@link TransformConstraint}.\r\n     *\r\n     * See [Transform constraints](http://esotericsoftware.com/spine-transform-constraints) in the Spine User Guide.\r\n     * @public\r\n     * */\r\n    var TransformConstraintData = /** @class */ (function (_super) {\r\n        __extends$1(TransformConstraintData, _super);\r\n        function TransformConstraintData(name) {\r\n            var _this = _super.call(this, name, 0, false) || this;\r\n            /** The bones that will be modified by this transform constraint. */\r\n            _this.bones = new Array();\r\n            _this.mixRotate = 0;\r\n            _this.mixX = 0;\r\n            _this.mixY = 0;\r\n            _this.mixScaleX = 0;\r\n            _this.mixScaleY = 0;\r\n            _this.mixShearY = 0;\r\n            /** An offset added to the constrained bone rotation. */\r\n            _this.offsetRotation = 0;\r\n            /** An offset added to the constrained bone X translation. */\r\n            _this.offsetX = 0;\r\n            /** An offset added to the constrained bone Y translation. */\r\n            _this.offsetY = 0;\r\n            /** An offset added to the constrained bone scaleX. */\r\n            _this.offsetScaleX = 0;\r\n            /** An offset added to the constrained bone scaleY. */\r\n            _this.offsetScaleY = 0;\r\n            /** An offset added to the constrained bone shearY. */\r\n            _this.offsetShearY = 0;\r\n            _this.relative = false;\r\n            _this.local = false;\r\n            return _this;\r\n        }\r\n        return TransformConstraintData;\r\n    }(ConstraintData));\n\n    /** Stores an entry in the skin consisting of the slot index, name, and attachment\r\n     * @public\r\n     * **/\r\n    var SkinEntry = /** @class */ (function () {\r\n        function SkinEntry(slotIndex, name, attachment) {\r\n            this.slotIndex = slotIndex;\r\n            this.name = name;\r\n            this.attachment = attachment;\r\n        }\r\n        return SkinEntry;\r\n    }());\r\n    /** Stores attachments by slot index and attachment name.\r\n     *\r\n     * See SkeletonData {@link SkeletonData#defaultSkin}, Skeleton {@link Skeleton#skin}, and\r\n     * [Runtime skins](http://esotericsoftware.com/spine-runtime-skins) in the Spine Runtimes Guide.\r\n     * @public\r\n     * */\r\n    var Skin = /** @class */ (function () {\r\n        function Skin(name) {\r\n            this.attachments = new Array();\r\n            this.bones = Array();\r\n            this.constraints = new Array();\r\n            if (!name)\r\n                throw new Error(\"name cannot be null.\");\r\n            this.name = name;\r\n        }\r\n        /** Adds an attachment to the skin for the specified slot index and name. */\r\n        Skin.prototype.setAttachment = function (slotIndex, name, attachment) {\r\n            if (!attachment)\r\n                throw new Error(\"attachment cannot be null.\");\r\n            var attachments = this.attachments;\r\n            if (slotIndex >= attachments.length)\r\n                attachments.length = slotIndex + 1;\r\n            if (!attachments[slotIndex])\r\n                attachments[slotIndex] = {};\r\n            attachments[slotIndex][name] = attachment;\r\n        };\r\n        /** Adds all attachments, bones, and constraints from the specified skin to this skin. */\r\n        Skin.prototype.addSkin = function (skin) {\r\n            for (var i = 0; i < skin.bones.length; i++) {\r\n                var bone = skin.bones[i];\r\n                var contained = false;\r\n                for (var ii = 0; ii < this.bones.length; ii++) {\r\n                    if (this.bones[ii] == bone) {\r\n                        contained = true;\r\n                        break;\r\n                    }\r\n                }\r\n                if (!contained)\r\n                    this.bones.push(bone);\r\n            }\r\n            for (var i = 0; i < skin.constraints.length; i++) {\r\n                var constraint = skin.constraints[i];\r\n                var contained = false;\r\n                for (var ii = 0; ii < this.constraints.length; ii++) {\r\n                    if (this.constraints[ii] == constraint) {\r\n                        contained = true;\r\n                        break;\r\n                    }\r\n                }\r\n                if (!contained)\r\n                    this.constraints.push(constraint);\r\n            }\r\n            var attachments = skin.getAttachments();\r\n            for (var i = 0; i < attachments.length; i++) {\r\n                var attachment = attachments[i];\r\n                this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n            }\r\n        };\r\n        /** Adds all bones and constraints and copies of all attachments from the specified skin to this skin. Mesh attachments are not\r\n         * copied, instead a new linked mesh is created. The attachment copies can be modified without affecting the originals. */\r\n        Skin.prototype.copySkin = function (skin) {\r\n            for (var i = 0; i < skin.bones.length; i++) {\r\n                var bone = skin.bones[i];\r\n                var contained = false;\r\n                for (var ii = 0; ii < this.bones.length; ii++) {\r\n                    if (this.bones[ii] == bone) {\r\n                        contained = true;\r\n                        break;\r\n                    }\r\n                }\r\n                if (!contained)\r\n                    this.bones.push(bone);\r\n            }\r\n            for (var i = 0; i < skin.constraints.length; i++) {\r\n                var constraint = skin.constraints[i];\r\n                var contained = false;\r\n                for (var ii = 0; ii < this.constraints.length; ii++) {\r\n                    if (this.constraints[ii] == constraint) {\r\n                        contained = true;\r\n                        break;\r\n                    }\r\n                }\r\n                if (!contained)\r\n                    this.constraints.push(constraint);\r\n            }\r\n            var attachments = skin.getAttachments();\r\n            for (var i = 0; i < attachments.length; i++) {\r\n                var attachment = attachments[i];\r\n                if (!attachment.attachment)\r\n                    continue;\r\n                if (attachment.attachment instanceof MeshAttachment) {\r\n                    attachment.attachment = attachment.attachment.newLinkedMesh();\r\n                    this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n                }\r\n                else {\r\n                    attachment.attachment = attachment.attachment.copy();\r\n                    this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n                }\r\n            }\r\n        };\r\n        /** Returns the attachment for the specified slot index and name, or null. */\r\n        Skin.prototype.getAttachment = function (slotIndex, name) {\r\n            var dictionary = this.attachments[slotIndex];\r\n            return dictionary ? dictionary[name] : null;\r\n        };\r\n        /** Removes the attachment in the skin for the specified slot index and name, if any. */\r\n        Skin.prototype.removeAttachment = function (slotIndex, name) {\r\n            var dictionary = this.attachments[slotIndex];\r\n            if (dictionary)\r\n                dictionary[name] = null;\r\n        };\r\n        /** Returns all attachments in this skin. */\r\n        Skin.prototype.getAttachments = function () {\r\n            var entries = new Array();\r\n            for (var i = 0; i < this.attachments.length; i++) {\r\n                var slotAttachments = this.attachments[i];\r\n                if (slotAttachments) {\r\n                    for (var name_1 in slotAttachments) {\r\n                        var attachment = slotAttachments[name_1];\r\n                        if (attachment)\r\n                            entries.push(new SkinEntry(i, name_1, attachment));\r\n                    }\r\n                }\r\n            }\r\n            return entries;\r\n        };\r\n        /** Returns all attachments in this skin for the specified slot index. */\r\n        Skin.prototype.getAttachmentsForSlot = function (slotIndex, attachments) {\r\n            var slotAttachments = this.attachments[slotIndex];\r\n            if (slotAttachments) {\r\n                for (var name_2 in slotAttachments) {\r\n                    var attachment = slotAttachments[name_2];\r\n                    if (attachment)\r\n                        attachments.push(new SkinEntry(slotIndex, name_2, attachment));\r\n                }\r\n            }\r\n        };\r\n        /** Clears all attachments, bones, and constraints. */\r\n        Skin.prototype.clear = function () {\r\n            this.attachments.length = 0;\r\n            this.bones.length = 0;\r\n            this.constraints.length = 0;\r\n        };\r\n        /** Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached. */\r\n        Skin.prototype.attachAll = function (skeleton, oldSkin) {\r\n            var slotIndex = 0;\r\n            for (var i = 0; i < skeleton.slots.length; i++) {\r\n                var slot = skeleton.slots[i];\r\n                var slotAttachment = slot.getAttachment();\r\n                if (slotAttachment && slotIndex < oldSkin.attachments.length) {\r\n                    var dictionary = oldSkin.attachments[slotIndex];\r\n                    for (var key in dictionary) {\r\n                        var skinAttachment = dictionary[key];\r\n                        if (slotAttachment == skinAttachment) {\r\n                            var attachment = this.getAttachment(slotIndex, key);\r\n                            if (attachment)\r\n                                slot.setAttachment(attachment);\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n                slotIndex++;\r\n            }\r\n        };\r\n        return Skin;\r\n    }());\n\n    /** Loads skeleton data in the Spine binary format.\r\n     *\r\n     * See [Spine binary format](http://esotericsoftware.com/spine-binary-format) and\r\n     * [JSON and binary data](http://esotericsoftware.com/spine-loading-skeleton-data#JSON-and-binary-data) in the Spine\r\n     * Runtimes Guide.\r\n     * @public\r\n     * */\r\n    var SkeletonBinary = /** @class */ (function () {\r\n        function SkeletonBinary(attachmentLoader) {\r\n            /** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at\r\n             * runtime than were used in Spine.\r\n             *\r\n             * See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */\r\n            this.scale = 1;\r\n            this.attachmentLoader = null;\r\n            this.linkedMeshes = new Array();\r\n            this.attachmentLoader = attachmentLoader;\r\n        }\r\n        SkeletonBinary.prototype.readSkeletonData = function (binary) {\r\n            var scale = this.scale;\r\n            var skeletonData = new SkeletonData();\r\n            skeletonData.name = \"\"; // BOZO\r\n            var input = new BinaryInput(binary);\r\n            var lowHash = input.readInt32();\r\n            var highHash = input.readInt32();\r\n            skeletonData.hash = highHash == 0 && lowHash == 0 ? null : highHash.toString(16) + lowHash.toString(16);\r\n            skeletonData.version = input.readString();\r\n            if (skeletonData.version.substr(0, 3) !== '4.0') {\r\n                var error = \"Spine 4.0 loader cant load version \" + skeletonData.version + \". Please configure your pixi-spine bundle\";\r\n                console.error(error);\r\n            }\r\n            skeletonData.x = input.readFloat();\r\n            skeletonData.y = input.readFloat();\r\n            skeletonData.width = input.readFloat();\r\n            skeletonData.height = input.readFloat();\r\n            var nonessential = input.readBoolean();\r\n            if (nonessential) {\r\n                skeletonData.fps = input.readFloat();\r\n                skeletonData.imagesPath = input.readString();\r\n                skeletonData.audioPath = input.readString();\r\n            }\r\n            var n = 0;\r\n            // Strings.\r\n            n = input.readInt(true);\r\n            for (var i = 0; i < n; i++)\r\n                input.strings.push(input.readString());\r\n            // Bones.\r\n            n = input.readInt(true);\r\n            for (var i = 0; i < n; i++) {\r\n                var name_1 = input.readString();\r\n                var parent_1 = i == 0 ? null : skeletonData.bones[input.readInt(true)];\r\n                var data = new BoneData(i, name_1, parent_1);\r\n                data.rotation = input.readFloat();\r\n                data.x = input.readFloat() * scale;\r\n                data.y = input.readFloat() * scale;\r\n                data.scaleX = input.readFloat();\r\n                data.scaleY = input.readFloat();\r\n                data.shearX = input.readFloat();\r\n                data.shearY = input.readFloat();\r\n                data.length = input.readFloat() * scale;\r\n                data.transformMode = input.readInt(true);\r\n                data.skinRequired = input.readBoolean();\r\n                if (nonessential)\r\n                    Color.rgba8888ToColor(data.color, input.readInt32());\r\n                skeletonData.bones.push(data);\r\n            }\r\n            // Slots.\r\n            n = input.readInt(true);\r\n            for (var i = 0; i < n; i++) {\r\n                var slotName = input.readString();\r\n                var boneData = skeletonData.bones[input.readInt(true)];\r\n                var data = new SlotData(i, slotName, boneData);\r\n                Color.rgba8888ToColor(data.color, input.readInt32());\r\n                var darkColor = input.readInt32();\r\n                if (darkColor != -1)\r\n                    Color.rgb888ToColor(data.darkColor = new Color(), darkColor);\r\n                data.attachmentName = input.readStringRef();\r\n                data.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)];\r\n                skeletonData.slots.push(data);\r\n            }\r\n            // IK constraints.\r\n            n = input.readInt(true);\r\n            for (var i = 0, nn = void 0; i < n; i++) {\r\n                var data = new IkConstraintData(input.readString());\r\n                data.order = input.readInt(true);\r\n                data.skinRequired = input.readBoolean();\r\n                nn = input.readInt(true);\r\n                for (var ii = 0; ii < nn; ii++)\r\n                    data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n                data.target = skeletonData.bones[input.readInt(true)];\r\n                data.mix = input.readFloat();\r\n                data.softness = input.readFloat() * scale;\r\n                data.bendDirection = input.readByte();\r\n                data.compress = input.readBoolean();\r\n                data.stretch = input.readBoolean();\r\n                data.uniform = input.readBoolean();\r\n                skeletonData.ikConstraints.push(data);\r\n            }\r\n            // Transform constraints.\r\n            n = input.readInt(true);\r\n            for (var i = 0, nn = void 0; i < n; i++) {\r\n                var data = new TransformConstraintData(input.readString());\r\n                data.order = input.readInt(true);\r\n                data.skinRequired = input.readBoolean();\r\n                nn = input.readInt(true);\r\n                for (var ii = 0; ii < nn; ii++)\r\n                    data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n                data.target = skeletonData.bones[input.readInt(true)];\r\n                data.local = input.readBoolean();\r\n                data.relative = input.readBoolean();\r\n                data.offsetRotation = input.readFloat();\r\n                data.offsetX = input.readFloat() * scale;\r\n                data.offsetY = input.readFloat() * scale;\r\n                data.offsetScaleX = input.readFloat();\r\n                data.offsetScaleY = input.readFloat();\r\n                data.offsetShearY = input.readFloat();\r\n                data.mixRotate = input.readFloat();\r\n                data.mixX = input.readFloat();\r\n                data.mixY = input.readFloat();\r\n                data.mixScaleX = input.readFloat();\r\n                data.mixScaleY = input.readFloat();\r\n                data.mixShearY = input.readFloat();\r\n                skeletonData.transformConstraints.push(data);\r\n            }\r\n            // Path constraints.\r\n            n = input.readInt(true);\r\n            for (var i = 0, nn = void 0; i < n; i++) {\r\n                var data = new PathConstraintData(input.readString());\r\n                data.order = input.readInt(true);\r\n                data.skinRequired = input.readBoolean();\r\n                nn = input.readInt(true);\r\n                for (var ii = 0; ii < nn; ii++)\r\n                    data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n                data.target = skeletonData.slots[input.readInt(true)];\r\n                data.positionMode = input.readInt(true);\r\n                data.spacingMode = input.readInt(true);\r\n                data.rotateMode = input.readInt(true);\r\n                data.offsetRotation = input.readFloat();\r\n                data.position = input.readFloat();\r\n                if (data.positionMode == exports.PositionMode.Fixed)\r\n                    data.position *= scale;\r\n                data.spacing = input.readFloat();\r\n                if (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed)\r\n                    data.spacing *= scale;\r\n                data.mixRotate = input.readFloat();\r\n                data.mixX = input.readFloat();\r\n                data.mixY = input.readFloat();\r\n                skeletonData.pathConstraints.push(data);\r\n            }\r\n            // Default skin.\r\n            var defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\r\n            if (defaultSkin) {\r\n                skeletonData.defaultSkin = defaultSkin;\r\n                skeletonData.skins.push(defaultSkin);\r\n            }\r\n            // Skins.\r\n            {\r\n                var i = skeletonData.skins.length;\r\n                Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\r\n                for (; i < n; i++)\r\n                    skeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential);\r\n            }\r\n            // Linked meshes.\r\n            n = this.linkedMeshes.length;\r\n            for (var i = 0; i < n; i++) {\r\n                var linkedMesh = this.linkedMeshes[i];\r\n                var skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n                var parent_2 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n                linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_2 : linkedMesh.mesh;\r\n                linkedMesh.mesh.setParentMesh(parent_2);\r\n                // linkedMesh.mesh.updateUVs();\r\n            }\r\n            this.linkedMeshes.length = 0;\r\n            // Events.\r\n            n = input.readInt(true);\r\n            for (var i = 0; i < n; i++) {\r\n                var data = new EventData(input.readStringRef());\r\n                data.intValue = input.readInt(false);\r\n                data.floatValue = input.readFloat();\r\n                data.stringValue = input.readString();\r\n                data.audioPath = input.readString();\r\n                if (data.audioPath) {\r\n                    data.volume = input.readFloat();\r\n                    data.balance = input.readFloat();\r\n                }\r\n                skeletonData.events.push(data);\r\n            }\r\n            // Animations.\r\n            n = input.readInt(true);\r\n            for (var i = 0; i < n; i++)\r\n                skeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData));\r\n            return skeletonData;\r\n        };\r\n        SkeletonBinary.prototype.readSkin = function (input, skeletonData, defaultSkin, nonessential) {\r\n            var skin = null;\r\n            var slotCount = 0;\r\n            if (defaultSkin) {\r\n                slotCount = input.readInt(true);\r\n                if (slotCount == 0)\r\n                    return null;\r\n                skin = new Skin(\"default\");\r\n            }\r\n            else {\r\n                skin = new Skin(input.readStringRef());\r\n                skin.bones.length = input.readInt(true);\r\n                for (var i = 0, n = skin.bones.length; i < n; i++)\r\n                    skin.bones[i] = skeletonData.bones[input.readInt(true)];\r\n                for (var i = 0, n = input.readInt(true); i < n; i++)\r\n                    skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\r\n                for (var i = 0, n = input.readInt(true); i < n; i++)\r\n                    skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\r\n                for (var i = 0, n = input.readInt(true); i < n; i++)\r\n                    skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\r\n                slotCount = input.readInt(true);\r\n            }\r\n            for (var i = 0; i < slotCount; i++) {\r\n                var slotIndex = input.readInt(true);\r\n                for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n                    var name_2 = input.readStringRef();\r\n                    var attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name_2, nonessential);\r\n                    if (attachment)\r\n                        skin.setAttachment(slotIndex, name_2, attachment);\r\n                }\r\n            }\r\n            return skin;\r\n        };\r\n        SkeletonBinary.prototype.readAttachment = function (input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\r\n            var scale = this.scale;\r\n            var name = input.readStringRef();\r\n            if (!name)\r\n                name = attachmentName;\r\n            switch (input.readByte()) {\r\n                case exports.AttachmentType.Region: {\r\n                    var path = input.readStringRef();\r\n                    var rotation = input.readFloat();\r\n                    var x = input.readFloat();\r\n                    var y = input.readFloat();\r\n                    var scaleX = input.readFloat();\r\n                    var scaleY = input.readFloat();\r\n                    var width = input.readFloat();\r\n                    var height = input.readFloat();\r\n                    var color = input.readInt32();\r\n                    if (!path)\r\n                        path = name;\r\n                    var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n                    if (!region)\r\n                        return null;\r\n                    region.path = path;\r\n                    region.x = x * scale;\r\n                    region.y = y * scale;\r\n                    region.scaleX = scaleX;\r\n                    region.scaleY = scaleY;\r\n                    region.rotation = rotation;\r\n                    region.width = width * scale;\r\n                    region.height = height * scale;\r\n                    Color.rgba8888ToColor(region.color, color);\r\n                    // region.updateOffset();\r\n                    return region;\r\n                }\r\n                case exports.AttachmentType.BoundingBox: {\r\n                    var vertexCount = input.readInt(true);\r\n                    var vertices = this.readVertices(input, vertexCount);\r\n                    var color = nonessential ? input.readInt32() : 0;\r\n                    var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n                    if (!box)\r\n                        return null;\r\n                    box.worldVerticesLength = vertexCount << 1;\r\n                    box.vertices = vertices.vertices;\r\n                    box.bones = vertices.bones;\r\n                    if (nonessential)\r\n                        Color.rgba8888ToColor(box.color, color);\r\n                    return box;\r\n                }\r\n                case exports.AttachmentType.Mesh: {\r\n                    var path = input.readStringRef();\r\n                    var color = input.readInt32();\r\n                    var vertexCount = input.readInt(true);\r\n                    var uvs = this.readFloatArray(input, vertexCount << 1, 1);\r\n                    var triangles = this.readShortArray(input);\r\n                    var vertices = this.readVertices(input, vertexCount);\r\n                    var hullLength = input.readInt(true);\r\n                    var edges = null;\r\n                    var width = 0, height = 0;\r\n                    if (nonessential) {\r\n                        edges = this.readShortArray(input);\r\n                        width = input.readFloat();\r\n                        height = input.readFloat();\r\n                    }\r\n                    if (!path)\r\n                        path = name;\r\n                    var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n                    if (!mesh)\r\n                        return null;\r\n                    mesh.path = path;\r\n                    Color.rgba8888ToColor(mesh.color, color);\r\n                    mesh.bones = vertices.bones;\r\n                    mesh.vertices = vertices.vertices;\r\n                    mesh.worldVerticesLength = vertexCount << 1;\r\n                    mesh.triangles = triangles;\r\n                    mesh.regionUVs = new Float32Array(uvs);\r\n                    // mesh.updateUVs();\r\n                    mesh.hullLength = hullLength << 1;\r\n                    if (nonessential) {\r\n                        mesh.edges = edges;\r\n                        mesh.width = width * scale;\r\n                        mesh.height = height * scale;\r\n                    }\r\n                    return mesh;\r\n                }\r\n                case exports.AttachmentType.LinkedMesh: {\r\n                    var path = input.readStringRef();\r\n                    var color = input.readInt32();\r\n                    var skinName = input.readStringRef();\r\n                    var parent_3 = input.readStringRef();\r\n                    var inheritDeform = input.readBoolean();\r\n                    var width = 0, height = 0;\r\n                    if (nonessential) {\r\n                        width = input.readFloat();\r\n                        height = input.readFloat();\r\n                    }\r\n                    if (!path)\r\n                        path = name;\r\n                    var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n                    if (!mesh)\r\n                        return null;\r\n                    mesh.path = path;\r\n                    Color.rgba8888ToColor(mesh.color, color);\r\n                    if (nonessential) {\r\n                        mesh.width = width * scale;\r\n                        mesh.height = height * scale;\r\n                    }\r\n                    this.linkedMeshes.push(new LinkedMesh$1(mesh, skinName, slotIndex, parent_3, inheritDeform));\r\n                    return mesh;\r\n                }\r\n                case exports.AttachmentType.Path: {\r\n                    var closed_1 = input.readBoolean();\r\n                    var constantSpeed = input.readBoolean();\r\n                    var vertexCount = input.readInt(true);\r\n                    var vertices = this.readVertices(input, vertexCount);\r\n                    var lengths = Utils.newArray(vertexCount / 3, 0);\r\n                    for (var i = 0, n = lengths.length; i < n; i++)\r\n                        lengths[i] = input.readFloat() * scale;\r\n                    var color = nonessential ? input.readInt32() : 0;\r\n                    var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n                    if (!path)\r\n                        return null;\r\n                    path.closed = closed_1;\r\n                    path.constantSpeed = constantSpeed;\r\n                    path.worldVerticesLength = vertexCount << 1;\r\n                    path.vertices = vertices.vertices;\r\n                    path.bones = vertices.bones;\r\n                    path.lengths = lengths;\r\n                    if (nonessential)\r\n                        Color.rgba8888ToColor(path.color, color);\r\n                    return path;\r\n                }\r\n                case exports.AttachmentType.Point: {\r\n                    var rotation = input.readFloat();\r\n                    var x = input.readFloat();\r\n                    var y = input.readFloat();\r\n                    var color = nonessential ? input.readInt32() : 0;\r\n                    var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n                    if (!point)\r\n                        return null;\r\n                    point.x = x * scale;\r\n                    point.y = y * scale;\r\n                    point.rotation = rotation;\r\n                    if (nonessential)\r\n                        Color.rgba8888ToColor(point.color, color);\r\n                    return point;\r\n                }\r\n                case exports.AttachmentType.Clipping: {\r\n                    var endSlotIndex = input.readInt(true);\r\n                    var vertexCount = input.readInt(true);\r\n                    var vertices = this.readVertices(input, vertexCount);\r\n                    var color = nonessential ? input.readInt32() : 0;\r\n                    var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n                    if (!clip)\r\n                        return null;\r\n                    clip.endSlot = skeletonData.slots[endSlotIndex];\r\n                    clip.worldVerticesLength = vertexCount << 1;\r\n                    clip.vertices = vertices.vertices;\r\n                    clip.bones = vertices.bones;\r\n                    if (nonessential)\r\n                        Color.rgba8888ToColor(clip.color, color);\r\n                    return clip;\r\n                }\r\n            }\r\n            return null;\r\n        };\r\n        SkeletonBinary.prototype.readVertices = function (input, vertexCount) {\r\n            var scale = this.scale;\r\n            var verticesLength = vertexCount << 1;\r\n            var vertices = new Vertices();\r\n            if (!input.readBoolean()) {\r\n                vertices.vertices = this.readFloatArray(input, verticesLength, scale);\r\n                return vertices;\r\n            }\r\n            var weights = new Array();\r\n            var bonesArray = new Array();\r\n            for (var i = 0; i < vertexCount; i++) {\r\n                var boneCount = input.readInt(true);\r\n                bonesArray.push(boneCount);\r\n                for (var ii = 0; ii < boneCount; ii++) {\r\n                    bonesArray.push(input.readInt(true));\r\n                    weights.push(input.readFloat() * scale);\r\n                    weights.push(input.readFloat() * scale);\r\n                    weights.push(input.readFloat());\r\n                }\r\n            }\r\n            vertices.vertices = Utils.toFloatArray(weights);\r\n            vertices.bones = bonesArray;\r\n            return vertices;\r\n        };\r\n        SkeletonBinary.prototype.readFloatArray = function (input, n, scale) {\r\n            var array = new Array(n);\r\n            if (scale == 1) {\r\n                for (var i = 0; i < n; i++)\r\n                    array[i] = input.readFloat();\r\n            }\r\n            else {\r\n                for (var i = 0; i < n; i++)\r\n                    array[i] = input.readFloat() * scale;\r\n            }\r\n            return array;\r\n        };\r\n        SkeletonBinary.prototype.readShortArray = function (input) {\r\n            var n = input.readInt(true);\r\n            var array = new Array(n);\r\n            for (var i = 0; i < n; i++)\r\n                array[i] = input.readShort();\r\n            return array;\r\n        };\r\n        SkeletonBinary.prototype.readAnimation = function (input, name, skeletonData) {\r\n            input.readInt(true); // Number of timelines.\r\n            var timelines = new Array();\r\n            var scale = this.scale;\r\n            // Slot timelines.\r\n            for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n                var slotIndex = input.readInt(true);\r\n                for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n                    var timelineType = input.readByte();\r\n                    var frameCount = input.readInt(true);\r\n                    var frameLast = frameCount - 1;\r\n                    switch (timelineType) {\r\n                        case SLOT_ATTACHMENT: {\r\n                            var timeline = new AttachmentTimeline(frameCount, slotIndex);\r\n                            for (var frame = 0; frame < frameCount; frame++)\r\n                                timeline.setFrame(frame, input.readFloat(), input.readStringRef());\r\n                            timelines.push(timeline);\r\n                            break;\r\n                        }\r\n                        case SLOT_RGBA: {\r\n                            var bezierCount = input.readInt(true);\r\n                            var timeline = new RGBATimeline(frameCount, bezierCount, slotIndex);\r\n                            var time = input.readFloat();\r\n                            var r = input.readUnsignedByte() / 255.0;\r\n                            var g = input.readUnsignedByte() / 255.0;\r\n                            var b = input.readUnsignedByte() / 255.0;\r\n                            var a = input.readUnsignedByte() / 255.0;\r\n                            for (var frame = 0, bezier = 0;; frame++) {\r\n                                timeline.setFrame(frame, time, r, g, b, a);\r\n                                if (frame == frameLast)\r\n                                    break;\r\n                                var time2 = input.readFloat();\r\n                                var r2 = input.readUnsignedByte() / 255.0;\r\n                                var g2 = input.readUnsignedByte() / 255.0;\r\n                                var b2 = input.readUnsignedByte() / 255.0;\r\n                                var a2 = input.readUnsignedByte() / 255.0;\r\n                                switch (input.readByte()) {\r\n                                    case CURVE_STEPPED:\r\n                                        timeline.setStepped(frame);\r\n                                        break;\r\n                                    case CURVE_BEZIER:\r\n                                        setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\r\n                                        setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\r\n                                        setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\r\n                                        setBezier(input, timeline, bezier++, frame, 3, time, time2, a, a2, 1);\r\n                                }\r\n                                time = time2;\r\n                                r = r2;\r\n                                g = g2;\r\n                                b = b2;\r\n                                a = a2;\r\n                            }\r\n                            timelines.push(timeline);\r\n                            break;\r\n                        }\r\n                        case SLOT_RGB: {\r\n                            var bezierCount = input.readInt(true);\r\n                            var timeline = new RGBTimeline(frameCount, bezierCount, slotIndex);\r\n                            var time = input.readFloat();\r\n                            var r = input.readUnsignedByte() / 255.0;\r\n                            var g = input.readUnsignedByte() / 255.0;\r\n                            var b = input.readUnsignedByte() / 255.0;\r\n                            for (var frame = 0, bezier = 0;; frame++) {\r\n                                timeline.setFrame(frame, time, r, g, b);\r\n                                if (frame == frameLast)\r\n                                    break;\r\n                                var time2 = input.readFloat();\r\n                                var r2 = input.readUnsignedByte() / 255.0;\r\n                                var g2 = input.readUnsignedByte() / 255.0;\r\n                                var b2 = input.readUnsignedByte() / 255.0;\r\n                                switch (input.readByte()) {\r\n                                    case CURVE_STEPPED:\r\n                                        timeline.setStepped(frame);\r\n                                        break;\r\n                                    case CURVE_BEZIER:\r\n                                        setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\r\n                                        setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\r\n                                        setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\r\n                                }\r\n                                time = time2;\r\n                                r = r2;\r\n                                g = g2;\r\n                                b = b2;\r\n                            }\r\n                            timelines.push(timeline);\r\n                            break;\r\n                        }\r\n                        case SLOT_RGBA2: {\r\n                            var bezierCount = input.readInt(true);\r\n                            var timeline = new RGBA2Timeline(frameCount, bezierCount, slotIndex);\r\n                            var time = input.readFloat();\r\n                            var r = input.readUnsignedByte() / 255.0;\r\n                            var g = input.readUnsignedByte() / 255.0;\r\n                            var b = input.readUnsignedByte() / 255.0;\r\n                            var a = input.readUnsignedByte() / 255.0;\r\n                            var r2 = input.readUnsignedByte() / 255.0;\r\n                            var g2 = input.readUnsignedByte() / 255.0;\r\n                            var b2 = input.readUnsignedByte() / 255.0;\r\n                            for (var frame = 0, bezier = 0;; frame++) {\r\n                                timeline.setFrame(frame, time, r, g, b, a, r2, g2, b2);\r\n                                if (frame == frameLast)\r\n                                    break;\r\n                                var time2 = input.readFloat();\r\n                                var nr = input.readUnsignedByte() / 255.0;\r\n                                var ng = input.readUnsignedByte() / 255.0;\r\n                                var nb = input.readUnsignedByte() / 255.0;\r\n                                var na = input.readUnsignedByte() / 255.0;\r\n                                var nr2 = input.readUnsignedByte() / 255.0;\r\n                                var ng2 = input.readUnsignedByte() / 255.0;\r\n                                var nb2 = input.readUnsignedByte() / 255.0;\r\n                                switch (input.readByte()) {\r\n                                    case CURVE_STEPPED:\r\n                                        timeline.setStepped(frame);\r\n                                        break;\r\n                                    case CURVE_BEZIER:\r\n                                        setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\r\n                                        setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\r\n                                        setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\r\n                                        setBezier(input, timeline, bezier++, frame, 3, time, time2, a, na, 1);\r\n                                        setBezier(input, timeline, bezier++, frame, 4, time, time2, r2, nr2, 1);\r\n                                        setBezier(input, timeline, bezier++, frame, 5, time, time2, g2, ng2, 1);\r\n                                        setBezier(input, timeline, bezier++, frame, 6, time, time2, b2, nb2, 1);\r\n                                }\r\n                                time = time2;\r\n                                r = nr;\r\n                                g = ng;\r\n                                b = nb;\r\n                                a = na;\r\n                                r2 = nr2;\r\n                                g2 = ng2;\r\n                                b2 = nb2;\r\n                            }\r\n                            timelines.push(timeline);\r\n                            break;\r\n                        }\r\n                        case SLOT_RGB2: {\r\n                            var bezierCount = input.readInt(true);\r\n                            var timeline = new RGB2Timeline(frameCount, bezierCount, slotIndex);\r\n                            var time = input.readFloat();\r\n                            var r = input.readUnsignedByte() / 255.0;\r\n                            var g = input.readUnsignedByte() / 255.0;\r\n                            var b = input.readUnsignedByte() / 255.0;\r\n                            var r2 = input.readUnsignedByte() / 255.0;\r\n                            var g2 = input.readUnsignedByte() / 255.0;\r\n                            var b2 = input.readUnsignedByte() / 255.0;\r\n                            for (var frame = 0, bezier = 0;; frame++) {\r\n                                timeline.setFrame(frame, time, r, g, b, r2, g2, b2);\r\n                                if (frame == frameLast)\r\n                                    break;\r\n                                var time2 = input.readFloat();\r\n                                var nr = input.readUnsignedByte() / 255.0;\r\n                                var ng = input.readUnsignedByte() / 255.0;\r\n                                var nb = input.readUnsignedByte() / 255.0;\r\n                                var nr2 = input.readUnsignedByte() / 255.0;\r\n                                var ng2 = input.readUnsignedByte() / 255.0;\r\n                                var nb2 = input.readUnsignedByte() / 255.0;\r\n                                switch (input.readByte()) {\r\n                                    case CURVE_STEPPED:\r\n                                        timeline.setStepped(frame);\r\n                                        break;\r\n                                    case CURVE_BEZIER:\r\n                                        setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\r\n                                        setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\r\n                                        setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\r\n                                        setBezier(input, timeline, bezier++, frame, 3, time, time2, r2, nr2, 1);\r\n                                        setBezier(input, timeline, bezier++, frame, 4, time, time2, g2, ng2, 1);\r\n                                        setBezier(input, timeline, bezier++, frame, 5, time, time2, b2, nb2, 1);\r\n                                }\r\n                                time = time2;\r\n                                r = nr;\r\n                                g = ng;\r\n                                b = nb;\r\n                                r2 = nr2;\r\n                                g2 = ng2;\r\n                                b2 = nb2;\r\n                            }\r\n                            timelines.push(timeline);\r\n                            break;\r\n                        }\r\n                        case SLOT_ALPHA: {\r\n                            var timeline = new AlphaTimeline(frameCount, input.readInt(true), slotIndex);\r\n                            var time = input.readFloat(), a = input.readUnsignedByte() / 255;\r\n                            for (var frame = 0, bezier = 0;; frame++) {\r\n                                timeline.setFrame(frame, time, a);\r\n                                if (frame == frameLast)\r\n                                    break;\r\n                                var time2 = input.readFloat();\r\n                                var a2 = input.readUnsignedByte() / 255;\r\n                                switch (input.readByte()) {\r\n                                    case CURVE_STEPPED:\r\n                                        timeline.setStepped(frame);\r\n                                        break;\r\n                                    case CURVE_BEZIER:\r\n                                        setBezier(input, timeline, bezier++, frame, 0, time, time2, a, a2, 1);\r\n                                }\r\n                                time = time2;\r\n                                a = a2;\r\n                            }\r\n                            timelines.push(timeline);\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            // Bone timelines.\r\n            for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n                var boneIndex = input.readInt(true);\r\n                for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n                    var type = input.readByte(), frameCount = input.readInt(true), bezierCount = input.readInt(true);\r\n                    switch (type) {\r\n                        case BONE_ROTATE:\r\n                            timelines.push(readTimeline1$1(input, new RotateTimeline(frameCount, bezierCount, boneIndex), 1));\r\n                            break;\r\n                        case BONE_TRANSLATE:\r\n                            timelines.push(readTimeline2$1(input, new TranslateTimeline(frameCount, bezierCount, boneIndex), scale));\r\n                            break;\r\n                        case BONE_TRANSLATEX:\r\n                            timelines.push(readTimeline1$1(input, new TranslateXTimeline(frameCount, bezierCount, boneIndex), scale));\r\n                            break;\r\n                        case BONE_TRANSLATEY:\r\n                            timelines.push(readTimeline1$1(input, new TranslateYTimeline(frameCount, bezierCount, boneIndex), scale));\r\n                            break;\r\n                        case BONE_SCALE:\r\n                            timelines.push(readTimeline2$1(input, new ScaleTimeline(frameCount, bezierCount, boneIndex), 1));\r\n                            break;\r\n                        case BONE_SCALEX:\r\n                            timelines.push(readTimeline1$1(input, new ScaleXTimeline(frameCount, bezierCount, boneIndex), 1));\r\n                            break;\r\n                        case BONE_SCALEY:\r\n                            timelines.push(readTimeline1$1(input, new ScaleYTimeline(frameCount, bezierCount, boneIndex), 1));\r\n                            break;\r\n                        case BONE_SHEAR:\r\n                            timelines.push(readTimeline2$1(input, new ShearTimeline(frameCount, bezierCount, boneIndex), 1));\r\n                            break;\r\n                        case BONE_SHEARX:\r\n                            timelines.push(readTimeline1$1(input, new ShearXTimeline(frameCount, bezierCount, boneIndex), 1));\r\n                            break;\r\n                        case BONE_SHEARY:\r\n                            timelines.push(readTimeline1$1(input, new ShearYTimeline(frameCount, bezierCount, boneIndex), 1));\r\n                    }\r\n                }\r\n            }\r\n            // IK constraint timelines.\r\n            for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n                var index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\r\n                var timeline = new IkConstraintTimeline(frameCount, input.readInt(true), index);\r\n                var time = input.readFloat(), mix = input.readFloat(), softness = input.readFloat() * scale;\r\n                for (var frame = 0, bezier = 0;; frame++) {\r\n                    timeline.setFrame(frame, time, mix, softness, input.readByte(), input.readBoolean(), input.readBoolean());\r\n                    if (frame == frameLast)\r\n                        break;\r\n                    var time2 = input.readFloat(), mix2 = input.readFloat(), softness2 = input.readFloat() * scale;\r\n                    switch (input.readByte()) {\r\n                        case CURVE_STEPPED:\r\n                            timeline.setStepped(frame);\r\n                            break;\r\n                        case CURVE_BEZIER:\r\n                            setBezier(input, timeline, bezier++, frame, 0, time, time2, mix, mix2, 1);\r\n                            setBezier(input, timeline, bezier++, frame, 1, time, time2, softness, softness2, scale);\r\n                    }\r\n                    time = time2;\r\n                    mix = mix2;\r\n                    softness = softness2;\r\n                }\r\n                timelines.push(timeline);\r\n            }\r\n            // Transform constraint timelines.\r\n            for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n                var index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\r\n                var timeline = new TransformConstraintTimeline(frameCount, input.readInt(true), index);\r\n                var time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat(), mixScaleX = input.readFloat(), mixScaleY = input.readFloat(), mixShearY = input.readFloat();\r\n                for (var frame = 0, bezier = 0;; frame++) {\r\n                    timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\r\n                    if (frame == frameLast)\r\n                        break;\r\n                    var time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat(), mixScaleX2 = input.readFloat(), mixScaleY2 = input.readFloat(), mixShearY2 = input.readFloat();\r\n                    switch (input.readByte()) {\r\n                        case CURVE_STEPPED:\r\n                            timeline.setStepped(frame);\r\n                            break;\r\n                        case CURVE_BEZIER:\r\n                            setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\r\n                            setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\r\n                            setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\r\n                            setBezier(input, timeline, bezier++, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\r\n                            setBezier(input, timeline, bezier++, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\r\n                            setBezier(input, timeline, bezier++, frame, 5, time, time2, mixShearY, mixShearY2, 1);\r\n                    }\r\n                    time = time2;\r\n                    mixRotate = mixRotate2;\r\n                    mixX = mixX2;\r\n                    mixY = mixY2;\r\n                    mixScaleX = mixScaleX2;\r\n                    mixScaleY = mixScaleY2;\r\n                    mixShearY = mixShearY2;\r\n                }\r\n                timelines.push(timeline);\r\n            }\r\n            // Path constraint timelines.\r\n            for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n                var index = input.readInt(true);\r\n                var data = skeletonData.pathConstraints[index];\r\n                for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n                    switch (input.readByte()) {\r\n                        case PATH_POSITION:\r\n                            timelines\r\n                                .push(readTimeline1$1(input, new PathConstraintPositionTimeline(input.readInt(true), input.readInt(true), index), data.positionMode == exports.PositionMode.Fixed ? scale : 1));\r\n                            break;\r\n                        case PATH_SPACING:\r\n                            timelines\r\n                                .push(readTimeline1$1(input, new PathConstraintSpacingTimeline(input.readInt(true), input.readInt(true), index), data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed ? scale : 1));\r\n                            break;\r\n                        case PATH_MIX:\r\n                            var timeline = new PathConstraintMixTimeline(input.readInt(true), input.readInt(true), index);\r\n                            var time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat();\r\n                            for (var frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1;; frame++) {\r\n                                timeline.setFrame(frame, time, mixRotate, mixX, mixY);\r\n                                if (frame == frameLast)\r\n                                    break;\r\n                                var time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat();\r\n                                switch (input.readByte()) {\r\n                                    case CURVE_STEPPED:\r\n                                        timeline.setStepped(frame);\r\n                                        break;\r\n                                    case CURVE_BEZIER:\r\n                                        setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\r\n                                        setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\r\n                                        setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\r\n                                }\r\n                                time = time2;\r\n                                mixRotate = mixRotate2;\r\n                                mixX = mixX2;\r\n                                mixY = mixY2;\r\n                            }\r\n                            timelines.push(timeline);\r\n                    }\r\n                }\r\n            }\r\n            // Deform timelines.\r\n            for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n                var skin = skeletonData.skins[input.readInt(true)];\r\n                for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n                    var slotIndex = input.readInt(true);\r\n                    for (var iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\r\n                        var attachmentName = input.readStringRef();\r\n                        var attachment = skin.getAttachment(slotIndex, attachmentName);\r\n                        var weighted = attachment.bones;\r\n                        var vertices = attachment.vertices;\r\n                        var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n                        var frameCount = input.readInt(true);\r\n                        var frameLast = frameCount - 1;\r\n                        var bezierCount = input.readInt(true);\r\n                        var timeline = new DeformTimeline(frameCount, bezierCount, slotIndex, attachment);\r\n                        var time = input.readFloat();\r\n                        for (var frame = 0, bezier = 0;; frame++) {\r\n                            var deform = void 0;\r\n                            var end = input.readInt(true);\r\n                            if (end == 0)\r\n                                deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\r\n                            else {\r\n                                deform = Utils.newFloatArray(deformLength);\r\n                                var start = input.readInt(true);\r\n                                end += start;\r\n                                if (scale == 1) {\r\n                                    for (var v = start; v < end; v++)\r\n                                        deform[v] = input.readFloat();\r\n                                }\r\n                                else {\r\n                                    for (var v = start; v < end; v++)\r\n                                        deform[v] = input.readFloat() * scale;\r\n                                }\r\n                                if (!weighted) {\r\n                                    for (var v = 0, vn = deform.length; v < vn; v++)\r\n                                        deform[v] += vertices[v];\r\n                                }\r\n                            }\r\n                            timeline.setFrame(frame, time, deform);\r\n                            if (frame == frameLast)\r\n                                break;\r\n                            var time2 = input.readFloat();\r\n                            switch (input.readByte()) {\r\n                                case CURVE_STEPPED:\r\n                                    timeline.setStepped(frame);\r\n                                    break;\r\n                                case CURVE_BEZIER:\r\n                                    setBezier(input, timeline, bezier++, frame, 0, time, time2, 0, 1, 1);\r\n                            }\r\n                            time = time2;\r\n                        }\r\n                        timelines.push(timeline);\r\n                    }\r\n                }\r\n            }\r\n            // Draw order timeline.\r\n            var drawOrderCount = input.readInt(true);\r\n            if (drawOrderCount > 0) {\r\n                var timeline = new DrawOrderTimeline(drawOrderCount);\r\n                var slotCount = skeletonData.slots.length;\r\n                for (var i = 0; i < drawOrderCount; i++) {\r\n                    var time = input.readFloat();\r\n                    var offsetCount = input.readInt(true);\r\n                    var drawOrder = Utils.newArray(slotCount, 0);\r\n                    for (var ii = slotCount - 1; ii >= 0; ii--)\r\n                        drawOrder[ii] = -1;\r\n                    var unchanged = Utils.newArray(slotCount - offsetCount, 0);\r\n                    var originalIndex = 0, unchangedIndex = 0;\r\n                    for (var ii = 0; ii < offsetCount; ii++) {\r\n                        var slotIndex = input.readInt(true);\r\n                        // Collect unchanged items.\r\n                        while (originalIndex != slotIndex)\r\n                            unchanged[unchangedIndex++] = originalIndex++;\r\n                        // Set changed items.\r\n                        drawOrder[originalIndex + input.readInt(true)] = originalIndex++;\r\n                    }\r\n                    // Collect remaining unchanged items.\r\n                    while (originalIndex < slotCount)\r\n                        unchanged[unchangedIndex++] = originalIndex++;\r\n                    // Fill in unchanged items.\r\n                    for (var ii = slotCount - 1; ii >= 0; ii--)\r\n                        if (drawOrder[ii] == -1)\r\n                            drawOrder[ii] = unchanged[--unchangedIndex];\r\n                    timeline.setFrame(i, time, drawOrder);\r\n                }\r\n                timelines.push(timeline);\r\n            }\r\n            // Event timeline.\r\n            var eventCount = input.readInt(true);\r\n            if (eventCount > 0) {\r\n                var timeline = new EventTimeline(eventCount);\r\n                for (var i = 0; i < eventCount; i++) {\r\n                    var time = input.readFloat();\r\n                    var eventData = skeletonData.events[input.readInt(true)];\r\n                    var event_1 = new Event(time, eventData);\r\n                    event_1.intValue = input.readInt(false);\r\n                    event_1.floatValue = input.readFloat();\r\n                    event_1.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\r\n                    if (event_1.data.audioPath) {\r\n                        event_1.volume = input.readFloat();\r\n                        event_1.balance = input.readFloat();\r\n                    }\r\n                    timeline.setFrame(i, event_1);\r\n                }\r\n                timelines.push(timeline);\r\n            }\r\n            var duration = 0;\r\n            for (var i = 0, n = timelines.length; i < n; i++)\r\n                duration = Math.max(duration, timelines[i].getDuration());\r\n            return new Animation(name, timelines, duration);\r\n        };\r\n        SkeletonBinary.BlendModeValues = [constants.BLEND_MODES.NORMAL, constants.BLEND_MODES.ADD, constants.BLEND_MODES.MULTIPLY, constants.BLEND_MODES.SCREEN];\r\n        return SkeletonBinary;\r\n    }());\r\n    var LinkedMesh$1 = /** @class */ (function () {\r\n        function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n            this.mesh = mesh;\r\n            this.skin = skin;\r\n            this.slotIndex = slotIndex;\r\n            this.parent = parent;\r\n            this.inheritDeform = inheritDeform;\r\n        }\r\n        return LinkedMesh;\r\n    }());\r\n    var Vertices = /** @class */ (function () {\r\n        function Vertices(bones, vertices) {\r\n            if (bones === void 0) { bones = null; }\r\n            if (vertices === void 0) { vertices = null; }\r\n            this.bones = bones;\r\n            this.vertices = vertices;\r\n        }\r\n        return Vertices;\r\n    }());\r\n    function readTimeline1$1(input, timeline, scale) {\r\n        var time = input.readFloat(), value = input.readFloat() * scale;\r\n        for (var frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1;; frame++) {\r\n            timeline.setFrame(frame, time, value);\r\n            if (frame == frameLast)\r\n                break;\r\n            var time2 = input.readFloat(), value2 = input.readFloat() * scale;\r\n            switch (input.readByte()) {\r\n                case CURVE_STEPPED:\r\n                    timeline.setStepped(frame);\r\n                    break;\r\n                case CURVE_BEZIER:\r\n                    setBezier(input, timeline, bezier++, frame, 0, time, time2, value, value2, scale);\r\n            }\r\n            time = time2;\r\n            value = value2;\r\n        }\r\n        return timeline;\r\n    }\r\n    function readTimeline2$1(input, timeline, scale) {\r\n        var time = input.readFloat(), value1 = input.readFloat() * scale, value2 = input.readFloat() * scale;\r\n        for (var frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1;; frame++) {\r\n            timeline.setFrame(frame, time, value1, value2);\r\n            if (frame == frameLast)\r\n                break;\r\n            var time2 = input.readFloat(), nvalue1 = input.readFloat() * scale, nvalue2 = input.readFloat() * scale;\r\n            switch (input.readByte()) {\r\n                case CURVE_STEPPED:\r\n                    timeline.setStepped(frame);\r\n                    break;\r\n                case CURVE_BEZIER:\r\n                    setBezier(input, timeline, bezier++, frame, 0, time, time2, value1, nvalue1, scale);\r\n                    setBezier(input, timeline, bezier++, frame, 1, time, time2, value2, nvalue2, scale);\r\n            }\r\n            time = time2;\r\n            value1 = nvalue1;\r\n            value2 = nvalue2;\r\n        }\r\n        return timeline;\r\n    }\r\n    function setBezier(input, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\r\n        timeline.setBezier(bezier, frame, value, time1, value1, input.readFloat(), input.readFloat() * scale, input.readFloat(), input.readFloat() * scale, time2, value2);\r\n    }\r\n    var BONE_ROTATE = 0;\r\n    var BONE_TRANSLATE = 1;\r\n    var BONE_TRANSLATEX = 2;\r\n    var BONE_TRANSLATEY = 3;\r\n    var BONE_SCALE = 4;\r\n    var BONE_SCALEX = 5;\r\n    var BONE_SCALEY = 6;\r\n    var BONE_SHEAR = 7;\r\n    var BONE_SHEARX = 8;\r\n    var BONE_SHEARY = 9;\r\n    var SLOT_ATTACHMENT = 0;\r\n    var SLOT_RGBA = 1;\r\n    var SLOT_RGB = 2;\r\n    var SLOT_RGBA2 = 3;\r\n    var SLOT_RGB2 = 4;\r\n    var SLOT_ALPHA = 5;\r\n    var PATH_POSITION = 0;\r\n    var PATH_SPACING = 1;\r\n    var PATH_MIX = 2;\r\n    var CURVE_STEPPED = 1;\r\n    var CURVE_BEZIER = 2;\n\n    /** Collects each visible {@link BoundingBoxAttachment} and computes the world vertices for its polygon. The polygon vertices are\r\n     * provided along with convenience methods for doing hit detection.\r\n     * @public\r\n     * */\r\n    var SkeletonBounds = /** @class */ (function () {\r\n        function SkeletonBounds() {\r\n            /** The left edge of the axis aligned bounding box. */\r\n            this.minX = 0;\r\n            /** The bottom edge of the axis aligned bounding box. */\r\n            this.minY = 0;\r\n            /** The right edge of the axis aligned bounding box. */\r\n            this.maxX = 0;\r\n            /** The top edge of the axis aligned bounding box. */\r\n            this.maxY = 0;\r\n            /** The visible bounding boxes. */\r\n            this.boundingBoxes = new Array();\r\n            /** The world vertices for the bounding box polygons. */\r\n            this.polygons = new Array();\r\n            this.polygonPool = new Pool(function () {\r\n                return Utils.newFloatArray(16);\r\n            });\r\n        }\r\n        /** Clears any previous polygons, finds all visible bounding box attachments, and computes the world vertices for each bounding\r\n         * box's polygon.\r\n         * @param updateAabb If true, the axis aligned bounding box containing all the polygons is computed. If false, the\r\n         *           SkeletonBounds AABB methods will always return true. */\r\n        SkeletonBounds.prototype.update = function (skeleton, updateAabb) {\r\n            if (skeleton == null)\r\n                throw new Error(\"skeleton cannot be null.\");\r\n            var boundingBoxes = this.boundingBoxes;\r\n            var polygons = this.polygons;\r\n            var polygonPool = this.polygonPool;\r\n            var slots = skeleton.slots;\r\n            var slotCount = slots.length;\r\n            boundingBoxes.length = 0;\r\n            polygonPool.freeAll(polygons);\r\n            polygons.length = 0;\r\n            for (var i = 0; i < slotCount; i++) {\r\n                var slot = slots[i];\r\n                if (!slot.bone.active)\r\n                    continue;\r\n                var attachment = slot.getAttachment();\r\n                if (attachment instanceof BoundingBoxAttachment) {\r\n                    var boundingBox = attachment;\r\n                    boundingBoxes.push(boundingBox);\r\n                    var polygon = polygonPool.obtain();\r\n                    if (polygon.length != boundingBox.worldVerticesLength) {\r\n                        polygon = Utils.newFloatArray(boundingBox.worldVerticesLength);\r\n                    }\r\n                    polygons.push(polygon);\r\n                    boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\r\n                }\r\n            }\r\n            if (updateAabb) {\r\n                this.aabbCompute();\r\n            }\r\n            else {\r\n                this.minX = Number.POSITIVE_INFINITY;\r\n                this.minY = Number.POSITIVE_INFINITY;\r\n                this.maxX = Number.NEGATIVE_INFINITY;\r\n                this.maxY = Number.NEGATIVE_INFINITY;\r\n            }\r\n        };\r\n        SkeletonBounds.prototype.aabbCompute = function () {\r\n            var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n            var polygons = this.polygons;\r\n            for (var i = 0, n = polygons.length; i < n; i++) {\r\n                var polygon = polygons[i];\r\n                var vertices = polygon;\r\n                for (var ii = 0, nn = polygon.length; ii < nn; ii += 2) {\r\n                    var x = vertices[ii];\r\n                    var y = vertices[ii + 1];\r\n                    minX = Math.min(minX, x);\r\n                    minY = Math.min(minY, y);\r\n                    maxX = Math.max(maxX, x);\r\n                    maxY = Math.max(maxY, y);\r\n                }\r\n            }\r\n            this.minX = minX;\r\n            this.minY = minY;\r\n            this.maxX = maxX;\r\n            this.maxY = maxY;\r\n        };\r\n        /** Returns true if the axis aligned bounding box contains the point. */\r\n        SkeletonBounds.prototype.aabbContainsPoint = function (x, y) {\r\n            return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\r\n        };\r\n        /** Returns true if the axis aligned bounding box intersects the line segment. */\r\n        SkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) {\r\n            var minX = this.minX;\r\n            var minY = this.minY;\r\n            var maxX = this.maxX;\r\n            var maxY = this.maxY;\r\n            if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\r\n                return false;\r\n            var m = (y2 - y1) / (x2 - x1);\r\n            var y = m * (minX - x1) + y1;\r\n            if (y > minY && y < maxY)\r\n                return true;\r\n            y = m * (maxX - x1) + y1;\r\n            if (y > minY && y < maxY)\r\n                return true;\r\n            var x = (minY - y1) / m + x1;\r\n            if (x > minX && x < maxX)\r\n                return true;\r\n            x = (maxY - y1) / m + x1;\r\n            if (x > minX && x < maxX)\r\n                return true;\r\n            return false;\r\n        };\r\n        /** Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds. */\r\n        SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) {\r\n            return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\r\n        };\r\n        /** Returns the first bounding box attachment that contains the point, or null. When doing many checks, it is usually more\r\n         * efficient to only call this method if {@link #aabbContainsPoint(float, float)} returns true. */\r\n        SkeletonBounds.prototype.containsPoint = function (x, y) {\r\n            var polygons = this.polygons;\r\n            for (var i = 0, n = polygons.length; i < n; i++)\r\n                if (this.containsPointPolygon(polygons[i], x, y))\r\n                    return this.boundingBoxes[i];\r\n            return null;\r\n        };\r\n        /** Returns true if the polygon contains the point. */\r\n        SkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) {\r\n            var vertices = polygon;\r\n            var nn = polygon.length;\r\n            var prevIndex = nn - 2;\r\n            var inside = false;\r\n            for (var ii = 0; ii < nn; ii += 2) {\r\n                var vertexY = vertices[ii + 1];\r\n                var prevY = vertices[prevIndex + 1];\r\n                if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\r\n                    var vertexX = vertices[ii];\r\n                    if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\r\n                        inside = !inside;\r\n                }\r\n                prevIndex = ii;\r\n            }\r\n            return inside;\r\n        };\r\n        /** Returns the first bounding box attachment that contains any part of the line segment, or null. When doing many checks, it\r\n         * is usually more efficient to only call this method if {@link #aabbIntersectsSegment()} returns\r\n         * true. */\r\n        SkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) {\r\n            var polygons = this.polygons;\r\n            for (var i = 0, n = polygons.length; i < n; i++)\r\n                if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\r\n                    return this.boundingBoxes[i];\r\n            return null;\r\n        };\r\n        /** Returns true if the polygon contains any part of the line segment. */\r\n        SkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) {\r\n            var vertices = polygon;\r\n            var nn = polygon.length;\r\n            var width12 = x1 - x2, height12 = y1 - y2;\r\n            var det1 = x1 * y2 - y1 * x2;\r\n            var x3 = vertices[nn - 2], y3 = vertices[nn - 1];\r\n            for (var ii = 0; ii < nn; ii += 2) {\r\n                var x4 = vertices[ii], y4 = vertices[ii + 1];\r\n                var det2 = x3 * y4 - y3 * x4;\r\n                var width34 = x3 - x4, height34 = y3 - y4;\r\n                var det3 = width12 * height34 - height12 * width34;\r\n                var x = (det1 * width34 - width12 * det2) / det3;\r\n                if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\r\n                    var y = (det1 * height34 - height12 * det2) / det3;\r\n                    if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1)))\r\n                        return true;\r\n                }\r\n                x3 = x4;\r\n                y3 = y4;\r\n            }\r\n            return false;\r\n        };\r\n        /** Returns the polygon for the specified bounding box, or null. */\r\n        SkeletonBounds.prototype.getPolygon = function (boundingBox) {\r\n            if (boundingBox == null)\r\n                throw new Error(\"boundingBox cannot be null.\");\r\n            var index = this.boundingBoxes.indexOf(boundingBox);\r\n            return index == -1 ? null : this.polygons[index];\r\n        };\r\n        /** The width of the axis aligned bounding box. */\r\n        SkeletonBounds.prototype.getWidth = function () {\r\n            return this.maxX - this.minX;\r\n        };\r\n        /** The height of the axis aligned bounding box. */\r\n        SkeletonBounds.prototype.getHeight = function () {\r\n            return this.maxY - this.minY;\r\n        };\r\n        return SkeletonBounds;\r\n    }());\n\n    /** Loads skeleton data in the Spine JSON format.\r\n     *\r\n     * See [Spine JSON format](http://esotericsoftware.com/spine-json-format) and\r\n     * [JSON and binary data](http://esotericsoftware.com/spine-loading-skeleton-data#JSON-and-binary-data) in the Spine\r\n     * Runtimes Guide.\r\n     * @public\r\n     * */\r\n    var SkeletonJson = /** @class */ (function () {\r\n        function SkeletonJson(attachmentLoader) {\r\n            this.attachmentLoader = null;\r\n            /** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at\r\n             * runtime than were used in Spine.\r\n             *\r\n             * See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */\r\n            this.scale = 1;\r\n            this.linkedMeshes = new Array();\r\n            this.attachmentLoader = attachmentLoader;\r\n        }\r\n        SkeletonJson.prototype.readSkeletonData = function (json) {\r\n            var scale = this.scale;\r\n            var skeletonData = new SkeletonData();\r\n            var root = typeof (json) === \"string\" ? JSON.parse(json) : json;\r\n            // Skeleton\r\n            var skeletonMap = root.skeleton;\r\n            if (skeletonMap) {\r\n                skeletonData.hash = skeletonMap.hash;\r\n                skeletonData.version = skeletonMap.spine;\r\n                if (skeletonData.version.substr(0, 3) !== '4.0') {\r\n                    var error = \"Spine 4.0 loader cant load version \" + skeletonMap.spine + \". Please configure your pixi-spine bundle\";\r\n                    console.error(error);\r\n                }\r\n                skeletonData.x = skeletonMap.x;\r\n                skeletonData.y = skeletonMap.y;\r\n                skeletonData.width = skeletonMap.width;\r\n                skeletonData.height = skeletonMap.height;\r\n                skeletonData.fps = skeletonMap.fps;\r\n                skeletonData.imagesPath = skeletonMap.images;\r\n            }\r\n            // Bones\r\n            if (root.bones) {\r\n                for (var i = 0; i < root.bones.length; i++) {\r\n                    var boneMap = root.bones[i];\r\n                    var parent_1 = null;\r\n                    var parentName = getValue(boneMap, \"parent\", null);\r\n                    if (parentName != null) {\r\n                        parent_1 = skeletonData.findBone(parentName);\r\n                        if (parent_1 == null)\r\n                            throw new Error(\"Parent bone not found: \" + parentName);\r\n                    }\r\n                    var data = new BoneData(skeletonData.bones.length, boneMap.name, parent_1);\r\n                    data.length = getValue(boneMap, \"length\", 0) * scale;\r\n                    data.x = getValue(boneMap, \"x\", 0) * scale;\r\n                    data.y = getValue(boneMap, \"y\", 0) * scale;\r\n                    data.rotation = getValue(boneMap, \"rotation\", 0);\r\n                    data.scaleX = getValue(boneMap, \"scaleX\", 1);\r\n                    data.scaleY = getValue(boneMap, \"scaleY\", 1);\r\n                    data.shearX = getValue(boneMap, \"shearX\", 0);\r\n                    data.shearY = getValue(boneMap, \"shearY\", 0);\r\n                    data.transformMode = Utils.enumValue(exports.TransformMode, getValue(boneMap, \"transform\", \"Normal\"));\r\n                    data.skinRequired = getValue(boneMap, \"skin\", false);\r\n                    var color = getValue(boneMap, \"color\", null);\r\n                    if (color)\r\n                        data.color.setFromString(color);\r\n                    skeletonData.bones.push(data);\r\n                }\r\n            }\r\n            // Slots.\r\n            if (root.slots) {\r\n                for (var i = 0; i < root.slots.length; i++) {\r\n                    var slotMap = root.slots[i];\r\n                    var boneData = skeletonData.findBone(slotMap.bone);\r\n                    var data = new SlotData(skeletonData.slots.length, slotMap.name, boneData);\r\n                    var color = getValue(slotMap, \"color\", null);\r\n                    if (color)\r\n                        data.color.setFromString(color);\r\n                    var dark = getValue(slotMap, \"dark\", null);\r\n                    if (dark)\r\n                        data.darkColor = Color.fromString(dark);\r\n                    data.attachmentName = getValue(slotMap, \"attachment\", null);\r\n                    data.blendMode = SkeletonJson.blendModeFromString(getValue(slotMap, \"blend\", \"normal\"));\r\n                    skeletonData.slots.push(data);\r\n                }\r\n            }\r\n            // IK constraints\r\n            if (root.ik) {\r\n                for (var i = 0; i < root.ik.length; i++) {\r\n                    var constraintMap = root.ik[i];\r\n                    var data = new IkConstraintData(constraintMap.name);\r\n                    data.order = getValue(constraintMap, \"order\", 0);\r\n                    data.skinRequired = getValue(constraintMap, \"skin\", false);\r\n                    for (var ii = 0; ii < constraintMap.bones.length; ii++) {\r\n                        var boneName = constraintMap.bones[ii];\r\n                        var bone = skeletonData.findBone(boneName);\r\n                        if (bone == null)\r\n                            throw new Error(\"IK bone not found: \" + boneName);\r\n                        data.bones.push(bone);\r\n                    }\r\n                    data.target = skeletonData.findBone(constraintMap.target);\r\n                    data.mix = getValue(constraintMap, \"mix\", 1);\r\n                    data.softness = getValue(constraintMap, \"softness\", 0) * scale;\r\n                    data.bendDirection = getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\r\n                    data.compress = getValue(constraintMap, \"compress\", false);\r\n                    data.stretch = getValue(constraintMap, \"stretch\", false);\r\n                    data.uniform = getValue(constraintMap, \"uniform\", false);\r\n                    skeletonData.ikConstraints.push(data);\r\n                }\r\n            }\r\n            // Transform constraints.\r\n            if (root.transform) {\r\n                for (var i = 0; i < root.transform.length; i++) {\r\n                    var constraintMap = root.transform[i];\r\n                    var data = new TransformConstraintData(constraintMap.name);\r\n                    data.order = getValue(constraintMap, \"order\", 0);\r\n                    data.skinRequired = getValue(constraintMap, \"skin\", false);\r\n                    for (var ii = 0; ii < constraintMap.bones.length; ii++) {\r\n                        var boneName = constraintMap.bones[ii];\r\n                        var bone = skeletonData.findBone(boneName);\r\n                        if (bone == null)\r\n                            throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n                        data.bones.push(bone);\r\n                    }\r\n                    var targetName = constraintMap.target;\r\n                    data.target = skeletonData.findBone(targetName);\r\n                    if (data.target == null)\r\n                        throw new Error(\"Transform constraint target bone not found: \" + targetName);\r\n                    data.local = getValue(constraintMap, \"local\", false);\r\n                    data.relative = getValue(constraintMap, \"relative\", false);\r\n                    data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\r\n                    data.offsetX = getValue(constraintMap, \"x\", 0) * scale;\r\n                    data.offsetY = getValue(constraintMap, \"y\", 0) * scale;\r\n                    data.offsetScaleX = getValue(constraintMap, \"scaleX\", 0);\r\n                    data.offsetScaleY = getValue(constraintMap, \"scaleY\", 0);\r\n                    data.offsetShearY = getValue(constraintMap, \"shearY\", 0);\r\n                    data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\r\n                    data.mixX = getValue(constraintMap, \"mixX\", 1);\r\n                    data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\r\n                    data.mixScaleX = getValue(constraintMap, \"mixScaleX\", 1);\r\n                    data.mixScaleY = getValue(constraintMap, \"mixScaleY\", data.mixScaleX);\r\n                    data.mixShearY = getValue(constraintMap, \"mixShearY\", 1);\r\n                    skeletonData.transformConstraints.push(data);\r\n                }\r\n            }\r\n            // Path constraints.\r\n            if (root.path) {\r\n                for (var i = 0; i < root.path.length; i++) {\r\n                    var constraintMap = root.path[i];\r\n                    var data = new PathConstraintData(constraintMap.name);\r\n                    data.order = getValue(constraintMap, \"order\", 0);\r\n                    data.skinRequired = getValue(constraintMap, \"skin\", false);\r\n                    for (var ii = 0; ii < constraintMap.bones.length; ii++) {\r\n                        var boneName = constraintMap.bones[ii];\r\n                        var bone = skeletonData.findBone(boneName);\r\n                        if (bone == null)\r\n                            throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n                        data.bones.push(bone);\r\n                    }\r\n                    var targetName = constraintMap.target;\r\n                    data.target = skeletonData.findSlot(targetName);\r\n                    if (data.target == null)\r\n                        throw new Error(\"Path target slot not found: \" + targetName);\r\n                    data.positionMode = Utils.enumValue(exports.PositionMode, getValue(constraintMap, \"positionMode\", \"Percent\"));\r\n                    data.spacingMode = Utils.enumValue(SpacingMode, getValue(constraintMap, \"spacingMode\", \"Length\"));\r\n                    data.rotateMode = Utils.enumValue(exports.RotateMode, getValue(constraintMap, \"rotateMode\", \"Tangent\"));\r\n                    data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\r\n                    data.position = getValue(constraintMap, \"position\", 0);\r\n                    if (data.positionMode == exports.PositionMode.Fixed)\r\n                        data.position *= scale;\r\n                    data.spacing = getValue(constraintMap, \"spacing\", 0);\r\n                    if (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed)\r\n                        data.spacing *= scale;\r\n                    data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\r\n                    data.mixX = getValue(constraintMap, \"mixX\", 1);\r\n                    data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\r\n                    skeletonData.pathConstraints.push(data);\r\n                }\r\n            }\r\n            // Skins.\r\n            if (root.skins) {\r\n                for (var i = 0; i < root.skins.length; i++) {\r\n                    var skinMap = root.skins[i];\r\n                    var skin = new Skin(skinMap.name);\r\n                    if (skinMap.bones) {\r\n                        for (var ii = 0; ii < skinMap.bones.length; ii++) {\r\n                            var bone = skeletonData.findBone(skinMap.bones[ii]);\r\n                            if (bone == null)\r\n                                throw new Error(\"Skin bone not found: \" + skinMap.bones[i]);\r\n                            skin.bones.push(bone);\r\n                        }\r\n                    }\r\n                    if (skinMap.ik) {\r\n                        for (var ii = 0; ii < skinMap.ik.length; ii++) {\r\n                            var constraint = skeletonData.findIkConstraint(skinMap.ik[ii]);\r\n                            if (constraint == null)\r\n                                throw new Error(\"Skin IK constraint not found: \" + skinMap.ik[i]);\r\n                            skin.constraints.push(constraint);\r\n                        }\r\n                    }\r\n                    if (skinMap.transform) {\r\n                        for (var ii = 0; ii < skinMap.transform.length; ii++) {\r\n                            var constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]);\r\n                            if (constraint == null)\r\n                                throw new Error(\"Skin transform constraint not found: \" + skinMap.transform[i]);\r\n                            skin.constraints.push(constraint);\r\n                        }\r\n                    }\r\n                    if (skinMap.path) {\r\n                        for (var ii = 0; ii < skinMap.path.length; ii++) {\r\n                            var constraint = skeletonData.findPathConstraint(skinMap.path[ii]);\r\n                            if (constraint == null)\r\n                                throw new Error(\"Skin path constraint not found: \" + skinMap.path[i]);\r\n                            skin.constraints.push(constraint);\r\n                        }\r\n                    }\r\n                    for (var slotName in skinMap.attachments) {\r\n                        var slot = skeletonData.findSlot(slotName);\r\n                        if (slot == null)\r\n                            throw new Error(\"Slot not found: \" + slotName);\r\n                        var slotMap = skinMap.attachments[slotName];\r\n                        for (var entryName in slotMap) {\r\n                            var attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\r\n                            if (attachment)\r\n                                skin.setAttachment(slot.index, entryName, attachment);\r\n                        }\r\n                    }\r\n                    skeletonData.skins.push(skin);\r\n                    if (skin.name == \"default\")\r\n                        skeletonData.defaultSkin = skin;\r\n                }\r\n            }\r\n            // Linked meshes.\r\n            for (var i = 0, n = this.linkedMeshes.length; i < n; i++) {\r\n                var linkedMesh = this.linkedMeshes[i];\r\n                var skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n                var parent_2 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n                linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_2 : linkedMesh.mesh;\r\n                linkedMesh.mesh.setParentMesh(parent_2);\r\n                // linkedMesh.mesh.updateUVs();\r\n            }\r\n            this.linkedMeshes.length = 0;\r\n            // Events.\r\n            if (root.events) {\r\n                for (var eventName in root.events) {\r\n                    var eventMap = root.events[eventName];\r\n                    var data = new EventData(eventName);\r\n                    data.intValue = getValue(eventMap, \"int\", 0);\r\n                    data.floatValue = getValue(eventMap, \"float\", 0);\r\n                    data.stringValue = getValue(eventMap, \"string\", \"\");\r\n                    data.audioPath = getValue(eventMap, \"audio\", null);\r\n                    if (data.audioPath) {\r\n                        data.volume = getValue(eventMap, \"volume\", 1);\r\n                        data.balance = getValue(eventMap, \"balance\", 0);\r\n                    }\r\n                    skeletonData.events.push(data);\r\n                }\r\n            }\r\n            // Animations.\r\n            if (root.animations) {\r\n                for (var animationName in root.animations) {\r\n                    var animationMap = root.animations[animationName];\r\n                    this.readAnimation(animationMap, animationName, skeletonData);\r\n                }\r\n            }\r\n            return skeletonData;\r\n        };\r\n        SkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) {\r\n            var scale = this.scale;\r\n            name = getValue(map, \"name\", name);\r\n            switch (getValue(map, \"type\", \"region\")) {\r\n                case \"region\": {\r\n                    var path = getValue(map, \"path\", name);\r\n                    var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n                    if (!region)\r\n                        return null;\r\n                    region.path = path;\r\n                    region.x = getValue(map, \"x\", 0) * scale;\r\n                    region.y = getValue(map, \"y\", 0) * scale;\r\n                    region.scaleX = getValue(map, \"scaleX\", 1);\r\n                    region.scaleY = getValue(map, \"scaleY\", 1);\r\n                    region.rotation = getValue(map, \"rotation\", 0);\r\n                    region.width = map.width * scale;\r\n                    region.height = map.height * scale;\r\n                    var color = getValue(map, \"color\", null);\r\n                    if (color)\r\n                        region.color.setFromString(color);\r\n                    // region.updateOffset();\r\n                    return region;\r\n                }\r\n                case \"boundingbox\": {\r\n                    var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n                    if (!box)\r\n                        return null;\r\n                    this.readVertices(map, box, map.vertexCount << 1);\r\n                    var color = getValue(map, \"color\", null);\r\n                    if (color)\r\n                        box.color.setFromString(color);\r\n                    return box;\r\n                }\r\n                case \"mesh\":\r\n                case \"linkedmesh\": {\r\n                    var path = getValue(map, \"path\", name);\r\n                    var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n                    if (!mesh)\r\n                        return null;\r\n                    mesh.path = path;\r\n                    var color = getValue(map, \"color\", null);\r\n                    if (color)\r\n                        mesh.color.setFromString(color);\r\n                    mesh.width = getValue(map, \"width\", 0) * scale;\r\n                    mesh.height = getValue(map, \"height\", 0) * scale;\r\n                    var parent_3 = getValue(map, \"parent\", null);\r\n                    if (parent_3) {\r\n                        this.linkedMeshes.push(new LinkedMesh(mesh, getValue(map, \"skin\", null), slotIndex, parent_3, getValue(map, \"deform\", true)));\r\n                        return mesh;\r\n                    }\r\n                    var uvs = map.uvs;\r\n                    this.readVertices(map, mesh, uvs.length);\r\n                    mesh.triangles = map.triangles;\r\n                    mesh.regionUVs = new Float32Array(uvs);\r\n                    // mesh.updateUVs();\r\n                    mesh.edges = getValue(map, \"edges\", null);\r\n                    mesh.hullLength = getValue(map, \"hull\", 0) * 2;\r\n                    return mesh;\r\n                }\r\n                case \"path\": {\r\n                    var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n                    if (!path)\r\n                        return null;\r\n                    path.closed = getValue(map, \"closed\", false);\r\n                    path.constantSpeed = getValue(map, \"constantSpeed\", true);\r\n                    var vertexCount = map.vertexCount;\r\n                    this.readVertices(map, path, vertexCount << 1);\r\n                    var lengths = Utils.newArray(vertexCount / 3, 0);\r\n                    for (var i = 0; i < map.lengths.length; i++)\r\n                        lengths[i] = map.lengths[i] * scale;\r\n                    path.lengths = lengths;\r\n                    var color = getValue(map, \"color\", null);\r\n                    if (color)\r\n                        path.color.setFromString(color);\r\n                    return path;\r\n                }\r\n                case \"point\": {\r\n                    var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n                    if (!point)\r\n                        return null;\r\n                    point.x = getValue(map, \"x\", 0) * scale;\r\n                    point.y = getValue(map, \"y\", 0) * scale;\r\n                    point.rotation = getValue(map, \"rotation\", 0);\r\n                    var color = getValue(map, \"color\", null);\r\n                    if (color)\r\n                        point.color.setFromString(color);\r\n                    return point;\r\n                }\r\n                case \"clipping\": {\r\n                    var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n                    if (!clip)\r\n                        return null;\r\n                    var end = getValue(map, \"end\", null);\r\n                    if (end != null) {\r\n                        var slot = skeletonData.findSlot(end);\r\n                        if (slot == null)\r\n                            throw new Error(\"Clipping end slot not found: \" + end);\r\n                        clip.endSlot = slot;\r\n                    }\r\n                    var vertexCount = map.vertexCount;\r\n                    this.readVertices(map, clip, vertexCount << 1);\r\n                    var color = getValue(map, \"color\", null);\r\n                    if (color)\r\n                        clip.color.setFromString(color);\r\n                    return clip;\r\n                }\r\n            }\r\n            return null;\r\n        };\r\n        SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) {\r\n            var scale = this.scale;\r\n            attachment.worldVerticesLength = verticesLength;\r\n            var vertices = map.vertices;\r\n            if (verticesLength == vertices.length) {\r\n                var scaledVertices = Utils.toFloatArray(vertices);\r\n                if (scale != 1) {\r\n                    for (var i = 0, n = vertices.length; i < n; i++)\r\n                        scaledVertices[i] *= scale;\r\n                }\r\n                attachment.vertices = scaledVertices;\r\n                return;\r\n            }\r\n            var weights = new Array();\r\n            var bones = new Array();\r\n            for (var i = 0, n = vertices.length; i < n;) {\r\n                var boneCount = vertices[i++];\r\n                bones.push(boneCount);\r\n                for (var nn = i + boneCount * 4; i < nn; i += 4) {\r\n                    bones.push(vertices[i]);\r\n                    weights.push(vertices[i + 1] * scale);\r\n                    weights.push(vertices[i + 2] * scale);\r\n                    weights.push(vertices[i + 3]);\r\n                }\r\n            }\r\n            attachment.bones = bones;\r\n            attachment.vertices = Utils.toFloatArray(weights);\r\n        };\r\n        SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) {\r\n            var scale = this.scale;\r\n            var timelines = new Array();\r\n            // Slot timelines.\r\n            if (map.slots) {\r\n                for (var slotName in map.slots) {\r\n                    var slotMap = map.slots[slotName];\r\n                    var slotIndex = skeletonData.findSlot(slotName).index;\r\n                    if (slotIndex == -1)\r\n                        throw new Error(\"Slot not found: \" + slotName);\r\n                    for (var timelineName in slotMap) {\r\n                        var timelineMap = slotMap[timelineName];\r\n                        if (!timelineMap)\r\n                            continue;\r\n                        var frames_1 = timelineMap.length;\r\n                        if (timelineName == \"attachment\") {\r\n                            var timeline = new AttachmentTimeline(frames_1, slotIndex);\r\n                            for (var frame = 0; frame < frames_1; frame++) {\r\n                                var keyMap = timelineMap[frame];\r\n                                timeline.setFrame(frame, getValue(keyMap, \"time\", 0), keyMap.name);\r\n                            }\r\n                            timelines.push(timeline);\r\n                        }\r\n                        else if (timelineName == \"rgba\") {\r\n                            var timeline = new RGBATimeline(frames_1, frames_1 << 2, slotIndex);\r\n                            var keyMap = timelineMap[0];\r\n                            var time = getValue(keyMap, \"time\", 0);\r\n                            var color = Color.fromString(keyMap.color);\r\n                            for (var frame = 0, bezier = 0;; frame++) {\r\n                                timeline.setFrame(frame, time, color.r, color.g, color.b, color.a);\r\n                                var nextMap = timelineMap[frame + 1];\r\n                                if (!nextMap) {\r\n                                    timeline.shrink(bezier);\r\n                                    break;\r\n                                }\r\n                                var time2 = getValue(nextMap, \"time\", 0);\r\n                                var newColor = Color.fromString(nextMap.color);\r\n                                var curve = keyMap.curve;\r\n                                if (curve) {\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\r\n                                }\r\n                                time = time2;\r\n                                color = newColor;\r\n                                keyMap = nextMap;\r\n                            }\r\n                            timelines.push(timeline);\r\n                        }\r\n                        else if (timelineName == \"rgb\") {\r\n                            var timeline = new RGBTimeline(frames_1, frames_1 * 3, slotIndex);\r\n                            var keyMap = timelineMap[0];\r\n                            var time = getValue(keyMap, \"time\", 0);\r\n                            var color = Color.fromString(keyMap.color);\r\n                            for (var frame = 0, bezier = 0;; frame++) {\r\n                                timeline.setFrame(frame, time, color.r, color.g, color.b);\r\n                                var nextMap = timelineMap[frame + 1];\r\n                                if (!nextMap) {\r\n                                    timeline.shrink(bezier);\r\n                                    break;\r\n                                }\r\n                                var time2 = getValue(nextMap, \"time\", 0);\r\n                                var newColor = Color.fromString(nextMap.color);\r\n                                var curve = keyMap.curve;\r\n                                if (curve) {\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\r\n                                }\r\n                                time = time2;\r\n                                color = newColor;\r\n                                keyMap = nextMap;\r\n                            }\r\n                            timelines.push(timeline);\r\n                        }\r\n                        else if (timelineName == \"alpha\") {\r\n                            timelines.push(readTimeline1(timelineMap, new AlphaTimeline(frames_1, frames_1, slotIndex), 0, 1));\r\n                        }\r\n                        else if (timelineName == \"rgba2\") {\r\n                            var timeline = new RGBA2Timeline(frames_1, frames_1 * 7, slotIndex);\r\n                            var keyMap = timelineMap[0];\r\n                            var time = getValue(keyMap, \"time\", 0);\r\n                            var color = Color.fromString(keyMap.light);\r\n                            var color2 = Color.fromString(keyMap.dark);\r\n                            for (var frame = 0, bezier = 0;; frame++) {\r\n                                timeline.setFrame(frame, time, color.r, color.g, color.b, color.a, color2.r, color2.g, color2.b);\r\n                                var nextMap = timelineMap[frame + 1];\r\n                                if (!nextMap) {\r\n                                    timeline.shrink(bezier);\r\n                                    break;\r\n                                }\r\n                                var time2 = getValue(nextMap, \"time\", 0);\r\n                                var newColor = Color.fromString(nextMap.light);\r\n                                var newColor2 = Color.fromString(nextMap.dark);\r\n                                var curve = keyMap.curve;\r\n                                if (curve) {\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.r, newColor2.r, 1);\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.g, newColor2.g, 1);\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 6, time, time2, color2.b, newColor2.b, 1);\r\n                                }\r\n                                time = time2;\r\n                                color = newColor;\r\n                                color2 = newColor2;\r\n                                keyMap = nextMap;\r\n                            }\r\n                            timelines.push(timeline);\r\n                        }\r\n                        else if (timelineName == \"rgb2\") {\r\n                            var timeline = new RGB2Timeline(frames_1, frames_1 * 6, slotIndex);\r\n                            var keyMap = timelineMap[0];\r\n                            var time = getValue(keyMap, \"time\", 0);\r\n                            var color = Color.fromString(keyMap.light);\r\n                            var color2 = Color.fromString(keyMap.dark);\r\n                            for (var frame = 0, bezier = 0;; frame++) {\r\n                                timeline.setFrame(frame, time, color.r, color.g, color.b, color2.r, color2.g, color2.b);\r\n                                var nextMap = timelineMap[frame + 1];\r\n                                if (!nextMap) {\r\n                                    timeline.shrink(bezier);\r\n                                    break;\r\n                                }\r\n                                var time2 = getValue(nextMap, \"time\", 0);\r\n                                var newColor = Color.fromString(nextMap.light);\r\n                                var newColor2 = Color.fromString(nextMap.dark);\r\n                                var curve = keyMap.curve;\r\n                                if (curve) {\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color2.r, newColor2.r, 1);\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.g, newColor2.g, 1);\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.b, newColor2.b, 1);\r\n                                }\r\n                                time = time2;\r\n                                color = newColor;\r\n                                color2 = newColor2;\r\n                                keyMap = nextMap;\r\n                            }\r\n                            timelines.push(timeline);\r\n                        }\r\n                        else\r\n                            throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\r\n                    }\r\n                }\r\n            }\r\n            // Bone timelines.\r\n            if (map.bones) {\r\n                for (var boneName in map.bones) {\r\n                    var boneMap = map.bones[boneName];\r\n                    var boneIndex = skeletonData.findBone(boneName).index;\r\n                    if (boneIndex == -1)\r\n                        throw new Error(\"Bone not found: \" + boneName);\r\n                    for (var timelineName in boneMap) {\r\n                        var timelineMap = boneMap[timelineName];\r\n                        var frames_2 = timelineMap.length;\r\n                        if (frames_2 == 0)\r\n                            continue;\r\n                        if (timelineName === \"rotate\") {\r\n                            timelines.push(readTimeline1(timelineMap, new RotateTimeline(frames_2, frames_2, boneIndex), 0, 1));\r\n                        }\r\n                        else if (timelineName === \"translate\") {\r\n                            var timeline = new TranslateTimeline(frames_2, frames_2 << 1, boneIndex);\r\n                            timelines.push(readTimeline2(timelineMap, timeline, \"x\", \"y\", 0, scale));\r\n                        }\r\n                        else if (timelineName === \"translatex\") {\r\n                            var timeline = new TranslateXTimeline(frames_2, frames_2, boneIndex);\r\n                            timelines.push(readTimeline1(timelineMap, timeline, 0, scale));\r\n                        }\r\n                        else if (timelineName === \"translatey\") {\r\n                            var timeline = new TranslateYTimeline(frames_2, frames_2, boneIndex);\r\n                            timelines.push(readTimeline1(timelineMap, timeline, 0, scale));\r\n                        }\r\n                        else if (timelineName === \"scale\") {\r\n                            var timeline = new ScaleTimeline(frames_2, frames_2 << 1, boneIndex);\r\n                            timelines.push(readTimeline2(timelineMap, timeline, \"x\", \"y\", 1, 1));\r\n                        }\r\n                        else if (timelineName === \"scalex\") {\r\n                            var timeline = new ScaleXTimeline(frames_2, frames_2, boneIndex);\r\n                            timelines.push(readTimeline1(timelineMap, timeline, 1, 1));\r\n                        }\r\n                        else if (timelineName === \"scaley\") {\r\n                            var timeline = new ScaleYTimeline(frames_2, frames_2, boneIndex);\r\n                            timelines.push(readTimeline1(timelineMap, timeline, 1, 1));\r\n                        }\r\n                        else if (timelineName === \"shear\") {\r\n                            var timeline = new ShearTimeline(frames_2, frames_2 << 1, boneIndex);\r\n                            timelines.push(readTimeline2(timelineMap, timeline, \"x\", \"y\", 0, 1));\r\n                        }\r\n                        else if (timelineName === \"shearx\") {\r\n                            var timeline = new ShearXTimeline(frames_2, frames_2, boneIndex);\r\n                            timelines.push(readTimeline1(timelineMap, timeline, 0, 1));\r\n                        }\r\n                        else if (timelineName === \"sheary\") {\r\n                            var timeline = new ShearYTimeline(frames_2, frames_2, boneIndex);\r\n                            timelines.push(readTimeline1(timelineMap, timeline, 0, 1));\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            // IK constraint timelines.\r\n            if (map.ik) {\r\n                for (var constraintName in map.ik) {\r\n                    var constraintMap = map.ik[constraintName];\r\n                    var keyMap = constraintMap[0];\r\n                    if (!keyMap)\r\n                        continue;\r\n                    var constraint = skeletonData.findIkConstraint(constraintName);\r\n                    var constraintIndex = skeletonData.ikConstraints.indexOf(constraint);\r\n                    var timeline = new IkConstraintTimeline(constraintMap.length, constraintMap.length << 1, constraintIndex);\r\n                    var time = getValue(keyMap, \"time\", 0);\r\n                    var mix = getValue(keyMap, \"mix\", 1);\r\n                    var softness = getValue(keyMap, \"softness\", 0) * scale;\r\n                    for (var frame = 0, bezier = 0;; frame++) {\r\n                        timeline.setFrame(frame, time, mix, softness, getValue(keyMap, \"bendPositive\", true) ? 1 : -1, getValue(keyMap, \"compress\", false), getValue(keyMap, \"stretch\", false));\r\n                        var nextMap = constraintMap[frame + 1];\r\n                        if (!nextMap) {\r\n                            timeline.shrink(bezier);\r\n                            break;\r\n                        }\r\n                        var time2 = getValue(nextMap, \"time\", 0);\r\n                        var mix2 = getValue(nextMap, \"mix\", 1);\r\n                        var softness2 = getValue(nextMap, \"softness\", 0) * scale;\r\n                        var curve = keyMap.curve;\r\n                        if (curve) {\r\n                            bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mix, mix2, 1);\r\n                            bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, softness, softness2, scale);\r\n                        }\r\n                        time = time2;\r\n                        mix = mix2;\r\n                        softness = softness2;\r\n                        keyMap = nextMap;\r\n                    }\r\n                    timelines.push(timeline);\r\n                }\r\n            }\r\n            // Transform constraint timelines.\r\n            if (map.transform) {\r\n                for (var constraintName in map.transform) {\r\n                    var timelineMap = map.transform[constraintName];\r\n                    var keyMap = timelineMap[0];\r\n                    if (!keyMap)\r\n                        continue;\r\n                    var constraint = skeletonData.findTransformConstraint(constraintName);\r\n                    var constraintIndex = skeletonData.transformConstraints.indexOf(constraint);\r\n                    var timeline = new TransformConstraintTimeline(timelineMap.length, timelineMap.length * 6, constraintIndex);\r\n                    var time = getValue(keyMap, \"time\", 0);\r\n                    var mixRotate = getValue(keyMap, \"mixRotate\", 1);\r\n                    var mixX = getValue(keyMap, \"mixX\", 1);\r\n                    var mixY = getValue(keyMap, \"mixY\", mixX);\r\n                    var mixScaleX = getValue(keyMap, \"mixScaleX\", 1);\r\n                    var mixScaleY = getValue(keyMap, \"mixScaleY\", mixScaleX);\r\n                    var mixShearY = getValue(keyMap, \"mixShearY\", 1);\r\n                    for (var frame = 0, bezier = 0;; frame++) {\r\n                        timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\r\n                        var nextMap = timelineMap[frame + 1];\r\n                        if (!nextMap) {\r\n                            timeline.shrink(bezier);\r\n                            break;\r\n                        }\r\n                        var time2 = getValue(nextMap, \"time\", 0);\r\n                        var mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\r\n                        var mixX2 = getValue(nextMap, \"mixX\", 1);\r\n                        var mixY2 = getValue(nextMap, \"mixY\", mixX2);\r\n                        var mixScaleX2 = getValue(nextMap, \"mixScaleX\", 1);\r\n                        var mixScaleY2 = getValue(nextMap, \"mixScaleY\", mixScaleX2);\r\n                        var mixShearY2 = getValue(nextMap, \"mixShearY\", 1);\r\n                        var curve = keyMap.curve;\r\n                        if (curve) {\r\n                            bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\r\n                            bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\r\n                            bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\r\n                            bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\r\n                            bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\r\n                            bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, mixShearY, mixShearY2, 1);\r\n                        }\r\n                        time = time2;\r\n                        mixRotate = mixRotate2;\r\n                        mixX = mixX2;\r\n                        mixY = mixY2;\r\n                        mixScaleX = mixScaleX2;\r\n                        mixScaleY = mixScaleY2;\r\n                        mixScaleX = mixScaleX2;\r\n                        keyMap = nextMap;\r\n                    }\r\n                    timelines.push(timeline);\r\n                }\r\n            }\r\n            // Path constraint timelines.\r\n            if (map.path) {\r\n                for (var constraintName in map.path) {\r\n                    var constraintMap = map.path[constraintName];\r\n                    var constraintIndex = skeletonData.findPathConstraintIndex(constraintName);\r\n                    if (constraintIndex == -1)\r\n                        throw new Error(\"Path constraint not found: \" + constraintName);\r\n                    var constraint = skeletonData.pathConstraints[constraintIndex];\r\n                    for (var timelineName in constraintMap) {\r\n                        var timelineMap = constraintMap[timelineName];\r\n                        var keyMap = timelineMap[0];\r\n                        if (!keyMap)\r\n                            continue;\r\n                        var frames_3 = timelineMap.length;\r\n                        if (timelineName === \"position\") {\r\n                            var timeline = new PathConstraintPositionTimeline(frames_3, frames_3, constraintIndex);\r\n                            timelines.push(readTimeline1(timelineMap, timeline, 0, constraint.positionMode == exports.PositionMode.Fixed ? scale : 1));\r\n                        }\r\n                        else if (timelineName === \"spacing\") {\r\n                            var timeline = new PathConstraintSpacingTimeline(frames_3, frames_3, constraintIndex);\r\n                            timelines.push(readTimeline1(timelineMap, timeline, 0, constraint.spacingMode == SpacingMode.Length || constraint.spacingMode == SpacingMode.Fixed ? scale : 1));\r\n                        }\r\n                        else if (timelineName === \"mix\") {\r\n                            var timeline = new PathConstraintMixTimeline(frames_3, frames_3 * 3, constraintIndex);\r\n                            var time = getValue(keyMap, \"time\", 0);\r\n                            var mixRotate = getValue(keyMap, \"mixRotate\", 1);\r\n                            var mixX = getValue(keyMap, \"mixX\", 1);\r\n                            var mixY = getValue(keyMap, \"mixY\", mixX);\r\n                            for (var frame = 0, bezier = 0;; frame++) {\r\n                                timeline.setFrame(frame, time, mixRotate, mixX, mixY);\r\n                                var nextMap = timelineMap[frame + 1];\r\n                                if (!nextMap) {\r\n                                    timeline.shrink(bezier);\r\n                                    break;\r\n                                }\r\n                                var time2 = getValue(nextMap, \"time\", 0);\r\n                                var mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\r\n                                var mixX2 = getValue(nextMap, \"mixX\", 1);\r\n                                var mixY2 = getValue(nextMap, \"mixY\", mixX2);\r\n                                var curve = keyMap.curve;\r\n                                if (curve) {\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\r\n                                }\r\n                                time = time2;\r\n                                mixRotate = mixRotate2;\r\n                                mixX = mixX2;\r\n                                mixY = mixY2;\r\n                                keyMap = nextMap;\r\n                            }\r\n                            timelines.push(timeline);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            // Deform timelines.\r\n            if (map.deform) {\r\n                for (var deformName in map.deform) {\r\n                    var deformMap = map.deform[deformName];\r\n                    var skin = skeletonData.findSkin(deformName);\r\n                    if (skin == null) {\r\n                        if (settings.FAIL_ON_NON_EXISTING_SKIN) {\r\n                            throw new Error(\"Skin not found: \" + deformName);\r\n                        }\r\n                        else {\r\n                            continue;\r\n                        }\r\n                    }\r\n                    for (var slotName in deformMap) {\r\n                        var slotMap = deformMap[slotName];\r\n                        var slotIndex = skeletonData.findSlot(slotName).index;\r\n                        for (var timelineName in slotMap) {\r\n                            var timelineMap = slotMap[timelineName];\r\n                            var keyMap = timelineMap[0];\r\n                            if (!keyMap)\r\n                                continue;\r\n                            var attachment = skin.getAttachment(slotIndex, timelineName);\r\n                            var weighted = attachment.bones;\r\n                            var vertices = attachment.vertices;\r\n                            var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n                            var timeline = new DeformTimeline(timelineMap.length, timelineMap.length, slotIndex, attachment);\r\n                            var time = getValue(keyMap, \"time\", 0);\r\n                            for (var frame = 0, bezier = 0;; frame++) {\r\n                                var deform = void 0;\r\n                                var verticesValue = getValue(keyMap, \"vertices\", null);\r\n                                if (!verticesValue)\r\n                                    deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\r\n                                else {\r\n                                    deform = Utils.newFloatArray(deformLength);\r\n                                    var start = getValue(keyMap, \"offset\", 0);\r\n                                    Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\r\n                                    if (scale != 1) {\r\n                                        for (var i = start, n = i + verticesValue.length; i < n; i++)\r\n                                            deform[i] *= scale;\r\n                                    }\r\n                                    if (!weighted) {\r\n                                        for (var i = 0; i < deformLength; i++)\r\n                                            deform[i] += vertices[i];\r\n                                    }\r\n                                }\r\n                                timeline.setFrame(frame, time, deform);\r\n                                var nextMap = timelineMap[frame + 1];\r\n                                if (!nextMap) {\r\n                                    timeline.shrink(bezier);\r\n                                    break;\r\n                                }\r\n                                var time2 = getValue(nextMap, \"time\", 0);\r\n                                var curve = keyMap.curve;\r\n                                if (curve)\r\n                                    bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, 0, 1, 1);\r\n                                time = time2;\r\n                                keyMap = nextMap;\r\n                            }\r\n                            timelines.push(timeline);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            // Draw order timelines.\r\n            if (map.drawOrder) {\r\n                var timeline = new DrawOrderTimeline(map.drawOrder.length);\r\n                var slotCount = skeletonData.slots.length;\r\n                var frame = 0;\r\n                for (var i = 0; i < map.drawOrder.length; i++, frame++) {\r\n                    var drawOrderMap = map.drawOrder[i];\r\n                    var drawOrder = null;\r\n                    var offsets = getValue(drawOrderMap, \"offsets\", null);\r\n                    if (offsets) {\r\n                        drawOrder = Utils.newArray(slotCount, -1);\r\n                        var unchanged = Utils.newArray(slotCount - offsets.length, 0);\r\n                        var originalIndex = 0, unchangedIndex = 0;\r\n                        for (var ii = 0; ii < offsets.length; ii++) {\r\n                            var offsetMap = offsets[ii];\r\n                            var slotIndex = skeletonData.findSlot(offsetMap.slot).index;\r\n                            // Collect unchanged items.\r\n                            while (originalIndex != slotIndex)\r\n                                unchanged[unchangedIndex++] = originalIndex++;\r\n                            // Set changed items.\r\n                            drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\r\n                        }\r\n                        // Collect remaining unchanged items.\r\n                        while (originalIndex < slotCount)\r\n                            unchanged[unchangedIndex++] = originalIndex++;\r\n                        // Fill in unchanged items.\r\n                        for (var ii = slotCount - 1; ii >= 0; ii--)\r\n                            if (drawOrder[ii] == -1)\r\n                                drawOrder[ii] = unchanged[--unchangedIndex];\r\n                    }\r\n                    timeline.setFrame(frame, getValue(drawOrderMap, \"time\", 0), drawOrder);\r\n                }\r\n                timelines.push(timeline);\r\n            }\r\n            // Event timelines.\r\n            if (map.events) {\r\n                var timeline = new EventTimeline(map.events.length);\r\n                var frame = 0;\r\n                for (var i = 0; i < map.events.length; i++, frame++) {\r\n                    var eventMap = map.events[i];\r\n                    var eventData = skeletonData.findEvent(eventMap.name);\r\n                    var event_1 = new Event(Utils.toSinglePrecision(getValue(eventMap, \"time\", 0)), eventData);\r\n                    event_1.intValue = getValue(eventMap, \"int\", eventData.intValue);\r\n                    event_1.floatValue = getValue(eventMap, \"float\", eventData.floatValue);\r\n                    event_1.stringValue = getValue(eventMap, \"string\", eventData.stringValue);\r\n                    if (event_1.data.audioPath) {\r\n                        event_1.volume = getValue(eventMap, \"volume\", 1);\r\n                        event_1.balance = getValue(eventMap, \"balance\", 0);\r\n                    }\r\n                    timeline.setFrame(frame, event_1);\r\n                }\r\n                timelines.push(timeline);\r\n            }\r\n            var duration = 0;\r\n            for (var i = 0, n = timelines.length; i < n; i++)\r\n                duration = Math.max(duration, timelines[i].getDuration());\r\n            if (isNaN(duration)) {\r\n                throw new Error(\"Error while parsing animation, duration is NaN\");\r\n            }\r\n            skeletonData.animations.push(new Animation(name, timelines, duration));\r\n        };\r\n        SkeletonJson.blendModeFromString = function (str) {\r\n            str = str.toLowerCase();\r\n            if (str == \"normal\")\r\n                return constants.BLEND_MODES.NORMAL;\r\n            if (str == \"additive\")\r\n                return constants.BLEND_MODES.ADD;\r\n            if (str == \"multiply\")\r\n                return constants.BLEND_MODES.MULTIPLY;\r\n            if (str == \"screen\")\r\n                return constants.BLEND_MODES.SCREEN;\r\n            throw new Error(\"Unknown blend mode: \" + str);\r\n        };\r\n        return SkeletonJson;\r\n    }());\r\n    var LinkedMesh = /** @class */ (function () {\r\n        function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n            this.mesh = mesh;\r\n            this.skin = skin;\r\n            this.slotIndex = slotIndex;\r\n            this.parent = parent;\r\n            this.inheritDeform = inheritDeform;\r\n        }\r\n        return LinkedMesh;\r\n    }());\r\n    function readTimeline1(keys, timeline, defaultValue, scale) {\r\n        var keyMap = keys[0];\r\n        var time = getValue(keyMap, \"time\", 0);\r\n        var value = getValue(keyMap, \"value\", defaultValue) * scale;\r\n        var bezier = 0;\r\n        for (var frame = 0;; frame++) {\r\n            timeline.setFrame(frame, time, value);\r\n            var nextMap = keys[frame + 1];\r\n            if (!nextMap) {\r\n                timeline.shrink(bezier);\r\n                return timeline;\r\n            }\r\n            var time2 = getValue(nextMap, \"time\", 0);\r\n            var value2 = getValue(nextMap, \"value\", defaultValue) * scale;\r\n            if (keyMap.curve)\r\n                bezier = readCurve(keyMap.curve, timeline, bezier, frame, 0, time, time2, value, value2, scale);\r\n            time = time2;\r\n            value = value2;\r\n            keyMap = nextMap;\r\n        }\r\n    }\r\n    function readTimeline2(keys, timeline, name1, name2, defaultValue, scale) {\r\n        var keyMap = keys[0];\r\n        var time = getValue(keyMap, \"time\", 0);\r\n        var value1 = getValue(keyMap, name1, defaultValue) * scale;\r\n        var value2 = getValue(keyMap, name2, defaultValue) * scale;\r\n        var bezier = 0;\r\n        for (var frame = 0;; frame++) {\r\n            timeline.setFrame(frame, time, value1, value2);\r\n            var nextMap = keys[frame + 1];\r\n            if (!nextMap) {\r\n                timeline.shrink(bezier);\r\n                return timeline;\r\n            }\r\n            var time2 = getValue(nextMap, \"time\", 0);\r\n            var nvalue1 = getValue(nextMap, name1, defaultValue) * scale;\r\n            var nvalue2 = getValue(nextMap, name2, defaultValue) * scale;\r\n            var curve = keyMap.curve;\r\n            if (curve) {\r\n                bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, value1, nvalue1, scale);\r\n                bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, value2, nvalue2, scale);\r\n            }\r\n            time = time2;\r\n            value1 = nvalue1;\r\n            value2 = nvalue2;\r\n            keyMap = nextMap;\r\n        }\r\n    }\r\n    function readCurve(curve, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\r\n        if (curve == \"stepped\") {\r\n            timeline.setStepped(frame);\r\n            return bezier;\r\n        }\r\n        var i = value << 2;\r\n        var cx1 = curve[i];\r\n        var cy1 = curve[i + 1] * scale;\r\n        var cx2 = curve[i + 2];\r\n        var cy2 = curve[i + 3] * scale;\r\n        timeline.setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2);\r\n        return bezier + 1;\r\n    }\r\n    function getValue(map, property, defaultValue) {\r\n        return map[property] !== undefined ? map[property] : defaultValue;\r\n    }\n\n    /**\r\n     * @public\r\n     */\r\n    var Spine$1 = /** @class */ (function (_super) {\r\n        __extends$1(Spine, _super);\r\n        function Spine() {\r\n            return _super !== null && _super.apply(this, arguments) || this;\r\n        }\r\n        Spine.prototype.createSkeleton = function (spineData) {\r\n            this.skeleton = new Skeleton(spineData);\r\n            this.skeleton.updateWorldTransform();\r\n            this.stateData = new AnimationStateData(spineData);\r\n            this.state = new AnimationState(this.stateData);\r\n        };\r\n        return Spine;\r\n    }(SpineBase));\n\n    var spine40 = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        AlphaTimeline: AlphaTimeline,\n        Animation: Animation,\n        AnimationState: AnimationState,\n        AnimationStateAdapter: AnimationStateAdapter,\n        AnimationStateData: AnimationStateData,\n        AtlasAttachmentLoader: AtlasAttachmentLoader,\n        Attachment: Attachment,\n        AttachmentTimeline: AttachmentTimeline,\n        Bone: Bone,\n        BoneData: BoneData,\n        BoundingBoxAttachment: BoundingBoxAttachment,\n        ClippingAttachment: ClippingAttachment,\n        ConstraintData: ConstraintData,\n        CurveTimeline: CurveTimeline,\n        CurveTimeline1: CurveTimeline1,\n        CurveTimeline2: CurveTimeline2,\n        DeformTimeline: DeformTimeline,\n        DrawOrderTimeline: DrawOrderTimeline,\n        Event: Event,\n        EventData: EventData,\n        EventQueue: EventQueue,\n        EventTimeline: EventTimeline,\n        get EventType () { return EventType; },\n        IkConstraint: IkConstraint,\n        IkConstraintData: IkConstraintData,\n        IkConstraintTimeline: IkConstraintTimeline,\n        JitterEffect: JitterEffect,\n        MeshAttachment: MeshAttachment,\n        PathAttachment: PathAttachment,\n        PathConstraint: PathConstraint,\n        PathConstraintData: PathConstraintData,\n        PathConstraintMixTimeline: PathConstraintMixTimeline,\n        PathConstraintPositionTimeline: PathConstraintPositionTimeline,\n        PathConstraintSpacingTimeline: PathConstraintSpacingTimeline,\n        PointAttachment: PointAttachment,\n        RGB2Timeline: RGB2Timeline,\n        RGBA2Timeline: RGBA2Timeline,\n        RGBATimeline: RGBATimeline,\n        RGBTimeline: RGBTimeline,\n        RegionAttachment: RegionAttachment,\n        RotateTimeline: RotateTimeline,\n        ScaleTimeline: ScaleTimeline,\n        ScaleXTimeline: ScaleXTimeline,\n        ScaleYTimeline: ScaleYTimeline,\n        ShearTimeline: ShearTimeline,\n        ShearXTimeline: ShearXTimeline,\n        ShearYTimeline: ShearYTimeline,\n        Skeleton: Skeleton,\n        SkeletonBinary: SkeletonBinary,\n        SkeletonBounds: SkeletonBounds,\n        SkeletonData: SkeletonData,\n        SkeletonJson: SkeletonJson,\n        Skin: Skin,\n        SkinEntry: SkinEntry,\n        Slot: Slot,\n        SlotData: SlotData,\n        get SpacingMode () { return SpacingMode; },\n        Spine: Spine$1,\n        SwirlEffect: SwirlEffect,\n        Timeline: Timeline,\n        TrackEntry: TrackEntry,\n        TransformConstraint: TransformConstraint,\n        TransformConstraintData: TransformConstraintData,\n        TransformConstraintTimeline: TransformConstraintTimeline,\n        TranslateTimeline: TranslateTimeline,\n        TranslateXTimeline: TranslateXTimeline,\n        TranslateYTimeline: TranslateYTimeline,\n        VertexAttachment: VertexAttachment\n    });\n\n    /* eslint-disable */\n\n    /*! *****************************************************************************\r\n    Copyright (c) Microsoft Corporation.\r\n\r\n    Permission to use, copy, modify, and/or distribute this software for any\r\n    purpose with or without fee is hereby granted.\r\n\r\n    THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\n    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\n    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\n    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\n    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\n    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\n    PERFORMANCE OF THIS SOFTWARE.\r\n    ***************************************************************************** */\r\n    /* global Reflect, Promise */\r\n\r\n    var extendStatics = function(d, b) {\r\n        extendStatics = Object.setPrototypeOf ||\r\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n        return extendStatics(d, b);\r\n    };\r\n\r\n    function __extends(d, b) {\r\n        if (typeof b !== \"function\" && b !== null)\r\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n        extendStatics(d, b);\r\n        function __() { this.constructor = d; }\r\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n    }\n\n    /**\r\n     * @public\r\n     */\r\n    var SPINE_VERSION;\r\n    (function (SPINE_VERSION) {\r\n        SPINE_VERSION[SPINE_VERSION[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\r\n        SPINE_VERSION[SPINE_VERSION[\"VER37\"] = 37] = \"VER37\";\r\n        SPINE_VERSION[SPINE_VERSION[\"VER38\"] = 38] = \"VER38\";\r\n        SPINE_VERSION[SPINE_VERSION[\"VER40\"] = 40] = \"VER40\";\r\n    })(SPINE_VERSION || (SPINE_VERSION = {}));\r\n    /**\r\n     * @public\r\n     */\r\n    function detectSpineVersion(version) {\r\n        var ver3 = version.substr(0, 3);\r\n        var verNum = Math.floor(+ver3 * 10 + 1e-3);\r\n        if (ver3 === '3.7') {\r\n            return SPINE_VERSION.VER37;\r\n        }\r\n        if (ver3 === '3.8') {\r\n            return SPINE_VERSION.VER38;\r\n        }\r\n        if (ver3 === '4.0') {\r\n            return SPINE_VERSION.VER40;\r\n        }\r\n        // try parse old versions with 3.7\r\n        if (verNum < SPINE_VERSION.VER37) {\r\n            return SPINE_VERSION.VER37;\r\n        }\r\n        return SPINE_VERSION.UNKNOWN;\r\n    }\n\n    var UniBinaryParser = /** @class */ (function () {\r\n        function UniBinaryParser() {\r\n            this.scale = 1;\r\n        }\r\n        UniBinaryParser.prototype.readSkeletonData = function (atlas, dataToParse) {\r\n            var input = new BinaryInput(dataToParse);\r\n            input.readString();\r\n            var version = input.readString();\r\n            var ver = detectSpineVersion(version);\r\n            var parser = null;\r\n            if (ver === SPINE_VERSION.VER38) {\r\n                parser = new SkeletonBinary$1(new AtlasAttachmentLoader$2(atlas));\r\n            }\r\n            input = new BinaryInput(dataToParse);\r\n            input.readInt32();\r\n            input.readInt32();\r\n            version = input.readString();\r\n            ver = detectSpineVersion(version);\r\n            if (ver === SPINE_VERSION.VER40) {\r\n                parser = new SkeletonBinary(new AtlasAttachmentLoader(atlas));\r\n            }\r\n            if (!parser) {\r\n                var error = \"Unsupported version of spine model \" + version + \", please update pixi-spine\";\r\n                console.error(error);\r\n            }\r\n            parser.scale = this.scale;\r\n            return parser.readSkeletonData(dataToParse);\r\n        };\r\n        return UniBinaryParser;\r\n    }());\r\n    var UniJsonParser = /** @class */ (function () {\r\n        function UniJsonParser() {\r\n            this.scale = 1;\r\n        }\r\n        UniJsonParser.prototype.readSkeletonData = function (atlas, dataToParse) {\r\n            var version = dataToParse.skeleton.spine;\r\n            var ver = detectSpineVersion(version);\r\n            var parser = null;\r\n            if (ver === SPINE_VERSION.VER37) {\r\n                parser = new SkeletonJson$1(new AtlasAttachmentLoader$1(atlas));\r\n            }\r\n            if (ver === SPINE_VERSION.VER38) {\r\n                parser = new SkeletonJson$2(new AtlasAttachmentLoader$2(atlas));\r\n            }\r\n            if (ver === SPINE_VERSION.VER40) {\r\n                parser = new SkeletonJson(new AtlasAttachmentLoader(atlas));\r\n            }\r\n            if (!parser) {\r\n                var error = \"Unsupported version of spine model \" + version + \", please update pixi-spine\";\r\n                console.error(error);\r\n            }\r\n            parser.scale = this.scale;\r\n            return parser.readSkeletonData(dataToParse);\r\n        };\r\n        return UniJsonParser;\r\n    }());\r\n    /**\r\n     * @public\r\n     */\r\n    var SpineParser = /** @class */ (function (_super) {\r\n        __extends(SpineParser, _super);\r\n        function SpineParser() {\r\n            return _super !== null && _super.apply(this, arguments) || this;\r\n        }\r\n        SpineParser.prototype.createBinaryParser = function () {\r\n            return new UniBinaryParser();\r\n        };\r\n        SpineParser.prototype.createJsonParser = function () {\r\n            return new UniJsonParser();\r\n        };\r\n        SpineParser.prototype.parseData = function (resource, parser, atlas, dataToParse) {\r\n            var parserCast = parser;\r\n            resource.spineData = parserCast.readSkeletonData(atlas, dataToParse);\r\n            resource.spineAtlas = atlas;\r\n        };\r\n        SpineParser.registerLoaderPlugin = function () {\r\n            loaders.Loader.registerPlugin(SpineParser);\r\n        };\r\n        SpineParser.use = new SpineParser().genMiddleware().use;\r\n        return SpineParser;\r\n    }(AbstractSpineParser));\n\n    /**\r\n     * @public\r\n     */\r\n    var Spine = /** @class */ (function (_super) {\r\n        __extends(Spine, _super);\r\n        function Spine() {\r\n            return _super !== null && _super.apply(this, arguments) || this;\r\n        }\r\n        Spine.prototype.createSkeleton = function (spineData) {\r\n            var ver = detectSpineVersion(spineData.version);\r\n            var spine = null;\r\n            if (ver === SPINE_VERSION.VER37) {\r\n                spine = spine37;\r\n            }\r\n            if (ver === SPINE_VERSION.VER38) {\r\n                spine = spine38;\r\n            }\r\n            if (ver === SPINE_VERSION.VER40) {\r\n                spine = spine40;\r\n            }\r\n            if (!spine) {\r\n                var error = \"Cant detect version of spine model \" + spineData.version;\r\n                console.error(error);\r\n            }\r\n            this.skeleton = new spine.Skeleton(spineData);\r\n            this.skeleton.updateWorldTransform();\r\n            this.stateData = new spine.AnimationStateData(spineData);\r\n            this.state = new spine.AnimationState(this.stateData);\r\n        };\r\n        return Spine;\r\n    }(SpineBase));\n\n    SpineParser.registerLoaderPlugin();\n\n    exports.BinaryInput = BinaryInput;\n    exports.Color = Color;\n    exports.DebugUtils = DebugUtils;\n    exports.IntSet = IntSet;\n    exports.Interpolation = Interpolation;\n    exports.MathUtils = MathUtils;\n    exports.Pool = Pool;\n    exports.Pow = Pow;\n    exports.PowOut = PowOut;\n    exports.SkeletonBounds = SkeletonBounds;\n    exports.Spine = Spine;\n    exports.SpineBase = SpineBase;\n    exports.SpineMesh = SpineMesh;\n    exports.SpineParser = SpineParser;\n    exports.SpineSprite = SpineSprite;\n    exports.StringSet = StringSet;\n    exports.TextureAtlas = TextureAtlas;\n    exports.TextureAtlasPage = TextureAtlasPage;\n    exports.TextureAtlasRegion = TextureAtlasRegion;\n    exports.TextureRegion = TextureRegion;\n    exports.TimeKeeper = TimeKeeper;\n    exports.Utils = Utils;\n    exports.Vector2 = Vector2;\n    exports.WindowedMean = WindowedMean;\n    exports.filterFromString = filterFromString;\n    exports.settings = settings;\n    exports.wrapFromString = wrapFromString;\n\n    Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\nif (typeof pixi_spine !== 'undefined') { Object.assign(this.PIXI.spine, pixi_spine); }\n//# sourceMappingURL=pixi-spine.umd.js.map\n"
  },
  {
    "path": "src/renderer/public/lib/three/ammo.wasm.js",
    "content": "\n// This is ammo.js, a port of Bullet Physics to JavaScript. zlib licensed.\n\nvar Ammo = (function() {\n  var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;\n  if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;\n  return (\nfunction(Ammo) {\n  Ammo = Ammo || {};\n\n\nvar b;b||(b=typeof Ammo !== 'undefined' ? Ammo : {});var ba;b.ready=new Promise(function(a){ba=a});var ca={},da;for(da in b)b.hasOwnProperty(da)&&(ca[da]=b[da]);var ea=!1,fa=!1,ha=!1,ia=!1;ea=\"object\"===typeof window;fa=\"function\"===typeof importScripts;ha=\"object\"===typeof process&&\"object\"===typeof process.versions&&\"string\"===typeof process.versions.node;ia=!ea&&!ha&&!fa;var ja=\"\",ka,la,ma,na;\nif(ha)ja=fa?require(\"path\").dirname(ja)+\"/\":__dirname+\"/\",ka=function(a,c){ma||(ma=require(\"fs\"));na||(na=require(\"path\"));a=na.normalize(a);return ma.readFileSync(a,c?null:\"utf8\")},la=function(a){a=ka(a,!0);a.buffer||(a=new Uint8Array(a));assert(a.buffer);return a},1<process.argv.length&&process.argv[1].replace(/\\\\/g,\"/\"),process.argv.slice(2),process.on(\"uncaughtException\",function(a){throw a;}),process.on(\"unhandledRejection\",oa),b.inspect=function(){return\"[Emscripten Module object]\"};else if(ia)\"undefined\"!=\ntypeof read&&(ka=function(a){return read(a)}),la=function(a){if(\"function\"===typeof readbuffer)return new Uint8Array(readbuffer(a));a=read(a,\"binary\");assert(\"object\"===typeof a);return a},\"undefined\"!==typeof print&&(\"undefined\"===typeof console&&(console={}),console.log=print,console.warn=console.error=\"undefined\"!==typeof printErr?printErr:print);else if(ea||fa)fa?ja=self.location.href:document.currentScript&&(ja=document.currentScript.src),_scriptDir&&(ja=_scriptDir),ja=0!==ja.indexOf(\"blob:\")?\nja.substr(0,ja.lastIndexOf(\"/\")+1):\"\",ka=function(a){var c=new XMLHttpRequest;c.open(\"GET\",a,!1);c.send(null);return c.responseText},fa&&(la=function(a){var c=new XMLHttpRequest;c.open(\"GET\",a,!1);c.responseType=\"arraybuffer\";c.send(null);return new Uint8Array(c.response)});var pa=b.print||console.log.bind(console),qa=b.printErr||console.warn.bind(console);for(da in ca)ca.hasOwnProperty(da)&&(b[da]=ca[da]);ca=null;var ra;b.wasmBinary&&(ra=b.wasmBinary);var noExitRuntime;\nb.noExitRuntime&&(noExitRuntime=b.noExitRuntime);\"object\"!==typeof WebAssembly&&qa(\"no native wasm support detected\");var sa,ua=new WebAssembly.Table({initial:930,maximum:930,element:\"anyfunc\"}),va=!1;function assert(a,c){a||oa(\"Assertion failed: \"+c)}var wa=\"undefined\"!==typeof TextDecoder?new TextDecoder(\"utf8\"):void 0,xa,ya,za,Aa,Ba,Ca,Da=b.INITIAL_MEMORY||67108864;if(sa=b.wasmMemory?b.wasmMemory:new WebAssembly.Memory({initial:Da/65536,maximum:Da/65536}))xa=sa.buffer;Da=xa.byteLength;var Ea=xa;\nxa=Ea;b.HEAP8=ya=new Int8Array(Ea);b.HEAP16=new Int16Array(Ea);b.HEAP32=Aa=new Int32Array(Ea);b.HEAPU8=za=new Uint8Array(Ea);b.HEAPU16=new Uint16Array(Ea);b.HEAPU32=new Uint32Array(Ea);b.HEAPF32=Ba=new Float32Array(Ea);b.HEAPF64=Ca=new Float64Array(Ea);Aa[7848]=5274432;function Fa(a){for(;0<a.length;){var c=a.shift();if(\"function\"==typeof c)c(b);else{var d=c.Xy;\"number\"===typeof d?void 0===c.Ey?b.dynCall_v(d):b.dynCall_vi(d,c.Ey):d(void 0===c.Ey?null:c.Ey)}}}var Ga=[],Ha=[],Ia=[],Ja=[],Ka=!1;\nfunction La(){var a=b.preRun.shift();Ga.unshift(a)}var Ma=0,Na=null,Oa=null;b.preloadedImages={};b.preloadedAudios={};function oa(a){if(b.onAbort)b.onAbort(a);a+=\"\";pa(a);qa(a);va=!0;throw new WebAssembly.RuntimeError(\"abort(\"+a+\"). Build with -s ASSERTIONS=1 for more info.\");}function Pa(a){var c=Qa;return String.prototype.startsWith?c.startsWith(a):0===c.indexOf(a)}function Ra(){return Pa(\"data:application/octet-stream;base64,\")}var Qa=\"ammo.wasm.wasm\";\nif(!Ra()){var Sa=Qa;Qa=b.locateFile?b.locateFile(Sa,ja):ja+Sa}function Ta(){try{if(ra)return new Uint8Array(ra);if(la)return la(Qa);throw\"both async and sync fetching of the wasm failed\";}catch(a){oa(a)}}function Ua(){return ra||!ea&&!fa||\"function\"!==typeof fetch?new Promise(function(a){a(Ta())}):fetch(Qa,{credentials:\"same-origin\"}).then(function(a){if(!a.ok)throw\"failed to load wasm binary file at '\"+Qa+\"'\";return a.arrayBuffer()}).catch(function(){return Ta()})}\nvar Va={1960:function(a,c,d,e,g,n,F,aa){a=b.getCache(b.ConcreteContactResultCallback)[a];if(!a.hasOwnProperty(\"addSingleResult\"))throw\"a JSImplementation must implement all functions, you forgot ConcreteContactResultCallback::addSingleResult.\";return a.addSingleResult(c,d,e,g,n,F,aa)},2520:function(a,c,d,e){a=b.getCache(b.DebugDrawer)[a];if(!a.hasOwnProperty(\"drawLine\"))throw\"a JSImplementation must implement all functions, you forgot DebugDrawer::drawLine.\";a.drawLine(c,d,e)},2745:function(a,c,d,\ne,g,n){a=b.getCache(b.DebugDrawer)[a];if(!a.hasOwnProperty(\"drawContactPoint\"))throw\"a JSImplementation must implement all functions, you forgot DebugDrawer::drawContactPoint.\";a.drawContactPoint(c,d,e,g,n)},3002:function(a,c){a=b.getCache(b.DebugDrawer)[a];if(!a.hasOwnProperty(\"reportErrorWarning\"))throw\"a JSImplementation must implement all functions, you forgot DebugDrawer::reportErrorWarning.\";a.reportErrorWarning(c)},3249:function(a,c,d){a=b.getCache(b.DebugDrawer)[a];if(!a.hasOwnProperty(\"draw3dText\"))throw\"a JSImplementation must implement all functions, you forgot DebugDrawer::draw3dText.\";\na.draw3dText(c,d)},3476:function(a,c){a=b.getCache(b.DebugDrawer)[a];if(!a.hasOwnProperty(\"setDebugMode\"))throw\"a JSImplementation must implement all functions, you forgot DebugDrawer::setDebugMode.\";a.setDebugMode(c)},3705:function(a){a=b.getCache(b.DebugDrawer)[a];if(!a.hasOwnProperty(\"getDebugMode\"))throw\"a JSImplementation must implement all functions, you forgot DebugDrawer::getDebugMode.\";return a.getDebugMode()}};Ha.push({Xy:function(){Wa()}});var Xa=[];\nfunction Ya(a,c){Xa.length=0;var d;for(c>>=2;d=za[a++];)Xa.push(105>d?Ca[++c>>1]:Aa[c]),++c;return Xa}var Za={f:function(){oa()},c:function(a,c,d){c=Ya(c,d);return Va[a].apply(null,c)},a:function(a,c,d){c=Ya(c,d);return Va[a].apply(null,c)},d:function(a,c,d){za.copyWithin(a,c,c+d)},e:function(){oa(\"OOM\")},b:function(a){var c=Date.now();Aa[a>>2]=c/1E3|0;Aa[a+4>>2]=c%1E3*1E3|0;return 0},memory:sa,table:ua};\n(function(){function a(g){b.asm=g.exports;Ma--;b.monitorRunDependencies&&b.monitorRunDependencies(Ma);0==Ma&&(null!==Na&&(clearInterval(Na),Na=null),Oa&&(g=Oa,Oa=null,g()))}function c(g){a(g.instance)}function d(g){return Ua().then(function(n){return WebAssembly.instantiate(n,e)}).then(g,function(n){qa(\"failed to asynchronously prepare wasm: \"+n);oa(n)})}var e={a:Za};Ma++;b.monitorRunDependencies&&b.monitorRunDependencies(Ma);if(b.instantiateWasm)try{return b.instantiateWasm(e,a)}catch(g){return qa(\"Module.instantiateWasm callback failed with error: \"+\ng),!1}(function(){if(ra||\"function\"!==typeof WebAssembly.instantiateStreaming||Ra()||Pa(\"file://\")||\"function\"!==typeof fetch)return d(c);fetch(Qa,{credentials:\"same-origin\"}).then(function(g){return WebAssembly.instantiateStreaming(g,e).then(c,function(n){qa(\"wasm streaming compile failed: \"+n);qa(\"falling back to ArrayBuffer instantiation\");return d(c)})})})();return{}})();var Wa=b.___wasm_call_ctors=function(){return(Wa=b.___wasm_call_ctors=b.asm.g).apply(null,arguments)};\nb.___em_js__array_bounds_check_error=function(){return(b.___em_js__array_bounds_check_error=b.asm.h).apply(null,arguments)};\nvar $a=b._emscripten_bind_btCollisionWorld_getDispatcher_0=function(){return($a=b._emscripten_bind_btCollisionWorld_getDispatcher_0=b.asm.i).apply(null,arguments)},ab=b._emscripten_bind_btCollisionWorld_rayTest_3=function(){return(ab=b._emscripten_bind_btCollisionWorld_rayTest_3=b.asm.j).apply(null,arguments)},bb=b._emscripten_bind_btCollisionWorld_getPairCache_0=function(){return(bb=b._emscripten_bind_btCollisionWorld_getPairCache_0=b.asm.k).apply(null,arguments)},cb=b._emscripten_bind_btCollisionWorld_getDispatchInfo_0=\nfunction(){return(cb=b._emscripten_bind_btCollisionWorld_getDispatchInfo_0=b.asm.l).apply(null,arguments)},db=b._emscripten_bind_btCollisionWorld_addCollisionObject_1=function(){return(db=b._emscripten_bind_btCollisionWorld_addCollisionObject_1=b.asm.m).apply(null,arguments)},eb=b._emscripten_bind_btCollisionWorld_addCollisionObject_2=function(){return(eb=b._emscripten_bind_btCollisionWorld_addCollisionObject_2=b.asm.n).apply(null,arguments)},fb=b._emscripten_bind_btCollisionWorld_addCollisionObject_3=\nfunction(){return(fb=b._emscripten_bind_btCollisionWorld_addCollisionObject_3=b.asm.o).apply(null,arguments)},gb=b._emscripten_bind_btCollisionWorld_removeCollisionObject_1=function(){return(gb=b._emscripten_bind_btCollisionWorld_removeCollisionObject_1=b.asm.p).apply(null,arguments)},hb=b._emscripten_bind_btCollisionWorld_getBroadphase_0=function(){return(hb=b._emscripten_bind_btCollisionWorld_getBroadphase_0=b.asm.q).apply(null,arguments)},ib=b._emscripten_bind_btCollisionWorld_convexSweepTest_5=\nfunction(){return(ib=b._emscripten_bind_btCollisionWorld_convexSweepTest_5=b.asm.r).apply(null,arguments)},jb=b._emscripten_bind_btCollisionWorld_contactPairTest_3=function(){return(jb=b._emscripten_bind_btCollisionWorld_contactPairTest_3=b.asm.s).apply(null,arguments)},kb=b._emscripten_bind_btCollisionWorld_contactTest_2=function(){return(kb=b._emscripten_bind_btCollisionWorld_contactTest_2=b.asm.t).apply(null,arguments)},lb=b._emscripten_bind_btCollisionWorld_updateSingleAabb_1=function(){return(lb=\nb._emscripten_bind_btCollisionWorld_updateSingleAabb_1=b.asm.u).apply(null,arguments)},mb=b._emscripten_bind_btCollisionWorld_setDebugDrawer_1=function(){return(mb=b._emscripten_bind_btCollisionWorld_setDebugDrawer_1=b.asm.v).apply(null,arguments)},nb=b._emscripten_bind_btCollisionWorld_getDebugDrawer_0=function(){return(nb=b._emscripten_bind_btCollisionWorld_getDebugDrawer_0=b.asm.w).apply(null,arguments)},ob=b._emscripten_bind_btCollisionWorld_debugDrawWorld_0=function(){return(ob=b._emscripten_bind_btCollisionWorld_debugDrawWorld_0=\nb.asm.x).apply(null,arguments)},pb=b._emscripten_bind_btCollisionWorld_debugDrawObject_3=function(){return(pb=b._emscripten_bind_btCollisionWorld_debugDrawObject_3=b.asm.y).apply(null,arguments)},qb=b._emscripten_bind_btCollisionWorld___destroy___0=function(){return(qb=b._emscripten_bind_btCollisionWorld___destroy___0=b.asm.z).apply(null,arguments)},rb=b._emscripten_bind_btCollisionShape_setLocalScaling_1=function(){return(rb=b._emscripten_bind_btCollisionShape_setLocalScaling_1=b.asm.A).apply(null,\narguments)},sb=b._emscripten_bind_btCollisionShape_getLocalScaling_0=function(){return(sb=b._emscripten_bind_btCollisionShape_getLocalScaling_0=b.asm.B).apply(null,arguments)},tb=b._emscripten_bind_btCollisionShape_calculateLocalInertia_2=function(){return(tb=b._emscripten_bind_btCollisionShape_calculateLocalInertia_2=b.asm.C).apply(null,arguments)},ub=b._emscripten_bind_btCollisionShape_setMargin_1=function(){return(ub=b._emscripten_bind_btCollisionShape_setMargin_1=b.asm.D).apply(null,arguments)},\nvb=b._emscripten_bind_btCollisionShape_getMargin_0=function(){return(vb=b._emscripten_bind_btCollisionShape_getMargin_0=b.asm.E).apply(null,arguments)},wb=b._emscripten_bind_btCollisionShape___destroy___0=function(){return(wb=b._emscripten_bind_btCollisionShape___destroy___0=b.asm.F).apply(null,arguments)},xb=b._emscripten_bind_btCollisionObject_setAnisotropicFriction_2=function(){return(xb=b._emscripten_bind_btCollisionObject_setAnisotropicFriction_2=b.asm.G).apply(null,arguments)},yb=b._emscripten_bind_btCollisionObject_getCollisionShape_0=\nfunction(){return(yb=b._emscripten_bind_btCollisionObject_getCollisionShape_0=b.asm.H).apply(null,arguments)},zb=b._emscripten_bind_btCollisionObject_setContactProcessingThreshold_1=function(){return(zb=b._emscripten_bind_btCollisionObject_setContactProcessingThreshold_1=b.asm.I).apply(null,arguments)},Ab=b._emscripten_bind_btCollisionObject_setActivationState_1=function(){return(Ab=b._emscripten_bind_btCollisionObject_setActivationState_1=b.asm.J).apply(null,arguments)},Bb=b._emscripten_bind_btCollisionObject_forceActivationState_1=\nfunction(){return(Bb=b._emscripten_bind_btCollisionObject_forceActivationState_1=b.asm.K).apply(null,arguments)},Cb=b._emscripten_bind_btCollisionObject_activate_0=function(){return(Cb=b._emscripten_bind_btCollisionObject_activate_0=b.asm.L).apply(null,arguments)},Db=b._emscripten_bind_btCollisionObject_activate_1=function(){return(Db=b._emscripten_bind_btCollisionObject_activate_1=b.asm.M).apply(null,arguments)},Eb=b._emscripten_bind_btCollisionObject_isActive_0=function(){return(Eb=b._emscripten_bind_btCollisionObject_isActive_0=\nb.asm.N).apply(null,arguments)},Fb=b._emscripten_bind_btCollisionObject_isKinematicObject_0=function(){return(Fb=b._emscripten_bind_btCollisionObject_isKinematicObject_0=b.asm.O).apply(null,arguments)},Gb=b._emscripten_bind_btCollisionObject_isStaticObject_0=function(){return(Gb=b._emscripten_bind_btCollisionObject_isStaticObject_0=b.asm.P).apply(null,arguments)},Hb=b._emscripten_bind_btCollisionObject_isStaticOrKinematicObject_0=function(){return(Hb=b._emscripten_bind_btCollisionObject_isStaticOrKinematicObject_0=\nb.asm.Q).apply(null,arguments)},Ib=b._emscripten_bind_btCollisionObject_getRestitution_0=function(){return(Ib=b._emscripten_bind_btCollisionObject_getRestitution_0=b.asm.R).apply(null,arguments)},Jb=b._emscripten_bind_btCollisionObject_getFriction_0=function(){return(Jb=b._emscripten_bind_btCollisionObject_getFriction_0=b.asm.S).apply(null,arguments)},Kb=b._emscripten_bind_btCollisionObject_getRollingFriction_0=function(){return(Kb=b._emscripten_bind_btCollisionObject_getRollingFriction_0=b.asm.T).apply(null,\narguments)},Lb=b._emscripten_bind_btCollisionObject_setRestitution_1=function(){return(Lb=b._emscripten_bind_btCollisionObject_setRestitution_1=b.asm.U).apply(null,arguments)},Mb=b._emscripten_bind_btCollisionObject_setFriction_1=function(){return(Mb=b._emscripten_bind_btCollisionObject_setFriction_1=b.asm.V).apply(null,arguments)},Nb=b._emscripten_bind_btCollisionObject_setRollingFriction_1=function(){return(Nb=b._emscripten_bind_btCollisionObject_setRollingFriction_1=b.asm.W).apply(null,arguments)},\nOb=b._emscripten_bind_btCollisionObject_getWorldTransform_0=function(){return(Ob=b._emscripten_bind_btCollisionObject_getWorldTransform_0=b.asm.X).apply(null,arguments)},Pb=b._emscripten_bind_btCollisionObject_getCollisionFlags_0=function(){return(Pb=b._emscripten_bind_btCollisionObject_getCollisionFlags_0=b.asm.Y).apply(null,arguments)},Qb=b._emscripten_bind_btCollisionObject_setCollisionFlags_1=function(){return(Qb=b._emscripten_bind_btCollisionObject_setCollisionFlags_1=b.asm.Z).apply(null,arguments)},\nSb=b._emscripten_bind_btCollisionObject_setWorldTransform_1=function(){return(Sb=b._emscripten_bind_btCollisionObject_setWorldTransform_1=b.asm._).apply(null,arguments)},Tb=b._emscripten_bind_btCollisionObject_setCollisionShape_1=function(){return(Tb=b._emscripten_bind_btCollisionObject_setCollisionShape_1=b.asm.$).apply(null,arguments)},Ub=b._emscripten_bind_btCollisionObject_setCcdMotionThreshold_1=function(){return(Ub=b._emscripten_bind_btCollisionObject_setCcdMotionThreshold_1=b.asm.aa).apply(null,\narguments)},Vb=b._emscripten_bind_btCollisionObject_setCcdSweptSphereRadius_1=function(){return(Vb=b._emscripten_bind_btCollisionObject_setCcdSweptSphereRadius_1=b.asm.ba).apply(null,arguments)},Wb=b._emscripten_bind_btCollisionObject_getUserIndex_0=function(){return(Wb=b._emscripten_bind_btCollisionObject_getUserIndex_0=b.asm.ca).apply(null,arguments)},Xb=b._emscripten_bind_btCollisionObject_setUserIndex_1=function(){return(Xb=b._emscripten_bind_btCollisionObject_setUserIndex_1=b.asm.da).apply(null,\narguments)},Yb=b._emscripten_bind_btCollisionObject_getUserPointer_0=function(){return(Yb=b._emscripten_bind_btCollisionObject_getUserPointer_0=b.asm.ea).apply(null,arguments)},Zb=b._emscripten_bind_btCollisionObject_setUserPointer_1=function(){return(Zb=b._emscripten_bind_btCollisionObject_setUserPointer_1=b.asm.fa).apply(null,arguments)},$b=b._emscripten_bind_btCollisionObject_getBroadphaseHandle_0=function(){return($b=b._emscripten_bind_btCollisionObject_getBroadphaseHandle_0=b.asm.ga).apply(null,\narguments)},ac=b._emscripten_bind_btCollisionObject___destroy___0=function(){return(ac=b._emscripten_bind_btCollisionObject___destroy___0=b.asm.ha).apply(null,arguments)},bc=b._emscripten_bind_btDynamicsWorld_addAction_1=function(){return(bc=b._emscripten_bind_btDynamicsWorld_addAction_1=b.asm.ia).apply(null,arguments)},cc=b._emscripten_bind_btDynamicsWorld_removeAction_1=function(){return(cc=b._emscripten_bind_btDynamicsWorld_removeAction_1=b.asm.ja).apply(null,arguments)},dc=b._emscripten_bind_btDynamicsWorld_getSolverInfo_0=\nfunction(){return(dc=b._emscripten_bind_btDynamicsWorld_getSolverInfo_0=b.asm.ka).apply(null,arguments)},ec=b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_1=function(){return(ec=b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_1=b.asm.la).apply(null,arguments)},fc=b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_2=function(){return(fc=b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_2=b.asm.ma).apply(null,arguments)},hc=b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_3=\nfunction(){return(hc=b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_3=b.asm.na).apply(null,arguments)},ic=b._emscripten_bind_btDynamicsWorld_getDispatcher_0=function(){return(ic=b._emscripten_bind_btDynamicsWorld_getDispatcher_0=b.asm.oa).apply(null,arguments)},jc=b._emscripten_bind_btDynamicsWorld_rayTest_3=function(){return(jc=b._emscripten_bind_btDynamicsWorld_rayTest_3=b.asm.pa).apply(null,arguments)},kc=b._emscripten_bind_btDynamicsWorld_getPairCache_0=function(){return(kc=b._emscripten_bind_btDynamicsWorld_getPairCache_0=\nb.asm.qa).apply(null,arguments)},lc=b._emscripten_bind_btDynamicsWorld_getDispatchInfo_0=function(){return(lc=b._emscripten_bind_btDynamicsWorld_getDispatchInfo_0=b.asm.ra).apply(null,arguments)},mc=b._emscripten_bind_btDynamicsWorld_addCollisionObject_1=function(){return(mc=b._emscripten_bind_btDynamicsWorld_addCollisionObject_1=b.asm.sa).apply(null,arguments)},nc=b._emscripten_bind_btDynamicsWorld_addCollisionObject_2=function(){return(nc=b._emscripten_bind_btDynamicsWorld_addCollisionObject_2=\nb.asm.ta).apply(null,arguments)},oc=b._emscripten_bind_btDynamicsWorld_addCollisionObject_3=function(){return(oc=b._emscripten_bind_btDynamicsWorld_addCollisionObject_3=b.asm.ua).apply(null,arguments)},pc=b._emscripten_bind_btDynamicsWorld_removeCollisionObject_1=function(){return(pc=b._emscripten_bind_btDynamicsWorld_removeCollisionObject_1=b.asm.va).apply(null,arguments)},qc=b._emscripten_bind_btDynamicsWorld_getBroadphase_0=function(){return(qc=b._emscripten_bind_btDynamicsWorld_getBroadphase_0=\nb.asm.wa).apply(null,arguments)},rc=b._emscripten_bind_btDynamicsWorld_convexSweepTest_5=function(){return(rc=b._emscripten_bind_btDynamicsWorld_convexSweepTest_5=b.asm.xa).apply(null,arguments)},sc=b._emscripten_bind_btDynamicsWorld_contactPairTest_3=function(){return(sc=b._emscripten_bind_btDynamicsWorld_contactPairTest_3=b.asm.ya).apply(null,arguments)},tc=b._emscripten_bind_btDynamicsWorld_contactTest_2=function(){return(tc=b._emscripten_bind_btDynamicsWorld_contactTest_2=b.asm.za).apply(null,\narguments)},uc=b._emscripten_bind_btDynamicsWorld_updateSingleAabb_1=function(){return(uc=b._emscripten_bind_btDynamicsWorld_updateSingleAabb_1=b.asm.Aa).apply(null,arguments)},vc=b._emscripten_bind_btDynamicsWorld_setDebugDrawer_1=function(){return(vc=b._emscripten_bind_btDynamicsWorld_setDebugDrawer_1=b.asm.Ba).apply(null,arguments)},wc=b._emscripten_bind_btDynamicsWorld_getDebugDrawer_0=function(){return(wc=b._emscripten_bind_btDynamicsWorld_getDebugDrawer_0=b.asm.Ca).apply(null,arguments)},xc=\nb._emscripten_bind_btDynamicsWorld_debugDrawWorld_0=function(){return(xc=b._emscripten_bind_btDynamicsWorld_debugDrawWorld_0=b.asm.Da).apply(null,arguments)},yc=b._emscripten_bind_btDynamicsWorld_debugDrawObject_3=function(){return(yc=b._emscripten_bind_btDynamicsWorld_debugDrawObject_3=b.asm.Ea).apply(null,arguments)},zc=b._emscripten_bind_btDynamicsWorld___destroy___0=function(){return(zc=b._emscripten_bind_btDynamicsWorld___destroy___0=b.asm.Fa).apply(null,arguments)},Ac=b._emscripten_bind_btTypedConstraint_enableFeedback_1=\nfunction(){return(Ac=b._emscripten_bind_btTypedConstraint_enableFeedback_1=b.asm.Ga).apply(null,arguments)},Bc=b._emscripten_bind_btTypedConstraint_getBreakingImpulseThreshold_0=function(){return(Bc=b._emscripten_bind_btTypedConstraint_getBreakingImpulseThreshold_0=b.asm.Ha).apply(null,arguments)},Cc=b._emscripten_bind_btTypedConstraint_setBreakingImpulseThreshold_1=function(){return(Cc=b._emscripten_bind_btTypedConstraint_setBreakingImpulseThreshold_1=b.asm.Ia).apply(null,arguments)},Dc=b._emscripten_bind_btTypedConstraint_getParam_2=\nfunction(){return(Dc=b._emscripten_bind_btTypedConstraint_getParam_2=b.asm.Ja).apply(null,arguments)},Ec=b._emscripten_bind_btTypedConstraint_setParam_3=function(){return(Ec=b._emscripten_bind_btTypedConstraint_setParam_3=b.asm.Ka).apply(null,arguments)},Fc=b._emscripten_bind_btTypedConstraint___destroy___0=function(){return(Fc=b._emscripten_bind_btTypedConstraint___destroy___0=b.asm.La).apply(null,arguments)},Gc=b._emscripten_bind_btConcaveShape_setLocalScaling_1=function(){return(Gc=b._emscripten_bind_btConcaveShape_setLocalScaling_1=\nb.asm.Ma).apply(null,arguments)},Hc=b._emscripten_bind_btConcaveShape_getLocalScaling_0=function(){return(Hc=b._emscripten_bind_btConcaveShape_getLocalScaling_0=b.asm.Na).apply(null,arguments)},Ic=b._emscripten_bind_btConcaveShape_calculateLocalInertia_2=function(){return(Ic=b._emscripten_bind_btConcaveShape_calculateLocalInertia_2=b.asm.Oa).apply(null,arguments)},Jc=b._emscripten_bind_btConcaveShape___destroy___0=function(){return(Jc=b._emscripten_bind_btConcaveShape___destroy___0=b.asm.Pa).apply(null,\narguments)},Kc=b._emscripten_bind_btCapsuleShape_btCapsuleShape_2=function(){return(Kc=b._emscripten_bind_btCapsuleShape_btCapsuleShape_2=b.asm.Qa).apply(null,arguments)},Lc=b._emscripten_bind_btCapsuleShape_setMargin_1=function(){return(Lc=b._emscripten_bind_btCapsuleShape_setMargin_1=b.asm.Ra).apply(null,arguments)},Mc=b._emscripten_bind_btCapsuleShape_getMargin_0=function(){return(Mc=b._emscripten_bind_btCapsuleShape_getMargin_0=b.asm.Sa).apply(null,arguments)},Nc=b._emscripten_bind_btCapsuleShape_getUpAxis_0=\nfunction(){return(Nc=b._emscripten_bind_btCapsuleShape_getUpAxis_0=b.asm.Ta).apply(null,arguments)},Oc=b._emscripten_bind_btCapsuleShape_getRadius_0=function(){return(Oc=b._emscripten_bind_btCapsuleShape_getRadius_0=b.asm.Ua).apply(null,arguments)},Pc=b._emscripten_bind_btCapsuleShape_getHalfHeight_0=function(){return(Pc=b._emscripten_bind_btCapsuleShape_getHalfHeight_0=b.asm.Va).apply(null,arguments)},Qc=b._emscripten_bind_btCapsuleShape_setLocalScaling_1=function(){return(Qc=b._emscripten_bind_btCapsuleShape_setLocalScaling_1=\nb.asm.Wa).apply(null,arguments)},Rc=b._emscripten_bind_btCapsuleShape_getLocalScaling_0=function(){return(Rc=b._emscripten_bind_btCapsuleShape_getLocalScaling_0=b.asm.Xa).apply(null,arguments)},Sc=b._emscripten_bind_btCapsuleShape_calculateLocalInertia_2=function(){return(Sc=b._emscripten_bind_btCapsuleShape_calculateLocalInertia_2=b.asm.Ya).apply(null,arguments)},Tc=b._emscripten_bind_btCapsuleShape___destroy___0=function(){return(Tc=b._emscripten_bind_btCapsuleShape___destroy___0=b.asm.Za).apply(null,\narguments)},Uc=b._emscripten_bind_btIDebugDraw_drawLine_3=function(){return(Uc=b._emscripten_bind_btIDebugDraw_drawLine_3=b.asm._a).apply(null,arguments)},Vc=b._emscripten_bind_btIDebugDraw_drawContactPoint_5=function(){return(Vc=b._emscripten_bind_btIDebugDraw_drawContactPoint_5=b.asm.$a).apply(null,arguments)},Wc=b._emscripten_bind_btIDebugDraw_reportErrorWarning_1=function(){return(Wc=b._emscripten_bind_btIDebugDraw_reportErrorWarning_1=b.asm.ab).apply(null,arguments)},Xc=b._emscripten_bind_btIDebugDraw_draw3dText_2=\nfunction(){return(Xc=b._emscripten_bind_btIDebugDraw_draw3dText_2=b.asm.bb).apply(null,arguments)},Yc=b._emscripten_bind_btIDebugDraw_setDebugMode_1=function(){return(Yc=b._emscripten_bind_btIDebugDraw_setDebugMode_1=b.asm.cb).apply(null,arguments)},Zc=b._emscripten_bind_btIDebugDraw_getDebugMode_0=function(){return(Zc=b._emscripten_bind_btIDebugDraw_getDebugMode_0=b.asm.db).apply(null,arguments)},$c=b._emscripten_bind_btIDebugDraw___destroy___0=function(){return($c=b._emscripten_bind_btIDebugDraw___destroy___0=\nb.asm.eb).apply(null,arguments)},ad=b._emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_0=function(){return(ad=b._emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_0=b.asm.fb).apply(null,arguments)},bd=b._emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_1=function(){return(bd=b._emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_1=b.asm.gb).apply(null,arguments)},cd=b._emscripten_bind_btDefaultCollisionConfiguration___destroy___0=\nfunction(){return(cd=b._emscripten_bind_btDefaultCollisionConfiguration___destroy___0=b.asm.hb).apply(null,arguments)},dd=b._emscripten_bind_btTriangleMeshShape_setLocalScaling_1=function(){return(dd=b._emscripten_bind_btTriangleMeshShape_setLocalScaling_1=b.asm.ib).apply(null,arguments)},ed=b._emscripten_bind_btTriangleMeshShape_getLocalScaling_0=function(){return(ed=b._emscripten_bind_btTriangleMeshShape_getLocalScaling_0=b.asm.jb).apply(null,arguments)},fd=b._emscripten_bind_btTriangleMeshShape_calculateLocalInertia_2=\nfunction(){return(fd=b._emscripten_bind_btTriangleMeshShape_calculateLocalInertia_2=b.asm.kb).apply(null,arguments)},gd=b._emscripten_bind_btTriangleMeshShape___destroy___0=function(){return(gd=b._emscripten_bind_btTriangleMeshShape___destroy___0=b.asm.lb).apply(null,arguments)},hd=b._emscripten_bind_btGhostObject_btGhostObject_0=function(){return(hd=b._emscripten_bind_btGhostObject_btGhostObject_0=b.asm.mb).apply(null,arguments)},id=b._emscripten_bind_btGhostObject_getNumOverlappingObjects_0=function(){return(id=\nb._emscripten_bind_btGhostObject_getNumOverlappingObjects_0=b.asm.nb).apply(null,arguments)},jd=b._emscripten_bind_btGhostObject_getOverlappingObject_1=function(){return(jd=b._emscripten_bind_btGhostObject_getOverlappingObject_1=b.asm.ob).apply(null,arguments)},kd=b._emscripten_bind_btGhostObject_setAnisotropicFriction_2=function(){return(kd=b._emscripten_bind_btGhostObject_setAnisotropicFriction_2=b.asm.pb).apply(null,arguments)},ld=b._emscripten_bind_btGhostObject_getCollisionShape_0=function(){return(ld=\nb._emscripten_bind_btGhostObject_getCollisionShape_0=b.asm.qb).apply(null,arguments)},md=b._emscripten_bind_btGhostObject_setContactProcessingThreshold_1=function(){return(md=b._emscripten_bind_btGhostObject_setContactProcessingThreshold_1=b.asm.rb).apply(null,arguments)},nd=b._emscripten_bind_btGhostObject_setActivationState_1=function(){return(nd=b._emscripten_bind_btGhostObject_setActivationState_1=b.asm.sb).apply(null,arguments)},od=b._emscripten_bind_btGhostObject_forceActivationState_1=function(){return(od=\nb._emscripten_bind_btGhostObject_forceActivationState_1=b.asm.tb).apply(null,arguments)},pd=b._emscripten_bind_btGhostObject_activate_0=function(){return(pd=b._emscripten_bind_btGhostObject_activate_0=b.asm.ub).apply(null,arguments)},qd=b._emscripten_bind_btGhostObject_activate_1=function(){return(qd=b._emscripten_bind_btGhostObject_activate_1=b.asm.vb).apply(null,arguments)},rd=b._emscripten_bind_btGhostObject_isActive_0=function(){return(rd=b._emscripten_bind_btGhostObject_isActive_0=b.asm.wb).apply(null,\narguments)},sd=b._emscripten_bind_btGhostObject_isKinematicObject_0=function(){return(sd=b._emscripten_bind_btGhostObject_isKinematicObject_0=b.asm.xb).apply(null,arguments)},td=b._emscripten_bind_btGhostObject_isStaticObject_0=function(){return(td=b._emscripten_bind_btGhostObject_isStaticObject_0=b.asm.yb).apply(null,arguments)},ud=b._emscripten_bind_btGhostObject_isStaticOrKinematicObject_0=function(){return(ud=b._emscripten_bind_btGhostObject_isStaticOrKinematicObject_0=b.asm.zb).apply(null,arguments)},\nvd=b._emscripten_bind_btGhostObject_getRestitution_0=function(){return(vd=b._emscripten_bind_btGhostObject_getRestitution_0=b.asm.Ab).apply(null,arguments)},wd=b._emscripten_bind_btGhostObject_getFriction_0=function(){return(wd=b._emscripten_bind_btGhostObject_getFriction_0=b.asm.Bb).apply(null,arguments)},xd=b._emscripten_bind_btGhostObject_getRollingFriction_0=function(){return(xd=b._emscripten_bind_btGhostObject_getRollingFriction_0=b.asm.Cb).apply(null,arguments)},yd=b._emscripten_bind_btGhostObject_setRestitution_1=\nfunction(){return(yd=b._emscripten_bind_btGhostObject_setRestitution_1=b.asm.Db).apply(null,arguments)},zd=b._emscripten_bind_btGhostObject_setFriction_1=function(){return(zd=b._emscripten_bind_btGhostObject_setFriction_1=b.asm.Eb).apply(null,arguments)},Ad=b._emscripten_bind_btGhostObject_setRollingFriction_1=function(){return(Ad=b._emscripten_bind_btGhostObject_setRollingFriction_1=b.asm.Fb).apply(null,arguments)},Bd=b._emscripten_bind_btGhostObject_getWorldTransform_0=function(){return(Bd=b._emscripten_bind_btGhostObject_getWorldTransform_0=\nb.asm.Gb).apply(null,arguments)},Cd=b._emscripten_bind_btGhostObject_getCollisionFlags_0=function(){return(Cd=b._emscripten_bind_btGhostObject_getCollisionFlags_0=b.asm.Hb).apply(null,arguments)},Dd=b._emscripten_bind_btGhostObject_setCollisionFlags_1=function(){return(Dd=b._emscripten_bind_btGhostObject_setCollisionFlags_1=b.asm.Ib).apply(null,arguments)},Ed=b._emscripten_bind_btGhostObject_setWorldTransform_1=function(){return(Ed=b._emscripten_bind_btGhostObject_setWorldTransform_1=b.asm.Jb).apply(null,\narguments)},Fd=b._emscripten_bind_btGhostObject_setCollisionShape_1=function(){return(Fd=b._emscripten_bind_btGhostObject_setCollisionShape_1=b.asm.Kb).apply(null,arguments)},Gd=b._emscripten_bind_btGhostObject_setCcdMotionThreshold_1=function(){return(Gd=b._emscripten_bind_btGhostObject_setCcdMotionThreshold_1=b.asm.Lb).apply(null,arguments)},Hd=b._emscripten_bind_btGhostObject_setCcdSweptSphereRadius_1=function(){return(Hd=b._emscripten_bind_btGhostObject_setCcdSweptSphereRadius_1=b.asm.Mb).apply(null,\narguments)},Id=b._emscripten_bind_btGhostObject_getUserIndex_0=function(){return(Id=b._emscripten_bind_btGhostObject_getUserIndex_0=b.asm.Nb).apply(null,arguments)},Jd=b._emscripten_bind_btGhostObject_setUserIndex_1=function(){return(Jd=b._emscripten_bind_btGhostObject_setUserIndex_1=b.asm.Ob).apply(null,arguments)},Kd=b._emscripten_bind_btGhostObject_getUserPointer_0=function(){return(Kd=b._emscripten_bind_btGhostObject_getUserPointer_0=b.asm.Pb).apply(null,arguments)},Ld=b._emscripten_bind_btGhostObject_setUserPointer_1=\nfunction(){return(Ld=b._emscripten_bind_btGhostObject_setUserPointer_1=b.asm.Qb).apply(null,arguments)},Md=b._emscripten_bind_btGhostObject_getBroadphaseHandle_0=function(){return(Md=b._emscripten_bind_btGhostObject_getBroadphaseHandle_0=b.asm.Rb).apply(null,arguments)},Nd=b._emscripten_bind_btGhostObject___destroy___0=function(){return(Nd=b._emscripten_bind_btGhostObject___destroy___0=b.asm.Sb).apply(null,arguments)},Od=b._emscripten_bind_btConeShape_btConeShape_2=function(){return(Od=b._emscripten_bind_btConeShape_btConeShape_2=\nb.asm.Tb).apply(null,arguments)},Pd=b._emscripten_bind_btConeShape_setLocalScaling_1=function(){return(Pd=b._emscripten_bind_btConeShape_setLocalScaling_1=b.asm.Ub).apply(null,arguments)},Qd=b._emscripten_bind_btConeShape_getLocalScaling_0=function(){return(Qd=b._emscripten_bind_btConeShape_getLocalScaling_0=b.asm.Vb).apply(null,arguments)},Rd=b._emscripten_bind_btConeShape_calculateLocalInertia_2=function(){return(Rd=b._emscripten_bind_btConeShape_calculateLocalInertia_2=b.asm.Wb).apply(null,arguments)},\nSd=b._emscripten_bind_btConeShape___destroy___0=function(){return(Sd=b._emscripten_bind_btConeShape___destroy___0=b.asm.Xb).apply(null,arguments)},Td=b._emscripten_bind_btActionInterface_updateAction_2=function(){return(Td=b._emscripten_bind_btActionInterface_updateAction_2=b.asm.Yb).apply(null,arguments)},Ud=b._emscripten_bind_btActionInterface___destroy___0=function(){return(Ud=b._emscripten_bind_btActionInterface___destroy___0=b.asm.Zb).apply(null,arguments)},Vd=b._emscripten_bind_btVector3_btVector3_0=\nfunction(){return(Vd=b._emscripten_bind_btVector3_btVector3_0=b.asm._b).apply(null,arguments)},Wd=b._emscripten_bind_btVector3_btVector3_3=function(){return(Wd=b._emscripten_bind_btVector3_btVector3_3=b.asm.$b).apply(null,arguments)},Xd=b._emscripten_bind_btVector3_length_0=function(){return(Xd=b._emscripten_bind_btVector3_length_0=b.asm.ac).apply(null,arguments)},Yd=b._emscripten_bind_btVector3_x_0=function(){return(Yd=b._emscripten_bind_btVector3_x_0=b.asm.bc).apply(null,arguments)},Zd=b._emscripten_bind_btVector3_y_0=\nfunction(){return(Zd=b._emscripten_bind_btVector3_y_0=b.asm.cc).apply(null,arguments)},$d=b._emscripten_bind_btVector3_z_0=function(){return($d=b._emscripten_bind_btVector3_z_0=b.asm.dc).apply(null,arguments)},ae=b._emscripten_bind_btVector3_setX_1=function(){return(ae=b._emscripten_bind_btVector3_setX_1=b.asm.ec).apply(null,arguments)},be=b._emscripten_bind_btVector3_setY_1=function(){return(be=b._emscripten_bind_btVector3_setY_1=b.asm.fc).apply(null,arguments)},ce=b._emscripten_bind_btVector3_setZ_1=\nfunction(){return(ce=b._emscripten_bind_btVector3_setZ_1=b.asm.gc).apply(null,arguments)},de=b._emscripten_bind_btVector3_setValue_3=function(){return(de=b._emscripten_bind_btVector3_setValue_3=b.asm.hc).apply(null,arguments)},ee=b._emscripten_bind_btVector3_normalize_0=function(){return(ee=b._emscripten_bind_btVector3_normalize_0=b.asm.ic).apply(null,arguments)},fe=b._emscripten_bind_btVector3_rotate_2=function(){return(fe=b._emscripten_bind_btVector3_rotate_2=b.asm.jc).apply(null,arguments)},ge=\nb._emscripten_bind_btVector3_dot_1=function(){return(ge=b._emscripten_bind_btVector3_dot_1=b.asm.kc).apply(null,arguments)},he=b._emscripten_bind_btVector3_op_mul_1=function(){return(he=b._emscripten_bind_btVector3_op_mul_1=b.asm.lc).apply(null,arguments)},ie=b._emscripten_bind_btVector3_op_add_1=function(){return(ie=b._emscripten_bind_btVector3_op_add_1=b.asm.mc).apply(null,arguments)},je=b._emscripten_bind_btVector3_op_sub_1=function(){return(je=b._emscripten_bind_btVector3_op_sub_1=b.asm.nc).apply(null,\narguments)},ke=b._emscripten_bind_btVector3___destroy___0=function(){return(ke=b._emscripten_bind_btVector3___destroy___0=b.asm.oc).apply(null,arguments)},le=b._emscripten_bind_btVehicleRaycaster_castRay_3=function(){return(le=b._emscripten_bind_btVehicleRaycaster_castRay_3=b.asm.pc).apply(null,arguments)},me=b._emscripten_bind_btVehicleRaycaster___destroy___0=function(){return(me=b._emscripten_bind_btVehicleRaycaster___destroy___0=b.asm.qc).apply(null,arguments)},ne=b._emscripten_bind_btQuadWord_x_0=\nfunction(){return(ne=b._emscripten_bind_btQuadWord_x_0=b.asm.rc).apply(null,arguments)},oe=b._emscripten_bind_btQuadWord_y_0=function(){return(oe=b._emscripten_bind_btQuadWord_y_0=b.asm.sc).apply(null,arguments)},pe=b._emscripten_bind_btQuadWord_z_0=function(){return(pe=b._emscripten_bind_btQuadWord_z_0=b.asm.tc).apply(null,arguments)},qe=b._emscripten_bind_btQuadWord_w_0=function(){return(qe=b._emscripten_bind_btQuadWord_w_0=b.asm.uc).apply(null,arguments)},re=b._emscripten_bind_btQuadWord_setX_1=\nfunction(){return(re=b._emscripten_bind_btQuadWord_setX_1=b.asm.vc).apply(null,arguments)},se=b._emscripten_bind_btQuadWord_setY_1=function(){return(se=b._emscripten_bind_btQuadWord_setY_1=b.asm.wc).apply(null,arguments)},te=b._emscripten_bind_btQuadWord_setZ_1=function(){return(te=b._emscripten_bind_btQuadWord_setZ_1=b.asm.xc).apply(null,arguments)},ue=b._emscripten_bind_btQuadWord_setW_1=function(){return(ue=b._emscripten_bind_btQuadWord_setW_1=b.asm.yc).apply(null,arguments)},ve=b._emscripten_bind_btQuadWord___destroy___0=\nfunction(){return(ve=b._emscripten_bind_btQuadWord___destroy___0=b.asm.zc).apply(null,arguments)},we=b._emscripten_bind_btCylinderShape_btCylinderShape_1=function(){return(we=b._emscripten_bind_btCylinderShape_btCylinderShape_1=b.asm.Ac).apply(null,arguments)},xe=b._emscripten_bind_btCylinderShape_setMargin_1=function(){return(xe=b._emscripten_bind_btCylinderShape_setMargin_1=b.asm.Bc).apply(null,arguments)},ye=b._emscripten_bind_btCylinderShape_getMargin_0=function(){return(ye=b._emscripten_bind_btCylinderShape_getMargin_0=\nb.asm.Cc).apply(null,arguments)},ze=b._emscripten_bind_btCylinderShape_setLocalScaling_1=function(){return(ze=b._emscripten_bind_btCylinderShape_setLocalScaling_1=b.asm.Dc).apply(null,arguments)},Ae=b._emscripten_bind_btCylinderShape_getLocalScaling_0=function(){return(Ae=b._emscripten_bind_btCylinderShape_getLocalScaling_0=b.asm.Ec).apply(null,arguments)},Be=b._emscripten_bind_btCylinderShape_calculateLocalInertia_2=function(){return(Be=b._emscripten_bind_btCylinderShape_calculateLocalInertia_2=\nb.asm.Fc).apply(null,arguments)},Ce=b._emscripten_bind_btCylinderShape___destroy___0=function(){return(Ce=b._emscripten_bind_btCylinderShape___destroy___0=b.asm.Gc).apply(null,arguments)},De=b._emscripten_bind_btDiscreteDynamicsWorld_btDiscreteDynamicsWorld_4=function(){return(De=b._emscripten_bind_btDiscreteDynamicsWorld_btDiscreteDynamicsWorld_4=b.asm.Hc).apply(null,arguments)},Ee=b._emscripten_bind_btDiscreteDynamicsWorld_setGravity_1=function(){return(Ee=b._emscripten_bind_btDiscreteDynamicsWorld_setGravity_1=\nb.asm.Ic).apply(null,arguments)},Fe=b._emscripten_bind_btDiscreteDynamicsWorld_getGravity_0=function(){return(Fe=b._emscripten_bind_btDiscreteDynamicsWorld_getGravity_0=b.asm.Jc).apply(null,arguments)},Ge=b._emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_1=function(){return(Ge=b._emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_1=b.asm.Kc).apply(null,arguments)},He=b._emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_3=function(){return(He=b._emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_3=\nb.asm.Lc).apply(null,arguments)},Ie=b._emscripten_bind_btDiscreteDynamicsWorld_removeRigidBody_1=function(){return(Ie=b._emscripten_bind_btDiscreteDynamicsWorld_removeRigidBody_1=b.asm.Mc).apply(null,arguments)},Je=b._emscripten_bind_btDiscreteDynamicsWorld_addConstraint_1=function(){return(Je=b._emscripten_bind_btDiscreteDynamicsWorld_addConstraint_1=b.asm.Nc).apply(null,arguments)},Ke=b._emscripten_bind_btDiscreteDynamicsWorld_addConstraint_2=function(){return(Ke=b._emscripten_bind_btDiscreteDynamicsWorld_addConstraint_2=\nb.asm.Oc).apply(null,arguments)},Le=b._emscripten_bind_btDiscreteDynamicsWorld_removeConstraint_1=function(){return(Le=b._emscripten_bind_btDiscreteDynamicsWorld_removeConstraint_1=b.asm.Pc).apply(null,arguments)},Me=b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_1=function(){return(Me=b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_1=b.asm.Qc).apply(null,arguments)},Ne=b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_2=function(){return(Ne=b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_2=\nb.asm.Rc).apply(null,arguments)},Oe=b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_3=function(){return(Oe=b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_3=b.asm.Sc).apply(null,arguments)},Pe=b._emscripten_bind_btDiscreteDynamicsWorld_setContactAddedCallback_1=function(){return(Pe=b._emscripten_bind_btDiscreteDynamicsWorld_setContactAddedCallback_1=b.asm.Tc).apply(null,arguments)},Qe=b._emscripten_bind_btDiscreteDynamicsWorld_setContactProcessedCallback_1=function(){return(Qe=\nb._emscripten_bind_btDiscreteDynamicsWorld_setContactProcessedCallback_1=b.asm.Uc).apply(null,arguments)},Re=b._emscripten_bind_btDiscreteDynamicsWorld_setContactDestroyedCallback_1=function(){return(Re=b._emscripten_bind_btDiscreteDynamicsWorld_setContactDestroyedCallback_1=b.asm.Vc).apply(null,arguments)},Se=b._emscripten_bind_btDiscreteDynamicsWorld_getDispatcher_0=function(){return(Se=b._emscripten_bind_btDiscreteDynamicsWorld_getDispatcher_0=b.asm.Wc).apply(null,arguments)},Te=b._emscripten_bind_btDiscreteDynamicsWorld_rayTest_3=\nfunction(){return(Te=b._emscripten_bind_btDiscreteDynamicsWorld_rayTest_3=b.asm.Xc).apply(null,arguments)},Ue=b._emscripten_bind_btDiscreteDynamicsWorld_getPairCache_0=function(){return(Ue=b._emscripten_bind_btDiscreteDynamicsWorld_getPairCache_0=b.asm.Yc).apply(null,arguments)},Ve=b._emscripten_bind_btDiscreteDynamicsWorld_getDispatchInfo_0=function(){return(Ve=b._emscripten_bind_btDiscreteDynamicsWorld_getDispatchInfo_0=b.asm.Zc).apply(null,arguments)},We=b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_1=\nfunction(){return(We=b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_1=b.asm._c).apply(null,arguments)},Xe=b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_2=function(){return(Xe=b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_2=b.asm.$c).apply(null,arguments)},Ye=b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_3=function(){return(Ye=b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_3=b.asm.ad).apply(null,arguments)},Ze=b._emscripten_bind_btDiscreteDynamicsWorld_removeCollisionObject_1=\nfunction(){return(Ze=b._emscripten_bind_btDiscreteDynamicsWorld_removeCollisionObject_1=b.asm.bd).apply(null,arguments)},$e=b._emscripten_bind_btDiscreteDynamicsWorld_getBroadphase_0=function(){return($e=b._emscripten_bind_btDiscreteDynamicsWorld_getBroadphase_0=b.asm.cd).apply(null,arguments)},af=b._emscripten_bind_btDiscreteDynamicsWorld_convexSweepTest_5=function(){return(af=b._emscripten_bind_btDiscreteDynamicsWorld_convexSweepTest_5=b.asm.dd).apply(null,arguments)},bf=b._emscripten_bind_btDiscreteDynamicsWorld_contactPairTest_3=\nfunction(){return(bf=b._emscripten_bind_btDiscreteDynamicsWorld_contactPairTest_3=b.asm.ed).apply(null,arguments)},cf=b._emscripten_bind_btDiscreteDynamicsWorld_contactTest_2=function(){return(cf=b._emscripten_bind_btDiscreteDynamicsWorld_contactTest_2=b.asm.fd).apply(null,arguments)},df=b._emscripten_bind_btDiscreteDynamicsWorld_updateSingleAabb_1=function(){return(df=b._emscripten_bind_btDiscreteDynamicsWorld_updateSingleAabb_1=b.asm.gd).apply(null,arguments)},ef=b._emscripten_bind_btDiscreteDynamicsWorld_setDebugDrawer_1=\nfunction(){return(ef=b._emscripten_bind_btDiscreteDynamicsWorld_setDebugDrawer_1=b.asm.hd).apply(null,arguments)},ff=b._emscripten_bind_btDiscreteDynamicsWorld_getDebugDrawer_0=function(){return(ff=b._emscripten_bind_btDiscreteDynamicsWorld_getDebugDrawer_0=b.asm.id).apply(null,arguments)},gf=b._emscripten_bind_btDiscreteDynamicsWorld_debugDrawWorld_0=function(){return(gf=b._emscripten_bind_btDiscreteDynamicsWorld_debugDrawWorld_0=b.asm.jd).apply(null,arguments)},hf=b._emscripten_bind_btDiscreteDynamicsWorld_debugDrawObject_3=\nfunction(){return(hf=b._emscripten_bind_btDiscreteDynamicsWorld_debugDrawObject_3=b.asm.kd).apply(null,arguments)},jf=b._emscripten_bind_btDiscreteDynamicsWorld_addAction_1=function(){return(jf=b._emscripten_bind_btDiscreteDynamicsWorld_addAction_1=b.asm.ld).apply(null,arguments)},kf=b._emscripten_bind_btDiscreteDynamicsWorld_removeAction_1=function(){return(kf=b._emscripten_bind_btDiscreteDynamicsWorld_removeAction_1=b.asm.md).apply(null,arguments)},lf=b._emscripten_bind_btDiscreteDynamicsWorld_getSolverInfo_0=\nfunction(){return(lf=b._emscripten_bind_btDiscreteDynamicsWorld_getSolverInfo_0=b.asm.nd).apply(null,arguments)},mf=b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_1=function(){return(mf=b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_1=b.asm.od).apply(null,arguments)},nf=b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_2=function(){return(nf=b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_2=b.asm.pd).apply(null,arguments)},\nof=b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_3=function(){return(of=b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_3=b.asm.qd).apply(null,arguments)},pf=b._emscripten_bind_btDiscreteDynamicsWorld___destroy___0=function(){return(pf=b._emscripten_bind_btDiscreteDynamicsWorld___destroy___0=b.asm.rd).apply(null,arguments)},qf=b._emscripten_bind_btConvexShape_setLocalScaling_1=function(){return(qf=b._emscripten_bind_btConvexShape_setLocalScaling_1=b.asm.sd).apply(null,\narguments)},rf=b._emscripten_bind_btConvexShape_getLocalScaling_0=function(){return(rf=b._emscripten_bind_btConvexShape_getLocalScaling_0=b.asm.td).apply(null,arguments)},sf=b._emscripten_bind_btConvexShape_calculateLocalInertia_2=function(){return(sf=b._emscripten_bind_btConvexShape_calculateLocalInertia_2=b.asm.ud).apply(null,arguments)},tf=b._emscripten_bind_btConvexShape_setMargin_1=function(){return(tf=b._emscripten_bind_btConvexShape_setMargin_1=b.asm.vd).apply(null,arguments)},uf=b._emscripten_bind_btConvexShape_getMargin_0=\nfunction(){return(uf=b._emscripten_bind_btConvexShape_getMargin_0=b.asm.wd).apply(null,arguments)},vf=b._emscripten_bind_btConvexShape___destroy___0=function(){return(vf=b._emscripten_bind_btConvexShape___destroy___0=b.asm.xd).apply(null,arguments)},wf=b._emscripten_bind_btDispatcher_getNumManifolds_0=function(){return(wf=b._emscripten_bind_btDispatcher_getNumManifolds_0=b.asm.yd).apply(null,arguments)},xf=b._emscripten_bind_btDispatcher_getManifoldByIndexInternal_1=function(){return(xf=b._emscripten_bind_btDispatcher_getManifoldByIndexInternal_1=\nb.asm.zd).apply(null,arguments)},yf=b._emscripten_bind_btDispatcher___destroy___0=function(){return(yf=b._emscripten_bind_btDispatcher___destroy___0=b.asm.Ad).apply(null,arguments)},zf=b._emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_3=function(){return(zf=b._emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_3=b.asm.Bd).apply(null,arguments)},Af=b._emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_5=function(){return(Af=b._emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_5=\nb.asm.Cd).apply(null,arguments)},Bf=b._emscripten_bind_btGeneric6DofConstraint_setLinearLowerLimit_1=function(){return(Bf=b._emscripten_bind_btGeneric6DofConstraint_setLinearLowerLimit_1=b.asm.Dd).apply(null,arguments)},Cf=b._emscripten_bind_btGeneric6DofConstraint_setLinearUpperLimit_1=function(){return(Cf=b._emscripten_bind_btGeneric6DofConstraint_setLinearUpperLimit_1=b.asm.Ed).apply(null,arguments)},Df=b._emscripten_bind_btGeneric6DofConstraint_setAngularLowerLimit_1=function(){return(Df=b._emscripten_bind_btGeneric6DofConstraint_setAngularLowerLimit_1=\nb.asm.Fd).apply(null,arguments)},Ef=b._emscripten_bind_btGeneric6DofConstraint_setAngularUpperLimit_1=function(){return(Ef=b._emscripten_bind_btGeneric6DofConstraint_setAngularUpperLimit_1=b.asm.Gd).apply(null,arguments)},Ff=b._emscripten_bind_btGeneric6DofConstraint_getFrameOffsetA_0=function(){return(Ff=b._emscripten_bind_btGeneric6DofConstraint_getFrameOffsetA_0=b.asm.Hd).apply(null,arguments)},Gf=b._emscripten_bind_btGeneric6DofConstraint_enableFeedback_1=function(){return(Gf=b._emscripten_bind_btGeneric6DofConstraint_enableFeedback_1=\nb.asm.Id).apply(null,arguments)},Hf=b._emscripten_bind_btGeneric6DofConstraint_getBreakingImpulseThreshold_0=function(){return(Hf=b._emscripten_bind_btGeneric6DofConstraint_getBreakingImpulseThreshold_0=b.asm.Jd).apply(null,arguments)},If=b._emscripten_bind_btGeneric6DofConstraint_setBreakingImpulseThreshold_1=function(){return(If=b._emscripten_bind_btGeneric6DofConstraint_setBreakingImpulseThreshold_1=b.asm.Kd).apply(null,arguments)},Jf=b._emscripten_bind_btGeneric6DofConstraint_getParam_2=function(){return(Jf=\nb._emscripten_bind_btGeneric6DofConstraint_getParam_2=b.asm.Ld).apply(null,arguments)},Kf=b._emscripten_bind_btGeneric6DofConstraint_setParam_3=function(){return(Kf=b._emscripten_bind_btGeneric6DofConstraint_setParam_3=b.asm.Md).apply(null,arguments)},Lf=b._emscripten_bind_btGeneric6DofConstraint___destroy___0=function(){return(Lf=b._emscripten_bind_btGeneric6DofConstraint___destroy___0=b.asm.Nd).apply(null,arguments)},Mf=b._emscripten_bind_btStridingMeshInterface_setScaling_1=function(){return(Mf=\nb._emscripten_bind_btStridingMeshInterface_setScaling_1=b.asm.Od).apply(null,arguments)},Nf=b._emscripten_bind_btStridingMeshInterface___destroy___0=function(){return(Nf=b._emscripten_bind_btStridingMeshInterface___destroy___0=b.asm.Pd).apply(null,arguments)},Of=b._emscripten_bind_btMotionState_getWorldTransform_1=function(){return(Of=b._emscripten_bind_btMotionState_getWorldTransform_1=b.asm.Qd).apply(null,arguments)},Pf=b._emscripten_bind_btMotionState_setWorldTransform_1=function(){return(Pf=b._emscripten_bind_btMotionState_setWorldTransform_1=\nb.asm.Rd).apply(null,arguments)},Qf=b._emscripten_bind_btMotionState___destroy___0=function(){return(Qf=b._emscripten_bind_btMotionState___destroy___0=b.asm.Sd).apply(null,arguments)},Rf=b._emscripten_bind_ConvexResultCallback_hasHit_0=function(){return(Rf=b._emscripten_bind_ConvexResultCallback_hasHit_0=b.asm.Td).apply(null,arguments)},Sf=b._emscripten_bind_ConvexResultCallback_get_m_collisionFilterGroup_0=function(){return(Sf=b._emscripten_bind_ConvexResultCallback_get_m_collisionFilterGroup_0=\nb.asm.Ud).apply(null,arguments)},Tf=b._emscripten_bind_ConvexResultCallback_set_m_collisionFilterGroup_1=function(){return(Tf=b._emscripten_bind_ConvexResultCallback_set_m_collisionFilterGroup_1=b.asm.Vd).apply(null,arguments)},Uf=b._emscripten_bind_ConvexResultCallback_get_m_collisionFilterMask_0=function(){return(Uf=b._emscripten_bind_ConvexResultCallback_get_m_collisionFilterMask_0=b.asm.Wd).apply(null,arguments)},Vf=b._emscripten_bind_ConvexResultCallback_set_m_collisionFilterMask_1=function(){return(Vf=\nb._emscripten_bind_ConvexResultCallback_set_m_collisionFilterMask_1=b.asm.Xd).apply(null,arguments)},Wf=b._emscripten_bind_ConvexResultCallback_get_m_closestHitFraction_0=function(){return(Wf=b._emscripten_bind_ConvexResultCallback_get_m_closestHitFraction_0=b.asm.Yd).apply(null,arguments)},Xf=b._emscripten_bind_ConvexResultCallback_set_m_closestHitFraction_1=function(){return(Xf=b._emscripten_bind_ConvexResultCallback_set_m_closestHitFraction_1=b.asm.Zd).apply(null,arguments)},Yf=b._emscripten_bind_ConvexResultCallback___destroy___0=\nfunction(){return(Yf=b._emscripten_bind_ConvexResultCallback___destroy___0=b.asm._d).apply(null,arguments)},Zf=b._emscripten_bind_ContactResultCallback_addSingleResult_7=function(){return(Zf=b._emscripten_bind_ContactResultCallback_addSingleResult_7=b.asm.$d).apply(null,arguments)},$f=b._emscripten_bind_ContactResultCallback___destroy___0=function(){return($f=b._emscripten_bind_ContactResultCallback___destroy___0=b.asm.ae).apply(null,arguments)},ag=b._emscripten_bind_btSoftBodySolver___destroy___0=\nfunction(){return(ag=b._emscripten_bind_btSoftBodySolver___destroy___0=b.asm.be).apply(null,arguments)},bg=b._emscripten_bind_RayResultCallback_hasHit_0=function(){return(bg=b._emscripten_bind_RayResultCallback_hasHit_0=b.asm.ce).apply(null,arguments)},cg=b._emscripten_bind_RayResultCallback_get_m_collisionFilterGroup_0=function(){return(cg=b._emscripten_bind_RayResultCallback_get_m_collisionFilterGroup_0=b.asm.de).apply(null,arguments)},dg=b._emscripten_bind_RayResultCallback_set_m_collisionFilterGroup_1=\nfunction(){return(dg=b._emscripten_bind_RayResultCallback_set_m_collisionFilterGroup_1=b.asm.ee).apply(null,arguments)},eg=b._emscripten_bind_RayResultCallback_get_m_collisionFilterMask_0=function(){return(eg=b._emscripten_bind_RayResultCallback_get_m_collisionFilterMask_0=b.asm.fe).apply(null,arguments)},fg=b._emscripten_bind_RayResultCallback_set_m_collisionFilterMask_1=function(){return(fg=b._emscripten_bind_RayResultCallback_set_m_collisionFilterMask_1=b.asm.ge).apply(null,arguments)},gg=b._emscripten_bind_RayResultCallback_get_m_closestHitFraction_0=\nfunction(){return(gg=b._emscripten_bind_RayResultCallback_get_m_closestHitFraction_0=b.asm.he).apply(null,arguments)},hg=b._emscripten_bind_RayResultCallback_set_m_closestHitFraction_1=function(){return(hg=b._emscripten_bind_RayResultCallback_set_m_closestHitFraction_1=b.asm.ie).apply(null,arguments)},ig=b._emscripten_bind_RayResultCallback_get_m_collisionObject_0=function(){return(ig=b._emscripten_bind_RayResultCallback_get_m_collisionObject_0=b.asm.je).apply(null,arguments)},jg=b._emscripten_bind_RayResultCallback_set_m_collisionObject_1=\nfunction(){return(jg=b._emscripten_bind_RayResultCallback_set_m_collisionObject_1=b.asm.ke).apply(null,arguments)},kg=b._emscripten_bind_RayResultCallback___destroy___0=function(){return(kg=b._emscripten_bind_RayResultCallback___destroy___0=b.asm.le).apply(null,arguments)},lg=b._emscripten_bind_btMatrix3x3_setEulerZYX_3=function(){return(lg=b._emscripten_bind_btMatrix3x3_setEulerZYX_3=b.asm.me).apply(null,arguments)},mg=b._emscripten_bind_btMatrix3x3_getRotation_1=function(){return(mg=b._emscripten_bind_btMatrix3x3_getRotation_1=\nb.asm.ne).apply(null,arguments)},ng=b._emscripten_bind_btMatrix3x3_getRow_1=function(){return(ng=b._emscripten_bind_btMatrix3x3_getRow_1=b.asm.oe).apply(null,arguments)},og=b._emscripten_bind_btMatrix3x3___destroy___0=function(){return(og=b._emscripten_bind_btMatrix3x3___destroy___0=b.asm.pe).apply(null,arguments)},pg=b._emscripten_bind_btScalarArray_size_0=function(){return(pg=b._emscripten_bind_btScalarArray_size_0=b.asm.qe).apply(null,arguments)},qg=b._emscripten_bind_btScalarArray_at_1=function(){return(qg=\nb._emscripten_bind_btScalarArray_at_1=b.asm.re).apply(null,arguments)},rg=b._emscripten_bind_btScalarArray___destroy___0=function(){return(rg=b._emscripten_bind_btScalarArray___destroy___0=b.asm.se).apply(null,arguments)},sg=b._emscripten_bind_Material_get_m_kLST_0=function(){return(sg=b._emscripten_bind_Material_get_m_kLST_0=b.asm.te).apply(null,arguments)},tg=b._emscripten_bind_Material_set_m_kLST_1=function(){return(tg=b._emscripten_bind_Material_set_m_kLST_1=b.asm.ue).apply(null,arguments)},ug=\nb._emscripten_bind_Material_get_m_kAST_0=function(){return(ug=b._emscripten_bind_Material_get_m_kAST_0=b.asm.ve).apply(null,arguments)},vg=b._emscripten_bind_Material_set_m_kAST_1=function(){return(vg=b._emscripten_bind_Material_set_m_kAST_1=b.asm.we).apply(null,arguments)},wg=b._emscripten_bind_Material_get_m_kVST_0=function(){return(wg=b._emscripten_bind_Material_get_m_kVST_0=b.asm.xe).apply(null,arguments)},xg=b._emscripten_bind_Material_set_m_kVST_1=function(){return(xg=b._emscripten_bind_Material_set_m_kVST_1=\nb.asm.ye).apply(null,arguments)},yg=b._emscripten_bind_Material_get_m_flags_0=function(){return(yg=b._emscripten_bind_Material_get_m_flags_0=b.asm.ze).apply(null,arguments)},zg=b._emscripten_bind_Material_set_m_flags_1=function(){return(zg=b._emscripten_bind_Material_set_m_flags_1=b.asm.Ae).apply(null,arguments)},Ag=b._emscripten_bind_Material___destroy___0=function(){return(Ag=b._emscripten_bind_Material___destroy___0=b.asm.Be).apply(null,arguments)},Bg=b._emscripten_bind_btDispatcherInfo_get_m_timeStep_0=\nfunction(){return(Bg=b._emscripten_bind_btDispatcherInfo_get_m_timeStep_0=b.asm.Ce).apply(null,arguments)},Cg=b._emscripten_bind_btDispatcherInfo_set_m_timeStep_1=function(){return(Cg=b._emscripten_bind_btDispatcherInfo_set_m_timeStep_1=b.asm.De).apply(null,arguments)},Dg=b._emscripten_bind_btDispatcherInfo_get_m_stepCount_0=function(){return(Dg=b._emscripten_bind_btDispatcherInfo_get_m_stepCount_0=b.asm.Ee).apply(null,arguments)},Eg=b._emscripten_bind_btDispatcherInfo_set_m_stepCount_1=function(){return(Eg=\nb._emscripten_bind_btDispatcherInfo_set_m_stepCount_1=b.asm.Fe).apply(null,arguments)},Fg=b._emscripten_bind_btDispatcherInfo_get_m_dispatchFunc_0=function(){return(Fg=b._emscripten_bind_btDispatcherInfo_get_m_dispatchFunc_0=b.asm.Ge).apply(null,arguments)},Gg=b._emscripten_bind_btDispatcherInfo_set_m_dispatchFunc_1=function(){return(Gg=b._emscripten_bind_btDispatcherInfo_set_m_dispatchFunc_1=b.asm.He).apply(null,arguments)},Hg=b._emscripten_bind_btDispatcherInfo_get_m_timeOfImpact_0=function(){return(Hg=\nb._emscripten_bind_btDispatcherInfo_get_m_timeOfImpact_0=b.asm.Ie).apply(null,arguments)},Ig=b._emscripten_bind_btDispatcherInfo_set_m_timeOfImpact_1=function(){return(Ig=b._emscripten_bind_btDispatcherInfo_set_m_timeOfImpact_1=b.asm.Je).apply(null,arguments)},Jg=b._emscripten_bind_btDispatcherInfo_get_m_useContinuous_0=function(){return(Jg=b._emscripten_bind_btDispatcherInfo_get_m_useContinuous_0=b.asm.Ke).apply(null,arguments)},Kg=b._emscripten_bind_btDispatcherInfo_set_m_useContinuous_1=function(){return(Kg=\nb._emscripten_bind_btDispatcherInfo_set_m_useContinuous_1=b.asm.Le).apply(null,arguments)},Lg=b._emscripten_bind_btDispatcherInfo_get_m_enableSatConvex_0=function(){return(Lg=b._emscripten_bind_btDispatcherInfo_get_m_enableSatConvex_0=b.asm.Me).apply(null,arguments)},Mg=b._emscripten_bind_btDispatcherInfo_set_m_enableSatConvex_1=function(){return(Mg=b._emscripten_bind_btDispatcherInfo_set_m_enableSatConvex_1=b.asm.Ne).apply(null,arguments)},Ng=b._emscripten_bind_btDispatcherInfo_get_m_enableSPU_0=\nfunction(){return(Ng=b._emscripten_bind_btDispatcherInfo_get_m_enableSPU_0=b.asm.Oe).apply(null,arguments)},Og=b._emscripten_bind_btDispatcherInfo_set_m_enableSPU_1=function(){return(Og=b._emscripten_bind_btDispatcherInfo_set_m_enableSPU_1=b.asm.Pe).apply(null,arguments)},Pg=b._emscripten_bind_btDispatcherInfo_get_m_useEpa_0=function(){return(Pg=b._emscripten_bind_btDispatcherInfo_get_m_useEpa_0=b.asm.Qe).apply(null,arguments)},Qg=b._emscripten_bind_btDispatcherInfo_set_m_useEpa_1=function(){return(Qg=\nb._emscripten_bind_btDispatcherInfo_set_m_useEpa_1=b.asm.Re).apply(null,arguments)},Rg=b._emscripten_bind_btDispatcherInfo_get_m_allowedCcdPenetration_0=function(){return(Rg=b._emscripten_bind_btDispatcherInfo_get_m_allowedCcdPenetration_0=b.asm.Se).apply(null,arguments)},Sg=b._emscripten_bind_btDispatcherInfo_set_m_allowedCcdPenetration_1=function(){return(Sg=b._emscripten_bind_btDispatcherInfo_set_m_allowedCcdPenetration_1=b.asm.Te).apply(null,arguments)},Tg=b._emscripten_bind_btDispatcherInfo_get_m_useConvexConservativeDistanceUtil_0=\nfunction(){return(Tg=b._emscripten_bind_btDispatcherInfo_get_m_useConvexConservativeDistanceUtil_0=b.asm.Ue).apply(null,arguments)},Ug=b._emscripten_bind_btDispatcherInfo_set_m_useConvexConservativeDistanceUtil_1=function(){return(Ug=b._emscripten_bind_btDispatcherInfo_set_m_useConvexConservativeDistanceUtil_1=b.asm.Ve).apply(null,arguments)},Vg=b._emscripten_bind_btDispatcherInfo_get_m_convexConservativeDistanceThreshold_0=function(){return(Vg=b._emscripten_bind_btDispatcherInfo_get_m_convexConservativeDistanceThreshold_0=\nb.asm.We).apply(null,arguments)},Wg=b._emscripten_bind_btDispatcherInfo_set_m_convexConservativeDistanceThreshold_1=function(){return(Wg=b._emscripten_bind_btDispatcherInfo_set_m_convexConservativeDistanceThreshold_1=b.asm.Xe).apply(null,arguments)},Xg=b._emscripten_bind_btDispatcherInfo___destroy___0=function(){return(Xg=b._emscripten_bind_btDispatcherInfo___destroy___0=b.asm.Ye).apply(null,arguments)},Yg=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_chassisConnectionCS_0=function(){return(Yg=\nb._emscripten_bind_btWheelInfoConstructionInfo_get_m_chassisConnectionCS_0=b.asm.Ze).apply(null,arguments)},Zg=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_chassisConnectionCS_1=function(){return(Zg=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_chassisConnectionCS_1=b.asm._e).apply(null,arguments)},$g=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelDirectionCS_0=function(){return($g=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelDirectionCS_0=b.asm.$e).apply(null,\narguments)},ah=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelDirectionCS_1=function(){return(ah=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelDirectionCS_1=b.asm.af).apply(null,arguments)},bh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelAxleCS_0=function(){return(bh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelAxleCS_0=b.asm.bf).apply(null,arguments)},ch=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelAxleCS_1=function(){return(ch=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelAxleCS_1=\nb.asm.cf).apply(null,arguments)},dh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionRestLength_0=function(){return(dh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionRestLength_0=b.asm.df).apply(null,arguments)},eh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionRestLength_1=function(){return(eh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionRestLength_1=b.asm.ef).apply(null,arguments)},fh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionTravelCm_0=\nfunction(){return(fh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionTravelCm_0=b.asm.ff).apply(null,arguments)},gh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionTravelCm_1=function(){return(gh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionTravelCm_1=b.asm.gf).apply(null,arguments)},hh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelRadius_0=function(){return(hh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelRadius_0=b.asm.hf).apply(null,\narguments)},ih=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelRadius_1=function(){return(ih=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelRadius_1=b.asm.jf).apply(null,arguments)},jh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionStiffness_0=function(){return(jh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionStiffness_0=b.asm.kf).apply(null,arguments)},kh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionStiffness_1=function(){return(kh=\nb._emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionStiffness_1=b.asm.lf).apply(null,arguments)},lh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingCompression_0=function(){return(lh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingCompression_0=b.asm.mf).apply(null,arguments)},mh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingCompression_1=function(){return(mh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingCompression_1=\nb.asm.nf).apply(null,arguments)},nh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingRelaxation_0=function(){return(nh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingRelaxation_0=b.asm.of).apply(null,arguments)},oh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingRelaxation_1=function(){return(oh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingRelaxation_1=b.asm.pf).apply(null,arguments)},ph=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_frictionSlip_0=\nfunction(){return(ph=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_frictionSlip_0=b.asm.qf).apply(null,arguments)},qh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_frictionSlip_1=function(){return(qh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_frictionSlip_1=b.asm.rf).apply(null,arguments)},rh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionForce_0=function(){return(rh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionForce_0=b.asm.sf).apply(null,\narguments)},sh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionForce_1=function(){return(sh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionForce_1=b.asm.tf).apply(null,arguments)},th=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_bIsFrontWheel_0=function(){return(th=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_bIsFrontWheel_0=b.asm.uf).apply(null,arguments)},uh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_bIsFrontWheel_1=function(){return(uh=\nb._emscripten_bind_btWheelInfoConstructionInfo_set_m_bIsFrontWheel_1=b.asm.vf).apply(null,arguments)},vh=b._emscripten_bind_btWheelInfoConstructionInfo___destroy___0=function(){return(vh=b._emscripten_bind_btWheelInfoConstructionInfo___destroy___0=b.asm.wf).apply(null,arguments)},wh=b._emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_1=function(){return(wh=b._emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_1=b.asm.xf).apply(null,arguments)},xh=b._emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_2=\nfunction(){return(xh=b._emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_2=b.asm.yf).apply(null,arguments)},yh=b._emscripten_bind_btConvexTriangleMeshShape_setLocalScaling_1=function(){return(yh=b._emscripten_bind_btConvexTriangleMeshShape_setLocalScaling_1=b.asm.zf).apply(null,arguments)},zh=b._emscripten_bind_btConvexTriangleMeshShape_getLocalScaling_0=function(){return(zh=b._emscripten_bind_btConvexTriangleMeshShape_getLocalScaling_0=b.asm.Af).apply(null,arguments)},Ah=b._emscripten_bind_btConvexTriangleMeshShape_calculateLocalInertia_2=\nfunction(){return(Ah=b._emscripten_bind_btConvexTriangleMeshShape_calculateLocalInertia_2=b.asm.Bf).apply(null,arguments)},Bh=b._emscripten_bind_btConvexTriangleMeshShape_setMargin_1=function(){return(Bh=b._emscripten_bind_btConvexTriangleMeshShape_setMargin_1=b.asm.Cf).apply(null,arguments)},Ch=b._emscripten_bind_btConvexTriangleMeshShape_getMargin_0=function(){return(Ch=b._emscripten_bind_btConvexTriangleMeshShape_getMargin_0=b.asm.Df).apply(null,arguments)},Dh=b._emscripten_bind_btConvexTriangleMeshShape___destroy___0=\nfunction(){return(Dh=b._emscripten_bind_btConvexTriangleMeshShape___destroy___0=b.asm.Ef).apply(null,arguments)},Eh=b._emscripten_bind_btBroadphaseInterface_getOverlappingPairCache_0=function(){return(Eh=b._emscripten_bind_btBroadphaseInterface_getOverlappingPairCache_0=b.asm.Ff).apply(null,arguments)},Fh=b._emscripten_bind_btBroadphaseInterface___destroy___0=function(){return(Fh=b._emscripten_bind_btBroadphaseInterface___destroy___0=b.asm.Gf).apply(null,arguments)},Gh=b._emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_3=\nfunction(){return(Gh=b._emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_3=b.asm.Hf).apply(null,arguments)},Hh=b._emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_4=function(){return(Hh=b._emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_4=b.asm.If).apply(null,arguments)},Ih=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_linearDamping_0=function(){return(Ih=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_linearDamping_0=\nb.asm.Jf).apply(null,arguments)},Jh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_linearDamping_1=function(){return(Jh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_linearDamping_1=b.asm.Kf).apply(null,arguments)},Kh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_angularDamping_0=function(){return(Kh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_angularDamping_0=b.asm.Lf).apply(null,arguments)},Lh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_angularDamping_1=function(){return(Lh=\nb._emscripten_bind_btRigidBodyConstructionInfo_set_m_angularDamping_1=b.asm.Mf).apply(null,arguments)},Mh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_friction_0=function(){return(Mh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_friction_0=b.asm.Nf).apply(null,arguments)},Nh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_friction_1=function(){return(Nh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_friction_1=b.asm.Of).apply(null,arguments)},Oh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_rollingFriction_0=\nfunction(){return(Oh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_rollingFriction_0=b.asm.Pf).apply(null,arguments)},Ph=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_rollingFriction_1=function(){return(Ph=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_rollingFriction_1=b.asm.Qf).apply(null,arguments)},Qh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_restitution_0=function(){return(Qh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_restitution_0=b.asm.Rf).apply(null,\narguments)},Rh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_restitution_1=function(){return(Rh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_restitution_1=b.asm.Sf).apply(null,arguments)},Sh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_linearSleepingThreshold_0=function(){return(Sh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_linearSleepingThreshold_0=b.asm.Tf).apply(null,arguments)},Th=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_linearSleepingThreshold_1=function(){return(Th=\nb._emscripten_bind_btRigidBodyConstructionInfo_set_m_linearSleepingThreshold_1=b.asm.Uf).apply(null,arguments)},Uh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_angularSleepingThreshold_0=function(){return(Uh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_angularSleepingThreshold_0=b.asm.Vf).apply(null,arguments)},Vh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_angularSleepingThreshold_1=function(){return(Vh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_angularSleepingThreshold_1=\nb.asm.Wf).apply(null,arguments)},Wh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDamping_0=function(){return(Wh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDamping_0=b.asm.Xf).apply(null,arguments)},Xh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDamping_1=function(){return(Xh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDamping_1=b.asm.Yf).apply(null,arguments)},Yh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDampingFactor_0=\nfunction(){return(Yh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDampingFactor_0=b.asm.Zf).apply(null,arguments)},Zh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDampingFactor_1=function(){return(Zh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDampingFactor_1=b.asm._f).apply(null,arguments)},$h=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalLinearDampingThresholdSqr_0=function(){return($h=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalLinearDampingThresholdSqr_0=\nb.asm.$f).apply(null,arguments)},ai=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalLinearDampingThresholdSqr_1=function(){return(ai=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalLinearDampingThresholdSqr_1=b.asm.ag).apply(null,arguments)},bi=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingThresholdSqr_0=function(){return(bi=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingThresholdSqr_0=b.asm.bg).apply(null,\narguments)},ci=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingThresholdSqr_1=function(){return(ci=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingThresholdSqr_1=b.asm.cg).apply(null,arguments)},di=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingFactor_0=function(){return(di=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingFactor_0=b.asm.dg).apply(null,arguments)},ei=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingFactor_1=\nfunction(){return(ei=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingFactor_1=b.asm.eg).apply(null,arguments)},fi=b._emscripten_bind_btRigidBodyConstructionInfo___destroy___0=function(){return(fi=b._emscripten_bind_btRigidBodyConstructionInfo___destroy___0=b.asm.fg).apply(null,arguments)},gi=b._emscripten_bind_btCollisionConfiguration___destroy___0=function(){return(gi=b._emscripten_bind_btCollisionConfiguration___destroy___0=b.asm.gg).apply(null,arguments)},hi=b._emscripten_bind_btPersistentManifold_btPersistentManifold_0=\nfunction(){return(hi=b._emscripten_bind_btPersistentManifold_btPersistentManifold_0=b.asm.hg).apply(null,arguments)},ii=b._emscripten_bind_btPersistentManifold_getBody0_0=function(){return(ii=b._emscripten_bind_btPersistentManifold_getBody0_0=b.asm.ig).apply(null,arguments)},ji=b._emscripten_bind_btPersistentManifold_getBody1_0=function(){return(ji=b._emscripten_bind_btPersistentManifold_getBody1_0=b.asm.jg).apply(null,arguments)},ki=b._emscripten_bind_btPersistentManifold_getNumContacts_0=function(){return(ki=\nb._emscripten_bind_btPersistentManifold_getNumContacts_0=b.asm.kg).apply(null,arguments)},li=b._emscripten_bind_btPersistentManifold_getContactPoint_1=function(){return(li=b._emscripten_bind_btPersistentManifold_getContactPoint_1=b.asm.lg).apply(null,arguments)},mi=b._emscripten_bind_btPersistentManifold___destroy___0=function(){return(mi=b._emscripten_bind_btPersistentManifold___destroy___0=b.asm.mg).apply(null,arguments)},ni=b._emscripten_bind_btCompoundShape_btCompoundShape_0=function(){return(ni=\nb._emscripten_bind_btCompoundShape_btCompoundShape_0=b.asm.ng).apply(null,arguments)},oi=b._emscripten_bind_btCompoundShape_btCompoundShape_1=function(){return(oi=b._emscripten_bind_btCompoundShape_btCompoundShape_1=b.asm.og).apply(null,arguments)},pi=b._emscripten_bind_btCompoundShape_addChildShape_2=function(){return(pi=b._emscripten_bind_btCompoundShape_addChildShape_2=b.asm.pg).apply(null,arguments)},qi=b._emscripten_bind_btCompoundShape_removeChildShape_1=function(){return(qi=b._emscripten_bind_btCompoundShape_removeChildShape_1=\nb.asm.qg).apply(null,arguments)},ri=b._emscripten_bind_btCompoundShape_removeChildShapeByIndex_1=function(){return(ri=b._emscripten_bind_btCompoundShape_removeChildShapeByIndex_1=b.asm.rg).apply(null,arguments)},si=b._emscripten_bind_btCompoundShape_getNumChildShapes_0=function(){return(si=b._emscripten_bind_btCompoundShape_getNumChildShapes_0=b.asm.sg).apply(null,arguments)},ti=b._emscripten_bind_btCompoundShape_getChildShape_1=function(){return(ti=b._emscripten_bind_btCompoundShape_getChildShape_1=\nb.asm.tg).apply(null,arguments)},ui=b._emscripten_bind_btCompoundShape_updateChildTransform_2=function(){return(ui=b._emscripten_bind_btCompoundShape_updateChildTransform_2=b.asm.ug).apply(null,arguments)},vi=b._emscripten_bind_btCompoundShape_updateChildTransform_3=function(){return(vi=b._emscripten_bind_btCompoundShape_updateChildTransform_3=b.asm.vg).apply(null,arguments)},wi=b._emscripten_bind_btCompoundShape_setMargin_1=function(){return(wi=b._emscripten_bind_btCompoundShape_setMargin_1=b.asm.wg).apply(null,\narguments)},xi=b._emscripten_bind_btCompoundShape_getMargin_0=function(){return(xi=b._emscripten_bind_btCompoundShape_getMargin_0=b.asm.xg).apply(null,arguments)},yi=b._emscripten_bind_btCompoundShape_setLocalScaling_1=function(){return(yi=b._emscripten_bind_btCompoundShape_setLocalScaling_1=b.asm.yg).apply(null,arguments)},zi=b._emscripten_bind_btCompoundShape_getLocalScaling_0=function(){return(zi=b._emscripten_bind_btCompoundShape_getLocalScaling_0=b.asm.zg).apply(null,arguments)},Ai=b._emscripten_bind_btCompoundShape_calculateLocalInertia_2=\nfunction(){return(Ai=b._emscripten_bind_btCompoundShape_calculateLocalInertia_2=b.asm.Ag).apply(null,arguments)},Bi=b._emscripten_bind_btCompoundShape___destroy___0=function(){return(Bi=b._emscripten_bind_btCompoundShape___destroy___0=b.asm.Bg).apply(null,arguments)},Ci=b._emscripten_bind_ClosestConvexResultCallback_ClosestConvexResultCallback_2=function(){return(Ci=b._emscripten_bind_ClosestConvexResultCallback_ClosestConvexResultCallback_2=b.asm.Cg).apply(null,arguments)},Di=b._emscripten_bind_ClosestConvexResultCallback_hasHit_0=\nfunction(){return(Di=b._emscripten_bind_ClosestConvexResultCallback_hasHit_0=b.asm.Dg).apply(null,arguments)},Ei=b._emscripten_bind_ClosestConvexResultCallback_get_m_convexFromWorld_0=function(){return(Ei=b._emscripten_bind_ClosestConvexResultCallback_get_m_convexFromWorld_0=b.asm.Eg).apply(null,arguments)},Fi=b._emscripten_bind_ClosestConvexResultCallback_set_m_convexFromWorld_1=function(){return(Fi=b._emscripten_bind_ClosestConvexResultCallback_set_m_convexFromWorld_1=b.asm.Fg).apply(null,arguments)},\nGi=b._emscripten_bind_ClosestConvexResultCallback_get_m_convexToWorld_0=function(){return(Gi=b._emscripten_bind_ClosestConvexResultCallback_get_m_convexToWorld_0=b.asm.Gg).apply(null,arguments)},Hi=b._emscripten_bind_ClosestConvexResultCallback_set_m_convexToWorld_1=function(){return(Hi=b._emscripten_bind_ClosestConvexResultCallback_set_m_convexToWorld_1=b.asm.Hg).apply(null,arguments)},Ii=b._emscripten_bind_ClosestConvexResultCallback_get_m_hitNormalWorld_0=function(){return(Ii=b._emscripten_bind_ClosestConvexResultCallback_get_m_hitNormalWorld_0=\nb.asm.Ig).apply(null,arguments)},Ji=b._emscripten_bind_ClosestConvexResultCallback_set_m_hitNormalWorld_1=function(){return(Ji=b._emscripten_bind_ClosestConvexResultCallback_set_m_hitNormalWorld_1=b.asm.Jg).apply(null,arguments)},Ki=b._emscripten_bind_ClosestConvexResultCallback_get_m_hitPointWorld_0=function(){return(Ki=b._emscripten_bind_ClosestConvexResultCallback_get_m_hitPointWorld_0=b.asm.Kg).apply(null,arguments)},Li=b._emscripten_bind_ClosestConvexResultCallback_set_m_hitPointWorld_1=function(){return(Li=\nb._emscripten_bind_ClosestConvexResultCallback_set_m_hitPointWorld_1=b.asm.Lg).apply(null,arguments)},Mi=b._emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterGroup_0=function(){return(Mi=b._emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterGroup_0=b.asm.Mg).apply(null,arguments)},Ni=b._emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterGroup_1=function(){return(Ni=b._emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterGroup_1=b.asm.Ng).apply(null,\narguments)},Oi=b._emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterMask_0=function(){return(Oi=b._emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterMask_0=b.asm.Og).apply(null,arguments)},Pi=b._emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterMask_1=function(){return(Pi=b._emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterMask_1=b.asm.Pg).apply(null,arguments)},Qi=b._emscripten_bind_ClosestConvexResultCallback_get_m_closestHitFraction_0=\nfunction(){return(Qi=b._emscripten_bind_ClosestConvexResultCallback_get_m_closestHitFraction_0=b.asm.Qg).apply(null,arguments)},Ri=b._emscripten_bind_ClosestConvexResultCallback_set_m_closestHitFraction_1=function(){return(Ri=b._emscripten_bind_ClosestConvexResultCallback_set_m_closestHitFraction_1=b.asm.Rg).apply(null,arguments)},Si=b._emscripten_bind_ClosestConvexResultCallback___destroy___0=function(){return(Si=b._emscripten_bind_ClosestConvexResultCallback___destroy___0=b.asm.Sg).apply(null,arguments)},\nTi=b._emscripten_bind_AllHitsRayResultCallback_AllHitsRayResultCallback_2=function(){return(Ti=b._emscripten_bind_AllHitsRayResultCallback_AllHitsRayResultCallback_2=b.asm.Tg).apply(null,arguments)},Ui=b._emscripten_bind_AllHitsRayResultCallback_hasHit_0=function(){return(Ui=b._emscripten_bind_AllHitsRayResultCallback_hasHit_0=b.asm.Ug).apply(null,arguments)},Vi=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionObjects_0=function(){return(Vi=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionObjects_0=\nb.asm.Vg).apply(null,arguments)},Wi=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionObjects_1=function(){return(Wi=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionObjects_1=b.asm.Wg).apply(null,arguments)},Xi=b._emscripten_bind_AllHitsRayResultCallback_get_m_rayFromWorld_0=function(){return(Xi=b._emscripten_bind_AllHitsRayResultCallback_get_m_rayFromWorld_0=b.asm.Xg).apply(null,arguments)},Yi=b._emscripten_bind_AllHitsRayResultCallback_set_m_rayFromWorld_1=function(){return(Yi=\nb._emscripten_bind_AllHitsRayResultCallback_set_m_rayFromWorld_1=b.asm.Yg).apply(null,arguments)},Zi=b._emscripten_bind_AllHitsRayResultCallback_get_m_rayToWorld_0=function(){return(Zi=b._emscripten_bind_AllHitsRayResultCallback_get_m_rayToWorld_0=b.asm.Zg).apply(null,arguments)},$i=b._emscripten_bind_AllHitsRayResultCallback_set_m_rayToWorld_1=function(){return($i=b._emscripten_bind_AllHitsRayResultCallback_set_m_rayToWorld_1=b.asm._g).apply(null,arguments)},aj=b._emscripten_bind_AllHitsRayResultCallback_get_m_hitNormalWorld_0=\nfunction(){return(aj=b._emscripten_bind_AllHitsRayResultCallback_get_m_hitNormalWorld_0=b.asm.$g).apply(null,arguments)},bj=b._emscripten_bind_AllHitsRayResultCallback_set_m_hitNormalWorld_1=function(){return(bj=b._emscripten_bind_AllHitsRayResultCallback_set_m_hitNormalWorld_1=b.asm.ah).apply(null,arguments)},cj=b._emscripten_bind_AllHitsRayResultCallback_get_m_hitPointWorld_0=function(){return(cj=b._emscripten_bind_AllHitsRayResultCallback_get_m_hitPointWorld_0=b.asm.bh).apply(null,arguments)},\ndj=b._emscripten_bind_AllHitsRayResultCallback_set_m_hitPointWorld_1=function(){return(dj=b._emscripten_bind_AllHitsRayResultCallback_set_m_hitPointWorld_1=b.asm.ch).apply(null,arguments)},ej=b._emscripten_bind_AllHitsRayResultCallback_get_m_hitFractions_0=function(){return(ej=b._emscripten_bind_AllHitsRayResultCallback_get_m_hitFractions_0=b.asm.dh).apply(null,arguments)},fj=b._emscripten_bind_AllHitsRayResultCallback_set_m_hitFractions_1=function(){return(fj=b._emscripten_bind_AllHitsRayResultCallback_set_m_hitFractions_1=\nb.asm.eh).apply(null,arguments)},gj=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterGroup_0=function(){return(gj=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterGroup_0=b.asm.fh).apply(null,arguments)},hj=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterGroup_1=function(){return(hj=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterGroup_1=b.asm.gh).apply(null,arguments)},ij=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterMask_0=\nfunction(){return(ij=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterMask_0=b.asm.hh).apply(null,arguments)},jj=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterMask_1=function(){return(jj=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterMask_1=b.asm.ih).apply(null,arguments)},kj=b._emscripten_bind_AllHitsRayResultCallback_get_m_closestHitFraction_0=function(){return(kj=b._emscripten_bind_AllHitsRayResultCallback_get_m_closestHitFraction_0=b.asm.jh).apply(null,\narguments)},lj=b._emscripten_bind_AllHitsRayResultCallback_set_m_closestHitFraction_1=function(){return(lj=b._emscripten_bind_AllHitsRayResultCallback_set_m_closestHitFraction_1=b.asm.kh).apply(null,arguments)},mj=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionObject_0=function(){return(mj=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionObject_0=b.asm.lh).apply(null,arguments)},nj=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionObject_1=function(){return(nj=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionObject_1=\nb.asm.mh).apply(null,arguments)},oj=b._emscripten_bind_AllHitsRayResultCallback___destroy___0=function(){return(oj=b._emscripten_bind_AllHitsRayResultCallback___destroy___0=b.asm.nh).apply(null,arguments)},pj=b._emscripten_bind_tMaterialArray_size_0=function(){return(pj=b._emscripten_bind_tMaterialArray_size_0=b.asm.oh).apply(null,arguments)},qj=b._emscripten_bind_tMaterialArray_at_1=function(){return(qj=b._emscripten_bind_tMaterialArray_at_1=b.asm.ph).apply(null,arguments)},rj=b._emscripten_bind_tMaterialArray___destroy___0=\nfunction(){return(rj=b._emscripten_bind_tMaterialArray___destroy___0=b.asm.qh).apply(null,arguments)},sj=b._emscripten_bind_btDefaultVehicleRaycaster_btDefaultVehicleRaycaster_1=function(){return(sj=b._emscripten_bind_btDefaultVehicleRaycaster_btDefaultVehicleRaycaster_1=b.asm.rh).apply(null,arguments)},tj=b._emscripten_bind_btDefaultVehicleRaycaster_castRay_3=function(){return(tj=b._emscripten_bind_btDefaultVehicleRaycaster_castRay_3=b.asm.sh).apply(null,arguments)},uj=b._emscripten_bind_btDefaultVehicleRaycaster___destroy___0=\nfunction(){return(uj=b._emscripten_bind_btDefaultVehicleRaycaster___destroy___0=b.asm.th).apply(null,arguments)},vj=b._emscripten_bind_btEmptyShape_btEmptyShape_0=function(){return(vj=b._emscripten_bind_btEmptyShape_btEmptyShape_0=b.asm.uh).apply(null,arguments)},wj=b._emscripten_bind_btEmptyShape_setLocalScaling_1=function(){return(wj=b._emscripten_bind_btEmptyShape_setLocalScaling_1=b.asm.vh).apply(null,arguments)},xj=b._emscripten_bind_btEmptyShape_getLocalScaling_0=function(){return(xj=b._emscripten_bind_btEmptyShape_getLocalScaling_0=\nb.asm.wh).apply(null,arguments)},yj=b._emscripten_bind_btEmptyShape_calculateLocalInertia_2=function(){return(yj=b._emscripten_bind_btEmptyShape_calculateLocalInertia_2=b.asm.xh).apply(null,arguments)},zj=b._emscripten_bind_btEmptyShape___destroy___0=function(){return(zj=b._emscripten_bind_btEmptyShape___destroy___0=b.asm.yh).apply(null,arguments)},Aj=b._emscripten_bind_btConstraintSetting_btConstraintSetting_0=function(){return(Aj=b._emscripten_bind_btConstraintSetting_btConstraintSetting_0=b.asm.zh).apply(null,\narguments)},Bj=b._emscripten_bind_btConstraintSetting_get_m_tau_0=function(){return(Bj=b._emscripten_bind_btConstraintSetting_get_m_tau_0=b.asm.Ah).apply(null,arguments)},Cj=b._emscripten_bind_btConstraintSetting_set_m_tau_1=function(){return(Cj=b._emscripten_bind_btConstraintSetting_set_m_tau_1=b.asm.Bh).apply(null,arguments)},Dj=b._emscripten_bind_btConstraintSetting_get_m_damping_0=function(){return(Dj=b._emscripten_bind_btConstraintSetting_get_m_damping_0=b.asm.Ch).apply(null,arguments)},Ej=b._emscripten_bind_btConstraintSetting_set_m_damping_1=\nfunction(){return(Ej=b._emscripten_bind_btConstraintSetting_set_m_damping_1=b.asm.Dh).apply(null,arguments)},Fj=b._emscripten_bind_btConstraintSetting_get_m_impulseClamp_0=function(){return(Fj=b._emscripten_bind_btConstraintSetting_get_m_impulseClamp_0=b.asm.Eh).apply(null,arguments)},Gj=b._emscripten_bind_btConstraintSetting_set_m_impulseClamp_1=function(){return(Gj=b._emscripten_bind_btConstraintSetting_set_m_impulseClamp_1=b.asm.Fh).apply(null,arguments)},Hj=b._emscripten_bind_btConstraintSetting___destroy___0=\nfunction(){return(Hj=b._emscripten_bind_btConstraintSetting___destroy___0=b.asm.Gh).apply(null,arguments)},Ij=b._emscripten_bind_LocalShapeInfo_get_m_shapePart_0=function(){return(Ij=b._emscripten_bind_LocalShapeInfo_get_m_shapePart_0=b.asm.Hh).apply(null,arguments)},Jj=b._emscripten_bind_LocalShapeInfo_set_m_shapePart_1=function(){return(Jj=b._emscripten_bind_LocalShapeInfo_set_m_shapePart_1=b.asm.Ih).apply(null,arguments)},Kj=b._emscripten_bind_LocalShapeInfo_get_m_triangleIndex_0=function(){return(Kj=\nb._emscripten_bind_LocalShapeInfo_get_m_triangleIndex_0=b.asm.Jh).apply(null,arguments)},Lj=b._emscripten_bind_LocalShapeInfo_set_m_triangleIndex_1=function(){return(Lj=b._emscripten_bind_LocalShapeInfo_set_m_triangleIndex_1=b.asm.Kh).apply(null,arguments)},Mj=b._emscripten_bind_LocalShapeInfo___destroy___0=function(){return(Mj=b._emscripten_bind_LocalShapeInfo___destroy___0=b.asm.Lh).apply(null,arguments)},Nj=b._emscripten_bind_btRigidBody_btRigidBody_1=function(){return(Nj=b._emscripten_bind_btRigidBody_btRigidBody_1=\nb.asm.Mh).apply(null,arguments)},Oj=b._emscripten_bind_btRigidBody_getCenterOfMassTransform_0=function(){return(Oj=b._emscripten_bind_btRigidBody_getCenterOfMassTransform_0=b.asm.Nh).apply(null,arguments)},Pj=b._emscripten_bind_btRigidBody_setCenterOfMassTransform_1=function(){return(Pj=b._emscripten_bind_btRigidBody_setCenterOfMassTransform_1=b.asm.Oh).apply(null,arguments)},Qj=b._emscripten_bind_btRigidBody_setSleepingThresholds_2=function(){return(Qj=b._emscripten_bind_btRigidBody_setSleepingThresholds_2=\nb.asm.Ph).apply(null,arguments)},Rj=b._emscripten_bind_btRigidBody_getLinearDamping_0=function(){return(Rj=b._emscripten_bind_btRigidBody_getLinearDamping_0=b.asm.Qh).apply(null,arguments)},Sj=b._emscripten_bind_btRigidBody_getAngularDamping_0=function(){return(Sj=b._emscripten_bind_btRigidBody_getAngularDamping_0=b.asm.Rh).apply(null,arguments)},Tj=b._emscripten_bind_btRigidBody_setDamping_2=function(){return(Tj=b._emscripten_bind_btRigidBody_setDamping_2=b.asm.Sh).apply(null,arguments)},Uj=b._emscripten_bind_btRigidBody_setMassProps_2=\nfunction(){return(Uj=b._emscripten_bind_btRigidBody_setMassProps_2=b.asm.Th).apply(null,arguments)},Vj=b._emscripten_bind_btRigidBody_getLinearFactor_0=function(){return(Vj=b._emscripten_bind_btRigidBody_getLinearFactor_0=b.asm.Uh).apply(null,arguments)},Wj=b._emscripten_bind_btRigidBody_setLinearFactor_1=function(){return(Wj=b._emscripten_bind_btRigidBody_setLinearFactor_1=b.asm.Vh).apply(null,arguments)},Xj=b._emscripten_bind_btRigidBody_applyTorque_1=function(){return(Xj=b._emscripten_bind_btRigidBody_applyTorque_1=\nb.asm.Wh).apply(null,arguments)},Yj=b._emscripten_bind_btRigidBody_applyLocalTorque_1=function(){return(Yj=b._emscripten_bind_btRigidBody_applyLocalTorque_1=b.asm.Xh).apply(null,arguments)},Zj=b._emscripten_bind_btRigidBody_applyForce_2=function(){return(Zj=b._emscripten_bind_btRigidBody_applyForce_2=b.asm.Yh).apply(null,arguments)},ak=b._emscripten_bind_btRigidBody_applyCentralForce_1=function(){return(ak=b._emscripten_bind_btRigidBody_applyCentralForce_1=b.asm.Zh).apply(null,arguments)},bk=b._emscripten_bind_btRigidBody_applyCentralLocalForce_1=\nfunction(){return(bk=b._emscripten_bind_btRigidBody_applyCentralLocalForce_1=b.asm._h).apply(null,arguments)},ck=b._emscripten_bind_btRigidBody_applyTorqueImpulse_1=function(){return(ck=b._emscripten_bind_btRigidBody_applyTorqueImpulse_1=b.asm.$h).apply(null,arguments)},dk=b._emscripten_bind_btRigidBody_applyImpulse_2=function(){return(dk=b._emscripten_bind_btRigidBody_applyImpulse_2=b.asm.ai).apply(null,arguments)},ek=b._emscripten_bind_btRigidBody_applyCentralImpulse_1=function(){return(ek=b._emscripten_bind_btRigidBody_applyCentralImpulse_1=\nb.asm.bi).apply(null,arguments)},fk=b._emscripten_bind_btRigidBody_updateInertiaTensor_0=function(){return(fk=b._emscripten_bind_btRigidBody_updateInertiaTensor_0=b.asm.ci).apply(null,arguments)},gk=b._emscripten_bind_btRigidBody_getLinearVelocity_0=function(){return(gk=b._emscripten_bind_btRigidBody_getLinearVelocity_0=b.asm.di).apply(null,arguments)},hk=b._emscripten_bind_btRigidBody_getAngularVelocity_0=function(){return(hk=b._emscripten_bind_btRigidBody_getAngularVelocity_0=b.asm.ei).apply(null,\narguments)},ik=b._emscripten_bind_btRigidBody_setLinearVelocity_1=function(){return(ik=b._emscripten_bind_btRigidBody_setLinearVelocity_1=b.asm.fi).apply(null,arguments)},jk=b._emscripten_bind_btRigidBody_setAngularVelocity_1=function(){return(jk=b._emscripten_bind_btRigidBody_setAngularVelocity_1=b.asm.gi).apply(null,arguments)},kk=b._emscripten_bind_btRigidBody_getMotionState_0=function(){return(kk=b._emscripten_bind_btRigidBody_getMotionState_0=b.asm.hi).apply(null,arguments)},lk=b._emscripten_bind_btRigidBody_setMotionState_1=\nfunction(){return(lk=b._emscripten_bind_btRigidBody_setMotionState_1=b.asm.ii).apply(null,arguments)},mk=b._emscripten_bind_btRigidBody_getAngularFactor_0=function(){return(mk=b._emscripten_bind_btRigidBody_getAngularFactor_0=b.asm.ji).apply(null,arguments)},nk=b._emscripten_bind_btRigidBody_setAngularFactor_1=function(){return(nk=b._emscripten_bind_btRigidBody_setAngularFactor_1=b.asm.ki).apply(null,arguments)},ok=b._emscripten_bind_btRigidBody_upcast_1=function(){return(ok=b._emscripten_bind_btRigidBody_upcast_1=\nb.asm.li).apply(null,arguments)},pk=b._emscripten_bind_btRigidBody_getAabb_2=function(){return(pk=b._emscripten_bind_btRigidBody_getAabb_2=b.asm.mi).apply(null,arguments)},qk=b._emscripten_bind_btRigidBody_applyGravity_0=function(){return(qk=b._emscripten_bind_btRigidBody_applyGravity_0=b.asm.ni).apply(null,arguments)},rk=b._emscripten_bind_btRigidBody_getGravity_0=function(){return(rk=b._emscripten_bind_btRigidBody_getGravity_0=b.asm.oi).apply(null,arguments)},sk=b._emscripten_bind_btRigidBody_setGravity_1=\nfunction(){return(sk=b._emscripten_bind_btRigidBody_setGravity_1=b.asm.pi).apply(null,arguments)},tk=b._emscripten_bind_btRigidBody_getBroadphaseProxy_0=function(){return(tk=b._emscripten_bind_btRigidBody_getBroadphaseProxy_0=b.asm.qi).apply(null,arguments)},uk=b._emscripten_bind_btRigidBody_clearForces_0=function(){return(uk=b._emscripten_bind_btRigidBody_clearForces_0=b.asm.ri).apply(null,arguments)},vk=b._emscripten_bind_btRigidBody_setAnisotropicFriction_2=function(){return(vk=b._emscripten_bind_btRigidBody_setAnisotropicFriction_2=\nb.asm.si).apply(null,arguments)},wk=b._emscripten_bind_btRigidBody_getCollisionShape_0=function(){return(wk=b._emscripten_bind_btRigidBody_getCollisionShape_0=b.asm.ti).apply(null,arguments)},xk=b._emscripten_bind_btRigidBody_setContactProcessingThreshold_1=function(){return(xk=b._emscripten_bind_btRigidBody_setContactProcessingThreshold_1=b.asm.ui).apply(null,arguments)},yk=b._emscripten_bind_btRigidBody_setActivationState_1=function(){return(yk=b._emscripten_bind_btRigidBody_setActivationState_1=\nb.asm.vi).apply(null,arguments)},zk=b._emscripten_bind_btRigidBody_forceActivationState_1=function(){return(zk=b._emscripten_bind_btRigidBody_forceActivationState_1=b.asm.wi).apply(null,arguments)},Ak=b._emscripten_bind_btRigidBody_activate_0=function(){return(Ak=b._emscripten_bind_btRigidBody_activate_0=b.asm.xi).apply(null,arguments)},Bk=b._emscripten_bind_btRigidBody_activate_1=function(){return(Bk=b._emscripten_bind_btRigidBody_activate_1=b.asm.yi).apply(null,arguments)},Ck=b._emscripten_bind_btRigidBody_isActive_0=\nfunction(){return(Ck=b._emscripten_bind_btRigidBody_isActive_0=b.asm.zi).apply(null,arguments)},Dk=b._emscripten_bind_btRigidBody_isKinematicObject_0=function(){return(Dk=b._emscripten_bind_btRigidBody_isKinematicObject_0=b.asm.Ai).apply(null,arguments)},Ek=b._emscripten_bind_btRigidBody_isStaticObject_0=function(){return(Ek=b._emscripten_bind_btRigidBody_isStaticObject_0=b.asm.Bi).apply(null,arguments)},Fk=b._emscripten_bind_btRigidBody_isStaticOrKinematicObject_0=function(){return(Fk=b._emscripten_bind_btRigidBody_isStaticOrKinematicObject_0=\nb.asm.Ci).apply(null,arguments)},Gk=b._emscripten_bind_btRigidBody_getRestitution_0=function(){return(Gk=b._emscripten_bind_btRigidBody_getRestitution_0=b.asm.Di).apply(null,arguments)},Hk=b._emscripten_bind_btRigidBody_getFriction_0=function(){return(Hk=b._emscripten_bind_btRigidBody_getFriction_0=b.asm.Ei).apply(null,arguments)},Ik=b._emscripten_bind_btRigidBody_getRollingFriction_0=function(){return(Ik=b._emscripten_bind_btRigidBody_getRollingFriction_0=b.asm.Fi).apply(null,arguments)},Jk=b._emscripten_bind_btRigidBody_setRestitution_1=\nfunction(){return(Jk=b._emscripten_bind_btRigidBody_setRestitution_1=b.asm.Gi).apply(null,arguments)},Kk=b._emscripten_bind_btRigidBody_setFriction_1=function(){return(Kk=b._emscripten_bind_btRigidBody_setFriction_1=b.asm.Hi).apply(null,arguments)},Lk=b._emscripten_bind_btRigidBody_setRollingFriction_1=function(){return(Lk=b._emscripten_bind_btRigidBody_setRollingFriction_1=b.asm.Ii).apply(null,arguments)},Mk=b._emscripten_bind_btRigidBody_getWorldTransform_0=function(){return(Mk=b._emscripten_bind_btRigidBody_getWorldTransform_0=\nb.asm.Ji).apply(null,arguments)},Nk=b._emscripten_bind_btRigidBody_getCollisionFlags_0=function(){return(Nk=b._emscripten_bind_btRigidBody_getCollisionFlags_0=b.asm.Ki).apply(null,arguments)},Ok=b._emscripten_bind_btRigidBody_setCollisionFlags_1=function(){return(Ok=b._emscripten_bind_btRigidBody_setCollisionFlags_1=b.asm.Li).apply(null,arguments)},Pk=b._emscripten_bind_btRigidBody_setWorldTransform_1=function(){return(Pk=b._emscripten_bind_btRigidBody_setWorldTransform_1=b.asm.Mi).apply(null,arguments)},\nQk=b._emscripten_bind_btRigidBody_setCollisionShape_1=function(){return(Qk=b._emscripten_bind_btRigidBody_setCollisionShape_1=b.asm.Ni).apply(null,arguments)},Rk=b._emscripten_bind_btRigidBody_setCcdMotionThreshold_1=function(){return(Rk=b._emscripten_bind_btRigidBody_setCcdMotionThreshold_1=b.asm.Oi).apply(null,arguments)},Sk=b._emscripten_bind_btRigidBody_setCcdSweptSphereRadius_1=function(){return(Sk=b._emscripten_bind_btRigidBody_setCcdSweptSphereRadius_1=b.asm.Pi).apply(null,arguments)},Tk=b._emscripten_bind_btRigidBody_getUserIndex_0=\nfunction(){return(Tk=b._emscripten_bind_btRigidBody_getUserIndex_0=b.asm.Qi).apply(null,arguments)},Uk=b._emscripten_bind_btRigidBody_setUserIndex_1=function(){return(Uk=b._emscripten_bind_btRigidBody_setUserIndex_1=b.asm.Ri).apply(null,arguments)},Vk=b._emscripten_bind_btRigidBody_getUserPointer_0=function(){return(Vk=b._emscripten_bind_btRigidBody_getUserPointer_0=b.asm.Si).apply(null,arguments)},Wk=b._emscripten_bind_btRigidBody_setUserPointer_1=function(){return(Wk=b._emscripten_bind_btRigidBody_setUserPointer_1=\nb.asm.Ti).apply(null,arguments)},Xk=b._emscripten_bind_btRigidBody_getBroadphaseHandle_0=function(){return(Xk=b._emscripten_bind_btRigidBody_getBroadphaseHandle_0=b.asm.Ui).apply(null,arguments)},Yk=b._emscripten_bind_btRigidBody___destroy___0=function(){return(Yk=b._emscripten_bind_btRigidBody___destroy___0=b.asm.Vi).apply(null,arguments)},Zk=b._emscripten_bind_btIndexedMeshArray_size_0=function(){return(Zk=b._emscripten_bind_btIndexedMeshArray_size_0=b.asm.Wi).apply(null,arguments)},$k=b._emscripten_bind_btIndexedMeshArray_at_1=\nfunction(){return($k=b._emscripten_bind_btIndexedMeshArray_at_1=b.asm.Xi).apply(null,arguments)},al=b._emscripten_bind_btIndexedMeshArray___destroy___0=function(){return(al=b._emscripten_bind_btIndexedMeshArray___destroy___0=b.asm.Yi).apply(null,arguments)},bl=b._emscripten_bind_btDbvtBroadphase_btDbvtBroadphase_0=function(){return(bl=b._emscripten_bind_btDbvtBroadphase_btDbvtBroadphase_0=b.asm.Zi).apply(null,arguments)},cl=b._emscripten_bind_btDbvtBroadphase___destroy___0=function(){return(cl=b._emscripten_bind_btDbvtBroadphase___destroy___0=\nb.asm._i).apply(null,arguments)},dl=b._emscripten_bind_btHeightfieldTerrainShape_btHeightfieldTerrainShape_9=function(){return(dl=b._emscripten_bind_btHeightfieldTerrainShape_btHeightfieldTerrainShape_9=b.asm.$i).apply(null,arguments)},el=b._emscripten_bind_btHeightfieldTerrainShape_setMargin_1=function(){return(el=b._emscripten_bind_btHeightfieldTerrainShape_setMargin_1=b.asm.aj).apply(null,arguments)},fl=b._emscripten_bind_btHeightfieldTerrainShape_getMargin_0=function(){return(fl=b._emscripten_bind_btHeightfieldTerrainShape_getMargin_0=\nb.asm.bj).apply(null,arguments)},gl=b._emscripten_bind_btHeightfieldTerrainShape_setLocalScaling_1=function(){return(gl=b._emscripten_bind_btHeightfieldTerrainShape_setLocalScaling_1=b.asm.cj).apply(null,arguments)},hl=b._emscripten_bind_btHeightfieldTerrainShape_getLocalScaling_0=function(){return(hl=b._emscripten_bind_btHeightfieldTerrainShape_getLocalScaling_0=b.asm.dj).apply(null,arguments)},il=b._emscripten_bind_btHeightfieldTerrainShape_calculateLocalInertia_2=function(){return(il=b._emscripten_bind_btHeightfieldTerrainShape_calculateLocalInertia_2=\nb.asm.ej).apply(null,arguments)},jl=b._emscripten_bind_btHeightfieldTerrainShape___destroy___0=function(){return(jl=b._emscripten_bind_btHeightfieldTerrainShape___destroy___0=b.asm.fj).apply(null,arguments)},kl=b._emscripten_bind_btDefaultSoftBodySolver_btDefaultSoftBodySolver_0=function(){return(kl=b._emscripten_bind_btDefaultSoftBodySolver_btDefaultSoftBodySolver_0=b.asm.gj).apply(null,arguments)},ll=b._emscripten_bind_btDefaultSoftBodySolver___destroy___0=function(){return(ll=b._emscripten_bind_btDefaultSoftBodySolver___destroy___0=\nb.asm.hj).apply(null,arguments)},ml=b._emscripten_bind_btCollisionDispatcher_btCollisionDispatcher_1=function(){return(ml=b._emscripten_bind_btCollisionDispatcher_btCollisionDispatcher_1=b.asm.ij).apply(null,arguments)},nl=b._emscripten_bind_btCollisionDispatcher_getNumManifolds_0=function(){return(nl=b._emscripten_bind_btCollisionDispatcher_getNumManifolds_0=b.asm.jj).apply(null,arguments)},ol=b._emscripten_bind_btCollisionDispatcher_getManifoldByIndexInternal_1=function(){return(ol=b._emscripten_bind_btCollisionDispatcher_getManifoldByIndexInternal_1=\nb.asm.kj).apply(null,arguments)},pl=b._emscripten_bind_btCollisionDispatcher___destroy___0=function(){return(pl=b._emscripten_bind_btCollisionDispatcher___destroy___0=b.asm.lj).apply(null,arguments)},ql=b._emscripten_bind_btAxisSweep3_btAxisSweep3_2=function(){return(ql=b._emscripten_bind_btAxisSweep3_btAxisSweep3_2=b.asm.mj).apply(null,arguments)},rl=b._emscripten_bind_btAxisSweep3_btAxisSweep3_3=function(){return(rl=b._emscripten_bind_btAxisSweep3_btAxisSweep3_3=b.asm.nj).apply(null,arguments)},\nsl=b._emscripten_bind_btAxisSweep3_btAxisSweep3_4=function(){return(sl=b._emscripten_bind_btAxisSweep3_btAxisSweep3_4=b.asm.oj).apply(null,arguments)},tl=b._emscripten_bind_btAxisSweep3_btAxisSweep3_5=function(){return(tl=b._emscripten_bind_btAxisSweep3_btAxisSweep3_5=b.asm.pj).apply(null,arguments)},ul=b._emscripten_bind_btAxisSweep3___destroy___0=function(){return(ul=b._emscripten_bind_btAxisSweep3___destroy___0=b.asm.qj).apply(null,arguments)},vl=b._emscripten_bind_VoidPtr___destroy___0=function(){return(vl=\nb._emscripten_bind_VoidPtr___destroy___0=b.asm.rj).apply(null,arguments)},wl=b._emscripten_bind_btSoftBodyWorldInfo_btSoftBodyWorldInfo_0=function(){return(wl=b._emscripten_bind_btSoftBodyWorldInfo_btSoftBodyWorldInfo_0=b.asm.sj).apply(null,arguments)},xl=b._emscripten_bind_btSoftBodyWorldInfo_get_air_density_0=function(){return(xl=b._emscripten_bind_btSoftBodyWorldInfo_get_air_density_0=b.asm.tj).apply(null,arguments)},yl=b._emscripten_bind_btSoftBodyWorldInfo_set_air_density_1=function(){return(yl=\nb._emscripten_bind_btSoftBodyWorldInfo_set_air_density_1=b.asm.uj).apply(null,arguments)},zl=b._emscripten_bind_btSoftBodyWorldInfo_get_water_density_0=function(){return(zl=b._emscripten_bind_btSoftBodyWorldInfo_get_water_density_0=b.asm.vj).apply(null,arguments)},Al=b._emscripten_bind_btSoftBodyWorldInfo_set_water_density_1=function(){return(Al=b._emscripten_bind_btSoftBodyWorldInfo_set_water_density_1=b.asm.wj).apply(null,arguments)},Bl=b._emscripten_bind_btSoftBodyWorldInfo_get_water_offset_0=\nfunction(){return(Bl=b._emscripten_bind_btSoftBodyWorldInfo_get_water_offset_0=b.asm.xj).apply(null,arguments)},Cl=b._emscripten_bind_btSoftBodyWorldInfo_set_water_offset_1=function(){return(Cl=b._emscripten_bind_btSoftBodyWorldInfo_set_water_offset_1=b.asm.yj).apply(null,arguments)},Dl=b._emscripten_bind_btSoftBodyWorldInfo_get_m_maxDisplacement_0=function(){return(Dl=b._emscripten_bind_btSoftBodyWorldInfo_get_m_maxDisplacement_0=b.asm.zj).apply(null,arguments)},El=b._emscripten_bind_btSoftBodyWorldInfo_set_m_maxDisplacement_1=\nfunction(){return(El=b._emscripten_bind_btSoftBodyWorldInfo_set_m_maxDisplacement_1=b.asm.Aj).apply(null,arguments)},Fl=b._emscripten_bind_btSoftBodyWorldInfo_get_water_normal_0=function(){return(Fl=b._emscripten_bind_btSoftBodyWorldInfo_get_water_normal_0=b.asm.Bj).apply(null,arguments)},Gl=b._emscripten_bind_btSoftBodyWorldInfo_set_water_normal_1=function(){return(Gl=b._emscripten_bind_btSoftBodyWorldInfo_set_water_normal_1=b.asm.Cj).apply(null,arguments)},Hl=b._emscripten_bind_btSoftBodyWorldInfo_get_m_broadphase_0=\nfunction(){return(Hl=b._emscripten_bind_btSoftBodyWorldInfo_get_m_broadphase_0=b.asm.Dj).apply(null,arguments)},Il=b._emscripten_bind_btSoftBodyWorldInfo_set_m_broadphase_1=function(){return(Il=b._emscripten_bind_btSoftBodyWorldInfo_set_m_broadphase_1=b.asm.Ej).apply(null,arguments)},Jl=b._emscripten_bind_btSoftBodyWorldInfo_get_m_dispatcher_0=function(){return(Jl=b._emscripten_bind_btSoftBodyWorldInfo_get_m_dispatcher_0=b.asm.Fj).apply(null,arguments)},Kl=b._emscripten_bind_btSoftBodyWorldInfo_set_m_dispatcher_1=\nfunction(){return(Kl=b._emscripten_bind_btSoftBodyWorldInfo_set_m_dispatcher_1=b.asm.Gj).apply(null,arguments)},Ll=b._emscripten_bind_btSoftBodyWorldInfo_get_m_gravity_0=function(){return(Ll=b._emscripten_bind_btSoftBodyWorldInfo_get_m_gravity_0=b.asm.Hj).apply(null,arguments)},Ml=b._emscripten_bind_btSoftBodyWorldInfo_set_m_gravity_1=function(){return(Ml=b._emscripten_bind_btSoftBodyWorldInfo_set_m_gravity_1=b.asm.Ij).apply(null,arguments)},Nl=b._emscripten_bind_btSoftBodyWorldInfo___destroy___0=\nfunction(){return(Nl=b._emscripten_bind_btSoftBodyWorldInfo___destroy___0=b.asm.Jj).apply(null,arguments)},Ol=b._emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_2=function(){return(Ol=b._emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_2=b.asm.Kj).apply(null,arguments)},Pl=b._emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_4=function(){return(Pl=b._emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_4=b.asm.Lj).apply(null,arguments)},Ql=b._emscripten_bind_btConeTwistConstraint_setLimit_2=\nfunction(){return(Ql=b._emscripten_bind_btConeTwistConstraint_setLimit_2=b.asm.Mj).apply(null,arguments)},Rl=b._emscripten_bind_btConeTwistConstraint_setAngularOnly_1=function(){return(Rl=b._emscripten_bind_btConeTwistConstraint_setAngularOnly_1=b.asm.Nj).apply(null,arguments)},Sl=b._emscripten_bind_btConeTwistConstraint_setDamping_1=function(){return(Sl=b._emscripten_bind_btConeTwistConstraint_setDamping_1=b.asm.Oj).apply(null,arguments)},Tl=b._emscripten_bind_btConeTwistConstraint_enableMotor_1=\nfunction(){return(Tl=b._emscripten_bind_btConeTwistConstraint_enableMotor_1=b.asm.Pj).apply(null,arguments)},Ul=b._emscripten_bind_btConeTwistConstraint_setMaxMotorImpulse_1=function(){return(Ul=b._emscripten_bind_btConeTwistConstraint_setMaxMotorImpulse_1=b.asm.Qj).apply(null,arguments)},Vl=b._emscripten_bind_btConeTwistConstraint_setMaxMotorImpulseNormalized_1=function(){return(Vl=b._emscripten_bind_btConeTwistConstraint_setMaxMotorImpulseNormalized_1=b.asm.Rj).apply(null,arguments)},Wl=b._emscripten_bind_btConeTwistConstraint_setMotorTarget_1=\nfunction(){return(Wl=b._emscripten_bind_btConeTwistConstraint_setMotorTarget_1=b.asm.Sj).apply(null,arguments)},Xl=b._emscripten_bind_btConeTwistConstraint_setMotorTargetInConstraintSpace_1=function(){return(Xl=b._emscripten_bind_btConeTwistConstraint_setMotorTargetInConstraintSpace_1=b.asm.Tj).apply(null,arguments)},Yl=b._emscripten_bind_btConeTwistConstraint_enableFeedback_1=function(){return(Yl=b._emscripten_bind_btConeTwistConstraint_enableFeedback_1=b.asm.Uj).apply(null,arguments)},Zl=b._emscripten_bind_btConeTwistConstraint_getBreakingImpulseThreshold_0=\nfunction(){return(Zl=b._emscripten_bind_btConeTwistConstraint_getBreakingImpulseThreshold_0=b.asm.Vj).apply(null,arguments)},$l=b._emscripten_bind_btConeTwistConstraint_setBreakingImpulseThreshold_1=function(){return($l=b._emscripten_bind_btConeTwistConstraint_setBreakingImpulseThreshold_1=b.asm.Wj).apply(null,arguments)},am=b._emscripten_bind_btConeTwistConstraint_getParam_2=function(){return(am=b._emscripten_bind_btConeTwistConstraint_getParam_2=b.asm.Xj).apply(null,arguments)},bm=b._emscripten_bind_btConeTwistConstraint_setParam_3=\nfunction(){return(bm=b._emscripten_bind_btConeTwistConstraint_setParam_3=b.asm.Yj).apply(null,arguments)},cm=b._emscripten_bind_btConeTwistConstraint___destroy___0=function(){return(cm=b._emscripten_bind_btConeTwistConstraint___destroy___0=b.asm.Zj).apply(null,arguments)},dm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_2=function(){return(dm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_2=b.asm._j).apply(null,arguments)},em=b._emscripten_bind_btHingeConstraint_btHingeConstraint_3=\nfunction(){return(em=b._emscripten_bind_btHingeConstraint_btHingeConstraint_3=b.asm.$j).apply(null,arguments)},fm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_4=function(){return(fm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_4=b.asm.ak).apply(null,arguments)},gm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_5=function(){return(gm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_5=b.asm.bk).apply(null,arguments)},hm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_6=\nfunction(){return(hm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_6=b.asm.ck).apply(null,arguments)},im=b._emscripten_bind_btHingeConstraint_btHingeConstraint_7=function(){return(im=b._emscripten_bind_btHingeConstraint_btHingeConstraint_7=b.asm.dk).apply(null,arguments)},jm=b._emscripten_bind_btHingeConstraint_setLimit_4=function(){return(jm=b._emscripten_bind_btHingeConstraint_setLimit_4=b.asm.ek).apply(null,arguments)},km=b._emscripten_bind_btHingeConstraint_setLimit_5=function(){return(km=\nb._emscripten_bind_btHingeConstraint_setLimit_5=b.asm.fk).apply(null,arguments)},lm=b._emscripten_bind_btHingeConstraint_enableAngularMotor_3=function(){return(lm=b._emscripten_bind_btHingeConstraint_enableAngularMotor_3=b.asm.gk).apply(null,arguments)},mm=b._emscripten_bind_btHingeConstraint_setAngularOnly_1=function(){return(mm=b._emscripten_bind_btHingeConstraint_setAngularOnly_1=b.asm.hk).apply(null,arguments)},nm=b._emscripten_bind_btHingeConstraint_enableMotor_1=function(){return(nm=b._emscripten_bind_btHingeConstraint_enableMotor_1=\nb.asm.ik).apply(null,arguments)},om=b._emscripten_bind_btHingeConstraint_setMaxMotorImpulse_1=function(){return(om=b._emscripten_bind_btHingeConstraint_setMaxMotorImpulse_1=b.asm.jk).apply(null,arguments)},pm=b._emscripten_bind_btHingeConstraint_setMotorTarget_2=function(){return(pm=b._emscripten_bind_btHingeConstraint_setMotorTarget_2=b.asm.kk).apply(null,arguments)},qm=b._emscripten_bind_btHingeConstraint_enableFeedback_1=function(){return(qm=b._emscripten_bind_btHingeConstraint_enableFeedback_1=\nb.asm.lk).apply(null,arguments)},rm=b._emscripten_bind_btHingeConstraint_getBreakingImpulseThreshold_0=function(){return(rm=b._emscripten_bind_btHingeConstraint_getBreakingImpulseThreshold_0=b.asm.mk).apply(null,arguments)},sm=b._emscripten_bind_btHingeConstraint_setBreakingImpulseThreshold_1=function(){return(sm=b._emscripten_bind_btHingeConstraint_setBreakingImpulseThreshold_1=b.asm.nk).apply(null,arguments)},tm=b._emscripten_bind_btHingeConstraint_getParam_2=function(){return(tm=b._emscripten_bind_btHingeConstraint_getParam_2=\nb.asm.ok).apply(null,arguments)},um=b._emscripten_bind_btHingeConstraint_setParam_3=function(){return(um=b._emscripten_bind_btHingeConstraint_setParam_3=b.asm.pk).apply(null,arguments)},wm=b._emscripten_bind_btHingeConstraint___destroy___0=function(){return(wm=b._emscripten_bind_btHingeConstraint___destroy___0=b.asm.qk).apply(null,arguments)},xm=b._emscripten_bind_btConeShapeZ_btConeShapeZ_2=function(){return(xm=b._emscripten_bind_btConeShapeZ_btConeShapeZ_2=b.asm.rk).apply(null,arguments)},ym=b._emscripten_bind_btConeShapeZ_setLocalScaling_1=\nfunction(){return(ym=b._emscripten_bind_btConeShapeZ_setLocalScaling_1=b.asm.sk).apply(null,arguments)},zm=b._emscripten_bind_btConeShapeZ_getLocalScaling_0=function(){return(zm=b._emscripten_bind_btConeShapeZ_getLocalScaling_0=b.asm.tk).apply(null,arguments)},Am=b._emscripten_bind_btConeShapeZ_calculateLocalInertia_2=function(){return(Am=b._emscripten_bind_btConeShapeZ_calculateLocalInertia_2=b.asm.uk).apply(null,arguments)},Bm=b._emscripten_bind_btConeShapeZ___destroy___0=function(){return(Bm=b._emscripten_bind_btConeShapeZ___destroy___0=\nb.asm.vk).apply(null,arguments)},Cm=b._emscripten_bind_btConeShapeX_btConeShapeX_2=function(){return(Cm=b._emscripten_bind_btConeShapeX_btConeShapeX_2=b.asm.wk).apply(null,arguments)},Dm=b._emscripten_bind_btConeShapeX_setLocalScaling_1=function(){return(Dm=b._emscripten_bind_btConeShapeX_setLocalScaling_1=b.asm.xk).apply(null,arguments)},Em=b._emscripten_bind_btConeShapeX_getLocalScaling_0=function(){return(Em=b._emscripten_bind_btConeShapeX_getLocalScaling_0=b.asm.yk).apply(null,arguments)},Fm=\nb._emscripten_bind_btConeShapeX_calculateLocalInertia_2=function(){return(Fm=b._emscripten_bind_btConeShapeX_calculateLocalInertia_2=b.asm.zk).apply(null,arguments)},Gm=b._emscripten_bind_btConeShapeX___destroy___0=function(){return(Gm=b._emscripten_bind_btConeShapeX___destroy___0=b.asm.Ak).apply(null,arguments)},Hm=b._emscripten_bind_btTriangleMesh_btTriangleMesh_0=function(){return(Hm=b._emscripten_bind_btTriangleMesh_btTriangleMesh_0=b.asm.Bk).apply(null,arguments)},Im=b._emscripten_bind_btTriangleMesh_btTriangleMesh_1=\nfunction(){return(Im=b._emscripten_bind_btTriangleMesh_btTriangleMesh_1=b.asm.Ck).apply(null,arguments)},Jm=b._emscripten_bind_btTriangleMesh_btTriangleMesh_2=function(){return(Jm=b._emscripten_bind_btTriangleMesh_btTriangleMesh_2=b.asm.Dk).apply(null,arguments)},Km=b._emscripten_bind_btTriangleMesh_addTriangle_3=function(){return(Km=b._emscripten_bind_btTriangleMesh_addTriangle_3=b.asm.Ek).apply(null,arguments)},Lm=b._emscripten_bind_btTriangleMesh_addTriangle_4=function(){return(Lm=b._emscripten_bind_btTriangleMesh_addTriangle_4=\nb.asm.Fk).apply(null,arguments)},Mm=b._emscripten_bind_btTriangleMesh_findOrAddVertex_2=function(){return(Mm=b._emscripten_bind_btTriangleMesh_findOrAddVertex_2=b.asm.Gk).apply(null,arguments)},Nm=b._emscripten_bind_btTriangleMesh_addIndex_1=function(){return(Nm=b._emscripten_bind_btTriangleMesh_addIndex_1=b.asm.Hk).apply(null,arguments)},Om=b._emscripten_bind_btTriangleMesh_getIndexedMeshArray_0=function(){return(Om=b._emscripten_bind_btTriangleMesh_getIndexedMeshArray_0=b.asm.Ik).apply(null,arguments)},\nPm=b._emscripten_bind_btTriangleMesh_setScaling_1=function(){return(Pm=b._emscripten_bind_btTriangleMesh_setScaling_1=b.asm.Jk).apply(null,arguments)},Qm=b._emscripten_bind_btTriangleMesh___destroy___0=function(){return(Qm=b._emscripten_bind_btTriangleMesh___destroy___0=b.asm.Kk).apply(null,arguments)},Rm=b._emscripten_bind_btConvexHullShape_btConvexHullShape_0=function(){return(Rm=b._emscripten_bind_btConvexHullShape_btConvexHullShape_0=b.asm.Lk).apply(null,arguments)},Sm=b._emscripten_bind_btConvexHullShape_btConvexHullShape_1=\nfunction(){return(Sm=b._emscripten_bind_btConvexHullShape_btConvexHullShape_1=b.asm.Mk).apply(null,arguments)},Tm=b._emscripten_bind_btConvexHullShape_btConvexHullShape_2=function(){return(Tm=b._emscripten_bind_btConvexHullShape_btConvexHullShape_2=b.asm.Nk).apply(null,arguments)},Um=b._emscripten_bind_btConvexHullShape_addPoint_1=function(){return(Um=b._emscripten_bind_btConvexHullShape_addPoint_1=b.asm.Ok).apply(null,arguments)},Vm=b._emscripten_bind_btConvexHullShape_addPoint_2=function(){return(Vm=\nb._emscripten_bind_btConvexHullShape_addPoint_2=b.asm.Pk).apply(null,arguments)},Wm=b._emscripten_bind_btConvexHullShape_setMargin_1=function(){return(Wm=b._emscripten_bind_btConvexHullShape_setMargin_1=b.asm.Qk).apply(null,arguments)},Xm=b._emscripten_bind_btConvexHullShape_getMargin_0=function(){return(Xm=b._emscripten_bind_btConvexHullShape_getMargin_0=b.asm.Rk).apply(null,arguments)},Ym=b._emscripten_bind_btConvexHullShape_getNumVertices_0=function(){return(Ym=b._emscripten_bind_btConvexHullShape_getNumVertices_0=\nb.asm.Sk).apply(null,arguments)},Zm=b._emscripten_bind_btConvexHullShape_initializePolyhedralFeatures_1=function(){return(Zm=b._emscripten_bind_btConvexHullShape_initializePolyhedralFeatures_1=b.asm.Tk).apply(null,arguments)},$m=b._emscripten_bind_btConvexHullShape_recalcLocalAabb_0=function(){return($m=b._emscripten_bind_btConvexHullShape_recalcLocalAabb_0=b.asm.Uk).apply(null,arguments)},an=b._emscripten_bind_btConvexHullShape_getConvexPolyhedron_0=function(){return(an=b._emscripten_bind_btConvexHullShape_getConvexPolyhedron_0=\nb.asm.Vk).apply(null,arguments)},bn=b._emscripten_bind_btConvexHullShape_setLocalScaling_1=function(){return(bn=b._emscripten_bind_btConvexHullShape_setLocalScaling_1=b.asm.Wk).apply(null,arguments)},cn=b._emscripten_bind_btConvexHullShape_getLocalScaling_0=function(){return(cn=b._emscripten_bind_btConvexHullShape_getLocalScaling_0=b.asm.Xk).apply(null,arguments)},dn=b._emscripten_bind_btConvexHullShape_calculateLocalInertia_2=function(){return(dn=b._emscripten_bind_btConvexHullShape_calculateLocalInertia_2=\nb.asm.Yk).apply(null,arguments)},en=b._emscripten_bind_btConvexHullShape___destroy___0=function(){return(en=b._emscripten_bind_btConvexHullShape___destroy___0=b.asm.Zk).apply(null,arguments)},fn=b._emscripten_bind_btVehicleTuning_btVehicleTuning_0=function(){return(fn=b._emscripten_bind_btVehicleTuning_btVehicleTuning_0=b.asm._k).apply(null,arguments)},gn=b._emscripten_bind_btVehicleTuning_get_m_suspensionStiffness_0=function(){return(gn=b._emscripten_bind_btVehicleTuning_get_m_suspensionStiffness_0=\nb.asm.$k).apply(null,arguments)},hn=b._emscripten_bind_btVehicleTuning_set_m_suspensionStiffness_1=function(){return(hn=b._emscripten_bind_btVehicleTuning_set_m_suspensionStiffness_1=b.asm.al).apply(null,arguments)},jn=b._emscripten_bind_btVehicleTuning_get_m_suspensionCompression_0=function(){return(jn=b._emscripten_bind_btVehicleTuning_get_m_suspensionCompression_0=b.asm.bl).apply(null,arguments)},kn=b._emscripten_bind_btVehicleTuning_set_m_suspensionCompression_1=function(){return(kn=b._emscripten_bind_btVehicleTuning_set_m_suspensionCompression_1=\nb.asm.cl).apply(null,arguments)},ln=b._emscripten_bind_btVehicleTuning_get_m_suspensionDamping_0=function(){return(ln=b._emscripten_bind_btVehicleTuning_get_m_suspensionDamping_0=b.asm.dl).apply(null,arguments)},mn=b._emscripten_bind_btVehicleTuning_set_m_suspensionDamping_1=function(){return(mn=b._emscripten_bind_btVehicleTuning_set_m_suspensionDamping_1=b.asm.el).apply(null,arguments)},nn=b._emscripten_bind_btVehicleTuning_get_m_maxSuspensionTravelCm_0=function(){return(nn=b._emscripten_bind_btVehicleTuning_get_m_maxSuspensionTravelCm_0=\nb.asm.fl).apply(null,arguments)},on=b._emscripten_bind_btVehicleTuning_set_m_maxSuspensionTravelCm_1=function(){return(on=b._emscripten_bind_btVehicleTuning_set_m_maxSuspensionTravelCm_1=b.asm.gl).apply(null,arguments)},pn=b._emscripten_bind_btVehicleTuning_get_m_frictionSlip_0=function(){return(pn=b._emscripten_bind_btVehicleTuning_get_m_frictionSlip_0=b.asm.hl).apply(null,arguments)},qn=b._emscripten_bind_btVehicleTuning_set_m_frictionSlip_1=function(){return(qn=b._emscripten_bind_btVehicleTuning_set_m_frictionSlip_1=\nb.asm.il).apply(null,arguments)},rn=b._emscripten_bind_btVehicleTuning_get_m_maxSuspensionForce_0=function(){return(rn=b._emscripten_bind_btVehicleTuning_get_m_maxSuspensionForce_0=b.asm.jl).apply(null,arguments)},sn=b._emscripten_bind_btVehicleTuning_set_m_maxSuspensionForce_1=function(){return(sn=b._emscripten_bind_btVehicleTuning_set_m_maxSuspensionForce_1=b.asm.kl).apply(null,arguments)},tn=b._emscripten_bind_btCollisionObjectWrapper_getWorldTransform_0=function(){return(tn=b._emscripten_bind_btCollisionObjectWrapper_getWorldTransform_0=\nb.asm.ll).apply(null,arguments)},un=b._emscripten_bind_btCollisionObjectWrapper_getCollisionObject_0=function(){return(un=b._emscripten_bind_btCollisionObjectWrapper_getCollisionObject_0=b.asm.ml).apply(null,arguments)},vn=b._emscripten_bind_btCollisionObjectWrapper_getCollisionShape_0=function(){return(vn=b._emscripten_bind_btCollisionObjectWrapper_getCollisionShape_0=b.asm.nl).apply(null,arguments)},wn=b._emscripten_bind_btShapeHull_btShapeHull_1=function(){return(wn=b._emscripten_bind_btShapeHull_btShapeHull_1=\nb.asm.ol).apply(null,arguments)},xn=b._emscripten_bind_btShapeHull_buildHull_1=function(){return(xn=b._emscripten_bind_btShapeHull_buildHull_1=b.asm.pl).apply(null,arguments)},yn=b._emscripten_bind_btShapeHull_numVertices_0=function(){return(yn=b._emscripten_bind_btShapeHull_numVertices_0=b.asm.ql).apply(null,arguments)},zn=b._emscripten_bind_btShapeHull_getVertexPointer_0=function(){return(zn=b._emscripten_bind_btShapeHull_getVertexPointer_0=b.asm.rl).apply(null,arguments)},An=b._emscripten_bind_btShapeHull___destroy___0=\nfunction(){return(An=b._emscripten_bind_btShapeHull___destroy___0=b.asm.sl).apply(null,arguments)},Bn=b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_0=function(){return(Bn=b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_0=b.asm.tl).apply(null,arguments)},Cn=b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_1=function(){return(Cn=b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_1=b.asm.ul).apply(null,arguments)},Dn=b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_2=\nfunction(){return(Dn=b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_2=b.asm.vl).apply(null,arguments)},En=b._emscripten_bind_btDefaultMotionState_getWorldTransform_1=function(){return(En=b._emscripten_bind_btDefaultMotionState_getWorldTransform_1=b.asm.wl).apply(null,arguments)},Fn=b._emscripten_bind_btDefaultMotionState_setWorldTransform_1=function(){return(Fn=b._emscripten_bind_btDefaultMotionState_setWorldTransform_1=b.asm.xl).apply(null,arguments)},Gn=b._emscripten_bind_btDefaultMotionState_get_m_graphicsWorldTrans_0=\nfunction(){return(Gn=b._emscripten_bind_btDefaultMotionState_get_m_graphicsWorldTrans_0=b.asm.yl).apply(null,arguments)},Hn=b._emscripten_bind_btDefaultMotionState_set_m_graphicsWorldTrans_1=function(){return(Hn=b._emscripten_bind_btDefaultMotionState_set_m_graphicsWorldTrans_1=b.asm.zl).apply(null,arguments)},In=b._emscripten_bind_btDefaultMotionState___destroy___0=function(){return(In=b._emscripten_bind_btDefaultMotionState___destroy___0=b.asm.Al).apply(null,arguments)},Jn=b._emscripten_bind_btWheelInfo_btWheelInfo_1=\nfunction(){return(Jn=b._emscripten_bind_btWheelInfo_btWheelInfo_1=b.asm.Bl).apply(null,arguments)},Kn=b._emscripten_bind_btWheelInfo_getSuspensionRestLength_0=function(){return(Kn=b._emscripten_bind_btWheelInfo_getSuspensionRestLength_0=b.asm.Cl).apply(null,arguments)},Ln=b._emscripten_bind_btWheelInfo_updateWheel_2=function(){return(Ln=b._emscripten_bind_btWheelInfo_updateWheel_2=b.asm.Dl).apply(null,arguments)},Mn=b._emscripten_bind_btWheelInfo_get_m_suspensionStiffness_0=function(){return(Mn=b._emscripten_bind_btWheelInfo_get_m_suspensionStiffness_0=\nb.asm.El).apply(null,arguments)},Nn=b._emscripten_bind_btWheelInfo_set_m_suspensionStiffness_1=function(){return(Nn=b._emscripten_bind_btWheelInfo_set_m_suspensionStiffness_1=b.asm.Fl).apply(null,arguments)},On=b._emscripten_bind_btWheelInfo_get_m_frictionSlip_0=function(){return(On=b._emscripten_bind_btWheelInfo_get_m_frictionSlip_0=b.asm.Gl).apply(null,arguments)},Pn=b._emscripten_bind_btWheelInfo_set_m_frictionSlip_1=function(){return(Pn=b._emscripten_bind_btWheelInfo_set_m_frictionSlip_1=b.asm.Hl).apply(null,\narguments)},Qn=b._emscripten_bind_btWheelInfo_get_m_engineForce_0=function(){return(Qn=b._emscripten_bind_btWheelInfo_get_m_engineForce_0=b.asm.Il).apply(null,arguments)},Rn=b._emscripten_bind_btWheelInfo_set_m_engineForce_1=function(){return(Rn=b._emscripten_bind_btWheelInfo_set_m_engineForce_1=b.asm.Jl).apply(null,arguments)},Sn=b._emscripten_bind_btWheelInfo_get_m_rollInfluence_0=function(){return(Sn=b._emscripten_bind_btWheelInfo_get_m_rollInfluence_0=b.asm.Kl).apply(null,arguments)},Tn=b._emscripten_bind_btWheelInfo_set_m_rollInfluence_1=\nfunction(){return(Tn=b._emscripten_bind_btWheelInfo_set_m_rollInfluence_1=b.asm.Ll).apply(null,arguments)},Un=b._emscripten_bind_btWheelInfo_get_m_suspensionRestLength1_0=function(){return(Un=b._emscripten_bind_btWheelInfo_get_m_suspensionRestLength1_0=b.asm.Ml).apply(null,arguments)},Vn=b._emscripten_bind_btWheelInfo_set_m_suspensionRestLength1_1=function(){return(Vn=b._emscripten_bind_btWheelInfo_set_m_suspensionRestLength1_1=b.asm.Nl).apply(null,arguments)},Wn=b._emscripten_bind_btWheelInfo_get_m_wheelsRadius_0=\nfunction(){return(Wn=b._emscripten_bind_btWheelInfo_get_m_wheelsRadius_0=b.asm.Ol).apply(null,arguments)},Xn=b._emscripten_bind_btWheelInfo_set_m_wheelsRadius_1=function(){return(Xn=b._emscripten_bind_btWheelInfo_set_m_wheelsRadius_1=b.asm.Pl).apply(null,arguments)},Yn=b._emscripten_bind_btWheelInfo_get_m_wheelsDampingCompression_0=function(){return(Yn=b._emscripten_bind_btWheelInfo_get_m_wheelsDampingCompression_0=b.asm.Ql).apply(null,arguments)},Zn=b._emscripten_bind_btWheelInfo_set_m_wheelsDampingCompression_1=\nfunction(){return(Zn=b._emscripten_bind_btWheelInfo_set_m_wheelsDampingCompression_1=b.asm.Rl).apply(null,arguments)},$n=b._emscripten_bind_btWheelInfo_get_m_wheelsDampingRelaxation_0=function(){return($n=b._emscripten_bind_btWheelInfo_get_m_wheelsDampingRelaxation_0=b.asm.Sl).apply(null,arguments)},ao=b._emscripten_bind_btWheelInfo_set_m_wheelsDampingRelaxation_1=function(){return(ao=b._emscripten_bind_btWheelInfo_set_m_wheelsDampingRelaxation_1=b.asm.Tl).apply(null,arguments)},bo=b._emscripten_bind_btWheelInfo_get_m_steering_0=\nfunction(){return(bo=b._emscripten_bind_btWheelInfo_get_m_steering_0=b.asm.Ul).apply(null,arguments)},co=b._emscripten_bind_btWheelInfo_set_m_steering_1=function(){return(co=b._emscripten_bind_btWheelInfo_set_m_steering_1=b.asm.Vl).apply(null,arguments)},eo=b._emscripten_bind_btWheelInfo_get_m_maxSuspensionForce_0=function(){return(eo=b._emscripten_bind_btWheelInfo_get_m_maxSuspensionForce_0=b.asm.Wl).apply(null,arguments)},fo=b._emscripten_bind_btWheelInfo_set_m_maxSuspensionForce_1=function(){return(fo=\nb._emscripten_bind_btWheelInfo_set_m_maxSuspensionForce_1=b.asm.Xl).apply(null,arguments)},go=b._emscripten_bind_btWheelInfo_get_m_maxSuspensionTravelCm_0=function(){return(go=b._emscripten_bind_btWheelInfo_get_m_maxSuspensionTravelCm_0=b.asm.Yl).apply(null,arguments)},ho=b._emscripten_bind_btWheelInfo_set_m_maxSuspensionTravelCm_1=function(){return(ho=b._emscripten_bind_btWheelInfo_set_m_maxSuspensionTravelCm_1=b.asm.Zl).apply(null,arguments)},io=b._emscripten_bind_btWheelInfo_get_m_wheelsSuspensionForce_0=\nfunction(){return(io=b._emscripten_bind_btWheelInfo_get_m_wheelsSuspensionForce_0=b.asm._l).apply(null,arguments)},jo=b._emscripten_bind_btWheelInfo_set_m_wheelsSuspensionForce_1=function(){return(jo=b._emscripten_bind_btWheelInfo_set_m_wheelsSuspensionForce_1=b.asm.$l).apply(null,arguments)},ko=b._emscripten_bind_btWheelInfo_get_m_bIsFrontWheel_0=function(){return(ko=b._emscripten_bind_btWheelInfo_get_m_bIsFrontWheel_0=b.asm.am).apply(null,arguments)},lo=b._emscripten_bind_btWheelInfo_set_m_bIsFrontWheel_1=\nfunction(){return(lo=b._emscripten_bind_btWheelInfo_set_m_bIsFrontWheel_1=b.asm.bm).apply(null,arguments)},mo=b._emscripten_bind_btWheelInfo_get_m_raycastInfo_0=function(){return(mo=b._emscripten_bind_btWheelInfo_get_m_raycastInfo_0=b.asm.cm).apply(null,arguments)},no=b._emscripten_bind_btWheelInfo_set_m_raycastInfo_1=function(){return(no=b._emscripten_bind_btWheelInfo_set_m_raycastInfo_1=b.asm.dm).apply(null,arguments)},oo=b._emscripten_bind_btWheelInfo_get_m_chassisConnectionPointCS_0=function(){return(oo=\nb._emscripten_bind_btWheelInfo_get_m_chassisConnectionPointCS_0=b.asm.em).apply(null,arguments)},po=b._emscripten_bind_btWheelInfo_set_m_chassisConnectionPointCS_1=function(){return(po=b._emscripten_bind_btWheelInfo_set_m_chassisConnectionPointCS_1=b.asm.fm).apply(null,arguments)},qo=b._emscripten_bind_btWheelInfo_get_m_worldTransform_0=function(){return(qo=b._emscripten_bind_btWheelInfo_get_m_worldTransform_0=b.asm.gm).apply(null,arguments)},ro=b._emscripten_bind_btWheelInfo_set_m_worldTransform_1=\nfunction(){return(ro=b._emscripten_bind_btWheelInfo_set_m_worldTransform_1=b.asm.hm).apply(null,arguments)},so=b._emscripten_bind_btWheelInfo_get_m_wheelDirectionCS_0=function(){return(so=b._emscripten_bind_btWheelInfo_get_m_wheelDirectionCS_0=b.asm.im).apply(null,arguments)},to=b._emscripten_bind_btWheelInfo_set_m_wheelDirectionCS_1=function(){return(to=b._emscripten_bind_btWheelInfo_set_m_wheelDirectionCS_1=b.asm.jm).apply(null,arguments)},uo=b._emscripten_bind_btWheelInfo_get_m_wheelAxleCS_0=function(){return(uo=\nb._emscripten_bind_btWheelInfo_get_m_wheelAxleCS_0=b.asm.km).apply(null,arguments)},vo=b._emscripten_bind_btWheelInfo_set_m_wheelAxleCS_1=function(){return(vo=b._emscripten_bind_btWheelInfo_set_m_wheelAxleCS_1=b.asm.lm).apply(null,arguments)},wo=b._emscripten_bind_btWheelInfo_get_m_rotation_0=function(){return(wo=b._emscripten_bind_btWheelInfo_get_m_rotation_0=b.asm.mm).apply(null,arguments)},xo=b._emscripten_bind_btWheelInfo_set_m_rotation_1=function(){return(xo=b._emscripten_bind_btWheelInfo_set_m_rotation_1=\nb.asm.nm).apply(null,arguments)},yo=b._emscripten_bind_btWheelInfo_get_m_deltaRotation_0=function(){return(yo=b._emscripten_bind_btWheelInfo_get_m_deltaRotation_0=b.asm.om).apply(null,arguments)},zo=b._emscripten_bind_btWheelInfo_set_m_deltaRotation_1=function(){return(zo=b._emscripten_bind_btWheelInfo_set_m_deltaRotation_1=b.asm.pm).apply(null,arguments)},Ao=b._emscripten_bind_btWheelInfo_get_m_brake_0=function(){return(Ao=b._emscripten_bind_btWheelInfo_get_m_brake_0=b.asm.qm).apply(null,arguments)},\nBo=b._emscripten_bind_btWheelInfo_set_m_brake_1=function(){return(Bo=b._emscripten_bind_btWheelInfo_set_m_brake_1=b.asm.rm).apply(null,arguments)},Co=b._emscripten_bind_btWheelInfo_get_m_clippedInvContactDotSuspension_0=function(){return(Co=b._emscripten_bind_btWheelInfo_get_m_clippedInvContactDotSuspension_0=b.asm.sm).apply(null,arguments)},Do=b._emscripten_bind_btWheelInfo_set_m_clippedInvContactDotSuspension_1=function(){return(Do=b._emscripten_bind_btWheelInfo_set_m_clippedInvContactDotSuspension_1=\nb.asm.tm).apply(null,arguments)},Eo=b._emscripten_bind_btWheelInfo_get_m_suspensionRelativeVelocity_0=function(){return(Eo=b._emscripten_bind_btWheelInfo_get_m_suspensionRelativeVelocity_0=b.asm.um).apply(null,arguments)},Fo=b._emscripten_bind_btWheelInfo_set_m_suspensionRelativeVelocity_1=function(){return(Fo=b._emscripten_bind_btWheelInfo_set_m_suspensionRelativeVelocity_1=b.asm.vm).apply(null,arguments)},Go=b._emscripten_bind_btWheelInfo_get_m_skidInfo_0=function(){return(Go=b._emscripten_bind_btWheelInfo_get_m_skidInfo_0=\nb.asm.wm).apply(null,arguments)},Ho=b._emscripten_bind_btWheelInfo_set_m_skidInfo_1=function(){return(Ho=b._emscripten_bind_btWheelInfo_set_m_skidInfo_1=b.asm.xm).apply(null,arguments)},Io=b._emscripten_bind_btWheelInfo___destroy___0=function(){return(Io=b._emscripten_bind_btWheelInfo___destroy___0=b.asm.ym).apply(null,arguments)},Jo=b._emscripten_bind_btVector4_btVector4_0=function(){return(Jo=b._emscripten_bind_btVector4_btVector4_0=b.asm.zm).apply(null,arguments)},Ko=b._emscripten_bind_btVector4_btVector4_4=\nfunction(){return(Ko=b._emscripten_bind_btVector4_btVector4_4=b.asm.Am).apply(null,arguments)},Lo=b._emscripten_bind_btVector4_w_0=function(){return(Lo=b._emscripten_bind_btVector4_w_0=b.asm.Bm).apply(null,arguments)},Mo=b._emscripten_bind_btVector4_setValue_4=function(){return(Mo=b._emscripten_bind_btVector4_setValue_4=b.asm.Cm).apply(null,arguments)},No=b._emscripten_bind_btVector4_length_0=function(){return(No=b._emscripten_bind_btVector4_length_0=b.asm.Dm).apply(null,arguments)},Oo=b._emscripten_bind_btVector4_x_0=\nfunction(){return(Oo=b._emscripten_bind_btVector4_x_0=b.asm.Em).apply(null,arguments)},Po=b._emscripten_bind_btVector4_y_0=function(){return(Po=b._emscripten_bind_btVector4_y_0=b.asm.Fm).apply(null,arguments)},Qo=b._emscripten_bind_btVector4_z_0=function(){return(Qo=b._emscripten_bind_btVector4_z_0=b.asm.Gm).apply(null,arguments)},Ro=b._emscripten_bind_btVector4_setX_1=function(){return(Ro=b._emscripten_bind_btVector4_setX_1=b.asm.Hm).apply(null,arguments)},So=b._emscripten_bind_btVector4_setY_1=\nfunction(){return(So=b._emscripten_bind_btVector4_setY_1=b.asm.Im).apply(null,arguments)},To=b._emscripten_bind_btVector4_setZ_1=function(){return(To=b._emscripten_bind_btVector4_setZ_1=b.asm.Jm).apply(null,arguments)},Uo=b._emscripten_bind_btVector4_normalize_0=function(){return(Uo=b._emscripten_bind_btVector4_normalize_0=b.asm.Km).apply(null,arguments)},Vo=b._emscripten_bind_btVector4_rotate_2=function(){return(Vo=b._emscripten_bind_btVector4_rotate_2=b.asm.Lm).apply(null,arguments)},Wo=b._emscripten_bind_btVector4_dot_1=\nfunction(){return(Wo=b._emscripten_bind_btVector4_dot_1=b.asm.Mm).apply(null,arguments)},Xo=b._emscripten_bind_btVector4_op_mul_1=function(){return(Xo=b._emscripten_bind_btVector4_op_mul_1=b.asm.Nm).apply(null,arguments)},Yo=b._emscripten_bind_btVector4_op_add_1=function(){return(Yo=b._emscripten_bind_btVector4_op_add_1=b.asm.Om).apply(null,arguments)},Zo=b._emscripten_bind_btVector4_op_sub_1=function(){return(Zo=b._emscripten_bind_btVector4_op_sub_1=b.asm.Pm).apply(null,arguments)},$o=b._emscripten_bind_btVector4___destroy___0=\nfunction(){return($o=b._emscripten_bind_btVector4___destroy___0=b.asm.Qm).apply(null,arguments)},ap=b._emscripten_bind_btDefaultCollisionConstructionInfo_btDefaultCollisionConstructionInfo_0=function(){return(ap=b._emscripten_bind_btDefaultCollisionConstructionInfo_btDefaultCollisionConstructionInfo_0=b.asm.Rm).apply(null,arguments)},bp=b._emscripten_bind_btDefaultCollisionConstructionInfo___destroy___0=function(){return(bp=b._emscripten_bind_btDefaultCollisionConstructionInfo___destroy___0=b.asm.Sm).apply(null,\narguments)},cp=b._emscripten_bind_Anchor_get_m_node_0=function(){return(cp=b._emscripten_bind_Anchor_get_m_node_0=b.asm.Tm).apply(null,arguments)},dp=b._emscripten_bind_Anchor_set_m_node_1=function(){return(dp=b._emscripten_bind_Anchor_set_m_node_1=b.asm.Um).apply(null,arguments)},ep=b._emscripten_bind_Anchor_get_m_local_0=function(){return(ep=b._emscripten_bind_Anchor_get_m_local_0=b.asm.Vm).apply(null,arguments)},fp=b._emscripten_bind_Anchor_set_m_local_1=function(){return(fp=b._emscripten_bind_Anchor_set_m_local_1=\nb.asm.Wm).apply(null,arguments)},gp=b._emscripten_bind_Anchor_get_m_body_0=function(){return(gp=b._emscripten_bind_Anchor_get_m_body_0=b.asm.Xm).apply(null,arguments)},hp=b._emscripten_bind_Anchor_set_m_body_1=function(){return(hp=b._emscripten_bind_Anchor_set_m_body_1=b.asm.Ym).apply(null,arguments)},ip=b._emscripten_bind_Anchor_get_m_influence_0=function(){return(ip=b._emscripten_bind_Anchor_get_m_influence_0=b.asm.Zm).apply(null,arguments)},jp=b._emscripten_bind_Anchor_set_m_influence_1=function(){return(jp=\nb._emscripten_bind_Anchor_set_m_influence_1=b.asm._m).apply(null,arguments)},kp=b._emscripten_bind_Anchor_get_m_c0_0=function(){return(kp=b._emscripten_bind_Anchor_get_m_c0_0=b.asm.$m).apply(null,arguments)},lp=b._emscripten_bind_Anchor_set_m_c0_1=function(){return(lp=b._emscripten_bind_Anchor_set_m_c0_1=b.asm.an).apply(null,arguments)},mp=b._emscripten_bind_Anchor_get_m_c1_0=function(){return(mp=b._emscripten_bind_Anchor_get_m_c1_0=b.asm.bn).apply(null,arguments)},np=b._emscripten_bind_Anchor_set_m_c1_1=\nfunction(){return(np=b._emscripten_bind_Anchor_set_m_c1_1=b.asm.cn).apply(null,arguments)},op=b._emscripten_bind_Anchor_get_m_c2_0=function(){return(op=b._emscripten_bind_Anchor_get_m_c2_0=b.asm.dn).apply(null,arguments)},pp=b._emscripten_bind_Anchor_set_m_c2_1=function(){return(pp=b._emscripten_bind_Anchor_set_m_c2_1=b.asm.en).apply(null,arguments)},qp=b._emscripten_bind_Anchor___destroy___0=function(){return(qp=b._emscripten_bind_Anchor___destroy___0=b.asm.fn).apply(null,arguments)},rp=b._emscripten_bind_btVehicleRaycasterResult_get_m_hitPointInWorld_0=\nfunction(){return(rp=b._emscripten_bind_btVehicleRaycasterResult_get_m_hitPointInWorld_0=b.asm.gn).apply(null,arguments)},sp=b._emscripten_bind_btVehicleRaycasterResult_set_m_hitPointInWorld_1=function(){return(sp=b._emscripten_bind_btVehicleRaycasterResult_set_m_hitPointInWorld_1=b.asm.hn).apply(null,arguments)},tp=b._emscripten_bind_btVehicleRaycasterResult_get_m_hitNormalInWorld_0=function(){return(tp=b._emscripten_bind_btVehicleRaycasterResult_get_m_hitNormalInWorld_0=b.asm.jn).apply(null,arguments)},\nup=b._emscripten_bind_btVehicleRaycasterResult_set_m_hitNormalInWorld_1=function(){return(up=b._emscripten_bind_btVehicleRaycasterResult_set_m_hitNormalInWorld_1=b.asm.kn).apply(null,arguments)},vp=b._emscripten_bind_btVehicleRaycasterResult_get_m_distFraction_0=function(){return(vp=b._emscripten_bind_btVehicleRaycasterResult_get_m_distFraction_0=b.asm.ln).apply(null,arguments)},wp=b._emscripten_bind_btVehicleRaycasterResult_set_m_distFraction_1=function(){return(wp=b._emscripten_bind_btVehicleRaycasterResult_set_m_distFraction_1=\nb.asm.mn).apply(null,arguments)},xp=b._emscripten_bind_btVehicleRaycasterResult___destroy___0=function(){return(xp=b._emscripten_bind_btVehicleRaycasterResult___destroy___0=b.asm.nn).apply(null,arguments)},yp=b._emscripten_bind_btVector3Array_size_0=function(){return(yp=b._emscripten_bind_btVector3Array_size_0=b.asm.on).apply(null,arguments)},zp=b._emscripten_bind_btVector3Array_at_1=function(){return(zp=b._emscripten_bind_btVector3Array_at_1=b.asm.pn).apply(null,arguments)},Ap=b._emscripten_bind_btVector3Array___destroy___0=\nfunction(){return(Ap=b._emscripten_bind_btVector3Array___destroy___0=b.asm.qn).apply(null,arguments)},Bp=b._emscripten_bind_btConstraintSolver___destroy___0=function(){return(Bp=b._emscripten_bind_btConstraintSolver___destroy___0=b.asm.rn).apply(null,arguments)},Cp=b._emscripten_bind_btRaycastVehicle_btRaycastVehicle_3=function(){return(Cp=b._emscripten_bind_btRaycastVehicle_btRaycastVehicle_3=b.asm.sn).apply(null,arguments)},Dp=b._emscripten_bind_btRaycastVehicle_applyEngineForce_2=function(){return(Dp=\nb._emscripten_bind_btRaycastVehicle_applyEngineForce_2=b.asm.tn).apply(null,arguments)},Ep=b._emscripten_bind_btRaycastVehicle_setSteeringValue_2=function(){return(Ep=b._emscripten_bind_btRaycastVehicle_setSteeringValue_2=b.asm.un).apply(null,arguments)},Fp=b._emscripten_bind_btRaycastVehicle_getWheelTransformWS_1=function(){return(Fp=b._emscripten_bind_btRaycastVehicle_getWheelTransformWS_1=b.asm.vn).apply(null,arguments)},Gp=b._emscripten_bind_btRaycastVehicle_updateWheelTransform_2=function(){return(Gp=\nb._emscripten_bind_btRaycastVehicle_updateWheelTransform_2=b.asm.wn).apply(null,arguments)},Hp=b._emscripten_bind_btRaycastVehicle_addWheel_7=function(){return(Hp=b._emscripten_bind_btRaycastVehicle_addWheel_7=b.asm.xn).apply(null,arguments)},Ip=b._emscripten_bind_btRaycastVehicle_getNumWheels_0=function(){return(Ip=b._emscripten_bind_btRaycastVehicle_getNumWheels_0=b.asm.yn).apply(null,arguments)},Jp=b._emscripten_bind_btRaycastVehicle_getRigidBody_0=function(){return(Jp=b._emscripten_bind_btRaycastVehicle_getRigidBody_0=\nb.asm.zn).apply(null,arguments)},Kp=b._emscripten_bind_btRaycastVehicle_getWheelInfo_1=function(){return(Kp=b._emscripten_bind_btRaycastVehicle_getWheelInfo_1=b.asm.An).apply(null,arguments)},Lp=b._emscripten_bind_btRaycastVehicle_setBrake_2=function(){return(Lp=b._emscripten_bind_btRaycastVehicle_setBrake_2=b.asm.Bn).apply(null,arguments)},Mp=b._emscripten_bind_btRaycastVehicle_setCoordinateSystem_3=function(){return(Mp=b._emscripten_bind_btRaycastVehicle_setCoordinateSystem_3=b.asm.Cn).apply(null,\narguments)},Np=b._emscripten_bind_btRaycastVehicle_getCurrentSpeedKmHour_0=function(){return(Np=b._emscripten_bind_btRaycastVehicle_getCurrentSpeedKmHour_0=b.asm.Dn).apply(null,arguments)},Op=b._emscripten_bind_btRaycastVehicle_getChassisWorldTransform_0=function(){return(Op=b._emscripten_bind_btRaycastVehicle_getChassisWorldTransform_0=b.asm.En).apply(null,arguments)},Pp=b._emscripten_bind_btRaycastVehicle_rayCast_1=function(){return(Pp=b._emscripten_bind_btRaycastVehicle_rayCast_1=b.asm.Fn).apply(null,\narguments)},Qp=b._emscripten_bind_btRaycastVehicle_updateVehicle_1=function(){return(Qp=b._emscripten_bind_btRaycastVehicle_updateVehicle_1=b.asm.Gn).apply(null,arguments)},Rp=b._emscripten_bind_btRaycastVehicle_resetSuspension_0=function(){return(Rp=b._emscripten_bind_btRaycastVehicle_resetSuspension_0=b.asm.Hn).apply(null,arguments)},Sp=b._emscripten_bind_btRaycastVehicle_getSteeringValue_1=function(){return(Sp=b._emscripten_bind_btRaycastVehicle_getSteeringValue_1=b.asm.In).apply(null,arguments)},\nTp=b._emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_1=function(){return(Tp=b._emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_1=b.asm.Jn).apply(null,arguments)},Up=b._emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_2=function(){return(Up=b._emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_2=b.asm.Kn).apply(null,arguments)},Vp=b._emscripten_bind_btRaycastVehicle_setPitchControl_1=function(){return(Vp=b._emscripten_bind_btRaycastVehicle_setPitchControl_1=b.asm.Ln).apply(null,\narguments)},Wp=b._emscripten_bind_btRaycastVehicle_updateSuspension_1=function(){return(Wp=b._emscripten_bind_btRaycastVehicle_updateSuspension_1=b.asm.Mn).apply(null,arguments)},Xp=b._emscripten_bind_btRaycastVehicle_updateFriction_1=function(){return(Xp=b._emscripten_bind_btRaycastVehicle_updateFriction_1=b.asm.Nn).apply(null,arguments)},Yp=b._emscripten_bind_btRaycastVehicle_getRightAxis_0=function(){return(Yp=b._emscripten_bind_btRaycastVehicle_getRightAxis_0=b.asm.On).apply(null,arguments)},\nZp=b._emscripten_bind_btRaycastVehicle_getUpAxis_0=function(){return(Zp=b._emscripten_bind_btRaycastVehicle_getUpAxis_0=b.asm.Pn).apply(null,arguments)},$p=b._emscripten_bind_btRaycastVehicle_getForwardAxis_0=function(){return($p=b._emscripten_bind_btRaycastVehicle_getForwardAxis_0=b.asm.Qn).apply(null,arguments)},aq=b._emscripten_bind_btRaycastVehicle_getForwardVector_0=function(){return(aq=b._emscripten_bind_btRaycastVehicle_getForwardVector_0=b.asm.Rn).apply(null,arguments)},bq=b._emscripten_bind_btRaycastVehicle_getUserConstraintType_0=\nfunction(){return(bq=b._emscripten_bind_btRaycastVehicle_getUserConstraintType_0=b.asm.Sn).apply(null,arguments)},cq=b._emscripten_bind_btRaycastVehicle_setUserConstraintType_1=function(){return(cq=b._emscripten_bind_btRaycastVehicle_setUserConstraintType_1=b.asm.Tn).apply(null,arguments)},dq=b._emscripten_bind_btRaycastVehicle_setUserConstraintId_1=function(){return(dq=b._emscripten_bind_btRaycastVehicle_setUserConstraintId_1=b.asm.Un).apply(null,arguments)},eq=b._emscripten_bind_btRaycastVehicle_getUserConstraintId_0=\nfunction(){return(eq=b._emscripten_bind_btRaycastVehicle_getUserConstraintId_0=b.asm.Vn).apply(null,arguments)},fq=b._emscripten_bind_btRaycastVehicle_updateAction_2=function(){return(fq=b._emscripten_bind_btRaycastVehicle_updateAction_2=b.asm.Wn).apply(null,arguments)},gq=b._emscripten_bind_btRaycastVehicle___destroy___0=function(){return(gq=b._emscripten_bind_btRaycastVehicle___destroy___0=b.asm.Xn).apply(null,arguments)},hq=b._emscripten_bind_btCylinderShapeX_btCylinderShapeX_1=function(){return(hq=\nb._emscripten_bind_btCylinderShapeX_btCylinderShapeX_1=b.asm.Yn).apply(null,arguments)},iq=b._emscripten_bind_btCylinderShapeX_setMargin_1=function(){return(iq=b._emscripten_bind_btCylinderShapeX_setMargin_1=b.asm.Zn).apply(null,arguments)},jq=b._emscripten_bind_btCylinderShapeX_getMargin_0=function(){return(jq=b._emscripten_bind_btCylinderShapeX_getMargin_0=b.asm._n).apply(null,arguments)},kq=b._emscripten_bind_btCylinderShapeX_setLocalScaling_1=function(){return(kq=b._emscripten_bind_btCylinderShapeX_setLocalScaling_1=\nb.asm.$n).apply(null,arguments)},lq=b._emscripten_bind_btCylinderShapeX_getLocalScaling_0=function(){return(lq=b._emscripten_bind_btCylinderShapeX_getLocalScaling_0=b.asm.ao).apply(null,arguments)},mq=b._emscripten_bind_btCylinderShapeX_calculateLocalInertia_2=function(){return(mq=b._emscripten_bind_btCylinderShapeX_calculateLocalInertia_2=b.asm.bo).apply(null,arguments)},nq=b._emscripten_bind_btCylinderShapeX___destroy___0=function(){return(nq=b._emscripten_bind_btCylinderShapeX___destroy___0=b.asm.co).apply(null,\narguments)},oq=b._emscripten_bind_btCylinderShapeZ_btCylinderShapeZ_1=function(){return(oq=b._emscripten_bind_btCylinderShapeZ_btCylinderShapeZ_1=b.asm.eo).apply(null,arguments)},pq=b._emscripten_bind_btCylinderShapeZ_setMargin_1=function(){return(pq=b._emscripten_bind_btCylinderShapeZ_setMargin_1=b.asm.fo).apply(null,arguments)},qq=b._emscripten_bind_btCylinderShapeZ_getMargin_0=function(){return(qq=b._emscripten_bind_btCylinderShapeZ_getMargin_0=b.asm.go).apply(null,arguments)},rq=b._emscripten_bind_btCylinderShapeZ_setLocalScaling_1=\nfunction(){return(rq=b._emscripten_bind_btCylinderShapeZ_setLocalScaling_1=b.asm.ho).apply(null,arguments)},sq=b._emscripten_bind_btCylinderShapeZ_getLocalScaling_0=function(){return(sq=b._emscripten_bind_btCylinderShapeZ_getLocalScaling_0=b.asm.io).apply(null,arguments)},tq=b._emscripten_bind_btCylinderShapeZ_calculateLocalInertia_2=function(){return(tq=b._emscripten_bind_btCylinderShapeZ_calculateLocalInertia_2=b.asm.jo).apply(null,arguments)},uq=b._emscripten_bind_btCylinderShapeZ___destroy___0=\nfunction(){return(uq=b._emscripten_bind_btCylinderShapeZ___destroy___0=b.asm.ko).apply(null,arguments)},vq=b._emscripten_bind_btConvexPolyhedron_get_m_vertices_0=function(){return(vq=b._emscripten_bind_btConvexPolyhedron_get_m_vertices_0=b.asm.lo).apply(null,arguments)},wq=b._emscripten_bind_btConvexPolyhedron_set_m_vertices_1=function(){return(wq=b._emscripten_bind_btConvexPolyhedron_set_m_vertices_1=b.asm.mo).apply(null,arguments)},xq=b._emscripten_bind_btConvexPolyhedron_get_m_faces_0=function(){return(xq=\nb._emscripten_bind_btConvexPolyhedron_get_m_faces_0=b.asm.no).apply(null,arguments)},yq=b._emscripten_bind_btConvexPolyhedron_set_m_faces_1=function(){return(yq=b._emscripten_bind_btConvexPolyhedron_set_m_faces_1=b.asm.oo).apply(null,arguments)},zq=b._emscripten_bind_btConvexPolyhedron___destroy___0=function(){return(zq=b._emscripten_bind_btConvexPolyhedron___destroy___0=b.asm.po).apply(null,arguments)},Aq=b._emscripten_bind_btSequentialImpulseConstraintSolver_btSequentialImpulseConstraintSolver_0=\nfunction(){return(Aq=b._emscripten_bind_btSequentialImpulseConstraintSolver_btSequentialImpulseConstraintSolver_0=b.asm.qo).apply(null,arguments)},Bq=b._emscripten_bind_btSequentialImpulseConstraintSolver___destroy___0=function(){return(Bq=b._emscripten_bind_btSequentialImpulseConstraintSolver___destroy___0=b.asm.ro).apply(null,arguments)},Cq=b._emscripten_bind_tAnchorArray_size_0=function(){return(Cq=b._emscripten_bind_tAnchorArray_size_0=b.asm.so).apply(null,arguments)},Dq=b._emscripten_bind_tAnchorArray_at_1=\nfunction(){return(Dq=b._emscripten_bind_tAnchorArray_at_1=b.asm.to).apply(null,arguments)},Eq=b._emscripten_bind_tAnchorArray_clear_0=function(){return(Eq=b._emscripten_bind_tAnchorArray_clear_0=b.asm.uo).apply(null,arguments)},Fq=b._emscripten_bind_tAnchorArray_push_back_1=function(){return(Fq=b._emscripten_bind_tAnchorArray_push_back_1=b.asm.vo).apply(null,arguments)},Gq=b._emscripten_bind_tAnchorArray_pop_back_0=function(){return(Gq=b._emscripten_bind_tAnchorArray_pop_back_0=b.asm.wo).apply(null,\narguments)},Hq=b._emscripten_bind_tAnchorArray___destroy___0=function(){return(Hq=b._emscripten_bind_tAnchorArray___destroy___0=b.asm.xo).apply(null,arguments)},Iq=b._emscripten_bind_RaycastInfo_get_m_contactNormalWS_0=function(){return(Iq=b._emscripten_bind_RaycastInfo_get_m_contactNormalWS_0=b.asm.yo).apply(null,arguments)},Jq=b._emscripten_bind_RaycastInfo_set_m_contactNormalWS_1=function(){return(Jq=b._emscripten_bind_RaycastInfo_set_m_contactNormalWS_1=b.asm.zo).apply(null,arguments)},Kq=b._emscripten_bind_RaycastInfo_get_m_contactPointWS_0=\nfunction(){return(Kq=b._emscripten_bind_RaycastInfo_get_m_contactPointWS_0=b.asm.Ao).apply(null,arguments)},Lq=b._emscripten_bind_RaycastInfo_set_m_contactPointWS_1=function(){return(Lq=b._emscripten_bind_RaycastInfo_set_m_contactPointWS_1=b.asm.Bo).apply(null,arguments)},Mq=b._emscripten_bind_RaycastInfo_get_m_suspensionLength_0=function(){return(Mq=b._emscripten_bind_RaycastInfo_get_m_suspensionLength_0=b.asm.Co).apply(null,arguments)},Nq=b._emscripten_bind_RaycastInfo_set_m_suspensionLength_1=\nfunction(){return(Nq=b._emscripten_bind_RaycastInfo_set_m_suspensionLength_1=b.asm.Do).apply(null,arguments)},Oq=b._emscripten_bind_RaycastInfo_get_m_hardPointWS_0=function(){return(Oq=b._emscripten_bind_RaycastInfo_get_m_hardPointWS_0=b.asm.Eo).apply(null,arguments)},Pq=b._emscripten_bind_RaycastInfo_set_m_hardPointWS_1=function(){return(Pq=b._emscripten_bind_RaycastInfo_set_m_hardPointWS_1=b.asm.Fo).apply(null,arguments)},Qq=b._emscripten_bind_RaycastInfo_get_m_wheelDirectionWS_0=function(){return(Qq=\nb._emscripten_bind_RaycastInfo_get_m_wheelDirectionWS_0=b.asm.Go).apply(null,arguments)},Rq=b._emscripten_bind_RaycastInfo_set_m_wheelDirectionWS_1=function(){return(Rq=b._emscripten_bind_RaycastInfo_set_m_wheelDirectionWS_1=b.asm.Ho).apply(null,arguments)},Sq=b._emscripten_bind_RaycastInfo_get_m_wheelAxleWS_0=function(){return(Sq=b._emscripten_bind_RaycastInfo_get_m_wheelAxleWS_0=b.asm.Io).apply(null,arguments)},Tq=b._emscripten_bind_RaycastInfo_set_m_wheelAxleWS_1=function(){return(Tq=b._emscripten_bind_RaycastInfo_set_m_wheelAxleWS_1=\nb.asm.Jo).apply(null,arguments)},Uq=b._emscripten_bind_RaycastInfo_get_m_isInContact_0=function(){return(Uq=b._emscripten_bind_RaycastInfo_get_m_isInContact_0=b.asm.Ko).apply(null,arguments)},Vq=b._emscripten_bind_RaycastInfo_set_m_isInContact_1=function(){return(Vq=b._emscripten_bind_RaycastInfo_set_m_isInContact_1=b.asm.Lo).apply(null,arguments)},Wq=b._emscripten_bind_RaycastInfo_get_m_groundObject_0=function(){return(Wq=b._emscripten_bind_RaycastInfo_get_m_groundObject_0=b.asm.Mo).apply(null,arguments)},\nXq=b._emscripten_bind_RaycastInfo_set_m_groundObject_1=function(){return(Xq=b._emscripten_bind_RaycastInfo_set_m_groundObject_1=b.asm.No).apply(null,arguments)},Yq=b._emscripten_bind_RaycastInfo___destroy___0=function(){return(Yq=b._emscripten_bind_RaycastInfo___destroy___0=b.asm.Oo).apply(null,arguments)},Zq=b._emscripten_bind_btMultiSphereShape_btMultiSphereShape_3=function(){return(Zq=b._emscripten_bind_btMultiSphereShape_btMultiSphereShape_3=b.asm.Po).apply(null,arguments)},$q=b._emscripten_bind_btMultiSphereShape_setLocalScaling_1=\nfunction(){return($q=b._emscripten_bind_btMultiSphereShape_setLocalScaling_1=b.asm.Qo).apply(null,arguments)},ar=b._emscripten_bind_btMultiSphereShape_getLocalScaling_0=function(){return(ar=b._emscripten_bind_btMultiSphereShape_getLocalScaling_0=b.asm.Ro).apply(null,arguments)},br=b._emscripten_bind_btMultiSphereShape_calculateLocalInertia_2=function(){return(br=b._emscripten_bind_btMultiSphereShape_calculateLocalInertia_2=b.asm.So).apply(null,arguments)},cr=b._emscripten_bind_btMultiSphereShape___destroy___0=\nfunction(){return(cr=b._emscripten_bind_btMultiSphereShape___destroy___0=b.asm.To).apply(null,arguments)},dr=b._emscripten_bind_btSoftBody_btSoftBody_4=function(){return(dr=b._emscripten_bind_btSoftBody_btSoftBody_4=b.asm.Uo).apply(null,arguments)},er=b._emscripten_bind_btSoftBody_checkLink_2=function(){return(er=b._emscripten_bind_btSoftBody_checkLink_2=b.asm.Vo).apply(null,arguments)},fr=b._emscripten_bind_btSoftBody_checkFace_3=function(){return(fr=b._emscripten_bind_btSoftBody_checkFace_3=b.asm.Wo).apply(null,\narguments)},gr=b._emscripten_bind_btSoftBody_appendMaterial_0=function(){return(gr=b._emscripten_bind_btSoftBody_appendMaterial_0=b.asm.Xo).apply(null,arguments)},hr=b._emscripten_bind_btSoftBody_appendNode_2=function(){return(hr=b._emscripten_bind_btSoftBody_appendNode_2=b.asm.Yo).apply(null,arguments)},ir=b._emscripten_bind_btSoftBody_appendLink_4=function(){return(ir=b._emscripten_bind_btSoftBody_appendLink_4=b.asm.Zo).apply(null,arguments)},jr=b._emscripten_bind_btSoftBody_appendFace_4=function(){return(jr=\nb._emscripten_bind_btSoftBody_appendFace_4=b.asm._o).apply(null,arguments)},kr=b._emscripten_bind_btSoftBody_appendTetra_5=function(){return(kr=b._emscripten_bind_btSoftBody_appendTetra_5=b.asm.$o).apply(null,arguments)},lr=b._emscripten_bind_btSoftBody_appendAnchor_4=function(){return(lr=b._emscripten_bind_btSoftBody_appendAnchor_4=b.asm.ap).apply(null,arguments)},mr=b._emscripten_bind_btSoftBody_addForce_1=function(){return(mr=b._emscripten_bind_btSoftBody_addForce_1=b.asm.bp).apply(null,arguments)},\nnr=b._emscripten_bind_btSoftBody_addForce_2=function(){return(nr=b._emscripten_bind_btSoftBody_addForce_2=b.asm.cp).apply(null,arguments)},or=b._emscripten_bind_btSoftBody_addAeroForceToNode_2=function(){return(or=b._emscripten_bind_btSoftBody_addAeroForceToNode_2=b.asm.dp).apply(null,arguments)},pr=b._emscripten_bind_btSoftBody_getTotalMass_0=function(){return(pr=b._emscripten_bind_btSoftBody_getTotalMass_0=b.asm.ep).apply(null,arguments)},qr=b._emscripten_bind_btSoftBody_setTotalMass_2=function(){return(qr=\nb._emscripten_bind_btSoftBody_setTotalMass_2=b.asm.fp).apply(null,arguments)},rr=b._emscripten_bind_btSoftBody_setMass_2=function(){return(rr=b._emscripten_bind_btSoftBody_setMass_2=b.asm.gp).apply(null,arguments)},sr=b._emscripten_bind_btSoftBody_transform_1=function(){return(sr=b._emscripten_bind_btSoftBody_transform_1=b.asm.hp).apply(null,arguments)},tr=b._emscripten_bind_btSoftBody_translate_1=function(){return(tr=b._emscripten_bind_btSoftBody_translate_1=b.asm.ip).apply(null,arguments)},ur=b._emscripten_bind_btSoftBody_rotate_1=\nfunction(){return(ur=b._emscripten_bind_btSoftBody_rotate_1=b.asm.jp).apply(null,arguments)},vr=b._emscripten_bind_btSoftBody_scale_1=function(){return(vr=b._emscripten_bind_btSoftBody_scale_1=b.asm.kp).apply(null,arguments)},wr=b._emscripten_bind_btSoftBody_generateClusters_1=function(){return(wr=b._emscripten_bind_btSoftBody_generateClusters_1=b.asm.lp).apply(null,arguments)},xr=b._emscripten_bind_btSoftBody_generateClusters_2=function(){return(xr=b._emscripten_bind_btSoftBody_generateClusters_2=\nb.asm.mp).apply(null,arguments)},yr=b._emscripten_bind_btSoftBody_generateBendingConstraints_2=function(){return(yr=b._emscripten_bind_btSoftBody_generateBendingConstraints_2=b.asm.np).apply(null,arguments)},zr=b._emscripten_bind_btSoftBody_upcast_1=function(){return(zr=b._emscripten_bind_btSoftBody_upcast_1=b.asm.op).apply(null,arguments)},Ar=b._emscripten_bind_btSoftBody_setAnisotropicFriction_2=function(){return(Ar=b._emscripten_bind_btSoftBody_setAnisotropicFriction_2=b.asm.pp).apply(null,arguments)},\nBr=b._emscripten_bind_btSoftBody_getCollisionShape_0=function(){return(Br=b._emscripten_bind_btSoftBody_getCollisionShape_0=b.asm.qp).apply(null,arguments)},Cr=b._emscripten_bind_btSoftBody_setContactProcessingThreshold_1=function(){return(Cr=b._emscripten_bind_btSoftBody_setContactProcessingThreshold_1=b.asm.rp).apply(null,arguments)},Dr=b._emscripten_bind_btSoftBody_setActivationState_1=function(){return(Dr=b._emscripten_bind_btSoftBody_setActivationState_1=b.asm.sp).apply(null,arguments)},Er=b._emscripten_bind_btSoftBody_forceActivationState_1=\nfunction(){return(Er=b._emscripten_bind_btSoftBody_forceActivationState_1=b.asm.tp).apply(null,arguments)},Fr=b._emscripten_bind_btSoftBody_activate_0=function(){return(Fr=b._emscripten_bind_btSoftBody_activate_0=b.asm.up).apply(null,arguments)},Gr=b._emscripten_bind_btSoftBody_activate_1=function(){return(Gr=b._emscripten_bind_btSoftBody_activate_1=b.asm.vp).apply(null,arguments)},Hr=b._emscripten_bind_btSoftBody_isActive_0=function(){return(Hr=b._emscripten_bind_btSoftBody_isActive_0=b.asm.wp).apply(null,\narguments)},Ir=b._emscripten_bind_btSoftBody_isKinematicObject_0=function(){return(Ir=b._emscripten_bind_btSoftBody_isKinematicObject_0=b.asm.xp).apply(null,arguments)},Jr=b._emscripten_bind_btSoftBody_isStaticObject_0=function(){return(Jr=b._emscripten_bind_btSoftBody_isStaticObject_0=b.asm.yp).apply(null,arguments)},Kr=b._emscripten_bind_btSoftBody_isStaticOrKinematicObject_0=function(){return(Kr=b._emscripten_bind_btSoftBody_isStaticOrKinematicObject_0=b.asm.zp).apply(null,arguments)},Lr=b._emscripten_bind_btSoftBody_getRestitution_0=\nfunction(){return(Lr=b._emscripten_bind_btSoftBody_getRestitution_0=b.asm.Ap).apply(null,arguments)},Mr=b._emscripten_bind_btSoftBody_getFriction_0=function(){return(Mr=b._emscripten_bind_btSoftBody_getFriction_0=b.asm.Bp).apply(null,arguments)},Nr=b._emscripten_bind_btSoftBody_getRollingFriction_0=function(){return(Nr=b._emscripten_bind_btSoftBody_getRollingFriction_0=b.asm.Cp).apply(null,arguments)},Or=b._emscripten_bind_btSoftBody_setRestitution_1=function(){return(Or=b._emscripten_bind_btSoftBody_setRestitution_1=\nb.asm.Dp).apply(null,arguments)},Pr=b._emscripten_bind_btSoftBody_setFriction_1=function(){return(Pr=b._emscripten_bind_btSoftBody_setFriction_1=b.asm.Ep).apply(null,arguments)},Qr=b._emscripten_bind_btSoftBody_setRollingFriction_1=function(){return(Qr=b._emscripten_bind_btSoftBody_setRollingFriction_1=b.asm.Fp).apply(null,arguments)},Rr=b._emscripten_bind_btSoftBody_getWorldTransform_0=function(){return(Rr=b._emscripten_bind_btSoftBody_getWorldTransform_0=b.asm.Gp).apply(null,arguments)},Sr=b._emscripten_bind_btSoftBody_getCollisionFlags_0=\nfunction(){return(Sr=b._emscripten_bind_btSoftBody_getCollisionFlags_0=b.asm.Hp).apply(null,arguments)},Tr=b._emscripten_bind_btSoftBody_setCollisionFlags_1=function(){return(Tr=b._emscripten_bind_btSoftBody_setCollisionFlags_1=b.asm.Ip).apply(null,arguments)},Ur=b._emscripten_bind_btSoftBody_setWorldTransform_1=function(){return(Ur=b._emscripten_bind_btSoftBody_setWorldTransform_1=b.asm.Jp).apply(null,arguments)},Vr=b._emscripten_bind_btSoftBody_setCollisionShape_1=function(){return(Vr=b._emscripten_bind_btSoftBody_setCollisionShape_1=\nb.asm.Kp).apply(null,arguments)},Wr=b._emscripten_bind_btSoftBody_setCcdMotionThreshold_1=function(){return(Wr=b._emscripten_bind_btSoftBody_setCcdMotionThreshold_1=b.asm.Lp).apply(null,arguments)},Xr=b._emscripten_bind_btSoftBody_setCcdSweptSphereRadius_1=function(){return(Xr=b._emscripten_bind_btSoftBody_setCcdSweptSphereRadius_1=b.asm.Mp).apply(null,arguments)},Yr=b._emscripten_bind_btSoftBody_getUserIndex_0=function(){return(Yr=b._emscripten_bind_btSoftBody_getUserIndex_0=b.asm.Np).apply(null,\narguments)},Zr=b._emscripten_bind_btSoftBody_setUserIndex_1=function(){return(Zr=b._emscripten_bind_btSoftBody_setUserIndex_1=b.asm.Op).apply(null,arguments)},$r=b._emscripten_bind_btSoftBody_getUserPointer_0=function(){return($r=b._emscripten_bind_btSoftBody_getUserPointer_0=b.asm.Pp).apply(null,arguments)},as=b._emscripten_bind_btSoftBody_setUserPointer_1=function(){return(as=b._emscripten_bind_btSoftBody_setUserPointer_1=b.asm.Qp).apply(null,arguments)},bs=b._emscripten_bind_btSoftBody_getBroadphaseHandle_0=\nfunction(){return(bs=b._emscripten_bind_btSoftBody_getBroadphaseHandle_0=b.asm.Rp).apply(null,arguments)},cs=b._emscripten_bind_btSoftBody_get_m_cfg_0=function(){return(cs=b._emscripten_bind_btSoftBody_get_m_cfg_0=b.asm.Sp).apply(null,arguments)},ds=b._emscripten_bind_btSoftBody_set_m_cfg_1=function(){return(ds=b._emscripten_bind_btSoftBody_set_m_cfg_1=b.asm.Tp).apply(null,arguments)},es=b._emscripten_bind_btSoftBody_get_m_nodes_0=function(){return(es=b._emscripten_bind_btSoftBody_get_m_nodes_0=b.asm.Up).apply(null,\narguments)},gs=b._emscripten_bind_btSoftBody_set_m_nodes_1=function(){return(gs=b._emscripten_bind_btSoftBody_set_m_nodes_1=b.asm.Vp).apply(null,arguments)},hs=b._emscripten_bind_btSoftBody_get_m_faces_0=function(){return(hs=b._emscripten_bind_btSoftBody_get_m_faces_0=b.asm.Wp).apply(null,arguments)},is=b._emscripten_bind_btSoftBody_set_m_faces_1=function(){return(is=b._emscripten_bind_btSoftBody_set_m_faces_1=b.asm.Xp).apply(null,arguments)},js=b._emscripten_bind_btSoftBody_get_m_materials_0=function(){return(js=\nb._emscripten_bind_btSoftBody_get_m_materials_0=b.asm.Yp).apply(null,arguments)},ks=b._emscripten_bind_btSoftBody_set_m_materials_1=function(){return(ks=b._emscripten_bind_btSoftBody_set_m_materials_1=b.asm.Zp).apply(null,arguments)},ls=b._emscripten_bind_btSoftBody_get_m_anchors_0=function(){return(ls=b._emscripten_bind_btSoftBody_get_m_anchors_0=b.asm._p).apply(null,arguments)},ms=b._emscripten_bind_btSoftBody_set_m_anchors_1=function(){return(ms=b._emscripten_bind_btSoftBody_set_m_anchors_1=b.asm.$p).apply(null,\narguments)},ns=b._emscripten_bind_btSoftBody___destroy___0=function(){return(ns=b._emscripten_bind_btSoftBody___destroy___0=b.asm.aq).apply(null,arguments)},ps=b._emscripten_bind_btIntArray_size_0=function(){return(ps=b._emscripten_bind_btIntArray_size_0=b.asm.bq).apply(null,arguments)},qs=b._emscripten_bind_btIntArray_at_1=function(){return(qs=b._emscripten_bind_btIntArray_at_1=b.asm.cq).apply(null,arguments)},rs=b._emscripten_bind_btIntArray___destroy___0=function(){return(rs=b._emscripten_bind_btIntArray___destroy___0=\nb.asm.dq).apply(null,arguments)},ss=b._emscripten_bind_Config_get_kVCF_0=function(){return(ss=b._emscripten_bind_Config_get_kVCF_0=b.asm.eq).apply(null,arguments)},ts=b._emscripten_bind_Config_set_kVCF_1=function(){return(ts=b._emscripten_bind_Config_set_kVCF_1=b.asm.fq).apply(null,arguments)},us=b._emscripten_bind_Config_get_kDP_0=function(){return(us=b._emscripten_bind_Config_get_kDP_0=b.asm.gq).apply(null,arguments)},vs=b._emscripten_bind_Config_set_kDP_1=function(){return(vs=b._emscripten_bind_Config_set_kDP_1=\nb.asm.hq).apply(null,arguments)},xs=b._emscripten_bind_Config_get_kDG_0=function(){return(xs=b._emscripten_bind_Config_get_kDG_0=b.asm.iq).apply(null,arguments)},ys=b._emscripten_bind_Config_set_kDG_1=function(){return(ys=b._emscripten_bind_Config_set_kDG_1=b.asm.jq).apply(null,arguments)},zs=b._emscripten_bind_Config_get_kLF_0=function(){return(zs=b._emscripten_bind_Config_get_kLF_0=b.asm.kq).apply(null,arguments)},As=b._emscripten_bind_Config_set_kLF_1=function(){return(As=b._emscripten_bind_Config_set_kLF_1=\nb.asm.lq).apply(null,arguments)},Bs=b._emscripten_bind_Config_get_kPR_0=function(){return(Bs=b._emscripten_bind_Config_get_kPR_0=b.asm.mq).apply(null,arguments)},Cs=b._emscripten_bind_Config_set_kPR_1=function(){return(Cs=b._emscripten_bind_Config_set_kPR_1=b.asm.nq).apply(null,arguments)},Ds=b._emscripten_bind_Config_get_kVC_0=function(){return(Ds=b._emscripten_bind_Config_get_kVC_0=b.asm.oq).apply(null,arguments)},Es=b._emscripten_bind_Config_set_kVC_1=function(){return(Es=b._emscripten_bind_Config_set_kVC_1=\nb.asm.pq).apply(null,arguments)},Fs=b._emscripten_bind_Config_get_kDF_0=function(){return(Fs=b._emscripten_bind_Config_get_kDF_0=b.asm.qq).apply(null,arguments)},Gs=b._emscripten_bind_Config_set_kDF_1=function(){return(Gs=b._emscripten_bind_Config_set_kDF_1=b.asm.rq).apply(null,arguments)},Hs=b._emscripten_bind_Config_get_kMT_0=function(){return(Hs=b._emscripten_bind_Config_get_kMT_0=b.asm.sq).apply(null,arguments)},Is=b._emscripten_bind_Config_set_kMT_1=function(){return(Is=b._emscripten_bind_Config_set_kMT_1=\nb.asm.tq).apply(null,arguments)},Js=b._emscripten_bind_Config_get_kCHR_0=function(){return(Js=b._emscripten_bind_Config_get_kCHR_0=b.asm.uq).apply(null,arguments)},Ks=b._emscripten_bind_Config_set_kCHR_1=function(){return(Ks=b._emscripten_bind_Config_set_kCHR_1=b.asm.vq).apply(null,arguments)},Ls=b._emscripten_bind_Config_get_kKHR_0=function(){return(Ls=b._emscripten_bind_Config_get_kKHR_0=b.asm.wq).apply(null,arguments)},Ms=b._emscripten_bind_Config_set_kKHR_1=function(){return(Ms=b._emscripten_bind_Config_set_kKHR_1=\nb.asm.xq).apply(null,arguments)},Ns=b._emscripten_bind_Config_get_kSHR_0=function(){return(Ns=b._emscripten_bind_Config_get_kSHR_0=b.asm.yq).apply(null,arguments)},Os=b._emscripten_bind_Config_set_kSHR_1=function(){return(Os=b._emscripten_bind_Config_set_kSHR_1=b.asm.zq).apply(null,arguments)},Ps=b._emscripten_bind_Config_get_kAHR_0=function(){return(Ps=b._emscripten_bind_Config_get_kAHR_0=b.asm.Aq).apply(null,arguments)},Qs=b._emscripten_bind_Config_set_kAHR_1=function(){return(Qs=b._emscripten_bind_Config_set_kAHR_1=\nb.asm.Bq).apply(null,arguments)},Rs=b._emscripten_bind_Config_get_kSRHR_CL_0=function(){return(Rs=b._emscripten_bind_Config_get_kSRHR_CL_0=b.asm.Cq).apply(null,arguments)},Ss=b._emscripten_bind_Config_set_kSRHR_CL_1=function(){return(Ss=b._emscripten_bind_Config_set_kSRHR_CL_1=b.asm.Dq).apply(null,arguments)},Ts=b._emscripten_bind_Config_get_kSKHR_CL_0=function(){return(Ts=b._emscripten_bind_Config_get_kSKHR_CL_0=b.asm.Eq).apply(null,arguments)},Us=b._emscripten_bind_Config_set_kSKHR_CL_1=function(){return(Us=\nb._emscripten_bind_Config_set_kSKHR_CL_1=b.asm.Fq).apply(null,arguments)},Vs=b._emscripten_bind_Config_get_kSSHR_CL_0=function(){return(Vs=b._emscripten_bind_Config_get_kSSHR_CL_0=b.asm.Gq).apply(null,arguments)},Ws=b._emscripten_bind_Config_set_kSSHR_CL_1=function(){return(Ws=b._emscripten_bind_Config_set_kSSHR_CL_1=b.asm.Hq).apply(null,arguments)},Xs=b._emscripten_bind_Config_get_kSR_SPLT_CL_0=function(){return(Xs=b._emscripten_bind_Config_get_kSR_SPLT_CL_0=b.asm.Iq).apply(null,arguments)},Ys=b._emscripten_bind_Config_set_kSR_SPLT_CL_1=\nfunction(){return(Ys=b._emscripten_bind_Config_set_kSR_SPLT_CL_1=b.asm.Jq).apply(null,arguments)},Zs=b._emscripten_bind_Config_get_kSK_SPLT_CL_0=function(){return(Zs=b._emscripten_bind_Config_get_kSK_SPLT_CL_0=b.asm.Kq).apply(null,arguments)},$s=b._emscripten_bind_Config_set_kSK_SPLT_CL_1=function(){return($s=b._emscripten_bind_Config_set_kSK_SPLT_CL_1=b.asm.Lq).apply(null,arguments)},at=b._emscripten_bind_Config_get_kSS_SPLT_CL_0=function(){return(at=b._emscripten_bind_Config_get_kSS_SPLT_CL_0=b.asm.Mq).apply(null,\narguments)},bt=b._emscripten_bind_Config_set_kSS_SPLT_CL_1=function(){return(bt=b._emscripten_bind_Config_set_kSS_SPLT_CL_1=b.asm.Nq).apply(null,arguments)},ct=b._emscripten_bind_Config_get_maxvolume_0=function(){return(ct=b._emscripten_bind_Config_get_maxvolume_0=b.asm.Oq).apply(null,arguments)},dt=b._emscripten_bind_Config_set_maxvolume_1=function(){return(dt=b._emscripten_bind_Config_set_maxvolume_1=b.asm.Pq).apply(null,arguments)},et=b._emscripten_bind_Config_get_timescale_0=function(){return(et=\nb._emscripten_bind_Config_get_timescale_0=b.asm.Qq).apply(null,arguments)},ft=b._emscripten_bind_Config_set_timescale_1=function(){return(ft=b._emscripten_bind_Config_set_timescale_1=b.asm.Rq).apply(null,arguments)},gt=b._emscripten_bind_Config_get_viterations_0=function(){return(gt=b._emscripten_bind_Config_get_viterations_0=b.asm.Sq).apply(null,arguments)},ht=b._emscripten_bind_Config_set_viterations_1=function(){return(ht=b._emscripten_bind_Config_set_viterations_1=b.asm.Tq).apply(null,arguments)},\nit=b._emscripten_bind_Config_get_piterations_0=function(){return(it=b._emscripten_bind_Config_get_piterations_0=b.asm.Uq).apply(null,arguments)},jt=b._emscripten_bind_Config_set_piterations_1=function(){return(jt=b._emscripten_bind_Config_set_piterations_1=b.asm.Vq).apply(null,arguments)},kt=b._emscripten_bind_Config_get_diterations_0=function(){return(kt=b._emscripten_bind_Config_get_diterations_0=b.asm.Wq).apply(null,arguments)},lt=b._emscripten_bind_Config_set_diterations_1=function(){return(lt=\nb._emscripten_bind_Config_set_diterations_1=b.asm.Xq).apply(null,arguments)},mt=b._emscripten_bind_Config_get_citerations_0=function(){return(mt=b._emscripten_bind_Config_get_citerations_0=b.asm.Yq).apply(null,arguments)},nt=b._emscripten_bind_Config_set_citerations_1=function(){return(nt=b._emscripten_bind_Config_set_citerations_1=b.asm.Zq).apply(null,arguments)},ot=b._emscripten_bind_Config_get_collisions_0=function(){return(ot=b._emscripten_bind_Config_get_collisions_0=b.asm._q).apply(null,arguments)},\npt=b._emscripten_bind_Config_set_collisions_1=function(){return(pt=b._emscripten_bind_Config_set_collisions_1=b.asm.$q).apply(null,arguments)},qt=b._emscripten_bind_Config___destroy___0=function(){return(qt=b._emscripten_bind_Config___destroy___0=b.asm.ar).apply(null,arguments)},rt=b._emscripten_bind_Node_get_m_x_0=function(){return(rt=b._emscripten_bind_Node_get_m_x_0=b.asm.br).apply(null,arguments)},st=b._emscripten_bind_Node_set_m_x_1=function(){return(st=b._emscripten_bind_Node_set_m_x_1=b.asm.cr).apply(null,\narguments)},tt=b._emscripten_bind_Node_get_m_q_0=function(){return(tt=b._emscripten_bind_Node_get_m_q_0=b.asm.dr).apply(null,arguments)},ut=b._emscripten_bind_Node_set_m_q_1=function(){return(ut=b._emscripten_bind_Node_set_m_q_1=b.asm.er).apply(null,arguments)},vt=b._emscripten_bind_Node_get_m_v_0=function(){return(vt=b._emscripten_bind_Node_get_m_v_0=b.asm.fr).apply(null,arguments)},wt=b._emscripten_bind_Node_set_m_v_1=function(){return(wt=b._emscripten_bind_Node_set_m_v_1=b.asm.gr).apply(null,arguments)},\nxt=b._emscripten_bind_Node_get_m_f_0=function(){return(xt=b._emscripten_bind_Node_get_m_f_0=b.asm.hr).apply(null,arguments)},yt=b._emscripten_bind_Node_set_m_f_1=function(){return(yt=b._emscripten_bind_Node_set_m_f_1=b.asm.ir).apply(null,arguments)},zt=b._emscripten_bind_Node_get_m_n_0=function(){return(zt=b._emscripten_bind_Node_get_m_n_0=b.asm.jr).apply(null,arguments)},At=b._emscripten_bind_Node_set_m_n_1=function(){return(At=b._emscripten_bind_Node_set_m_n_1=b.asm.kr).apply(null,arguments)},Bt=\nb._emscripten_bind_Node_get_m_im_0=function(){return(Bt=b._emscripten_bind_Node_get_m_im_0=b.asm.lr).apply(null,arguments)},Ct=b._emscripten_bind_Node_set_m_im_1=function(){return(Ct=b._emscripten_bind_Node_set_m_im_1=b.asm.mr).apply(null,arguments)},Dt=b._emscripten_bind_Node_get_m_area_0=function(){return(Dt=b._emscripten_bind_Node_get_m_area_0=b.asm.nr).apply(null,arguments)},Et=b._emscripten_bind_Node_set_m_area_1=function(){return(Et=b._emscripten_bind_Node_set_m_area_1=b.asm.or).apply(null,\narguments)},Ft=b._emscripten_bind_Node___destroy___0=function(){return(Ft=b._emscripten_bind_Node___destroy___0=b.asm.pr).apply(null,arguments)},Gt=b._emscripten_bind_btGhostPairCallback_btGhostPairCallback_0=function(){return(Gt=b._emscripten_bind_btGhostPairCallback_btGhostPairCallback_0=b.asm.qr).apply(null,arguments)},Ht=b._emscripten_bind_btGhostPairCallback___destroy___0=function(){return(Ht=b._emscripten_bind_btGhostPairCallback___destroy___0=b.asm.rr).apply(null,arguments)},It=b._emscripten_bind_btOverlappingPairCallback___destroy___0=\nfunction(){return(It=b._emscripten_bind_btOverlappingPairCallback___destroy___0=b.asm.sr).apply(null,arguments)},Jt=b._emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_3=function(){return(Jt=b._emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_3=b.asm.tr).apply(null,arguments)},Kt=b._emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_4=function(){return(Kt=b._emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_4=\nb.asm.ur).apply(null,arguments)},Lt=b._emscripten_bind_btKinematicCharacterController_setUpAxis_1=function(){return(Lt=b._emscripten_bind_btKinematicCharacterController_setUpAxis_1=b.asm.vr).apply(null,arguments)},Mt=b._emscripten_bind_btKinematicCharacterController_setWalkDirection_1=function(){return(Mt=b._emscripten_bind_btKinematicCharacterController_setWalkDirection_1=b.asm.wr).apply(null,arguments)},Nt=b._emscripten_bind_btKinematicCharacterController_setVelocityForTimeInterval_2=function(){return(Nt=\nb._emscripten_bind_btKinematicCharacterController_setVelocityForTimeInterval_2=b.asm.xr).apply(null,arguments)},Ot=b._emscripten_bind_btKinematicCharacterController_warp_1=function(){return(Ot=b._emscripten_bind_btKinematicCharacterController_warp_1=b.asm.yr).apply(null,arguments)},Pt=b._emscripten_bind_btKinematicCharacterController_preStep_1=function(){return(Pt=b._emscripten_bind_btKinematicCharacterController_preStep_1=b.asm.zr).apply(null,arguments)},Qt=b._emscripten_bind_btKinematicCharacterController_playerStep_2=\nfunction(){return(Qt=b._emscripten_bind_btKinematicCharacterController_playerStep_2=b.asm.Ar).apply(null,arguments)},Rt=b._emscripten_bind_btKinematicCharacterController_setFallSpeed_1=function(){return(Rt=b._emscripten_bind_btKinematicCharacterController_setFallSpeed_1=b.asm.Br).apply(null,arguments)},St=b._emscripten_bind_btKinematicCharacterController_setJumpSpeed_1=function(){return(St=b._emscripten_bind_btKinematicCharacterController_setJumpSpeed_1=b.asm.Cr).apply(null,arguments)},Tt=b._emscripten_bind_btKinematicCharacterController_setMaxJumpHeight_1=\nfunction(){return(Tt=b._emscripten_bind_btKinematicCharacterController_setMaxJumpHeight_1=b.asm.Dr).apply(null,arguments)},Ut=b._emscripten_bind_btKinematicCharacterController_canJump_0=function(){return(Ut=b._emscripten_bind_btKinematicCharacterController_canJump_0=b.asm.Er).apply(null,arguments)},Vt=b._emscripten_bind_btKinematicCharacterController_jump_0=function(){return(Vt=b._emscripten_bind_btKinematicCharacterController_jump_0=b.asm.Fr).apply(null,arguments)},Wt=b._emscripten_bind_btKinematicCharacterController_setGravity_1=\nfunction(){return(Wt=b._emscripten_bind_btKinematicCharacterController_setGravity_1=b.asm.Gr).apply(null,arguments)},Xt=b._emscripten_bind_btKinematicCharacterController_getGravity_0=function(){return(Xt=b._emscripten_bind_btKinematicCharacterController_getGravity_0=b.asm.Hr).apply(null,arguments)},Yt=b._emscripten_bind_btKinematicCharacterController_setMaxSlope_1=function(){return(Yt=b._emscripten_bind_btKinematicCharacterController_setMaxSlope_1=b.asm.Ir).apply(null,arguments)},Zt=b._emscripten_bind_btKinematicCharacterController_getMaxSlope_0=\nfunction(){return(Zt=b._emscripten_bind_btKinematicCharacterController_getMaxSlope_0=b.asm.Jr).apply(null,arguments)},$t=b._emscripten_bind_btKinematicCharacterController_getGhostObject_0=function(){return($t=b._emscripten_bind_btKinematicCharacterController_getGhostObject_0=b.asm.Kr).apply(null,arguments)},au=b._emscripten_bind_btKinematicCharacterController_setUseGhostSweepTest_1=function(){return(au=b._emscripten_bind_btKinematicCharacterController_setUseGhostSweepTest_1=b.asm.Lr).apply(null,arguments)},\nbu=b._emscripten_bind_btKinematicCharacterController_onGround_0=function(){return(bu=b._emscripten_bind_btKinematicCharacterController_onGround_0=b.asm.Mr).apply(null,arguments)},cu=b._emscripten_bind_btKinematicCharacterController_setUpInterpolate_1=function(){return(cu=b._emscripten_bind_btKinematicCharacterController_setUpInterpolate_1=b.asm.Nr).apply(null,arguments)},du=b._emscripten_bind_btKinematicCharacterController_updateAction_2=function(){return(du=b._emscripten_bind_btKinematicCharacterController_updateAction_2=\nb.asm.Or).apply(null,arguments)},eu=b._emscripten_bind_btKinematicCharacterController___destroy___0=function(){return(eu=b._emscripten_bind_btKinematicCharacterController___destroy___0=b.asm.Pr).apply(null,arguments)},fu=b._emscripten_bind_btSoftBodyArray_size_0=function(){return(fu=b._emscripten_bind_btSoftBodyArray_size_0=b.asm.Qr).apply(null,arguments)},gu=b._emscripten_bind_btSoftBodyArray_at_1=function(){return(gu=b._emscripten_bind_btSoftBodyArray_at_1=b.asm.Rr).apply(null,arguments)},hu=b._emscripten_bind_btSoftBodyArray___destroy___0=\nfunction(){return(hu=b._emscripten_bind_btSoftBodyArray___destroy___0=b.asm.Sr).apply(null,arguments)},iu=b._emscripten_bind_btFaceArray_size_0=function(){return(iu=b._emscripten_bind_btFaceArray_size_0=b.asm.Tr).apply(null,arguments)},ju=b._emscripten_bind_btFaceArray_at_1=function(){return(ju=b._emscripten_bind_btFaceArray_at_1=b.asm.Ur).apply(null,arguments)},ku=b._emscripten_bind_btFaceArray___destroy___0=function(){return(ku=b._emscripten_bind_btFaceArray___destroy___0=b.asm.Vr).apply(null,arguments)},\nlu=b._emscripten_bind_btStaticPlaneShape_btStaticPlaneShape_2=function(){return(lu=b._emscripten_bind_btStaticPlaneShape_btStaticPlaneShape_2=b.asm.Wr).apply(null,arguments)},mu=b._emscripten_bind_btStaticPlaneShape_setLocalScaling_1=function(){return(mu=b._emscripten_bind_btStaticPlaneShape_setLocalScaling_1=b.asm.Xr).apply(null,arguments)},nu=b._emscripten_bind_btStaticPlaneShape_getLocalScaling_0=function(){return(nu=b._emscripten_bind_btStaticPlaneShape_getLocalScaling_0=b.asm.Yr).apply(null,\narguments)},ou=b._emscripten_bind_btStaticPlaneShape_calculateLocalInertia_2=function(){return(ou=b._emscripten_bind_btStaticPlaneShape_calculateLocalInertia_2=b.asm.Zr).apply(null,arguments)},pu=b._emscripten_bind_btStaticPlaneShape___destroy___0=function(){return(pu=b._emscripten_bind_btStaticPlaneShape___destroy___0=b.asm._r).apply(null,arguments)},qu=b._emscripten_bind_btOverlappingPairCache_setInternalGhostPairCallback_1=function(){return(qu=b._emscripten_bind_btOverlappingPairCache_setInternalGhostPairCallback_1=\nb.asm.$r).apply(null,arguments)},ru=b._emscripten_bind_btOverlappingPairCache_getNumOverlappingPairs_0=function(){return(ru=b._emscripten_bind_btOverlappingPairCache_getNumOverlappingPairs_0=b.asm.as).apply(null,arguments)},su=b._emscripten_bind_btOverlappingPairCache___destroy___0=function(){return(su=b._emscripten_bind_btOverlappingPairCache___destroy___0=b.asm.bs).apply(null,arguments)},tu=b._emscripten_bind_btIndexedMesh_get_m_numTriangles_0=function(){return(tu=b._emscripten_bind_btIndexedMesh_get_m_numTriangles_0=\nb.asm.cs).apply(null,arguments)},uu=b._emscripten_bind_btIndexedMesh_set_m_numTriangles_1=function(){return(uu=b._emscripten_bind_btIndexedMesh_set_m_numTriangles_1=b.asm.ds).apply(null,arguments)},vu=b._emscripten_bind_btIndexedMesh___destroy___0=function(){return(vu=b._emscripten_bind_btIndexedMesh___destroy___0=b.asm.es).apply(null,arguments)},wu=b._emscripten_bind_btSoftRigidDynamicsWorld_btSoftRigidDynamicsWorld_5=function(){return(wu=b._emscripten_bind_btSoftRigidDynamicsWorld_btSoftRigidDynamicsWorld_5=\nb.asm.fs).apply(null,arguments)},xu=b._emscripten_bind_btSoftRigidDynamicsWorld_addSoftBody_3=function(){return(xu=b._emscripten_bind_btSoftRigidDynamicsWorld_addSoftBody_3=b.asm.gs).apply(null,arguments)},yu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeSoftBody_1=function(){return(yu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeSoftBody_1=b.asm.hs).apply(null,arguments)},zu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeCollisionObject_1=function(){return(zu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeCollisionObject_1=\nb.asm.is).apply(null,arguments)},Au=b._emscripten_bind_btSoftRigidDynamicsWorld_getWorldInfo_0=function(){return(Au=b._emscripten_bind_btSoftRigidDynamicsWorld_getWorldInfo_0=b.asm.js).apply(null,arguments)},Bu=b._emscripten_bind_btSoftRigidDynamicsWorld_getSoftBodyArray_0=function(){return(Bu=b._emscripten_bind_btSoftRigidDynamicsWorld_getSoftBodyArray_0=b.asm.ks).apply(null,arguments)},Cu=b._emscripten_bind_btSoftRigidDynamicsWorld_getDispatcher_0=function(){return(Cu=b._emscripten_bind_btSoftRigidDynamicsWorld_getDispatcher_0=\nb.asm.ls).apply(null,arguments)},Du=b._emscripten_bind_btSoftRigidDynamicsWorld_rayTest_3=function(){return(Du=b._emscripten_bind_btSoftRigidDynamicsWorld_rayTest_3=b.asm.ms).apply(null,arguments)},Eu=b._emscripten_bind_btSoftRigidDynamicsWorld_getPairCache_0=function(){return(Eu=b._emscripten_bind_btSoftRigidDynamicsWorld_getPairCache_0=b.asm.ns).apply(null,arguments)},Fu=b._emscripten_bind_btSoftRigidDynamicsWorld_getDispatchInfo_0=function(){return(Fu=b._emscripten_bind_btSoftRigidDynamicsWorld_getDispatchInfo_0=\nb.asm.os).apply(null,arguments)},Gu=b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_1=function(){return(Gu=b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_1=b.asm.ps).apply(null,arguments)},Hu=b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_2=function(){return(Hu=b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_2=b.asm.qs).apply(null,arguments)},Iu=b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_3=function(){return(Iu=b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_3=\nb.asm.rs).apply(null,arguments)},Ju=b._emscripten_bind_btSoftRigidDynamicsWorld_getBroadphase_0=function(){return(Ju=b._emscripten_bind_btSoftRigidDynamicsWorld_getBroadphase_0=b.asm.ss).apply(null,arguments)},Ku=b._emscripten_bind_btSoftRigidDynamicsWorld_convexSweepTest_5=function(){return(Ku=b._emscripten_bind_btSoftRigidDynamicsWorld_convexSweepTest_5=b.asm.ts).apply(null,arguments)},Lu=b._emscripten_bind_btSoftRigidDynamicsWorld_contactPairTest_3=function(){return(Lu=b._emscripten_bind_btSoftRigidDynamicsWorld_contactPairTest_3=\nb.asm.us).apply(null,arguments)},Mu=b._emscripten_bind_btSoftRigidDynamicsWorld_contactTest_2=function(){return(Mu=b._emscripten_bind_btSoftRigidDynamicsWorld_contactTest_2=b.asm.vs).apply(null,arguments)},Nu=b._emscripten_bind_btSoftRigidDynamicsWorld_updateSingleAabb_1=function(){return(Nu=b._emscripten_bind_btSoftRigidDynamicsWorld_updateSingleAabb_1=b.asm.ws).apply(null,arguments)},Ou=b._emscripten_bind_btSoftRigidDynamicsWorld_setDebugDrawer_1=function(){return(Ou=b._emscripten_bind_btSoftRigidDynamicsWorld_setDebugDrawer_1=\nb.asm.xs).apply(null,arguments)},Pu=b._emscripten_bind_btSoftRigidDynamicsWorld_getDebugDrawer_0=function(){return(Pu=b._emscripten_bind_btSoftRigidDynamicsWorld_getDebugDrawer_0=b.asm.ys).apply(null,arguments)},Qu=b._emscripten_bind_btSoftRigidDynamicsWorld_debugDrawWorld_0=function(){return(Qu=b._emscripten_bind_btSoftRigidDynamicsWorld_debugDrawWorld_0=b.asm.zs).apply(null,arguments)},Ru=b._emscripten_bind_btSoftRigidDynamicsWorld_debugDrawObject_3=function(){return(Ru=b._emscripten_bind_btSoftRigidDynamicsWorld_debugDrawObject_3=\nb.asm.As).apply(null,arguments)},Su=b._emscripten_bind_btSoftRigidDynamicsWorld_setGravity_1=function(){return(Su=b._emscripten_bind_btSoftRigidDynamicsWorld_setGravity_1=b.asm.Bs).apply(null,arguments)},Tu=b._emscripten_bind_btSoftRigidDynamicsWorld_getGravity_0=function(){return(Tu=b._emscripten_bind_btSoftRigidDynamicsWorld_getGravity_0=b.asm.Cs).apply(null,arguments)},Uu=b._emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_1=function(){return(Uu=b._emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_1=\nb.asm.Ds).apply(null,arguments)},Vu=b._emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_3=function(){return(Vu=b._emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_3=b.asm.Es).apply(null,arguments)},Wu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeRigidBody_1=function(){return(Wu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeRigidBody_1=b.asm.Fs).apply(null,arguments)},Xu=b._emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_1=function(){return(Xu=b._emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_1=\nb.asm.Gs).apply(null,arguments)},Yu=b._emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_2=function(){return(Yu=b._emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_2=b.asm.Hs).apply(null,arguments)},Zu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeConstraint_1=function(){return(Zu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeConstraint_1=b.asm.Is).apply(null,arguments)},$u=b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_1=function(){return($u=b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_1=\nb.asm.Js).apply(null,arguments)},av=b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_2=function(){return(av=b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_2=b.asm.Ks).apply(null,arguments)},bv=b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_3=function(){return(bv=b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_3=b.asm.Ls).apply(null,arguments)},cv=b._emscripten_bind_btSoftRigidDynamicsWorld_setContactAddedCallback_1=function(){return(cv=b._emscripten_bind_btSoftRigidDynamicsWorld_setContactAddedCallback_1=\nb.asm.Ms).apply(null,arguments)},dv=b._emscripten_bind_btSoftRigidDynamicsWorld_setContactProcessedCallback_1=function(){return(dv=b._emscripten_bind_btSoftRigidDynamicsWorld_setContactProcessedCallback_1=b.asm.Ns).apply(null,arguments)},ev=b._emscripten_bind_btSoftRigidDynamicsWorld_setContactDestroyedCallback_1=function(){return(ev=b._emscripten_bind_btSoftRigidDynamicsWorld_setContactDestroyedCallback_1=b.asm.Os).apply(null,arguments)},fv=b._emscripten_bind_btSoftRigidDynamicsWorld_addAction_1=\nfunction(){return(fv=b._emscripten_bind_btSoftRigidDynamicsWorld_addAction_1=b.asm.Ps).apply(null,arguments)},gv=b._emscripten_bind_btSoftRigidDynamicsWorld_removeAction_1=function(){return(gv=b._emscripten_bind_btSoftRigidDynamicsWorld_removeAction_1=b.asm.Qs).apply(null,arguments)},hv=b._emscripten_bind_btSoftRigidDynamicsWorld_getSolverInfo_0=function(){return(hv=b._emscripten_bind_btSoftRigidDynamicsWorld_getSolverInfo_0=b.asm.Rs).apply(null,arguments)},iv=b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_1=\nfunction(){return(iv=b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_1=b.asm.Ss).apply(null,arguments)},jv=b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_2=function(){return(jv=b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_2=b.asm.Ts).apply(null,arguments)},kv=b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_3=function(){return(kv=b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_3=b.asm.Us).apply(null,\narguments)},lv=b._emscripten_bind_btSoftRigidDynamicsWorld___destroy___0=function(){return(lv=b._emscripten_bind_btSoftRigidDynamicsWorld___destroy___0=b.asm.Vs).apply(null,arguments)},mv=b._emscripten_bind_btFixedConstraint_btFixedConstraint_4=function(){return(mv=b._emscripten_bind_btFixedConstraint_btFixedConstraint_4=b.asm.Ws).apply(null,arguments)},nv=b._emscripten_bind_btFixedConstraint_enableFeedback_1=function(){return(nv=b._emscripten_bind_btFixedConstraint_enableFeedback_1=b.asm.Xs).apply(null,\narguments)},ov=b._emscripten_bind_btFixedConstraint_getBreakingImpulseThreshold_0=function(){return(ov=b._emscripten_bind_btFixedConstraint_getBreakingImpulseThreshold_0=b.asm.Ys).apply(null,arguments)},pv=b._emscripten_bind_btFixedConstraint_setBreakingImpulseThreshold_1=function(){return(pv=b._emscripten_bind_btFixedConstraint_setBreakingImpulseThreshold_1=b.asm.Zs).apply(null,arguments)},qv=b._emscripten_bind_btFixedConstraint_getParam_2=function(){return(qv=b._emscripten_bind_btFixedConstraint_getParam_2=\nb.asm._s).apply(null,arguments)},rv=b._emscripten_bind_btFixedConstraint_setParam_3=function(){return(rv=b._emscripten_bind_btFixedConstraint_setParam_3=b.asm.$s).apply(null,arguments)},sv=b._emscripten_bind_btFixedConstraint___destroy___0=function(){return(sv=b._emscripten_bind_btFixedConstraint___destroy___0=b.asm.at).apply(null,arguments)},tv=b._emscripten_bind_btTransform_btTransform_0=function(){return(tv=b._emscripten_bind_btTransform_btTransform_0=b.asm.bt).apply(null,arguments)},uv=b._emscripten_bind_btTransform_btTransform_2=\nfunction(){return(uv=b._emscripten_bind_btTransform_btTransform_2=b.asm.ct).apply(null,arguments)},vv=b._emscripten_bind_btTransform_setIdentity_0=function(){return(vv=b._emscripten_bind_btTransform_setIdentity_0=b.asm.dt).apply(null,arguments)},wv=b._emscripten_bind_btTransform_setOrigin_1=function(){return(wv=b._emscripten_bind_btTransform_setOrigin_1=b.asm.et).apply(null,arguments)},xv=b._emscripten_bind_btTransform_setRotation_1=function(){return(xv=b._emscripten_bind_btTransform_setRotation_1=\nb.asm.ft).apply(null,arguments)},yv=b._emscripten_bind_btTransform_getOrigin_0=function(){return(yv=b._emscripten_bind_btTransform_getOrigin_0=b.asm.gt).apply(null,arguments)},zv=b._emscripten_bind_btTransform_getRotation_0=function(){return(zv=b._emscripten_bind_btTransform_getRotation_0=b.asm.ht).apply(null,arguments)},Av=b._emscripten_bind_btTransform_getBasis_0=function(){return(Av=b._emscripten_bind_btTransform_getBasis_0=b.asm.it).apply(null,arguments)},Bv=b._emscripten_bind_btTransform_setFromOpenGLMatrix_1=\nfunction(){return(Bv=b._emscripten_bind_btTransform_setFromOpenGLMatrix_1=b.asm.jt).apply(null,arguments)},Cv=b._emscripten_bind_btTransform_inverse_0=function(){return(Cv=b._emscripten_bind_btTransform_inverse_0=b.asm.kt).apply(null,arguments)},Dv=b._emscripten_bind_btTransform_op_mul_1=function(){return(Dv=b._emscripten_bind_btTransform_op_mul_1=b.asm.lt).apply(null,arguments)},Ev=b._emscripten_bind_btTransform___destroy___0=function(){return(Ev=b._emscripten_bind_btTransform___destroy___0=b.asm.mt).apply(null,\narguments)},Fv=b._emscripten_bind_ClosestRayResultCallback_ClosestRayResultCallback_2=function(){return(Fv=b._emscripten_bind_ClosestRayResultCallback_ClosestRayResultCallback_2=b.asm.nt).apply(null,arguments)},Gv=b._emscripten_bind_ClosestRayResultCallback_hasHit_0=function(){return(Gv=b._emscripten_bind_ClosestRayResultCallback_hasHit_0=b.asm.ot).apply(null,arguments)},Hv=b._emscripten_bind_ClosestRayResultCallback_get_m_rayFromWorld_0=function(){return(Hv=b._emscripten_bind_ClosestRayResultCallback_get_m_rayFromWorld_0=\nb.asm.pt).apply(null,arguments)},Iv=b._emscripten_bind_ClosestRayResultCallback_set_m_rayFromWorld_1=function(){return(Iv=b._emscripten_bind_ClosestRayResultCallback_set_m_rayFromWorld_1=b.asm.qt).apply(null,arguments)},Jv=b._emscripten_bind_ClosestRayResultCallback_get_m_rayToWorld_0=function(){return(Jv=b._emscripten_bind_ClosestRayResultCallback_get_m_rayToWorld_0=b.asm.rt).apply(null,arguments)},Kv=b._emscripten_bind_ClosestRayResultCallback_set_m_rayToWorld_1=function(){return(Kv=b._emscripten_bind_ClosestRayResultCallback_set_m_rayToWorld_1=\nb.asm.st).apply(null,arguments)},Lv=b._emscripten_bind_ClosestRayResultCallback_get_m_hitNormalWorld_0=function(){return(Lv=b._emscripten_bind_ClosestRayResultCallback_get_m_hitNormalWorld_0=b.asm.tt).apply(null,arguments)},Mv=b._emscripten_bind_ClosestRayResultCallback_set_m_hitNormalWorld_1=function(){return(Mv=b._emscripten_bind_ClosestRayResultCallback_set_m_hitNormalWorld_1=b.asm.ut).apply(null,arguments)},Nv=b._emscripten_bind_ClosestRayResultCallback_get_m_hitPointWorld_0=function(){return(Nv=\nb._emscripten_bind_ClosestRayResultCallback_get_m_hitPointWorld_0=b.asm.vt).apply(null,arguments)},Ov=b._emscripten_bind_ClosestRayResultCallback_set_m_hitPointWorld_1=function(){return(Ov=b._emscripten_bind_ClosestRayResultCallback_set_m_hitPointWorld_1=b.asm.wt).apply(null,arguments)},Pv=b._emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterGroup_0=function(){return(Pv=b._emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterGroup_0=b.asm.xt).apply(null,arguments)},Qv=b._emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterGroup_1=\nfunction(){return(Qv=b._emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterGroup_1=b.asm.yt).apply(null,arguments)},Rv=b._emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterMask_0=function(){return(Rv=b._emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterMask_0=b.asm.zt).apply(null,arguments)},Sv=b._emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterMask_1=function(){return(Sv=b._emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterMask_1=b.asm.At).apply(null,\narguments)},Tv=b._emscripten_bind_ClosestRayResultCallback_get_m_closestHitFraction_0=function(){return(Tv=b._emscripten_bind_ClosestRayResultCallback_get_m_closestHitFraction_0=b.asm.Bt).apply(null,arguments)},Uv=b._emscripten_bind_ClosestRayResultCallback_set_m_closestHitFraction_1=function(){return(Uv=b._emscripten_bind_ClosestRayResultCallback_set_m_closestHitFraction_1=b.asm.Ct).apply(null,arguments)},Vv=b._emscripten_bind_ClosestRayResultCallback_get_m_collisionObject_0=function(){return(Vv=\nb._emscripten_bind_ClosestRayResultCallback_get_m_collisionObject_0=b.asm.Dt).apply(null,arguments)},Wv=b._emscripten_bind_ClosestRayResultCallback_set_m_collisionObject_1=function(){return(Wv=b._emscripten_bind_ClosestRayResultCallback_set_m_collisionObject_1=b.asm.Et).apply(null,arguments)},Xv=b._emscripten_bind_ClosestRayResultCallback___destroy___0=function(){return(Xv=b._emscripten_bind_ClosestRayResultCallback___destroy___0=b.asm.Ft).apply(null,arguments)},Yv=b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_0=\nfunction(){return(Yv=b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_0=b.asm.Gt).apply(null,arguments)},Zv=b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_1=function(){return(Zv=b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_1=b.asm.Ht).apply(null,arguments)},$v=b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration___destroy___0=\nfunction(){return($v=b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration___destroy___0=b.asm.It).apply(null,arguments)},aw=b._emscripten_bind_ConcreteContactResultCallback_ConcreteContactResultCallback_0=function(){return(aw=b._emscripten_bind_ConcreteContactResultCallback_ConcreteContactResultCallback_0=b.asm.Jt).apply(null,arguments)},bw=b._emscripten_bind_ConcreteContactResultCallback_addSingleResult_7=function(){return(bw=b._emscripten_bind_ConcreteContactResultCallback_addSingleResult_7=\nb.asm.Kt).apply(null,arguments)},cw=b._emscripten_bind_ConcreteContactResultCallback___destroy___0=function(){return(cw=b._emscripten_bind_ConcreteContactResultCallback___destroy___0=b.asm.Lt).apply(null,arguments)},dw=b._emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_2=function(){return(dw=b._emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_2=b.asm.Mt).apply(null,arguments)},ew=b._emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_3=function(){return(ew=b._emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_3=\nb.asm.Nt).apply(null,arguments)},fw=b._emscripten_bind_btBvhTriangleMeshShape_setLocalScaling_1=function(){return(fw=b._emscripten_bind_btBvhTriangleMeshShape_setLocalScaling_1=b.asm.Ot).apply(null,arguments)},gw=b._emscripten_bind_btBvhTriangleMeshShape_getLocalScaling_0=function(){return(gw=b._emscripten_bind_btBvhTriangleMeshShape_getLocalScaling_0=b.asm.Pt).apply(null,arguments)},hw=b._emscripten_bind_btBvhTriangleMeshShape_calculateLocalInertia_2=function(){return(hw=b._emscripten_bind_btBvhTriangleMeshShape_calculateLocalInertia_2=\nb.asm.Qt).apply(null,arguments)},iw=b._emscripten_bind_btBvhTriangleMeshShape___destroy___0=function(){return(iw=b._emscripten_bind_btBvhTriangleMeshShape___destroy___0=b.asm.Rt).apply(null,arguments)},jw=b._emscripten_bind_btConstCollisionObjectArray_size_0=function(){return(jw=b._emscripten_bind_btConstCollisionObjectArray_size_0=b.asm.St).apply(null,arguments)},kw=b._emscripten_bind_btConstCollisionObjectArray_at_1=function(){return(kw=b._emscripten_bind_btConstCollisionObjectArray_at_1=b.asm.Tt).apply(null,\narguments)},lw=b._emscripten_bind_btConstCollisionObjectArray___destroy___0=function(){return(lw=b._emscripten_bind_btConstCollisionObjectArray___destroy___0=b.asm.Ut).apply(null,arguments)},mw=b._emscripten_bind_btSliderConstraint_btSliderConstraint_3=function(){return(mw=b._emscripten_bind_btSliderConstraint_btSliderConstraint_3=b.asm.Vt).apply(null,arguments)},nw=b._emscripten_bind_btSliderConstraint_btSliderConstraint_5=function(){return(nw=b._emscripten_bind_btSliderConstraint_btSliderConstraint_5=\nb.asm.Wt).apply(null,arguments)},ow=b._emscripten_bind_btSliderConstraint_setLowerLinLimit_1=function(){return(ow=b._emscripten_bind_btSliderConstraint_setLowerLinLimit_1=b.asm.Xt).apply(null,arguments)},pw=b._emscripten_bind_btSliderConstraint_setUpperLinLimit_1=function(){return(pw=b._emscripten_bind_btSliderConstraint_setUpperLinLimit_1=b.asm.Yt).apply(null,arguments)},qw=b._emscripten_bind_btSliderConstraint_setLowerAngLimit_1=function(){return(qw=b._emscripten_bind_btSliderConstraint_setLowerAngLimit_1=\nb.asm.Zt).apply(null,arguments)},rw=b._emscripten_bind_btSliderConstraint_setUpperAngLimit_1=function(){return(rw=b._emscripten_bind_btSliderConstraint_setUpperAngLimit_1=b.asm._t).apply(null,arguments)},sw=b._emscripten_bind_btSliderConstraint_enableFeedback_1=function(){return(sw=b._emscripten_bind_btSliderConstraint_enableFeedback_1=b.asm.$t).apply(null,arguments)},tw=b._emscripten_bind_btSliderConstraint_getBreakingImpulseThreshold_0=function(){return(tw=b._emscripten_bind_btSliderConstraint_getBreakingImpulseThreshold_0=\nb.asm.au).apply(null,arguments)},uw=b._emscripten_bind_btSliderConstraint_setBreakingImpulseThreshold_1=function(){return(uw=b._emscripten_bind_btSliderConstraint_setBreakingImpulseThreshold_1=b.asm.bu).apply(null,arguments)},vw=b._emscripten_bind_btSliderConstraint_getParam_2=function(){return(vw=b._emscripten_bind_btSliderConstraint_getParam_2=b.asm.cu).apply(null,arguments)},ww=b._emscripten_bind_btSliderConstraint_setParam_3=function(){return(ww=b._emscripten_bind_btSliderConstraint_setParam_3=\nb.asm.du).apply(null,arguments)},xw=b._emscripten_bind_btSliderConstraint___destroy___0=function(){return(xw=b._emscripten_bind_btSliderConstraint___destroy___0=b.asm.eu).apply(null,arguments)},yw=b._emscripten_bind_btPairCachingGhostObject_btPairCachingGhostObject_0=function(){return(yw=b._emscripten_bind_btPairCachingGhostObject_btPairCachingGhostObject_0=b.asm.fu).apply(null,arguments)},zw=b._emscripten_bind_btPairCachingGhostObject_setAnisotropicFriction_2=function(){return(zw=b._emscripten_bind_btPairCachingGhostObject_setAnisotropicFriction_2=\nb.asm.gu).apply(null,arguments)},Aw=b._emscripten_bind_btPairCachingGhostObject_getCollisionShape_0=function(){return(Aw=b._emscripten_bind_btPairCachingGhostObject_getCollisionShape_0=b.asm.hu).apply(null,arguments)},Bw=b._emscripten_bind_btPairCachingGhostObject_setContactProcessingThreshold_1=function(){return(Bw=b._emscripten_bind_btPairCachingGhostObject_setContactProcessingThreshold_1=b.asm.iu).apply(null,arguments)},Cw=b._emscripten_bind_btPairCachingGhostObject_setActivationState_1=function(){return(Cw=\nb._emscripten_bind_btPairCachingGhostObject_setActivationState_1=b.asm.ju).apply(null,arguments)},Dw=b._emscripten_bind_btPairCachingGhostObject_forceActivationState_1=function(){return(Dw=b._emscripten_bind_btPairCachingGhostObject_forceActivationState_1=b.asm.ku).apply(null,arguments)},Ew=b._emscripten_bind_btPairCachingGhostObject_activate_0=function(){return(Ew=b._emscripten_bind_btPairCachingGhostObject_activate_0=b.asm.lu).apply(null,arguments)},Fw=b._emscripten_bind_btPairCachingGhostObject_activate_1=\nfunction(){return(Fw=b._emscripten_bind_btPairCachingGhostObject_activate_1=b.asm.mu).apply(null,arguments)},Gw=b._emscripten_bind_btPairCachingGhostObject_isActive_0=function(){return(Gw=b._emscripten_bind_btPairCachingGhostObject_isActive_0=b.asm.nu).apply(null,arguments)},Hw=b._emscripten_bind_btPairCachingGhostObject_isKinematicObject_0=function(){return(Hw=b._emscripten_bind_btPairCachingGhostObject_isKinematicObject_0=b.asm.ou).apply(null,arguments)},Iw=b._emscripten_bind_btPairCachingGhostObject_isStaticObject_0=\nfunction(){return(Iw=b._emscripten_bind_btPairCachingGhostObject_isStaticObject_0=b.asm.pu).apply(null,arguments)},Jw=b._emscripten_bind_btPairCachingGhostObject_isStaticOrKinematicObject_0=function(){return(Jw=b._emscripten_bind_btPairCachingGhostObject_isStaticOrKinematicObject_0=b.asm.qu).apply(null,arguments)},Kw=b._emscripten_bind_btPairCachingGhostObject_getRestitution_0=function(){return(Kw=b._emscripten_bind_btPairCachingGhostObject_getRestitution_0=b.asm.ru).apply(null,arguments)},Lw=b._emscripten_bind_btPairCachingGhostObject_getFriction_0=\nfunction(){return(Lw=b._emscripten_bind_btPairCachingGhostObject_getFriction_0=b.asm.su).apply(null,arguments)},Mw=b._emscripten_bind_btPairCachingGhostObject_getRollingFriction_0=function(){return(Mw=b._emscripten_bind_btPairCachingGhostObject_getRollingFriction_0=b.asm.tu).apply(null,arguments)},Nw=b._emscripten_bind_btPairCachingGhostObject_setRestitution_1=function(){return(Nw=b._emscripten_bind_btPairCachingGhostObject_setRestitution_1=b.asm.uu).apply(null,arguments)},Ow=b._emscripten_bind_btPairCachingGhostObject_setFriction_1=\nfunction(){return(Ow=b._emscripten_bind_btPairCachingGhostObject_setFriction_1=b.asm.vu).apply(null,arguments)},Pw=b._emscripten_bind_btPairCachingGhostObject_setRollingFriction_1=function(){return(Pw=b._emscripten_bind_btPairCachingGhostObject_setRollingFriction_1=b.asm.wu).apply(null,arguments)},Qw=b._emscripten_bind_btPairCachingGhostObject_getWorldTransform_0=function(){return(Qw=b._emscripten_bind_btPairCachingGhostObject_getWorldTransform_0=b.asm.xu).apply(null,arguments)},Rw=b._emscripten_bind_btPairCachingGhostObject_getCollisionFlags_0=\nfunction(){return(Rw=b._emscripten_bind_btPairCachingGhostObject_getCollisionFlags_0=b.asm.yu).apply(null,arguments)},Sw=b._emscripten_bind_btPairCachingGhostObject_setCollisionFlags_1=function(){return(Sw=b._emscripten_bind_btPairCachingGhostObject_setCollisionFlags_1=b.asm.zu).apply(null,arguments)},Tw=b._emscripten_bind_btPairCachingGhostObject_setWorldTransform_1=function(){return(Tw=b._emscripten_bind_btPairCachingGhostObject_setWorldTransform_1=b.asm.Au).apply(null,arguments)},Uw=b._emscripten_bind_btPairCachingGhostObject_setCollisionShape_1=\nfunction(){return(Uw=b._emscripten_bind_btPairCachingGhostObject_setCollisionShape_1=b.asm.Bu).apply(null,arguments)},Vw=b._emscripten_bind_btPairCachingGhostObject_setCcdMotionThreshold_1=function(){return(Vw=b._emscripten_bind_btPairCachingGhostObject_setCcdMotionThreshold_1=b.asm.Cu).apply(null,arguments)},Ww=b._emscripten_bind_btPairCachingGhostObject_setCcdSweptSphereRadius_1=function(){return(Ww=b._emscripten_bind_btPairCachingGhostObject_setCcdSweptSphereRadius_1=b.asm.Du).apply(null,arguments)},\nXw=b._emscripten_bind_btPairCachingGhostObject_getUserIndex_0=function(){return(Xw=b._emscripten_bind_btPairCachingGhostObject_getUserIndex_0=b.asm.Eu).apply(null,arguments)},Yw=b._emscripten_bind_btPairCachingGhostObject_setUserIndex_1=function(){return(Yw=b._emscripten_bind_btPairCachingGhostObject_setUserIndex_1=b.asm.Fu).apply(null,arguments)},Zw=b._emscripten_bind_btPairCachingGhostObject_getUserPointer_0=function(){return(Zw=b._emscripten_bind_btPairCachingGhostObject_getUserPointer_0=b.asm.Gu).apply(null,\narguments)},$w=b._emscripten_bind_btPairCachingGhostObject_setUserPointer_1=function(){return($w=b._emscripten_bind_btPairCachingGhostObject_setUserPointer_1=b.asm.Hu).apply(null,arguments)},ax=b._emscripten_bind_btPairCachingGhostObject_getBroadphaseHandle_0=function(){return(ax=b._emscripten_bind_btPairCachingGhostObject_getBroadphaseHandle_0=b.asm.Iu).apply(null,arguments)},bx=b._emscripten_bind_btPairCachingGhostObject_getNumOverlappingObjects_0=function(){return(bx=b._emscripten_bind_btPairCachingGhostObject_getNumOverlappingObjects_0=\nb.asm.Ju).apply(null,arguments)},cx=b._emscripten_bind_btPairCachingGhostObject_getOverlappingObject_1=function(){return(cx=b._emscripten_bind_btPairCachingGhostObject_getOverlappingObject_1=b.asm.Ku).apply(null,arguments)},dx=b._emscripten_bind_btPairCachingGhostObject___destroy___0=function(){return(dx=b._emscripten_bind_btPairCachingGhostObject___destroy___0=b.asm.Lu).apply(null,arguments)},ex=b._emscripten_bind_btManifoldPoint_getPositionWorldOnA_0=function(){return(ex=b._emscripten_bind_btManifoldPoint_getPositionWorldOnA_0=\nb.asm.Mu).apply(null,arguments)},fx=b._emscripten_bind_btManifoldPoint_getPositionWorldOnB_0=function(){return(fx=b._emscripten_bind_btManifoldPoint_getPositionWorldOnB_0=b.asm.Nu).apply(null,arguments)},gx=b._emscripten_bind_btManifoldPoint_getAppliedImpulse_0=function(){return(gx=b._emscripten_bind_btManifoldPoint_getAppliedImpulse_0=b.asm.Ou).apply(null,arguments)},hx=b._emscripten_bind_btManifoldPoint_getDistance_0=function(){return(hx=b._emscripten_bind_btManifoldPoint_getDistance_0=b.asm.Pu).apply(null,\narguments)},ix=b._emscripten_bind_btManifoldPoint_get_m_localPointA_0=function(){return(ix=b._emscripten_bind_btManifoldPoint_get_m_localPointA_0=b.asm.Qu).apply(null,arguments)},jx=b._emscripten_bind_btManifoldPoint_set_m_localPointA_1=function(){return(jx=b._emscripten_bind_btManifoldPoint_set_m_localPointA_1=b.asm.Ru).apply(null,arguments)},kx=b._emscripten_bind_btManifoldPoint_get_m_localPointB_0=function(){return(kx=b._emscripten_bind_btManifoldPoint_get_m_localPointB_0=b.asm.Su).apply(null,\narguments)},lx=b._emscripten_bind_btManifoldPoint_set_m_localPointB_1=function(){return(lx=b._emscripten_bind_btManifoldPoint_set_m_localPointB_1=b.asm.Tu).apply(null,arguments)},mx=b._emscripten_bind_btManifoldPoint_get_m_positionWorldOnB_0=function(){return(mx=b._emscripten_bind_btManifoldPoint_get_m_positionWorldOnB_0=b.asm.Uu).apply(null,arguments)},nx=b._emscripten_bind_btManifoldPoint_set_m_positionWorldOnB_1=function(){return(nx=b._emscripten_bind_btManifoldPoint_set_m_positionWorldOnB_1=b.asm.Vu).apply(null,\narguments)},ox=b._emscripten_bind_btManifoldPoint_get_m_positionWorldOnA_0=function(){return(ox=b._emscripten_bind_btManifoldPoint_get_m_positionWorldOnA_0=b.asm.Wu).apply(null,arguments)},px=b._emscripten_bind_btManifoldPoint_set_m_positionWorldOnA_1=function(){return(px=b._emscripten_bind_btManifoldPoint_set_m_positionWorldOnA_1=b.asm.Xu).apply(null,arguments)},qx=b._emscripten_bind_btManifoldPoint_get_m_normalWorldOnB_0=function(){return(qx=b._emscripten_bind_btManifoldPoint_get_m_normalWorldOnB_0=\nb.asm.Yu).apply(null,arguments)},rx=b._emscripten_bind_btManifoldPoint_set_m_normalWorldOnB_1=function(){return(rx=b._emscripten_bind_btManifoldPoint_set_m_normalWorldOnB_1=b.asm.Zu).apply(null,arguments)},sx=b._emscripten_bind_btManifoldPoint_get_m_userPersistentData_0=function(){return(sx=b._emscripten_bind_btManifoldPoint_get_m_userPersistentData_0=b.asm._u).apply(null,arguments)},tx=b._emscripten_bind_btManifoldPoint_set_m_userPersistentData_1=function(){return(tx=b._emscripten_bind_btManifoldPoint_set_m_userPersistentData_1=\nb.asm.$u).apply(null,arguments)},ux=b._emscripten_bind_btManifoldPoint___destroy___0=function(){return(ux=b._emscripten_bind_btManifoldPoint___destroy___0=b.asm.av).apply(null,arguments)},vx=b._emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_2=function(){return(vx=b._emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_2=b.asm.bv).apply(null,arguments)},wx=b._emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_4=function(){return(wx=b._emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_4=\nb.asm.cv).apply(null,arguments)},xx=b._emscripten_bind_btPoint2PointConstraint_setPivotA_1=function(){return(xx=b._emscripten_bind_btPoint2PointConstraint_setPivotA_1=b.asm.dv).apply(null,arguments)},yx=b._emscripten_bind_btPoint2PointConstraint_setPivotB_1=function(){return(yx=b._emscripten_bind_btPoint2PointConstraint_setPivotB_1=b.asm.ev).apply(null,arguments)},zx=b._emscripten_bind_btPoint2PointConstraint_getPivotInA_0=function(){return(zx=b._emscripten_bind_btPoint2PointConstraint_getPivotInA_0=\nb.asm.fv).apply(null,arguments)},Ax=b._emscripten_bind_btPoint2PointConstraint_getPivotInB_0=function(){return(Ax=b._emscripten_bind_btPoint2PointConstraint_getPivotInB_0=b.asm.gv).apply(null,arguments)},Bx=b._emscripten_bind_btPoint2PointConstraint_enableFeedback_1=function(){return(Bx=b._emscripten_bind_btPoint2PointConstraint_enableFeedback_1=b.asm.hv).apply(null,arguments)},Cx=b._emscripten_bind_btPoint2PointConstraint_getBreakingImpulseThreshold_0=function(){return(Cx=b._emscripten_bind_btPoint2PointConstraint_getBreakingImpulseThreshold_0=\nb.asm.iv).apply(null,arguments)},Dx=b._emscripten_bind_btPoint2PointConstraint_setBreakingImpulseThreshold_1=function(){return(Dx=b._emscripten_bind_btPoint2PointConstraint_setBreakingImpulseThreshold_1=b.asm.jv).apply(null,arguments)},Ex=b._emscripten_bind_btPoint2PointConstraint_getParam_2=function(){return(Ex=b._emscripten_bind_btPoint2PointConstraint_getParam_2=b.asm.kv).apply(null,arguments)},Fx=b._emscripten_bind_btPoint2PointConstraint_setParam_3=function(){return(Fx=b._emscripten_bind_btPoint2PointConstraint_setParam_3=\nb.asm.lv).apply(null,arguments)},Gx=b._emscripten_bind_btPoint2PointConstraint_get_m_setting_0=function(){return(Gx=b._emscripten_bind_btPoint2PointConstraint_get_m_setting_0=b.asm.mv).apply(null,arguments)},Hx=b._emscripten_bind_btPoint2PointConstraint_set_m_setting_1=function(){return(Hx=b._emscripten_bind_btPoint2PointConstraint_set_m_setting_1=b.asm.nv).apply(null,arguments)},Ix=b._emscripten_bind_btPoint2PointConstraint___destroy___0=function(){return(Ix=b._emscripten_bind_btPoint2PointConstraint___destroy___0=\nb.asm.ov).apply(null,arguments)},Jx=b._emscripten_bind_btSoftBodyHelpers_btSoftBodyHelpers_0=function(){return(Jx=b._emscripten_bind_btSoftBodyHelpers_btSoftBodyHelpers_0=b.asm.pv).apply(null,arguments)},Kx=b._emscripten_bind_btSoftBodyHelpers_CreateRope_5=function(){return(Kx=b._emscripten_bind_btSoftBodyHelpers_CreateRope_5=b.asm.qv).apply(null,arguments)},Lx=b._emscripten_bind_btSoftBodyHelpers_CreatePatch_9=function(){return(Lx=b._emscripten_bind_btSoftBodyHelpers_CreatePatch_9=b.asm.rv).apply(null,\narguments)},Mx=b._emscripten_bind_btSoftBodyHelpers_CreatePatchUV_10=function(){return(Mx=b._emscripten_bind_btSoftBodyHelpers_CreatePatchUV_10=b.asm.sv).apply(null,arguments)},Nx=b._emscripten_bind_btSoftBodyHelpers_CreateEllipsoid_4=function(){return(Nx=b._emscripten_bind_btSoftBodyHelpers_CreateEllipsoid_4=b.asm.tv).apply(null,arguments)},Ox=b._emscripten_bind_btSoftBodyHelpers_CreateFromTriMesh_5=function(){return(Ox=b._emscripten_bind_btSoftBodyHelpers_CreateFromTriMesh_5=b.asm.uv).apply(null,\narguments)},Px=b._emscripten_bind_btSoftBodyHelpers_CreateFromConvexHull_4=function(){return(Px=b._emscripten_bind_btSoftBodyHelpers_CreateFromConvexHull_4=b.asm.vv).apply(null,arguments)},Qx=b._emscripten_bind_btSoftBodyHelpers___destroy___0=function(){return(Qx=b._emscripten_bind_btSoftBodyHelpers___destroy___0=b.asm.wv).apply(null,arguments)},Rx=b._emscripten_bind_btBroadphaseProxy_get_m_collisionFilterGroup_0=function(){return(Rx=b._emscripten_bind_btBroadphaseProxy_get_m_collisionFilterGroup_0=\nb.asm.xv).apply(null,arguments)},Sx=b._emscripten_bind_btBroadphaseProxy_set_m_collisionFilterGroup_1=function(){return(Sx=b._emscripten_bind_btBroadphaseProxy_set_m_collisionFilterGroup_1=b.asm.yv).apply(null,arguments)},Tx=b._emscripten_bind_btBroadphaseProxy_get_m_collisionFilterMask_0=function(){return(Tx=b._emscripten_bind_btBroadphaseProxy_get_m_collisionFilterMask_0=b.asm.zv).apply(null,arguments)},Ux=b._emscripten_bind_btBroadphaseProxy_set_m_collisionFilterMask_1=function(){return(Ux=b._emscripten_bind_btBroadphaseProxy_set_m_collisionFilterMask_1=\nb.asm.Av).apply(null,arguments)},Vx=b._emscripten_bind_btBroadphaseProxy___destroy___0=function(){return(Vx=b._emscripten_bind_btBroadphaseProxy___destroy___0=b.asm.Bv).apply(null,arguments)},Wx=b._emscripten_bind_tNodeArray_size_0=function(){return(Wx=b._emscripten_bind_tNodeArray_size_0=b.asm.Cv).apply(null,arguments)},Xx=b._emscripten_bind_tNodeArray_at_1=function(){return(Xx=b._emscripten_bind_tNodeArray_at_1=b.asm.Dv).apply(null,arguments)},Yx=b._emscripten_bind_tNodeArray___destroy___0=function(){return(Yx=\nb._emscripten_bind_tNodeArray___destroy___0=b.asm.Ev).apply(null,arguments)},Zx=b._emscripten_bind_btBoxShape_btBoxShape_1=function(){return(Zx=b._emscripten_bind_btBoxShape_btBoxShape_1=b.asm.Fv).apply(null,arguments)},$x=b._emscripten_bind_btBoxShape_setMargin_1=function(){return($x=b._emscripten_bind_btBoxShape_setMargin_1=b.asm.Gv).apply(null,arguments)},ay=b._emscripten_bind_btBoxShape_getMargin_0=function(){return(ay=b._emscripten_bind_btBoxShape_getMargin_0=b.asm.Hv).apply(null,arguments)},\nby=b._emscripten_bind_btBoxShape_setLocalScaling_1=function(){return(by=b._emscripten_bind_btBoxShape_setLocalScaling_1=b.asm.Iv).apply(null,arguments)},cy=b._emscripten_bind_btBoxShape_getLocalScaling_0=function(){return(cy=b._emscripten_bind_btBoxShape_getLocalScaling_0=b.asm.Jv).apply(null,arguments)},dy=b._emscripten_bind_btBoxShape_calculateLocalInertia_2=function(){return(dy=b._emscripten_bind_btBoxShape_calculateLocalInertia_2=b.asm.Kv).apply(null,arguments)},ey=b._emscripten_bind_btBoxShape___destroy___0=\nfunction(){return(ey=b._emscripten_bind_btBoxShape___destroy___0=b.asm.Lv).apply(null,arguments)},fy=b._emscripten_bind_btFace_get_m_indices_0=function(){return(fy=b._emscripten_bind_btFace_get_m_indices_0=b.asm.Mv).apply(null,arguments)},gy=b._emscripten_bind_btFace_set_m_indices_1=function(){return(gy=b._emscripten_bind_btFace_set_m_indices_1=b.asm.Nv).apply(null,arguments)},hy=b._emscripten_bind_btFace_get_m_plane_1=function(){return(hy=b._emscripten_bind_btFace_get_m_plane_1=b.asm.Ov).apply(null,\narguments)},iy=b._emscripten_bind_btFace_set_m_plane_2=function(){return(iy=b._emscripten_bind_btFace_set_m_plane_2=b.asm.Pv).apply(null,arguments)},jy=b._emscripten_bind_btFace___destroy___0=function(){return(jy=b._emscripten_bind_btFace___destroy___0=b.asm.Qv).apply(null,arguments)},ky=b._emscripten_bind_DebugDrawer_DebugDrawer_0=function(){return(ky=b._emscripten_bind_DebugDrawer_DebugDrawer_0=b.asm.Rv).apply(null,arguments)},ly=b._emscripten_bind_DebugDrawer_drawLine_3=function(){return(ly=b._emscripten_bind_DebugDrawer_drawLine_3=\nb.asm.Sv).apply(null,arguments)},my=b._emscripten_bind_DebugDrawer_drawContactPoint_5=function(){return(my=b._emscripten_bind_DebugDrawer_drawContactPoint_5=b.asm.Tv).apply(null,arguments)},ny=b._emscripten_bind_DebugDrawer_reportErrorWarning_1=function(){return(ny=b._emscripten_bind_DebugDrawer_reportErrorWarning_1=b.asm.Uv).apply(null,arguments)},oy=b._emscripten_bind_DebugDrawer_draw3dText_2=function(){return(oy=b._emscripten_bind_DebugDrawer_draw3dText_2=b.asm.Vv).apply(null,arguments)},py=b._emscripten_bind_DebugDrawer_setDebugMode_1=\nfunction(){return(py=b._emscripten_bind_DebugDrawer_setDebugMode_1=b.asm.Wv).apply(null,arguments)},qy=b._emscripten_bind_DebugDrawer_getDebugMode_0=function(){return(qy=b._emscripten_bind_DebugDrawer_getDebugMode_0=b.asm.Xv).apply(null,arguments)},ry=b._emscripten_bind_DebugDrawer___destroy___0=function(){return(ry=b._emscripten_bind_DebugDrawer___destroy___0=b.asm.Yv).apply(null,arguments)},sy=b._emscripten_bind_btCapsuleShapeX_btCapsuleShapeX_2=function(){return(sy=b._emscripten_bind_btCapsuleShapeX_btCapsuleShapeX_2=\nb.asm.Zv).apply(null,arguments)},ty=b._emscripten_bind_btCapsuleShapeX_setMargin_1=function(){return(ty=b._emscripten_bind_btCapsuleShapeX_setMargin_1=b.asm._v).apply(null,arguments)},uy=b._emscripten_bind_btCapsuleShapeX_getMargin_0=function(){return(uy=b._emscripten_bind_btCapsuleShapeX_getMargin_0=b.asm.$v).apply(null,arguments)},vy=b._emscripten_bind_btCapsuleShapeX_getUpAxis_0=function(){return(vy=b._emscripten_bind_btCapsuleShapeX_getUpAxis_0=b.asm.aw).apply(null,arguments)},wy=b._emscripten_bind_btCapsuleShapeX_getRadius_0=\nfunction(){return(wy=b._emscripten_bind_btCapsuleShapeX_getRadius_0=b.asm.bw).apply(null,arguments)},xy=b._emscripten_bind_btCapsuleShapeX_getHalfHeight_0=function(){return(xy=b._emscripten_bind_btCapsuleShapeX_getHalfHeight_0=b.asm.cw).apply(null,arguments)},yy=b._emscripten_bind_btCapsuleShapeX_setLocalScaling_1=function(){return(yy=b._emscripten_bind_btCapsuleShapeX_setLocalScaling_1=b.asm.dw).apply(null,arguments)},zy=b._emscripten_bind_btCapsuleShapeX_getLocalScaling_0=function(){return(zy=b._emscripten_bind_btCapsuleShapeX_getLocalScaling_0=\nb.asm.ew).apply(null,arguments)},Ay=b._emscripten_bind_btCapsuleShapeX_calculateLocalInertia_2=function(){return(Ay=b._emscripten_bind_btCapsuleShapeX_calculateLocalInertia_2=b.asm.fw).apply(null,arguments)},By=b._emscripten_bind_btCapsuleShapeX___destroy___0=function(){return(By=b._emscripten_bind_btCapsuleShapeX___destroy___0=b.asm.gw).apply(null,arguments)},Cy=b._emscripten_bind_btQuaternion_btQuaternion_4=function(){return(Cy=b._emscripten_bind_btQuaternion_btQuaternion_4=b.asm.hw).apply(null,\narguments)},Dy=b._emscripten_bind_btQuaternion_setValue_4=function(){return(Dy=b._emscripten_bind_btQuaternion_setValue_4=b.asm.iw).apply(null,arguments)},Ey=b._emscripten_bind_btQuaternion_setEulerZYX_3=function(){return(Ey=b._emscripten_bind_btQuaternion_setEulerZYX_3=b.asm.jw).apply(null,arguments)},Fy=b._emscripten_bind_btQuaternion_setRotation_2=function(){return(Fy=b._emscripten_bind_btQuaternion_setRotation_2=b.asm.kw).apply(null,arguments)},Gy=b._emscripten_bind_btQuaternion_normalize_0=function(){return(Gy=\nb._emscripten_bind_btQuaternion_normalize_0=b.asm.lw).apply(null,arguments)},Hy=b._emscripten_bind_btQuaternion_length2_0=function(){return(Hy=b._emscripten_bind_btQuaternion_length2_0=b.asm.mw).apply(null,arguments)},Iy=b._emscripten_bind_btQuaternion_length_0=function(){return(Iy=b._emscripten_bind_btQuaternion_length_0=b.asm.nw).apply(null,arguments)},Jy=b._emscripten_bind_btQuaternion_dot_1=function(){return(Jy=b._emscripten_bind_btQuaternion_dot_1=b.asm.ow).apply(null,arguments)},Ky=b._emscripten_bind_btQuaternion_normalized_0=\nfunction(){return(Ky=b._emscripten_bind_btQuaternion_normalized_0=b.asm.pw).apply(null,arguments)},Ly=b._emscripten_bind_btQuaternion_getAxis_0=function(){return(Ly=b._emscripten_bind_btQuaternion_getAxis_0=b.asm.qw).apply(null,arguments)},My=b._emscripten_bind_btQuaternion_inverse_0=function(){return(My=b._emscripten_bind_btQuaternion_inverse_0=b.asm.rw).apply(null,arguments)},Ny=b._emscripten_bind_btQuaternion_getAngle_0=function(){return(Ny=b._emscripten_bind_btQuaternion_getAngle_0=b.asm.sw).apply(null,\narguments)},Oy=b._emscripten_bind_btQuaternion_getAngleShortestPath_0=function(){return(Oy=b._emscripten_bind_btQuaternion_getAngleShortestPath_0=b.asm.tw).apply(null,arguments)},Py=b._emscripten_bind_btQuaternion_angle_1=function(){return(Py=b._emscripten_bind_btQuaternion_angle_1=b.asm.uw).apply(null,arguments)},Qy=b._emscripten_bind_btQuaternion_angleShortestPath_1=function(){return(Qy=b._emscripten_bind_btQuaternion_angleShortestPath_1=b.asm.vw).apply(null,arguments)},Ry=b._emscripten_bind_btQuaternion_op_add_1=\nfunction(){return(Ry=b._emscripten_bind_btQuaternion_op_add_1=b.asm.ww).apply(null,arguments)},Sy=b._emscripten_bind_btQuaternion_op_sub_1=function(){return(Sy=b._emscripten_bind_btQuaternion_op_sub_1=b.asm.xw).apply(null,arguments)},Ty=b._emscripten_bind_btQuaternion_op_mul_1=function(){return(Ty=b._emscripten_bind_btQuaternion_op_mul_1=b.asm.yw).apply(null,arguments)},Uy=b._emscripten_bind_btQuaternion_op_mulq_1=function(){return(Uy=b._emscripten_bind_btQuaternion_op_mulq_1=b.asm.zw).apply(null,\narguments)},Vy=b._emscripten_bind_btQuaternion_op_div_1=function(){return(Vy=b._emscripten_bind_btQuaternion_op_div_1=b.asm.Aw).apply(null,arguments)},Wy=b._emscripten_bind_btQuaternion_x_0=function(){return(Wy=b._emscripten_bind_btQuaternion_x_0=b.asm.Bw).apply(null,arguments)},Xy=b._emscripten_bind_btQuaternion_y_0=function(){return(Xy=b._emscripten_bind_btQuaternion_y_0=b.asm.Cw).apply(null,arguments)},Yy=b._emscripten_bind_btQuaternion_z_0=function(){return(Yy=b._emscripten_bind_btQuaternion_z_0=\nb.asm.Dw).apply(null,arguments)},Zy=b._emscripten_bind_btQuaternion_w_0=function(){return(Zy=b._emscripten_bind_btQuaternion_w_0=b.asm.Ew).apply(null,arguments)},$y=b._emscripten_bind_btQuaternion_setX_1=function(){return($y=b._emscripten_bind_btQuaternion_setX_1=b.asm.Fw).apply(null,arguments)},az=b._emscripten_bind_btQuaternion_setY_1=function(){return(az=b._emscripten_bind_btQuaternion_setY_1=b.asm.Gw).apply(null,arguments)},bz=b._emscripten_bind_btQuaternion_setZ_1=function(){return(bz=b._emscripten_bind_btQuaternion_setZ_1=\nb.asm.Hw).apply(null,arguments)},cz=b._emscripten_bind_btQuaternion_setW_1=function(){return(cz=b._emscripten_bind_btQuaternion_setW_1=b.asm.Iw).apply(null,arguments)},dz=b._emscripten_bind_btQuaternion___destroy___0=function(){return(dz=b._emscripten_bind_btQuaternion___destroy___0=b.asm.Jw).apply(null,arguments)},ez=b._emscripten_bind_btCapsuleShapeZ_btCapsuleShapeZ_2=function(){return(ez=b._emscripten_bind_btCapsuleShapeZ_btCapsuleShapeZ_2=b.asm.Kw).apply(null,arguments)},fz=b._emscripten_bind_btCapsuleShapeZ_setMargin_1=\nfunction(){return(fz=b._emscripten_bind_btCapsuleShapeZ_setMargin_1=b.asm.Lw).apply(null,arguments)},gz=b._emscripten_bind_btCapsuleShapeZ_getMargin_0=function(){return(gz=b._emscripten_bind_btCapsuleShapeZ_getMargin_0=b.asm.Mw).apply(null,arguments)},hz=b._emscripten_bind_btCapsuleShapeZ_getUpAxis_0=function(){return(hz=b._emscripten_bind_btCapsuleShapeZ_getUpAxis_0=b.asm.Nw).apply(null,arguments)},iz=b._emscripten_bind_btCapsuleShapeZ_getRadius_0=function(){return(iz=b._emscripten_bind_btCapsuleShapeZ_getRadius_0=\nb.asm.Ow).apply(null,arguments)},jz=b._emscripten_bind_btCapsuleShapeZ_getHalfHeight_0=function(){return(jz=b._emscripten_bind_btCapsuleShapeZ_getHalfHeight_0=b.asm.Pw).apply(null,arguments)},kz=b._emscripten_bind_btCapsuleShapeZ_setLocalScaling_1=function(){return(kz=b._emscripten_bind_btCapsuleShapeZ_setLocalScaling_1=b.asm.Qw).apply(null,arguments)},lz=b._emscripten_bind_btCapsuleShapeZ_getLocalScaling_0=function(){return(lz=b._emscripten_bind_btCapsuleShapeZ_getLocalScaling_0=b.asm.Rw).apply(null,\narguments)},mz=b._emscripten_bind_btCapsuleShapeZ_calculateLocalInertia_2=function(){return(mz=b._emscripten_bind_btCapsuleShapeZ_calculateLocalInertia_2=b.asm.Sw).apply(null,arguments)},nz=b._emscripten_bind_btCapsuleShapeZ___destroy___0=function(){return(nz=b._emscripten_bind_btCapsuleShapeZ___destroy___0=b.asm.Tw).apply(null,arguments)},oz=b._emscripten_bind_btContactSolverInfo_get_m_splitImpulse_0=function(){return(oz=b._emscripten_bind_btContactSolverInfo_get_m_splitImpulse_0=b.asm.Uw).apply(null,\narguments)},pz=b._emscripten_bind_btContactSolverInfo_set_m_splitImpulse_1=function(){return(pz=b._emscripten_bind_btContactSolverInfo_set_m_splitImpulse_1=b.asm.Vw).apply(null,arguments)},qz=b._emscripten_bind_btContactSolverInfo_get_m_splitImpulsePenetrationThreshold_0=function(){return(qz=b._emscripten_bind_btContactSolverInfo_get_m_splitImpulsePenetrationThreshold_0=b.asm.Ww).apply(null,arguments)},rz=b._emscripten_bind_btContactSolverInfo_set_m_splitImpulsePenetrationThreshold_1=function(){return(rz=\nb._emscripten_bind_btContactSolverInfo_set_m_splitImpulsePenetrationThreshold_1=b.asm.Xw).apply(null,arguments)},sz=b._emscripten_bind_btContactSolverInfo_get_m_numIterations_0=function(){return(sz=b._emscripten_bind_btContactSolverInfo_get_m_numIterations_0=b.asm.Yw).apply(null,arguments)},tz=b._emscripten_bind_btContactSolverInfo_set_m_numIterations_1=function(){return(tz=b._emscripten_bind_btContactSolverInfo_set_m_numIterations_1=b.asm.Zw).apply(null,arguments)},uz=b._emscripten_bind_btContactSolverInfo___destroy___0=\nfunction(){return(uz=b._emscripten_bind_btContactSolverInfo___destroy___0=b.asm._w).apply(null,arguments)},vz=b._emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_3=function(){return(vz=b._emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_3=b.asm.$w).apply(null,arguments)},wz=b._emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_5=function(){return(wz=b._emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_5=\nb.asm.ax).apply(null,arguments)},xz=b._emscripten_bind_btGeneric6DofSpringConstraint_enableSpring_2=function(){return(xz=b._emscripten_bind_btGeneric6DofSpringConstraint_enableSpring_2=b.asm.bx).apply(null,arguments)},yz=b._emscripten_bind_btGeneric6DofSpringConstraint_setStiffness_2=function(){return(yz=b._emscripten_bind_btGeneric6DofSpringConstraint_setStiffness_2=b.asm.cx).apply(null,arguments)},zz=b._emscripten_bind_btGeneric6DofSpringConstraint_setDamping_2=function(){return(zz=b._emscripten_bind_btGeneric6DofSpringConstraint_setDamping_2=\nb.asm.dx).apply(null,arguments)},Az=b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_0=function(){return(Az=b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_0=b.asm.ex).apply(null,arguments)},Bz=b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_1=function(){return(Bz=b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_1=b.asm.fx).apply(null,arguments)},Cz=b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_2=\nfunction(){return(Cz=b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_2=b.asm.gx).apply(null,arguments)},Dz=b._emscripten_bind_btGeneric6DofSpringConstraint_setLinearLowerLimit_1=function(){return(Dz=b._emscripten_bind_btGeneric6DofSpringConstraint_setLinearLowerLimit_1=b.asm.hx).apply(null,arguments)},Ez=b._emscripten_bind_btGeneric6DofSpringConstraint_setLinearUpperLimit_1=function(){return(Ez=b._emscripten_bind_btGeneric6DofSpringConstraint_setLinearUpperLimit_1=b.asm.ix).apply(null,\narguments)},Fz=b._emscripten_bind_btGeneric6DofSpringConstraint_setAngularLowerLimit_1=function(){return(Fz=b._emscripten_bind_btGeneric6DofSpringConstraint_setAngularLowerLimit_1=b.asm.jx).apply(null,arguments)},Gz=b._emscripten_bind_btGeneric6DofSpringConstraint_setAngularUpperLimit_1=function(){return(Gz=b._emscripten_bind_btGeneric6DofSpringConstraint_setAngularUpperLimit_1=b.asm.kx).apply(null,arguments)},Hz=b._emscripten_bind_btGeneric6DofSpringConstraint_getFrameOffsetA_0=function(){return(Hz=\nb._emscripten_bind_btGeneric6DofSpringConstraint_getFrameOffsetA_0=b.asm.lx).apply(null,arguments)},Iz=b._emscripten_bind_btGeneric6DofSpringConstraint_enableFeedback_1=function(){return(Iz=b._emscripten_bind_btGeneric6DofSpringConstraint_enableFeedback_1=b.asm.mx).apply(null,arguments)},Jz=b._emscripten_bind_btGeneric6DofSpringConstraint_getBreakingImpulseThreshold_0=function(){return(Jz=b._emscripten_bind_btGeneric6DofSpringConstraint_getBreakingImpulseThreshold_0=b.asm.nx).apply(null,arguments)},\nKz=b._emscripten_bind_btGeneric6DofSpringConstraint_setBreakingImpulseThreshold_1=function(){return(Kz=b._emscripten_bind_btGeneric6DofSpringConstraint_setBreakingImpulseThreshold_1=b.asm.ox).apply(null,arguments)},Lz=b._emscripten_bind_btGeneric6DofSpringConstraint_getParam_2=function(){return(Lz=b._emscripten_bind_btGeneric6DofSpringConstraint_getParam_2=b.asm.px).apply(null,arguments)},Mz=b._emscripten_bind_btGeneric6DofSpringConstraint_setParam_3=function(){return(Mz=b._emscripten_bind_btGeneric6DofSpringConstraint_setParam_3=\nb.asm.qx).apply(null,arguments)},Nz=b._emscripten_bind_btGeneric6DofSpringConstraint___destroy___0=function(){return(Nz=b._emscripten_bind_btGeneric6DofSpringConstraint___destroy___0=b.asm.rx).apply(null,arguments)},Oz=b._emscripten_bind_btSphereShape_btSphereShape_1=function(){return(Oz=b._emscripten_bind_btSphereShape_btSphereShape_1=b.asm.sx).apply(null,arguments)},Pz=b._emscripten_bind_btSphereShape_setMargin_1=function(){return(Pz=b._emscripten_bind_btSphereShape_setMargin_1=b.asm.tx).apply(null,\narguments)},Qz=b._emscripten_bind_btSphereShape_getMargin_0=function(){return(Qz=b._emscripten_bind_btSphereShape_getMargin_0=b.asm.ux).apply(null,arguments)},Rz=b._emscripten_bind_btSphereShape_setLocalScaling_1=function(){return(Rz=b._emscripten_bind_btSphereShape_setLocalScaling_1=b.asm.vx).apply(null,arguments)},Sz=b._emscripten_bind_btSphereShape_getLocalScaling_0=function(){return(Sz=b._emscripten_bind_btSphereShape_getLocalScaling_0=b.asm.wx).apply(null,arguments)},Tz=b._emscripten_bind_btSphereShape_calculateLocalInertia_2=\nfunction(){return(Tz=b._emscripten_bind_btSphereShape_calculateLocalInertia_2=b.asm.xx).apply(null,arguments)},Uz=b._emscripten_bind_btSphereShape___destroy___0=function(){return(Uz=b._emscripten_bind_btSphereShape___destroy___0=b.asm.yx).apply(null,arguments)},Vz=b._emscripten_bind_Face_get_m_n_1=function(){return(Vz=b._emscripten_bind_Face_get_m_n_1=b.asm.zx).apply(null,arguments)},Wz=b._emscripten_bind_Face_set_m_n_2=function(){return(Wz=b._emscripten_bind_Face_set_m_n_2=b.asm.Ax).apply(null,arguments)},\nXz=b._emscripten_bind_Face_get_m_normal_0=function(){return(Xz=b._emscripten_bind_Face_get_m_normal_0=b.asm.Bx).apply(null,arguments)},Yz=b._emscripten_bind_Face_set_m_normal_1=function(){return(Yz=b._emscripten_bind_Face_set_m_normal_1=b.asm.Cx).apply(null,arguments)},Zz=b._emscripten_bind_Face_get_m_ra_0=function(){return(Zz=b._emscripten_bind_Face_get_m_ra_0=b.asm.Dx).apply(null,arguments)},$z=b._emscripten_bind_Face_set_m_ra_1=function(){return($z=b._emscripten_bind_Face_set_m_ra_1=b.asm.Ex).apply(null,\narguments)},aA=b._emscripten_bind_Face___destroy___0=function(){return(aA=b._emscripten_bind_Face___destroy___0=b.asm.Fx).apply(null,arguments)},bA=b._emscripten_bind_tFaceArray_size_0=function(){return(bA=b._emscripten_bind_tFaceArray_size_0=b.asm.Gx).apply(null,arguments)},cA=b._emscripten_bind_tFaceArray_at_1=function(){return(cA=b._emscripten_bind_tFaceArray_at_1=b.asm.Hx).apply(null,arguments)},dA=b._emscripten_bind_tFaceArray___destroy___0=function(){return(dA=b._emscripten_bind_tFaceArray___destroy___0=\nb.asm.Ix).apply(null,arguments)},eA=b._emscripten_bind_LocalConvexResult_LocalConvexResult_5=function(){return(eA=b._emscripten_bind_LocalConvexResult_LocalConvexResult_5=b.asm.Jx).apply(null,arguments)},fA=b._emscripten_bind_LocalConvexResult_get_m_hitCollisionObject_0=function(){return(fA=b._emscripten_bind_LocalConvexResult_get_m_hitCollisionObject_0=b.asm.Kx).apply(null,arguments)},gA=b._emscripten_bind_LocalConvexResult_set_m_hitCollisionObject_1=function(){return(gA=b._emscripten_bind_LocalConvexResult_set_m_hitCollisionObject_1=\nb.asm.Lx).apply(null,arguments)},hA=b._emscripten_bind_LocalConvexResult_get_m_localShapeInfo_0=function(){return(hA=b._emscripten_bind_LocalConvexResult_get_m_localShapeInfo_0=b.asm.Mx).apply(null,arguments)},iA=b._emscripten_bind_LocalConvexResult_set_m_localShapeInfo_1=function(){return(iA=b._emscripten_bind_LocalConvexResult_set_m_localShapeInfo_1=b.asm.Nx).apply(null,arguments)},jA=b._emscripten_bind_LocalConvexResult_get_m_hitNormalLocal_0=function(){return(jA=b._emscripten_bind_LocalConvexResult_get_m_hitNormalLocal_0=\nb.asm.Ox).apply(null,arguments)},kA=b._emscripten_bind_LocalConvexResult_set_m_hitNormalLocal_1=function(){return(kA=b._emscripten_bind_LocalConvexResult_set_m_hitNormalLocal_1=b.asm.Px).apply(null,arguments)},lA=b._emscripten_bind_LocalConvexResult_get_m_hitPointLocal_0=function(){return(lA=b._emscripten_bind_LocalConvexResult_get_m_hitPointLocal_0=b.asm.Qx).apply(null,arguments)},mA=b._emscripten_bind_LocalConvexResult_set_m_hitPointLocal_1=function(){return(mA=b._emscripten_bind_LocalConvexResult_set_m_hitPointLocal_1=\nb.asm.Rx).apply(null,arguments)},nA=b._emscripten_bind_LocalConvexResult_get_m_hitFraction_0=function(){return(nA=b._emscripten_bind_LocalConvexResult_get_m_hitFraction_0=b.asm.Sx).apply(null,arguments)},oA=b._emscripten_bind_LocalConvexResult_set_m_hitFraction_1=function(){return(oA=b._emscripten_bind_LocalConvexResult_set_m_hitFraction_1=b.asm.Tx).apply(null,arguments)},pA=b._emscripten_bind_LocalConvexResult___destroy___0=function(){return(pA=b._emscripten_bind_LocalConvexResult___destroy___0=\nb.asm.Ux).apply(null,arguments)},qA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_ERP=function(){return(qA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_ERP=b.asm.Vx).apply(null,arguments)},rA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_ERP=function(){return(rA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_ERP=b.asm.Wx).apply(null,arguments)},sA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_CFM=function(){return(sA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_CFM=\nb.asm.Xx).apply(null,arguments)},tA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_CFM=function(){return(tA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_CFM=b.asm.Yx).apply(null,arguments)},uA=b._emscripten_enum_PHY_ScalarType_PHY_FLOAT=function(){return(uA=b._emscripten_enum_PHY_ScalarType_PHY_FLOAT=b.asm.Zx).apply(null,arguments)},vA=b._emscripten_enum_PHY_ScalarType_PHY_DOUBLE=function(){return(vA=b._emscripten_enum_PHY_ScalarType_PHY_DOUBLE=b.asm._x).apply(null,arguments)},\nwA=b._emscripten_enum_PHY_ScalarType_PHY_INTEGER=function(){return(wA=b._emscripten_enum_PHY_ScalarType_PHY_INTEGER=b.asm.$x).apply(null,arguments)},xA=b._emscripten_enum_PHY_ScalarType_PHY_SHORT=function(){return(xA=b._emscripten_enum_PHY_ScalarType_PHY_SHORT=b.asm.ay).apply(null,arguments)},yA=b._emscripten_enum_PHY_ScalarType_PHY_FIXEDPOINT88=function(){return(yA=b._emscripten_enum_PHY_ScalarType_PHY_FIXEDPOINT88=b.asm.by).apply(null,arguments)},zA=b._emscripten_enum_PHY_ScalarType_PHY_UCHAR=function(){return(zA=\nb._emscripten_enum_PHY_ScalarType_PHY_UCHAR=b.asm.cy).apply(null,arguments)};b._malloc=function(){return(b._malloc=b.asm.dy).apply(null,arguments)};b._free=function(){return(b._free=b.asm.ey).apply(null,arguments)};b.dynCall_vi=function(){return(b.dynCall_vi=b.asm.fy).apply(null,arguments)};b.dynCall_v=function(){return(b.dynCall_v=b.asm.gy).apply(null,arguments)};\nb.UTF8ToString=function(a,c){if(a){var d=a+c;for(c=a;za[c]&&!(c>=d);)++c;if(16<c-a&&za.subarray&&wa)a=wa.decode(za.subarray(a,c));else{for(d=\"\";a<c;){var e=za[a++];if(e&128){var g=za[a++]&63;if(192==(e&224))d+=String.fromCharCode((e&31)<<6|g);else{var n=za[a++]&63;e=224==(e&240)?(e&15)<<12|g<<6|n:(e&7)<<18|g<<12|n<<6|za[a++]&63;65536>e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}a=d}}else a=\"\";return a};var AA;\nOa=function BA(){AA||CA();AA||(Oa=BA)};\nfunction CA(){function a(){if(!AA&&(AA=!0,b.calledRun=!0,!va)){Ka=!0;Fa(Ha);Fa(Ia);ba(b);if(b.onRuntimeInitialized)b.onRuntimeInitialized();if(b.postRun)for(\"function\"==typeof b.postRun&&(b.postRun=[b.postRun]);b.postRun.length;){var c=b.postRun.shift();Ja.unshift(c)}Fa(Ja)}}if(!(0<Ma)){if(b.preRun)for(\"function\"==typeof b.preRun&&(b.preRun=[b.preRun]);b.preRun.length;)La();Fa(Ga);0<Ma||(b.setStatus?(b.setStatus(\"Running...\"),setTimeout(function(){setTimeout(function(){b.setStatus(\"\")},1);a()},1)):\na())}}b.run=CA;if(b.preInit)for(\"function\"==typeof b.preInit&&(b.preInit=[b.preInit]);0<b.preInit.length;)b.preInit.pop()();noExitRuntime=!0;CA();function f(){}f.prototype=Object.create(f.prototype);f.prototype.constructor=f;f.prototype.iy=f;f.jy={};b.WrapperObject=f;function h(a){return(a||f).jy}b.getCache=h;function k(a,c){var d=h(c),e=d[a];if(e)return e;e=Object.create((c||f).prototype);e.hy=a;return d[a]=e}b.wrapPointer=k;b.castObject=function(a,c){return k(a.hy,c)};b.NULL=k(0);\nb.destroy=function(a){if(!a.__destroy__)throw\"Error: Cannot destroy object. (Did you create it yourself?)\";a.__destroy__();delete h(a.iy)[a.hy]};b.compare=function(a,c){return a.hy===c.hy};b.getPointer=function(a){return a.hy};b.getClass=function(a){return a.iy};var DA=0,EA=0,FA=0,GA=[],HA=0;function IA(){if(HA){for(var a=0;a<GA.length;a++)b._free(GA[a]);GA.length=0;b._free(DA);DA=0;EA+=HA;HA=0}DA||(EA+=128,DA=b._malloc(EA),assert(DA));FA=0}\nfunction JA(a,c){assert(DA);a=a.length*c.BYTES_PER_ELEMENT;a=a+7&-8;FA+a>=EA?(assert(0<a),HA+=a,c=b._malloc(a),GA.push(c)):(c=DA+FA,FA+=a);return c}function KA(a,c,d){d>>>=0;switch(c.BYTES_PER_ELEMENT){case 2:d>>>=1;break;case 4:d>>>=2;break;case 8:d>>>=3}for(var e=0;e<a.length;e++)c[d+e]=a[e]}\nfunction LA(a){if(\"string\"===typeof a){for(var c=0,d=0;d<a.length;++d){var e=a.charCodeAt(d);55296<=e&&57343>=e&&(e=65536+((e&1023)<<10)|a.charCodeAt(++d)&1023);127>=e?++c:c=2047>=e?c+2:65535>=e?c+3:c+4}c=Array(c+1);e=c.length;d=0;if(0<e){e=d+e-1;for(var g=0;g<a.length;++g){var n=a.charCodeAt(g);if(55296<=n&&57343>=n){var F=a.charCodeAt(++g);n=65536+((n&1023)<<10)|F&1023}if(127>=n){if(d>=e)break;c[d++]=n}else{if(2047>=n){if(d+1>=e)break;c[d++]=192|n>>6}else{if(65535>=n){if(d+2>=e)break;c[d++]=224|\nn>>12}else{if(d+3>=e)break;c[d++]=240|n>>18;c[d++]=128|n>>12&63}c[d++]=128|n>>6&63}c[d++]=128|n&63}}c[d]=0}a=JA(c,ya);KA(c,ya,a)}return a}function MA(a){if(\"object\"===typeof a){var c=JA(a,Ba);KA(a,Ba,c);return c}return a}function NA(){throw\"cannot construct a btCollisionWorld, no constructor in IDL\";}NA.prototype=Object.create(f.prototype);NA.prototype.constructor=NA;NA.prototype.iy=NA;NA.jy={};b.btCollisionWorld=NA;NA.prototype.getDispatcher=function(){return k($a(this.hy),OA)};\nNA.prototype.rayTest=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);ab(e,a,c,d)};NA.prototype.getPairCache=function(){return k(bb(this.hy),PA)};NA.prototype.getDispatchInfo=function(){return k(cb(this.hy),l)};\nNA.prototype.addCollisionObject=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);void 0===c?db(e,a):void 0===d?eb(e,a,c):fb(e,a,c,d)};NA.prototype.removeCollisionObject=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);gb(c,a)};NA.prototype.getBroadphase=function(){return k(hb(this.hy),QA)};\nNA.prototype.convexSweepTest=function(a,c,d,e,g){var n=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);g&&\"object\"===typeof g&&(g=g.hy);ib(n,a,c,d,e,g)};NA.prototype.contactPairTest=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);jb(e,a,c,d)};\nNA.prototype.contactTest=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);kb(d,a,c)};NA.prototype.updateSingleAabb=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);lb(c,a)};NA.prototype.setDebugDrawer=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);mb(c,a)};NA.prototype.getDebugDrawer=function(){return k(nb(this.hy),RA)};NA.prototype.debugDrawWorld=function(){ob(this.hy)};\nNA.prototype.debugDrawObject=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);pb(e,a,c,d)};NA.prototype.__destroy__=function(){qb(this.hy)};function m(){throw\"cannot construct a btCollisionShape, no constructor in IDL\";}m.prototype=Object.create(f.prototype);m.prototype.constructor=m;m.prototype.iy=m;m.jy={};b.btCollisionShape=m;\nm.prototype.setLocalScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);rb(c,a)};m.prototype.getLocalScaling=function(){return k(sb(this.hy),p)};m.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);tb(d,a,c)};m.prototype.setMargin=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ub(c,a)};m.prototype.getMargin=function(){return vb(this.hy)};m.prototype.__destroy__=function(){wb(this.hy)};\nfunction q(){throw\"cannot construct a btCollisionObject, no constructor in IDL\";}q.prototype=Object.create(f.prototype);q.prototype.constructor=q;q.prototype.iy=q;q.jy={};b.btCollisionObject=q;q.prototype.setAnisotropicFriction=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);xb(d,a,c)};q.prototype.getCollisionShape=function(){return k(yb(this.hy),m)};\nq.prototype.setContactProcessingThreshold=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);zb(c,a)};q.prototype.setActivationState=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ab(c,a)};q.prototype.forceActivationState=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Bb(c,a)};q.prototype.activate=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);void 0===a?Cb(c):Db(c,a)};q.prototype.isActive=function(){return!!Eb(this.hy)};q.prototype.isKinematicObject=function(){return!!Fb(this.hy)};\nq.prototype.isStaticObject=function(){return!!Gb(this.hy)};q.prototype.isStaticOrKinematicObject=function(){return!!Hb(this.hy)};q.prototype.getRestitution=function(){return Ib(this.hy)};q.prototype.getFriction=function(){return Jb(this.hy)};q.prototype.getRollingFriction=function(){return Kb(this.hy)};q.prototype.setRestitution=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Lb(c,a)};q.prototype.setFriction=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Mb(c,a)};\nq.prototype.setRollingFriction=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Nb(c,a)};q.prototype.getWorldTransform=function(){return k(Ob(this.hy),r)};q.prototype.getCollisionFlags=function(){return Pb(this.hy)};q.prototype.setCollisionFlags=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Qb(c,a)};q.prototype.setWorldTransform=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Sb(c,a)};\nq.prototype.setCollisionShape=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Tb(c,a)};q.prototype.setCcdMotionThreshold=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ub(c,a)};q.prototype.setCcdSweptSphereRadius=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Vb(c,a)};q.prototype.getUserIndex=function(){return Wb(this.hy)};q.prototype.setUserIndex=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Xb(c,a)};\nq.prototype.getUserPointer=function(){return k(Yb(this.hy),SA)};q.prototype.setUserPointer=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Zb(c,a)};q.prototype.getBroadphaseHandle=function(){return k($b(this.hy),t)};q.prototype.__destroy__=function(){ac(this.hy)};function u(){throw\"cannot construct a btDynamicsWorld, no constructor in IDL\";}u.prototype=Object.create(NA.prototype);u.prototype.constructor=u;u.prototype.iy=u;u.jy={};b.btDynamicsWorld=u;\nu.prototype.addAction=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);bc(c,a)};u.prototype.removeAction=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);cc(c,a)};u.prototype.getSolverInfo=function(){return k(dc(this.hy),v)};u.prototype.setInternalTickCallback=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);void 0===c?ec(e,a):void 0===d?fc(e,a,c):hc(e,a,c,d)};\nu.prototype.getDispatcher=function(){return k(ic(this.hy),OA)};u.prototype.rayTest=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);jc(e,a,c,d)};u.prototype.getPairCache=function(){return k(kc(this.hy),PA)};u.prototype.getDispatchInfo=function(){return k(lc(this.hy),l)};\nu.prototype.addCollisionObject=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);void 0===c?mc(e,a):void 0===d?nc(e,a,c):oc(e,a,c,d)};u.prototype.removeCollisionObject=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);pc(c,a)};u.prototype.getBroadphase=function(){return k(qc(this.hy),QA)};\nu.prototype.convexSweepTest=function(a,c,d,e,g){var n=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);g&&\"object\"===typeof g&&(g=g.hy);rc(n,a,c,d,e,g)};u.prototype.contactPairTest=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);sc(e,a,c,d)};\nu.prototype.contactTest=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);tc(d,a,c)};u.prototype.updateSingleAabb=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);uc(c,a)};u.prototype.setDebugDrawer=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);vc(c,a)};u.prototype.getDebugDrawer=function(){return k(wc(this.hy),RA)};u.prototype.debugDrawWorld=function(){xc(this.hy)};\nu.prototype.debugDrawObject=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);yc(e,a,c,d)};u.prototype.__destroy__=function(){zc(this.hy)};function TA(){throw\"cannot construct a btTypedConstraint, no constructor in IDL\";}TA.prototype=Object.create(f.prototype);TA.prototype.constructor=TA;TA.prototype.iy=TA;TA.jy={};b.btTypedConstraint=TA;\nTA.prototype.enableFeedback=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ac(c,a)};TA.prototype.getBreakingImpulseThreshold=function(){return Bc(this.hy)};TA.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Cc(c,a)};TA.prototype.getParam=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);return Dc(d,a,c)};\nTA.prototype.setParam=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);Ec(e,a,c,d)};TA.prototype.__destroy__=function(){Fc(this.hy)};function UA(){throw\"cannot construct a btConcaveShape, no constructor in IDL\";}UA.prototype=Object.create(m.prototype);UA.prototype.constructor=UA;UA.prototype.iy=UA;UA.jy={};b.btConcaveShape=UA;\nUA.prototype.setLocalScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Gc(c,a)};UA.prototype.getLocalScaling=function(){return k(Hc(this.hy),p)};UA.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Ic(d,a,c)};UA.prototype.__destroy__=function(){Jc(this.hy)};function VA(a,c){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);this.hy=Kc(a,c);h(VA)[this.hy]=this}VA.prototype=Object.create(m.prototype);\nVA.prototype.constructor=VA;VA.prototype.iy=VA;VA.jy={};b.btCapsuleShape=VA;VA.prototype.setMargin=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Lc(c,a)};VA.prototype.getMargin=function(){return Mc(this.hy)};VA.prototype.getUpAxis=function(){return Nc(this.hy)};VA.prototype.getRadius=function(){return Oc(this.hy)};VA.prototype.getHalfHeight=function(){return Pc(this.hy)};VA.prototype.setLocalScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Qc(c,a)};\nVA.prototype.getLocalScaling=function(){return k(Rc(this.hy),p)};VA.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Sc(d,a,c)};VA.prototype.__destroy__=function(){Tc(this.hy)};function RA(){throw\"cannot construct a btIDebugDraw, no constructor in IDL\";}RA.prototype=Object.create(f.prototype);RA.prototype.constructor=RA;RA.prototype.iy=RA;RA.jy={};b.btIDebugDraw=RA;\nRA.prototype.drawLine=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);Uc(e,a,c,d)};RA.prototype.drawContactPoint=function(a,c,d,e,g){var n=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);g&&\"object\"===typeof g&&(g=g.hy);Vc(n,a,c,d,e,g)};\nRA.prototype.reportErrorWarning=function(a){var c=this.hy;IA();a=a&&\"object\"===typeof a?a.hy:LA(a);Wc(c,a)};RA.prototype.draw3dText=function(a,c){var d=this.hy;IA();a&&\"object\"===typeof a&&(a=a.hy);c=c&&\"object\"===typeof c?c.hy:LA(c);Xc(d,a,c)};RA.prototype.setDebugMode=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Yc(c,a)};RA.prototype.getDebugMode=function(){return Zc(this.hy)};RA.prototype.__destroy__=function(){$c(this.hy)};\nfunction WA(a){a&&\"object\"===typeof a&&(a=a.hy);this.hy=void 0===a?ad():bd(a);h(WA)[this.hy]=this}WA.prototype=Object.create(f.prototype);WA.prototype.constructor=WA;WA.prototype.iy=WA;WA.jy={};b.btDefaultCollisionConfiguration=WA;WA.prototype.__destroy__=function(){cd(this.hy)};function XA(){throw\"cannot construct a btTriangleMeshShape, no constructor in IDL\";}XA.prototype=Object.create(UA.prototype);XA.prototype.constructor=XA;XA.prototype.iy=XA;XA.jy={};b.btTriangleMeshShape=XA;\nXA.prototype.setLocalScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);dd(c,a)};XA.prototype.getLocalScaling=function(){return k(ed(this.hy),p)};XA.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);fd(d,a,c)};XA.prototype.__destroy__=function(){gd(this.hy)};function w(){this.hy=hd();h(w)[this.hy]=this}w.prototype=Object.create(q.prototype);w.prototype.constructor=w;w.prototype.iy=w;w.jy={};\nb.btGhostObject=w;w.prototype.getNumOverlappingObjects=function(){return id(this.hy)};w.prototype.getOverlappingObject=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(jd(c,a),q)};w.prototype.setAnisotropicFriction=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);kd(d,a,c)};w.prototype.getCollisionShape=function(){return k(ld(this.hy),m)};\nw.prototype.setContactProcessingThreshold=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);md(c,a)};w.prototype.setActivationState=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);nd(c,a)};w.prototype.forceActivationState=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);od(c,a)};w.prototype.activate=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);void 0===a?pd(c):qd(c,a)};w.prototype.isActive=function(){return!!rd(this.hy)};w.prototype.isKinematicObject=function(){return!!sd(this.hy)};\nw.prototype.isStaticObject=function(){return!!td(this.hy)};w.prototype.isStaticOrKinematicObject=function(){return!!ud(this.hy)};w.prototype.getRestitution=function(){return vd(this.hy)};w.prototype.getFriction=function(){return wd(this.hy)};w.prototype.getRollingFriction=function(){return xd(this.hy)};w.prototype.setRestitution=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);yd(c,a)};w.prototype.setFriction=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);zd(c,a)};\nw.prototype.setRollingFriction=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ad(c,a)};w.prototype.getWorldTransform=function(){return k(Bd(this.hy),r)};w.prototype.getCollisionFlags=function(){return Cd(this.hy)};w.prototype.setCollisionFlags=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Dd(c,a)};w.prototype.setWorldTransform=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ed(c,a)};\nw.prototype.setCollisionShape=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Fd(c,a)};w.prototype.setCcdMotionThreshold=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Gd(c,a)};w.prototype.setCcdSweptSphereRadius=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Hd(c,a)};w.prototype.getUserIndex=function(){return Id(this.hy)};w.prototype.setUserIndex=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Jd(c,a)};\nw.prototype.getUserPointer=function(){return k(Kd(this.hy),SA)};w.prototype.setUserPointer=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ld(c,a)};w.prototype.getBroadphaseHandle=function(){return k(Md(this.hy),t)};w.prototype.__destroy__=function(){Nd(this.hy)};function YA(a,c){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);this.hy=Od(a,c);h(YA)[this.hy]=this}YA.prototype=Object.create(m.prototype);YA.prototype.constructor=YA;YA.prototype.iy=YA;YA.jy={};\nb.btConeShape=YA;YA.prototype.setLocalScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Pd(c,a)};YA.prototype.getLocalScaling=function(){return k(Qd(this.hy),p)};YA.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Rd(d,a,c)};YA.prototype.__destroy__=function(){Sd(this.hy)};function ZA(){throw\"cannot construct a btActionInterface, no constructor in IDL\";}ZA.prototype=Object.create(f.prototype);\nZA.prototype.constructor=ZA;ZA.prototype.iy=ZA;ZA.jy={};b.btActionInterface=ZA;ZA.prototype.updateAction=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Td(d,a,c)};ZA.prototype.__destroy__=function(){Ud(this.hy)};\nfunction p(a,c,d){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);this.hy=void 0===a?Vd():void 0===c?_emscripten_bind_btVector3_btVector3_1(a):void 0===d?_emscripten_bind_btVector3_btVector3_2(a,c):Wd(a,c,d);h(p)[this.hy]=this}p.prototype=Object.create(f.prototype);p.prototype.constructor=p;p.prototype.iy=p;p.jy={};b.btVector3=p;p.prototype.length=p.prototype.length=function(){return Xd(this.hy)};p.prototype.x=p.prototype.x=function(){return Yd(this.hy)};\np.prototype.y=p.prototype.y=function(){return Zd(this.hy)};p.prototype.z=p.prototype.z=function(){return $d(this.hy)};p.prototype.setX=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ae(c,a)};p.prototype.setY=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);be(c,a)};p.prototype.setZ=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ce(c,a)};\np.prototype.setValue=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);de(e,a,c,d)};p.prototype.normalize=p.prototype.normalize=function(){ee(this.hy)};p.prototype.rotate=p.prototype.rotate=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);return k(fe(d,a,c),p)};p.prototype.dot=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return ge(c,a)};\np.prototype.op_mul=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(he(c,a),p)};p.prototype.op_add=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(ie(c,a),p)};p.prototype.op_sub=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(je(c,a),p)};p.prototype.__destroy__=function(){ke(this.hy)};function $A(){throw\"cannot construct a btVehicleRaycaster, no constructor in IDL\";}$A.prototype=Object.create(f.prototype);$A.prototype.constructor=$A;\n$A.prototype.iy=$A;$A.jy={};b.btVehicleRaycaster=$A;$A.prototype.castRay=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);le(e,a,c,d)};$A.prototype.__destroy__=function(){me(this.hy)};function aB(){throw\"cannot construct a btQuadWord, no constructor in IDL\";}aB.prototype=Object.create(f.prototype);aB.prototype.constructor=aB;aB.prototype.iy=aB;aB.jy={};b.btQuadWord=aB;aB.prototype.x=aB.prototype.x=function(){return ne(this.hy)};\naB.prototype.y=aB.prototype.y=function(){return oe(this.hy)};aB.prototype.z=aB.prototype.z=function(){return pe(this.hy)};aB.prototype.w=function(){return qe(this.hy)};aB.prototype.setX=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);re(c,a)};aB.prototype.setY=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);se(c,a)};aB.prototype.setZ=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);te(c,a)};\naB.prototype.setW=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ue(c,a)};aB.prototype.__destroy__=function(){ve(this.hy)};function bB(a){a&&\"object\"===typeof a&&(a=a.hy);this.hy=we(a);h(bB)[this.hy]=this}bB.prototype=Object.create(m.prototype);bB.prototype.constructor=bB;bB.prototype.iy=bB;bB.jy={};b.btCylinderShape=bB;bB.prototype.setMargin=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);xe(c,a)};bB.prototype.getMargin=function(){return ye(this.hy)};\nbB.prototype.setLocalScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ze(c,a)};bB.prototype.getLocalScaling=function(){return k(Ae(this.hy),p)};bB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Be(d,a,c)};bB.prototype.__destroy__=function(){Ce(this.hy)};\nfunction x(a,c,d,e){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);this.hy=De(a,c,d,e);h(x)[this.hy]=this}x.prototype=Object.create(u.prototype);x.prototype.constructor=x;x.prototype.iy=x;x.jy={};b.btDiscreteDynamicsWorld=x;x.prototype.setGravity=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ee(c,a)};x.prototype.getGravity=function(){return k(Fe(this.hy),p)};\nx.prototype.addRigidBody=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);void 0===c?Ge(e,a):void 0===d?_emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_2(e,a,c):He(e,a,c,d)};x.prototype.removeRigidBody=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ie(c,a)};\nx.prototype.addConstraint=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);void 0===c?Je(d,a):Ke(d,a,c)};x.prototype.removeConstraint=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Le(c,a)};x.prototype.stepSimulation=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);return void 0===c?Me(e,a):void 0===d?Ne(e,a,c):Oe(e,a,c,d)};\nx.prototype.setContactAddedCallback=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Pe(c,a)};x.prototype.setContactProcessedCallback=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Qe(c,a)};x.prototype.setContactDestroyedCallback=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Re(c,a)};x.prototype.getDispatcher=function(){return k(Se(this.hy),OA)};\nx.prototype.rayTest=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);Te(e,a,c,d)};x.prototype.getPairCache=function(){return k(Ue(this.hy),PA)};x.prototype.getDispatchInfo=function(){return k(Ve(this.hy),l)};x.prototype.addCollisionObject=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);void 0===c?We(e,a):void 0===d?Xe(e,a,c):Ye(e,a,c,d)};\nx.prototype.removeCollisionObject=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ze(c,a)};x.prototype.getBroadphase=function(){return k($e(this.hy),QA)};x.prototype.convexSweepTest=function(a,c,d,e,g){var n=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);g&&\"object\"===typeof g&&(g=g.hy);af(n,a,c,d,e,g)};\nx.prototype.contactPairTest=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);bf(e,a,c,d)};x.prototype.contactTest=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);cf(d,a,c)};x.prototype.updateSingleAabb=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);df(c,a)};x.prototype.setDebugDrawer=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ef(c,a)};\nx.prototype.getDebugDrawer=function(){return k(ff(this.hy),RA)};x.prototype.debugDrawWorld=function(){gf(this.hy)};x.prototype.debugDrawObject=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);hf(e,a,c,d)};x.prototype.addAction=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);jf(c,a)};x.prototype.removeAction=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);kf(c,a)};\nx.prototype.getSolverInfo=function(){return k(lf(this.hy),v)};x.prototype.setInternalTickCallback=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);void 0===c?mf(e,a):void 0===d?nf(e,a,c):of(e,a,c,d)};x.prototype.__destroy__=function(){pf(this.hy)};function cB(){throw\"cannot construct a btConvexShape, no constructor in IDL\";}cB.prototype=Object.create(m.prototype);cB.prototype.constructor=cB;cB.prototype.iy=cB;cB.jy={};\nb.btConvexShape=cB;cB.prototype.setLocalScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);qf(c,a)};cB.prototype.getLocalScaling=function(){return k(rf(this.hy),p)};cB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);sf(d,a,c)};cB.prototype.setMargin=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);tf(c,a)};cB.prototype.getMargin=function(){return uf(this.hy)};cB.prototype.__destroy__=function(){vf(this.hy)};\nfunction OA(){throw\"cannot construct a btDispatcher, no constructor in IDL\";}OA.prototype=Object.create(f.prototype);OA.prototype.constructor=OA;OA.prototype.iy=OA;OA.jy={};b.btDispatcher=OA;OA.prototype.getNumManifolds=function(){return wf(this.hy)};OA.prototype.getManifoldByIndexInternal=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(xf(c,a),dB)};OA.prototype.__destroy__=function(){yf(this.hy)};\nfunction eB(a,c,d,e,g){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);g&&\"object\"===typeof g&&(g=g.hy);this.hy=void 0===e?zf(a,c,d):void 0===g?_emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_4(a,c,d,e):Af(a,c,d,e,g);h(eB)[this.hy]=this}eB.prototype=Object.create(TA.prototype);eB.prototype.constructor=eB;eB.prototype.iy=eB;eB.jy={};b.btGeneric6DofConstraint=eB;\neB.prototype.setLinearLowerLimit=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Bf(c,a)};eB.prototype.setLinearUpperLimit=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Cf(c,a)};eB.prototype.setAngularLowerLimit=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Df(c,a)};eB.prototype.setAngularUpperLimit=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ef(c,a)};eB.prototype.getFrameOffsetA=function(){return k(Ff(this.hy),r)};\neB.prototype.enableFeedback=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Gf(c,a)};eB.prototype.getBreakingImpulseThreshold=function(){return Hf(this.hy)};eB.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);If(c,a)};eB.prototype.getParam=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);return Jf(d,a,c)};\neB.prototype.setParam=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);Kf(e,a,c,d)};eB.prototype.__destroy__=function(){Lf(this.hy)};function fB(){throw\"cannot construct a btStridingMeshInterface, no constructor in IDL\";}fB.prototype=Object.create(f.prototype);fB.prototype.constructor=fB;fB.prototype.iy=fB;fB.jy={};b.btStridingMeshInterface=fB;\nfB.prototype.setScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Mf(c,a)};fB.prototype.__destroy__=function(){Nf(this.hy)};function gB(){throw\"cannot construct a btMotionState, no constructor in IDL\";}gB.prototype=Object.create(f.prototype);gB.prototype.constructor=gB;gB.prototype.iy=gB;gB.jy={};b.btMotionState=gB;gB.prototype.getWorldTransform=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Of(c,a)};\ngB.prototype.setWorldTransform=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Pf(c,a)};gB.prototype.__destroy__=function(){Qf(this.hy)};function y(){throw\"cannot construct a ConvexResultCallback, no constructor in IDL\";}y.prototype=Object.create(f.prototype);y.prototype.constructor=y;y.prototype.iy=y;y.jy={};b.ConvexResultCallback=y;y.prototype.hasHit=function(){return!!Rf(this.hy)};y.prototype.get_m_collisionFilterGroup=y.prototype.ky=function(){return Sf(this.hy)};\ny.prototype.set_m_collisionFilterGroup=y.prototype.my=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Tf(c,a)};Object.defineProperty(y.prototype,\"m_collisionFilterGroup\",{get:y.prototype.ky,set:y.prototype.my});y.prototype.get_m_collisionFilterMask=y.prototype.ly=function(){return Uf(this.hy)};y.prototype.set_m_collisionFilterMask=y.prototype.ny=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Vf(c,a)};\nObject.defineProperty(y.prototype,\"m_collisionFilterMask\",{get:y.prototype.ly,set:y.prototype.ny});y.prototype.get_m_closestHitFraction=y.prototype.oy=function(){return Wf(this.hy)};y.prototype.set_m_closestHitFraction=y.prototype.py=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Xf(c,a)};Object.defineProperty(y.prototype,\"m_closestHitFraction\",{get:y.prototype.oy,set:y.prototype.py});y.prototype.__destroy__=function(){Yf(this.hy)};\nfunction hB(){throw\"cannot construct a ContactResultCallback, no constructor in IDL\";}hB.prototype=Object.create(f.prototype);hB.prototype.constructor=hB;hB.prototype.iy=hB;hB.jy={};b.ContactResultCallback=hB;\nhB.prototype.addSingleResult=function(a,c,d,e,g,n,F){var aa=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);g&&\"object\"===typeof g&&(g=g.hy);n&&\"object\"===typeof n&&(n=n.hy);F&&\"object\"===typeof F&&(F=F.hy);return Zf(aa,a,c,d,e,g,n,F)};hB.prototype.__destroy__=function(){$f(this.hy)};function iB(){throw\"cannot construct a btSoftBodySolver, no constructor in IDL\";}iB.prototype=Object.create(f.prototype);\niB.prototype.constructor=iB;iB.prototype.iy=iB;iB.jy={};b.btSoftBodySolver=iB;iB.prototype.__destroy__=function(){ag(this.hy)};function z(){throw\"cannot construct a RayResultCallback, no constructor in IDL\";}z.prototype=Object.create(f.prototype);z.prototype.constructor=z;z.prototype.iy=z;z.jy={};b.RayResultCallback=z;z.prototype.hasHit=function(){return!!bg(this.hy)};z.prototype.get_m_collisionFilterGroup=z.prototype.ky=function(){return cg(this.hy)};\nz.prototype.set_m_collisionFilterGroup=z.prototype.my=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);dg(c,a)};Object.defineProperty(z.prototype,\"m_collisionFilterGroup\",{get:z.prototype.ky,set:z.prototype.my});z.prototype.get_m_collisionFilterMask=z.prototype.ly=function(){return eg(this.hy)};z.prototype.set_m_collisionFilterMask=z.prototype.ny=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);fg(c,a)};\nObject.defineProperty(z.prototype,\"m_collisionFilterMask\",{get:z.prototype.ly,set:z.prototype.ny});z.prototype.get_m_closestHitFraction=z.prototype.oy=function(){return gg(this.hy)};z.prototype.set_m_closestHitFraction=z.prototype.py=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);hg(c,a)};Object.defineProperty(z.prototype,\"m_closestHitFraction\",{get:z.prototype.oy,set:z.prototype.py});z.prototype.get_m_collisionObject=z.prototype.qy=function(){return k(ig(this.hy),q)};\nz.prototype.set_m_collisionObject=z.prototype.xy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);jg(c,a)};Object.defineProperty(z.prototype,\"m_collisionObject\",{get:z.prototype.qy,set:z.prototype.xy});z.prototype.__destroy__=function(){kg(this.hy)};function jB(){throw\"cannot construct a btMatrix3x3, no constructor in IDL\";}jB.prototype=Object.create(f.prototype);jB.prototype.constructor=jB;jB.prototype.iy=jB;jB.jy={};b.btMatrix3x3=jB;\njB.prototype.setEulerZYX=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);lg(e,a,c,d)};jB.prototype.getRotation=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);mg(c,a)};jB.prototype.getRow=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(ng(c,a),p)};jB.prototype.__destroy__=function(){og(this.hy)};function kB(){throw\"cannot construct a btScalarArray, no constructor in IDL\";}kB.prototype=Object.create(f.prototype);\nkB.prototype.constructor=kB;kB.prototype.iy=kB;kB.jy={};b.btScalarArray=kB;kB.prototype.size=kB.prototype.size=function(){return pg(this.hy)};kB.prototype.at=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return qg(c,a)};kB.prototype.__destroy__=function(){rg(this.hy)};function A(){throw\"cannot construct a Material, no constructor in IDL\";}A.prototype=Object.create(f.prototype);A.prototype.constructor=A;A.prototype.iy=A;A.jy={};b.Material=A;A.prototype.get_m_kLST=A.prototype.vA=function(){return sg(this.hy)};\nA.prototype.set_m_kLST=A.prototype.bD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);tg(c,a)};Object.defineProperty(A.prototype,\"m_kLST\",{get:A.prototype.vA,set:A.prototype.bD});A.prototype.get_m_kAST=A.prototype.uA=function(){return ug(this.hy)};A.prototype.set_m_kAST=A.prototype.aD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);vg(c,a)};Object.defineProperty(A.prototype,\"m_kAST\",{get:A.prototype.uA,set:A.prototype.aD});A.prototype.get_m_kVST=A.prototype.wA=function(){return wg(this.hy)};\nA.prototype.set_m_kVST=A.prototype.cD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);xg(c,a)};Object.defineProperty(A.prototype,\"m_kVST\",{get:A.prototype.wA,set:A.prototype.cD});A.prototype.get_m_flags=A.prototype.cA=function(){return yg(this.hy)};A.prototype.set_m_flags=A.prototype.JC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);zg(c,a)};Object.defineProperty(A.prototype,\"m_flags\",{get:A.prototype.cA,set:A.prototype.JC});A.prototype.__destroy__=function(){Ag(this.hy)};\nfunction l(){throw\"cannot construct a btDispatcherInfo, no constructor in IDL\";}l.prototype=Object.create(f.prototype);l.prototype.constructor=l;l.prototype.iy=l;l.jy={};b.btDispatcherInfo=l;l.prototype.get_m_timeStep=l.prototype.jB=function(){return Bg(this.hy)};l.prototype.set_m_timeStep=l.prototype.QD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Cg(c,a)};Object.defineProperty(l.prototype,\"m_timeStep\",{get:l.prototype.jB,set:l.prototype.QD});\nl.prototype.get_m_stepCount=l.prototype.aB=function(){return Dg(this.hy)};l.prototype.set_m_stepCount=l.prototype.HD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Eg(c,a)};Object.defineProperty(l.prototype,\"m_stepCount\",{get:l.prototype.aB,set:l.prototype.HD});l.prototype.get_m_dispatchFunc=l.prototype.Wz=function(){return Fg(this.hy)};l.prototype.set_m_dispatchFunc=l.prototype.CC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Gg(c,a)};\nObject.defineProperty(l.prototype,\"m_dispatchFunc\",{get:l.prototype.Wz,set:l.prototype.CC});l.prototype.get_m_timeOfImpact=l.prototype.iB=function(){return Hg(this.hy)};l.prototype.set_m_timeOfImpact=l.prototype.PD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ig(c,a)};Object.defineProperty(l.prototype,\"m_timeOfImpact\",{get:l.prototype.iB,set:l.prototype.PD});l.prototype.get_m_useContinuous=l.prototype.lB=function(){return!!Jg(this.hy)};\nl.prototype.set_m_useContinuous=l.prototype.SD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Kg(c,a)};Object.defineProperty(l.prototype,\"m_useContinuous\",{get:l.prototype.lB,set:l.prototype.SD});l.prototype.get_m_enableSatConvex=l.prototype.$z=function(){return!!Lg(this.hy)};l.prototype.set_m_enableSatConvex=l.prototype.GC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Mg(c,a)};Object.defineProperty(l.prototype,\"m_enableSatConvex\",{get:l.prototype.$z,set:l.prototype.GC});\nl.prototype.get_m_enableSPU=l.prototype.Zz=function(){return!!Ng(this.hy)};l.prototype.set_m_enableSPU=l.prototype.FC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Og(c,a)};Object.defineProperty(l.prototype,\"m_enableSPU\",{get:l.prototype.Zz,set:l.prototype.FC});l.prototype.get_m_useEpa=l.prototype.nB=function(){return!!Pg(this.hy)};l.prototype.set_m_useEpa=l.prototype.UD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Qg(c,a)};\nObject.defineProperty(l.prototype,\"m_useEpa\",{get:l.prototype.nB,set:l.prototype.UD});l.prototype.get_m_allowedCcdPenetration=l.prototype.zz=function(){return Rg(this.hy)};l.prototype.set_m_allowedCcdPenetration=l.prototype.fC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Sg(c,a)};Object.defineProperty(l.prototype,\"m_allowedCcdPenetration\",{get:l.prototype.zz,set:l.prototype.fC});l.prototype.get_m_useConvexConservativeDistanceUtil=l.prototype.mB=function(){return!!Tg(this.hy)};\nl.prototype.set_m_useConvexConservativeDistanceUtil=l.prototype.TD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ug(c,a)};Object.defineProperty(l.prototype,\"m_useConvexConservativeDistanceUtil\",{get:l.prototype.mB,set:l.prototype.TD});l.prototype.get_m_convexConservativeDistanceThreshold=l.prototype.Rz=function(){return Vg(this.hy)};l.prototype.set_m_convexConservativeDistanceThreshold=l.prototype.xC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Wg(c,a)};\nObject.defineProperty(l.prototype,\"m_convexConservativeDistanceThreshold\",{get:l.prototype.Rz,set:l.prototype.xC});l.prototype.__destroy__=function(){Xg(this.hy)};function B(){throw\"cannot construct a btWheelInfoConstructionInfo, no constructor in IDL\";}B.prototype=Object.create(f.prototype);B.prototype.constructor=B;B.prototype.iy=B;B.jy={};b.btWheelInfoConstructionInfo=B;B.prototype.get_m_chassisConnectionCS=B.prototype.Lz=function(){return k(Yg(this.hy),p)};\nB.prototype.set_m_chassisConnectionCS=B.prototype.rC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Zg(c,a)};Object.defineProperty(B.prototype,\"m_chassisConnectionCS\",{get:B.prototype.Lz,set:B.prototype.rC});B.prototype.get_m_wheelDirectionCS=B.prototype.Ly=function(){return k($g(this.hy),p)};B.prototype.set_m_wheelDirectionCS=B.prototype.Uy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ah(c,a)};Object.defineProperty(B.prototype,\"m_wheelDirectionCS\",{get:B.prototype.Ly,set:B.prototype.Uy});\nB.prototype.get_m_wheelAxleCS=B.prototype.Ky=function(){return k(bh(this.hy),p)};B.prototype.set_m_wheelAxleCS=B.prototype.Ty=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ch(c,a)};Object.defineProperty(B.prototype,\"m_wheelAxleCS\",{get:B.prototype.Ky,set:B.prototype.Ty});B.prototype.get_m_suspensionRestLength=B.prototype.fB=function(){return dh(this.hy)};B.prototype.set_m_suspensionRestLength=B.prototype.MD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);eh(c,a)};\nObject.defineProperty(B.prototype,\"m_suspensionRestLength\",{get:B.prototype.fB,set:B.prototype.MD});B.prototype.get_m_maxSuspensionTravelCm=B.prototype.vy=function(){return fh(this.hy)};B.prototype.set_m_maxSuspensionTravelCm=B.prototype.Cy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);gh(c,a)};Object.defineProperty(B.prototype,\"m_maxSuspensionTravelCm\",{get:B.prototype.vy,set:B.prototype.Cy});B.prototype.get_m_wheelRadius=B.prototype.tB=function(){return hh(this.hy)};\nB.prototype.set_m_wheelRadius=B.prototype.$D=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ih(c,a)};Object.defineProperty(B.prototype,\"m_wheelRadius\",{get:B.prototype.tB,set:B.prototype.$D});B.prototype.get_m_suspensionStiffness=B.prototype.wy=function(){return jh(this.hy)};B.prototype.set_m_suspensionStiffness=B.prototype.Dy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);kh(c,a)};Object.defineProperty(B.prototype,\"m_suspensionStiffness\",{get:B.prototype.wy,set:B.prototype.Dy});\nB.prototype.get_m_wheelsDampingCompression=B.prototype.My=function(){return lh(this.hy)};B.prototype.set_m_wheelsDampingCompression=B.prototype.Vy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);mh(c,a)};Object.defineProperty(B.prototype,\"m_wheelsDampingCompression\",{get:B.prototype.My,set:B.prototype.Vy});B.prototype.get_m_wheelsDampingRelaxation=B.prototype.Ny=function(){return nh(this.hy)};\nB.prototype.set_m_wheelsDampingRelaxation=B.prototype.Wy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);oh(c,a)};Object.defineProperty(B.prototype,\"m_wheelsDampingRelaxation\",{get:B.prototype.Ny,set:B.prototype.Wy});B.prototype.get_m_frictionSlip=B.prototype.ry=function(){return ph(this.hy)};B.prototype.set_m_frictionSlip=B.prototype.yy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);qh(c,a)};Object.defineProperty(B.prototype,\"m_frictionSlip\",{get:B.prototype.ry,set:B.prototype.yy});\nB.prototype.get_m_maxSuspensionForce=B.prototype.uy=function(){return rh(this.hy)};B.prototype.set_m_maxSuspensionForce=B.prototype.By=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);sh(c,a)};Object.defineProperty(B.prototype,\"m_maxSuspensionForce\",{get:B.prototype.uy,set:B.prototype.By});B.prototype.get_m_bIsFrontWheel=B.prototype.Fy=function(){return!!th(this.hy)};B.prototype.set_m_bIsFrontWheel=B.prototype.Oy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);uh(c,a)};\nObject.defineProperty(B.prototype,\"m_bIsFrontWheel\",{get:B.prototype.Fy,set:B.prototype.Oy});B.prototype.__destroy__=function(){vh(this.hy)};function lB(a,c){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);this.hy=void 0===c?wh(a):xh(a,c);h(lB)[this.hy]=this}lB.prototype=Object.create(cB.prototype);lB.prototype.constructor=lB;lB.prototype.iy=lB;lB.jy={};b.btConvexTriangleMeshShape=lB;lB.prototype.setLocalScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);yh(c,a)};\nlB.prototype.getLocalScaling=function(){return k(zh(this.hy),p)};lB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Ah(d,a,c)};lB.prototype.setMargin=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Bh(c,a)};lB.prototype.getMargin=function(){return Ch(this.hy)};lB.prototype.__destroy__=function(){Dh(this.hy)};function QA(){throw\"cannot construct a btBroadphaseInterface, no constructor in IDL\";}QA.prototype=Object.create(f.prototype);\nQA.prototype.constructor=QA;QA.prototype.iy=QA;QA.jy={};b.btBroadphaseInterface=QA;QA.prototype.getOverlappingPairCache=function(){return k(Eh(this.hy),PA)};QA.prototype.__destroy__=function(){Fh(this.hy)};function C(a,c,d,e){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);this.hy=void 0===e?Gh(a,c,d):Hh(a,c,d,e);h(C)[this.hy]=this}C.prototype=Object.create(f.prototype);C.prototype.constructor=C;C.prototype.iy=C;\nC.jy={};b.btRigidBodyConstructionInfo=C;C.prototype.get_m_linearDamping=C.prototype.xA=function(){return Ih(this.hy)};C.prototype.set_m_linearDamping=C.prototype.dD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Jh(c,a)};Object.defineProperty(C.prototype,\"m_linearDamping\",{get:C.prototype.xA,set:C.prototype.dD});C.prototype.get_m_angularDamping=C.prototype.Bz=function(){return Kh(this.hy)};\nC.prototype.set_m_angularDamping=C.prototype.hC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Lh(c,a)};Object.defineProperty(C.prototype,\"m_angularDamping\",{get:C.prototype.Bz,set:C.prototype.hC});C.prototype.get_m_friction=C.prototype.dA=function(){return Mh(this.hy)};C.prototype.set_m_friction=C.prototype.KC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Nh(c,a)};Object.defineProperty(C.prototype,\"m_friction\",{get:C.prototype.dA,set:C.prototype.KC});\nC.prototype.get_m_rollingFriction=C.prototype.TA=function(){return Oh(this.hy)};C.prototype.set_m_rollingFriction=C.prototype.zD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ph(c,a)};Object.defineProperty(C.prototype,\"m_rollingFriction\",{get:C.prototype.TA,set:C.prototype.zD});C.prototype.get_m_restitution=C.prototype.RA=function(){return Qh(this.hy)};C.prototype.set_m_restitution=C.prototype.xD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Rh(c,a)};\nObject.defineProperty(C.prototype,\"m_restitution\",{get:C.prototype.RA,set:C.prototype.xD});C.prototype.get_m_linearSleepingThreshold=C.prototype.yA=function(){return Sh(this.hy)};C.prototype.set_m_linearSleepingThreshold=C.prototype.eD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Th(c,a)};Object.defineProperty(C.prototype,\"m_linearSleepingThreshold\",{get:C.prototype.yA,set:C.prototype.eD});C.prototype.get_m_angularSleepingThreshold=C.prototype.Cz=function(){return Uh(this.hy)};\nC.prototype.set_m_angularSleepingThreshold=C.prototype.iC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Vh(c,a)};Object.defineProperty(C.prototype,\"m_angularSleepingThreshold\",{get:C.prototype.Cz,set:C.prototype.iC});C.prototype.get_m_additionalDamping=C.prototype.wz=function(){return!!Wh(this.hy)};C.prototype.set_m_additionalDamping=C.prototype.cC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Xh(c,a)};\nObject.defineProperty(C.prototype,\"m_additionalDamping\",{get:C.prototype.wz,set:C.prototype.cC});C.prototype.get_m_additionalDampingFactor=C.prototype.xz=function(){return Yh(this.hy)};C.prototype.set_m_additionalDampingFactor=C.prototype.dC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Zh(c,a)};Object.defineProperty(C.prototype,\"m_additionalDampingFactor\",{get:C.prototype.xz,set:C.prototype.dC});C.prototype.get_m_additionalLinearDampingThresholdSqr=C.prototype.yz=function(){return $h(this.hy)};\nC.prototype.set_m_additionalLinearDampingThresholdSqr=C.prototype.eC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ai(c,a)};Object.defineProperty(C.prototype,\"m_additionalLinearDampingThresholdSqr\",{get:C.prototype.yz,set:C.prototype.eC});C.prototype.get_m_additionalAngularDampingThresholdSqr=C.prototype.vz=function(){return bi(this.hy)};C.prototype.set_m_additionalAngularDampingThresholdSqr=C.prototype.bC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ci(c,a)};\nObject.defineProperty(C.prototype,\"m_additionalAngularDampingThresholdSqr\",{get:C.prototype.vz,set:C.prototype.bC});C.prototype.get_m_additionalAngularDampingFactor=C.prototype.uz=function(){return di(this.hy)};C.prototype.set_m_additionalAngularDampingFactor=C.prototype.aC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ei(c,a)};Object.defineProperty(C.prototype,\"m_additionalAngularDampingFactor\",{get:C.prototype.uz,set:C.prototype.aC});C.prototype.__destroy__=function(){fi(this.hy)};\nfunction mB(){throw\"cannot construct a btCollisionConfiguration, no constructor in IDL\";}mB.prototype=Object.create(f.prototype);mB.prototype.constructor=mB;mB.prototype.iy=mB;mB.jy={};b.btCollisionConfiguration=mB;mB.prototype.__destroy__=function(){gi(this.hy)};function dB(){this.hy=hi();h(dB)[this.hy]=this}dB.prototype=Object.create(f.prototype);dB.prototype.constructor=dB;dB.prototype.iy=dB;dB.jy={};b.btPersistentManifold=dB;dB.prototype.getBody0=function(){return k(ii(this.hy),q)};\ndB.prototype.getBody1=function(){return k(ji(this.hy),q)};dB.prototype.getNumContacts=function(){return ki(this.hy)};dB.prototype.getContactPoint=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(li(c,a),D)};dB.prototype.__destroy__=function(){mi(this.hy)};function nB(a){a&&\"object\"===typeof a&&(a=a.hy);this.hy=void 0===a?ni():oi(a);h(nB)[this.hy]=this}nB.prototype=Object.create(m.prototype);nB.prototype.constructor=nB;nB.prototype.iy=nB;nB.jy={};b.btCompoundShape=nB;\nnB.prototype.addChildShape=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);pi(d,a,c)};nB.prototype.removeChildShape=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);qi(c,a)};nB.prototype.removeChildShapeByIndex=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ri(c,a)};nB.prototype.getNumChildShapes=function(){return si(this.hy)};nB.prototype.getChildShape=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(ti(c,a),m)};\nnB.prototype.updateChildTransform=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);void 0===d?ui(e,a,c):vi(e,a,c,d)};nB.prototype.setMargin=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);wi(c,a)};nB.prototype.getMargin=function(){return xi(this.hy)};nB.prototype.setLocalScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);yi(c,a)};nB.prototype.getLocalScaling=function(){return k(zi(this.hy),p)};\nnB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Ai(d,a,c)};nB.prototype.__destroy__=function(){Bi(this.hy)};function E(a,c){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);this.hy=Ci(a,c);h(E)[this.hy]=this}E.prototype=Object.create(y.prototype);E.prototype.constructor=E;E.prototype.iy=E;E.jy={};b.ClosestConvexResultCallback=E;E.prototype.hasHit=function(){return!!Di(this.hy)};\nE.prototype.get_m_convexFromWorld=E.prototype.Sz=function(){return k(Ei(this.hy),p)};E.prototype.set_m_convexFromWorld=E.prototype.yC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Fi(c,a)};Object.defineProperty(E.prototype,\"m_convexFromWorld\",{get:E.prototype.Sz,set:E.prototype.yC});E.prototype.get_m_convexToWorld=E.prototype.Tz=function(){return k(Gi(this.hy),p)};E.prototype.set_m_convexToWorld=E.prototype.zC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Hi(c,a)};\nObject.defineProperty(E.prototype,\"m_convexToWorld\",{get:E.prototype.Tz,set:E.prototype.zC});E.prototype.get_m_hitNormalWorld=E.prototype.sy=function(){return k(Ii(this.hy),p)};E.prototype.set_m_hitNormalWorld=E.prototype.zy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ji(c,a)};Object.defineProperty(E.prototype,\"m_hitNormalWorld\",{get:E.prototype.sy,set:E.prototype.zy});E.prototype.get_m_hitPointWorld=E.prototype.ty=function(){return k(Ki(this.hy),p)};\nE.prototype.set_m_hitPointWorld=E.prototype.Ay=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Li(c,a)};Object.defineProperty(E.prototype,\"m_hitPointWorld\",{get:E.prototype.ty,set:E.prototype.Ay});E.prototype.get_m_collisionFilterGroup=E.prototype.ky=function(){return Mi(this.hy)};E.prototype.set_m_collisionFilterGroup=E.prototype.my=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ni(c,a)};Object.defineProperty(E.prototype,\"m_collisionFilterGroup\",{get:E.prototype.ky,set:E.prototype.my});\nE.prototype.get_m_collisionFilterMask=E.prototype.ly=function(){return Oi(this.hy)};E.prototype.set_m_collisionFilterMask=E.prototype.ny=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Pi(c,a)};Object.defineProperty(E.prototype,\"m_collisionFilterMask\",{get:E.prototype.ly,set:E.prototype.ny});E.prototype.get_m_closestHitFraction=E.prototype.oy=function(){return Qi(this.hy)};\nE.prototype.set_m_closestHitFraction=E.prototype.py=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ri(c,a)};Object.defineProperty(E.prototype,\"m_closestHitFraction\",{get:E.prototype.oy,set:E.prototype.py});E.prototype.__destroy__=function(){Si(this.hy)};function G(a,c){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);this.hy=Ti(a,c);h(G)[this.hy]=this}G.prototype=Object.create(z.prototype);G.prototype.constructor=G;G.prototype.iy=G;G.jy={};b.AllHitsRayResultCallback=G;\nG.prototype.hasHit=function(){return!!Ui(this.hy)};G.prototype.get_m_collisionObjects=G.prototype.Oz=function(){return k(Vi(this.hy),oB)};G.prototype.set_m_collisionObjects=G.prototype.uC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Wi(c,a)};Object.defineProperty(G.prototype,\"m_collisionObjects\",{get:G.prototype.Oz,set:G.prototype.uC});G.prototype.get_m_rayFromWorld=G.prototype.Iy=function(){return k(Xi(this.hy),p)};\nG.prototype.set_m_rayFromWorld=G.prototype.Ry=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Yi(c,a)};Object.defineProperty(G.prototype,\"m_rayFromWorld\",{get:G.prototype.Iy,set:G.prototype.Ry});G.prototype.get_m_rayToWorld=G.prototype.Jy=function(){return k(Zi(this.hy),p)};G.prototype.set_m_rayToWorld=G.prototype.Sy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);$i(c,a)};Object.defineProperty(G.prototype,\"m_rayToWorld\",{get:G.prototype.Jy,set:G.prototype.Sy});\nG.prototype.get_m_hitNormalWorld=G.prototype.sy=function(){return k(aj(this.hy),pB)};G.prototype.set_m_hitNormalWorld=G.prototype.zy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);bj(c,a)};Object.defineProperty(G.prototype,\"m_hitNormalWorld\",{get:G.prototype.sy,set:G.prototype.zy});G.prototype.get_m_hitPointWorld=G.prototype.ty=function(){return k(cj(this.hy),pB)};G.prototype.set_m_hitPointWorld=G.prototype.Ay=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);dj(c,a)};\nObject.defineProperty(G.prototype,\"m_hitPointWorld\",{get:G.prototype.ty,set:G.prototype.Ay});G.prototype.get_m_hitFractions=G.prototype.kA=function(){return k(ej(this.hy),kB)};G.prototype.set_m_hitFractions=G.prototype.RC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);fj(c,a)};Object.defineProperty(G.prototype,\"m_hitFractions\",{get:G.prototype.kA,set:G.prototype.RC});G.prototype.get_m_collisionFilterGroup=G.prototype.ky=function(){return gj(this.hy)};\nG.prototype.set_m_collisionFilterGroup=G.prototype.my=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);hj(c,a)};Object.defineProperty(G.prototype,\"m_collisionFilterGroup\",{get:G.prototype.ky,set:G.prototype.my});G.prototype.get_m_collisionFilterMask=G.prototype.ly=function(){return ij(this.hy)};G.prototype.set_m_collisionFilterMask=G.prototype.ny=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);jj(c,a)};\nObject.defineProperty(G.prototype,\"m_collisionFilterMask\",{get:G.prototype.ly,set:G.prototype.ny});G.prototype.get_m_closestHitFraction=G.prototype.oy=function(){return kj(this.hy)};G.prototype.set_m_closestHitFraction=G.prototype.py=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);lj(c,a)};Object.defineProperty(G.prototype,\"m_closestHitFraction\",{get:G.prototype.oy,set:G.prototype.py});G.prototype.get_m_collisionObject=G.prototype.qy=function(){return k(mj(this.hy),q)};\nG.prototype.set_m_collisionObject=G.prototype.xy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);nj(c,a)};Object.defineProperty(G.prototype,\"m_collisionObject\",{get:G.prototype.qy,set:G.prototype.xy});G.prototype.__destroy__=function(){oj(this.hy)};function qB(){throw\"cannot construct a tMaterialArray, no constructor in IDL\";}qB.prototype=Object.create(f.prototype);qB.prototype.constructor=qB;qB.prototype.iy=qB;qB.jy={};b.tMaterialArray=qB;qB.prototype.size=qB.prototype.size=function(){return pj(this.hy)};\nqB.prototype.at=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(qj(c,a),A)};qB.prototype.__destroy__=function(){rj(this.hy)};function rB(a){a&&\"object\"===typeof a&&(a=a.hy);this.hy=sj(a);h(rB)[this.hy]=this}rB.prototype=Object.create($A.prototype);rB.prototype.constructor=rB;rB.prototype.iy=rB;rB.jy={};b.btDefaultVehicleRaycaster=rB;\nrB.prototype.castRay=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);tj(e,a,c,d)};rB.prototype.__destroy__=function(){uj(this.hy)};function sB(){this.hy=vj();h(sB)[this.hy]=this}sB.prototype=Object.create(UA.prototype);sB.prototype.constructor=sB;sB.prototype.iy=sB;sB.jy={};b.btEmptyShape=sB;sB.prototype.setLocalScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);wj(c,a)};\nsB.prototype.getLocalScaling=function(){return k(xj(this.hy),p)};sB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);yj(d,a,c)};sB.prototype.__destroy__=function(){zj(this.hy)};function H(){this.hy=Aj();h(H)[this.hy]=this}H.prototype=Object.create(f.prototype);H.prototype.constructor=H;H.prototype.iy=H;H.jy={};b.btConstraintSetting=H;H.prototype.get_m_tau=H.prototype.hB=function(){return Bj(this.hy)};\nH.prototype.set_m_tau=H.prototype.OD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Cj(c,a)};Object.defineProperty(H.prototype,\"m_tau\",{get:H.prototype.hB,set:H.prototype.OD});H.prototype.get_m_damping=H.prototype.Uz=function(){return Dj(this.hy)};H.prototype.set_m_damping=H.prototype.AC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ej(c,a)};Object.defineProperty(H.prototype,\"m_damping\",{get:H.prototype.Uz,set:H.prototype.AC});\nH.prototype.get_m_impulseClamp=H.prototype.qA=function(){return Fj(this.hy)};H.prototype.set_m_impulseClamp=H.prototype.XC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Gj(c,a)};Object.defineProperty(H.prototype,\"m_impulseClamp\",{get:H.prototype.qA,set:H.prototype.XC});H.prototype.__destroy__=function(){Hj(this.hy)};function tB(){throw\"cannot construct a LocalShapeInfo, no constructor in IDL\";}tB.prototype=Object.create(f.prototype);tB.prototype.constructor=tB;tB.prototype.iy=tB;\ntB.jy={};b.LocalShapeInfo=tB;tB.prototype.get_m_shapePart=tB.prototype.WA=function(){return Ij(this.hy)};tB.prototype.set_m_shapePart=tB.prototype.CD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Jj(c,a)};Object.defineProperty(tB.prototype,\"m_shapePart\",{get:tB.prototype.WA,set:tB.prototype.CD});tB.prototype.get_m_triangleIndex=tB.prototype.kB=function(){return Kj(this.hy)};\ntB.prototype.set_m_triangleIndex=tB.prototype.RD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Lj(c,a)};Object.defineProperty(tB.prototype,\"m_triangleIndex\",{get:tB.prototype.kB,set:tB.prototype.RD});tB.prototype.__destroy__=function(){Mj(this.hy)};function I(a){a&&\"object\"===typeof a&&(a=a.hy);this.hy=Nj(a);h(I)[this.hy]=this}I.prototype=Object.create(q.prototype);I.prototype.constructor=I;I.prototype.iy=I;I.jy={};b.btRigidBody=I;\nI.prototype.getCenterOfMassTransform=function(){return k(Oj(this.hy),r)};I.prototype.setCenterOfMassTransform=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Pj(c,a)};I.prototype.setSleepingThresholds=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Qj(d,a,c)};I.prototype.getLinearDamping=function(){return Rj(this.hy)};I.prototype.getAngularDamping=function(){return Sj(this.hy)};\nI.prototype.setDamping=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Tj(d,a,c)};I.prototype.setMassProps=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Uj(d,a,c)};I.prototype.getLinearFactor=function(){return k(Vj(this.hy),p)};I.prototype.setLinearFactor=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Wj(c,a)};\nI.prototype.applyTorque=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Xj(c,a)};I.prototype.applyLocalTorque=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Yj(c,a)};I.prototype.applyForce=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Zj(d,a,c)};I.prototype.applyCentralForce=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ak(c,a)};\nI.prototype.applyCentralLocalForce=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);bk(c,a)};I.prototype.applyTorqueImpulse=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ck(c,a)};I.prototype.applyImpulse=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);dk(d,a,c)};I.prototype.applyCentralImpulse=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ek(c,a)};I.prototype.updateInertiaTensor=function(){fk(this.hy)};\nI.prototype.getLinearVelocity=function(){return k(gk(this.hy),p)};I.prototype.getAngularVelocity=function(){return k(hk(this.hy),p)};I.prototype.setLinearVelocity=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ik(c,a)};I.prototype.setAngularVelocity=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);jk(c,a)};I.prototype.getMotionState=function(){return k(kk(this.hy),gB)};I.prototype.setMotionState=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);lk(c,a)};\nI.prototype.getAngularFactor=function(){return k(mk(this.hy),p)};I.prototype.setAngularFactor=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);nk(c,a)};I.prototype.upcast=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(ok(c,a),I)};I.prototype.getAabb=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);pk(d,a,c)};I.prototype.applyGravity=function(){qk(this.hy)};I.prototype.getGravity=function(){return k(rk(this.hy),p)};\nI.prototype.setGravity=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);sk(c,a)};I.prototype.getBroadphaseProxy=function(){return k(tk(this.hy),t)};I.prototype.clearForces=function(){uk(this.hy)};I.prototype.setAnisotropicFriction=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);vk(d,a,c)};I.prototype.getCollisionShape=function(){return k(wk(this.hy),m)};\nI.prototype.setContactProcessingThreshold=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);xk(c,a)};I.prototype.setActivationState=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);yk(c,a)};I.prototype.forceActivationState=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);zk(c,a)};I.prototype.activate=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);void 0===a?Ak(c):Bk(c,a)};I.prototype.isActive=function(){return!!Ck(this.hy)};I.prototype.isKinematicObject=function(){return!!Dk(this.hy)};\nI.prototype.isStaticObject=function(){return!!Ek(this.hy)};I.prototype.isStaticOrKinematicObject=function(){return!!Fk(this.hy)};I.prototype.getRestitution=function(){return Gk(this.hy)};I.prototype.getFriction=function(){return Hk(this.hy)};I.prototype.getRollingFriction=function(){return Ik(this.hy)};I.prototype.setRestitution=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Jk(c,a)};I.prototype.setFriction=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Kk(c,a)};\nI.prototype.setRollingFriction=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Lk(c,a)};I.prototype.getWorldTransform=function(){return k(Mk(this.hy),r)};I.prototype.getCollisionFlags=function(){return Nk(this.hy)};I.prototype.setCollisionFlags=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ok(c,a)};I.prototype.setWorldTransform=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Pk(c,a)};\nI.prototype.setCollisionShape=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Qk(c,a)};I.prototype.setCcdMotionThreshold=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Rk(c,a)};I.prototype.setCcdSweptSphereRadius=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Sk(c,a)};I.prototype.getUserIndex=function(){return Tk(this.hy)};I.prototype.setUserIndex=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Uk(c,a)};\nI.prototype.getUserPointer=function(){return k(Vk(this.hy),SA)};I.prototype.setUserPointer=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Wk(c,a)};I.prototype.getBroadphaseHandle=function(){return k(Xk(this.hy),t)};I.prototype.__destroy__=function(){Yk(this.hy)};function uB(){throw\"cannot construct a btIndexedMeshArray, no constructor in IDL\";}uB.prototype=Object.create(f.prototype);uB.prototype.constructor=uB;uB.prototype.iy=uB;uB.jy={};b.btIndexedMeshArray=uB;\nuB.prototype.size=uB.prototype.size=function(){return Zk(this.hy)};uB.prototype.at=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k($k(c,a),vB)};uB.prototype.__destroy__=function(){al(this.hy)};function wB(){this.hy=bl();h(wB)[this.hy]=this}wB.prototype=Object.create(f.prototype);wB.prototype.constructor=wB;wB.prototype.iy=wB;wB.jy={};b.btDbvtBroadphase=wB;wB.prototype.__destroy__=function(){cl(this.hy)};\nfunction xB(a,c,d,e,g,n,F,aa,ta){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);g&&\"object\"===typeof g&&(g=g.hy);n&&\"object\"===typeof n&&(n=n.hy);F&&\"object\"===typeof F&&(F=F.hy);aa&&\"object\"===typeof aa&&(aa=aa.hy);ta&&\"object\"===typeof ta&&(ta=ta.hy);this.hy=dl(a,c,d,e,g,n,F,aa,ta);h(xB)[this.hy]=this}xB.prototype=Object.create(UA.prototype);xB.prototype.constructor=xB;xB.prototype.iy=xB;xB.jy={};\nb.btHeightfieldTerrainShape=xB;xB.prototype.setMargin=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);el(c,a)};xB.prototype.getMargin=function(){return fl(this.hy)};xB.prototype.setLocalScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);gl(c,a)};xB.prototype.getLocalScaling=function(){return k(hl(this.hy),p)};xB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);il(d,a,c)};\nxB.prototype.__destroy__=function(){jl(this.hy)};function yB(){this.hy=kl();h(yB)[this.hy]=this}yB.prototype=Object.create(iB.prototype);yB.prototype.constructor=yB;yB.prototype.iy=yB;yB.jy={};b.btDefaultSoftBodySolver=yB;yB.prototype.__destroy__=function(){ll(this.hy)};function zB(a){a&&\"object\"===typeof a&&(a=a.hy);this.hy=ml(a);h(zB)[this.hy]=this}zB.prototype=Object.create(OA.prototype);zB.prototype.constructor=zB;zB.prototype.iy=zB;zB.jy={};b.btCollisionDispatcher=zB;\nzB.prototype.getNumManifolds=function(){return nl(this.hy)};zB.prototype.getManifoldByIndexInternal=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(ol(c,a),dB)};zB.prototype.__destroy__=function(){pl(this.hy)};\nfunction AB(a,c,d,e,g){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);g&&\"object\"===typeof g&&(g=g.hy);this.hy=void 0===d?ql(a,c):void 0===e?rl(a,c,d):void 0===g?sl(a,c,d,e):tl(a,c,d,e,g);h(AB)[this.hy]=this}AB.prototype=Object.create(f.prototype);AB.prototype.constructor=AB;AB.prototype.iy=AB;AB.jy={};b.btAxisSweep3=AB;AB.prototype.__destroy__=function(){ul(this.hy)};\nfunction SA(){throw\"cannot construct a VoidPtr, no constructor in IDL\";}SA.prototype=Object.create(f.prototype);SA.prototype.constructor=SA;SA.prototype.iy=SA;SA.jy={};b.VoidPtr=SA;SA.prototype.__destroy__=function(){vl(this.hy)};function J(){this.hy=wl();h(J)[this.hy]=this}J.prototype=Object.create(f.prototype);J.prototype.constructor=J;J.prototype.iy=J;J.jy={};b.btSoftBodyWorldInfo=J;J.prototype.get_air_density=J.prototype.Yy=function(){return xl(this.hy)};\nJ.prototype.set_air_density=J.prototype.FB=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);yl(c,a)};Object.defineProperty(J.prototype,\"air_density\",{get:J.prototype.Yy,set:J.prototype.FB});J.prototype.get_water_density=J.prototype.CB=function(){return zl(this.hy)};J.prototype.set_water_density=J.prototype.iE=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Al(c,a)};Object.defineProperty(J.prototype,\"water_density\",{get:J.prototype.CB,set:J.prototype.iE});\nJ.prototype.get_water_offset=J.prototype.EB=function(){return Bl(this.hy)};J.prototype.set_water_offset=J.prototype.kE=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Cl(c,a)};Object.defineProperty(J.prototype,\"water_offset\",{get:J.prototype.EB,set:J.prototype.kE});J.prototype.get_m_maxDisplacement=J.prototype.EA=function(){return Dl(this.hy)};J.prototype.set_m_maxDisplacement=J.prototype.kD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);El(c,a)};\nObject.defineProperty(J.prototype,\"m_maxDisplacement\",{get:J.prototype.EA,set:J.prototype.kD});J.prototype.get_water_normal=J.prototype.DB=function(){return k(Fl(this.hy),p)};J.prototype.set_water_normal=J.prototype.jE=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Gl(c,a)};Object.defineProperty(J.prototype,\"water_normal\",{get:J.prototype.DB,set:J.prototype.jE});J.prototype.get_m_broadphase=J.prototype.Gz=function(){return k(Hl(this.hy),QA)};\nJ.prototype.set_m_broadphase=J.prototype.mC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Il(c,a)};Object.defineProperty(J.prototype,\"m_broadphase\",{get:J.prototype.Gz,set:J.prototype.mC});J.prototype.get_m_dispatcher=J.prototype.Xz=function(){return k(Jl(this.hy),OA)};J.prototype.set_m_dispatcher=J.prototype.DC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Kl(c,a)};Object.defineProperty(J.prototype,\"m_dispatcher\",{get:J.prototype.Xz,set:J.prototype.DC});\nJ.prototype.get_m_gravity=J.prototype.fA=function(){return k(Ll(this.hy),p)};J.prototype.set_m_gravity=J.prototype.MC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ml(c,a)};Object.defineProperty(J.prototype,\"m_gravity\",{get:J.prototype.fA,set:J.prototype.MC});J.prototype.__destroy__=function(){Nl(this.hy)};\nfunction BB(a,c,d,e){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);this.hy=void 0===d?Ol(a,c):void 0===e?_emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_3(a,c,d):Pl(a,c,d,e);h(BB)[this.hy]=this}BB.prototype=Object.create(TA.prototype);BB.prototype.constructor=BB;BB.prototype.iy=BB;BB.jy={};b.btConeTwistConstraint=BB;\nBB.prototype.setLimit=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Ql(d,a,c)};BB.prototype.setAngularOnly=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Rl(c,a)};BB.prototype.setDamping=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Sl(c,a)};BB.prototype.enableMotor=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Tl(c,a)};\nBB.prototype.setMaxMotorImpulse=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ul(c,a)};BB.prototype.setMaxMotorImpulseNormalized=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Vl(c,a)};BB.prototype.setMotorTarget=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Wl(c,a)};BB.prototype.setMotorTargetInConstraintSpace=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Xl(c,a)};\nBB.prototype.enableFeedback=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Yl(c,a)};BB.prototype.getBreakingImpulseThreshold=function(){return Zl(this.hy)};BB.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);$l(c,a)};BB.prototype.getParam=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);return am(d,a,c)};\nBB.prototype.setParam=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);bm(e,a,c,d)};BB.prototype.__destroy__=function(){cm(this.hy)};\nfunction CB(a,c,d,e,g,n,F){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);g&&\"object\"===typeof g&&(g=g.hy);n&&\"object\"===typeof n&&(n=n.hy);F&&\"object\"===typeof F&&(F=F.hy);this.hy=void 0===d?dm(a,c):void 0===e?em(a,c,d):void 0===g?fm(a,c,d,e):void 0===n?gm(a,c,d,e,g):void 0===F?hm(a,c,d,e,g,n):im(a,c,d,e,g,n,F);h(CB)[this.hy]=this}CB.prototype=Object.create(TA.prototype);CB.prototype.constructor=CB;\nCB.prototype.iy=CB;CB.jy={};b.btHingeConstraint=CB;CB.prototype.setLimit=function(a,c,d,e,g){var n=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);g&&\"object\"===typeof g&&(g=g.hy);void 0===g?jm(n,a,c,d,e):km(n,a,c,d,e,g)};CB.prototype.enableAngularMotor=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);lm(e,a,c,d)};\nCB.prototype.setAngularOnly=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);mm(c,a)};CB.prototype.enableMotor=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);nm(c,a)};CB.prototype.setMaxMotorImpulse=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);om(c,a)};CB.prototype.setMotorTarget=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);pm(d,a,c)};\nCB.prototype.enableFeedback=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);qm(c,a)};CB.prototype.getBreakingImpulseThreshold=function(){return rm(this.hy)};CB.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);sm(c,a)};CB.prototype.getParam=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);return tm(d,a,c)};\nCB.prototype.setParam=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);um(e,a,c,d)};CB.prototype.__destroy__=function(){wm(this.hy)};function DB(a,c){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);this.hy=xm(a,c);h(DB)[this.hy]=this}DB.prototype=Object.create(YA.prototype);DB.prototype.constructor=DB;DB.prototype.iy=DB;DB.jy={};b.btConeShapeZ=DB;\nDB.prototype.setLocalScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ym(c,a)};DB.prototype.getLocalScaling=function(){return k(zm(this.hy),p)};DB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Am(d,a,c)};DB.prototype.__destroy__=function(){Bm(this.hy)};function EB(a,c){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);this.hy=Cm(a,c);h(EB)[this.hy]=this}EB.prototype=Object.create(YA.prototype);\nEB.prototype.constructor=EB;EB.prototype.iy=EB;EB.jy={};b.btConeShapeX=EB;EB.prototype.setLocalScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Dm(c,a)};EB.prototype.getLocalScaling=function(){return k(Em(this.hy),p)};EB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Fm(d,a,c)};EB.prototype.__destroy__=function(){Gm(this.hy)};\nfunction FB(a,c){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);this.hy=void 0===a?Hm():void 0===c?Im(a):Jm(a,c);h(FB)[this.hy]=this}FB.prototype=Object.create(fB.prototype);FB.prototype.constructor=FB;FB.prototype.iy=FB;FB.jy={};b.btTriangleMesh=FB;FB.prototype.addTriangle=function(a,c,d,e){var g=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);void 0===e?Km(g,a,c,d):Lm(g,a,c,d,e)};\nFB.prototype.findOrAddVertex=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);return Mm(d,a,c)};FB.prototype.addIndex=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Nm(c,a)};FB.prototype.getIndexedMeshArray=function(){return k(Om(this.hy),uB)};FB.prototype.setScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Pm(c,a)};FB.prototype.__destroy__=function(){Qm(this.hy)};\nfunction GB(a,c){IA();\"object\"==typeof a&&(a=MA(a));c&&\"object\"===typeof c&&(c=c.hy);this.hy=void 0===a?Rm():void 0===c?Sm(a):Tm(a,c);h(GB)[this.hy]=this}GB.prototype=Object.create(m.prototype);GB.prototype.constructor=GB;GB.prototype.iy=GB;GB.jy={};b.btConvexHullShape=GB;GB.prototype.addPoint=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);void 0===c?Um(d,a):Vm(d,a,c)};\nGB.prototype.setMargin=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Wm(c,a)};GB.prototype.getMargin=function(){return Xm(this.hy)};GB.prototype.getNumVertices=function(){return Ym(this.hy)};GB.prototype.initializePolyhedralFeatures=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return!!Zm(c,a)};GB.prototype.recalcLocalAabb=function(){$m(this.hy)};GB.prototype.getConvexPolyhedron=function(){return k(an(this.hy),HB)};\nGB.prototype.setLocalScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);bn(c,a)};GB.prototype.getLocalScaling=function(){return k(cn(this.hy),p)};GB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);dn(d,a,c)};GB.prototype.__destroy__=function(){en(this.hy)};function K(){this.hy=fn();h(K)[this.hy]=this}K.prototype=Object.create(f.prototype);K.prototype.constructor=K;K.prototype.iy=K;K.jy={};\nb.btVehicleTuning=K;K.prototype.get_m_suspensionStiffness=K.prototype.wy=function(){return gn(this.hy)};K.prototype.set_m_suspensionStiffness=K.prototype.Dy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);hn(c,a)};Object.defineProperty(K.prototype,\"m_suspensionStiffness\",{get:K.prototype.wy,set:K.prototype.Dy});K.prototype.get_m_suspensionCompression=K.prototype.bB=function(){return jn(this.hy)};\nK.prototype.set_m_suspensionCompression=K.prototype.ID=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);kn(c,a)};Object.defineProperty(K.prototype,\"m_suspensionCompression\",{get:K.prototype.bB,set:K.prototype.ID});K.prototype.get_m_suspensionDamping=K.prototype.cB=function(){return ln(this.hy)};K.prototype.set_m_suspensionDamping=K.prototype.JD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);mn(c,a)};\nObject.defineProperty(K.prototype,\"m_suspensionDamping\",{get:K.prototype.cB,set:K.prototype.JD});K.prototype.get_m_maxSuspensionTravelCm=K.prototype.vy=function(){return nn(this.hy)};K.prototype.set_m_maxSuspensionTravelCm=K.prototype.Cy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);on(c,a)};Object.defineProperty(K.prototype,\"m_maxSuspensionTravelCm\",{get:K.prototype.vy,set:K.prototype.Cy});K.prototype.get_m_frictionSlip=K.prototype.ry=function(){return pn(this.hy)};\nK.prototype.set_m_frictionSlip=K.prototype.yy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);qn(c,a)};Object.defineProperty(K.prototype,\"m_frictionSlip\",{get:K.prototype.ry,set:K.prototype.yy});K.prototype.get_m_maxSuspensionForce=K.prototype.uy=function(){return rn(this.hy)};K.prototype.set_m_maxSuspensionForce=K.prototype.By=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);sn(c,a)};Object.defineProperty(K.prototype,\"m_maxSuspensionForce\",{get:K.prototype.uy,set:K.prototype.By});\nfunction IB(){throw\"cannot construct a btCollisionObjectWrapper, no constructor in IDL\";}IB.prototype=Object.create(f.prototype);IB.prototype.constructor=IB;IB.prototype.iy=IB;IB.jy={};b.btCollisionObjectWrapper=IB;IB.prototype.getWorldTransform=function(){return k(tn(this.hy),r)};IB.prototype.getCollisionObject=function(){return k(un(this.hy),q)};IB.prototype.getCollisionShape=function(){return k(vn(this.hy),m)};function JB(a){a&&\"object\"===typeof a&&(a=a.hy);this.hy=wn(a);h(JB)[this.hy]=this}\nJB.prototype=Object.create(f.prototype);JB.prototype.constructor=JB;JB.prototype.iy=JB;JB.jy={};b.btShapeHull=JB;JB.prototype.buildHull=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return!!xn(c,a)};JB.prototype.numVertices=function(){return yn(this.hy)};JB.prototype.getVertexPointer=function(){return k(zn(this.hy),p)};JB.prototype.__destroy__=function(){An(this.hy)};\nfunction KB(a,c){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);this.hy=void 0===a?Bn():void 0===c?Cn(a):Dn(a,c);h(KB)[this.hy]=this}KB.prototype=Object.create(gB.prototype);KB.prototype.constructor=KB;KB.prototype.iy=KB;KB.jy={};b.btDefaultMotionState=KB;KB.prototype.getWorldTransform=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);En(c,a)};KB.prototype.setWorldTransform=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Fn(c,a)};\nKB.prototype.get_m_graphicsWorldTrans=KB.prototype.eA=function(){return k(Gn(this.hy),r)};KB.prototype.set_m_graphicsWorldTrans=KB.prototype.LC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Hn(c,a)};Object.defineProperty(KB.prototype,\"m_graphicsWorldTrans\",{get:KB.prototype.eA,set:KB.prototype.LC});KB.prototype.__destroy__=function(){In(this.hy)};function L(a){a&&\"object\"===typeof a&&(a=a.hy);this.hy=Jn(a);h(L)[this.hy]=this}L.prototype=Object.create(f.prototype);\nL.prototype.constructor=L;L.prototype.iy=L;L.jy={};b.btWheelInfo=L;L.prototype.getSuspensionRestLength=function(){return Kn(this.hy)};L.prototype.updateWheel=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Ln(d,a,c)};L.prototype.get_m_suspensionStiffness=L.prototype.wy=function(){return Mn(this.hy)};L.prototype.set_m_suspensionStiffness=L.prototype.Dy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Nn(c,a)};\nObject.defineProperty(L.prototype,\"m_suspensionStiffness\",{get:L.prototype.wy,set:L.prototype.Dy});L.prototype.get_m_frictionSlip=L.prototype.ry=function(){return On(this.hy)};L.prototype.set_m_frictionSlip=L.prototype.yy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Pn(c,a)};Object.defineProperty(L.prototype,\"m_frictionSlip\",{get:L.prototype.ry,set:L.prototype.yy});L.prototype.get_m_engineForce=L.prototype.aA=function(){return Qn(this.hy)};\nL.prototype.set_m_engineForce=L.prototype.HC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Rn(c,a)};Object.defineProperty(L.prototype,\"m_engineForce\",{get:L.prototype.aA,set:L.prototype.HC});L.prototype.get_m_rollInfluence=L.prototype.SA=function(){return Sn(this.hy)};L.prototype.set_m_rollInfluence=L.prototype.yD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Tn(c,a)};Object.defineProperty(L.prototype,\"m_rollInfluence\",{get:L.prototype.SA,set:L.prototype.yD});\nL.prototype.get_m_suspensionRestLength1=L.prototype.gB=function(){return Un(this.hy)};L.prototype.set_m_suspensionRestLength1=L.prototype.ND=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Vn(c,a)};Object.defineProperty(L.prototype,\"m_suspensionRestLength1\",{get:L.prototype.gB,set:L.prototype.ND});L.prototype.get_m_wheelsRadius=L.prototype.uB=function(){return Wn(this.hy)};L.prototype.set_m_wheelsRadius=L.prototype.aE=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Xn(c,a)};\nObject.defineProperty(L.prototype,\"m_wheelsRadius\",{get:L.prototype.uB,set:L.prototype.aE});L.prototype.get_m_wheelsDampingCompression=L.prototype.My=function(){return Yn(this.hy)};L.prototype.set_m_wheelsDampingCompression=L.prototype.Vy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Zn(c,a)};Object.defineProperty(L.prototype,\"m_wheelsDampingCompression\",{get:L.prototype.My,set:L.prototype.Vy});L.prototype.get_m_wheelsDampingRelaxation=L.prototype.Ny=function(){return $n(this.hy)};\nL.prototype.set_m_wheelsDampingRelaxation=L.prototype.Wy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ao(c,a)};Object.defineProperty(L.prototype,\"m_wheelsDampingRelaxation\",{get:L.prototype.Ny,set:L.prototype.Wy});L.prototype.get_m_steering=L.prototype.$A=function(){return bo(this.hy)};L.prototype.set_m_steering=L.prototype.GD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);co(c,a)};Object.defineProperty(L.prototype,\"m_steering\",{get:L.prototype.$A,set:L.prototype.GD});\nL.prototype.get_m_maxSuspensionForce=L.prototype.uy=function(){return eo(this.hy)};L.prototype.set_m_maxSuspensionForce=L.prototype.By=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);fo(c,a)};Object.defineProperty(L.prototype,\"m_maxSuspensionForce\",{get:L.prototype.uy,set:L.prototype.By});L.prototype.get_m_maxSuspensionTravelCm=L.prototype.vy=function(){return go(this.hy)};\nL.prototype.set_m_maxSuspensionTravelCm=L.prototype.Cy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ho(c,a)};Object.defineProperty(L.prototype,\"m_maxSuspensionTravelCm\",{get:L.prototype.vy,set:L.prototype.Cy});L.prototype.get_m_wheelsSuspensionForce=L.prototype.vB=function(){return io(this.hy)};L.prototype.set_m_wheelsSuspensionForce=L.prototype.bE=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);jo(c,a)};\nObject.defineProperty(L.prototype,\"m_wheelsSuspensionForce\",{get:L.prototype.vB,set:L.prototype.bE});L.prototype.get_m_bIsFrontWheel=L.prototype.Fy=function(){return!!ko(this.hy)};L.prototype.set_m_bIsFrontWheel=L.prototype.Oy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);lo(c,a)};Object.defineProperty(L.prototype,\"m_bIsFrontWheel\",{get:L.prototype.Fy,set:L.prototype.Oy});L.prototype.get_m_raycastInfo=L.prototype.QA=function(){return k(mo(this.hy),M)};\nL.prototype.set_m_raycastInfo=L.prototype.wD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);no(c,a)};Object.defineProperty(L.prototype,\"m_raycastInfo\",{get:L.prototype.QA,set:L.prototype.wD});L.prototype.get_m_chassisConnectionPointCS=L.prototype.Mz=function(){return k(oo(this.hy),p)};L.prototype.set_m_chassisConnectionPointCS=L.prototype.sC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);po(c,a)};\nObject.defineProperty(L.prototype,\"m_chassisConnectionPointCS\",{get:L.prototype.Mz,set:L.prototype.sC});L.prototype.get_m_worldTransform=L.prototype.wB=function(){return k(qo(this.hy),r)};L.prototype.set_m_worldTransform=L.prototype.cE=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ro(c,a)};Object.defineProperty(L.prototype,\"m_worldTransform\",{get:L.prototype.wB,set:L.prototype.cE});L.prototype.get_m_wheelDirectionCS=L.prototype.Ly=function(){return k(so(this.hy),p)};\nL.prototype.set_m_wheelDirectionCS=L.prototype.Uy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);to(c,a)};Object.defineProperty(L.prototype,\"m_wheelDirectionCS\",{get:L.prototype.Ly,set:L.prototype.Uy});L.prototype.get_m_wheelAxleCS=L.prototype.Ky=function(){return k(uo(this.hy),p)};L.prototype.set_m_wheelAxleCS=L.prototype.Ty=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);vo(c,a)};Object.defineProperty(L.prototype,\"m_wheelAxleCS\",{get:L.prototype.Ky,set:L.prototype.Ty});\nL.prototype.get_m_rotation=L.prototype.UA=function(){return wo(this.hy)};L.prototype.set_m_rotation=L.prototype.AD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);xo(c,a)};Object.defineProperty(L.prototype,\"m_rotation\",{get:L.prototype.UA,set:L.prototype.AD});L.prototype.get_m_deltaRotation=L.prototype.Vz=function(){return yo(this.hy)};L.prototype.set_m_deltaRotation=L.prototype.BC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);zo(c,a)};\nObject.defineProperty(L.prototype,\"m_deltaRotation\",{get:L.prototype.Vz,set:L.prototype.BC});L.prototype.get_m_brake=L.prototype.Fz=function(){return Ao(this.hy)};L.prototype.set_m_brake=L.prototype.lC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Bo(c,a)};Object.defineProperty(L.prototype,\"m_brake\",{get:L.prototype.Fz,set:L.prototype.lC});L.prototype.get_m_clippedInvContactDotSuspension=L.prototype.Nz=function(){return Co(this.hy)};\nL.prototype.set_m_clippedInvContactDotSuspension=L.prototype.tC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Do(c,a)};Object.defineProperty(L.prototype,\"m_clippedInvContactDotSuspension\",{get:L.prototype.Nz,set:L.prototype.tC});L.prototype.get_m_suspensionRelativeVelocity=L.prototype.eB=function(){return Eo(this.hy)};L.prototype.set_m_suspensionRelativeVelocity=L.prototype.LD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Fo(c,a)};\nObject.defineProperty(L.prototype,\"m_suspensionRelativeVelocity\",{get:L.prototype.eB,set:L.prototype.LD});L.prototype.get_m_skidInfo=L.prototype.XA=function(){return Go(this.hy)};L.prototype.set_m_skidInfo=L.prototype.DD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ho(c,a)};Object.defineProperty(L.prototype,\"m_skidInfo\",{get:L.prototype.XA,set:L.prototype.DD});L.prototype.__destroy__=function(){Io(this.hy)};\nfunction N(a,c,d,e){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);this.hy=void 0===a?Jo():void 0===c?_emscripten_bind_btVector4_btVector4_1(a):void 0===d?_emscripten_bind_btVector4_btVector4_2(a,c):void 0===e?_emscripten_bind_btVector4_btVector4_3(a,c,d):Ko(a,c,d,e);h(N)[this.hy]=this}N.prototype=Object.create(p.prototype);N.prototype.constructor=N;N.prototype.iy=N;N.jy={};b.btVector4=N;N.prototype.w=function(){return Lo(this.hy)};\nN.prototype.setValue=function(a,c,d,e){var g=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);Mo(g,a,c,d,e)};N.prototype.length=N.prototype.length=function(){return No(this.hy)};N.prototype.x=N.prototype.x=function(){return Oo(this.hy)};N.prototype.y=N.prototype.y=function(){return Po(this.hy)};N.prototype.z=N.prototype.z=function(){return Qo(this.hy)};\nN.prototype.setX=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ro(c,a)};N.prototype.setY=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);So(c,a)};N.prototype.setZ=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);To(c,a)};N.prototype.normalize=N.prototype.normalize=function(){Uo(this.hy)};N.prototype.rotate=N.prototype.rotate=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);return k(Vo(d,a,c),p)};\nN.prototype.dot=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return Wo(c,a)};N.prototype.op_mul=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(Xo(c,a),p)};N.prototype.op_add=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(Yo(c,a),p)};N.prototype.op_sub=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(Zo(c,a),p)};N.prototype.__destroy__=function(){$o(this.hy)};function LB(){this.hy=ap();h(LB)[this.hy]=this}LB.prototype=Object.create(f.prototype);\nLB.prototype.constructor=LB;LB.prototype.iy=LB;LB.jy={};b.btDefaultCollisionConstructionInfo=LB;LB.prototype.__destroy__=function(){bp(this.hy)};function O(){throw\"cannot construct a Anchor, no constructor in IDL\";}O.prototype=Object.create(f.prototype);O.prototype.constructor=O;O.prototype.iy=O;O.jy={};b.Anchor=O;O.prototype.get_m_node=O.prototype.FA=function(){return k(cp(this.hy),Node)};O.prototype.set_m_node=O.prototype.lD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);dp(c,a)};\nObject.defineProperty(O.prototype,\"m_node\",{get:O.prototype.FA,set:O.prototype.lD});O.prototype.get_m_local=O.prototype.zA=function(){return k(ep(this.hy),p)};O.prototype.set_m_local=O.prototype.fD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);fp(c,a)};Object.defineProperty(O.prototype,\"m_local\",{get:O.prototype.zA,set:O.prototype.fD});O.prototype.get_m_body=O.prototype.Ez=function(){return k(gp(this.hy),I)};\nO.prototype.set_m_body=O.prototype.kC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);hp(c,a)};Object.defineProperty(O.prototype,\"m_body\",{get:O.prototype.Ez,set:O.prototype.kC});O.prototype.get_m_influence=O.prototype.sA=function(){return ip(this.hy)};O.prototype.set_m_influence=O.prototype.ZC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);jp(c,a)};Object.defineProperty(O.prototype,\"m_influence\",{get:O.prototype.sA,set:O.prototype.ZC});\nO.prototype.get_m_c0=O.prototype.Hz=function(){return k(kp(this.hy),jB)};O.prototype.set_m_c0=O.prototype.nC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);lp(c,a)};Object.defineProperty(O.prototype,\"m_c0\",{get:O.prototype.Hz,set:O.prototype.nC});O.prototype.get_m_c1=O.prototype.Iz=function(){return k(mp(this.hy),p)};O.prototype.set_m_c1=O.prototype.oC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);np(c,a)};Object.defineProperty(O.prototype,\"m_c1\",{get:O.prototype.Iz,set:O.prototype.oC});\nO.prototype.get_m_c2=O.prototype.Jz=function(){return op(this.hy)};O.prototype.set_m_c2=O.prototype.pC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);pp(c,a)};Object.defineProperty(O.prototype,\"m_c2\",{get:O.prototype.Jz,set:O.prototype.pC});O.prototype.__destroy__=function(){qp(this.hy)};function P(){throw\"cannot construct a btVehicleRaycasterResult, no constructor in IDL\";}P.prototype=Object.create(f.prototype);P.prototype.constructor=P;P.prototype.iy=P;P.jy={};\nb.btVehicleRaycasterResult=P;P.prototype.get_m_hitPointInWorld=P.prototype.nA=function(){return k(rp(this.hy),p)};P.prototype.set_m_hitPointInWorld=P.prototype.UC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);sp(c,a)};Object.defineProperty(P.prototype,\"m_hitPointInWorld\",{get:P.prototype.nA,set:P.prototype.UC});P.prototype.get_m_hitNormalInWorld=P.prototype.lA=function(){return k(tp(this.hy),p)};\nP.prototype.set_m_hitNormalInWorld=P.prototype.SC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);up(c,a)};Object.defineProperty(P.prototype,\"m_hitNormalInWorld\",{get:P.prototype.lA,set:P.prototype.SC});P.prototype.get_m_distFraction=P.prototype.Yz=function(){return vp(this.hy)};P.prototype.set_m_distFraction=P.prototype.EC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);wp(c,a)};Object.defineProperty(P.prototype,\"m_distFraction\",{get:P.prototype.Yz,set:P.prototype.EC});\nP.prototype.__destroy__=function(){xp(this.hy)};function pB(){throw\"cannot construct a btVector3Array, no constructor in IDL\";}pB.prototype=Object.create(f.prototype);pB.prototype.constructor=pB;pB.prototype.iy=pB;pB.jy={};b.btVector3Array=pB;pB.prototype.size=pB.prototype.size=function(){return yp(this.hy)};pB.prototype.at=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(zp(c,a),p)};pB.prototype.__destroy__=function(){Ap(this.hy)};\nfunction MB(){throw\"cannot construct a btConstraintSolver, no constructor in IDL\";}MB.prototype=Object.create(f.prototype);MB.prototype.constructor=MB;MB.prototype.iy=MB;MB.jy={};b.btConstraintSolver=MB;MB.prototype.__destroy__=function(){Bp(this.hy)};function Q(a,c,d){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);this.hy=Cp(a,c,d);h(Q)[this.hy]=this}Q.prototype=Object.create(ZA.prototype);Q.prototype.constructor=Q;Q.prototype.iy=Q;Q.jy={};\nb.btRaycastVehicle=Q;Q.prototype.applyEngineForce=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Dp(d,a,c)};Q.prototype.setSteeringValue=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Ep(d,a,c)};Q.prototype.getWheelTransformWS=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(Fp(c,a),r)};\nQ.prototype.updateWheelTransform=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Gp(d,a,c)};Q.prototype.addWheel=function(a,c,d,e,g,n,F){var aa=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);g&&\"object\"===typeof g&&(g=g.hy);n&&\"object\"===typeof n&&(n=n.hy);F&&\"object\"===typeof F&&(F=F.hy);return k(Hp(aa,a,c,d,e,g,n,F),L)};Q.prototype.getNumWheels=function(){return Ip(this.hy)};\nQ.prototype.getRigidBody=function(){return k(Jp(this.hy),I)};Q.prototype.getWheelInfo=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(Kp(c,a),L)};Q.prototype.setBrake=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Lp(d,a,c)};Q.prototype.setCoordinateSystem=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);Mp(e,a,c,d)};Q.prototype.getCurrentSpeedKmHour=function(){return Np(this.hy)};\nQ.prototype.getChassisWorldTransform=function(){return k(Op(this.hy),r)};Q.prototype.rayCast=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return Pp(c,a)};Q.prototype.updateVehicle=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Qp(c,a)};Q.prototype.resetSuspension=function(){Rp(this.hy)};Q.prototype.getSteeringValue=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return Sp(c,a)};\nQ.prototype.updateWheelTransformsWS=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);void 0===c?Tp(d,a):Up(d,a,c)};Q.prototype.setPitchControl=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Vp(c,a)};Q.prototype.updateSuspension=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Wp(c,a)};Q.prototype.updateFriction=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Xp(c,a)};Q.prototype.getRightAxis=function(){return Yp(this.hy)};\nQ.prototype.getUpAxis=function(){return Zp(this.hy)};Q.prototype.getForwardAxis=function(){return $p(this.hy)};Q.prototype.getForwardVector=function(){return k(aq(this.hy),p)};Q.prototype.getUserConstraintType=function(){return bq(this.hy)};Q.prototype.setUserConstraintType=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);cq(c,a)};Q.prototype.setUserConstraintId=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);dq(c,a)};Q.prototype.getUserConstraintId=function(){return eq(this.hy)};\nQ.prototype.updateAction=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);fq(d,a,c)};Q.prototype.__destroy__=function(){gq(this.hy)};function NB(a){a&&\"object\"===typeof a&&(a=a.hy);this.hy=hq(a);h(NB)[this.hy]=this}NB.prototype=Object.create(bB.prototype);NB.prototype.constructor=NB;NB.prototype.iy=NB;NB.jy={};b.btCylinderShapeX=NB;NB.prototype.setMargin=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);iq(c,a)};NB.prototype.getMargin=function(){return jq(this.hy)};\nNB.prototype.setLocalScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);kq(c,a)};NB.prototype.getLocalScaling=function(){return k(lq(this.hy),p)};NB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);mq(d,a,c)};NB.prototype.__destroy__=function(){nq(this.hy)};function OB(a){a&&\"object\"===typeof a&&(a=a.hy);this.hy=oq(a);h(OB)[this.hy]=this}OB.prototype=Object.create(bB.prototype);OB.prototype.constructor=OB;\nOB.prototype.iy=OB;OB.jy={};b.btCylinderShapeZ=OB;OB.prototype.setMargin=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);pq(c,a)};OB.prototype.getMargin=function(){return qq(this.hy)};OB.prototype.setLocalScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);rq(c,a)};OB.prototype.getLocalScaling=function(){return k(sq(this.hy),p)};OB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);tq(d,a,c)};\nOB.prototype.__destroy__=function(){uq(this.hy)};function HB(){throw\"cannot construct a btConvexPolyhedron, no constructor in IDL\";}HB.prototype=Object.create(f.prototype);HB.prototype.constructor=HB;HB.prototype.iy=HB;HB.jy={};b.btConvexPolyhedron=HB;HB.prototype.get_m_vertices=HB.prototype.qB=function(){return k(vq(this.hy),pB)};HB.prototype.set_m_vertices=HB.prototype.XD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);wq(c,a)};\nObject.defineProperty(HB.prototype,\"m_vertices\",{get:HB.prototype.qB,set:HB.prototype.XD});HB.prototype.get_m_faces=HB.prototype.Gy=function(){return k(xq(this.hy),PB)};HB.prototype.set_m_faces=HB.prototype.Py=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);yq(c,a)};Object.defineProperty(HB.prototype,\"m_faces\",{get:HB.prototype.Gy,set:HB.prototype.Py});HB.prototype.__destroy__=function(){zq(this.hy)};function QB(){this.hy=Aq();h(QB)[this.hy]=this}QB.prototype=Object.create(f.prototype);\nQB.prototype.constructor=QB;QB.prototype.iy=QB;QB.jy={};b.btSequentialImpulseConstraintSolver=QB;QB.prototype.__destroy__=function(){Bq(this.hy)};function RB(){throw\"cannot construct a tAnchorArray, no constructor in IDL\";}RB.prototype=Object.create(f.prototype);RB.prototype.constructor=RB;RB.prototype.iy=RB;RB.jy={};b.tAnchorArray=RB;RB.prototype.size=RB.prototype.size=function(){return Cq(this.hy)};RB.prototype.at=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(Dq(c,a),O)};\nRB.prototype.clear=RB.prototype.clear=function(){Eq(this.hy)};RB.prototype.push_back=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Fq(c,a)};RB.prototype.pop_back=function(){Gq(this.hy)};RB.prototype.__destroy__=function(){Hq(this.hy)};function M(){throw\"cannot construct a RaycastInfo, no constructor in IDL\";}M.prototype=Object.create(f.prototype);M.prototype.constructor=M;M.prototype.iy=M;M.jy={};b.RaycastInfo=M;\nM.prototype.get_m_contactNormalWS=M.prototype.Pz=function(){return k(Iq(this.hy),p)};M.prototype.set_m_contactNormalWS=M.prototype.vC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Jq(c,a)};Object.defineProperty(M.prototype,\"m_contactNormalWS\",{get:M.prototype.Pz,set:M.prototype.vC});M.prototype.get_m_contactPointWS=M.prototype.Qz=function(){return k(Kq(this.hy),p)};M.prototype.set_m_contactPointWS=M.prototype.wC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Lq(c,a)};\nObject.defineProperty(M.prototype,\"m_contactPointWS\",{get:M.prototype.Qz,set:M.prototype.wC});M.prototype.get_m_suspensionLength=M.prototype.dB=function(){return Mq(this.hy)};M.prototype.set_m_suspensionLength=M.prototype.KD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Nq(c,a)};Object.defineProperty(M.prototype,\"m_suspensionLength\",{get:M.prototype.dB,set:M.prototype.KD});M.prototype.get_m_hardPointWS=M.prototype.hA=function(){return k(Oq(this.hy),p)};\nM.prototype.set_m_hardPointWS=M.prototype.OC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Pq(c,a)};Object.defineProperty(M.prototype,\"m_hardPointWS\",{get:M.prototype.hA,set:M.prototype.OC});M.prototype.get_m_wheelDirectionWS=M.prototype.sB=function(){return k(Qq(this.hy),p)};M.prototype.set_m_wheelDirectionWS=M.prototype.ZD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Rq(c,a)};Object.defineProperty(M.prototype,\"m_wheelDirectionWS\",{get:M.prototype.sB,set:M.prototype.ZD});\nM.prototype.get_m_wheelAxleWS=M.prototype.rB=function(){return k(Sq(this.hy),p)};M.prototype.set_m_wheelAxleWS=M.prototype.YD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Tq(c,a)};Object.defineProperty(M.prototype,\"m_wheelAxleWS\",{get:M.prototype.rB,set:M.prototype.YD});M.prototype.get_m_isInContact=M.prototype.tA=function(){return!!Uq(this.hy)};M.prototype.set_m_isInContact=M.prototype.$C=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Vq(c,a)};\nObject.defineProperty(M.prototype,\"m_isInContact\",{get:M.prototype.tA,set:M.prototype.$C});M.prototype.get_m_groundObject=M.prototype.gA=function(){return Wq(this.hy)};M.prototype.set_m_groundObject=M.prototype.NC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Xq(c,a)};Object.defineProperty(M.prototype,\"m_groundObject\",{get:M.prototype.gA,set:M.prototype.NC});M.prototype.__destroy__=function(){Yq(this.hy)};\nfunction SB(a,c,d){IA();a&&\"object\"===typeof a&&(a=a.hy);\"object\"==typeof c&&(c=MA(c));d&&\"object\"===typeof d&&(d=d.hy);this.hy=Zq(a,c,d);h(SB)[this.hy]=this}SB.prototype=Object.create(m.prototype);SB.prototype.constructor=SB;SB.prototype.iy=SB;SB.jy={};b.btMultiSphereShape=SB;SB.prototype.setLocalScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);$q(c,a)};SB.prototype.getLocalScaling=function(){return k(ar(this.hy),p)};\nSB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);br(d,a,c)};SB.prototype.__destroy__=function(){cr(this.hy)};function R(a,c,d,e){IA();a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);\"object\"==typeof e&&(e=MA(e));this.hy=dr(a,c,d,e);h(R)[this.hy]=this}R.prototype=Object.create(q.prototype);R.prototype.constructor=R;R.prototype.iy=R;R.jy={};b.btSoftBody=R;\nR.prototype.checkLink=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);return!!er(d,a,c)};R.prototype.checkFace=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);return!!fr(e,a,c,d)};R.prototype.appendMaterial=function(){return k(gr(this.hy),A)};R.prototype.appendNode=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);hr(d,a,c)};\nR.prototype.appendLink=function(a,c,d,e){var g=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);ir(g,a,c,d,e)};R.prototype.appendFace=function(a,c,d,e){var g=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);jr(g,a,c,d,e)};\nR.prototype.appendTetra=function(a,c,d,e,g){var n=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);g&&\"object\"===typeof g&&(g=g.hy);kr(n,a,c,d,e,g)};R.prototype.appendAnchor=function(a,c,d,e){var g=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);lr(g,a,c,d,e)};\nR.prototype.addForce=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);void 0===c?mr(d,a):nr(d,a,c)};R.prototype.addAeroForceToNode=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);or(d,a,c)};R.prototype.getTotalMass=function(){return pr(this.hy)};R.prototype.setTotalMass=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);qr(d,a,c)};\nR.prototype.setMass=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);rr(d,a,c)};R.prototype.transform=R.prototype.transform=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);sr(c,a)};R.prototype.translate=R.prototype.translate=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);tr(c,a)};R.prototype.rotate=R.prototype.rotate=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ur(c,a)};\nR.prototype.scale=R.prototype.scale=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);vr(c,a)};R.prototype.generateClusters=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);return void 0===c?wr(d,a):xr(d,a,c)};R.prototype.generateBendingConstraints=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);return yr(d,a,c)};\nR.prototype.upcast=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(zr(c,a),R)};R.prototype.setAnisotropicFriction=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Ar(d,a,c)};R.prototype.getCollisionShape=function(){return k(Br(this.hy),m)};R.prototype.setContactProcessingThreshold=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Cr(c,a)};\nR.prototype.setActivationState=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Dr(c,a)};R.prototype.forceActivationState=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Er(c,a)};R.prototype.activate=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);void 0===a?Fr(c):Gr(c,a)};R.prototype.isActive=function(){return!!Hr(this.hy)};R.prototype.isKinematicObject=function(){return!!Ir(this.hy)};R.prototype.isStaticObject=function(){return!!Jr(this.hy)};\nR.prototype.isStaticOrKinematicObject=function(){return!!Kr(this.hy)};R.prototype.getRestitution=function(){return Lr(this.hy)};R.prototype.getFriction=function(){return Mr(this.hy)};R.prototype.getRollingFriction=function(){return Nr(this.hy)};R.prototype.setRestitution=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Or(c,a)};R.prototype.setFriction=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Pr(c,a)};\nR.prototype.setRollingFriction=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Qr(c,a)};R.prototype.getWorldTransform=function(){return k(Rr(this.hy),r)};R.prototype.getCollisionFlags=function(){return Sr(this.hy)};R.prototype.setCollisionFlags=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Tr(c,a)};R.prototype.setWorldTransform=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ur(c,a)};\nR.prototype.setCollisionShape=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Vr(c,a)};R.prototype.setCcdMotionThreshold=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Wr(c,a)};R.prototype.setCcdSweptSphereRadius=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Xr(c,a)};R.prototype.getUserIndex=function(){return Yr(this.hy)};R.prototype.setUserIndex=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Zr(c,a)};\nR.prototype.getUserPointer=function(){return k($r(this.hy),SA)};R.prototype.setUserPointer=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);as(c,a)};R.prototype.getBroadphaseHandle=function(){return k(bs(this.hy),t)};R.prototype.get_m_cfg=R.prototype.Kz=function(){return k(cs(this.hy),S)};R.prototype.set_m_cfg=R.prototype.qC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ds(c,a)};Object.defineProperty(R.prototype,\"m_cfg\",{get:R.prototype.Kz,set:R.prototype.qC});\nR.prototype.get_m_nodes=R.prototype.GA=function(){return k(es(this.hy),TB)};R.prototype.set_m_nodes=R.prototype.mD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);gs(c,a)};Object.defineProperty(R.prototype,\"m_nodes\",{get:R.prototype.GA,set:R.prototype.mD});R.prototype.get_m_faces=R.prototype.Gy=function(){return k(hs(this.hy),UB)};R.prototype.set_m_faces=R.prototype.Py=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);is(c,a)};\nObject.defineProperty(R.prototype,\"m_faces\",{get:R.prototype.Gy,set:R.prototype.Py});R.prototype.get_m_materials=R.prototype.DA=function(){return k(js(this.hy),qB)};R.prototype.set_m_materials=R.prototype.jD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ks(c,a)};Object.defineProperty(R.prototype,\"m_materials\",{get:R.prototype.DA,set:R.prototype.jD});R.prototype.get_m_anchors=R.prototype.Az=function(){return k(ls(this.hy),RB)};\nR.prototype.set_m_anchors=R.prototype.gC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ms(c,a)};Object.defineProperty(R.prototype,\"m_anchors\",{get:R.prototype.Az,set:R.prototype.gC});R.prototype.__destroy__=function(){ns(this.hy)};function VB(){throw\"cannot construct a btIntArray, no constructor in IDL\";}VB.prototype=Object.create(f.prototype);VB.prototype.constructor=VB;VB.prototype.iy=VB;VB.jy={};b.btIntArray=VB;VB.prototype.size=VB.prototype.size=function(){return ps(this.hy)};\nVB.prototype.at=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return qs(c,a)};VB.prototype.__destroy__=function(){rs(this.hy)};function S(){throw\"cannot construct a Config, no constructor in IDL\";}S.prototype=Object.create(f.prototype);S.prototype.constructor=S;S.prototype.iy=S;S.jy={};b.Config=S;S.prototype.get_kVCF=S.prototype.sz=function(){return ss(this.hy)};S.prototype.set_kVCF=S.prototype.$B=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ts(c,a)};\nObject.defineProperty(S.prototype,\"kVCF\",{get:S.prototype.sz,set:S.prototype.$B});S.prototype.get_kDP=S.prototype.fz=function(){return us(this.hy)};S.prototype.set_kDP=S.prototype.NB=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);vs(c,a)};Object.defineProperty(S.prototype,\"kDP\",{get:S.prototype.fz,set:S.prototype.NB});S.prototype.get_kDG=S.prototype.ez=function(){return xs(this.hy)};S.prototype.set_kDG=S.prototype.MB=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ys(c,a)};\nObject.defineProperty(S.prototype,\"kDG\",{get:S.prototype.ez,set:S.prototype.MB});S.prototype.get_kLF=S.prototype.hz=function(){return zs(this.hy)};S.prototype.set_kLF=S.prototype.PB=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);As(c,a)};Object.defineProperty(S.prototype,\"kLF\",{get:S.prototype.hz,set:S.prototype.PB});S.prototype.get_kPR=S.prototype.jz=function(){return Bs(this.hy)};S.prototype.set_kPR=S.prototype.RB=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Cs(c,a)};\nObject.defineProperty(S.prototype,\"kPR\",{get:S.prototype.jz,set:S.prototype.RB});S.prototype.get_kVC=S.prototype.rz=function(){return Ds(this.hy)};S.prototype.set_kVC=S.prototype.ZB=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Es(c,a)};Object.defineProperty(S.prototype,\"kVC\",{get:S.prototype.rz,set:S.prototype.ZB});S.prototype.get_kDF=S.prototype.dz=function(){return Fs(this.hy)};S.prototype.set_kDF=S.prototype.LB=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Gs(c,a)};\nObject.defineProperty(S.prototype,\"kDF\",{get:S.prototype.dz,set:S.prototype.LB});S.prototype.get_kMT=S.prototype.iz=function(){return Hs(this.hy)};S.prototype.set_kMT=S.prototype.QB=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Is(c,a)};Object.defineProperty(S.prototype,\"kMT\",{get:S.prototype.iz,set:S.prototype.QB});S.prototype.get_kCHR=S.prototype.cz=function(){return Js(this.hy)};S.prototype.set_kCHR=S.prototype.KB=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ks(c,a)};\nObject.defineProperty(S.prototype,\"kCHR\",{get:S.prototype.cz,set:S.prototype.KB});S.prototype.get_kKHR=S.prototype.gz=function(){return Ls(this.hy)};S.prototype.set_kKHR=S.prototype.OB=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ms(c,a)};Object.defineProperty(S.prototype,\"kKHR\",{get:S.prototype.gz,set:S.prototype.OB});S.prototype.get_kSHR=S.prototype.kz=function(){return Ns(this.hy)};\nS.prototype.set_kSHR=S.prototype.SB=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Os(c,a)};Object.defineProperty(S.prototype,\"kSHR\",{get:S.prototype.kz,set:S.prototype.SB});S.prototype.get_kAHR=S.prototype.bz=function(){return Ps(this.hy)};S.prototype.set_kAHR=S.prototype.JB=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Qs(c,a)};Object.defineProperty(S.prototype,\"kAHR\",{get:S.prototype.bz,set:S.prototype.JB});S.prototype.get_kSRHR_CL=S.prototype.nz=function(){return Rs(this.hy)};\nS.prototype.set_kSRHR_CL=S.prototype.VB=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ss(c,a)};Object.defineProperty(S.prototype,\"kSRHR_CL\",{get:S.prototype.nz,set:S.prototype.VB});S.prototype.get_kSKHR_CL=S.prototype.lz=function(){return Ts(this.hy)};S.prototype.set_kSKHR_CL=S.prototype.TB=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Us(c,a)};Object.defineProperty(S.prototype,\"kSKHR_CL\",{get:S.prototype.lz,set:S.prototype.TB});S.prototype.get_kSSHR_CL=S.prototype.pz=function(){return Vs(this.hy)};\nS.prototype.set_kSSHR_CL=S.prototype.XB=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ws(c,a)};Object.defineProperty(S.prototype,\"kSSHR_CL\",{get:S.prototype.pz,set:S.prototype.XB});S.prototype.get_kSR_SPLT_CL=S.prototype.oz=function(){return Xs(this.hy)};S.prototype.set_kSR_SPLT_CL=S.prototype.WB=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ys(c,a)};Object.defineProperty(S.prototype,\"kSR_SPLT_CL\",{get:S.prototype.oz,set:S.prototype.WB});\nS.prototype.get_kSK_SPLT_CL=S.prototype.mz=function(){return Zs(this.hy)};S.prototype.set_kSK_SPLT_CL=S.prototype.UB=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);$s(c,a)};Object.defineProperty(S.prototype,\"kSK_SPLT_CL\",{get:S.prototype.mz,set:S.prototype.UB});S.prototype.get_kSS_SPLT_CL=S.prototype.qz=function(){return at(this.hy)};S.prototype.set_kSS_SPLT_CL=S.prototype.YB=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);bt(c,a)};\nObject.defineProperty(S.prototype,\"kSS_SPLT_CL\",{get:S.prototype.qz,set:S.prototype.YB});S.prototype.get_maxvolume=S.prototype.yB=function(){return ct(this.hy)};S.prototype.set_maxvolume=S.prototype.eE=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);dt(c,a)};Object.defineProperty(S.prototype,\"maxvolume\",{get:S.prototype.yB,set:S.prototype.eE});S.prototype.get_timescale=S.prototype.AB=function(){return et(this.hy)};\nS.prototype.set_timescale=S.prototype.gE=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ft(c,a)};Object.defineProperty(S.prototype,\"timescale\",{get:S.prototype.AB,set:S.prototype.gE});S.prototype.get_viterations=S.prototype.BB=function(){return gt(this.hy)};S.prototype.set_viterations=S.prototype.hE=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ht(c,a)};Object.defineProperty(S.prototype,\"viterations\",{get:S.prototype.BB,set:S.prototype.hE});\nS.prototype.get_piterations=S.prototype.zB=function(){return it(this.hy)};S.prototype.set_piterations=S.prototype.fE=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);jt(c,a)};Object.defineProperty(S.prototype,\"piterations\",{get:S.prototype.zB,set:S.prototype.fE});S.prototype.get_diterations=S.prototype.az=function(){return kt(this.hy)};S.prototype.set_diterations=S.prototype.IB=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);lt(c,a)};\nObject.defineProperty(S.prototype,\"diterations\",{get:S.prototype.az,set:S.prototype.IB});S.prototype.get_citerations=S.prototype.Zy=function(){return mt(this.hy)};S.prototype.set_citerations=S.prototype.GB=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);nt(c,a)};Object.defineProperty(S.prototype,\"citerations\",{get:S.prototype.Zy,set:S.prototype.GB});S.prototype.get_collisions=S.prototype.$y=function(){return ot(this.hy)};\nS.prototype.set_collisions=S.prototype.HB=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);pt(c,a)};Object.defineProperty(S.prototype,\"collisions\",{get:S.prototype.$y,set:S.prototype.HB});S.prototype.__destroy__=function(){qt(this.hy)};function Node(){throw\"cannot construct a Node, no constructor in IDL\";}Node.prototype=Object.create(f.prototype);Node.prototype.constructor=Node;Node.prototype.iy=Node;Node.jy={};b.Node=Node;\nNode.prototype.get_m_x=Node.prototype.xB=function(){return k(rt(this.hy),p)};Node.prototype.set_m_x=Node.prototype.dE=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);st(c,a)};Object.defineProperty(Node.prototype,\"m_x\",{get:Node.prototype.xB,set:Node.prototype.dE});Node.prototype.get_m_q=Node.prototype.OA=function(){return k(tt(this.hy),p)};Node.prototype.set_m_q=Node.prototype.uD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ut(c,a)};\nObject.defineProperty(Node.prototype,\"m_q\",{get:Node.prototype.OA,set:Node.prototype.uD});Node.prototype.get_m_v=Node.prototype.pB=function(){return k(vt(this.hy),p)};Node.prototype.set_m_v=Node.prototype.WD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);wt(c,a)};Object.defineProperty(Node.prototype,\"m_v\",{get:Node.prototype.pB,set:Node.prototype.WD});Node.prototype.get_m_f=Node.prototype.bA=function(){return k(xt(this.hy),p)};\nNode.prototype.set_m_f=Node.prototype.IC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);yt(c,a)};Object.defineProperty(Node.prototype,\"m_f\",{get:Node.prototype.bA,set:Node.prototype.IC});Node.prototype.get_m_n=Node.prototype.Hy=function(){return k(zt(this.hy),p)};Node.prototype.set_m_n=Node.prototype.Qy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);At(c,a)};Object.defineProperty(Node.prototype,\"m_n\",{get:Node.prototype.Hy,set:Node.prototype.Qy});\nNode.prototype.get_m_im=Node.prototype.pA=function(){return Bt(this.hy)};Node.prototype.set_m_im=Node.prototype.WC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ct(c,a)};Object.defineProperty(Node.prototype,\"m_im\",{get:Node.prototype.pA,set:Node.prototype.WC});Node.prototype.get_m_area=Node.prototype.Dz=function(){return Dt(this.hy)};Node.prototype.set_m_area=Node.prototype.jC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Et(c,a)};\nObject.defineProperty(Node.prototype,\"m_area\",{get:Node.prototype.Dz,set:Node.prototype.jC});Node.prototype.__destroy__=function(){Ft(this.hy)};function WB(){this.hy=Gt();h(WB)[this.hy]=this}WB.prototype=Object.create(f.prototype);WB.prototype.constructor=WB;WB.prototype.iy=WB;WB.jy={};b.btGhostPairCallback=WB;WB.prototype.__destroy__=function(){Ht(this.hy)};function XB(){throw\"cannot construct a btOverlappingPairCallback, no constructor in IDL\";}XB.prototype=Object.create(f.prototype);\nXB.prototype.constructor=XB;XB.prototype.iy=XB;XB.jy={};b.btOverlappingPairCallback=XB;XB.prototype.__destroy__=function(){It(this.hy)};function T(a,c,d,e){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);this.hy=void 0===e?Jt(a,c,d):Kt(a,c,d,e);h(T)[this.hy]=this}T.prototype=Object.create(ZA.prototype);T.prototype.constructor=T;T.prototype.iy=T;T.jy={};b.btKinematicCharacterController=T;\nT.prototype.setUpAxis=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Lt(c,a)};T.prototype.setWalkDirection=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Mt(c,a)};T.prototype.setVelocityForTimeInterval=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Nt(d,a,c)};T.prototype.warp=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ot(c,a)};T.prototype.preStep=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Pt(c,a)};\nT.prototype.playerStep=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Qt(d,a,c)};T.prototype.setFallSpeed=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Rt(c,a)};T.prototype.setJumpSpeed=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);St(c,a)};T.prototype.setMaxJumpHeight=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Tt(c,a)};T.prototype.canJump=function(){return!!Ut(this.hy)};T.prototype.jump=function(){Vt(this.hy)};\nT.prototype.setGravity=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Wt(c,a)};T.prototype.getGravity=function(){return Xt(this.hy)};T.prototype.setMaxSlope=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Yt(c,a)};T.prototype.getMaxSlope=function(){return Zt(this.hy)};T.prototype.getGhostObject=function(){return k($t(this.hy),U)};T.prototype.setUseGhostSweepTest=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);au(c,a)};T.prototype.onGround=function(){return!!bu(this.hy)};\nT.prototype.setUpInterpolate=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);cu(c,a)};T.prototype.updateAction=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);du(d,a,c)};T.prototype.__destroy__=function(){eu(this.hy)};function YB(){throw\"cannot construct a btSoftBodyArray, no constructor in IDL\";}YB.prototype=Object.create(f.prototype);YB.prototype.constructor=YB;YB.prototype.iy=YB;YB.jy={};b.btSoftBodyArray=YB;\nYB.prototype.size=YB.prototype.size=function(){return fu(this.hy)};YB.prototype.at=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(gu(c,a),R)};YB.prototype.__destroy__=function(){hu(this.hy)};function PB(){throw\"cannot construct a btFaceArray, no constructor in IDL\";}PB.prototype=Object.create(f.prototype);PB.prototype.constructor=PB;PB.prototype.iy=PB;PB.jy={};b.btFaceArray=PB;PB.prototype.size=PB.prototype.size=function(){return iu(this.hy)};\nPB.prototype.at=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(ju(c,a),ZB)};PB.prototype.__destroy__=function(){ku(this.hy)};function $B(a,c){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);this.hy=lu(a,c);h($B)[this.hy]=this}$B.prototype=Object.create(UA.prototype);$B.prototype.constructor=$B;$B.prototype.iy=$B;$B.jy={};b.btStaticPlaneShape=$B;$B.prototype.setLocalScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);mu(c,a)};\n$B.prototype.getLocalScaling=function(){return k(nu(this.hy),p)};$B.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);ou(d,a,c)};$B.prototype.__destroy__=function(){pu(this.hy)};function PA(){throw\"cannot construct a btOverlappingPairCache, no constructor in IDL\";}PA.prototype=Object.create(f.prototype);PA.prototype.constructor=PA;PA.prototype.iy=PA;PA.jy={};b.btOverlappingPairCache=PA;\nPA.prototype.setInternalGhostPairCallback=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);qu(c,a)};PA.prototype.getNumOverlappingPairs=function(){return ru(this.hy)};PA.prototype.__destroy__=function(){su(this.hy)};function vB(){throw\"cannot construct a btIndexedMesh, no constructor in IDL\";}vB.prototype=Object.create(f.prototype);vB.prototype.constructor=vB;vB.prototype.iy=vB;vB.jy={};b.btIndexedMesh=vB;vB.prototype.get_m_numTriangles=vB.prototype.KA=function(){return tu(this.hy)};\nvB.prototype.set_m_numTriangles=vB.prototype.qD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);uu(c,a)};Object.defineProperty(vB.prototype,\"m_numTriangles\",{get:vB.prototype.KA,set:vB.prototype.qD});vB.prototype.__destroy__=function(){vu(this.hy)};function V(a,c,d,e,g){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);g&&\"object\"===typeof g&&(g=g.hy);this.hy=wu(a,c,d,e,g);h(V)[this.hy]=this}V.prototype=Object.create(x.prototype);\nV.prototype.constructor=V;V.prototype.iy=V;V.jy={};b.btSoftRigidDynamicsWorld=V;V.prototype.addSoftBody=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);xu(e,a,c,d)};V.prototype.removeSoftBody=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);yu(c,a)};V.prototype.removeCollisionObject=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);zu(c,a)};V.prototype.getWorldInfo=function(){return k(Au(this.hy),J)};\nV.prototype.getSoftBodyArray=function(){return k(Bu(this.hy),YB)};V.prototype.getDispatcher=function(){return k(Cu(this.hy),OA)};V.prototype.rayTest=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);Du(e,a,c,d)};V.prototype.getPairCache=function(){return k(Eu(this.hy),PA)};V.prototype.getDispatchInfo=function(){return k(Fu(this.hy),l)};\nV.prototype.addCollisionObject=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);void 0===c?Gu(e,a):void 0===d?Hu(e,a,c):Iu(e,a,c,d)};V.prototype.getBroadphase=function(){return k(Ju(this.hy),QA)};\nV.prototype.convexSweepTest=function(a,c,d,e,g){var n=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);g&&\"object\"===typeof g&&(g=g.hy);Ku(n,a,c,d,e,g)};V.prototype.contactPairTest=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);Lu(e,a,c,d)};\nV.prototype.contactTest=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Mu(d,a,c)};V.prototype.updateSingleAabb=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Nu(c,a)};V.prototype.setDebugDrawer=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ou(c,a)};V.prototype.getDebugDrawer=function(){return k(Pu(this.hy),RA)};V.prototype.debugDrawWorld=function(){Qu(this.hy)};\nV.prototype.debugDrawObject=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);Ru(e,a,c,d)};V.prototype.setGravity=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Su(c,a)};V.prototype.getGravity=function(){return k(Tu(this.hy),p)};\nV.prototype.addRigidBody=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);void 0===c?Uu(e,a):void 0===d?_emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_2(e,a,c):Vu(e,a,c,d)};V.prototype.removeRigidBody=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Wu(c,a)};\nV.prototype.addConstraint=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);void 0===c?Xu(d,a):Yu(d,a,c)};V.prototype.removeConstraint=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Zu(c,a)};V.prototype.stepSimulation=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);return void 0===c?$u(e,a):void 0===d?av(e,a,c):bv(e,a,c,d)};\nV.prototype.setContactAddedCallback=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);cv(c,a)};V.prototype.setContactProcessedCallback=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);dv(c,a)};V.prototype.setContactDestroyedCallback=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ev(c,a)};V.prototype.addAction=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);fv(c,a)};V.prototype.removeAction=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);gv(c,a)};\nV.prototype.getSolverInfo=function(){return k(hv(this.hy),v)};V.prototype.setInternalTickCallback=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);void 0===c?iv(e,a):void 0===d?jv(e,a,c):kv(e,a,c,d)};V.prototype.__destroy__=function(){lv(this.hy)};\nfunction aC(a,c,d,e){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);this.hy=mv(a,c,d,e);h(aC)[this.hy]=this}aC.prototype=Object.create(TA.prototype);aC.prototype.constructor=aC;aC.prototype.iy=aC;aC.jy={};b.btFixedConstraint=aC;aC.prototype.enableFeedback=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);nv(c,a)};aC.prototype.getBreakingImpulseThreshold=function(){return ov(this.hy)};\naC.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);pv(c,a)};aC.prototype.getParam=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);return qv(d,a,c)};aC.prototype.setParam=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);rv(e,a,c,d)};aC.prototype.__destroy__=function(){sv(this.hy)};\nfunction r(a,c){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);this.hy=void 0===a?tv():void 0===c?_emscripten_bind_btTransform_btTransform_1(a):uv(a,c);h(r)[this.hy]=this}r.prototype=Object.create(f.prototype);r.prototype.constructor=r;r.prototype.iy=r;r.jy={};b.btTransform=r;r.prototype.setIdentity=function(){vv(this.hy)};r.prototype.setOrigin=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);wv(c,a)};\nr.prototype.setRotation=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);xv(c,a)};r.prototype.getOrigin=function(){return k(yv(this.hy),p)};r.prototype.getRotation=function(){return k(zv(this.hy),W)};r.prototype.getBasis=function(){return k(Av(this.hy),jB)};r.prototype.setFromOpenGLMatrix=function(a){var c=this.hy;IA();\"object\"==typeof a&&(a=MA(a));Bv(c,a)};r.prototype.inverse=r.prototype.inverse=function(){return k(Cv(this.hy),r)};\nr.prototype.op_mul=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(Dv(c,a),r)};r.prototype.__destroy__=function(){Ev(this.hy)};function X(a,c){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);this.hy=Fv(a,c);h(X)[this.hy]=this}X.prototype=Object.create(z.prototype);X.prototype.constructor=X;X.prototype.iy=X;X.jy={};b.ClosestRayResultCallback=X;X.prototype.hasHit=function(){return!!Gv(this.hy)};\nX.prototype.get_m_rayFromWorld=X.prototype.Iy=function(){return k(Hv(this.hy),p)};X.prototype.set_m_rayFromWorld=X.prototype.Ry=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Iv(c,a)};Object.defineProperty(X.prototype,\"m_rayFromWorld\",{get:X.prototype.Iy,set:X.prototype.Ry});X.prototype.get_m_rayToWorld=X.prototype.Jy=function(){return k(Jv(this.hy),p)};X.prototype.set_m_rayToWorld=X.prototype.Sy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Kv(c,a)};\nObject.defineProperty(X.prototype,\"m_rayToWorld\",{get:X.prototype.Jy,set:X.prototype.Sy});X.prototype.get_m_hitNormalWorld=X.prototype.sy=function(){return k(Lv(this.hy),p)};X.prototype.set_m_hitNormalWorld=X.prototype.zy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Mv(c,a)};Object.defineProperty(X.prototype,\"m_hitNormalWorld\",{get:X.prototype.sy,set:X.prototype.zy});X.prototype.get_m_hitPointWorld=X.prototype.ty=function(){return k(Nv(this.hy),p)};\nX.prototype.set_m_hitPointWorld=X.prototype.Ay=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ov(c,a)};Object.defineProperty(X.prototype,\"m_hitPointWorld\",{get:X.prototype.ty,set:X.prototype.Ay});X.prototype.get_m_collisionFilterGroup=X.prototype.ky=function(){return Pv(this.hy)};X.prototype.set_m_collisionFilterGroup=X.prototype.my=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Qv(c,a)};Object.defineProperty(X.prototype,\"m_collisionFilterGroup\",{get:X.prototype.ky,set:X.prototype.my});\nX.prototype.get_m_collisionFilterMask=X.prototype.ly=function(){return Rv(this.hy)};X.prototype.set_m_collisionFilterMask=X.prototype.ny=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Sv(c,a)};Object.defineProperty(X.prototype,\"m_collisionFilterMask\",{get:X.prototype.ly,set:X.prototype.ny});X.prototype.get_m_closestHitFraction=X.prototype.oy=function(){return Tv(this.hy)};\nX.prototype.set_m_closestHitFraction=X.prototype.py=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Uv(c,a)};Object.defineProperty(X.prototype,\"m_closestHitFraction\",{get:X.prototype.oy,set:X.prototype.py});X.prototype.get_m_collisionObject=X.prototype.qy=function(){return k(Vv(this.hy),q)};X.prototype.set_m_collisionObject=X.prototype.xy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Wv(c,a)};Object.defineProperty(X.prototype,\"m_collisionObject\",{get:X.prototype.qy,set:X.prototype.xy});\nX.prototype.__destroy__=function(){Xv(this.hy)};function bC(a){a&&\"object\"===typeof a&&(a=a.hy);this.hy=void 0===a?Yv():Zv(a);h(bC)[this.hy]=this}bC.prototype=Object.create(WA.prototype);bC.prototype.constructor=bC;bC.prototype.iy=bC;bC.jy={};b.btSoftBodyRigidBodyCollisionConfiguration=bC;bC.prototype.__destroy__=function(){$v(this.hy)};function cC(){this.hy=aw();h(cC)[this.hy]=this}cC.prototype=Object.create(hB.prototype);cC.prototype.constructor=cC;cC.prototype.iy=cC;cC.jy={};\nb.ConcreteContactResultCallback=cC;cC.prototype.addSingleResult=function(a,c,d,e,g,n,F){var aa=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);g&&\"object\"===typeof g&&(g=g.hy);n&&\"object\"===typeof n&&(n=n.hy);F&&\"object\"===typeof F&&(F=F.hy);return bw(aa,a,c,d,e,g,n,F)};cC.prototype.__destroy__=function(){cw(this.hy)};\nfunction dC(a,c,d){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);this.hy=void 0===d?dw(a,c):ew(a,c,d);h(dC)[this.hy]=this}dC.prototype=Object.create(XA.prototype);dC.prototype.constructor=dC;dC.prototype.iy=dC;dC.jy={};b.btBvhTriangleMeshShape=dC;dC.prototype.setLocalScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);fw(c,a)};dC.prototype.getLocalScaling=function(){return k(gw(this.hy),p)};\ndC.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);hw(d,a,c)};dC.prototype.__destroy__=function(){iw(this.hy)};function oB(){throw\"cannot construct a btConstCollisionObjectArray, no constructor in IDL\";}oB.prototype=Object.create(f.prototype);oB.prototype.constructor=oB;oB.prototype.iy=oB;oB.jy={};b.btConstCollisionObjectArray=oB;oB.prototype.size=oB.prototype.size=function(){return jw(this.hy)};\noB.prototype.at=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(kw(c,a),q)};oB.prototype.__destroy__=function(){lw(this.hy)};function eC(a,c,d,e,g){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);g&&\"object\"===typeof g&&(g=g.hy);this.hy=void 0===e?mw(a,c,d):void 0===g?_emscripten_bind_btSliderConstraint_btSliderConstraint_4(a,c,d,e):nw(a,c,d,e,g);h(eC)[this.hy]=this}eC.prototype=Object.create(TA.prototype);\neC.prototype.constructor=eC;eC.prototype.iy=eC;eC.jy={};b.btSliderConstraint=eC;eC.prototype.setLowerLinLimit=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ow(c,a)};eC.prototype.setUpperLinLimit=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);pw(c,a)};eC.prototype.setLowerAngLimit=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);qw(c,a)};eC.prototype.setUpperAngLimit=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);rw(c,a)};\neC.prototype.enableFeedback=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);sw(c,a)};eC.prototype.getBreakingImpulseThreshold=function(){return tw(this.hy)};eC.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);uw(c,a)};eC.prototype.getParam=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);return vw(d,a,c)};\neC.prototype.setParam=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);ww(e,a,c,d)};eC.prototype.__destroy__=function(){xw(this.hy)};function U(){this.hy=yw();h(U)[this.hy]=this}U.prototype=Object.create(w.prototype);U.prototype.constructor=U;U.prototype.iy=U;U.jy={};b.btPairCachingGhostObject=U;\nU.prototype.setAnisotropicFriction=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);zw(d,a,c)};U.prototype.getCollisionShape=function(){return k(Aw(this.hy),m)};U.prototype.setContactProcessingThreshold=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Bw(c,a)};U.prototype.setActivationState=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Cw(c,a)};\nU.prototype.forceActivationState=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Dw(c,a)};U.prototype.activate=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);void 0===a?Ew(c):Fw(c,a)};U.prototype.isActive=function(){return!!Gw(this.hy)};U.prototype.isKinematicObject=function(){return!!Hw(this.hy)};U.prototype.isStaticObject=function(){return!!Iw(this.hy)};U.prototype.isStaticOrKinematicObject=function(){return!!Jw(this.hy)};U.prototype.getRestitution=function(){return Kw(this.hy)};\nU.prototype.getFriction=function(){return Lw(this.hy)};U.prototype.getRollingFriction=function(){return Mw(this.hy)};U.prototype.setRestitution=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Nw(c,a)};U.prototype.setFriction=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ow(c,a)};U.prototype.setRollingFriction=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Pw(c,a)};U.prototype.getWorldTransform=function(){return k(Qw(this.hy),r)};U.prototype.getCollisionFlags=function(){return Rw(this.hy)};\nU.prototype.setCollisionFlags=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Sw(c,a)};U.prototype.setWorldTransform=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Tw(c,a)};U.prototype.setCollisionShape=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Uw(c,a)};U.prototype.setCcdMotionThreshold=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Vw(c,a)};U.prototype.setCcdSweptSphereRadius=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ww(c,a)};\nU.prototype.getUserIndex=function(){return Xw(this.hy)};U.prototype.setUserIndex=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Yw(c,a)};U.prototype.getUserPointer=function(){return k(Zw(this.hy),SA)};U.prototype.setUserPointer=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);$w(c,a)};U.prototype.getBroadphaseHandle=function(){return k(ax(this.hy),t)};U.prototype.getNumOverlappingObjects=function(){return bx(this.hy)};\nU.prototype.getOverlappingObject=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(cx(c,a),q)};U.prototype.__destroy__=function(){dx(this.hy)};function D(){throw\"cannot construct a btManifoldPoint, no constructor in IDL\";}D.prototype=Object.create(f.prototype);D.prototype.constructor=D;D.prototype.iy=D;D.jy={};b.btManifoldPoint=D;D.prototype.getPositionWorldOnA=function(){return k(ex(this.hy),p)};D.prototype.getPositionWorldOnB=function(){return k(fx(this.hy),p)};\nD.prototype.getAppliedImpulse=function(){return gx(this.hy)};D.prototype.getDistance=function(){return hx(this.hy)};D.prototype.get_m_localPointA=D.prototype.AA=function(){return k(ix(this.hy),p)};D.prototype.set_m_localPointA=D.prototype.gD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);jx(c,a)};Object.defineProperty(D.prototype,\"m_localPointA\",{get:D.prototype.AA,set:D.prototype.gD});D.prototype.get_m_localPointB=D.prototype.BA=function(){return k(kx(this.hy),p)};\nD.prototype.set_m_localPointB=D.prototype.hD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);lx(c,a)};Object.defineProperty(D.prototype,\"m_localPointB\",{get:D.prototype.BA,set:D.prototype.hD});D.prototype.get_m_positionWorldOnB=D.prototype.NA=function(){return k(mx(this.hy),p)};D.prototype.set_m_positionWorldOnB=D.prototype.tD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);nx(c,a)};Object.defineProperty(D.prototype,\"m_positionWorldOnB\",{get:D.prototype.NA,set:D.prototype.tD});\nD.prototype.get_m_positionWorldOnA=D.prototype.MA=function(){return k(ox(this.hy),p)};D.prototype.set_m_positionWorldOnA=D.prototype.sD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);px(c,a)};Object.defineProperty(D.prototype,\"m_positionWorldOnA\",{get:D.prototype.MA,set:D.prototype.sD});D.prototype.get_m_normalWorldOnB=D.prototype.IA=function(){return k(qx(this.hy),p)};D.prototype.set_m_normalWorldOnB=D.prototype.oD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);rx(c,a)};\nObject.defineProperty(D.prototype,\"m_normalWorldOnB\",{get:D.prototype.IA,set:D.prototype.oD});D.prototype.get_m_userPersistentData=D.prototype.oB=function(){return sx(this.hy)};D.prototype.set_m_userPersistentData=D.prototype.VD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);tx(c,a)};Object.defineProperty(D.prototype,\"m_userPersistentData\",{get:D.prototype.oB,set:D.prototype.VD});D.prototype.__destroy__=function(){ux(this.hy)};\nfunction fC(a,c,d,e){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);this.hy=void 0===d?vx(a,c):void 0===e?_emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_3(a,c,d):wx(a,c,d,e);h(fC)[this.hy]=this}fC.prototype=Object.create(TA.prototype);fC.prototype.constructor=fC;fC.prototype.iy=fC;fC.jy={};b.btPoint2PointConstraint=fC;\nfC.prototype.setPivotA=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);xx(c,a)};fC.prototype.setPivotB=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);yx(c,a)};fC.prototype.getPivotInA=function(){return k(zx(this.hy),p)};fC.prototype.getPivotInB=function(){return k(Ax(this.hy),p)};fC.prototype.enableFeedback=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Bx(c,a)};fC.prototype.getBreakingImpulseThreshold=function(){return Cx(this.hy)};\nfC.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Dx(c,a)};fC.prototype.getParam=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);return Ex(d,a,c)};fC.prototype.setParam=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);Fx(e,a,c,d)};fC.prototype.get_m_setting=fC.prototype.VA=function(){return k(Gx(this.hy),H)};\nfC.prototype.set_m_setting=fC.prototype.BD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Hx(c,a)};Object.defineProperty(fC.prototype,\"m_setting\",{get:fC.prototype.VA,set:fC.prototype.BD});fC.prototype.__destroy__=function(){Ix(this.hy)};function gC(){this.hy=Jx();h(gC)[this.hy]=this}gC.prototype=Object.create(f.prototype);gC.prototype.constructor=gC;gC.prototype.iy=gC;gC.jy={};b.btSoftBodyHelpers=gC;\ngC.prototype.CreateRope=function(a,c,d,e,g){var n=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);g&&\"object\"===typeof g&&(g=g.hy);return k(Kx(n,a,c,d,e,g),R)};\ngC.prototype.CreatePatch=function(a,c,d,e,g,n,F,aa,ta){var Rb=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);g&&\"object\"===typeof g&&(g=g.hy);n&&\"object\"===typeof n&&(n=n.hy);F&&\"object\"===typeof F&&(F=F.hy);aa&&\"object\"===typeof aa&&(aa=aa.hy);ta&&\"object\"===typeof ta&&(ta=ta.hy);return k(Lx(Rb,a,c,d,e,g,n,F,aa,ta),R)};\ngC.prototype.CreatePatchUV=function(a,c,d,e,g,n,F,aa,ta,Rb){var nC=this.hy;IA();a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);g&&\"object\"===typeof g&&(g=g.hy);n&&\"object\"===typeof n&&(n=n.hy);F&&\"object\"===typeof F&&(F=F.hy);aa&&\"object\"===typeof aa&&(aa=aa.hy);ta&&\"object\"===typeof ta&&(ta=ta.hy);\"object\"==typeof Rb&&(Rb=MA(Rb));return k(Mx(nC,a,c,d,e,g,n,F,aa,ta,Rb),R)};\ngC.prototype.CreateEllipsoid=function(a,c,d,e){var g=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);return k(Nx(g,a,c,d,e),R)};\ngC.prototype.CreateFromTriMesh=function(a,c,d,e,g){var n=this.hy;IA();a&&\"object\"===typeof a&&(a=a.hy);\"object\"==typeof c&&(c=MA(c));if(\"object\"==typeof d&&\"object\"===typeof d){var F=JA(d,Aa);KA(d,Aa,F);d=F}e&&\"object\"===typeof e&&(e=e.hy);g&&\"object\"===typeof g&&(g=g.hy);return k(Ox(n,a,c,d,e,g),R)};\ngC.prototype.CreateFromConvexHull=function(a,c,d,e){var g=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);return k(Px(g,a,c,d,e),R)};gC.prototype.__destroy__=function(){Qx(this.hy)};function t(){throw\"cannot construct a btBroadphaseProxy, no constructor in IDL\";}t.prototype=Object.create(f.prototype);t.prototype.constructor=t;t.prototype.iy=t;t.jy={};b.btBroadphaseProxy=t;\nt.prototype.get_m_collisionFilterGroup=t.prototype.ky=function(){return Rx(this.hy)};t.prototype.set_m_collisionFilterGroup=t.prototype.my=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Sx(c,a)};Object.defineProperty(t.prototype,\"m_collisionFilterGroup\",{get:t.prototype.ky,set:t.prototype.my});t.prototype.get_m_collisionFilterMask=t.prototype.ly=function(){return Tx(this.hy)};\nt.prototype.set_m_collisionFilterMask=t.prototype.ny=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ux(c,a)};Object.defineProperty(t.prototype,\"m_collisionFilterMask\",{get:t.prototype.ly,set:t.prototype.ny});t.prototype.__destroy__=function(){Vx(this.hy)};function TB(){throw\"cannot construct a tNodeArray, no constructor in IDL\";}TB.prototype=Object.create(f.prototype);TB.prototype.constructor=TB;TB.prototype.iy=TB;TB.jy={};b.tNodeArray=TB;TB.prototype.size=TB.prototype.size=function(){return Wx(this.hy)};\nTB.prototype.at=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(Xx(c,a),Node)};TB.prototype.__destroy__=function(){Yx(this.hy)};function hC(a){a&&\"object\"===typeof a&&(a=a.hy);this.hy=Zx(a);h(hC)[this.hy]=this}hC.prototype=Object.create(m.prototype);hC.prototype.constructor=hC;hC.prototype.iy=hC;hC.jy={};b.btBoxShape=hC;hC.prototype.setMargin=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);$x(c,a)};hC.prototype.getMargin=function(){return ay(this.hy)};\nhC.prototype.setLocalScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);by(c,a)};hC.prototype.getLocalScaling=function(){return k(cy(this.hy),p)};hC.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);dy(d,a,c)};hC.prototype.__destroy__=function(){ey(this.hy)};function ZB(){throw\"cannot construct a btFace, no constructor in IDL\";}ZB.prototype=Object.create(f.prototype);ZB.prototype.constructor=ZB;\nZB.prototype.iy=ZB;ZB.jy={};b.btFace=ZB;ZB.prototype.get_m_indices=ZB.prototype.rA=function(){return k(fy(this.hy),VB)};ZB.prototype.set_m_indices=ZB.prototype.YC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);gy(c,a)};Object.defineProperty(ZB.prototype,\"m_indices\",{get:ZB.prototype.rA,set:ZB.prototype.YC});ZB.prototype.get_m_plane=ZB.prototype.LA=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return hy(c,a)};\nZB.prototype.set_m_plane=ZB.prototype.rD=function(a,c){var d=this.hy;IA();a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);iy(d,a,c)};Object.defineProperty(ZB.prototype,\"m_plane\",{get:ZB.prototype.LA,set:ZB.prototype.rD});ZB.prototype.__destroy__=function(){jy(this.hy)};function iC(){this.hy=ky();h(iC)[this.hy]=this}iC.prototype=Object.create(RA.prototype);iC.prototype.constructor=iC;iC.prototype.iy=iC;iC.jy={};b.DebugDrawer=iC;\niC.prototype.drawLine=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);ly(e,a,c,d)};iC.prototype.drawContactPoint=function(a,c,d,e,g){var n=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);g&&\"object\"===typeof g&&(g=g.hy);my(n,a,c,d,e,g)};\niC.prototype.reportErrorWarning=function(a){var c=this.hy;IA();a=a&&\"object\"===typeof a?a.hy:LA(a);ny(c,a)};iC.prototype.draw3dText=function(a,c){var d=this.hy;IA();a&&\"object\"===typeof a&&(a=a.hy);c=c&&\"object\"===typeof c?c.hy:LA(c);oy(d,a,c)};iC.prototype.setDebugMode=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);py(c,a)};iC.prototype.getDebugMode=function(){return qy(this.hy)};iC.prototype.__destroy__=function(){ry(this.hy)};\nfunction jC(a,c){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);this.hy=sy(a,c);h(jC)[this.hy]=this}jC.prototype=Object.create(VA.prototype);jC.prototype.constructor=jC;jC.prototype.iy=jC;jC.jy={};b.btCapsuleShapeX=jC;jC.prototype.setMargin=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);ty(c,a)};jC.prototype.getMargin=function(){return uy(this.hy)};jC.prototype.getUpAxis=function(){return vy(this.hy)};jC.prototype.getRadius=function(){return wy(this.hy)};\njC.prototype.getHalfHeight=function(){return xy(this.hy)};jC.prototype.setLocalScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);yy(c,a)};jC.prototype.getLocalScaling=function(){return k(zy(this.hy),p)};jC.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Ay(d,a,c)};jC.prototype.__destroy__=function(){By(this.hy)};\nfunction W(a,c,d,e){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);this.hy=Cy(a,c,d,e);h(W)[this.hy]=this}W.prototype=Object.create(aB.prototype);W.prototype.constructor=W;W.prototype.iy=W;W.jy={};b.btQuaternion=W;W.prototype.setValue=function(a,c,d,e){var g=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);Dy(g,a,c,d,e)};\nW.prototype.setEulerZYX=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);Ey(e,a,c,d)};W.prototype.setRotation=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Fy(d,a,c)};W.prototype.normalize=W.prototype.normalize=function(){Gy(this.hy)};W.prototype.length2=function(){return Hy(this.hy)};W.prototype.length=W.prototype.length=function(){return Iy(this.hy)};\nW.prototype.dot=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return Jy(c,a)};W.prototype.normalized=function(){return k(Ky(this.hy),W)};W.prototype.getAxis=function(){return k(Ly(this.hy),p)};W.prototype.inverse=W.prototype.inverse=function(){return k(My(this.hy),W)};W.prototype.getAngle=function(){return Ny(this.hy)};W.prototype.getAngleShortestPath=function(){return Oy(this.hy)};\nW.prototype.angle=W.prototype.angle=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return Py(c,a)};W.prototype.angleShortestPath=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return Qy(c,a)};W.prototype.op_add=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(Ry(c,a),W)};W.prototype.op_sub=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(Sy(c,a),W)};\nW.prototype.op_mul=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(Ty(c,a),W)};W.prototype.op_mulq=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(Uy(c,a),W)};W.prototype.op_div=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(Vy(c,a),W)};W.prototype.x=W.prototype.x=function(){return Wy(this.hy)};W.prototype.y=W.prototype.y=function(){return Xy(this.hy)};W.prototype.z=W.prototype.z=function(){return Yy(this.hy)};W.prototype.w=function(){return Zy(this.hy)};\nW.prototype.setX=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);$y(c,a)};W.prototype.setY=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);az(c,a)};W.prototype.setZ=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);bz(c,a)};W.prototype.setW=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);cz(c,a)};W.prototype.__destroy__=function(){dz(this.hy)};\nfunction kC(a,c){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);this.hy=ez(a,c);h(kC)[this.hy]=this}kC.prototype=Object.create(VA.prototype);kC.prototype.constructor=kC;kC.prototype.iy=kC;kC.jy={};b.btCapsuleShapeZ=kC;kC.prototype.setMargin=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);fz(c,a)};kC.prototype.getMargin=function(){return gz(this.hy)};kC.prototype.getUpAxis=function(){return hz(this.hy)};kC.prototype.getRadius=function(){return iz(this.hy)};\nkC.prototype.getHalfHeight=function(){return jz(this.hy)};kC.prototype.setLocalScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);kz(c,a)};kC.prototype.getLocalScaling=function(){return k(lz(this.hy),p)};kC.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);mz(d,a,c)};kC.prototype.__destroy__=function(){nz(this.hy)};function v(){throw\"cannot construct a btContactSolverInfo, no constructor in IDL\";}\nv.prototype=Object.create(f.prototype);v.prototype.constructor=v;v.prototype.iy=v;v.jy={};b.btContactSolverInfo=v;v.prototype.get_m_splitImpulse=v.prototype.YA=function(){return!!oz(this.hy)};v.prototype.set_m_splitImpulse=v.prototype.ED=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);pz(c,a)};Object.defineProperty(v.prototype,\"m_splitImpulse\",{get:v.prototype.YA,set:v.prototype.ED});v.prototype.get_m_splitImpulsePenetrationThreshold=v.prototype.ZA=function(){return qz(this.hy)};\nv.prototype.set_m_splitImpulsePenetrationThreshold=v.prototype.FD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);rz(c,a)};Object.defineProperty(v.prototype,\"m_splitImpulsePenetrationThreshold\",{get:v.prototype.ZA,set:v.prototype.FD});v.prototype.get_m_numIterations=v.prototype.JA=function(){return sz(this.hy)};v.prototype.set_m_numIterations=v.prototype.pD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);tz(c,a)};\nObject.defineProperty(v.prototype,\"m_numIterations\",{get:v.prototype.JA,set:v.prototype.pD});v.prototype.__destroy__=function(){uz(this.hy)};function lC(a,c,d,e,g){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);g&&\"object\"===typeof g&&(g=g.hy);this.hy=void 0===e?vz(a,c,d):void 0===g?_emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_4(a,c,d,e):wz(a,c,d,e,g);h(lC)[this.hy]=this}\nlC.prototype=Object.create(eB.prototype);lC.prototype.constructor=lC;lC.prototype.iy=lC;lC.jy={};b.btGeneric6DofSpringConstraint=lC;lC.prototype.enableSpring=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);xz(d,a,c)};lC.prototype.setStiffness=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);yz(d,a,c)};\nlC.prototype.setDamping=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);zz(d,a,c)};lC.prototype.setEquilibriumPoint=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);void 0===a?Az(d):void 0===c?Bz(d,a):Cz(d,a,c)};lC.prototype.setLinearLowerLimit=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Dz(c,a)};\nlC.prototype.setLinearUpperLimit=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Ez(c,a)};lC.prototype.setAngularLowerLimit=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Fz(c,a)};lC.prototype.setAngularUpperLimit=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Gz(c,a)};lC.prototype.getFrameOffsetA=function(){return k(Hz(this.hy),r)};lC.prototype.enableFeedback=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Iz(c,a)};\nlC.prototype.getBreakingImpulseThreshold=function(){return Jz(this.hy)};lC.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Kz(c,a)};lC.prototype.getParam=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);return Lz(d,a,c)};lC.prototype.setParam=function(a,c,d){var e=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);Mz(e,a,c,d)};\nlC.prototype.__destroy__=function(){Nz(this.hy)};function mC(a){a&&\"object\"===typeof a&&(a=a.hy);this.hy=Oz(a);h(mC)[this.hy]=this}mC.prototype=Object.create(m.prototype);mC.prototype.constructor=mC;mC.prototype.iy=mC;mC.jy={};b.btSphereShape=mC;mC.prototype.setMargin=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Pz(c,a)};mC.prototype.getMargin=function(){return Qz(this.hy)};mC.prototype.setLocalScaling=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Rz(c,a)};\nmC.prototype.getLocalScaling=function(){return k(Sz(this.hy),p)};mC.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Tz(d,a,c)};mC.prototype.__destroy__=function(){Uz(this.hy)};function Y(){throw\"cannot construct a Face, no constructor in IDL\";}Y.prototype=Object.create(f.prototype);Y.prototype.constructor=Y;Y.prototype.iy=Y;Y.jy={};b.Face=Y;\nY.prototype.get_m_n=Y.prototype.Hy=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(Vz(c,a),Node)};Y.prototype.set_m_n=Y.prototype.Qy=function(a,c){var d=this.hy;IA();a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);Wz(d,a,c)};Object.defineProperty(Y.prototype,\"m_n\",{get:Y.prototype.Hy,set:Y.prototype.Qy});Y.prototype.get_m_normal=Y.prototype.HA=function(){return k(Xz(this.hy),p)};\nY.prototype.set_m_normal=Y.prototype.nD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);Yz(c,a)};Object.defineProperty(Y.prototype,\"m_normal\",{get:Y.prototype.HA,set:Y.prototype.nD});Y.prototype.get_m_ra=Y.prototype.PA=function(){return Zz(this.hy)};Y.prototype.set_m_ra=Y.prototype.vD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);$z(c,a)};Object.defineProperty(Y.prototype,\"m_ra\",{get:Y.prototype.PA,set:Y.prototype.vD});Y.prototype.__destroy__=function(){aA(this.hy)};\nfunction UB(){throw\"cannot construct a tFaceArray, no constructor in IDL\";}UB.prototype=Object.create(f.prototype);UB.prototype.constructor=UB;UB.prototype.iy=UB;UB.jy={};b.tFaceArray=UB;UB.prototype.size=UB.prototype.size=function(){return bA(this.hy)};UB.prototype.at=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);return k(cA(c,a),Y)};UB.prototype.__destroy__=function(){dA(this.hy)};\nfunction Z(a,c,d,e,g){a&&\"object\"===typeof a&&(a=a.hy);c&&\"object\"===typeof c&&(c=c.hy);d&&\"object\"===typeof d&&(d=d.hy);e&&\"object\"===typeof e&&(e=e.hy);g&&\"object\"===typeof g&&(g=g.hy);this.hy=eA(a,c,d,e,g);h(Z)[this.hy]=this}Z.prototype=Object.create(f.prototype);Z.prototype.constructor=Z;Z.prototype.iy=Z;Z.jy={};b.LocalConvexResult=Z;Z.prototype.get_m_hitCollisionObject=Z.prototype.iA=function(){return k(fA(this.hy),q)};\nZ.prototype.set_m_hitCollisionObject=Z.prototype.PC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);gA(c,a)};Object.defineProperty(Z.prototype,\"m_hitCollisionObject\",{get:Z.prototype.iA,set:Z.prototype.PC});Z.prototype.get_m_localShapeInfo=Z.prototype.CA=function(){return k(hA(this.hy),tB)};Z.prototype.set_m_localShapeInfo=Z.prototype.iD=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);iA(c,a)};Object.defineProperty(Z.prototype,\"m_localShapeInfo\",{get:Z.prototype.CA,set:Z.prototype.iD});\nZ.prototype.get_m_hitNormalLocal=Z.prototype.mA=function(){return k(jA(this.hy),p)};Z.prototype.set_m_hitNormalLocal=Z.prototype.TC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);kA(c,a)};Object.defineProperty(Z.prototype,\"m_hitNormalLocal\",{get:Z.prototype.mA,set:Z.prototype.TC});Z.prototype.get_m_hitPointLocal=Z.prototype.oA=function(){return k(lA(this.hy),p)};Z.prototype.set_m_hitPointLocal=Z.prototype.VC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);mA(c,a)};\nObject.defineProperty(Z.prototype,\"m_hitPointLocal\",{get:Z.prototype.oA,set:Z.prototype.VC});Z.prototype.get_m_hitFraction=Z.prototype.jA=function(){return nA(this.hy)};Z.prototype.set_m_hitFraction=Z.prototype.QC=function(a){var c=this.hy;a&&\"object\"===typeof a&&(a=a.hy);oA(c,a)};Object.defineProperty(Z.prototype,\"m_hitFraction\",{get:Z.prototype.jA,set:Z.prototype.QC});Z.prototype.__destroy__=function(){pA(this.hy)};\n(function(){function a(){b.BT_CONSTRAINT_ERP=qA();b.BT_CONSTRAINT_STOP_ERP=rA();b.BT_CONSTRAINT_CFM=sA();b.BT_CONSTRAINT_STOP_CFM=tA();b.PHY_FLOAT=uA();b.PHY_DOUBLE=vA();b.PHY_INTEGER=wA();b.PHY_SHORT=xA();b.PHY_FIXEDPOINT88=yA();b.PHY_UCHAR=zA()}Ka?a():Ia.unshift(a)})();this.Ammo=b;\n\n\n  return Ammo.ready\n}\n);\n})();\nif (typeof exports === 'object' && typeof module === 'object')\n      module.exports = Ammo;\n    else if (typeof define === 'function' && define['amd'])\n      define([], function() { return Ammo; });\n    else if (typeof exports === 'object')\n      exports[\"Ammo\"] = Ammo;\n    \n"
  },
  {
    "path": "src/renderer/vite.config.js",
    "content": "import { resolve } from \"path\";\nimport { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\nimport { DEV_SERVER_PORT } from \"../shared/constants\";\nimport AutoImport from \"unplugin-auto-import/vite\";\nimport Components from \"unplugin-vue-components/vite\";\nimport { ElementPlusResolver } from \"unplugin-vue-components/resolvers\";\nimport { createSvgIconsPlugin } from \"vite-plugin-svg-icons\";\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    vue(),\n    AutoImport({\n      resolvers: [ElementPlusResolver()],\n    }),\n    Components({\n      resolvers: [\n        ElementPlusResolver({\n          importStyle: \"sass\",\n        }),\n        // 颜色主题配置预留\n      ],\n    }),\n    createSvgIconsPlugin({\n      // 指定需要缓存的图标文件夹\n      iconDirs: [resolve(__dirname, \"control/assets/icons\")],\n      // 指定symbolId格式\n      symbolId: \"icon-[dir]-[name]\",\n    }),\n  ],\n  root: \"./src/renderer\",\n  build: {\n    emptyOutDir: true,\n    rollupOptions: {\n      input: {\n        control: \"./src/renderer/control.html\",\n        display: \"./src/renderer/display.html\",\n      },\n    },\n  },\n  server: {\n    strictPort: true,\n    port: DEV_SERVER_PORT,\n  },\n  resolve: {\n    alias: {\n      \"@control\": resolve(__dirname, \"control\"),\n      \"@display\": resolve(__dirname, \"display\"),\n      \"@shared\": resolve(__dirname, \"../shared\"),\n    },\n  },\n  css: {\n    preprocessorOptions: {\n      scss: {\n        // 颜色主题配置预留\n        additionalData: `@use \"@control/styles/el-theme.scss\" as *;`,\n        // additionalData: `@use \"@control/styles/Variables.scss\" as *;`,\n      },\n    },\n  },\n});\n"
  },
  {
    "path": "src/shared/constants.js",
    "content": "export const DEV_SERVER_PORT = 3000;\n"
  },
  {
    "path": "src/shared/defaults/defalutDatabase.js",
    "content": "export const defalutDatabase = {\n  modelNow: null,\n  sourcePathInfo: [],\n  model: [],\n  motion3D: [],\n  audio3D: [],\n};\n"
  },
  {
    "path": "src/shared/defaults/defaultConfig.js",
    "content": "export const defaultConfig = {\n  general: {\n    \"open-control-at-launch\": true,\n    \"open-display-at-launch\": true,\n    \"error-report\": false,\n    language: \"en\",\n  },\n  display: {\n    \"display-mode\": \"displayFullScreen\",\n    \"pixel-ratio\": \"retina\",\n    \"show-fps\": true,\n    antialias: true,\n    \"auto-load-last\": true,\n    \"click-through\": \"transparent\",\n    \"display-range\": \"singleDesktop\",\n    \"keep-display-at-top\": false,\n    background: \"#000000\",\n    \"live2d-initial-width-range\": [65, 100],\n    \"live2d-initial-height-range\": [20, 100],\n    \"live2d-draggable\": true,\n    \"spine-initial-width-range\": [75, 100],\n    \"spine-initial-height-range\": [75, 100],\n    \"spine-draggable\": true,\n    \"spine-premultiply-alpha\": false,\n    \"mmd-outline-effect\": true,\n    \"mmd-orbit-controls\": true,\n    \"vroid-outline-effect\": false,\n    \"vroid-orbit-controls\": true,\n    // \"model-mouse-track\": true,\n    // \"3d-physics-simulation\": true,\n    // \"3d-camera-type\": \"perspective\",\n    // \"dynamic-params-sync\": true,\n    // \"params-sync-frequency\": \"system\",\n  },\n};\n"
  },
  {
    "path": "src/shared/locales/en/control.js",
    "content": "export default {\n  \"model-description\": \"Model Description\",\n  \"object-transform\": \"Object Transform\",\n  \"animation-control\": \"Animation Control\",\n  \"morph-target\": \"Morph Target\",\n  \"camera-parameter\": \"Camera Parameter\",\n  \"motion-capture\": \"Motion Capture\",\n  \"parameter-control\": \"Parameter Control\",\n  \"load-a-model-to-control\": \"Load a model to control\",\n  \"control-load-error\":\n    \"Error occurred，the model file may not contain the information of this control item，open the developer tools of display window to view the details\",\n  description: {\n    name: \"Name\",\n    \"extension-name\": \"Extension Name\",\n    \"vertex-count\": \"Vertex Count\",\n    \"triangle-count\": \"Triangle Count\",\n    \"bone-count\": \"Bone Count\",\n    \"ik-count\": \"IK Count\",\n    \"rigid-body-count\": \"Rigid Body Count\",\n    \"constraint-count\": \"Constraint Count\",\n    \"grant-count\": \"Grant Count\",\n    \"morph-count\": \"Morph Count\",\n    \"version-number\": \"Version Number\",\n    \"motion-count\": \"Motion Count\",\n    \"slot-count\": \"Slot Count\",\n    \"skin-count\": \"Skin Count\",\n    \"parameter-count\": \"Parameter Count\",\n    \"motion-group-count\": \"Motion Group Count\",\n    \"hit-area-count\": \"Hit Area Count\",\n    \"part-count\": \"Part Count\",\n    \"group-count\": \"Group Count\",\n    \"model-version\": \"Model Version\",\n    author: \"Author\",\n    \"sexual-ussage-name\": \"Sexual Usage Name\",\n    \"violent-ussage-name\": \"Violent Usage Name\",\n    \"spine-license\":\n      \"accoding to spine-runtimes License, you should get the authorization before loading the spine model\",\n    \"sdk-version\": \"SDK Version\",\n  },\n  animation: {\n    \"motion-db\": \"Motion Database\",\n    \"motion-name\": \"Motion Name\",\n    \"motion-duration\": \"Motion Duration\",\n    \"loop-play\": \"Loop Play(Set Before Load)\",\n    operate: \"Operate\",\n    \"load-motion\": \"Load Motion\",\n    \"quit-motion\": \"Quit Motion\",\n    \"motion-group\": \"Motion Group\",\n    \"extension-name\": \"Extension Name\",\n    \"audio-db\": \"Audio Database\",\n    \"audio-name\": \"Audio Name\",\n    \"audio-delay\": \"Audio Delay\",\n    \"physics-simulation\": \"Physics Simulation\",\n    \"mixamo-convert-mode\": \"Mixamo Convert Mode(Set Before Load)\",\n    \"ik-calculate\": \"IK Calculate\",\n    \"rotate-calculate\": \"Rotate Calculate\",\n    load: \"Load\",\n    \"load-motion-and-audio\": \"Load Motion and Audio\",\n    control: \"Control\",\n    pause: \"Pause\",\n    play: \"Play\",\n    \"event-motion\": \"Event Motion\",\n    \"no-motion\": \"None\",\n    \"random-motion\": \"Random\",\n    \"selected-motion\": \"Selected\",\n    \"click-motion-now\": \"Click Motion Now\",\n    \"drag-motion-now\": \"Drag Motion Now\",\n  },\n  transform: {\n    \"tree-select\": \"Tree Select\",\n    \"auto-fill-select\": \"Auto Fill Select\",\n    position: \"Position\",\n    rotation: \"Rotation\",\n    scale: \"Scale\",\n  },\n  parameter: {\n    \"target-select\": \"Target Select\",\n    \"parameter-control\": \"Parameter Control\",\n    \"part-opacity\": \"Part Opacity\",\n    \"mouse-focus\": \"Mouse Focus\",\n    \"auto-breath\": \"Auto Breath\",\n    \"auto-eye-blink\": \"Auto Eye Blink\",\n    morph: \"Morph\",\n    \"vrm-calculate\": \"VRM Calculate\",\n    skin: \"Skin\",\n  },\n  capture: {\n    \"capture-type\": \"Capture Type\",\n    \"face-capture\": \"Face Capture\",\n    \"holistic-capture\": \"Holistic Capture\",\n    \"capture-control\": \"Capture Control\",\n    \"start-capture\": \"Start Capture\",\n    \"quit-capture\": \"Quit Capture\",\n  },\n};\n"
  },
  {
    "path": "src/shared/locales/en/display.js",
    "content": "export default {\n  window: \"Window\",\n  \"window-type\": \"Window Type\",\n  fullscreen: \"Fullscreen\",\n  windowed: \"Windowed\",\n  show: \"Show\",\n  \"pixel-ratio\": \"Pixel Ratio\",\n  \"show-fps\": \"Show FPS\",\n  antialias: \"Antialias\",\n  \"auto-load-last\": \"Auto Load Last\",\n  \"transparent-display\": \"Transparent Display\",\n  \"click-through\": \"Click Through\",\n  \"all-area\": \"All Area\",\n  \"transparent-area\": \"Transparent Area\",\n  \"show-area\": \"Show Area\",\n  \"single-desktop\": \"Single Desktop\",\n  \"all-desktops\": \"All Desktops\",\n  \"all-workspaces\": \"All Workspaces\",\n  \"always-on-top\": \"Always On Top\",\n  \"windowed-display\": \"Windowed Display\",\n  \"background-color\": \"Background Color\",\n  \"live2d-render\": \"Live2D Render\",\n  \"width-range\": \"Width Range\",\n  \"height-range\": \"Height Range\",\n  \"drag-to-move\": \"Drag to Move\",\n  \"spine-render\": \"Spine Render\",\n  \"premultiply-alpha\": \"Premultiply Alpha\",\n  \"mmd-render\": \"MMD Render\",\n  \"outline-effect\": \"Outline Effect\",\n  \"camera-orbit-control\": \"Camera Orbit Control\",\n  \"vroid-render\": \"VRoid Render\",\n  \"display-window-state\": \"Display Window State\",\n  launched: \"Launched\",\n  \"not-launched\": \"Not Launched\",\n  reload: \"Reload\",\n  launch: \"Launch\",\n  close: \"Close\",\n  screenshot: \"Screenshot\",\n};\n"
  },
  {
    "path": "src/shared/locales/en/general.js",
    "content": "export default {\n  \"when-launch\": \"When Launch\",\n  \"open-control-panel\": \"Open Control Panel\",\n  \"open-display-window\": \"Open Display Window\",\n  language: \"Language\",\n  \"developer-tools\": \"Developer Tools\",\n  \"alert-error-info\": \"Alert Error Info\",\n  \"display-window\": \"Display Window\",\n  \"control-panel\": \"Control Panel\",\n  restore: \"Restore\",\n  \"restore-all-config\": \"Restore All Config\",\n  \"restore-all-config-confirm\": \"Are you sure to restore all config?\",\n};\n"
  },
  {
    "path": "src/shared/locales/en/index.js",
    "content": "import menu from \"./menu\";\nimport control from \"./control\";\nimport tray from \"./tray\";\nimport message from \"./message\";\nimport general from \"./general\";\nimport display from \"./display\";\nimport model from \"./model\";\nimport source from \"./source\";\nexport default {\n  menu,\n  control,\n  tray,\n  message,\n  general,\n  display,\n  model,\n  source,\n};\n"
  },
  {
    "path": "src/shared/locales/en/menu.js",
    "content": "export default {\n  general: \"General\",\n  display: \"Display\",\n  control: \"Control\",\n  model: \"Model\",\n  source: \"Source\",\n  about: \"About\",\n};\n"
  },
  {
    "path": "src/shared/locales/en/message.js",
    "content": "export default {\n  \"display-open-dev-title\":\n    \"Are you sure you want to open the developer tools?\",\n  \"display-open-dev-detail\":\n    \"For transparent display window, please make sure the developer tools window is set to an independent window, otherwise the window transparency configuration will be invalid.\",\n  confirm: \"Yes\",\n  cancel: \"Cancel\",\n};\n"
  },
  {
    "path": "src/shared/locales/en/model.js",
    "content": "export default {\n  \"model-db\": \"Model Database\",\n  \"search-model\": \"Search Model\",\n  name: \"Name\",\n  type: \"Type\",\n  extension: \"Extension\",\n  \"load-selected-model\": \"Load Selected Model\",\n  version: \"Version\",\n};\n"
  },
  {
    "path": "src/shared/locales/en/source.js",
    "content": "export default {\n  \"data-source\": \"Data Source\",\n  \"search-type\": \"Search Type\",\n  \"source-path\": \"Source Path\",\n  operate: \"Operate\",\n  \"end-edit\": \"End Edit\",\n  \"edit-search-type\": \"Edit\",\n  \"show-in-file-browser\": \"Show in File Browser\",\n  refresh: \"Refresh\",\n  \"delete-source-confirm\": \"Are you sure to delete this data source?\",\n  \"delete-source\": \"Delete Data Source\",\n  \"add-source\": \"Add Data Source\",\n  \"search-all-source\": \"Search All\",\n  \"statistic-info\": \"Statistic Info\",\n};\n"
  },
  {
    "path": "src/shared/locales/en/tray.js",
    "content": "export default {\n  \"open-control-window\": \"Open Control Window\",\n  \"open-display-window\": \"Open Display Window\",\n  \"quit-app\": \"Quit App\",\n};\n"
  },
  {
    "path": "src/shared/locales/i18next.js",
    "content": "import i18next from \"i18next\";\nimport resources from \"./resources\";\ni18next.init({\n  fallbackLng: \"en\",\n  resources: resources,\n});\nexport default i18next;\n"
  },
  {
    "path": "src/shared/locales/jp/control.js",
    "content": "// 片假名这……您怎么能这么长呢？\nexport default {\n  \"model-description\": \"モデル情報\",\n  \"object-transform\": \"オブジェクト変換\",\n  \"animation-control\": \"アニメーションコントロール\",\n  \"morph-target\": \"モーフターゲット\",\n  \"camera-parameter\": \"カメラパラメータ\",\n  \"motion-capture\": \"モーションキャプチャ\",\n  \"parameter-control\": \"パラメータコントロール\",\n  \"load-a-model-to-control\": \"モデルを読み込んでコントロールする\",\n  \"control-load-error\":\n    \"エラーが発生しました、このモデルファイルにはこのコントロール項目の情報が存在しない可能性があります、詳細はディスプレイウィンドウの開発者ツールを確認してください\",\n  description: {\n    name: \"モデル名\",\n    \"extension-name\": \"拡張子名\",\n    \"vertex-count\": \"頂点数\",\n    \"triangle-count\": \"三角形数\",\n    \"bone-count\": \"ボーン数\",\n    \"ik-count\": \"IK数\",\n    \"rigid-body-count\": \"剛体数\",\n    \"constraint-count\": \"制約数\",\n    \"grant-count\": \"付与数\",\n    \"morph-count\": \"モーフ数\",\n    \"version-number\": \"バージョン番号\",\n    \"motion-count\": \"モーション数\",\n    \"slot-count\": \"スロット数\",\n    \"skin-count\": \"スキン数\",\n    \"parameter-count\": \"パラメータ数\",\n    \"motion-group-count\": \"モーショングループ数\",\n    \"hit-area-count\": \"ヒットエリア数\",\n    \"part-count\": \"パーツ数\",\n    \"group-count\": \"グループ数\",\n    \"model-version\": \"モデルバージョン\",\n    author: \"作者\",\n    \"sexual-ussage-name\": \"エロい使い\",\n    \"violent-ussage-name\": \"暴力使い\",\n    \"spine-license\":\n      \"spine-runtimes Licenseによると、spineモデルをロードする前に、授权を取得するのを確認してください\",\n    \"sdk-version\": \"SDKバージョン\",\n  },\n  animation: {\n    \"motion-db\": \"モーションデータベース\",\n    \"motion-name\": \"モーション名\",\n    \"motion-duration\": \"モーション時間\",\n    \"loop-play\": \"ループ再生（ロード前に設定）\",\n    operate: \"操作\",\n    \"load-motion\": \"モーションを読み込む\",\n    \"quit-motion\": \"モーションを終了\",\n    \"motion-group\": \"モーショングループ\",\n    \"extension-name\": \"拡張子名\",\n    \"audio-db\": \"オーディオデータベース\",\n    \"audio-name\": \"オーディオ名\",\n    \"audio-delay\": \"オーディオ遅延\",\n    \"physics-simulation\": \"物理シミュレーション\",\n    \"mixamo-convert-mode\": \"Mixamo変換モード（ロード前に設定）\",\n    \"ik-calculate\": \"IK計算\",\n    \"rotate-calculate\": \"旋転計算\",\n    load: \"読み込む\",\n    \"load-motion-and-audio\": \"モーションとオーディオを読み込む\",\n    control: \"コントロール\",\n    pause: \"一時停止\",\n    play: \"再生\",\n    \"event-motion\": \"イベントモーション\",\n    \"no-motion\": \"なし\",\n    \"random-motion\": \"ランダム\",\n    \"selected-motion\": \"選択した\",\n    \"click-motion-now\": \"クリックモーション\",\n    \"drag-motion-now\": \"ドラグモーション\",\n  },\n  transform: {\n    \"tree-select\": \"ツリー選択\",\n    \"auto-fill-select\": \"自動充填選択\",\n    position: \"ポジション\",\n    rotation: \"ローテーション\",\n    scale: \"スケール\",\n  },\n  parameter: {\n    \"target-select\": \"ターゲット選択\",\n    \"parameter-control\": \"パラメータコントロール\",\n    \"part-opacity\": \"パーツ不透明度\",\n    \"mouse-focus\": \"マウスフォーカス\",\n    \"auto-breath\": \"自動的に呼吸\",\n    \"auto-eye-blink\": \"自動まばたき\",\n    morph: \"モーフ\",\n    \"vrm-calculate\": \"VRM計算\",\n    skin: \"スキン\",\n  },\n  capture: {\n    \"capture-type\": \"キャプチャタイプ\",\n    \"face-capture\": \"顔キャプチャ\",\n    \"holistic-capture\": \"ホリジカルキャプチャ\",\n    \"capture-control\": \"キャプチャコントロール\",\n    \"start-capture\": \"キャプチャ開始\",\n    \"quit-capture\": \"キャプチャ終了\",\n  },\n};\n"
  },
  {
    "path": "src/shared/locales/jp/display.js",
    "content": "export default {\n  window: \"ウィンドウ\",\n  \"window-type\": \"ジャンル\",\n  fullscreen: \"フルスクリーン\",\n  windowed: \"ウィンドウ\",\n  show: \"表示\",\n  \"pixel-ratio\": \"ピクセル比\",\n  \"show-fps\": \"FPSを表示\",\n  antialias: \"アンチエイリアス\",\n  \"auto-load-last\": \"最後のモデルを自動ロード\",\n  \"transparent-display\": \"透明展示器\",\n  \"click-through\": \"クリック穿透\",\n  \"all-area\": \"すべての領域\",\n  \"transparent-area\": \"透明領域\",\n  \"show-area\": \"表示領域\",\n  \"single-desktop\": \"シングルデスクトップ\",\n  \"all-desktops\": \"すべてのデスクトップ\",\n  \"all-workspaces\": \"すべてのワークスペース\",\n  \"always-on-top\": \"常に最前面に表示\",\n  \"windowed-display\": \"ウィンドウ展示器\",\n  \"background-color\": \"背景色\",\n  \"live2d-render\": \"Live2Dレンダー\",\n  \"width-range\": \"幅の範囲\",\n  \"height-range\": \"高さの範囲\",\n  \"drag-to-move\": \"ドラッグで移動\",\n  \"spine-render\": \"Spineレンダー\",\n  \"premultiply-alpha\": \"乗算済みアルファ\",\n  \"mmd-render\": \"MMDレンダー\",\n  \"outline-effect\": \"輪廓线エフェクト\",\n  \"camera-orbit-control\": \"カメラ軌道控制\",\n  \"vroid-render\": \"VRoidレンダー\",\n  \"display-window-state\": \"ディスプレイ状態\",\n  launched: \"起動済み\",\n  \"not-launched\": \"未起動\",\n  reload: \"リロード\",\n  launch: \"起動\",\n  close: \"閉じる\",\n  screenshot: \"スクショ\",\n};\n"
  },
  {
    "path": "src/shared/locales/jp/general.js",
    "content": "export default {\n  \"when-launch\": \"起動した時\",\n  \"open-control-panel\": \"コントロールパネルを開く\",\n  \"open-display-window\": \"ディスプレイウィンドウを開く\",\n  language: \"言語\",\n  \"developer-tools\": \"開発者ツール\",\n  \"alert-error-info\": \"エラー情報を表示\",\n  \"display-window\": \"ディスプレイウィンドウ\",\n  \"control-panel\": \"コントロールパネル\",\n  restore: \"復元\",\n  \"restore-all-config\": \"すべての設定を復元\",\n  \"restore-all-config-confirm\": \"すべての設定を復元しますか？\",\n};\n"
  },
  {
    "path": "src/shared/locales/jp/index.js",
    "content": "import menu from \"./menu\";\nimport control from \"./control\";\nimport tray from \"./tray\";\nimport message from \"./message\";\nimport general from \"./general\";\nimport display from \"./display\";\nimport model from \"./model\";\nimport source from \"./source\";\nexport default {\n  menu,\n  control,\n  tray,\n  message,\n  general,\n  display,\n  model,\n  source,\n};\n"
  },
  {
    "path": "src/shared/locales/jp/menu.js",
    "content": "export default {\n  general: \"一般\",\n  display: \"ディスプレイ\",\n  control: \"コントロール\",\n  model: \"モデル\",\n  source: \"ソース\",\n  about: \"情報\",\n};\n"
  },
  {
    "path": "src/shared/locales/jp/message.js",
    "content": "export default {\n  \"display-open-dev-title\": \"本当に開発者ツールを開きますか？\",\n  \"display-open-dev-detail\":\n    \"透明なディスプレイウィンドウについては、開発者ツールのウィンドウが独立したウィンドウに設定されていることを維持してください。そうでなければ、ウィンドウの透明配置が無効になります。\",\n  confirm: \"はい\",\n  cancel: \"キャンセル\",\n};\n"
  },
  {
    "path": "src/shared/locales/jp/model.js",
    "content": "export default {\n  \"model-db\": \"モデルデータベース\",\n  \"search-model\": \"モデルを検索\",\n  name: \"名前\",\n  type: \"ジャンル\",\n  extension: \"拡張子\",\n  \"load-selected-model\": \"選択したのモデルを読み込む\",\n  version: \"バージョン\",\n};\n"
  },
  {
    "path": "src/shared/locales/jp/source.js",
    "content": "export default {\n  \"data-source\": \"データソース\",\n  \"search-type\": \"検索ジャンル\",\n  \"source-path\": \"データソースパス\",\n  operate: \"操作\",\n  \"end-edit\": \"編集を終了\",\n  \"edit-search-type\": \"編集\",\n  \"show-in-file-browser\": \"ファイルブラウザで表示\",\n  refresh: \"更新\",\n  \"delete-source-confirm\": \"このデータソースを削除しますか？\",\n  \"delete-source\": \"データソースを削除\",\n  \"add-source\": \"データソースを追加\",\n  \"search-all-source\": \"全てを再検索\",\n  \"statistic-info\": \"統計情報\",\n};\n"
  },
  {
    "path": "src/shared/locales/jp/tray.js",
    "content": "export default {\n  \"open-control-window\": \"コントロールウィンドウを開く\",\n  \"open-display-window\": \"ディスプレイウィンドウを開く\",\n  \"quit-app\": \"アプリを終了\",\n};\n"
  },
  {
    "path": "src/shared/locales/languageNames.js",
    "content": "export default {\n  English: \"en\",\n  简体中文: \"zh-CN\",\n  日本語: \"jp\",\n};\n"
  },
  {
    "path": "src/shared/locales/resources.js",
    "content": "import appLocaleEn from \"./en\";\nimport appLocaleJp from \"./jp\";\nimport appLocaleZhCN from \"./zh-CN\";\nexport default {\n  en: {\n    translation: {\n      ...appLocaleEn,\n    },\n  },\n  jp: {\n    translation: {\n      ...appLocaleJp,\n    },\n  },\n  \"zh-CN\": {\n    translation: {\n      ...appLocaleZhCN,\n    },\n  },\n};\n"
  },
  {
    "path": "src/shared/locales/zh-CN/control.js",
    "content": "export default {\n  \"model-description\": \"模型信息\",\n  \"object-transform\": \"对象变换\",\n  \"animation-control\": \"动画控制\",\n  \"morph-target\": \"变形目标\",\n  \"camera-parameter\": \"相机参数\",\n  \"motion-capture\": \"动作捕捉\",\n  \"parameter-control\": \"参数控制\",\n  \"load-a-model-to-control\": \"加载一个模型以控制\",\n  \"control-load-error\":\n    \"加载错误，模型文件中可能不存在该控制项的信息，打开展示器开发者工具以查看详细信息\",\n  description: {\n    name: \"名称\",\n    \"extension-name\": \"扩展名\",\n    \"vertex-count\": \"顶点数\",\n    \"triangle-count\": \"三角形数\",\n    \"bone-count\": \"骨骼数\",\n    \"ik-count\": \"IK数\",\n    \"rigid-body-count\": \"刚体数\",\n    \"constraint-count\": \"约束数\",\n    \"grant-count\": \"付与数\",\n    \"morph-count\": \"变形数\",\n    \"version-number\": \"版本号\",\n    \"motion-count\": \"动画数\",\n    \"slot-count\": \"插槽数\",\n    \"skin-count\": \"皮肤数\",\n    \"parameter-count\": \"参数数\",\n    \"motion-group-count\": \"动作组数\",\n    \"hit-area-count\": \"触摸区域数\",\n    \"part-count\": \"部件数\",\n    \"group-count\": \"组数\",\n    \"model-version\": \"模型版本\",\n    author: \"作者\",\n    \"sexual-ussage-name\": \"色情用途\",\n    \"violent-ussage-name\": \"暴力用途\",\n    \"spine-license\":\n      \"根据spine-runtimes License，用户在加载spine模型前请确保已经取得授权\",\n    \"sdk-version\": \"SDK版本\",\n  },\n  animation: {\n    \"motion-db\": \"动作数据库\",\n    \"motion-name\": \"动作名称\",\n    \"motion-duration\": \"动作时长\",\n    \"loop-play\": \"循环播放（需载入前设定）\",\n    operate: \"操作\",\n    \"load-motion\": \"载入选中动作\",\n    \"quit-motion\": \"退出动画播放\",\n    \"motion-group\": \"动作组\",\n    \"extension-name\": \"扩展名\",\n    \"audio-db\": \"音频数据库\",\n    \"audio-name\": \"音频名称\",\n    \"audio-delay\": \"音频延迟\",\n    \"physics-simulation\": \"物理模拟\",\n    \"mixamo-convert-mode\": \"mixamo腿部转译模式（需载入前设定）\",\n    \"ik-calculate\": \"IK解算\",\n    \"rotate-calculate\": \"旋转解算\",\n    load: \"载入\",\n    \"load-motion-and-audio\": \"载入选中动作和音频\",\n    control: \"控制\",\n    pause: \"暂停\",\n    play: \"播放\",\n    \"event-motion\": \"事件动画\",\n    \"no-motion\": \"无动画\",\n    \"random-motion\": \"随机动画\",\n    \"selected-motion\": \"选中动画\",\n    \"click-motion-now\": \"当前点击动画\",\n    \"drag-motion-now\": \"当前拖动动画\",\n  },\n  transform: {\n    \"tree-select\": \"树状选择\",\n    \"auto-fill-select\": \"自动填充选择\",\n    position: \"位置\",\n    rotation: \"旋转\",\n    scale: \"缩放\",\n  },\n  parameter: {\n    \"target-select\": \"目标选择\",\n    \"parameter-control\": \"参数控制\",\n    \"part-opacity\": \"Part可见度\",\n    \"mouse-focus\": \"鼠标跟踪\",\n    \"auto-breath\": \"自动呼吸\",\n    \"auto-eye-blink\": \"自动眨眼\",\n    morph: \"变形\",\n    \"vrm-calculate\": \"VRM解算\",\n    skin: \"皮肤\",\n  },\n  capture: {\n    \"capture-type\": \"捕捉类型\",\n    \"face-capture\": \"面部捕捉\",\n    \"holistic-capture\": \"全身捕捉\",\n    \"capture-control\": \"捕捉控制\",\n    \"start-capture\": \"启动捕捉\",\n    \"quit-capture\": \"退出捕捉\",\n  },\n};\n"
  },
  {
    "path": "src/shared/locales/zh-CN/display.js",
    "content": "export default {\n  window: \"窗口\",\n  \"window-type\": \"类型\",\n  fullscreen: \"全屏\",\n  windowed: \"窗口\",\n  show: \"显示\",\n  \"pixel-ratio\": \"像素比\",\n  \"show-fps\": \"显示FPS\",\n  antialias: \"抗锯齿\",\n  \"auto-load-last\": \"自动加载上次的模型\",\n  \"transparent-display\": \"透明展示器\",\n  \"click-through\": \"点击穿透\",\n  \"all-area\": \"所有区域\",\n  \"transparent-area\": \"透明区域\",\n  \"show-area\": \"显示区域\",\n  \"single-desktop\": \"单桌面\",\n  \"all-desktops\": \"所有桌面\",\n  \"all-workspaces\": \"所有工作区\",\n  \"always-on-top\": \"窗口置顶\",\n  \"windowed-display\": \"边框展示器\",\n  \"background-color\": \"背景颜色\",\n  \"live2d-render\": \"Live2D渲染\",\n  \"width-range\": \"宽度范围\",\n  \"height-range\": \"高度范围\",\n  \"drag-to-move\": \"拖拽移动\",\n  \"spine-render\": \"Spine渲染\",\n  \"premultiply-alpha\": \"预乘Alpha\",\n  \"mmd-render\": \"MMD渲染\",\n  \"outline-effect\": \"轮廓线效果\",\n  \"camera-orbit-control\": \"相机轨道控制\",\n  \"vroid-render\": \"VRoid渲染\",\n  \"display-window-state\": \"展示器状态\",\n  launched: \"已启动\",\n  \"not-launched\": \"未启动\",\n  reload: \"重载\",\n  launch: \"启动\",\n  close: \"关闭\",\n  screenshot: \"截图\",\n};\n"
  },
  {
    "path": "src/shared/locales/zh-CN/general.js",
    "content": "export default {\n  \"when-launch\": \"启动时\",\n  \"open-control-panel\": \"打开控制面板\",\n  \"open-display-window\": \"打开展示器\",\n  language: \"语言\",\n  \"developer-tools\": \"开发者工具\",\n  \"alert-error-info\": \"报错信息提示\",\n  \"display-window\": \"展示器\",\n  \"control-panel\": \"控制面板\",\n  restore: \"还原\",\n  \"restore-all-config\": \"还原所有配置项\",\n  \"restore-all-config-confirm\": \"确认要还原所有配置项吗？\",\n};\n"
  },
  {
    "path": "src/shared/locales/zh-CN/index.js",
    "content": "import menu from \"./menu\";\nimport control from \"./control\";\nimport tray from \"./tray\";\nimport message from \"./message\";\nimport general from \"./general\";\nimport display from \"./display\";\nimport model from \"./model\";\nimport source from \"./source\";\nexport default {\n  menu,\n  control,\n  tray,\n  message,\n  general,\n  display,\n  model,\n  source,\n};\n"
  },
  {
    "path": "src/shared/locales/zh-CN/menu.js",
    "content": "export default {\n  general: \"通用\",\n  display: \"展示\",\n  control: \"控制\",\n  model: \"模型\",\n  source: \"来源\",\n  about: \"关于\",\n};\n"
  },
  {
    "path": "src/shared/locales/zh-CN/message.js",
    "content": "export default {\n  \"display-open-dev-title\": \"您确定要打开开发者工具吗？\",\n  \"display-open-dev-detail\":\n    \"对于透明的展示器窗口，请确保开发者工具窗口设置为一个独立窗口，否则会导致窗口透明配置失效。\",\n  confirm: \"确定\",\n  cancel: \"取消\",\n};\n"
  },
  {
    "path": "src/shared/locales/zh-CN/model.js",
    "content": "export default {\n  \"model-db\": \"模型数据库\",\n  \"search-model\": \"搜索模型\",\n  name: \"名称\",\n  type: \"类型\",\n  extension: \"扩展名\",\n  \"load-selected-model\": \"载入选中模型\",\n  version: \"版本\",\n};\n"
  },
  {
    "path": "src/shared/locales/zh-CN/source.js",
    "content": "export default {\n  \"data-source\": \"数据源\",\n  \"search-type\": \"检索类型\",\n  \"source-path\": \"数据源路径\",\n  operate: \"操作\",\n  \"end-edit\": \"结束编辑\",\n  \"edit-search-type\": \"编辑\",\n  \"show-in-file-browser\": \"在文件浏览器中显示\",\n  refresh: \"刷新\",\n  \"delete-source-confirm\": \"确认要删除该数据源吗？\",\n  \"delete-source\": \"删除数据源\",\n  \"add-source\": \"添加数据源\",\n  \"search-all-source\": \"全部重新检索\",\n  \"statistic-info\": \"统计信息\",\n};\n"
  },
  {
    "path": "src/shared/locales/zh-CN/tray.js",
    "content": "export default {\n  \"open-control-window\": \"打开控制面板\",\n  \"open-display-window\": \"打开展示器\",\n  \"quit-app\": \"退出应用\",\n};\n"
  }
]