[
  {
    "path": ".gitignore",
    "content": "### JetBrains template\n# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider\n# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839\n\n# User-specific stuff\n.idea/**/workspace.xml\n.idea/**/tasks.xml\n.idea/**/usage.statistics.xml\n.idea/**/dictionaries\n.idea/**/shelf\n\n# AWS User-specific\n.idea/**/aws.xml\n\n# Generated files\n.idea/**/contentModel.xml\n\n# Sensitive or high-churn files\n.idea/**/dataSources/\n.idea/**/dataSources.ids\n.idea/**/dataSources.local.xml\n.idea/**/sqlDataSources.xml\n.idea/**/dynamic.xml\n.idea/**/uiDesigner.xml\n.idea/**/dbnavigator.xml\n\n# Gradle\n.idea/**/gradle.xml\n.idea/**/libraries\n\n# Gradle and Maven with auto-import\n# When using Gradle or Maven with auto-import, you should exclude module files,\n# since they will be recreated, and may cause churn.  Uncomment if using\n# auto-import.\n# .idea/artifacts\n# .idea/compiler.xml\n# .idea/jarRepositories.xml\n# .idea/modules.xml\n# .idea/*.iml\n# .idea/modules\n# *.iml\n# *.ipr\n\n# CMake\ncmake-build-*/\n\n# Mongo Explorer plugin\n.idea/**/mongoSettings.xml\n\n# File-based project format\n*.iws\n\n# IntelliJ\nout/\n\n# mpeltonen/sbt-idea plugin\n.idea_modules/\n\n# JIRA plugin\natlassian-ide-plugin.xml\n\n# Cursive Clojure plugin\n.idea/replstate.xml\n\n# SonarLint plugin\n.idea/sonarlint/\n\n# Crashlytics plugin (for Android Studio and IntelliJ)\ncom_crashlytics_export_strings.xml\ncrashlytics.properties\ncrashlytics-build.properties\nfabric.properties\n\n# Editor-based Rest Client\n.idea/httpRequests\n\n# Android studio 3.1+ serialized cache file\n.idea/caches/build_file_checksums.ser\n\n### Example user template template\n### Example user template\n\n# IntelliJ project files\n.idea\n*.iml\nout\ngen\n### Python template\n# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packaging\n.Python\nbuild/\ndevelop-eggs/\ndist/\ndownloads/\neggs/\n.eggs/\nlib/\nlib64/\nparts/\nsdist/\nvar/\nwheels/\nshare/python-wheels/\n*.egg-info/\n.installed.cfg\n*.egg\nMANIFEST\n\n# PyInstaller\n#  Usually these files are written by a python script from a template\n#  before PyInstaller builds the exe, so as to inject date/other infos into it.\n*.manifest\n*.spec\n\n# Installer logs\npip-log.txt\npip-delete-this-directory.txt\n\n# Unit test / coverage reports\nhtmlcov/\n.tox/\n.nox/\n.coverage\n.coverage.*\n.cache\nnosetests.xml\ncoverage.xml\n*.cover\n*.py,cover\n.hypothesis/\n.pytest_cache/\ncover/\n\n# Translations\n*.mo\n*.pot\n\n# Django stuff:\n*.log\nlocal_settings.py\ndb.sqlite3\ndb.sqlite3-journal\n\n# Flask stuff:\ninstance/\n.webassets-cache\n\n# Scrapy stuff:\n.scrapy\n\n# Sphinx documentation\ndocs/_build/\n\n# PyBuilder\n.pybuilder/\ntarget/\n\n# Jupyter Notebook\n.ipynb_checkpoints\n\n# IPython\nprofile_default/\nipython_config.py\n\n# pyenv\n#   For a library or package, you might want to ignore these files since the code is\n#   intended to run in multiple environments; otherwise, check them in:\n# .python-version\n\n# pipenv\n#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.\n#   However, in case of collaboration, if having platform-specific dependencies or dependencies\n#   having no cross-platform support, pipenv may install dependencies that don't work, or not\n#   install all needed dependencies.\n#Pipfile.lock\n\n# poetry\n#   Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.\n#   This is especially recommended for binary packages to ensure reproducibility, and is more\n#   commonly ignored for libraries.\n#   https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control\n#poetry.lock\n\n# pdm\n#   Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.\n#pdm.lock\n#   pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it\n#   in version control.\n#   https://pdm.fming.dev/#use-with-ide\n.pdm.toml\n\n# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm\n__pypackages__/\n\n# Celery stuff\ncelerybeat-schedule\ncelerybeat.pid\n\n# SageMath parsed files\n*.sage.py\n\n# Environments\n.env\n.venv\nenv/\nvenv/\nENV/\nenv.bak/\nvenv.bak/\n\n# Spyder project settings\n.spyderproject\n.spyproject\n\n# Rope project settings\n.ropeproject\n\n# mkdocs documentation\n/site\n\n# mypy\n.mypy_cache/\n.dmypy.json\ndmypy.json\n\n# Pyre type checker\n.pyre/\n\n# pytype static type analyzer\n.pytype/\n\n# Cython debug symbols\ncython_debug/\n\n# PyCharm\n#  JetBrains specific template is maintained in a separate JetBrains.gitignore that can\n#  be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore\n#  and can be added to the global gitignore or merged into this file.  For a more nuclear\n#  option (not recommended) you can uncomment the following to ignore the entire idea folder.\n#.idea/\n\n"
  },
  {
    "path": "HidTable.h",
    "content": "#ifndef __keyboard__table__\n#define __keyboard__table__\n#define KEY_NONE                               0x00\n#define KEY_ERRORROLLOVER                      0x01\n#define KEY_POSTFAIL                           0x02\n#define KEY_ERRORUNDEFINED                     0x03\n#define KEY_A                                  0x04\n#define KEY_B                                  0x05\n#define KEY_C                                  0x06\n#define KEY_D                                  0x07 \n#define KEY_E                                  0x08\n#define KEY_F                                  0x09\n#define KEY_G                                  0x0A\n#define KEY_H                                  0x0B\n#define KEY_I                                  0x0C\n#define KEY_J                                  0x0D\n#define KEY_K                                  0x0E\n#define KEY_L                                  0x0F\n#define KEY_M                                  0x10\n#define KEY_N                                  0x11\n#define KEY_O                                  0x12\n#define KEY_P                                  0x13\n#define KEY_Q                                  0x14\n#define KEY_R                                  0x15\n#define KEY_S                                  0x16\n#define KEY_T                                  0x17\n#define KEY_U                                  0x18\n#define KEY_V                                  0x19\n#define KEY_W                                  0x1A\n#define KEY_X                                  0x1B\n#define KEY_Y                                  0x1C\n#define KEY_Z                                  0x1D\n#define KEY_1_EXCLAMATION_MARK                 0x1E\n#define KEY_2_AT                               0x1F\n#define KEY_3_NUMBER_SIGN                      0x20\n#define KEY_4_DOLLAR                           0x21\n#define KEY_5_PERCENT                          0x22\n#define KEY_6_CARET                            0x23\n#define KEY_7_AMPERSAND                        0x24\n#define KEY_8_ASTERISK                         0x25\n#define KEY_9_OPARENTHESIS                     0x26\n#define KEY_0_CPARENTHESIS                     0x27\n#define KEY_ENTER                              0x28\n#define KEY_ESCAPE                             0x29\n#define KEY_BACKSPACE                          0x2A\n#define KEY_TAB                                0x2B\n#define KEY_SPACEBAR                           0x2C\n#define KEY_MINUS_UNDERSCORE                   0x2D\n#define KEY_EQUAL_PLUS                         0x2E\n#define KEY_OBRACKET_AND_OBRACE                0x2F\n#define KEY_CBRACKET_AND_CBRACE                0x30\n#define KEY_BACKSLASH_VERTICAL_BAR             0x31\n#define KEY_NONUS_NUMBER_SIGN_TILDE            0x32\n#define KEY_SEMICOLON_COLON                    0x33\n#define KEY_SINGLE_AND_DOUBLE_QUOTE            0x34\n#define KEY_GRAVE ACCENT AND TILDE             0x35\n#define KEY_COMMA_AND_LESS                     0x36\n#define KEY_DOT_GREATER                        0x37\n#define KEY_SLASH_QUESTION                     0x38\n#define KEY_CAPS LOCK                          0x39\n#define KEY_F1                                 0x3A\n#define KEY_F2                                 0x3B\n#define KEY_F3                                 0x3C\n#define KEY_F4                                 0x3D\n#define KEY_F5                                 0x3E\n#define KEY_F6                                 0x3F\n#define KEY_F7                                 0x40\n#define KEY_F8                                 0x41\n#define KEY_F9                                 0x42\n#define KEY_F10                                0x43\n#define KEY_F11                                0x44\n#define KEY_F12                                0x45\n#define KEY_PRINTSCREEN                        0x46\n#define KEY_SCROLL LOCK                        0x47\n#define KEY_PAUSE                              0x48\n#define KEY_INSERT                             0x49\n#define KEY_HOME                               0x4A\n#define KEY_PAGEUP                             0x4B\n#define KEY_DELETE                             0x4C\n#define KEY_END1                               0x4D\n#define KEY_PAGEDOWN                           0x4E\n#define KEY_RIGHTARROW                         0x4F\n#define KEY_LEFTARROW                          0x50\n#define KEY_DOWNARROW                          0x51\n#define KEY_UPARROW                            0x52\n#define KEY_KEYPAD_NUM_LOCK_AND_CLEAR          0x53\n#define KEY_KEYPAD_SLASH                       0x54\n#define KEY_KEYPAD_ASTERIKS                    0x55\n#define KEY_KEYPAD_MINUS                       0x56\n#define KEY_KEYPAD_PLUS                        0x57\n#define KEY_KEYPAD_ENTER                       0x58\n#define KEY_KEYPAD_1_END                       0x59\n#define KEY_KEYPAD_2_DOWN_ARROW                0x5A\n#define KEY_KEYPAD_3_PAGEDN                    0x5B\n#define KEY_KEYPAD_4_LEFT_ARROW                0x5C\n#define KEY_KEYPAD_5                           0x5D\n#define KEY_KEYPAD_6_RIGHT_ARROW               0x5E\n#define KEY_KEYPAD_7_HOME                      0x5F\n#define KEY_KEYPAD_8_UP_ARROW                  0x60\n#define KEY_KEYPAD_9_PAGEUP                    0x61\n#define KEY_KEYPAD_0_INSERT                    0x62\n#define KEY_KEYPAD_DECIMAL_SEPARATOR_DELETE    0x63\n#define KEY_NONUS_BACK_SLASH_VERTICAL_BAR      0x64\n#define KEY_APPLICATION                        0x65\n#define KEY_POWER                              0x66\n#define KEY_KEYPAD_EQUAL                       0x67\n#define KEY_F13                                0x68\n#define KEY_F14                                0x69\n#define KEY_F15                                0x6A\n#define KEY_F16                                0x6B\n#define KEY_F17                                0x6C\n#define KEY_F18                                0x6D\n#define KEY_F19                                0x6E\n#define KEY_F20                                0x6F\n#define KEY_F21                                0x70\n#define KEY_F22                                0x71\n#define KEY_F23                                0x72\n#define KEY_F24                                0x73\n#define KEY_EXECUTE                            0x74\n#define KEY_HELP                               0x75\n#define KEY_MENU                               0x76\n#define KEY_SELECT                             0x77\n#define KEY_STOP                               0x78\n#define KEY_AGAIN                              0x79\n#define KEY_UNDO                               0x7A\n#define KEY_CUT                                0x7B\n#define KEY_COPY                               0x7C\n#define KEY_PASTE                              0x7D\n#define KEY_FIND                               0x7E\n#define KEY_MUTE                               0x7F\n#define KEY_VOLUME_UP                          0x80\n#define KEY_VOLUME_DOWN                        0x81\n#define KEY_LOCKING_CAPS_LOCK                  0x82\n#define KEY_LOCKING_NUM_LOCK                   0x83\n#define KEY_LOCKING_SCROLL_LOCK                0x84\n#define KEY_KEYPAD_COMMA                       0x85\n#define KEY_KEYPAD_EQUAL_SIGN                  0x86\n#define KEY_INTERNATIONAL1                     0x87\n#define KEY_INTERNATIONAL2                     0x88\n#define KEY_INTERNATIONAL3                     0x89\n#define KEY_INTERNATIONAL4                     0x8A\n#define KEY_INTERNATIONAL5                     0x8B\n#define KEY_INTERNATIONAL6                     0x8C\n#define KEY_INTERNATIONAL7                     0x8D\n#define KEY_INTERNATIONAL8                     0x8E\n#define KEY_INTERNATIONAL9                     0x8F\n#define KEY_LANG1                              0x90\n#define KEY_LANG2                              0x91\n#define KEY_LANG3                              0x92\n#define KEY_LANG4                              0x93\n#define KEY_LANG5                              0x94\n#define KEY_LANG6                              0x95\n#define KEY_LANG7                              0x96\n#define KEY_LANG8                              0x97\n#define KEY_LANG9                              0x98\n#define KEY_ALTERNATE_ERASE                    0x99\n#define KEY_SYSREQ                             0x9A\n#define KEY_CANCEL                             0x9B\n#define KEY_CLEAR                              0x9C\n#define KEY_PRIOR                              0x9D\n#define KEY_RETURN                             0x9E\n#define KEY_SEPARATOR                          0x9F\n#define KEY_OUT                                0xA0\n#define KEY_OPER                               0xA1\n#define KEY_CLEAR_AGAIN                        0xA2\n#define KEY_CRSEL                              0xA3\n#define KEY_EXSEL                              0xA4\n#define KEY_KEYPAD_00                          0xB0\n#define KEY_KEYPAD_000                         0xB1\n#define KEY_THOUSANDS_SEPARATOR                0xB2\n#define KEY_DECIMAL_SEPARATOR                  0xB3\n#define KEY_CURRENCY_UNIT                      0xB4\n#define KEY_CURRENCY_SUB_UNIT                  0xB5\n#define KEY_KEYPAD_OPARENTHESIS                0xB6\n#define KEY_KEYPAD_CPARENTHESIS                0xB7\n#define KEY_KEYPAD_OBRACE                      0xB8\n#define KEY_KEYPAD_CBRACE                      0xB9\n#define KEY_KEYPAD_TAB                         0xBA\n#define KEY_KEYPAD_BACKSPACE                   0xBB\n#define KEY_KEYPAD_A                           0xBC\n#define KEY_KEYPAD_B                           0xBD\n#define KEY_KEYPAD_C                           0xBE\n#define KEY_KEYPAD_D                           0xBF\n#define KEY_KEYPAD_E                           0xC0\n#define KEY_KEYPAD_F                           0xC1\n#define KEY_KEYPAD_XOR                         0xC2\n#define KEY_KEYPAD_CARET                       0xC3\n#define KEY_KEYPAD_PERCENT                     0xC4\n#define KEY_KEYPAD_LESS                        0xC5\n#define KEY_KEYPAD_GREATER                     0xC6\n#define KEY_KEYPAD_AMPERSAND                   0xC7\n#define KEY_KEYPAD_LOGICAL_AND                 0xC8\n#define KEY_KEYPAD_VERTICAL_BAR                0xC9\n#define KEY_KEYPAD_LOGIACL_OR                  0xCA\n#define KEY_KEYPAD_COLON                       0xCB\n#define KEY_KEYPAD_NUMBER_SIGN                 0xCC\n#define KEY_KEYPAD_SPACE                       0xCD\n#define KEY_KEYPAD_AT                          0xCE\n#define KEY_KEYPAD_EXCLAMATION_MARK            0xCF\n#define KEY_KEYPAD_MEMORY_STORE                0xD0\n#define KEY_KEYPAD_MEMORY_RECALL               0xD1\n#define KEY_KEYPAD_MEMORY_CLEAR                0xD2\n#define KEY_KEYPAD_MEMORY_ADD                  0xD3\n#define KEY_KEYPAD_MEMORY_SUBTRACT             0xD4\n#define KEY_KEYPAD_MEMORY_MULTIPLY             0xD5\n#define KEY_KEYPAD_MEMORY_DIVIDE               0xD6\n#define KEY_KEYPAD_PLUSMINUS                   0xD7\n#define KEY_KEYPAD_CLEAR                       0xD8\n#define KEY_KEYPAD_CLEAR_ENTRY                 0xD9\n#define KEY_KEYPAD_BINARY                      0xDA\n#define KEY_KEYPAD_OCTAL                       0xDB\n#define KEY_KEYPAD_DECIMAL                     0xDC\n#define KEY_KEYPAD_HEXADECIMAL                 0xDD\n#define KEY_LEFTCONTROL                        0xE0\n#define KEY_LEFTSHIFT                          0xE1\n#define KEY_LEFTALT                            0xE2\n#define KEY_LEFT_GUI                           0xE3\n#define KEY_RIGHTCONTROL                       0xE4\n#define KEY_RIGHTSHIFT                         0xE5\n#define KEY_RIGHTALT                           0xE6\n#define KEY_RIGHT_GUI                          0xE7\n\n\n#define BIT0 0X01\n#define BIT1 0X02\n#define BIT2 0X04\n#define BIT3 0X08\n#define BIT4 0X10\n#define BIT5 0X20\n#define BIT6 0X40\n#define BIT7 0X80\n\n\n#endif"
  },
  {
    "path": "LICENSE",
    "content": "                    GNU AFFERO GENERAL PUBLIC LICENSE\n                       Version 3, 19 November 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 Affero General Public License is a free, copyleft license for\nsoftware and other kinds of works, specifically designed to ensure\ncooperation with the community in the case of network server software.\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,\nour General Public Licenses are 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.\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  Developers that use our General Public Licenses protect your rights\nwith two steps: (1) assert copyright on the software, and (2) offer\nyou this License which gives you legal permission to copy, distribute\nand/or modify the software.\n\n  A secondary benefit of defending all users' freedom is that\nimprovements made in alternate versions of the program, if they\nreceive widespread use, become available for other developers to\nincorporate.  Many developers of free software are heartened and\nencouraged by the resulting cooperation.  However, in the case of\nsoftware used on network servers, this result may fail to come about.\nThe GNU General Public License permits making a modified version and\nletting the public access it on a server without ever releasing its\nsource code to the public.\n\n  The GNU Affero General Public License is designed specifically to\nensure that, in such cases, the modified source code becomes available\nto the community.  It requires the operator of a network server to\nprovide the source code of the modified version running there to the\nusers of that server.  Therefore, public use of a modified version, on\na publicly accessible server, gives the public access to the source\ncode of the modified version.\n\n  An older license, called the Affero General Public License and\npublished by Affero, was designed to accomplish similar goals.  This is\na different license, not a version of the Affero GPL, but Affero has\nreleased a new version of the Affero GPL which permits relicensing under\nthis license.\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 Affero 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. Remote Network Interaction; Use with the GNU General Public License.\n\n  Notwithstanding any other provision of this License, if you modify the\nProgram, your modified version must prominently offer all users\ninteracting with it remotely through a computer network (if your version\nsupports such interaction) an opportunity to receive the Corresponding\nSource of your version by providing access to the Corresponding Source\nfrom a network server at no charge, through some standard or customary\nmeans of facilitating copying of software.  This Corresponding Source\nshall include the Corresponding Source for any work covered by version 3\nof the GNU General Public License that is incorporated pursuant to the\nfollowing paragraph.\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 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 work with which it is combined will remain governed by version\n3 of the GNU General Public License.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU Affero General Public License from time to time.  Such new versions\nwill be 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 Affero 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 Affero 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 Affero 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 Affero General Public License as published\n    by 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 Affero General Public License for more details.\n\n    You should have received a copy of the GNU Affero 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 your software can interact with users remotely through a computer\nnetwork, you should also make sure that it provides a way for users to\nget its source.  For example, if your program is a web application, its\ninterface could display a \"Source\" link that leads users to an archive\nof the code.  There are many ways you could offer source, and different\nsolutions will be better for different programs; see section 13 for the\nspecific requirements.\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 AGPL, see\n<https://www.gnu.org/licenses/>.\n"
  },
  {
    "path": "MergeData.py",
    "content": "def merge(time_points, x, y, step):\n    current_step = 0\n    current_step_num = current_step * step\n    time_points_merge = []\n    x_merge = []\n    y_merge = []\n    for i, time_point in enumerate(time_points):\n        if time_point >= current_step_num:\n            time_points_merge.append(current_step_num)\n            x_merge.append(0)\n            y_merge.append(0)\n            current_step += 1\n            current_step_num = current_step * step\n\n        x_merge[current_step - 1] = x_merge[current_step - 1] + x[i]\n        y_merge[current_step - 1] = y_merge[current_step - 1] + y[i]\n\n    print(x_merge)\n    print(y_merge)\n    print(time_points_merge)\n\n\ndef merge_x_y(x, y, time_points_x, time_points_y):\n    new_x = []\n    new_y = []\n    new_time_points = []\n\n    x_length = len(time_points_x)\n    y_length = len(time_points_y)\n\n    xi = 0\n    yi = 0\n    while xi < x_length or yi < y_length:\n        if xi >= x_length:\n            new_y.append(y[yi])\n            new_x.append(0)\n            new_time_points.append(time_points_y[yi])\n            yi += 1\n            continue\n        if yi >= y_length:\n            new_x.append(x[xi])\n            new_y.append(0)\n            new_time_points.append(time_points_x[xi])\n            xi += 1\n            continue\n\n        if time_points_x[xi] == time_points_y[yi]:\n            new_x.append(x[xi])\n            new_y.append(y[yi])\n            new_time_points.append(time_points_x[xi])\n            xi += 1\n            yi += 1\n        elif time_points_x[xi] < time_points_y[yi]:\n            new_x.append(x[xi])\n            new_y.append(0)\n            new_time_points.append(time_points_x[xi])\n            xi += 1\n        elif time_points_x[xi] > time_points_y[yi]:\n            new_y.append(y[yi])\n            new_x.append(0)\n            new_time_points.append(time_points_y[yi])\n            yi += 1\n    print(new_time_points)\n    print(new_x)\n    print(new_y)\n    return new_time_points, new_x, new_y\n\n\ntime_points = [0, 3, 12, 16, 25, 28, 35, 41, 47, 58, 60, 67, 77, 82, 92, 99, 104, 112, 118, 129, 132, 142, 149, 154,\n               162, 167, 171, 180, 185, 191, 197, 207, 216, 220, 233, 240, 244, 257, 264, 268, 277, 290, 295, 307, 313,\n               319, 329, 337, 343, 354, 361, 375, 380, 387, 395, 404, 408, 417, 425, 434, 446, 450, 460, 466, 475, 490,\n               494, 500, 514, 518, 528, 537, 542, 554, 561, 565, 575, 578, 586, 597, 601, 613, 623, 628, 635, 645, 654,\n               658, 669, 678, 683, 695, 707, 718, 723, 733, 744, 747, 760, 770, 774, 785, 794, 802, 811, 819, 829, 835,\n               848, 854, 871, 883, 890, 897, 913, 923, 928, 944, 954, 958, 972, 975, 988, 993, 1002, 1011, 1017, 1029,\n               1036, 1041, 1054, 1060, 1068, 1082, 1087, 1094, 1106, 1121, 1123, 1129, 1143, 1160, 1164, 1170, 1179,\n               1187, 1193, 1206, 1207, 1219, 1222, 1230, 1241, 1245, 1256, 1260, 1269, 1283, 1290, 1294, 1305, 1317,\n               1331, 1346, 1351, 1357, 1361, 1372, 1383, 1388, 1396, 1402, 1412, 1418, 1428, 1430, 1448, 1451, 1462,\n               1466, 1472, 1484, 1488, 1503, 1508, 1519, 1527, 1530, 1546, 1555, 1563, 1568, 1578, 1589, 1602, 1619,\n               1637, 1638, 1660, 1669]\nx = [-1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -2, 1, 1, 1, 0, 2, 0, 1, 0, 0, 2, 1, 2, 1, 1, 2, 1, -1, 1, -3, 1, -2, -4, -2,\n     -2, -2, -1, -1, -3, -2, -1, -1, -2, 0, -1, 0, -1, -1, -2, -1, -2, -2, -2, -2, -2, 0, -1, 0, 0, -2, -2, 2, -2, 4,\n     -1, 5, 1, 2, 3, 2, 1, 4, 2, 2, 3, 2, 3, 2, 1, 3, 2, 2, 3, -1, 3, 1, -4, -1, -2, -5, -2, -2, -2, 2, -5, 2, 2, 3, 2,\n     2, 2, -1, 1, -2, -2, -2, -3, -2, -2, -2, -2, -2, -2, 0, 0, 3, 1, 0, 3, -1, -2, 4, -2, 5, 1, 5, 2, 3, 6, 3, 4, 2, 3,\n     2, -2, 1, -1, 2, 0, 2, 2, 2, -1, 4, 4, -2, 5, 1, 0, -2, 1, -1, -3, 0, -1, -6, -1, -2, -5, -2, -2, -2, -1, -5, -2,\n     -4, -3, -4, -5, -3, 0, -3, -2, -2, -1, -2, -2, -1, -2, 0, -2, -2, -2, -2, 0, -2, 3, -2, -1, 1, 4, 1, 2, 2, 1, -1,\n     -2, -2, -2, 1]\ny = [-1, 0, -1, 3, -1, 7, 1, 7, 2, 2, 6, 2, 5, 2, 2, 6, 3, 2, 2, 2, 0, 2, 4, 2, 2, 3, 2, 1, 2, 6, 2, 4, 6, 4, 4, 2, 6,\n     4, 12, 6, 6, 10, 6, 5, 3, 8, 6, 9, 6, 5, 6, 6, 3, 6, 5, 3, 4, 4, 3, 3, 4, 3, 5, -2, 6, 6, 4, 5, 6, 6, 5, 5, 5, 6,\n     3, 6, -1, 6, 4, 3, 4, 4, 3, -2, 3, 2, 4, 2, 2, 2, 2, 2, 2, 3, 2, 3, 5, 4, 3, 3, 3, 4, -1, 4, -6, 3, -8, 3, -8, 3,\n     3, -6, 3, 3, 3, -2, 3, 2, -1, 2, 2, -4, 2, 4, 2, 5, 2, 2, 3, 2, 1, -6, 1, 0, -8, 0, 0, 0, -4, 0, 0, 0, -2, 1, 1, 0,\n     1, 1, 3, 2, 1, 1, 2, 1, 1, 0, 2, 1, 0, 1, 1, 1, 0, -2, 1, -4, 1, 1, -4, 2, -4, 0, -4, -1, -1, 0, 3, -1, 0, 4, -1,\n     -1, 0, 0, -2, -2, -2, -2, -2, -2, -3, -2, -1, -2, 3, 4, -1, 4, 2, -2]\n# merge(time_points, x, y, 27.5)\n\nt_x = [1, 3, 6]\nx = [1, 3, 4]\nt_y = []\ny = []\n\n# merge_x_y(x, y, t_x, t_y)\n"
  },
  {
    "path": "README.md",
    "content": "### Apex Recoils\n\napex自动识别枪械压枪宏\n\n进度：\n\nupdate(2024-03-01): 本项目已从键鼠反冲压枪重心转到对接s1自动识别（包含jtk触发罗技抖枪实现等），mnk数据开发将会无限期延后。\n\nupdate(2024-04-10): 本项目重启mnk数据开发。\n\nupdate(2024-04-18): mnk压枪数据开发基本完成。\n\n开源交流群新建于2024-04-25，群号：206666041，入群前请贡献出你的star。\n\n进群细则：请具有一定代码基础的人再进群，本群各管理都不会对一些过于基础的问题进行回答（但你可以抱有希望来问其他群友），并不会从零开始手把手教你如何使用，只提供代码上实现思路或环境安装上的帮助疑惑。只保证代码能够运行，不负责处理因为个人安装所产生的差异导致无法运行的环境问。\n\nrelease包中所产生bug可能并不能及时的修复，所以请不要逮着群主问围绕着release版本或使用方面的问题，请自行拉取最新代码编译运行。\n\n以上所有细款视心情生效，请不要进群没人回答就开始不耐烦，人生攻击。另外，不接受任何形式的付款“请教”，请您有钱就去买挂玩，谢谢。\n\n\n[![Star History Chart](https://api.star-history.com/svg?repos=wdragondragon/ApexRecoils&type=Date)](https://star-history.com/#wdragondragon/ApexRecoils&Date)\n\n### 功能清单\n\n- [x] 自动识别枪械\n  - [x] 支持识别不同倍镜，涡轮增压器\n  - [x] 适配截图方案：\n    - [x] PIL\n    - [x] Mss\n    - [x] capture 视频采集卡\n- [x] 鼠标平滑移动\n- [x] 适配多种键鼠盒子\n    - [x] km_box A\n    - [x] km_box net\n    - [x] 无涯键鼠\n    - [x] 飞易来\n- [x] 支持保存配置，多配置切换\n- [x] 枪械数据开发中，现基于腰射灵敏1.6 ads全0.9倍率的基础上开发：\n    - [x] CAR\n    - [x] R99\n    - [x] R301\n    - [x] 平行步枪\n    - [x] 电冲\n    - [x] 转换者\n    - [x] re45\n    - [x] 暴走\n    - [x] L星\n    - [x] 哈沃克(涡轮)\n    - [x] 专注(涡轮) \n    - [x] 喷火\n    - [x] 哈沃克\n    - [x] 专注\n    - [x] 猎兽\n    - [x] 汗洛\n    - [X] 复仇女神\n- [x] 支持抖枪，大小写开关\n- [x] 自动识别支持ReaSnow s1转换器按键（需要串联km_box net，使用km_box_net的键鼠模式下生效）\n    - 实现jtk\n        - [x] axis转鼠标\n    - [x] 自定义时长长按切换切换模式（弥补s1的长按无法自定义时长的短板）\n    - [x] 自动识别的分布式（截图在client，识别与发送键盘指令在server）\n\n### 使用说明\n\n运行main.py\n\n### 参与开发说明\n\n#### 文件结构\n\n```\n.\n├─config                      启动配置文件\n│  ├─ref                        运行配置文件\n│  ├─ReaSnowGun.json            转换器切换宏按键数据\n│  └─specs.json                 压枪数据\n├─core                          核心代码\n│  ├─Config.py                读取配置类\n│  ├─KeyAndMouseListner.py      鼠标和键盘监听\n│  ├─RecoildsCore.py            压枪数据处理，并与鼠标意图移动交互\n│  ├─SelectGun.py               枪械识别\n│  ├─ReaSnowSelectGun.py        S1转换器切换宏\n│  ├─KmBoxNetListener.py        kmbox net键鼠监听\n│  └─ShakeGun.py                抖枪\n├─images                      存放各分辨率枪械图色图片\n│  ├─1920x1080\n│  ├─………………\n│  ├─2560x1440\n│  ├─hop_up                     存放即用配件图片\n│  └─scope                      存放瞄准镜图片\n├─log                         打印日志的窗体定义\n├─mouse_mover                 各类移动鼠标的实现\n└─tools                       各类工具\n\n```\n\n#### 枪械数据开发\n\n脚手架大概已开发完成，原理为：在开镜开枪时记时，当达到time_point时间（豪秒），会根据相同下标寻找x和y，将鼠标移动到相应位置达到压枪的效果。\n由于apex特殊性，枪械在不同弹匣容量的情况下，其实是共享弹道的，所以只需要写出一条曲线即可。\n\n对于有畜力的枪械，后续需要在mods中做其他模式的适配（待开发）\n\n主要的工作量体现在调试开枪持续时间和鼠标移动的数据开发。 示例数据格式：\n```json\n[\n  {\n    \"name\": \"R99\",\n    \"type\": \"serial\",\n    \"recoils\": {\n      \"un_aim\": {\n        \"time_points\": [],\n        \"x\": [],\n        \"y\": []\n      },\n      \"aim\": {\n        \"time_points\": [],\n        \"x\": [],\n        \"y\": []\n      }\n    }\n  },\n  {\n    \"name\": \"猎兽\",\n    \"type\": \"intermittent\",\n    \"recoils\": {\n      \"aim\": [\n        {\n          \"index\": 0,\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        },\n        {\n          \"index\": 1,\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        }\n      ],\n      \"un_aim\": []\n    }\n  },\n  {\n    \"name\": \"哈沃克\",\n    \"type\": \"serial\",\n    \"recoils\": {\n      \"un_aim\": {\n        \"time_points\": [],\n        \"x\": [],\n        \"y\": []\n      },\n      \"aim\": {\n        \"time_points\": [],\n        \"x\": [],\n        \"y\": []\n      },\n      \"turbocharger\": {\n        \"un_aim\": {\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        },\n        \"aim\": {\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        }\n      }\n    }\n  }\n]\n```\n字段描述：\n- name: 枪械名称，需要与识别图片名相同\n- type: 枪械类型(全自动serial，连发枪intermittent)\n- recoils: 压枪数据 \n  - turbocharger（携带涡轮状态下的数据）\n  - aim/un_aim: 瞄准状态时使用的数据 / 腰射状态时使用的数据，该数据针对枪械类型会有不同的形态 （全自动枪械时为单对象）：（连发枪时为数组，数组的单个对象为每点一下的压枪数据）\n    - time_points: 执行时间点，以ms为单位 \n    - x: 执行时间点x轴偏移 \n    - y: 执行时间点y轴偏移\n\n  \n#### 源码开发\n\n项目中主要构建在对键鼠与手柄的监听与函数注册，具体看图和源码。\n\n![项目对象图.jpg](readme/项目对象图.png)\n\n\n\n#### 自动识别如何对接s1转换器\n\n对接s1时的整体架构：\n\n![自动识别整体架构.jpg](readme/自动识别整体架构.jpg)\n\n注意配置文件[ReaSnowGun.json](config%2FReaSnowGun.json)。\n\n该json字典中，第一层key值为枪械名称，与枪械图片名称对应。识别到哪个就是使用哪个图片的名称来找value\n\n第二层，是枪械对应倍镜为key，需要按下的触发键键值为value。\n\n第三层（选填），若专注，哈沃克等枪，拥有hot-up配件。可填入turbocharger（涡轮增压器）对应触发的键值。\n\n另外需要注意的是，该枪械未设定多个倍镜的宏时，并且拥有一个该枪械的任意倍镜通用宏，可增加一个键值为0的触发键。\n\n[绑定按键参考km box net的头文件](HidTable.h)\n\n以下为示例：\n\n```json\n{\n  \"p2020\": {\n    \"0\": \"0x2D\"\n  },\n  \"R-301\": {\n    \"1\": \"0x3A\",\n    \"2\": \"0x3B\",\n    \"3\": \"0x3C\",\n    \"4\": \"0x3D\"\n  },\n  \"平行步枪\": {\n    \"1\": \"0x3E\",\n    \"2\": \"0x3F\",\n    \"3\": \"0x40\",\n    \"4\": \"0x41\"\n  },\n  \"哈沃克\": {\n    \"1\": \"0x0C\",\n    \"2\": \"0x12\",\n    \"3\": \"0x13\",\n    \"4\": \"0x2F\",\n    \"turbocharger\": {\n      \"1\": \"0x30\",\n      \"2\": \"0x0D\",\n      \"3\": \"0x31\",\n      \"4\": \"0x0E\"\n    }\n  },\n  \"专注\": {\n    \"1\": \"0x61\",\n    \"2\": \"0x54\",\n    \"3\": \"0x55\",\n    \"4\": \"0x56\",\n    \"turbocharger\": {\n      \"1\": \"0x63\",\n      \"2\": \"0x57\",\n      \"3\": \"0x56\",\n      \"4\": \"0x63\"\n    }\n  }\n}\n\n```\n\n2K分辨率下图片已新增在项目中，需要新增其他分辨率的需要新增图片类别：\n\n- `hop_up`：暂时只有涡轮增压[![turbocharger.png](images%2Fhop_up%2F2560x1440%2Fturbocharger.png)]\n- `scope`下不同镜子图片：\n    - ![1xClassic.png](images%2Fscope%2F2560x1440%2F1xClassic.png)1xClassic.png\n    - ![1xHolo.png](images%2Fscope%2F2560x1440%2F1xHolo.png)1xHolo.png\n    - ![1xDigitalThreat.png](images%2Fscope%2F2560x1440%2F1xDigitalThreat.png)1xDigitalThreat.png\n    - ![1x-2xVariableHolo.png](images%2Fscope%2F2560x1440%2F1x-2xVariableHolo.png)1x-2xVariableHolo.png\n    - ![2xBruiser.png](images%2Fscope%2F2560x1440%2F2xBruiser.png)2xBruiser.png\n    - ![3xRanger.png](images%2Fscope%2F2560x1440%2F3xRanger.png)3xRanger.png\n    - ![4xVariableAOG.png](images%2Fscope%2F2560x1440%2F4xVariableAOG.png)4xVariableAOG.png\n\n如何新增，首先在Config.py中，新增你需要分辨率对应的镜子和涡轮增压器的截图位置。\n\n镜子的位置一共有三处，第1，2，3格，涡轮增压器的位置一共有两格，第4，5格。\n\n```python\nscope_screenshot_resolution = {\n    (2560, 1440): [(2034, 1338, 2059, 1363), (2069, 1338, 2094, 1363), (2106, 1338, 2131, 1363)]\n}\nhop_up_screenshot_resolution = {\n    (2560, 1440): [(2142, 1338, 2167, 1363), (2180, 1338, 2205, 1363)]\n}\n\n```\n\n注意：每个位置之间截图出来的图片大小应该一致。并且文件夹中的图片大小不能与截图位置大小计算出的大小不一致，否则会出错。本代码中2K分辨率截图为25*\n25。其他分辨率中图片大小可能有变动，仅供参考。\n\n\n\n### 加入我们\n\n欢迎加入我们，共同完善已有代码，优化已有数据或提供建议。我们将资源完全共享。因为加我的人员较多，暂只接收提供贡献的好友位，使用分享请加Q群。\n\n![wechat.png](wechat.png)\n"
  },
  {
    "path": "auth/check_run.pyi",
    "content": "def check(validate_type) -> None:\n    \"\"\"\n        监权\n    \"\"\"\n    ...\n\n\ndef open_check(val_type=None):\n    ...\n\n\ndef auth(func):\n    ...\n"
  },
  {
    "path": "client.py",
    "content": "import sys\nimport threading\n\nimport pynput\nfrom PyQt5.QtWidgets import QApplication\n\nfrom auth.check_run import open_check\nfrom core.Config import Config\nfrom core.GameWindowsStatus import GameWindowsStatus\nfrom core.KeyAndMouseListener import MouseListener, KeyListener\nfrom core.ReaSnowSelectGun import ReaSnowSelectGun\nfrom core.RecoildsCore import RecoilsListener, RecoilsConfig\nfrom core.SelectGun import SelectGun\nfrom core.image_comparator import ImageComparatorFactory\nfrom core.image_comparator.DynamicSizeImageComparator import DynamicSizeImageComparator\nfrom core.joy_listener.JoyListener import JoyListener\nfrom core.joy_listener.JoyToKey import JoyToKey\nfrom core.joy_listener.RockerMonitor import RockerMonitor\nfrom core.joy_listener.S1SwitchMonitor import S1SwitchMonitor\nfrom core.screentaker import ScreenTakerFactory\nfrom log import LogFactory\nfrom mouse_mover import MoverFactory\nfrom mouse_mover.IntentManager import IntentManager\nfrom mouse_mover.MouseMover import MouseMover\nfrom windows.SystemTrayApp import SystemTrayApp\n\n\n# @open_check(\"apex_recoils\")\ndef main():\n    \"\"\"\n        main\n    \"\"\"\n    app = QApplication(sys.argv)\n    config = Config(default_ref_config_name=\"client\")\n    apex_mouse_listener = MouseListener()\n    apex_key_listener = KeyListener()\n\n    game_windows_status = GameWindowsStatus()\n\n    image_comparator = ImageComparatorFactory.get_image_comparator(comparator_mode=config.comparator_mode,\n                                                                   config=config)\n\n    screen_taker = ScreenTakerFactory.get_screen_taker(config)\n\n    select_gun = SelectGun(bbox=config.select_gun_bbox,\n                           image_path=config.image_path,\n                           scope_bbox=config.select_scope_bbox,\n                           scope_path=config.scope_path,\n                           refresh_buttons=config.refresh_buttons,\n                           has_turbocharger=config.has_turbocharger,\n                           hop_up_bbox=config.select_hop_up_bbox,\n                           hop_up_path=config.hop_up_path,\n                           image_comparator=image_comparator,\n                           screen_taker=screen_taker, game_windows_status=game_windows_status,\n                           delay_refresh_buttons=config.delay_refresh_buttons)\n\n    mouse_listener = pynput.mouse.Listener(on_click=apex_mouse_listener.on_click)\n    keyboard_listener = pynput.keyboard.Listener(on_press=apex_key_listener.on_press,\n                                                 on_release=apex_key_listener.on_release)\n    mouse_listener_thread = threading.Thread(target=mouse_listener.start)\n    keyboard_listener_thread = threading.Thread(target=keyboard_listener.start)\n\n    mouse_listener_thread.start()\n    keyboard_listener_thread.start()\n\n    mouse_mover: MouseMover = MoverFactory.get_mover(mouse_listener=apex_mouse_listener,\n                                                     game_windows_status=game_windows_status,\n                                                     config=config)\n    intent_manager = IntentManager(mouse_mover=mouse_mover)\n    intent_manager_thread = threading.Thread(target=intent_manager.start)\n    intent_manager_thread.start()\n\n    # 如果需要对接s1\n    # 1. 识别触发s1按键，使用rea_snow_mouse_mover\n    # 2. s1的切换逻辑层的按键保持，使用rea_snow_mouse_mover\n    # 3. jtk，根据key_trigger_mode来选择 mouse_mover的配置还是固定的distributed_c1\n    if config.rea_snow_gun_config_name != '':\n        # 判断c1透传\n        if config.rea_snow_mouse_mover == config.mouse_mover:\n            rea_snow_mouse_mover = mouse_mover\n        else:\n            rea_snow_mouse_mover: MouseMover = MoverFactory.get_mover(mouse_listener=apex_mouse_listener,\n                                                                      config=config,\n                                                                      mouse_model=config.rea_snow_mouse_mover,\n                                                                      c1_mover=mouse_mover,\n                                                                      game_windows_status=game_windows_status)\n        rea_snow_select_gun = ReaSnowSelectGun(mouse_mover=rea_snow_mouse_mover,\n                                               config_name=config.rea_snow_gun_config_name)\n        select_gun.connect(rea_snow_select_gun.trigger_button)\n\n        if config.key_trigger_mode == 'local':\n            c1_mover: MouseMover = mouse_mover\n        else:\n            c1_mover: MouseMover = MoverFactory.get_mover(config=config, mouse_model=\"distributed_c1\")\n\n        joy_listener = JoyListener()\n        dynamic_size_image_comparator = DynamicSizeImageComparator(base_path=config.image_base_path,\n                                                                   screen_taker=screen_taker,\n                                                                   base_image_comparator=image_comparator)\n        s1_switch_monitor = S1SwitchMonitor(joy_listener=joy_listener,\n                                            licking_state_path=config.licking_state_path,\n                                            licking_state_bbox=config.licking_state_bbox,\n                                            mouser_mover=rea_snow_mouse_mover,\n                                            dynamic_size_image_comparator=dynamic_size_image_comparator,\n                                            s1_switch_hold_map=config.s1_switch_hold_map,\n                                            rea_snow_select_gun=rea_snow_select_gun)\n        # jtk启动\n        jtk = JoyToKey(joy_to_key_map=config.joy_to_key_map, c1_mouse_mover=c1_mover,\n                       game_windows_status=game_windows_status)\n        jtk.reg_toggle_func(lambda: len(s1_switch_monitor.down_key_time) == 0)\n        joy_listener.connect_axis(jtk.axis_to_key)\n        rocker_monitor = RockerMonitor(joy_listener=joy_listener, select_gun=select_gun)\n        joy_listener.start(None)\n    else:\n        # 压枪\n        recoils_config = RecoilsConfig()\n        recoils_listener = RecoilsListener(recoils_config=recoils_config,\n                                           mouse_listener=apex_mouse_listener,\n                                           select_gun=select_gun,\n                                           intent_manager=intent_manager,\n                                           game_windows_status=game_windows_status)\n        recoils_listener_thread = threading.Thread(target=recoils_listener.start)\n        recoils_listener_thread.start()\n\n    system_tray_app = SystemTrayApp(\"client\")\n    # 自动识别启动\n    threading.Thread(target=select_gun.test).start()\n    sys.exit(app.exec_())\n\n\nif __name__ == '__main__':\n    main()\n"
  },
  {
    "path": "config/5aas20v2.json",
    "content": "{\n  \"p2020\": {\n    \"0\": \"0x2F\"\n  },\n  \"G7\": {\n    \"0\": \"0x2F\"\n  },\n  \"re-45\": {\n    \"0\": \"0x36\"\n  },\n  \"R-301\": {\n    \"0\": \"0x3A\"\n  },\n  \"平行步枪\": {\n    \"0\": \"0x3B\"\n  },\n  \"car\": {\n    \"0\": \"0x24\"\n  },\n  \"电能\": {\n    \"0\": \"0x23\"\n  },\n  \"转换者\": {\n    \"0\": \"0x25\"\n  },\n  \"哈沃克\": {\n    \"0\": \"0x52\",\n    \"turbocharger\": {\n      \"0\": \"0x3C\"\n    }\n  },\n  \"专注\": {\n    \"0\": \"0x0F\",\n    \"turbocharger\": {\n      \"0\": \"0x3E\"\n    }\n  },\n  \"lstart\": {\n    \"0\": \"0x3D\"\n  },\n  \"复仇女神\": {\n    \"0\": \"0x42\"\n  },\n  \"R99\": {\n    \"0\": \"0x22\"\n  },\n  \"猎兽\": {\n    \"0\": \"0x30\"\n  },\n  \"喷火\": {\n    \"0\": \"0x3F\"\n  },\n  \"汗洛\": {\n    \"0\": \"0x50\"\n  },\n  \"close_key\": \"0x35\",\n  \"no_found_click_close_key\": false\n}"
  },
  {
    "path": "config/ReaSnowGun.json",
    "content": "{\n  \"p2020\": {\n    \"0\": \"45\",\n    \"caps\": false\n  },\n  \"G7\": {\n    \"0\": \"45\",\n    \"caps\": false\n  },\n  \"re-45\": {\n    \"1\": \"36\",\n    \"2\": \"37\"\n  },\n  \"R-301\": {\n    \"1\": \"58\",\n    \"2\": \"59\",\n    \"3\": \"60\",\n    \"4\": \"61\"\n  },\n  \"平行步枪\": {\n    \"1\": \"62\",\n    \"2\": \"63\",\n    \"3\": \"64\",\n    \"4\": \"65\"\n  },\n  \"car\": {\n    \"1\": \"68\",\n    \"2\": \"69\"\n  },\n  \"电能\": {\n    \"1\": \"39\",\n    \"2\": \"70\"\n  },\n  \"转换者\": {\n    \"1\": \"71\",\n    \"2\": \"72\"\n  },\n  \"哈沃克\": {\n    \"1\": \"12\",\n    \"2\": \"18\",\n    \"3\": \"19\",\n    \"4\": \"47\",\n    \"turbocharger\": {\n      \"1\": \"48\",\n      \"2\": \"13\",\n      \"3\": \"49\",\n      \"4\": \"14\"\n    }\n  },\n  \"专注\": {\n    \"1\": \"97\",\n    \"2\": \"84\",\n    \"3\": \"85\",\n    \"4\": \"86\",\n    \"turbocharger\": {\n      \"1\": \"99\",\n      \"2\": \"87\",\n      \"3\": \"86\",\n      \"4\": \"99\"\n    }\n  },\n  \"lstart\": {\n    \"1\": \"46\",\n    \"2\": \"82\",\n    \"3\": \"81\",\n    \"4\": \"80\"\n  },\n  \"复仇女神\": {\n    \"1\": \"15\",\n    \"2\": \"51\",\n    \"3\": \"52\",\n    \"4\": \"54\"\n  },\n  \"R99\": {\n    \"1\": \"66\",\n    \"2\": \"67\"\n  },\n  \"猎兽\": {\n    \"1\": \"28\",\n    \"2\": \"24\"\n  },\n  \"喷火\": {\n    \"1\": \"79\",\n    \"2\": \"95\",\n    \"3\": \"96\",\n    \"4\": \"97\"\n  },\n  \"汗洛\": {\n    \"1\": \"73\",\n    \"2\": \"76\",\n    \"3\": \"75\",\n    \"4\": \"78\"\n  },\n  \"波塞克\": {\n    \"0\": \"53\",\n    \"caps\": false\n  },\n  \"close_key\": \"53\",\n  \"no_found_click_close_key\": true\n}"
  },
  {
    "path": "config/ReaSnowGun_s21.json",
    "content": "{\n  \"p2020\": {\n    \"0\": \"45\",\n    \"caps\": false\n  },\n  \"re-45\": {\n    \"1\": \"95\",\n    \"2\": \"96\"\n  },\n  \"R-301\": {\n    \"1\": \"58\",\n    \"2\": \"59\",\n    \"3\": \"60\",\n    \"4\": \"61\"\n  },\n  \"平行步枪\": {\n    \"1\": \"62\",\n    \"2\": \"63\",\n    \"3\": \"64\",\n    \"4\": \"65\"\n  },\n  \"car\": {\n    \"1\": \"68\",\n    \"2\": \"69\"\n  },\n  \"电能\": {\n    \"1\": \"39\",\n    \"2\": \"70\"\n  },\n  \"转换者\": {\n    \"1\": \"71\",\n    \"2\": \"72\"\n  },\n  \"哈沃克\": {\n    \"1\": \"12\",\n    \"2\": \"18\",\n    \"3\": \"19\",\n    \"4\": \"47\",\n    \"turbocharger\": {\n      \"1\": \"48\",\n      \"2\": \"49\",\n      \"3\": \"13\",\n      \"4\": \"14\"\n    }\n  },\n  \"专注\": {\n    \"1\": \"83\",\n    \"2\": \"84\",\n    \"3\": \"85\",\n    \"4\": \"86\",\n    \"turbocharger\": {\n      \"1\": \"55\",\n      \"2\": \"55\",\n      \"3\": \"99\",\n      \"4\": \"99\"\n    }\n  },\n  \"lstart\": {\n    \"1\": \"46\",\n    \"2\": \"82\",\n    \"3\": \"81\",\n    \"4\": \"80\"\n  },\n  \"复仇女神\": {\n    \"1\": \"51\",\n    \"2\": \"15\",\n    \"3\": \"52\",\n    \"4\": \"54\"\n  },\n  \"R99\": {\n    \"1\": \"66\",\n    \"2\": \"67\"\n  },\n  \"猎兽\": {\n    \"1\": \"28\",\n    \"2\": \"97\"\n  },\n  \"喷火\": {\n    \"0\": \"79\"\n  },\n  \"汗洛\": {\n    \"1\": \"73\",\n    \"2\": \"76\",\n    \"3\": \"75\",\n    \"4\": \"78\"\n  },\n  \"波塞克\": {\n    \"0\": \"53\",\n    \"caps\": false\n  },\n  \"close_key\": \"53\",\n  \"no_found_click_close_key\": true\n}"
  },
  {
    "path": "config/ReaSnowGun_s21_v2.json",
    "content": "{\n  \"R-301\": {\n    \"0\": \"58\"\n  },\n  \"平行步枪\": {\n    \"0\": \"59\"\n  },\n\n  \"哈沃克\": {\n    \"0\": \"82\",\n    \"turbocharger\": {\n      \"0\": \"60\"\n    }\n  },\n  \"lstart\": {\n    \"0\": \"61\"\n  },\n  \"专注\": {\n    \"0\": \"15\",\n    \"turbocharger\": {\n      \"0\": \"62\"\n    }\n  },\n  \"喷火\": {\n    \"0\": \"63\"\n  },\n  \"复仇女神\": {\n    \"0\": \"66\"\n  },\n  \"R99\": {\n    \"0\": \"34\"\n  },\n  \"电能\": {\n    \"0\": \"35\"\n  },\n  \"car\": {\n    \"0\": \"36\"\n  },\n  \"转换者\": {\n    \"0\": \"37\"\n  },\n  \"p2020\": {\n    \"0\": \"47\",\n    \"caps\": false\n  },\n  \"猎兽\": {\n    \"0\": \"48\"\n  },\n  \"re-45\": {\n    \"0\": \"55\"\n  },\n  \"汗洛\": {\n    \"0\": \"80\"\n  },\n  \"close_key\": \"53\",\n  \"no_found_click_close_key\": true\n}"
  },
  {
    "path": "config/ReaSnowGun_s21_v2_xb.json",
    "content": "{\n  \"R-301\": {\n    \"0\": \"58\"\n  },\n  \"平行步枪\": {\n    \"0\": \"59\"\n  },\n\n  \"哈沃克\": {\n    \"0\": \"82\",\n    \"turbocharger\": {\n      \"0\": \"60\"\n    }\n  },\n  \"lstart\": {\n    \"0\": \"61\"\n  },\n  \"专注\": {\n    \"0\": \"15\",\n    \"turbocharger\": {\n      \"0\": \"62\"\n    }\n  },\n  \"喷火\": {\n    \"0\": \"63\"\n  },\n  \"复仇女神\": {\n    \"0\": \"66\"\n  },\n  \"R99\": {\n    \"0\": \"34\"\n  },\n  \"电能\": {\n    \"0\": \"35\"\n  },\n  \"car\": {\n    \"0\": \"36\"\n  },\n  \"转换者\": {\n    \"0\": \"37\"\n  },\n  \"p2020\": {\n    \"0\": \"53\",\n    \"caps\": false\n  },\n  \"猎兽\": {\n    \"0\": \"53\"\n  },\n  \"re-45\": {\n    \"0\": \"55\"\n  },\n  \"汗洛\": {\n    \"0\": \"80\"\n  },\n  \"close_key\": \"53\",\n  \"no_found_click_close_key\": true\n}"
  },
  {
    "path": "config/ReaSnowGun_s22.json",
    "content": "{\n  \"R-301\": {\n    \"0\": \"58\"\n  },\n  \"平行步枪\": {\n    \"0\": \"59\"\n  },\n  \"哈沃克\": {\n    \"0\": \"79\",\n    \"turbocharger\": {\n      \"0\": \"60\"\n    }\n  },\n  \"lstart\": {\n    \"0\": \"61\"\n  },\n  \"专注\": {\n    \"0\": \"15\",\n    \"turbocharger\": {\n      \"0\": \"62\"\n    }\n  },\n  \"喷火\": {\n    \"0\": \"63\"\n  },\n  \"复仇女神\": {\n    \"0\": \"66\"\n  },\n  \"R99\": {\n    \"0\": \"34\"\n  },\n  \"电能\": {\n    \"0\": \"35\"\n  },\n  \"car\": {\n    \"0\": \"36\"\n  },\n  \"转换者\": {\n    \"0\": \"37\"\n  },\n  \"p2020\": {\n    \"0\": \"47\",\n    \"caps\": false\n  },\n  \"猎兽\": {\n    \"0\": \"48\"\n  },\n  \"re-45\": {\n    \"0\": \"55\"\n  },\n  \"汗洛\": {\n    \"0\": \"80\"\n  },\n  \"close_key\": \"53\",\n  \"no_found_click_close_key\": true\n}"
  },
  {
    "path": "config/ReaSnowGun_v2.json",
    "content": "{\n  \"p2020\": {\n    \"0\": \"45\",\n    \"caps\": false\n  },\n  \"G7\": {\n    \"0\": \"45\",\n    \"caps\": false\n  },\n  \"re-45\": {\n    \"1\": \"95\",\n    \"2\": \"96\"\n  },\n  \"R-301\": {\n    \"1\": \"58\",\n    \"2\": \"59\",\n    \"3\": \"60\",\n    \"4\": \"61\"\n  },\n  \"平行步枪\": {\n    \"1\": \"62\",\n    \"2\": \"63\",\n    \"3\": \"64\",\n    \"4\": \"65\"\n  },\n  \"car\": {\n    \"1\": \"68\",\n    \"2\": \"69\"\n  },\n  \"电能\": {\n    \"1\": \"39\",\n    \"2\": \"70\"\n  },\n  \"转换者\": {\n    \"1\": \"71\",\n    \"2\": \"72\"\n  },\n  \"哈沃克\": {\n    \"1\": \"12\",\n    \"2\": \"18\",\n    \"3\": \"19\",\n    \"4\": \"47\",\n    \"turbocharger\": {\n      \"1\": \"48\",\n      \"2\": \"49\",\n      \"3\": \"13\",\n      \"4\": \"14\"\n    }\n  },\n  \"专注\": {\n    \"1\": \"83\",\n    \"2\": \"84\",\n    \"3\": \"85\",\n    \"4\": \"86\",\n    \"turbocharger\": {\n      \"1\": \"54\",\n      \"2\": \"54\",\n      \"3\": \"99\",\n      \"4\": \"99\"\n    }\n  },\n  \"lstart\": {\n    \"1\": \"46\",\n    \"2\": \"82\",\n    \"3\": \"81\",\n    \"4\": \"80\"\n  },\n  \"复仇女神\": {\n    \"1\": \"15\",\n    \"2\": \"51\",\n    \"3\": \"52\",\n    \"4\": \"54\"\n  },\n  \"R99\": {\n    \"1\": \"66\",\n    \"2\": \"67\"\n  },\n  \"猎兽\": {\n    \"1\": \"28\",\n    \"2\": \"24\"\n  },\n  \"喷火\": {\n    \"1\": \"79\",\n    \"2\": \"95\",\n    \"3\": \"96\",\n    \"4\": \"97\"\n  },\n  \"汗洛\": {\n    \"1\": \"73\",\n    \"2\": \"75\",\n    \"3\": \"76\",\n    \"4\": \"78\"\n  },\n  \"波塞克\": {\n    \"0\": \"53\",\n    \"caps\": false\n  },\n  \"close_key\": \"53\",\n  \"no_found_click_close_key\": true\n}"
  },
  {
    "path": "config/ReaSnowGun_xc_v12.json",
    "content": "{\n  \"p2020\": {\n    \"0\": \"45\",\n    \"caps\": false\n  },\n  \"re-45\": {\n    \"1\": \"95\",\n    \"2\": \"96\"\n  },\n  \"R-301\": {\n    \"1\": \"58\",\n    \"2\": \"59\",\n    \"3\": \"60\",\n    \"4\": \"61\"\n  },\n  \"平行步枪\": {\n    \"1\": \"62\",\n    \"2\": \"63\",\n    \"3\": \"64\",\n    \"4\": \"65\"\n  },\n  \"car\": {\n    \"1\": \"68\",\n    \"2\": \"69\"\n  },\n  \"电能\": {\n    \"1\": \"39\",\n    \"2\": \"70\"\n  },\n  \"转换者\": {\n    \"1\": \"71\",\n    \"2\": \"72\"\n  },\n  \"哈沃克\": {\n    \"1\": \"12\",\n    \"2\": \"18\",\n    \"3\": \"19\",\n    \"4\": \"47\",\n    \"turbocharger\": {\n      \"1\": \"48\",\n      \"2\": \"49\",\n      \"3\": \"13\",\n      \"4\": \"14\"\n    }\n  },\n  \"专注\": {\n    \"1\": \"83\",\n    \"2\": \"84\",\n    \"3\": \"85\",\n    \"4\": \"86\",\n    \"turbocharger\": {\n      \"1\": \"55\",\n      \"2\": \"55\",\n      \"3\": \"99\",\n      \"4\": \"99\"\n    }\n  },\n  \"lstart\": {\n    \"1\": \"46\",\n    \"2\": \"82\",\n    \"3\": \"81\",\n    \"4\": \"80\"\n  },\n  \"复仇女神\": {\n    \"1\": \"51\",\n    \"2\": \"15\",\n    \"3\": \"52\",\n    \"4\": \"54\"\n  },\n  \"R99\": {\n    \"1\": \"66\",\n    \"2\": \"67\"\n  },\n  \"猎兽\": {\n    \"1\": \"28\",\n    \"2\": \"97\"\n  },\n  \"喷火\": {\n    \"0\": \"79\"\n  },\n  \"汗洛\": {\n    \"1\": \"73\",\n    \"2\": \"76\",\n    \"3\": \"75\",\n    \"4\": \"78\"\n  },\n  \"波塞克\": {\n    \"0\": \"53\",\n    \"caps\": false\n  },\n  \"close_key\": \"53\",\n  \"no_found_click_close_key\": true\n}"
  },
  {
    "path": "config/log.json",
    "content": "{\n  \"log_mode\": \"console\",\n  \"core.image_comparator\": \"图片对比\",\n  \"net.socket.NetImageComparator\": \"图片对比\",\n  \"core.joy_listener\": \"手柄监听\",\n  \"core.screentaker\": \"截图\",\n  \"core.RecoildsCore\": \"键鼠压枪\",\n  \"core.ReaSnowSelectGun\": \"枪械识别\",\n  \"core.SelectGun\": \"枪械识别\",\n  \"core.joy_listener.S1SwitchMonitor\": \"按住切层\",\n  \"mouse_mover\": \"键鼠触发器\",\n  \"net.socket.Server\": \"连接监听\"\n}"
  },
  {
    "path": "config/m2.txt",
    "content": "r301 f1 f2 f3 f4\n平行 f5 f6 f7 f8\nr99 f9 f10\ncar f11 f12\n电冲 0 prt\n转换者 scr pau\n哈沃克 i o p [\n哈沃克涡轮 ] j \\ K\nre45 7 8\np2020 -\n专注  pad\\    pad\\    pad*    pad-\n专注涡轮    pad.    pad+    pad-    pad.\n猎兽  Y   U\nlstar   =   up  down    right\n复仇  L   ;   '   ,\n汗洛  ins del pageUp  pageDown\n喷火  left    pad7    pad8    pad9\n\n\n\n\n\nV2\nr301    f1  f2  f3  f4  58 59 60 61\n平行  f5  f6  f7  f8  62 63 64 65\nr99 f9  f10 66 67\ncar f11 f12 68 69\n电冲  0   prt 39  70\n转换者 scr pau 71  72\n哈沃克 i   o   p   [   12 18 19 47\n哈沃克涡轮   ]   \\   j   K   48 49 13 14\nre45    pad7    pad8    95 96\np2020   -   45\n专注  num_lock    pad\\    pad*    pad-    83 84 85 86\n专注涡轮    .   .   pad.    pad.    55 99\n猎兽  Y   U   28 24\nlstar   =   up  down    left    46 82 81 80\n复仇  L   ;   '   ,   15 51 52 54\n汗洛  ins pageUp  del pageDown    73 75 76 78\n喷火  right   pad7    pad8    pad9    79 95 96 97\n\n\nV21\nr301    f1  f2  f3  f4  58 59 60 61\n平行  f5  f6  f7  f8  62 63 64 65\nr99 f9  f10 66 67\ncar f11 f12 68 69\n电冲  0   prt 39  70\n转换者 scr pau 71  72\n哈沃克 i   o   p   [   12 18 19 47\n哈沃克涡轮   ]   \\   j   K   48 49 13 14\nre45    pad7    pad8    95 96\np2020   -   45\n专注  num_lock    pad\\    pad*    pad-    83 84 85 86\n专注涡轮    .   .   pad.    pad.    55 99\n猎兽  Y   pad9   28 97\nlstar   =   up  down    left    46 82 81 80\n复仇  ;   L   '   ,   51 15 52 54\n汗洛  ins del pageUp pageDown    73 76 75 78\n喷火  right\n\nV21 V2\nR301    F1  58\n平行  F2  59\n哈沃克涡轮   F3  60\nL-STAR  F4  61\n专注涡轮    F5  62\n喷火 F6   63\n复仇女神    F9  66\nR99 5   34\n电充  6   35\ncar 7   36\n转换者 8   37\np2020   [   47\n猎兽  ]   48\n专注无涡轮   L   15\nre45    .   55\n哈沃克无涡轮  Up  82\n汗洛  Left    80\n\n\n星辰v10 s21\nR301    pad1    F2  F3  F4\nr99 F9\n电冲  0   Prtsc\n喷火  Right   pad7    pad8\n平行  F5  F6  F7  F8\ncar F11 F12\n汗洛  insert  delete  pgup    pgdn\n哈沃克无涡轮  i   o   p\n哈沃克涡轮   ]   \\\n复仇  L   ;   '   ,\nlstar   =   Up  Down\n转换者 ScrLk\n专注空投\n\n\n\ns22\nR301    F1\n平行  F2\n哈沃克涡轮   F3\nlstar   F4\n专注涡轮    F5\n喷火  F6\n复仇  F9\nr99 5\n电冲  6\ncar 7\n转换者 8\n汗洛  Left\n哈沃克无涡轮  Right\n专注无涡轮   L\np2020   [\n猎兽  ]\nre45    .\n\n\n星辰v12 s22\nR301    pad1    F2  F3  F4\nr99 F9\n电冲  0   Prtsc\n喷火  Right   pad7    pad8    pad9\n平行  F5  F6  F7  F8\ncar F11 F12\n汗洛  insert  delete  pgup    pgdn\n哈沃克无涡轮  i   o   p\n哈沃克涡轮   ]   \\   j\n复仇  L   ;   '   ,\nlstar   =   Up  Down\n转换者 ScrLk\n专注空投\n暴走  pad2    pad3        pad4"
  },
  {
    "path": "config/ref/client.json",
    "content": "{\n  \"refresh_buttons\": [\n    \"1\",\n    \"2\",\n    \"f\",\n    \"F\"\n  ],\n  \"mouse_mover\": \"win32api\",\n  \"rea_snow_mouse_mover\": \"distributed\",\n  \"server_mouse_mover\": \"fei_yi_lai\",\n  \"mouse_mover_params\": {\n    \"win32api\": {},\n    \"km_box\": {\n      \"VID/PID\": \"66882021\"\n    },\n    \"wu_ya\": {\n      \"VID/PID\": \"26121701\"\n    },\n    \"fei_yi_lai\": {\n      \"VID/PID\": \"C2160102\"\n    },\n    \"km_box_net\": {\n      \"ip\": \"192.168.2.188\",\n      \"port\": \"35368\",\n      \"uuid\": \"8A6E5C53\"\n    },\n    \"distributed\": {\n      \"ip\": \"127.0.0.1\",\n      \"port\": 12345\n    },\n    \"distributed_c1\": {\n      \"ip\": \"127.0.0.1\",\n      \"port\": 12345\n    }\n  },\n  \"log_model\": \"window\",\n  \"shake_gun_toggle\": \"false\",\n  \"shake_gun_toggle_button\": [\n    [\n      \"right\"\n    ],\n    [\n      \"left\",\n      \"x2\"\n    ]\n  ],\n  \"shake_gun_trigger_button\": \"caps_lock\",\n  \"has_turbocharger\": [\n    \"专注\",\n    \"哈沃克\"\n  ],\n  \"comparator_mode\": \"local\",\n  \"read_image_mode\": \"local\",\n  \"key_trigger_mode\": \"distributed\",\n  \"delayed_activation_key_list\": {\n  },\n  \"joy_to_key_map\": {\n    \"axis\": {\n      \"5\": {\n        \"key_type\": \"mouse\",\n        \"key\": \"left\"\n      },\n      \"4\": {\n        \"key_type\": \"mouse\",\n        \"key\": \"right\"\n      }\n    }\n  },\n  \"s1_switch_hold_map\": {\n    \"box\": {\n      \"key\": {\n        \"2\": {\n          \"delay\": 550,\n          \"detect_time\": 250,\n          \"skip_detect\": false\n        }\n      },\n      \"toggle_key\": \"29\"\n    },\n    \"bag\": {\n      \"key\": {\n        \"7\": {\n          \"delay\": 0,\n          \"detect_time\": 350,\n          \"skip_detect\": true,\n          \"skip_delay\": 100\n        }\n      },\n      \"toggle_key\": \"29\"\n    },\n    \"change_legend\": {\n      \"key\": {\n        \"6\": {\n          \"delay\": 0,\n          \"detect_time\": 250,\n          \"skip_detect\": false\n        }\n      },\n      \"toggle_key\": \"29\"\n    }\n  },\n  \"rea_snow_gun_config_name\": \"ReaSnowGun_s22\",\n  \"screen_taker\": \"local\"\n}"
  },
  {
    "path": "config/ref/client_bk.json",
    "content": "{\n  \"refresh_buttons\": [\n    \"1\",\n    \"2\",\n    \"f\",\n    \"F\"\n  ],\n  \"mouse_mover\": \"win32api\",\n  \"rea_snow_mouse_mover\": \"distributed\",\n  \"server_mouse_mover\": \"fei_yi_lai\",\n  \"mouse_mover_params\": {\n    \"win32api\": {},\n    \"km_box\": {\n      \"VID/PID\": \"66882021\"\n    },\n    \"wu_ya\": {\n      \"VID/PID\": \"26121701\"\n    },\n    \"fei_yi_lai\": {\n      \"VID/PID\": \"C2160102\"\n    },\n    \"km_box_net\": {\n      \"ip\": \"192.168.2.188\",\n      \"port\": \"35368\",\n      \"uuid\": \"8A6E5C53\"\n    },\n    \"distributed\": {\n      \"ip\": \"127.0.0.1\",\n      \"port\": 12345\n    },\n    \"distributed_c1\": {\n      \"ip\": \"127.0.0.1\",\n      \"port\": 12345\n    }\n  },\n  \"log_model\": \"window\",\n  \"shake_gun_toggle\": \"false\",\n  \"shake_gun_toggle_button\": [\n    [\n      \"right\"\n    ],\n    [\n      \"left\",\n      \"x2\"\n    ]\n  ],\n  \"shake_gun_trigger_button\": \"caps_lock\",\n  \"has_turbocharger\": [\n    \"专注\",\n    \"哈沃克\"\n  ],\n  \"comparator_mode\": \"net\",\n  \"read_image_mode\": \"net\",\n  \"key_trigger_mode\": \"distributed\",\n  \"delayed_activation_key_list\": {\n  },\n  \"joy_to_key_map\": {\n    \"axis\": {\n      \"5\": {\n        \"key_type\": \"mouse\",\n        \"key\": \"left\"\n      },\n      \"4\": {\n        \"key_type\": \"mouse\",\n        \"key\": \"right\"\n      }\n    }\n  },\n  \"s1_switch_hold_map\": {\n    \"box\": {\n      \"key\": {\n        \"2\": {\n          \"delay\": 550,\n          \"detect_time\": 250,\n          \"skip_detect\": false\n        }\n      },\n      \"toggle_key\": \"29\"\n    },\n    \"bag\": {\n      \"key\": {\n        \"7\": {\n          \"delay\": 0,\n          \"detect_time\": 350,\n          \"skip_detect\": true,\n          \"skip_delay\": 100\n        }\n      },\n      \"toggle_key\": \"29\"\n    },\n    \"change_legend\": {\n      \"key\": {\n        \"6\": {\n          \"delay\": 0,\n          \"detect_time\": 250,\n          \"skip_detect\": false\n        }\n      },\n      \"toggle_key\": \"29\"\n    }\n  },\n  \"rea_snow_gun_config_name\": \"ReaSnowGun_s22\",\n  \"screen_taker\": \"cap\"\n}"
  },
  {
    "path": "config/ref/server.json",
    "content": "{\n  \"mouse_mover\": \"win32api\",\n  \"server_mouse_mover\": \"fei_yi_lai\",\n  \"mouse_mover_params\": {\n    \"win32api\": {},\n    \"km_box\": {\n      \"VID/PID\": \"66882021\"\n    },\n    \"wu_ya\": {\n      \"VID/PID\": \"26121701\"\n    },\n    \"fei_yi_lai\": {\n      \"VID/PID\": \"C2160102\"\n    },\n    \"km_box_net\": {\n      \"ip\": \"192.168.2.188\",\n      \"port\": \"35368\",\n      \"uuid\": \"8A6E5C53\"\n    },\n    \"distributed\": {\n      \"ip\": \"127.0.0.1\",\n      \"port\": 12345\n    },\n    \"distributed_c1\": {\n      \"ip\": \"127.0.0.1\",\n      \"port\": 12345\n    }\n  },\n  \"log_model\": \"window\",\n  \"read_image_mode\": \"local\",\n  \"rea_snow_gun_config_name\": \"ReaSnowGun_s22\"\n}"
  },
  {
    "path": "config/specs.json",
    "content": "[\n  {\n    \"name\": \"复仇女神\",\n    \"type\": \"serial\",\n    \"recoils\": {\n      \"un_aim\": {\n        \"time_points\": [],\n        \"x\": [],\n        \"y\": []\n      },\n      \"aim\": {\n        \"time_points\": [0, 18, 34, 47, 60, 79, 96, 136, 149, 161, 184, 197, 214, 233, 253, 269, 309, 379, 397, 410, 429, 448, 465, 484, 504, 517, 532, 545, 563, 576, 584, 600, 613, 631, 651, 666, 679, 692, 711, 730, 748, 766, 779, 798, 815, 830, 848, 866, 884, 901, 919, 933, 948, 962, 975, 992, 1005, 1020, 1033, 1046, 1059, 1076, 1093, 1111, 1131, 1149, 1166, 1184, 1197, 1209, 1221, 1233, 1244, 1260, 1278, 1293, 1308, 1328, 1346, 1363, 1382, 1390, 1402, 1418, 1431, 1442, 1453, 1468, 1484, 1502, 1519, 1537, 1553, 1572, 1587, 1599, 1612, 1628, 1636, 1647, 1664, 1683, 1702, 1725, 1739, 1756, 1770, 1784, 1800, 1817, 1831, 1846, 1861, 1870, 1887, 1905, 1920, 1932, 1948, 1966, 1985, 2002, 2012, 2029, 2046, 2056, 2067, 2079, 2101, 2115, 2134, 2149, 2164, 2181, 2199, 2212, 2220, 2234, 2246, 2261, 2280, 2300, 2317, 2336, 2350, 2366, 2382, 2396, 2412, 2426, 2438, 2450, 2462, 2476, 2495, 2511, 2532, 2553, 2570, 2587, 2606, 2623, 2632, 2644, 2660, 2675, 2691],\n        \"x\": [-2, -2, -1, -1, -1, 0, -1, -2, -3, -3, -1, 1, 0, 1, 1, 0, -1, -1, -1, -1, -1, 1, 3, 3, 4, 3, 3, 1, 0, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, 1, 2, 2, 1, 2, 2, 1, 0, 0, -1, -1, -2, -2, -1, -1, -1, 0, 0, 0, 0, 0, 1, 1, -1, -3, -2, -3, -3, -2, -1, -2, -1, -1, -1, -1, -2, -2, -3, -1, -1, 1, 0, 0, 0, 0, -1, -1, -1, 0, 0, 1, 0, 0, 1, 0, 0, 3, 3, 3, 2, 1, 0, -1, -1, -1, 0, 0, 0, 3, 3, 3, 1, 3, 3, 3, 3, 3, 2, 1, 0, -1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, -3, -3, -3, -1, -1, -1, -2, -1, -2, -1, 0, -1, -3, -3, -2, -3, -1, -1, -1, -1, -1, 0, 0, 1, 0, 0, 0, -1, 0, 0, 1, 2, 2, 2, 2, 1, 1],\n        \"y\": [0, 0, 6, 9, 9, 3, 4, 2, 8, 9, 6, 5, 7, 4, 1, 0, -1, 4, 6, 4, 2, 6, 8, 4, 6, 5, 6, 3, 2, 1, 1, 0, -1, 1, 0, -1, 0, 0, 0, 3, 4, 3, 1, 4, 6, 4, 9, 10, 8, 8, 6, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 3, 4, 3, 5, 4, 2, 6, 7, 8, 6, 2, 1, 1, 0, 0, 1, -1, -1, 0, 0, 0, 0, 3, 5, 7, 5, 1, 4, 6, 6, 4, 4, 3, 4, 5, 5, 3, 1, -1, -3, -3, -2, 0, 0, 0, 1, 1, -1, -1, 1, 1, 1, -1, 4, 5, 4, 10, 8, 4, 2, 0, 1, 0, 0, -1, -1, -1, 0, 1, 1, 1, 1, 2, 3, 2, 1, 4, 3, 3, 2, 4, 4, 1, 2, 1, -1, -1, -1, -2, -1, 0, 1, 4, 4, 3, 8, 8, 4, 4, 4, 3, 3, 4, 3, 0]\n      }\n    }\n  },\n  {\n    \"name\": \"猎兽\",\n    \"type\": \"intermittent\",\n    \"recoils\": {\n      \"aim\": [\n        {\n          \"index\": 0,\n          \"time_points\": [0, 18, 34, 48, 60, 71, 85, 104, 114, 128, 140, 152, 165, 183, 195, 208, 223, 239, 256, 268, 279],\n          \"x\": [1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 2, 1, 1, -1, -2, -1, -1, -1],\n          \"y\": [5, 8, 12, 9, 10, 10, 8, 3, 3, 5, 5, 3, 4, 5, 3, 4, 4, 3, 1, 1, 1]\n        },\n        {\n          \"index\": 1,\n          \"time_points\": [0, 12, 25, 34, 49, 68, 86, 99, 113, 128, 138, 151, 166, 179, 196, 209, 221, 234, 246, 258, 269, 282, 292],\n          \"x\": [-1, 0, 0, 0, 0, -1, -1, -1, 2, 2, 3, 1, 1, -1, 0, 1, 2, 1, 1, 1, 1, 1, 1],\n          \"y\": [-1, -1, -1, 0, 1, 6, 6, 3, 8, 8, 8, 3, 5, 2, 1, 3, 3, 3, 3, 3, 1, 1, -2]\n        },\n        {\n          \"index\": 2,\n          \"time_points\": [0, 18, 30, 42, 52, 68, 85, 97, 109, 124, 140, 157, 170, 183, 195, 207, 219, 232, 248],\n          \"x\": [-1, 0, 0, 0, 0, 0, 1, 0, 1, 4, 5, 3, 2, 2, 1, 0, -1, 1, 2],\n          \"y\": [0, 0, -1, 0, 0, 1, 2, 1, 1, 3, 3, 3, 3, 3, 3, 2, 3, 3, 1]\n        },\n        {\n          \"index\": 3,\n          \"time_points\": [0, 23, 43, 60, 71, 83, 96, 106, 119, 134, 149, 161, 173, 188, 201, 214, 229, 245],\n          \"x\": [5, 5, 1, 0, 0, 0, 1, 1, 0, -2, -5, -3, -5, -1, 0, 1, 1, 1],\n          \"y\": [3, 3, 3, 1, 1, 2, 3, 3, 2, 1, 0, -1, 1, 2, 3, 3, 3, 2]\n        },\n        {\n          \"index\": 4,\n          \"time_points\": [0, 12, 24, 33, 45, 61, 70, 82, 97, 110, 123, 140, 159, 171, 189, 200, 214, 226, 239, 251, 263],\n          \"x\": [1, 0, 0, -5, -6, -7, -3, -6, -3, -1, 0, -2, -2, -3, -2, -1, -1, -1, -2, -1, -1],\n          \"y\": [1, 1, 1, 2, 2, 3, 2, 3, 1, 1, 0, 2, 2, 2, 1, 1, 1, 1, 2, 2, 1]\n        },\n        {\n          \"index\": 5,\n          \"time_points\": [0, 12, 27, 39, 54, 67, 80, 91, 103, 116, 134, 147, 155, 171, 183, 193, 206, 220],\n          \"x\": [1, 1, -1, -1, -2, -1, -3, -7, -8, -6, 1, 3, 3, 1, -1, -5, -6, -6],\n          \"y\": [1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 2, 1, 0, -1, -1]\n        },\n        {\n          \"index\": 6,\n          \"time_points\": [0, 19, 36, 55, 73, 85, 95, 111, 125, 137, 153, 172, 191, 205, 221],\n          \"x\": [-1, 0, 0, 0, 1, 1, 1, 2, 1, 1, 1, 1, 1, -1, -1],\n          \"y\": [1, 0, -2, -1, 3, 3, 3, 3, 3, 2, 2, 1, 0, 2, 3]\n        }\n      ],\n      \"un_aim\": [\n        {\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        },\n        {\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        },\n        {\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        },\n        {\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        },\n        {\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        },\n        {\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        },\n        {\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        },\n        {\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        },\n        {\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        },\n        {\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        }\n      ]\n    }\n  },\n  {\n    \"name\": \"汗洛\",\n    \"type\": \"intermittent\",\n    \"recoils\": {\n      \"aim\": [\n        {\n          \"index\": 0,\n          \"time_points\": [0, 10, 26, 37, 47, 61, 75, 85, 99, 112, 123, 132, 148, 159, 174, 191, 200, 212, 228, 240],\n          \"x\": [-5, -5, -3, 1, 1, 3, 3, 3, 0, -1, -3, -3, -2, 3, 3, 3, 3, 3, 1, 0],\n          \"y\": [-5, -5, 1, 7, 13, 16, 9, 0, 0, -5, -3, -3, 0, 6, 14, 14, 2, 4, -4, -5]\n        },\n        {\n          \"index\": 1,\n          \"time_points\": [0, 18, 29, 38, 54, 65, 76, 91, 104, 121, 133, 146, 158, 171, 188, 206, 217, 227, 243, 256, 265],\n          \"x\": [-1, -1, 0, 1, 1, 1, 0, -1, 3, 4, 2, 3, 0, 1, 1, -1, -1, -1, -2, -3, -1],\n          \"y\": [-1, -1, 4, 6, 8, 6, 2, -2, 4, 9, 6, 7, 1, 6, 6, 4, 0, 0, -3, -3, -3]\n        },\n        {\n          \"index\": 2,\n          \"time_points\": [0, 12, 26, 37, 51, 69, 82, 95, 109, 123, 137, 150, 168, 183, 195, 208, 222, 234, 245],\n          \"x\": [2, 2, 3, 3, 2, -1, -2, 2, 5, 4, 3, 0, -1, 1, 2, 2, 1, -1, -2],\n          \"y\": [1, 2, 7, 10, 11, 0, -2, 4, 9, 9, 11, 3, -3, -1, 0, 0, 0, 3, 4]\n        },\n        {\n          \"index\": 3,\n          \"time_points\": [0, 19, 32, 48, 67, 85, 98, 115, 128, 140, 151, 162, 177, 190, 202, 218, 228, 242],\n          \"x\": [-1, -1, 3, 5, 4, 0, -1, 0, 1, 0, -1, -3, -3, -3, -1, 1, 0, -1],\n          \"y\": [-1, -1, 5, 6, 4, 0, 4, 6, 5, 6, 2, 5, 3, 2, -1, -2, -1, -2]\n        },\n        {\n          \"index\": 4,\n          \"time_points\": [0, 15, 29, 45, 57, 71, 88, 97, 112, 121, 136, 150, 158, 173, 186, 198, 210],\n          \"x\": [1, 0, 0, -1, -1, -3, -5, -3, -3, -1, 3, 1, 1, -1, -1, -3, -3],\n          \"y\": [0, 6, 9, 6, 6, 2, -1, -1, 1, 2, 0, 6, 9, 9, 6, 0, -3]\n        },\n        {\n          \"index\": 5,\n          \"time_points\": [0, 18, 35, 44, 56, 72, 81, 97, 105, 119, 134, 143, 158, 168, 184, 201, 211],\n          \"x\": [3, 3, 1, 0, 0, -1, -2, -1, 1, 3, 3, 3, 0, 5, 3, 0, -1],\n          \"y\": [-3, -3, 5, 8, 9, 6, 0, 0, -1, 0, 0, 2, 4, 6, 6, -2, -4]\n        },\n        {\n          \"index\": 6,\n          \"time_points\": [0, 18, 32, 46, 61, 73, 86, 98, 108, 119, 135, 148, 166],\n          \"x\": [-1, -1, 3, 5, 5, 3, -11, 1, -1, 3, 3, 3, 3],\n          \"y\": [-2, -2, 1, 5, 4, 5, 0, 2, 3, 4, 3, 1, 6]\n        },\n        {\n          \"time_points\": [0, 14, 26, 39, 49, 59, 75, 88, 100, 111, 125, 133, 145, 161, 173, 187],\n          \"x\": [-1, -1, 3, 5, 5, 3, 1, 1, -1, 0, 1, 1, 1, -1, 0, -1],\n          \"y\": [3, 2, 6, 6, 6, 0, -4, -3, -1, 2, 4, 6, 7, 4, 6, 0]\n        },\n        {\n          \"index\": 8,\n          \"time_points\": [0, 12, 24, 36, 48, 62, 81, 98, 116, 127, 140, 153, 165],\n          \"x\": [-2, -2, -2, -1, -1, -1, 1, -2, -1, -1, -1, -5, -5],\n          \"y\": [-5, -5, -2, 1, 4, 4, 0, 4, 6, 4, 4, 2, -1]\n        },\n        {\n          \"index\": 9,\n          \"time_points\": [0, 12, 24, 37, 47, 59, 72, 94, 110, 130, 144, 159, 172, 190, 200, 212],\n          \"x\": [-1, 0, -2, -1, 0, 1, 1, 2, 3, 1, 0, 3, 4, 5, -1, 0],\n          \"y\": [-5, -5, -1, 5, 7, 9, 6, -1, -2, -1, 1, 4, 6, 2, -2, -1]\n        }\n      ],\n      \"un_aim\": [\n        {\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        },\n        {\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        },\n        {\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        },\n        {\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        },\n        {\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        },\n        {\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        },\n        {\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        },\n        {\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        },\n        {\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        },\n        {\n          \"time_points\": [],\n          \"x\": [],\n          \"y\": []\n        }\n      ]\n    }\n  },\n  {\n    \"name\": \"喷火\",\n    \"type\": \"serial\",\n    \"recoils\": {\n      \"un_aim\": {\n        \"time_points\": [0, 13, 25, 52, 67, 84, 106, 122, 145, 158, 170, 188, 206, 217, 235, 249, 266, 275, 290, 321,\n          339, 353, 369, 387, 430, 445, 466, 484, 504, 528, 545, 563, 583, 600, 617, 645, 656, 674,\n          692, 703, 715, 729, 746, 765, 783, 797, 808, 827, 844, 862, 875, 885, 904, 917, 935, 954,\n          966, 975, 997, 1007, 1024, 1044, 1061, 1080, 1093, 1111, 1124, 1141, 1154, 1171, 1189, 1207,\n          1223, 1250, 1267, 1282, 1300, 1317, 1335, 1348, 1365, 1383, 1439, 1452, 1474, 1490, 1502,\n          1535, 1553, 1572, 1584, 1598, 1655, 1670, 1682, 1695, 1707, 1740, 1755, 1767, 1779, 1793,\n          1808, 1821, 1839, 1868, 1880, 1891, 1904, 1915, 1939, 1951, 1992, 2011, 2024, 2043, 2060,\n          2072, 2095, 2105, 2122, 2132, 2151, 2169, 2187, 2200, 2217, 2236, 2249, 2266, 2283, 2302,\n          2320, 2339, 2355, 2371, 2387, 2400, 2412, 2430, 2443, 2460, 2473, 2485, 2503, 2522, 2541,\n          2553, 2568, 2578, 2595, 2613, 2629, 2643, 2660, 2673, 2686, 2703, 2719, 2739, 2753, 2762,\n          2779, 2796, 2807, 2819, 2832, 2849, 2863, 2875, 2887, 2903, 2919, 2934, 2944, 2964, 2981,\n          2996, 3013, 3025, 3043, 3056, 3069, 3086, 3099, 3115, 3126, 3141, 3152, 3169, 3184, 3198,\n          3209, 3216, 3231, 3249, 3265, 3287, 3314, 3328, 3336, 3352, 3366, 3377, 3394, 3412, 3424,\n          3442, 3458, 3472, 3486, 3502, 3516, 3528, 3540, 3553, 3564, 3576, 3589, 3605, 3616, 3635,\n          3647, 3661, 3673, 3684, 3698, 3715, 3728, 3740, 3757, 3767, 3785, 3800, 3814, 3829, 3862,\n          3876, 3892, 3905, 3922, 3939, 3968, 3982, 4000, 4018, 4033, 4039, 4068, 4082, 4100, 4111,\n          4123, 4136, 4154, 4167, 4180, 4193, 4211, 4228, 4250, 4268, 4294, 4312, 4320, 4340, 4355,\n          4372, 4384, 4397, 4414, 4427, 4446, 4457, 4470, 4488, 4507, 4518, 4536, 4549, 4568, 4584,\n          4600, 4613, 4623, 4640, 4658, 4670, 4688, 4702, 4718, 4736, 4754, 4768, 4790, 4810, 4824,\n          4840, 4859, 4876, 4889, 4901, 4919, 4936, 4950, 4974, 4998, 5010, 5023, 5039, 5052, 5063,\n          5104, 5114, 5135, 5153, 5195, 5210, 5227, 5245, 5262, 5277, 5293, 5316, 5336, 5353, 5372,\n          5390, 5408, 5420, 5438, 5448, 5464, 5480, 5494, 5505, 5518, 5536],\n        \"x\": [13, 13, 11, -12, -6, -6, -4, 12, -12, -5, -3, -1, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 5,\n          3, 2, 1, 1, 1, 2, 0, -1, -1, -1, -1, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -2, -2, -2, -2, -1, -2, -2,\n          -1, -1, 0, 0, -1, -1, -1, 0, 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 2, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 3, 1,\n          1, 1, 1, 3, 2, 3, 3, 2, 3, 4, 1, 1, 1, 1, 0, 1, 2, 1, 0, 0, 0, 0, 0, 3, 0, -1, -1, 0, 1, 1, 1, 1, 1,\n          1, 1, 2, 2, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n          0, 0, 0, 0, -1, -2, -1, -2, -2, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, -2, -2, -1, -1, -1,\n          -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, 0, 0, -1, -1, -2, -2, -1, -1, -2, -2,\n          -2, -2, -2, -2, -1, -1, -1, -1, -1, -1, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, 0, 0, 0, 0,\n          1, 1, 1, 0, 0, 0, 0, 2, 2, 3, 2, 1, 1, 1, 3, 3, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 1, 1, 1, 0, 0, 1,\n          1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 2, 1, 1,\n          1, 2, 1, 3, 0, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -2, -2, 0, -1, -1, 0, -1, -2, -1, -1,\n          -3, -3, -3, -2, -2, -1, -2, -1, -1, -2],\n        \"y\": [2, 1, 2, 4, 7, 7, 7, 3, 4, 4, 5, 4, 3, 2, 2, 2, 3, 3, 5, 2, 3, 2, 2, 2, 5, 3, 3, 4, 6, 5, 5, 3, 2, 3,\n          4, 7, 4, 4, 3, 3, 3, 3, 3, 3, 1, 1, 0, 1, 1, 6, -1, -1, -1, -2, -1, -1, -1, 0, -1, -2, -2, 0, 1, 1, 1,\n          1, 0, 1, 1, 2, 3, 2, 2, 2, 2, 6, 5, 2, 1, 0, 1, 4, 0, 0, 0, 2, 3, 0, 0, 0, 2, 1, -1, -1, -1, 0, 2, 2,\n          1, 0, 0, 0, 1, 2, 5, 3, 2, 2, 1, 1, 2, 4, 3, 3, 3, 3, 3, 3, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 0,\n          0, 0, 0, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 3, 3, 2, 0, 0, 1, 2, 3, 3, 2, 1, 1, 1, 1,\n          2, 2, 1, 1, 1, 1, 0, 1, 1, 1, -1, -1, -1, 0, 2, 6, 3, 1, 0, 0, -1, 1, 2, 3, 22, 1, -4, -4, -4, -3, -2,\n          3, 6, 3, 3, 2, 1, 1, 2, 2, -1, -1, -1, -1, 0, 0, -1, -1, -1, -1, -1, -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 3,\n          3, 3, 3, 2, 2, 2, 3, 4, 1, 1, 1, 0, 2, 3, 6, 2, 1, 1, 1, 5, 20, 0, -5, -5, -5, -3, -1, 6, 2, -1, -3,\n          -4, -2, 0, 3, -1, -1, -1, 0, 1, 3, 3, 3, 1, 1, 1, 2, 3, 7, 5, 3, 1, 1, 1, 1, 1, 2, 2, 1, 0, 0, 1, 1,\n          1, 1, 0, 0, 0, 1, 2, 2, 0, 0, 0, 2, 1, 3, 4, 1, 1, 1, 2, 2, 3, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1,\n          1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, -1]\n      },\n      \"aim\": {\n        \"time_points\": [0, 16, 127, 145, 233, 250, 268, 343, 372, 389, 441, 456, 483, 502, 520, 535, 547, 577, 595, 614, 631, 650, 665, 680, 699, 717, 735, 754, 772, 791, 809, 828, 847, 865, 883, 902, 920, 934, 952, 970, 987, 1007, 1025, 1043, 1060, 1079, 1098, 1117, 1135, 1150, 1166, 1185, 1199, 1215, 1233, 1251, 1271, 1288, 1308, 1326, 1344, 1363, 1387, 1405, 1420, 1435, 1454, 1472, 1492, 1510, 1531, 1547, 1565, 1589, 1608, 1627, 1643, 1657, 1677, 1695, 1709, 1731, 1749, 1765, 1783, 1798, 1817, 1833, 1848, 1867, 1885, 1903, 1920, 1935, 1959, 1986, 2002, 2021, 2038, 2059, 2076, 2095, 2114, 2131, 2148, 2167, 2181, 2200, 2217, 2235, 2250, 2266, 2285, 2303, 2323, 2340, 2358, 2378, 2396, 2415, 2433, 2451, 2465, 2486, 2501, 2519, 2537, 2566, 2583, 2602, 2619, 2640, 2656, 2674, 2688, 2705, 2723, 2752, 2771, 2789, 2815, 2834, 2852, 2870, 2887, 2903, 2923, 2942, 2960, 2981, 2997, 3014, 3033, 3051, 3069, 3088, 3105, 3124, 3143, 3161, 3179, 3197, 3217, 3234, 3253, 3271, 3287, 3302, 3318, 3331, 3346, 3362, 3378, 3395, 3411, 3428, 3445, 3463, 3483, 3500, 3518, 3537, 3555, 3574, 3614, 3630, 3644, 3660, 3680, 3697, 3715, 3731, 3746, 3765, 3784, 3802, 3821, 3839, 3856, 3869, 3889, 3907, 3925, 3944, 3963, 3983, 4000, 4018, 4037, 4053, 4063, 4079, 4098, 4117, 4135, 4149, 4165, 4184, 4203, 4219, 4234, 4252, 4271, 4288, 4307, 4325, 4344, 4359, 4371, 4384, 4398, 4418, 4436, 4455, 4473, 4492, 4510, 4529, 4549, 4565, 4585, 4603, 4620, 4637, 4652, 4670, 4688, 4706, 4726, 4744, 4762, 4780, 4799, 4814, 4830, 4850, 4866, 4885, 4902, 4914, 4929, 4946, 4966, 4984, 5009, 5027, 5051, 5070, 5085, 5100, 5118, 5137, 5156, 5175, 5192, 5211, 5229, 5247, 5266, 5282, 5297, 5316, 5364],\n        \"x\": [-1, -2, -3, -2, 3, 5, 3, 3, 4, 4, 2, 3, 3, 1, 0, 0, 1, 0, 1, 0, -1, -1, -1, -1, -1, -1, -1, -2, -3, -3, -2, -1, 0, -1, -1, -1, -1, -1, 0, -1, 0, 1, 1, 1, 0, -1, -1, -2, -1, -1, -1, 0, 2, 2, 1, 1, 1, 1, 3, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 3, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 0, 1, 3, 1, 3, 3, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -3, -3, -3, -1, -1, -1, -3, -3, -1, 0, -1, -1, -1, -1, 0, 1, 0, -1, -2, -1, -1, -1, 1, 1, 2, 1, 1, 1, -1, -3, -5, -3, -1, -1, 0, 0, 0, -1, -1, -1, 0, 0, -1, -1, -1, 0, 0, 0, 0, 0, -1, -1, -1, 1, 2, 1, 1, 1, -1, 1, 2, 3, 2, 1, 1, 1, 3, 3, 1, 1, 1, 1, 3, 3, 1, 2, 1, -1, 0, 1, 1, 1, -1, -1, 0, 0, 1, 1, -1, -1, -1, 1, 0, -1, 1, -1, -1, 1, 2, 2, 1, 1, -1, 1, 2, 3, 2, 1, 1, 1, 1, 1, 1, 0, -1, -1, -1, -1, -1, 0, 0, -1, -1, -1, -1, -1, -1, 0, 0, -1, -1, -1, -1, -3, -3, -2, -1, -1, -1, -3, -4, -3, -2, -1, -1, -1, -3, -3],\n        \"y\": [9, 14, 14, 10, 4, 9, 5, 7, 5, 6, 5, 12, 7, 4, 2, 4, 4, 9, 4, 2, 1, 1, 5, 4, 1, 0, 0, 0, 0, 1, 0, -1, -2, -1, 1, 4, 0, -2, -2, 0, 2, 4, 3, 2, 0, 2, 4, 11, 4, 0, 1, 0, 2, 3, 2, 0, 0, 0, 2, 3, 3, 1, 0, 0, 2, 4, 0, 0, 0, 0, 0, 9, 0, -2, -3, -2, 0, 6, 0, -2, -2, -2, 2, 4, 7, 2, 0, 0, 2, 5, 3, 2, 0, 0, 1, 7, 3, 0, -2, 0, 0, 11, 0, -2, -2, -2, -2, 7, 1, -3, -3, -3, 0, 4, 5, 2, 0, 0, 1, 2, 2, 0, 0, 0, 1, 3, 6, 1, -1, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 2, 0, -2, -2, -2, -2, 4, 0, -1, 0, 0, 4, 5, 4, 2, 2, 0, 2, 4, 1, 0, 0, 0, 0, 2, 0, -2, -2, -2, -2, 0, 6, 0, -3, -3, -3, -1, 1, 0, 0, 0, 0, 2, 6, 4, 2, 2, 0, 0, 7, 1, -2, -2, 0, 2, 4, 3, 2, 0, 0, 0, 1, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 3, 5, 7, 5, 1, -1, 2, 4, 5, 5, 5, 2, 0, 0, 2, 2, 1, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 1, 2, 0, 0, 2, 2, 5, 4, 2, 0, 0, 1, 1, 2, 2, 0, 0, 1, 2, 2, 2, 0, 2, 3, 11, 2, -1, -2, 0, 2, 7, 0, -2, -2, -1, -1, 0]\n      }\n    }\n  },\n  {\n    \"name\": \"re-45\",\n    \"type\": \"serial\",\n    \"recoils\": {\n      \"un_aim\": {\n        \"time_points\": [26, 33, 42, 54, 61, 72, 80, 90, 102, 109, 122, 129, 139, 147, 158, 166, 172, 182, 194,\n          200, 209, 218, 232, 244, 255, 263, 273, 280, 287, 295, 305, 317, 324, 336, 348, 360,\n          372, 380, 390, 401, 410, 421, 433, 452, 459, 470, 477, 489, 501, 508, 519, 528, 537,\n          546, 555, 565, 573, 587, 595, 605, 613, 624, 631, 642, 654, 667, 679, 686, 693, 704,\n          716, 724, 734, 742, 753, 760, 770, 778, 790, 798, 808, 820, 833, 844, 851, 862, 871,\n          882, 890, 900, 906, 918, 929, 937, 948, 957, 967, 979, 988, 998, 1009, 1019, 1029, 1038,\n          1047, 1055, 1066, 1077, 1086, 1097, 1108, 1119, 1127, 1137, 1142, 1152, 1163, 1171,\n          1178, 1188, 1197, 1206, 1218, 1225, 1237, 1249, 1261, 1273, 1281, 1290, 1299, 1310,\n          1324, 1334, 1347, 1355, 1371, 1384, 1391, 1402, 1410, 1420, 1427, 1439, 1450, 1457,\n          1467, 1473, 1483, 1494, 1506, 1514, 1522, 1531, 1543, 1554, 1561, 1574, 1584, 1593,\n          1605, 1611, 1623, 1635, 1647, 1654, 1666, 1674, 1685, 1697, 1707, 1716, 1724, 1733,\n          1743, 1752, 1759, 1770, 1782, 1793, 1800, 1813, 1820, 1831, 1844, 1851, 1862, 1874,\n          1886, 1894, 1902, 1912, 1923, 1931],\n        \"x\": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -2, -2, -2, -2, -2, -2, -2, -2, -2,\n          -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, -1, -2, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,\n          -3, -3, -3, -3, -3, -4, -4, -4, -4, -4, -4, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5,\n          -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -3, -3, -2, -1, -1, 0, 0, 0, 0, 1, 0, 0, 0, -1, 0, -1, 0,\n          -2, -2, -2, -3, -3, -3, -2, -2, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n          1, 1, 0, -1, -1, -2, -2, -3, -3, -3, -3, -3, -3, -2, -2, -2, -2, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0,\n          0, 0, 0, 0, 0, 0, -1, -1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, -1,\n          -1, 12, -1, -2, -4, -4, -4, -4, -4],\n        \"y\": [0, 1, 2, 2, 3, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6, 5, 5, 5, 6, 6, 6, 6, 6, 5, 6, 6, 7, 6, 6, 6, 6, 5,\n          5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n          2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2,\n          2, 3, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 3,\n          3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 0, 1, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2,\n          2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 21, 2, 1, -1, -2, -2, -2, -2]\n      },\n      \"aim\": {\n        \"time_points\": [0, 11, 24, 37, 51, 66, 78, 91, 101, 116, 132, 146, 158, 171, 189, 197, 210, 225, 234, 251, 262, 275, 283, 299, 312, 324, 336, 351, 367, 379, 389, 399, 416, 428, 440, 449, 465, 473, 490, 508, 520, 534, 546, 562, 572, 584, 597, 612, 625, 642, 651, 667, 678, 689, 700, 717, 728, 740, 751, 765, 776, 789, 798, 810, 825, 839, 851, 864, 875, 883, 900, 919, 927, 943, 960, 974, 982, 998, 1010, 1019, 1031, 1046, 1059, 1072, 1080, 1094, 1109, 1122, 1136, 1151, 1160, 1173, 1188, 1206, 1217, 1231, 1243, 1254, 1269, 1286, 1305, 1324, 1340, 1354, 1363, 1379, 1387, 1404, 1421, 1430, 1442, 1458, 1467, 1482, 1493, 1507, 1515, 1530, 1541, 1555, 1568, 1581, 1593, 1611, 1624, 1636, 1648, 1666, 1678, 1694, 1706, 1717, 1730, 1745, 1758, 1770, 1781, 1791, 1804, 1819, 1838, 1856, 1874, 1887, 1904, 1914],\n        \"x\": [-4, -6, -5, -2, 3, 3, 3, 2, 1, -3, -4, -1, -1, 0, -7, -12, -12, -7, 4, 8, 6, 3, 0, -3, -4, -3, -5, 1, 2, 4, 3, -2, -7, -10, -8, -3, 1, 5, 3, 1, -1, -1, 1, -8, -10, -12, -7, 1, 8, 1, -8, -9, -10, -3, 1, 1, 1, -1, -2, -1, -3, -3, -2, 1, 3, 5, 4, 1, -1, -2, -3, 1, 1, -3, -3, -1, -1, 1, -3, -7, -7, -6, 1, 2, 3, -1, -1, -2, 0, 1, 1, 3, 3, 1, -1, -3, -8, -10, -7, 3, 5, 1, 0, -1, -1, -3, -7, -8, -1, 4, 4, 7, 6, 4, 2, 0, -2, -3, -5, -3, -1, 0, 2, -1, -7, -10, -9, 1, 6, -1, -6, -7, -6, -1, 1, 0, 0, -1, -1, -1, -5, -6, -3, 6, 8, -1, -1],\n        \"y\": [0, 0, 0, 8, 15, 9, 10, 1, -2, 5, 9, 8, 8, 1, -1, 2, 3, 4, 3, 1, 6, 9, 10, 5, -2, -8, -1, 8, 11, 10, 2, -2, -4, -4, -2, -1, 0, 2, 6, 5, 0, -3, -3, -1, 2, 2, 3, 1, 1, 0, -1, -1, -1, -1, 3, 7, 9, 7, 1, -1, -1, 1, 3, 5, 3, 2, 2, 6, 6, 6, 1, -4, -1, 6, 10, 6, 6, 0, 2, 0, 1, 0, 0, 0, 3, 3, 5, 3, -1, -2, 5, 8, 12, 2, -2, 1, 6, 8, 8, -1, -5, -4, -2, -1, -1, -1, -1, -1, 1, 1, 1, 1, 3, 3, 2, 1, -1, -1, -2, -1, -1, -1, -1, 3, 10, 11, 9, -2, -5, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 0, 1, -1, 2, -6, -6]}\n    }\n  },\n  {\n    \"name\": \"转换者\",\n    \"type\": \"serial\",\n    \"recoils\": {\n      \"un_aim\": {\n        \"time_points\": [0, 12, 16, 31, 41, 50, 61, 70, 81, 92, 105, 115, 124, 136, 143, 151, 162, 173, 185, 195,\n          203, 215, 228, 240, 251, 263, 271, 282, 295, 303, 314, 326, 337, 347, 356, 369, 381,\n          393, 401, 412, 423, 435, 448, 460, 466, 479, 492, 503, 515, 523, 533, 546, 554, 561,\n          577, 590, 602, 639, 651, 663, 672, 680, 694, 708, 718, 737, 749, 762, 773, 784, 797,\n          809, 817, 830, 838, 848, 859, 872, 883, 897, 909, 920, 929, 939, 951, 961, 969, 982,\n          990, 1000, 1012, 1021, 1031, 1043, 1055, 1062, 1073, 1081, 1093, 1104, 1116, 1128, 1141,\n          1153, 1164, 1178, 1186, 1197, 1209, 1220, 1233, 1243, 1257, 1269, 1276, 1289, 1300,\n          1312, 1326, 1334, 1345, 1356, 1365, 1377, 1386, 1398, 1408, 1417, 1429, 1442, 1453,\n          1465, 1478, 1491, 1503, 1515, 1527, 1541, 1552, 1565, 1577, 1589, 1600, 1612, 1625,\n          1633, 1643, 1652, 1662, 1670, 1681, 1692, 1701, 1711, 1723, 1733, 1742, 1753, 1763,\n          1772, 1784, 1795, 1800, 1809, 1822, 1833, 1841, 1851, 1863, 1871, 1881, 1890, 1901,\n          1909, 1917, 1931, 1942, 1950, 1955, 1969, 1981, 1993, 2007, 2018, 2029, 2038, 2048,\n          2061, 2074, 2085, 2099, 2111, 2123, 2134, 2147, 2158, 2170, 2183, 2197, 2208, 2220,\n          2233, 2245, 2258, 2269, 2281, 2293, 2302, 2312, 2325, 2337, 2349, 2361, 2373, 2385,\n          2399, 2411, 2423, 2434, 2448, 2460, 2472, 2481, 2496, 2509, 2527, 2539, 2551, 2563,\n          2575, 2587, 2597, 2606, 2618, 2629, 2636, 2649, 2661, 2668, 2679, 2690, 2698, 2709,\n          2718, 2729, 2741, 2752, 2761, 2771, 2779, 2790, 2801, 2810, 2820, 2832, 2840, 2851,\n          2859, 2868, 2878, 2887, 2899, 2908, 2918, 2930, 2937, 2948, 2956, 2968, 2980, 2992,\n          3004, 3014, 3022, 3029],\n        \"x\": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0,\n          1, 1, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0, 1, 0, 1, 1, -7, 0, 0, -1, 0, 0, -1, 0, 0, 0, 0, 0,\n          1, 0, 0, -1, -1, -1, -1, -1, -2, -2, -2, -2, -1, 0, 0, 1, 1, 1, 1, 1, 15, 0, 0, -1, -3, -3, -3,\n          -3, -3, -3, -2, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0,\n          0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 1, 1, 1, 1, 1, 1, 10, 0, 1, -2, -2, -2, -2, -1,\n          -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1, 1, 0, -1, -2, -2, -2, -2, -2, -1, 0, 1, 2, 1, 2, 2, 2, 2, 1,\n          1, 1, 0, 0, 0, 0, 0, 0, -1, 0, 0, 1, 1, 2, 2, 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 1,\n          2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 14, 0, 0, 0, -2, -2, -2, -2, -2, -2,\n          -2, -2, -2, -2, -2, -2, -2, -1, -1, -1, -1, 0, 0, 0, 0, 0, -1, -1, -1, 14, -1, -1, -1, -3, -3, -3,\n          -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -2, -2],\n        \"y\": [1, 1, 0, 1, 2, 3, 3, 3, 4, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 4, 4, 4, 5, 4, 4, 4, 4, 4,\n          4, 4, 4, 5, 4, 4, 4, 3, 4, 4, 5, 5, 4, 4, 4, 3, 5, 5, 4, 4, 4, 4, 4, 3, 3, 4, 4, 5, 4, 4, 4, 4, 3,\n          3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 3, 3, 2, -21, 2, 3, 3, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 3,\n          3, 3, 3, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2,\n          2, 2, 2, 2, 2, 4, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 1, 1, 1, -1, 1, 1, 1, 2, 2, 2, 2, 2,\n          2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1,\n          1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 0, 0, -23, 1,\n          1, 1, 3, 4, 4, 3, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 21, -1, -2, -3,\n          -5, -5, -6, -6, -5, -5, -5, -5, -5, -4, -4, -4, -3, -3, -2, -3]\n      },\n      \"aim\": {\n        \"time_points\": [0, 92, 128, 141, 156, 184, 221, 233, 246, 263, 276, 291, 307, 325, 338, 387, 405, 423, 436, 462, 478, 490, 509, 524, 540, 560, 577, 595, 615, 630, 645, 662, 682, 700, 721, 737, 756, 773, 792, 810, 829, 847, 860, 876, 892, 909, 928, 947, 964, 977, 996, 1014, 1029, 1042, 1054, 1069, 1089, 1106, 1121, 1137, 1155, 1174, 1193, 1207, 1222, 1239, 1255, 1272, 1290, 1309, 1327, 1343, 1358, 1378, 1395, 1413, 1432, 1450, 1469, 1484, 1499, 1511, 1527, 1543, 1558, 1573, 1591, 1610, 1629, 1643, 1663, 1679, 1697, 1714, 1730, 1746, 1758, 1777, 1795, 1809, 1826, 1844, 1862, 1881, 1896, 1913, 1930, 1943, 1958, 1969, 1986, 2008, 2022, 2041, 2059, 2078, 2096, 2114, 2135, 2153, 2174, 2187],\n        \"x\": [-1, -1, -3, -4, -5, -1, 0, 1, 1, 1, 0, -1, -2, -3, -1, 0, 1, 2, 3, 1, -1, -1, -3, -3, -1, -2, 1, 5, 5, 3, 3, -1, -3, -3, -3, -3, -1, 1, 2, 4, 3, 3, -1, -3, -5, -4, -3, -1, 1, 3, 4, 3, 3, 1, -1, -2, -3, -3, -3, -3, -1, 1, 0, -1, 0, 1, -1, -2, -3, -1, -1, 1, 2, 3, 3, 5, 3, -1, -3, -3, -1, -1, -3, 1, 5, 5, 4, 2, 1, -1, -2, -3, -3, -1, -2, 3, 5, 6, 5, 5, 1, -1, -1, -3, -1, -1, 1, 3, 5, 5, 6, 1, 0, 0, -1, -2, -2, -1, 1, 3, 3, 2],\n        \"y\": [4, 10, 12, 14, 9, 2, 4, 5, 7, 3, 1, 4, 7, 10, 6, 11, 14, 13, 5, 1, 3, 5, 9, 7, 4, 0, 4, 11, 13, 8, 6, 0, 0, 4, 2, 0, 0, 4, 7, 9, 6, 2, 2, 4, 5, 4, 4, 1, 4, 6, 7, 7, 1, 0, 2, 2, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 3, 5, 4, 2, 3, 4, 5, 6, 5, 2, 3, 4, 5, 4, 4, 1, 0, 0, 1, 0, 0, 0, 2, 4, 6, 5, 4, 1, 0, 1, 0, 2, 1, 0, 0, 2, 4, 2, 1, 0, 0, 0, 1, 0, 0, 0, 4, 5, 4, 3, 1, 0, 1, 2, -1]\n      }\n    }\n  },\n  {\n    \"name\": \"暴走\",\n    \"type\": \"serial\",\n    \"recoils\": {\n      \"un_aim\": {\n        \"time_points\": [0, 12, 24, 55, 66, 82, 96, 108, 116, 127, 139, 150, 163, 176, 184, 194, 206, 219, 234,\n          245, 256, 267, 278, 288, 298, 310, 322, 330, 340, 353, 365, 378, 385, 396, 409, 421,\n          433, 443, 452, 464, 489, 500, 513, 526, 538, 547, 562, 570, 581, 592, 605, 613, 623,\n          635, 643, 652, 698, 709, 722, 733, 746, 757, 770, 783, 795, 807, 819, 831, 844, 857,\n          869, 880, 889, 899, 911, 920, 930, 940, 954, 966, 978, 990, 997, 1009, 1019, 1028, 1038,\n          1048, 1059, 1071, 1083, 1096, 1108, 1119, 1130, 1143, 1151, 1163, 1172, 1182, 1193,\n          1205, 1217, 1229, 1242, 1254, 1264, 1273, 1283, 1293, 1304, 1315, 1325, 1335, 1346,\n          1359, 1371, 1383, 1395, 1407, 1416, 1426, 1438, 1450, 1462, 1470, 1478, 1488, 1497,\n          1509, 1521, 1531, 1543, 1552, 1566, 1579, 1592, 1605, 1616, 1629, 1640, 1653, 1665,\n          1695, 1704, 1713, 1723, 1732, 1744, 1756, 1767, 1775, 1789, 1800, 1809, 1823, 1831,\n          1843, 1851, 1859, 1873, 1910, 1922, 1929, 1940, 1953, 1965, 1973, 1984, 1996, 2008,\n          2021, 2032, 2044, 2058, 2075, 2088, 2096, 2107, 2119, 2130, 2138, 2147, 2155, 2167,\n          2175, 2186, 2198, 2207, 2217, 2229, 2243, 2253, 2276, 2284, 2296, 2306, 2316, 2327,\n          2339, 2352, 2363, 2375, 2388, 2396, 2406, 2416, 2425, 2438, 2449, 2457, 2468, 2476,\n          2486, 2498, 2506, 2517, 2528, 2541, 2549, 2560, 2567, 2578, 2590, 2598, 2608, 2621,\n          2629, 2639, 2649, 2658, 2666, 2682, 2694, 2707, 2717, 2725, 2737, 2750, 2760, 2769,\n          2780, 2792, 2805, 2816, 2828, 2841, 2853, 2865, 2873, 2884, 2896, 2907, 2915, 2926,\n          2938, 2945, 2958, 2970, 2982, 2995, 3007, 3018, 3027, 3037, 3049, 3058, 3068, 3079,\n          3089, 3098, 3112, 3122, 3135, 3143, 3154, 3165, 3177, 3191, 3203, 3214, 3226, 3241,\n          3253, 3264, 3276, 3288, 3301, 3313, 3325, 3338, 3350, 3362, 3374, 3386, 3399, 3411,\n          3422, 3435, 3447, 3460, 3473, 3481, 3492, 3503, 3515, 3527, 3540, 3552, 3564, 3577,\n          3589, 3600, 3613, 3625, 3638, 3650, 3662, 3674, 3684, 3699, 3713, 3724, 3736, 3748,\n          3761, 3774, 3785, 3798, 3810, 3822, 3834, 3846, 3859, 3870, 3884, 3895, 3907, 3915,\n          3925, 3938, 3944, 3956, 3969, 3980, 3988, 4000, 4015, 4025, 4036, 4048, 4056, 4067,\n          4078, 4091, 4098, 4110, 4122, 4134, 4145, 4154, 4164, 4176, 4184, 4197, 4208, 4219,\n          4231, 4245, 4257, 4266, 4280, 4293, 4301, 4312, 4324, 4336, 4348, 4360, 4368, 4379,\n          4387, 4397, 4409, 4417, 4425, 4434, 4445, 4458, 4470, 4478, 4489, 4502, 4513, 4522,\n          4533, 4544, 4552, 4563, 4574, 4587, 4594, 4605, 4617, 4629, 4642, 4650, 4661, 4673,\n          4682, 4691, 4699, 4710, 4722, 4733, 4746, 4754, 4764, 4777, 4790, 4800, 4813, 4824,\n          4832, 4844, 4852, 4863, 4876, 4888, 4899, 4908, 4918, 4926, 4937, 4944, 4955, 4967,\n          4980, 4990, 5003, 5011, 5022, 5034, 5047, 5060, 5074, 5083, 5095, 5104, 5117, 5127,\n          5139, 5150, 5161, 5170, 5180, 5190, 5200, 5207, 5219, 5230, 5243, 5261, 5286, 5298,\n          5310, 5318, 5328, 5338, 5353, 5365, 5373, 5384, 5395, 5407, 5415, 5427, 5439, 5450,\n          5462, 5474, 5483, 5493, 5508, 5519, 5530, 5542, 5549, 5562, 5573, 5585, 5593, 5605,\n          5617, 5630, 5641, 5655, 5665, 5677, 5690, 5698, 5708, 5722, 5733, 5745, 5758, 5770,\n          5782, 5794, 5802, 5813, 5826, 5837, 5847, 5857, 5867, 5880, 5891, 5899, 5910, 5918,\n          5929, 5937, 5948, 5961, 5972, 5984, 5997, 6009, 6016, 6027, 6040, 6050, 6060, 6094,\n          6101, 6113, 6125, 6137, 6146, 6156, 6168, 6180, 6192, 6200, 6210, 6222, 6230, 6242,\n          6253, 6265, 6278, 6286, 6297, 6310, 6318, 6327, 6340, 6353, 6365, 6376, 6388, 6400,\n          6408, 6420, 6431, 6443, 6451, 6463, 6474, 6496, 6507, 6517, 6529, 6542, 6552, 6561,\n          6573, 6585, 6593, 6604, 6616, 6623, 6633, 6646, 6659, 6677, 6695, 6707, 6716, 6727,\n          6739, 6750, 6763, 6775, 6788, 6800, 6812, 6822, 6830, 6842, 6850, 6892, 6905, 6912,\n          6923, 6934, 6946, 6957, 6965, 6977, 6989, 6997, 7009, 7020, 7033, 7045, 7055, 7064,\n          7075, 7088, 7100, 7112, 7124, 7139, 7151, 7164, 7174, 7186, 7199, 7212, 7223, 7234,\n          7247, 7255, 7266, 7278, 7290, 7302, 7312, 7320, 7333, 7345, 7357, 7370, 7382, 7394,\n          7407, 7419, 7430, 7443, 7450, 7462, 7474, 7486, 7494, 7506, 7517, 7529, 7540, 7554,\n          7566, 7573, 7586, 7597, 7610, 7622, 7634, 7647, 7659, 7671, 7689, 7700, 7713, 7726,\n          7734, 7745, 7757, 7766, 7776, 7788, 7799, 7810, 7819, 7830, 7843, 7850, 7860, 7872,\n          7880, 7892, 7908, 7916, 7926, 7936, 7947, 7959, 7972, 7984, 7995, 8008, 8021, 8033,\n          8045, 8057, 8070, 8082, 8094, 8106, 8114, 8125, 8137, 8149, 8167, 8192, 8204, 8213,\n          8225, 8235, 8240, 8253, 8263, 8273, 8284, 8296],\n        \"x\": [0, 0, 0, 2, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0,\n          0, 0, 0, 0, 1, 2, 2, 14, 14, 1, 0, -1, -1, -2, -2, -1, -1, -1, -1, -1, -1, 1, 1, 2, 1, 1, 1, 0, 1,\n          0, 0, 0, 0, 0, 0, 1, 2, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n          1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,\n          1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 2, 2, 3,\n          1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2,\n          2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,\n          0, 0, 1, 2, 3, 13, 13, 3, -1, -2, -2, -3, -3, -2, -2, -2, -1, -1, -1, 1, 1, 2, 1, 0, 0, 0, 0, 0,\n          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 7, 2, 1,\n          1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,\n          0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 3, 2,\n          1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,\n          1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 2, 3, 14, 3, 1, 0, -1, -1, -1, -1, -1,\n          -1, -1, -1, 0, 0, 1, 0, 2, 2, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0,\n          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 6, 13, 13,\n          6, 1, -2, -3, -2, -2, -2, -2, -1, -1, -1, -1, -1, 0, 1, 3, 2, 2, 2, 1, 0, 0, 0, 0, -1, -1, -1, 0,\n          0, 0, 0, 1, 5, 5, 2, 2, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0,\n          0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 2, 0, 0, 0, 0,\n          0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 1, 1, 1, 1, 1, 1,\n          0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 3, 2, 1, 1, 1, 1, 0,\n          0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 14, 13, 3, 0, 0, -2, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, 0,\n          1, 2, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2],\n        \"y\": [7, 7, 7, -2, -3, -3, -3, -2, -2, -2, -2, -1, 3, 6, 7, 7, 6, 6, -3, -4, -4, -3, -3, -2, -3, -2, -2,\n          -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1,\n          0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1,\n          -1, -1, -1, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n          0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -2, -1, -1, -1, -2, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n          -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0,\n          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n          1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0,\n          1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,\n          1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n          0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0,\n          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0,\n          1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1,\n          1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0,\n          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n          0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n          0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0,\n          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,\n          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -2, -2, -1, -2, -1, -2]\n      },\n      \"aim\": {\n        \"time_points\": [0, 12, 21, 30, 43, 53, 62, 73, 85, 93, 103, 112, 122, 134, 141, 154, 165, 178, 190, 202,\n          214,\n          227, 239, 250, 259, 269, 281, 294, 306, 318, 330, 338, 351, 362, 374, 386, 398, 411,\n          422, 432,\n          442, 454, 466, 478, 490, 502, 514, 527, 538, 551, 564, 572, 583, 595, 606, 618, 631,\n          644, 655,\n          668, 675, 687, 698, 708, 718, 730, 742, 754, 766, 778, 790, 803, 815, 828, 840, 852,\n          864, 877,\n          888, 901, 913, 925, 938, 951, 963, 974, 986, 1000, 1012, 1023, 1035, 1048, 1060, 1070,\n          1078,\n          1090, 1100, 1115, 1127, 1140, 1151, 1165, 1177, 1188, 1201, 1213, 1225, 1238, 1251,\n          1262, 1274,\n          1287, 1298, 1311, 1323, 1336, 1348, 1361, 1372, 1386, 1397, 1410, 1421, 1435, 1449,\n          1458, 1471,\n          1484, 1497, 1508, 1520, 1532, 1545, 1557, 1569, 1581, 1594, 1606, 1619, 1632, 1643,\n          1655, 1673,\n          1686, 1698, 1710, 1722, 1735, 1747, 1758, 1771, 1784, 1796, 1806, 1820, 1833, 1846,\n          1857, 1870,\n          1881, 1895, 1907, 1918, 1930, 1942, 1955, 1967, 1979, 1991, 2004, 2017, 2028, 2042,\n          2053, 2065,\n          2078, 2089, 2103, 2115, 2127, 2139, 2152, 2163, 2176, 2188, 2201, 2210, 2221, 2232,\n          2244, 2256,\n          2267, 2280, 2292, 2303, 2316, 2329, 2340, 2354, 2366, 2395, 2421, 2435, 2448, 2459,\n          2467, 2478,\n          2489, 2502, 2514, 2526, 2538, 2552, 2564, 2577, 2589, 2601, 2615, 2631, 2646, 2656,\n          2669, 2683,\n          2694, 2706, 2718, 2732, 2744, 2757, 2770, 2782, 2793, 2805, 2818, 2831, 2843, 2862,\n          2875, 2892,\n          2904, 2917, 2930, 2943, 2954, 2966, 2978, 2989, 2997, 3009, 3023, 3035, 3046, 3057,\n          3070, 3082,\n          3094, 3106, 3118, 3131, 3143, 3155, 3168, 3181, 3193, 3205, 3217, 3230, 3241, 3254,\n          3265, 3278,\n          3290, 3303, 3315, 3322, 3333, 3346, 3358, 3370, 3382, 3395, 3407, 3420, 3432, 3443,\n          3455, 3467,\n          3480, 3492, 3505, 3516, 3529, 3541, 3553, 3566, 3578, 3588, 3597, 3609, 3621, 3634,\n          3646, 3657,\n          3670, 3683, 3696, 3707, 3719, 3731, 3743, 3756, 3768, 3781, 3792, 3805, 3817, 3829,\n          3842, 3850,\n          3857, 3868, 3879, 3891, 3903, 3916, 3928, 3940, 3952, 3964, 3977, 3989, 4002, 4014,\n          4026, 4038,\n          4050, 4062, 4074, 4087, 4099, 4112, 4123, 4136, 4148, 4160, 4173, 4185, 4198, 4210,\n          4222, 4235,\n          4247, 4260, 4272, 4283, 4296, 4308, 4320, 4333, 4346, 4358, 4370, 4382, 4395, 4406,\n          4418, 4432,\n          4444, 4455, 4467, 4480, 4492, 4505, 4522, 4534, 4545, 4554, 4566, 4578, 4590, 4602,\n          4615, 4624,\n          4635, 4646, 4655, 4663, 4676, 4689, 4701, 4713, 4725, 4738, 4750, 4762, 4774, 4787,\n          4799, 4812,\n          4823, 4836, 4848, 4863, 4873, 4885, 4901, 4912, 4923, 4935, 4948, 4961, 4978, 4988,\n          4997, 5007,\n          5015, 5027, 5039, 5051, 5058, 5069, 5082, 5095, 5107, 5120, 5131, 5144, 5156, 5168,\n          5180, 5192,\n          5204, 5217, 5230, 5241, 5254, 5264, 5278, 5288, 5297, 5310, 5321, 5334, 5346, 5357,\n          5370, 5382,\n          5395, 5406, 5418, 5431, 5443, 5455, 5468, 5481, 5492, 5505, 5516, 5525, 5535, 5547,\n          5559, 5571,\n          5583, 5596, 5608, 5618, 5633, 5640, 5653, 5664, 5675, 5688, 5700, 5712, 5725, 5737,\n          5748, 5761,\n          5773, 5786, 5798, 5810, 5822, 5834, 5842, 5854, 5867, 5878, 5890, 5904, 5919, 5928,\n          5940, 5952,\n          5965, 5976, 5985, 5995, 6007, 6019, 6031, 6039, 6051, 6062, 6074, 6087, 6100, 6111,\n          6123, 6136,\n          6148, 6156, 6167, 6179, 6191, 6204, 6216, 6228, 6240, 6253, 6265, 6275, 6289, 6301,\n          6315, 6328,\n          6338, 6348, 6362, 6375, 6387, 6399, 6412, 6424, 6436, 6448, 6461, 6473, 6487, 6498,\n          6511, 6523,\n          6536, 6549, 6567, 6579, 6590, 6602, 6617, 6628, 6639, 6653, 6664, 6677, 6688, 6701,\n          6714, 6725,\n          6738, 6750, 6763, 6775, 6787, 6799, 6807, 6818, 6827, 6849, 6858, 6873, 6886, 6898,\n          6910, 6922,\n          6935, 6943, 6954, 6966, 6978, 6991, 7004, 7014, 7022, 7034, 7046, 7058, 7069, 7082,\n          7096, 7107,\n          7118, 7131, 7143, 7156, 7168, 7176, 7186, 7198, 7207, 7217, 7229, 7243, 7254, 7267,\n          7284, 7297,\n          7309, 7321, 7334, 7346, 7359, 7370, 7382, 7394, 7406, 7418, 7427, 7437, 7450, 7461,\n          7474, 7487,\n          7498, 7512, 7523, 7534, 7548, 7560, 7572, 7585, 7597, 7609, 7616, 7627, 7639, 7651,\n          7664, 7677,\n          7688, 7700, 7708, 7720, 7732, 7744, 7756, 7768, 7776, 7787, 7799, 7812, 7823, 7836,\n          7848, 7860,\n          7873, 7886, 7897, 7928, 7940, 7951, 7964, 7972, 7982, 7994, 8002, 8014, 8026, 8038,\n          8051, 8064,\n          8076, 8088, 8145, 8161],\n        \"x\": [0, 0, 0, -3, -3, -7, -3, -4, -3, 0, 0, -1, 1, 1, 1, 0, 0, -1, -1, -1, -1, -1, 4, 9, 10, 11, 7, 0,\n          -4, -5,\n          -5, -4, -4, -3, -4, -3, -2, -1, 1, 2, 3, 3, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2,\n          -5, -6,\n          -4, -3, -1, -1, 1, 2, 2, 2, 1, 1, 1, -1, -1, -2, -1, -2, 0, -1, 0, -2, -1, 0, 0, 0, 0, 0, 0, 0, 0,\n          -1, -2,\n          -3, -5, -6, -3, 2, 1, 1, 2, 2, 2, 1, 1, -1, -2, -2, -2, -3, -2, -2, -1, -1, -3, -2, -1, 0, 0, 0,\n          0, 0, 0,\n          0, 0, -3, -5, -7, -7, -3, 1, 0, 2, 2, 2, 1, 1, 0, 0, 0, -1, -2, -2, -4, -3, -3, -4, 0, 2, 2, 2, 1,\n          1, 1,\n          0, 0, 0, -1, -1, -2, -1, -1, -1, -1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 4, 6, 6, 3, -1, 0, 0, 0, 0, -1,\n          -1, -1,\n          -1, 0, 0, -1, 2, 6, 6, 6, 5, 2, -1, -4, -3, -3, -3, -1, -1, 0, -1, 0, 5, 6, 6, 3, 0, -1, -1, -2,\n          -1, -1,\n          -1, -1, -1, 0, 2, 4, 6, 5, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 4, 5, 6, 3, 1, 0, -1, -1,\n          -1, -1,\n          -1, -1, 0, -1, 2, 6, 7, 8, 6, 0, 1, -1, -1, -1, -2, -2, -2, -2, -1, -1, 0, 0, 0, 0, 1, 1, 1, 0, 0,\n          -1, -1,\n          0, 0, 0, 0, 0, 0, -1, -1, -3, -2, -3, -2, 0, 2, 2, 2, 2, 2, 1, 1, 1, 0, 2, 2, 1, 3, 2, 1, 1, -1,\n          -1, 0,\n          -1, 0, 0, 0, 1, 0, -1, -1, -2, -1, -2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 2, 0, 1, 1, 2, 2,\n          1, 1,\n          0, 0, -2, -1, -1, -1, 3, 6, 8, 5, 1, 2, -3, -2, -2, -2, -1, -1, -1, 0, 1, 0, 0, -2, -1, -1, 1, 1,\n          1, 2, 2,\n          1, 1, 0, 0, 0, 0, 2, 4, 4, 5, 2, 1, -2, -1, -1, -1, -1, -1, -1, 0, 0, 1, 1, 1, 3, 4, 3, 2, 1, 0,\n          0, 0, 0,\n          -1, 0, 0, 0, 0, 0, 0, -1, -2, -3, -2, 2, 2, 2, 3, 2, 2, 1, 1, 0, -1, -1, -1, 0, 3, 6, 7, 4, 3, -2,\n          -2, -2,\n          -2, -2, -1, -1, 1, 1, 1, 1, 4, 4, 6, 3, 1, -1, -1, -1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 2, 3, 2, 4, 1,\n          0, -1,\n          -1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, -1, -1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, -1, -2, -2, -2, -2,\n          -1, 2,\n          2, 2, 2, 2, 1, 1, 0, 0, 0, 1, 2, 3, 4, 2, 1, -2, -1, -1, -1, -2, -1, -1, 1, 1, 1, 1, -1, -1, -2,\n          -2, -2,\n          1, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0, 1, 2, 3, 4, 3, 1, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 2, 4, 5, 3,\n          2, -1,\n          -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, -1, -2, -2, -2, 0, 1, 1, 2, 2, 2, 1, 1, 0, 0, 0, -1, -2, 0, 2,\n          3, 4,\n          3, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 3, 4, 4, 2, -1, -1, -1, -1, -1, -1, -1, 0, 0,\n          0, 0,\n          -1, -1, -2, -2, -3, -2, -1, 1, 2, 2, 1, 1, 0, 0, 0, 0, 1, 3, 4, 6, 6, 3, 0, -1, -1, -3, -3, -3,\n          -2, -1,\n          -1, -1, -1, -7, -5, -5, 2, 2, 6, 5, 3, -2, -3, -7, -12, -11, -9, -6, -1, 5, 5, 4, -2, -2],\n        \"y\": [3, 3, 3, 8, 10, 10, 5, 5, 1, -3, -1, -2, -2, -1, -2, -2, -2, 0, 1, 3, 3, 2, 4, 3, 3, 4, 6, 3, 1,\n          1, 0, 0,\n          0, 0, 0, 1, 0, 1, 4, 12, 28, 28, 28, 3, -7, -12, -13, -11, -8, -7, -5, -3, -3, -2, -1, 3, 10, 30,\n          28, 3,\n          -4, -3, -7, -8, -7, -7, -6, -4, -3, -1, 0, 1, 7, 14, 28, 24, 3, -2, -7, -7, -6, -6, -4, -3, -2,\n          -1, -1, 0,\n          3, 7, 24, 22, 3, -5, -8, -7, -11, -10, -6, -4, -2, 0, 0, 0, 0, 2, 6, 8, 8, 3, 3, 0, -1, -2, -3,\n          -2, -1,\n          -1, -1, -1, -1, 1, 9, 24, 21, 1, -4, -4, -8, -7, -7, -7, -4, -3, -1, -1, -1, 1, 5, 9, 8, 4, 3, -2,\n          -3, -4,\n          -4, -3, -3, -2, -1, -1, -1, 2, 5, 11, 11, 5, -1, -1, -5, -5, -4, -4, -3, -2, -2, -2, -1, 1, 3, 4,\n          4, 1,\n          -1, -2, -2, -2, -3, -4, -3, -2, 0, 0, 0, 3, 8, 24, 25, 21, 0, -5, -13, -13, -12, -10, -7, -5, -4,\n          -3, -2,\n          8, 13, 11, 3, -2, -4, -4, -4, -4, -3, -2, -2, -1, -1, 1, 1, 2, 7, 0, -1, -3, -3, -3, -3, -3, -2,\n          -1, -1,\n          0, 1, 6, 24, 22, 3, -5, -5, -8, -8, -7, -7, -6, -5, -4, -3, 0, 2, 4, 5, 6, 1, 0, -2, -3, -3, -3,\n          -4, -3,\n          -2, 0, 1, 0, 3, 9, 24, 8, 8, -5, -6, -7, -7, -6, -5, -3, -3, -3, -1, -1, 2, 6, 10, 10, 1, 1, -1,\n          -3, -3,\n          -4, -3, -3, -2, -1, -1, -1, 2, 21, 23, 9, 6, -2, -6, -9, -8, -7, -8, -5, -3, -4, -3, -1, 2, 4, 6,\n          5, 1, 0,\n          0, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 3, 5, 6, 5, -1, -2, -2, -2, -1, -2, -2, -1, 0, 1, 1, 1, 4,\n          3, 4, 7,\n          4, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6, 10, 26, 9, 0, -4, -4, -5, -5, -4, -4, -2, -1, -1, 0, 2, 4,\n          6, 7, 4,\n          1, -1, -2, -2, -2, -1, -1, -1, 0, 0, 1, 1, 2, 3, 9, 6, 3, 1, -1, -1, -1, -1, -1, -1, 0, 0, 1, 1,\n          2, 7, 10,\n          11, 4, -1, -2, -2, -3, -3, -3, -4, -1, -1, 1, 1, 2, 4, 6, 7, 3, 1, 2, 0, 1, 0, 1, 0, 1, 1, 1, 1,\n          1, 1, 4,\n          5, 11, 9, 3, -1, -2, -3, -2, -2, -1, -1, 0, 0, 1, 1, 4, 24, 24, 25, 2, -6, -11, -11, -9, -7, -7,\n          -4, -4,\n          -2, -1, 0, 3, 7, 9, 9, 4, 0, -1, -2, -1, -1, -1, -1, -1, 0, 0, 0, 0, 3, 9, 22, 9, 4, 0, -7, -7,\n          -7, -7,\n          -6, -7, -2, -1, 0, 1, 3, 5, 6, 10, 2, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, 21, 8, 4, -2, -4,\n          -4, -4,\n          -3, -2, -2, -2, -1, -1, -1, -1, 1, 3, 9, 10, 4, 2, -3, -3, -4, -4, -4, -3, -2, -2, -1, -1, 2, 6,\n          24, 21,\n          5, -4, -7, -7, -7, -8, -6, -6, -5, -3, -1, -1, 0, 5, 5, 7, 4, -2, -1, -2, -3, -2, -3, -4, -3, -2,\n          -1, 1,\n          1, 2, 3, 3, 5, 3, 0, -1, -2, -2, -3, -2, -2, -2, -1, -1, -1, 0, 1, 3, 8, 7, 1, -2, -3, -3, -3, -3,\n          -3, -2,\n          -1, -1, -1, -1, 1, 6, 10, 6, 1, -2, -3, -4, -3, -3, -3, -2, -2, -1, -1, -1, 1, 3, 22, 10, 8, 7,\n          -4, -5,\n          -7, -8, -8, -8, -7, -5, -2, -1, -1, 2, 2, 4, 2, -3, -5, -6, -5, 0, 0, 4, 7, 5, 3, -1, -5, -8, -7,\n          -5, 1,\n          0]\n      }\n    }\n  },\n  {\n    \"name\": \"专注\",\n    \"type\": \"serial\",\n    \"recoils\": {\n      \"un_aim\": {\n        \"time_points\": [32, 45, 62, 76, 88, 105, 124, 140, 155, 173, 190, 207, 221, 239, 257, 270, 288, 300, 320, 333, 349, 366, 383, 399, 415, 434, 448, 469, 488, 503, 508, 531, 546, 561, 577, 583, 603, 617, 628, 646, 661, 671, 688, 707, 717, 736, 751, 768, 781, 798, 816, 830, 847, 856, 872, 885, 904, 913, 933, 949, 964, 986, 999, 1017, 1033, 1049, 1066, 1085, 1096, 1114, 1132, 1149, 1162, 1184, 1194, 1214, 1224, 1241, 1259, 1277, 1290, 1308, 1321, 1339, 1356, 1374, 1387, 1401, 1417, 1430, 1447, 1459, 1478, 1496, 1514, 1527, 1545, 1562, 1580, 1594, 1612, 1629, 1647, 1666, 1685, 1699, 1721, 1739, 1753, 1770, 1782, 1800, 1817, 1834, 1855, 1867, 1885, 1898, 1915, 1928, 1939, 1953, 1970, 1988, 2001, 2020, 2036, 2056, 2068, 2085, 2098, 2116, 2133, 2152, 2169, 2188, 2207, 2229, 2250, 2269, 2292, 2311, 2334, 2354, 2376, 2400, 2418, 2445, 2461, 2480, 2498, 2517, 2530, 2554, 2574, 2604, 2627, 2641, 2657, 2675, 2695, 2711, 2732, 2750, 2771, 2786, 2803, 2823, 2838, 2859, 2872, 2882, 2896, 2913, 2925, 2942, 2955, 2973, 2991, 3004, 3022, 3036, 3053, 3066, 3083, 3095, 3112, 3125, 3142, 3151, 3168, 3186, 3199, 3216, 3234, 3249, 3254, 3281, 3286, 3309, 3319, 3338, 3357, 3369, 3383, 3404, 3419, 3435, 3447, 3466, 3482, 3501, 3519, 3539, 3553, 3568, 3585, 3598, 3611, 3634, 3647, 3665, 3689, 3709, 3721, 3738, 3751, 3764, 3776, 3792, 3811],\n        \"x\": [-1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -1, -1, -2, -1, -2, -2, -2, -1, -2, -2, -1, -1, -1, -1, -1, -1, -2, -2, -2, -1, -1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -3, -3, -2, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],\n        \"y\": [2, 4, 6, 7, 6, 4, 2, 2, 2, 2, 2, 2, 4, 5, 6, 6, 5, 6, 5, 5, 4, 4, 3, 6, 5, 5, 5, 4, 3, 3, 4, 5, 6, 5, 5, 4, 5, 4, 4, 6, 5, 5, 5, 4, 5, 4, 4, 4, 3, 4, 4, 3, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 3, 4, 4, 2, 2, 3, 3, 2, 3, 3, 3, 4, 2, 2, 2, 2, 2, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 3, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 5, 3, 4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 1, 1, 1, 1]\n      },\n      \"aim\": {\n        \"time_points\": [0, 13, 24, 37, 56, 73, 85, 98, 110, 118, 151, 177, 190, 206, 220, 234, 262, 280, 301, 315, 332, 345, 357, 366, 381, 399, 412, 430, 443, 459, 472, 490, 508, 521, 538, 557, 570, 586, 604, 622, 637, 649, 666, 675, 696, 708, 722, 740, 755, 770, 783, 794, 806, 819, 835, 852, 868, 884, 899, 909, 922, 938, 952, 969, 982, 998, 1010, 1025, 1036, 1050, 1066, 1080, 1092, 1104, 1118, 1133, 1152, 1171, 1182, 1199, 1214, 1232, 1244, 1267, 1275, 1292, 1314, 1318, 1335, 1352, 1365, 1382, 1396, 1414, 1432, 1444, 1463, 1494, 1513, 1534, 1564, 1584, 1602, 1616, 1632, 1646, 1658, 1677, 1693, 1716, 1743, 1768, 1783, 1799, 1813, 1831, 1848, 1865, 1881, 1897, 1915, 1925, 1946, 1965, 1982, 2001, 2017, 2032, 2046, 2056, 2074, 2088, 2105, 2118, 2134, 2142, 2165, 2184, 2200, 2218, 2237, 2256, 2268, 2287, 2305, 2317, 2335, 2352, 2367, 2384, 2391, 2408, 2421, 2437, 2454, 2469, 2485, 2504, 2519, 2530, 2547, 2560, 2571, 2586, 2601, 2619, 2638, 2655, 2674, 2694, 2711, 2725, 2747, 2766, 2784, 2802, 2820, 2839, 2856, 2870, 2886, 2904, 2918, 2935, 2955, 2967, 2986, 2998, 3021, 3038, 3056, 3070, 3087, 3106, 3120, 3136, 3154, 3168, 3185, 3202, 3216, 3241, 3256, 3274, 3299, 3315, 3329, 3346, 3353, 3371, 3389, 3407, 3419, 3439, 3455, 3467, 3486, 3505, 3517, 3535, 3582, 3595, 3608, 3637, 3655, 3669, 3686, 3700, 3718],\n        \"x\": [0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -2, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 2, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, 1, 1, 1, 2, 1, 1, 2, 3, 3, 4, 2, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 3, 2, 1, 2, 2, 2, 1, 3, 4, 3, 2, 4, 3, 2, 2, 2, 2, 1, 3, 4, 3, 3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, -1, -2, -2, -1, -1, -1, -1, -1, -3, -3, -3, -2, -2, -3, -3, -3, -3, -3, -3, -2, -1, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -2, -3, -2, -1, -3, -3, -3, -3, -3, -2, -3, -3, -2, -3, -3, -2, -2, -3, -2, -1, -1, -2, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, 0, 0, 1, 1, 1, 1, 1, 0, -1, -1, -1, -1, -1, 0, 0, 0, -1, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 3, 4, 3, 5, 4, 5, 1, 1],\n        \"y\": [-1, -1, 2, 5, 7, 6, 8, 8, 5, 6, 3, 3, 3, 3, 4, 6, 7, 7, 9, 9, 8, 4, 4, 2, 2, 3, 4, 4, 4, 4, 3, 4, 3, 4, 5, 5, 4, 3, 4, 3, 2, 3, 3, 3, 3, 3, 4, 3, 3, 5, 6, 4, 4, 3, 3, 2, 3, 4, 4, 4, 4, 3, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 2, 2, 2, 2, 2, 2, 3, 3, 2, 3, 3, 3, 2, 2, 1, 1, 3, 2, 2, 2, 2, 2, 2, 0, 0, 1, 1, 1, 2, 2, 1, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 3, 2, 3, 3, 4, 2, 2, 3, 3, 2, 3, 3, 3, 2, 1, 1, 1, 2, 0, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 3, 3, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 1, 2, 2, 1, 1, 0, 0, 0, 1, 0, -1, 1, 1, 0, 1, 2, 2, 2, 2, 2, 2, 3, 2, 1, 2, 2, 2, 3]\n      },\n      \"turbocharger\": {\n        \"un_aim\": {\n          \"time_points\": [44, 59, 69, 80, 92, 101, 109, 121, 132, 140, 152, 163, 171, 201, 210, 246, 257, 287,\n            295, 390, 405, 412, 423, 431, 442, 452, 465, 513, 523, 533, 545, 557, 565, 575, 587,\n            612, 625, 636, 649, 662, 674, 686, 698, 711, 722, 735, 748, 760, 771, 784, 797, 809,\n            822, 833, 845, 860, 871, 883, 896, 908, 919, 931, 944, 956, 968, 981, 993, 1006, 1017,\n            1031, 1043, 1056, 1067, 1079, 1093, 1104, 1116, 1128, 1141, 1152, 1165, 1179, 1191,\n            1206, 1220, 1232, 1244, 1256, 1268, 1277, 1288, 1300, 1312, 1325, 1337, 1349, 1361,\n            1367, 1379, 1387, 1399, 1410, 1418, 1428, 1437, 1448, 1459, 1467, 1478, 1490, 1503,\n            1516, 1528, 1539, 1555, 1566, 1580, 1589, 1601, 1612, 1620, 1631, 1643, 1651, 1662,\n            1675, 1686, 1698, 1711, 1719, 1729, 1742, 1754, 1765, 1778, 1790, 1803, 1814, 1827,\n            1839, 1848, 1859, 1871, 1883, 1896, 1907, 1919, 1931, 1944, 1951, 1963, 1975, 1986,\n            1999, 2007, 2015, 2026, 2037, 2048, 2060, 2068, 2079, 2088, 2098, 2110, 2118, 2129,\n            2140, 2151, 2159, 2173, 2184, 2195, 2208, 2216, 2227, 2236, 2247, 2257, 2267, 2275,\n            2288, 2300, 2312, 2324, 2337, 2349, 2361, 2374, 2386, 2398, 2410, 2418, 2429, 2437,\n            2448, 2459, 2472, 2484, 2493, 2503, 2513, 2522, 2533, 2545, 2558, 2569, 2578, 2588,\n            2598, 2608, 2618, 2631, 2639, 2649, 2662, 2669, 2681, 2690, 2699, 2711, 2719, 2730,\n            2743, 2755, 2767, 2779, 2791, 2799, 2810, 2822, 2835, 2846, 2857, 2865, 2876, 2884,\n            2901, 2910, 2921, 2933, 2945, 2958, 2969, 2981, 2994, 3003, 3012, 3021, 3031, 3044,\n            3055, 3068, 3080, 3092, 3101, 3111, 3119, 3130, 3142, 3154, 3166, 3179, 3191, 3205,\n            3215, 3228, 3241, 3256, 3264, 3277, 3289, 3301, 3313, 3325, 3337, 3345, 3357, 3368,\n            3380, 3393, 3401, 3411, 3424, 3435, 3448, 3460, 3473, 3484, 3497, 3509, 3522, 3533,\n            3545, 3558, 3570, 3581, 3589, 3601, 3609, 3619, 3628, 3638, 3650, 3658, 3666, 3676,\n            3686, 3698, 3711, 3719, 3730, 3742, 3754, 3767, 3779, 3791, 3800, 3810, 3817, 3830,\n            3840, 3851, 3864, 3874, 3883],\n          \"x\": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0,\n            -1, -1, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n            1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n            2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,\n            0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, 0, -1, 0, 0, 0, -1, -1, -1, -1,\n            -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n            -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n            -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0,\n            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n            1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, -2, -2, -2, 12, -2, 12, 12, 11, -3, -4, -6, -7],\n          \"y\": [3, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 2, 5, 6, 5, 5, 5, 6, 6, 8, 7, 7, 7, 8, 8, 7, 6, 7, 7, 6, 6, 6,\n            6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 4, 5, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 2, 2, 4, 4,\n            4, 4, 3, 4, 3, 3, 3, 3, 3, 2, 3, 4, 3, 2, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,\n            1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n            1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n            1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n            0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,\n            1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 2, 1, 1, 1, 1, 1, 1,\n            1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1,\n            1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 0, 25, 0, 0, -4, -4, -5, 29, -4, 29, 30, 24, -8, -15, -22,\n            -25]\n        },\n        \"aim\": {\n          \"time_points\": [0, 8, 19, 30, 42, 54, 62, 74, 86, 95, 104, 116, 127, 140, 153, 165, 177, 190, 197, 209,\n            220,\n            232, 244, 254, 263, 273, 287, 298, 308, 321, 330, 341, 355, 368, 379, 391, 404, 417,\n            428, 441,\n            453, 464, 477, 488, 497, 507, 520, 528, 538, 546, 557, 569, 581, 594, 605, 617, 630,\n            642, 655,\n            672, 679, 691, 704, 716, 728, 740, 752, 766, 777, 790, 802, 815, 827, 839, 851, 863,\n            875, 888,\n            900, 912, 924, 937, 950, 961, 973, 985, 1000, 1010, 1023, 1035, 1047, 1059, 1071, 1083,\n            1096,\n            1108, 1120, 1131, 1140, 1152, 1163, 1175, 1188, 1196, 1209, 1220, 1231, 1244, 1256,\n            1268, 1280,\n            1292, 1305, 1317, 1328, 1341, 1354, 1366, 1378, 1390, 1403, 1415, 1427, 1440, 1452,\n            1464, 1477,\n            1492, 1500, 1512, 1534, 1543, 1557, 1569, 1582, 1594, 1607, 1619, 1630, 1643, 1656,\n            1668, 1679,\n            1691, 1703, 1715, 1728, 1739, 1752, 1767, 1784, 1796, 1809, 1821, 1834, 1845, 1858,\n            1868, 1882,\n            1894, 1906, 1918, 1930, 1939, 1950, 1962, 1974, 1987, 1996, 2006, 2017, 2029, 2040,\n            2053, 2066,\n            2077, 2090, 2103, 2114, 2126, 2140, 2152, 2164, 2176, 2188, 2200, 2212, 2226, 2239,\n            2249, 2261,\n            2273, 2287, 2299, 2310, 2323, 2340, 2354, 2366, 2377, 2390, 2402, 2415, 2427, 2439,\n            2452, 2463,\n            2476, 2488, 2501, 2513, 2525, 2537, 2551, 2563, 2580, 2592, 2606, 2624, 2636, 2648,\n            2660, 2672,\n            2684, 2697, 2706, 2721, 2734, 2745, 2758, 2771, 2784, 2793, 2802, 2814, 2826, 2840,\n            2852, 2863,\n            2875, 2887, 2900, 2912, 2925, 2937, 2949, 2961, 2973, 2986, 2998, 3010, 3022, 3034,\n            3044, 3054,\n            3066, 3077, 3090, 3102, 3115, 3127, 3144, 3153, 3163, 3175, 3189, 3202, 3212, 3225,\n            3238, 3252,\n            3262, 3274, 3286, 3299, 3311, 3323, 3336, 3350, 3362, 3378, 3391, 3403, 3418, 3431,\n            3446, 3459,\n            3471, 3483, 3490, 3502, 3515, 3526, 3538, 3546, 3555, 3569, 3581, 3594, 3605, 3618,\n            3630, 3642],\n          \"x\": [0, 0, 0, 0, 3, 3, 4, 4, 3, 2, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, -1, -1, -1,\n            -1, 0,\n            -1, -1, 0, -1, -1, 0, 0, 0, -1, -1, -1, 1, 2, 2, 2, 2, 1, 2, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1,\n            1, 1, 1,\n            1, 2, 2, 2, 1, 3, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 2, 3, 3, 4, 1, 0, 1, 1, 1, 1, 1, 2,\n            3, 4,\n            4, 3, 2, 3, 3, 2, 3, 2, 1, 3, 3, 2, 1, 1, 1, 2, 2, 2, 1, 1, -1, -1, -1, -2, -1, -1, -1, -1, -1,\n            -1, -1,\n            -1, -1, -1, -2, -1, -1, -1, -1, -2, -3, -3, -3, -3, -1, -3, -3, -3, -2, -1, -3, -4, -4, -4, -1,\n            -2, -1, 0,\n            0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -2, -2, -2, -1, -1, 0, 0, 0, 0, -1, -1, -2, -1, -1, -1, -1, -2,\n            -2, -1,\n            -3, -3, -3, -4, -3, -4, -3, -2, -3, -1, -3, -2, -3, -1, -1, -2, -3, -4, -3, -4, -3, -1, 0, 1, 1,\n            1, -1,\n            -1, -2, -3, -2, -1, -1, 0, -1, 1, 1, 1, 1, 1, 0, 0, 0, 0, -1, -1, -1, -2, -1, -1, -1, -2, -3, -3,\n            -2, -2,\n            -1, -1, -1, -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 3, 4, 5, 5,\n            2, 2, 4,\n            2, 1, 2, 1, 4, 3, 2, 3, -5, 0, -2, -2, 1, 0, 1, 1, 1, 1, 1, 0, -1, -1, -1, 0, 0, 0],\n          \"y\": [0, 0, 0, 0, 10, 14, 18, 19, 16, 11, 0, 0, -3, -6, -5, -5, 2, 8, 12, 12, 12, 11, 6, -1, -3, -3, -3,\n            1, 6,\n            6, 8, 8, 8, 3, 0, -1, 6, 9, 11, 10, 11, 6, 2, 2, 3, 4, 4, 5, 3, 3, 1, 0, 3, 3, 4, 3, 3, 1, 3, 4,\n            6, 6, 6,\n            3, 1, 0, 0, 0, 0, -1, 1, 2, 3, 2, 3, 1, 3, 3, 3, 2, 2, 5, 4, 5, 6, 4, 2, 1, 0, 0, 0, -1, 1, 2, 2,\n            2, 2, 2,\n            2, 2, 3, 2, 1, 0, 0, -1, -1, 0, 0, -1, -1, -2, -1, -1, 0, 0, 1, 1, 1, 2, 1, 1, 1, 0, 2, 3, 4, 4,\n            3, 2, 0,\n            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 2, 2, 3, 1, 3, 4, 2, 1, 1, 0, 0, 0, 0,\n            0, 0,\n            2, 3, 4, 3, 4, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 1, 0, 0, -1, -1, -1, -3, -3, -3, -3,\n            -2, 0, 0,\n            1, 1, 1, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 3, 3, 3, 3, 1, 0, 0, 0, -1, 0, -1, 0,\n            0, 0, 0,\n            0, 0, 0, 0, 2, 3, 4, 3, 1, 0, 0, -2, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 2, 4, 4, 4, 4,\n            1, 0, -1,\n            0, 0, 0, 1, 2, 2, 2, 1, 1, 0, 0, 0, 2, 2, 2, 1, 0, -2, -1, -1, -1, 0, 1, 2, 2, 2, 2, 2, 0, 0, -1,\n            0, -1,\n            0]\n        }\n      }\n    }\n  },\n  {\n    \"name\": \"哈沃克\",\n    \"type\": \"serial\",\n    \"recoils\": {\n      \"un_aim\": {\n        \"time_points\": [438, 449, 466, 480, 494, 504, 516, 534, 546, 577, 584, 600, 618, 636, 655, 668, 680, 698, 715, 729, 742, 759, 776, 794, 808, 819, 837, 855, 867, 886, 899, 911, 931, 942, 954, 972, 990, 1002, 1019, 1033, 1045, 1058, 1074, 1093, 1111, 1129, 1145, 1159, 1172, 1189, 1200, 1216, 1232, 1246, 1263, 1281, 1294, 1310, 1323, 1338, 1354, 1366, 1379, 1391, 1404, 1416, 1432, 1450, 1463, 1480, 1511, 1529, 1543, 1560, 1573, 1585, 1602, 1616, 1629, 1645, 1653, 1677, 1689, 1710, 1729, 1744, 1759, 1773, 1792, 1810, 1822, 1836, 1853, 1870, 1888, 1898, 1925, 1943, 1960, 1975, 1988, 1993, 2016, 2034, 2052, 2066, 2083, 2097, 2114, 2136, 2166, 2182, 2212, 2234, 2249, 2267, 2284, 2302, 2316, 2333, 2350, 2369, 2382, 2396, 2413, 2430, 2448, 2466, 2484, 2503, 2515, 2534, 2550, 2569, 2583, 2599, 2619, 2636, 2654, 2668, 2686, 2704, 2721, 2735, 2752, 2771, 2783, 2800, 2820, 2838, 2850, 2863, 2875, 2892, 2905, 2922, 2935, 2953, 2969, 2988, 3002, 3018, 3032, 3044, 3061, 3079, 3098, 3112, 3128, 3136, 3158, 3171, 3186, 3200, 3219, 3234, 3245, 3256, 3268, 3285, 3303, 3315, 3331, 3348, 3364, 3376, 3395, 3412, 3431, 3450, 3468, 3486, 3499, 3516, 3534],\n        \"x\": [-1, -2, -2, -2, -2, -1, -2, -2, -2, -1, -1, -1, 0, 0, 0, 0, 0, -1, 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 2, 1, 1, 0, 0, 0, -1, 0, -1, -1, -2, -2, -2, -1, -2, -2, -2, -2, -2, -2, -3, -4, -4, -3, -4, -5, -5, -4, -4, -3, -3, -3, -3, -4, -3, -3, -2, -2, -1, -1, -1, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 4, 4, 4, 3, 2, 3, 2, 2, 2, 2, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 3, 3, 2, 2, 2, 2, 4, 9, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, -1, -1, -1, -1, 0, 0, -1, -1, -1, -1, 0, 0, -2, -2, -2, -2, -1, -3, -3, -4, -3, -3, -2],\n        \"y\": [3, 4, 4, 3, 4, 2, 4, 5, 5, 3, 4, 4, 6, 6, 6, 6, 4, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 3, 4, 5, 7, 7, 4, 4, 4, 4, 3, 3, 2, 1, 3, 4, 4, 4, 3, 2, 2, 3, 3, 3, 1, 2, 2, 2, 2, 1, 2, 1, 2, 1, 1, 3, 1, 0, 0, -2, -2, -3, -2, -4, -1, -1, 0, 0, 3, 4, 4, 3, 4, 3, 2, 2, 1, 2, 1, 0, 0, 1, 0, 1, 2, 2, 2, 2, 1, 0, 0, 0, -1, -1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4, 3, 3, 6, 6, 5, 4, 3, 2, 3, 5, 4, 4, 4, 5, 3, 3, 4, 6, 6, 6, 5, 6, 8, 8, 6, 5, 5, 7, 7, 7, 4, 3, 6, 6, 6, 6, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 3, 3, 4, 4, 4, 4, 2, 3, 4, 5, 4, 3, 2, 4, 5, 5, 5, 5, 3, 4, 4, 5, 4, 2, 4, 4, 4, 3, 3, 2]\n      },\n      \"aim\": {\n        \"time_points\": [0, 14, 25, 41, 51, 63, 75, 89, 104, 122, 133, 149, 166, 174, 190, 203, 219, 237, 252, 264, 274, 286, 300, 316, 334, 346, 360, 379, 390, 407, 419, 438, 457, 473, 485, 501, 514, 529, 547, 566, 573, 589, 604, 620, 638, 653, 671, 686, 705, 724, 737, 754, 773, 791, 803, 815, 829, 846, 861, 877, 894, 913, 931, 943, 959, 979, 997, 1012, 1027, 1039, 1058, 1071, 1083, 1096, 1107, 1125, 1141, 1155, 1183, 1199, 1219, 1244, 1254, 1277, 1289, 1302, 1319, 1336, 1354, 1374, 1391, 1405, 1423, 1439, 1454, 1471, 1489, 1507, 1526, 1544, 1555, 1571, 1586, 1605, 1618, 1635, 1651, 1663, 1683, 1696, 1715, 1734, 1752, 1765, 1791, 1819, 1842, 1854, 1873, 1896, 1909, 1921, 1938, 1952, 1970, 1983, 1999, 2018, 2053, 2068, 2080, 2101, 2113, 2133, 2145, 2165, 2182, 2197, 2221, 2248, 2265, 2287, 2301, 2321, 2341, 2356, 2382, 2403, 2418, 2437, 2457, 2469, 2479, 2503, 2523, 2541, 2554, 2571, 2589, 2607, 2624, 2639, 2654, 2674, 2685, 2706, 2722, 2740, 2754, 2771, 2789, 2806, 2824, 2845, 2856, 2874, 2896, 2906, 2919, 2940, 2954, 2966, 2983, 3002, 3019, 3036, 3056, 3069, 3081, 3099, 3116, 3136, 3153, 3170, 3181, 3201, 3221, 3228, 3252, 3264, 3287, 3304, 3318, 3353, 3367, 3380, 3387, 3409, 3427, 3447, 3457, 3473, 3488, 3506, 3518, 3530, 3542, 3555],\n        \"x\": [-1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -2, -2, -2, -1, -1, -2, -2, -2, -2, -2, 0, 0, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, 1, 1, 1, 0, 1, 2, 1, 1, 1, 1, 2, 1, 1, 0, 1, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -3, -3, -3, -2, -2, -3, -4, -3, -2, -2, -3, -3, -2, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 1, 3, 3, 2, 2, 3, 2, 2, 1, 1, 1, 3, 3, 3, 3, 4, 3, 3, 1, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, -1, -1, 0, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, -2, -2, -2, -1, -2, -2, -2],\n        \"y\": [0, 0, 0, 0, 0, 0, 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 4, 4, 4, 2, 2, 6, 7, 7, 7, 6, 6, 7, 7, 7, 4, 4, 5, 5, 4, 3, 5, 5, 6, 4, 3, 2, 4, 4, 3, 3, 2, 4, 4, 5, 4, 2, 4, 4, 4, 4, 2, 2, 2, 2, 3, 2, 2, 2, 4, 5, 5, 3, 4, 3, 3, 2, 1, 1, 2, 2, 2, 2, 2, 0, -2, -2, -1, -1, -2, -2, -2, -1, -1, 1, 2, 4, 3, 4, 2, 2, 4, 3, 2, 3, 3, 2, 2, 2, 3, 3, 2, 3, 2, 2, 1, 0, 0, 0, 1, 2, 3, 2, 2, 3, 3, 2, 2, 3, 4, 4, 3, 4, 6, 6, 5, 5, 4, 4, 3, 2, 2, 3, 4, 3, 4, 3, 3, 3, 4, 4, 3, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 2, 2, 4, 4, 3, 2, 3, 4, 4, 4, 3, 2, 4, 4, 4, 4, 4, 4, 4, 2, 1, 4, 4, 4, 3, 2, 0, 0, -2]\n      },\n      \"turbocharger\": {\n        \"un_aim\": {\n          \"time_points\": [0, 10, 24, 34, 46, 55, 65, 78, 85, 96, 108, 116, 127, 139, 152, 160, 170, 181, 192, 200,\n            213, 224, 238, 247, 261, 273, 281, 293, 304, 316, 327, 335, 347, 359, 372, 383, 397,\n            409, 421, 433, 445, 452, 464, 476, 488, 499, 508, 519, 530, 543, 556, 567, 579, 588,\n            598, 610, 618, 628, 641, 650, 661, 672, 681, 694, 702, 714, 726, 734, 745, 757, 768,\n            776, 788, 800, 810, 819, 830, 843, 855, 868, 880, 892, 905, 917, 928, 941, 953, 964,\n            974, 983, 996, 1011, 1023, 1032, 1043, 1052, 1064, 1072, 1081, 1092, 1101, 1113, 1125,\n            1135, 1144, 1156, 1169, 1180, 1192, 1199, 1212, 1224, 1236, 1248, 1260, 1272, 1285,\n            1297, 1309, 1321, 1331, 1340, 1349, 1359, 1370, 1382, 1395, 1407, 1415, 1426, 1438,\n            1449, 1461, 1474, 1482, 1493, 1505, 1518, 1529, 1541, 1549, 1561, 1573, 1585, 1596,\n            1608, 1621, 1629, 1636, 1647, 1658, 1671, 1683, 1695, 1706, 1719, 1727, 1738, 1750,\n            1761, 1773, 1780, 1793, 1805, 1813, 1823, 1835, 1846, 1854, 1862, 1873, 1884, 1897,\n            1905, 1916, 1926, 1935, 1946, 1957, 1965, 1977, 1985, 1995, 2007, 2018, 2027, 2039,\n            2051, 2062, 2071, 2081, 2094, 2101, 2112, 2117, 2131, 2143, 2155, 2166, 2174, 2185,\n            2198, 2211, 2224, 2236, 2247, 2260, 2272, 2283, 2291, 2301, 2310, 2320, 2332, 2344,\n            2352, 2364, 2375, 2387, 2400, 2412, 2424, 2436, 2449, 2457, 2467, 2475, 2485, 2497,\n            2509, 2518, 2530, 2541, 2553, 2565, 2577, 2584, 2596, 2608, 2616, 2628, 2640, 2647,\n            2658, 2669, 2678, 2688, 2696, 2707, 2718, 2731, 2742, 2750, 2762, 2775, 2787, 2798,\n            2810, 2824, 2835, 2842, 2854, 2865, 2878, 2890, 2902, 2914, 2927, 2934, 2945, 2958,\n            2971, 2983, 2994, 3006, 3015, 3025, 3038, 3050, 3062, 3074, 3086, 3094, 3104, 3116,\n            3127, 3135, 3148, 3162, 3172, 3185, 3196, 3209, 3221, 3234, 3246, 3271, 3278, 3290,\n            3296, 3315, 3326, 3338, 3350, 3362, 3370, 3381, 3393, 3405, 3417, 3430, 3436, 3448,\n            3460, 3468, 3479, 3491, 3502, 3510, 3521, 3533, 3543],\n          \"x\": [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0,\n            0, 0, 0, 0, -1, 0, -1, -1, -1, 0, -1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n            1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1,\n            -1, -1, -1, -1, -1, -1, -2, -2, -2, -2, -2, -2, -1, -1, -2, -1, -1, -2, -1, -1, -1, -2, -2, -3,\n            -3, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0,\n            0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2,\n            2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1,\n            1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2,\n            2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n            0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -2, -2, -2, -1, -1, -1, -1, -1, -1,\n            -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 0, -2, -3, -3, -3, -3, -3],\n          \"y\": [0, 0, 0, 0, 1, 2, 2, 3, 3, 3, 3, 2, 2, 3, 4, 3, 3, 3, 3, 3, 2, 2, 4, 4, 4, 5, 4, 4, 4, 3, 4, 4, 4,\n            4, 4, 2, 2, 3, 3, 4, 4, 4, 4, 3, 3, 3, 4, 4, 4, 4, 2, 2, 2, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 4, 4, 4,\n            3, 2, 2, 2, 3, 3, 4, 4, 3, 3, 3, 3, 2, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n            2, 2, 2, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 3, 4, 3, 3, 3, 2, 3, 3, 3, 3, 2, 3, 2,\n            2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, -1, -1, -1, 0, 0, 0, 0, 0,\n            0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2,\n            2, 2, 1, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 3, 4, 5, 5, 5, 5, 4, 4, 4, 4, 5, 4, 4, 4, 3,\n            2, 2, 3, 4, 4, 4, 3, 4, 3, 2, 2, 3, 3, 2, 3, 2, 2, 2, 1, 2, 3, 3, 2, 2, 1, 2, 1, 2, 2, 2, 3, 3, 2,\n            2, 1, 2, 3, 3, 3, 3, 2, 2, 1, 2, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 4, 4, 3, 3, 2,\n            2, 1, 1, 1, 0, 0, -1, -2, -3, -4, -4, -4, -4, -2, -2, -1, 0, 0, 1, 2, 1, 1, 2, 2, 2, 2]\n        },\n        \"aim\": {\n          \"time_points\": [0, 12, 23, 32, 44, 56, 66, 79, 87, 97, 105, 116, 129, 137, 148, 159, 171, 183, 195, 204,\n            220,\n            232, 243, 252, 263, 275, 283, 296, 305, 317, 328, 340, 349, 361, 371, 382, 392, 403,\n            416, 428,\n            440, 452, 463, 471, 484, 495, 505, 514, 527, 538, 550, 563, 576, 586, 600, 613, 630,\n            638, 649,\n            663, 677, 683, 696, 705, 717, 729, 737, 748, 760, 771, 783, 795, 806, 815, 826, 838,\n            851, 860,\n            870, 882, 895, 908, 920, 932, 943, 955, 966, 981, 993, 1005, 1017, 1029, 1041, 1048,\n            1060, 1071,\n            1084, 1096, 1108, 1120, 1133, 1145, 1158, 1170, 1183, 1195, 1206, 1216, 1230, 1236,\n            1251, 1264,\n            1276, 1287, 1300, 1313, 1325, 1336, 1349, 1361, 1373, 1386, 1398, 1412, 1422, 1434,\n            1447, 1459,\n            1472, 1484, 1496, 1509, 1521, 1533, 1545, 1558, 1570, 1582, 1595, 1607, 1619, 1631,\n            1644, 1656,\n            1668, 1681, 1693, 1705, 1717, 1730, 1743, 1755, 1768, 1779, 1792, 1803, 1817, 1829,\n            1840, 1852,\n            1865, 1876, 1886, 1896, 1906, 1920, 1931, 1943, 1952, 1963, 1970, 1981, 1993, 2005,\n            2014, 2024,\n            2036, 2048, 2061, 2073, 2084, 2098, 2111, 2122, 2133, 2146, 2158, 2170, 2183, 2196,\n            2208, 2220,\n            2233, 2244, 2257, 2269, 2281, 2294, 2305, 2318, 2330, 2343, 2354, 2367, 2379, 2391,\n            2403, 2416,\n            2426, 2432, 2446, 2455, 2466, 2478, 2489, 2501, 2513, 2522, 2533, 2545, 2557, 2569,\n            2581, 2589,\n            2600, 2612, 2624, 2634, 2643, 2654, 2667, 2679, 2692, 2703, 2716, 2727, 2741, 2754,\n            2766, 2779,\n            2790, 2802, 2817, 2829, 2840, 2853, 2865, 2877, 2888, 2901, 2913, 2926, 2938, 2950,\n            2962, 2975,\n            2986, 3000, 3013, 3024, 3036, 3048, 3062, 3073, 3086, 3098, 3111, 3122, 3134, 3150,\n            3159, 3171,\n            3184, 3208, 3219, 3231, 3242, 3256, 3268, 3281, 3293, 3306, 3318, 3330, 3343, 3355,\n            3369, 3386,\n            3401, 3412, 3425, 3436],\n          \"x\": [-1, -1, -1, -2, -2, -2, -3, -2, -1, -1, 0, 0, -1, -2, -2, -2, -2, -2, -1, 0, 1, 1, 2, 2, 2, 2, 1,\n            1, -1,\n            -1, -2, -2, -2, -2, -1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3,\n            2, 2,\n            2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -2, -2, -1, -2, -1, -1, -2, -3, -3, -3, -3, -2, 0, -1,\n            -2, -4,\n            -4, -4, -2, -2, 0, -1, -2, -2, -2, -1, -1, 0, -1, -2, -2, -2, -2, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n            0, 0, 0,\n            0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 1,\n            1, 1,\n            1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, -1, -1, -1, -1, -1, -1, 0, 0, -1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1,\n            1, 1, 0,\n            0, -1, -1, -1, -1, -1, -1, 0, 1, 1, 1, 2, 1, 1, 1, 2, 3, 3, 3, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1,\n            1, 2,\n            1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, -1, -2, -2, -2, -2, -1, -1, 0, -1, -1, -1, -1, -1, -1, 0, 0,\n            1, 0, 1,\n            0, 1, 0, -1, -2, -2, -2, -2, -2, 0, -2, -2, -3, -3, -2, -2, 2, 3, 4, 4, -3, 0, -1, 0, 0, 0, -1,\n            -1, -2,\n            -3, -3, -3, -3, -2, -3, -3, -3, -3, -4],\n          \"y\": [0, 0, 0, 2, 5, 7, 10, 10, 8, 4, 2, 0, 2, 4, 4, 5, 5, 6, 6, 2, 5, 5, 6, 5, 5, 3, 1, 0, 5, 6, 7, 7,\n            6, 6, 3,\n            0, 0, 1, 1, 2, 1, 1, 1, 2, 3, 3, 3, 2, 2, 1, 0, 1, 2, 4, 5, 5, 6, 3, 2, 1, 0, 0, 0, 0, 0, 1, 5, 5,\n            5, 6,\n            1, 0, -1, 0, 0, 1, 1, 1, 2, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, -1, -1,\n            -1, 0, 0,\n            -1, -1, -2, -2, -1, 0, 0, 4, 6, 6, 6, 5, 0, 2, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1,\n            1, 1, 0,\n            0, -1, -2, -3, -3, -2, -1, 0, 1, 2, 3, 2, 1, 0, 0, 1, 2, 2, 3, 2, 1, 1, 2, 2, 3, 4, 3, 3, 1, 1, 2,\n            2, 3,\n            3, 2, 2, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 2, 2, 2, 1, 0, 2, 5, 5, 5, 3, 3, 0, 1, 0, 1, 1, 1, 1, 1,\n            3, 3,\n            3, 2, 1, 0, 0, 1, 1, 3, 3, 3, 3, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 0, 1, 1, 3, 3, 2,\n            1, 1,\n            0, 2, 3, 5, 5, 5, 3, 1, 2, 1, 1, 1, 1, 1, 0, 1, 1, 2, 2, 2, 2, 1, 2, 3, 4, 4, 2, 3, 3, 0, -1, -1,\n            -6, -7,\n            -8, -8, -8, -6, -2, 0, 2, 1, 2, 1, 2, 2, 2, 2, 3, 3, 4]\n        }\n      }\n    }\n  },\n  {\n    \"name\": \"lstart\",\n    \"type\": \"serial\",\n    \"recoils\": {\n      \"un_aim\": {\n        \"time_points\": [0, 12, 32, 49, 61, 79, 92, 110, 129, 147, 156, 171, 183, 227, 242, 255, 267, 282, 300, 313, 324, 337, 349, 362, 380, 398, 429, 447, 466, 478, 509, 521, 531, 546, 564, 575, 586, 602, 632, 646, 663, 676, 693, 706, 718, 731, 748, 761, 779, 793, 810, 828, 847, 857, 871, 914, 927, 945, 957, 976, 994, 1013, 1031, 1050, 1068, 1086, 1098, 1117, 1135, 1149, 1166, 1174, 1190, 1276, 1295, 1313, 1337, 1356, 1374, 1386, 1402, 1417, 1430, 1445, 1460, 1479, 1497, 1516, 1534, 1546, 1564, 1576, 1596, 1614, 1632, 1644, 1653, 1670, 1687, 1718, 1730, 1743, 1761, 1780, 1797, 1819, 1832, 1844, 1860, 1878, 1896, 1914, 1923, 1934, 1953, 1994, 2013, 2028, 2043, 2058, 2072, 2086, 2098, 2111, 2129, 2147, 2159, 2171, 2181, 2217, 2234, 2246, 2277, 2296, 2311, 2322, 2349, 2363, 2381, 2399, 2411, 2424, 2436, 2447, 2461, 2480, 2497, 2517, 2534, 2548, 2565, 2577, 2597, 2611, 2622, 2636, 2647, 2663, 2682, 2700, 2719, 2731, 2743, 2762, 2780, 2789, 2805, 2823, 2838, 2854, 2870, 2885, 2903, 2917, 2930, 2947, 2958, 2970, 2982, 2995, 3008, 3020, 3032, 3041, 3054, 3083, 3101],\n        \"x\": [1, 1, 1, 1, 2, 2, 1, 1, 1, 3, 4, 5, 3, 1, 5, 5, 6, 5, 3, 4, 3, 1, -1, -2, -3, -1, -1, -3, -6, -6, -1, -2, -2, -2, -1, -1, -2, -1, -1, -1, 0, 1, 3, 3, 2, 1, -2, -4, -6, -5, -3, -1, 1, 3, 2, 1, 2, 0, -1, 2, 2, 0, -1, 0, 1, 0, 0, 1, -1, -5, -6, -7, -1, -1, -1, 0, 1, 1, 1, -1, -2, -1, -1, -3, -3, -3, -3, -3, -3, -1, 3, 2, 3, 1, -1, -1, -2, -2, -1, -1, -1, 1, 3, 3, 3, 4, 3, 3, 2, 0, 0, 0, 0, -1, -3, -4, -5, -3, -1, 1, 3, 2, 1, 1, -1, -3, -4, -4, -5, -1, -2, -3, -2, -2, -2, -1, -1, -1, -1, -1, 0, -1, 1, 3, 5, 3, 1, 1, 2, 2, 1, -1, -1, 0, 0, -1, -3, -6, -7, -6, -3, -1, 1, 3, 3, 3, 4, 3, 1, 0, 0, -1, 0, 1, -2, -3, -5, -5, -6, -3, -2, 1, 1, 3, 2, 1, -1],\n        \"y\": [-2, -2, 0, 3, 4, 4, 4, 4, 3, 3, 2, 3, 2, 0, 2, 5, 5, 5, 5, 2, 2, 3, 4, 4, 4, 8, 2, 4, 4, 8, 4, 1, 2, 2, 3, 3, 4, 4, 1, 4, 4, 4, 4, 0, 0, 0, 4, 5, 4, 10, 4, 1, 1, 2, 2, 6, 1, 3, 4, 8, 2, 2, 1, 5, 7, 7, 5, 4, 6, 9, 9, 9, 7, 12, 19, 12, 6, 5, 7, 7, 14, 8, 4, 2, 3, 4, 15, 4, -1, 0, 4, 8, 9, 3, 7, 4, 5, 11, 5, 0, -1, 2, 4, 12, 15, 4, -2, -3, -3, 0, 4, 2, 2, 2, 2, 4, 4, 2, 4, 5, 5, 6, 5, 5, 2, 4, 4, 5, 15, 17, 2, 4, 0, 8, 2, -1, 2, 3, 4, 7, 4, 4, 2, 4, 4, 0, 0, 1, 4, 25, 4, 11, 6, -3, -3, -3, 2, 4, 5, 15, 5, 2, 4, 5, 4, 5, 13, 2, 3, 4, 5, 7, 5, 4, 7, 5, 7, 5, 48, 5, 2, -14, -17, -23, -19, -2, 3]\n      },\n      \"aim\": {\n        \"time_points\": [0, 10, 24, 44, 61, 71, 86, 102, 116, 129, 137, 150, 164, 178, 188, 201, 211, 226, 235, 251, 270, 288, 299, 313, 325, 336, 351, 368, 380, 398, 411, 424, 441, 451, 466, 484, 502, 511, 527, 536, 551, 564, 581, 595, 606, 615, 627, 644, 661, 670, 692, 701, 713, 726, 740, 750, 761, 778, 791, 809, 822, 839, 858, 870, 882, 895, 912, 925, 944, 956, 976, 992, 1003, 1015, 1026, 1042, 1061, 1079, 1098, 1117, 1134, 1147, 1164, 1179, 1196, 1212, 1223, 1235, 1247, 1263, 1278, 1294, 1313, 1331, 1346, 1359, 1373, 1385, 1396, 1411, 1429, 1446, 1460, 1479, 1496, 1508, 1516, 1532, 1544, 1553, 1567, 1578, 1594, 1605, 1617, 1631, 1644, 1661, 1686, 1696, 1710, 1723, 1738, 1754, 1766, 1778, 1790, 1803, 1811, 1827, 1840, 1851, 1860, 1876, 1885, 1900, 1909, 1925, 1935, 1949, 1962, 1971, 1987, 1998, 2011, 2021, 2035, 2045, 2060, 2068, 2082, 2096, 2109, 2121, 2133, 2145, 2158, 2167, 2179, 2194, 2207, 2215, 2227, 2244, 2253, 2264, 2276, 2293, 2306, 2314, 2330, 2341, 2351, 2364, 2379, 2390, 2400, 2411, 2428, 2439, 2453, 2464, 2478, 2495, 2513, 2526, 2544, 2557, 2575, 2593, 2606, 2624, 2634, 2646, 2660, 2671, 2685, 2697, 2710, 2721, 2734, 2746, 2755, 2772, 2785, 2801, 2814, 2826, 2839, 2858, 2876, 2893, 2903, 2916, 2927, 2942, 2951, 2968, 2981],\n        \"x\": [1, 1, 1, 1, 1, 1, 1, 0, 0, -1, 1, 2, 3, 5, 3, 1, 0, -1, 3, 3, 5, 5, 3, 3, 0, -1, -3, -1, -1, 0, -1, -1, -3, -4, -5, 0, 1, 0, 0, -1, -1, -1, 2, 1, -1, -1, -2, 0, 1, 5, 4, 1, 0, -2, -5, -6, -1, -3, 0, -1, -1, 0, 1, 3, 3, 1, 1, 2, -2, -2, 1, 1, -1, 0, -1, -1, -1, 1, 1, 2, -1, -4, -4, -5, -3, -1, 1, 3, 5, 5, 5, 2, 1, -1, -3, -3, 1, -1, -1, -1, -1, -4, -3, 1, 1, -1, -1, -1, 1, 1, 5, 3, 3, 1, -1, -1, -1, -3, -2, -1, -2, -1, 1, 1, 1, 3, 3, 2, 0, 1, 1, 1, -1, 1, 1, 0, -1, -2, -3, -3, -3, -1, -1, 0, -1, -1, 0, -1, 0, 1, 1, 0, 1, -1, -1, -3, -3, -1, -1, -1, 1, -1, 0, -2, -1, 2, 1, -1, -1, -3, -3, -2, -1, 1, 3, 3, 3, 0, 0, 1, 1, 1, 2, 0, -1, 0, 1, -1, 1, 1, 1, -1, 3, 1, -6, -8, -8, -3, -1, -1, 1, 2, 3, 5, 5, 0, 1, -2, -1, -2, 1, 1, -1, -3, -3, 5, -5, -3, -3],\n        \"y\": [6, 6, 6, 6, 7, 5, 5, -2, -1, -3, 1, 4, 6, 5, 4, 0, -2, -4, 0, 5, 6, 6, 2, 4, 1, 5, 7, 2, 3, 0, 0, 0, 4, 5, 7, 2, -3, -3, -3, 4, 7, 8, 2, 0, 1, 2, 2, 1, 0, -3, -2, 0, 0, 4, 7, 8, 4, 2, 1, -1, -1, -1, 2, 0, 0, 0, 0, 0, 6, 7, 4, 2, 3, 4, 4, 5, 5, 3, 0, 0, 6, 7, 7, 4, 2, -1, 0, 4, 6, 8, 4, -1, -2, 19, 6, -1, -2, -5, -4, -3, 4, 7, 7, 4, 4, 1, 2, 4, 6, 7, 3, 0, -3, -2, 0, 11, 6, 4, 0, -1, -1, 0, 4, 4, 6, 2, 2, -3, -2, -2, 1, 4, 6, 3, 2, 0, -1, -1, 2, 4, 4, 0, 0, -2, 0, 0, 6, 9, 9, 9, 4, -2, -1, -5, 0, 2, 6, 4, 4, -1, -1, -3, 0, 4, 6, 4, 3, 2, 0, -1, -1, 2, 4, 6, 3, 2, 0, -1, -1, 2, 5, 5, 4, -1, -2, -1, 4, 8, 6, 2, 0, 0, 18, -18, 7, -5, 4, 2, 4, 6, 11, 6, 6, -3, -5, -5, -1, 0, 6, 8, 5, 2, 2, 0, 0, 0, 4, 4, 1]\n      }\n    }\n  },\n  {\n    \"name\": \"R-301\",\n    \"type\": \"serial\",\n    \"recoils\": {\n      \"un_aim\": {\n        \"time_points\": [0, 6, 18, 25, 35, 45, 55, 67, 75, 87, 99, 110, 122, 129, 140, 149, 159, 171, 180, 189,\n          201, 209, 220, 233, 244, 259, 267, 276, 288, 300, 308, 320, 343, 355, 362, 374, 386,\n          398, 423, 453, 465, 477, 503, 514, 521, 532, 541, 557, 571, 582, 601, 620, 630, 653,\n          661, 695, 729, 739, 772, 785, 797, 806, 839, 882, 889, 901, 912, 926, 938, 949, 961,\n          969, 980, 988, 1010, 1022, 1036, 1048, 1059, 1072, 1080, 1090, 1102, 1113, 1121, 1134,\n          1146, 1157, 1169, 1182, 1192, 1195, 1206, 1219, 1232, 1241, 1250, 1259, 1269, 1279,\n          1288, 1299, 1305, 1317, 1329, 1337, 1347, 1356, 1366, 1378, 1386, 1395, 1407, 1416,\n          1426, 1435, 1442, 1452, 1464, 1470, 1483, 1494, 1506, 1517, 1526, 1538, 1564, 1574,\n          1586, 1593, 1604, 1622, 1636, 1648, 1660, 1672, 1685, 1696, 1704, 1715, 1727, 1739,\n          1751, 1759, 1770, 1776, 1789, 1799, 1806, 1819, 1826, 1838, 1845, 1854, 1862, 1875,\n          1888, 1899, 1914, 1924, 1935, 1944, 1958, 1968, 1978, 1990, 2003, 2011, 2021, 2034,\n          2041, 2052, 2066, 2078, 2087, 2096, 2103, 2110, 2120, 2132, 2140, 2150, 2159, 2169,\n          2191, 2200, 2211, 2224, 2236, 2248, 2257, 2266, 2275, 2285, 2292, 2303, 2315, 2322,\n          2330, 2340, 2348, 2359, 2371, 2384, 2396, 2403],\n        \"x\": [0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -2, -1, -1, -1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, 0,\n          0, 0, 0, 0, 0, 0, -1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1,\n          -1, -2, -2, -2, -1, -1, -2, 1, 0, 0, 0, 0, 0, 2, 1, 1, 1, 1, 1, 2, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1,\n          1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 2, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,\n          0, 0, 0, 0, 0, 0, -1, -1, 0, -1, -1, 0, -1, 0, 0, -1, -1, -1, -1, -1, -1, -2, -2, -1, -1, -2, -1,\n          -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n          -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, -1, -1, -1],\n        \"y\": [0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 4, 5, 5, 5, 6, 5, 5, 5, 4, 5, 5, 4, 4, 4, 6, 5, 5, 6, 6, 5, 5,\n          19, 8, 8, 7, 4, 3, 3, 3, 3, 3, 5, 4, 4, 5, 4, 8, 5, 3, 2, 1, 2, 4, 1, 1, 5, 5, -1, 0, 0, -1, 0, 5,\n          3, 3, 3, 18, 18, 9, 4, -1, -1, -3, 4, 3, 3, 0, -1, -1, 0, 1, 0, 1, 0, 1, 1, 2, 1, 1, 0, 0, 0, 0,\n          0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 1, 1, 0, 0, -1, 2, 1, 1, 0, 0, 0, 3, 3, 3, 2, 1, 0, 0, 0, 4, 4, 1,\n          -3, -3, 0, 0, 3, 0, -1, -1, 0, 3, 3, 1, 1, 1, 0, 2, 0, 0, 0, -1, -1, -1, 3, 5, 2, 1, 0, -1, -1,\n          -1, 5, 3, 2, 2, 2, 1, 4, 4, 3, 1, 1, -1, -1, 3, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n          -1, -1, -2, -3, -4, -4, -4, -5, -5, -5, -6, -5, -5, -6, -5, -6, -7, -7, -8]\n      },\n      \"aim\": {\n        \"time_points\": [0, 7, 18, 37, 43, 55, 67, 74, 86, 94, 105, 117, 172, 191, 202, 215, 234, 245, 257, 280,\n          291,\n          300, 312, 319, 333, 346, 357, 366, 374, 387, 399, 410, 419, 429, 440, 454, 461, 472,\n          483, 491,\n          503, 515, 523, 534, 546, 558, 570, 578, 588, 601, 613, 620, 632, 643, 655, 662, 674,\n          686, 694,\n          705, 718, 729, 742, 754, 766, 778, 786, 797, 809, 822, 834, 845, 854, 865, 873, 889,\n          900, 909,\n          919, 927, 938, 945, 956, 968, 976, 988, 1000, 1007, 1017, 1025, 1036, 1044, 1054, 1066,\n          1078,\n          1087, 1097, 1110, 1122, 1134, 1141, 1154, 1165, 1176, 1185, 1194, 1203, 1215, 1225,\n          1238, 1246,\n          1257, 1269, 1277, 1288, 1299, 1307, 1318, 1326, 1336, 1349, 1362, 1373, 1385, 1404,\n          1411, 1422,\n          1434, 1441, 1452, 1460, 1472, 1483, 1495, 1503, 1514, 1533, 1541, 1550, 1562, 1570,\n          1580, 1592,\n          1606, 1613, 1624, 1633, 1642, 1653, 1661, 1672, 1681, 1692, 1704, 1712, 1722, 1734,\n          1762, 1772,\n          1779, 1789, 1797, 1807, 1857, 1887, 1918, 1925, 1936, 1944, 1954, 1982, 1992, 2004,\n          2012, 2022,\n          2034, 2042, 2052, 2060, 2071, 2079, 2087, 2098, 2109, 2122, 2134, 2145, 2157, 2169,\n          2178, 2188,\n          2201, 2213, 2225, 2237, 2250, 2262, 2272, 2280, 2292, 2300, 2310],\n        \"x\": [0, 0, 0, -1, -1, -1, -1, -1, -1, -1, 0, 0, 1, -1, -1, -2, -2, -2, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0,\n          0, 0, 0,\n          0, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 1, 1, -2, -2, -2, -2, -2, -2, -2, -1, -2, -2, -2, 0, -1,\n          -2, -1,\n          -2, -2, -2, -2, -1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 2, 3, 4, 4, 3, 2, 1, 0, 1, 1, 1, 1, 2, 2, 1,\n          2, 1, 1,\n          1, 0, 0, 0, 0, 2, 2, 3, 3, 3, 3, 3, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -2, -1, -1, 0,\n          -1, 0,\n          -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -2, -2, -2, -1, -1, -2, -2, -2, -2, -1,\n          -1, -1,\n          -1, -1, -2, -1, -2, -2, -2, -2, -2, -2, -2, 1, 1, 2, 2, 2, 1, 1, -1, -1, 0, 0, 1, 1, -2, -1, -2,\n          -2, -2,\n          0, 4, 2, 1, 1, -1, -1, -2, -1, -1, -1, -1, -1, -1, -1, 0, 0, 1, 1, 0, 0],\n        \"y\": [-1, -1, -1, 2, 5, 6, 7, 4, 4, 3, 3, 3, 2, 6, 6, 8, 4, 4, 4, 4, 3, 2, 2, 2, 2, 5, 4, 3, 2, 1, 2, 1,\n          1, 1,\n          1, 1, 1, 2, 2, 2, 2, 2, 1, 0, 0, 0, -1, 0, 0, -1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1,\n          1, 1, 1,\n          1, 2, 5, 5, 4, 3, 2, 1, 1, 1, 2, 1, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, -1,\n          -1, -1,\n          -1, -1, -1, -1, -1, -1, 1, 1, 0, 0, 0, 1, 3, 4, 3, 3, 2, 2, 2, 3, 2, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1,\n          1, 2,\n          1, 1, 0, 0, -1, 0, -1, -2, -1, -1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, -2, 0, -1, -1, -1, -1,\n          3, 2, 2,\n          1, 1, 0, 0, 0, 0, -1, -1, -1, -1, -2, -2, -2, -1, -1, 0, 2, 1, 2, 3, 1, -2, -4, -6, -7, -7, -7,\n          -5, -5,\n          -5, -6, -6, -7, -8, -9, -9]\n      }\n    }\n  },\n  {\n    \"name\": \"电能\",\n    \"type\": \"serial\",\n    \"recoils\": {\n      \"un_aim\": {\n        \"time_points\": [31, 38, 48, 61, 73, 81, 91, 102, 112, 119, 133, 146, 161, 173, 185, 197, 210, 221, 232,\n          242, 252, 265, 277, 288, 296, 307, 315, 326, 337, 346, 356, 367, 372, 381, 394, 405,\n          413, 424, 432, 442, 450, 461, 485, 493, 503, 515, 523, 535, 547, 557, 565, 575, 585,\n          595, 608, 618, 627, 638, 647, 657, 668, 682, 693, 706, 719, 730, 742, 754, 765, 773,\n          783, 792, 803, 816, 826, 833, 845, 853, 865, 877, 885, 896, 903, 913, 921, 932, 944,\n          952, 963, 971, 981, 989, 1000, 1012, 1024, 1032, 1043, 1054, 1062, 1070, 1080, 1092,\n          1103, 1112, 1119, 1130, 1142, 1153, 1165, 1172, 1185, 1196, 1204, 1214, 1222, 1233,\n          1241, 1248, 1263, 1269, 1283, 1295, 1306, 1318, 1326, 1337, 1348, 1355, 1368, 1375,\n          1387, 1398, 1410, 1418, 1429, 1441, 1449, 1460, 1472, 1484, 1496, 1504, 1515, 1527,\n          1535, 1546, 1559, 1569, 1576, 1588, 1598, 1606, 1613, 1625, 1632, 1644, 1655, 1667,\n          1680, 1691, 1698, 1710, 1718, 1729, 1740, 1748, 1760, 1772, 1783, 1795, 1803, 1814,\n          1822, 1833, 1845, 1856, 1864, 1876, 1887, 1896, 1906, 1914, 1920, 1931, 1943, 1955,\n          1969, 1980, 1988, 1998, 2016, 2023, 2036, 2047, 2060, 2072, 2083, 2092, 2099, 2109,\n          2117, 2127, 2135, 2147, 2158, 2169, 2182, 2190, 2200, 2212, 2220, 2231, 2239, 2250,\n          2258, 2268, 2280, 2288, 2299, 2311, 2322, 2335, 2348, 2360, 2368, 2378, 2385, 2397,\n          2408, 2416, 2427, 2435, 2446, 2454, 2463, 2476],\n        \"x\": [-2, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1,\n          -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1,\n          -1, -1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2,\n          2, 2, 1, 2, 2, 2, 3, 2, 2, 2, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,\n          0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -2, -1, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n          -1, -1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0,\n          0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, -1, -1, -1, -1, -1, -1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 2, 2, 3, 2,\n          2, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, -1, -1, -2, -2, -3, -3, -4, -4, -4, -4, -4, -3, -3, -3,\n          -2, -2, -2, -2],\n        \"y\": [1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 4, 5, 5, 5, 3, 2, 4, 4, 4, 4, 4, 4, 4, 4, 5, 6, 5, 5, 5, 4, 3, 3, 4,\n          5, 5, 5, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 3, 3, 4, 4, 4, 4, 4, 3, 3, 3, 4, 5, 5,\n          4, 3, 3, 3, 4, 4, 4, 3, 3, 3, 3, 2, 2, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n          1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,\n          1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,\n          1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1,\n          1, 1, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -2, -2, -2,\n          -2, -2, -2, -2, -2, -2, -2, -2]\n      },\n      \"aim\": {\n        \"time_points\": [0, 12, 30, 44, 61, 69, 85, 99, 116, 134, 145, 159, 173, 187, 198, 216, 233, 248, 263, 282, 294, 314, 332, 349, 364, 381, 399, 417, 430, 447, 465, 478, 497, 516, 534, 550, 566, 583, 598, 615, 628, 645, 664, 681, 700, 718, 734, 750, 767, 783, 800, 817, 835, 847, 862, 878, 890, 905, 917, 934, 952, 970, 988, 1003, 1018, 1031, 1046, 1060, 1075, 1092, 1104, 1117, 1129, 1138, 1150, 1166, 1179, 1197, 1217, 1234, 1246, 1265, 1283, 1292, 1303, 1319, 1337, 1350, 1365, 1382, 1399, 1411, 1430, 1438, 1453, 1465, 1479, 1492, 1511, 1527, 1540, 1571, 1614, 1629, 1641, 1657, 1676, 1694, 1713, 1730, 1749, 1765, 1776, 1792, 1811, 1819, 1833, 1843, 1857, 1872, 1890, 1910, 1928, 1943, 1955, 1967, 1981, 1994, 2008, 2020, 2037, 2048, 2068, 2080, 2097, 2108],\n        \"x\": [-1, -1, -3, -4, -3, -3, -1, 1, 2, 1, 0, 0, -1, 1, 1, 1, 1, 0, -1, -5, -5, -3, -1, 1, 1, 1, 1, 1, -1, -6, -6, -3, -1, 1, -1, -1, -2, -1, 1, 1, 2, 3, 2, 1, -3, -5, -3, -1, 1, 1, 1, -1, 0, -1, 4, 5, 6, 2, 1, 1, 3, 3, 3, 1, 2, 4, 3, 2, 2, -1, -1, 1, 2, 3, 3, 1, 1, -3, -5, -4, -3, -1, -2, -4, -3, -3, 1, 1, -1, -3, -2, -1, 1, 1, 0, 0, -1, -1, -1, 0, 1, 3, 3, 5, 3, 5, 0, -1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1, -1, -2, -2, -3, -2, 2, 3, 3, 3, 0, -1, -1, 3],\n        \"y\": [-2, -3, 4, 7, 7, 16, 7, -3, -1, 2, 2, 2, 1, 0, 7, 10, 7, 4, 2, 5, 6, 5, 2, 0, 7, 10, 7, 4, 2, 5, 5, 4, 2, 0, 7, 9, 7, 5, 0, 2, 7, 9, 5, 3, 5, 5, 5, 2, 1, 5, 6, 5, 3, 2, 3, 2, 3, 2, 0, 0, -1, 0, 1, 1, 0, 1, 3, 2, 3, 1, 0, 2, 3, 4, 2, 1, 0, 2, 2, 2, 2, 0, -2, -2, -1, 0, 0, 0, -1, 0, 0, 2, 0, -2, 2, 2, 4, 3, 2, 0, 0, -1, 1, 0, 0, 0, 0, -1, 1, 2, 2, 0, 0, -1, 0, 0, 0, 0, 0, 2, 2, 1, 0, 2, 2, 3, 2, 2, 0, 0, 0, 1, 0, 0, 1, 0]\n      }\n    }\n  },\n  {\n    \"name\": \"平行步枪\",\n    \"type\": \"serial\",\n    \"recoils\": {\n      \"un_aim\": {\n        \"time_points\": [42, 53, 61, 73, 80, 90, 100, 109, 118, 128, 140, 153, 160, 171, 185, 195, 203, 214, 223,\n          233, 244, 256, 270, 280, 288, 297, 305, 318, 326, 342, 356, 368, 379, 392, 405, 419,\n          428, 441, 453, 468, 478, 490, 501, 508, 520, 527, 539, 558, 581, 589, 600, 612, 618,\n          630, 642, 651, 661, 673, 682, 693, 704, 712, 722, 735, 743, 754, 762, 772, 780, 790,\n          802, 809, 821, 833, 841, 857, 868, 876, 887, 900, 908, 918, 927, 936, 955, 967, 975,\n          986, 998, 1010, 1018, 1028, 1040, 1052, 1059, 1071, 1084, 1096, 1105, 1115, 1124, 1135,\n          1145, 1157, 1169, 1177, 1188, 1200, 1212, 1223, 1231, 1243, 1255, 1265, 1275, 1286,\n          1294, 1304, 1317, 1329, 1337, 1347, 1359, 1367, 1376, 1385, 1392, 1403, 1410, 1421,\n          1432, 1441, 1452, 1464, 1475, 1488, 1499, 1512, 1521, 1530, 1538, 1549, 1560, 1568,\n          1580, 1593, 1604, 1617, 1628, 1640, 1648, 1660, 1671, 1685, 1696, 1703, 1714, 1726,\n          1739, 1751, 1763, 1775, 1786, 1794, 1806, 1815, 1826, 1837, 1849, 1860, 1869, 1881,\n          1891, 1900, 1907, 1917, 1929, 1941, 1954, 1967, 1977, 1989, 1997, 2008, 2020, 2033,\n          2040, 2052, 2063, 2075, 2086, 2095, 2106, 2118, 2124, 2135, 2144, 2155, 2167, 2175,\n          2186, 2198, 2206, 2217, 2228, 2236, 2247, 2259, 2267, 2278, 2290, 2303, 2315, 2326,\n          2339, 2347, 2357, 2371, 2383, 2394, 2407, 2418, 2425, 2438, 2450, 2462, 2474, 2486,\n          2498, 2511, 2523, 2536, 2548, 2566, 2575, 2585, 2596, 2608, 2616, 2627, 2645, 2657,\n          2670, 2682, 2689, 2700, 2712, 2720, 2732, 2743, 2751, 2761, 2774, 2786, 2794, 2805,\n          2816, 2831, 2865, 2875, 2884, 2897, 2908, 2921, 2934, 2957, 2970, 2977, 2988, 3001,\n          3008, 3020, 3031, 3038, 3051, 3062, 3070, 3080, 3093, 3099, 3113, 3123, 3130, 3142,\n          3155, 3168, 3180, 3191, 3231, 3240, 3260, 3271, 3284],\n        \"x\": [0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, -1, -1, -1, -1, -1, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3,\n          2, 2, 2, 2, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, -1, -1,\n          -1, -3, -4, -5, -5, -4, -3, -2, -2, -1, 0, 0, 1, 1, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n          -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1,\n          1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 2, 2, 3, 3, 2, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,\n          -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,\n          1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -2, -2, -1, -1, -2, -2, -3, -4, -4, -4, -3, -2, -2,\n          -2, -2, -1, -2, -1, -1, -1, -1, -1, -1, -2, -2, -2, -2, -2, -2, -1, -1, 0, 0, -1, -1, -1, -1, -1,\n          -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -24, -24, 0, 4, 8],\n        \"y\": [1, 2, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 2, 2, 2, 2, 1, 4, 6, 4, 2,\n          3, 2, 1, 1, 2, 4, 5, 3, 2, 2, 2, 2, 1, 1, 4, 4, 3, 3, 3, 2, 2, 3, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0,\n          0, 0, 0, 0, 0, 0, -1, -1, 3, 2, 0, -1, -1, -1, -1, -1, -1, 11, 3, 2, -1, -1, -1, -2, -2, -2, -1,\n          0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 2, 2, 1, 1, 1, 0, 0, 0, 0, 2, 1, 0, 0, 0,\n          -1, -1, -1, 0, 0, 0, 1, 3, 2, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 2, 3, 4, 2, 2, 1, 1, 1,\n          1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n          0, -1, -1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n          1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 6, 1, 1, 1, 0, 0, 0, 10, 4, 0, -1, -2, -3, -2, -2, -2, 0, 0,\n          2, 0, 0, 0, 0, 0, 0, 3, 1, 2, 1, 1, 1, 1, 7, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, -1, -2,\n          -2, -4, -4, -5, -7, 10, 10, -12, -13, -16]\n      },\n      \"aim\": {\n        \"time_points\": [1, 13, 25, 43, 61, 74, 104, 121, 140, 152, 166, 182, 200, 219, 238, 250, 268, 286, 303,\n          323,\n          336, 352, 370, 384, 401, 414, 422, 442, 461, 474, 493, 506, 522, 536, 547, 564, 574,\n          587, 602,\n          621, 639, 651, 663, 676, 694, 701, 730, 746, 760, 772, 789, 798, 816, 833, 851, 868,\n          881, 894,\n          912, 919, 936, 950, 961, 973, 985, 998, 1033, 1046, 1063, 1070, 1090, 1143, 1155, 1167,\n          1179,\n          1190, 1204, 1221, 1233, 1247, 1269, 1278, 1294, 1337, 1374, 1391, 1399, 1415, 1428,\n          1439, 1452,\n          1470, 1478, 1493, 1502, 1519, 1526, 1543, 1560, 1573, 1582, 1598, 1611, 1623, 1640,\n          1653, 1660,\n          1682, 1694, 1703, 1719, 1733, 1749, 1762, 1774, 1791, 1810, 1828, 1835, 1848, 1866,\n          1877, 1890,\n          1901, 1914, 1930, 1944, 1957, 1974, 1998, 2006, 2022, 2041, 2066, 2079, 2121, 2151,\n          2169, 2180,\n          2190, 2205, 2217, 2230, 2247, 2261, 2282, 2291, 2307, 2393, 2405, 2413, 2429, 2442,\n          2454, 2466,\n          2483, 2496, 2557, 2570, 2586, 2599, 2611, 2624, 2641, 2659, 2672, 2684, 2698, 2705,\n          2720, 2733,\n          2750, 2763, 2776, 2787, 2796, 2811, 2825, 2837, 2849, 2866, 2875, 2895, 2909, 2920,\n          2934, 2945,\n          2957, 2969, 2987, 3001, 3012, 3023, 3038, 3055, 3066, 3078],\n        \"x\": [-1, -1, 1, 3, 4, 3, 1, 0, 0, 0, -2, 0, 0, 1, 2, 7, 8, 8, 6, 0, 1, -1, 1, 1, 2, 1, 1, 2, -1, 0, 0,\n          -1, -1,\n          -1, 0, 0, 0, 0, 0, 0, -3, -4, -4, -4, -2, 0, 0, -1, -4, -3, -4, -1, 1, 0, 1, 0, -1, -1, 0, 0, 0,\n          -3, -3,\n          -4, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 1, 4, 7, 6, -1, 2, 1, 3, 2, 2, 0, 0, 1, 2, 4, 2, 3,\n          0, -1,\n          -2, -2, 0, 1, 1, 1, 0, 0, -1, -1, -1, -1, 0, 0, 1, 1, 2, 2, 2, 1, -1, -1, 0, 0, 3, 3, 2, 1, -1, 0,\n          2, 4,\n          6, 3, -3, -1, -1, 2, 2, 0, 1, 2, 2, 1, 0, 0, 0, -2, -4, -5, -2, -3, -1, 0, -1, 0, -2, -4, -6, -5,\n          -2, 0,\n          -1, -3, -3, -3, -1, 0, -2, -3, -4, -2, 1, 0, 0, -1, -1, -1, -2, -1, -1, 0, -1, -4, -4, -3, -1, 2,\n          2, 1,\n          -1, -1, -1, -1, 0, 1, 1, -3, -4, 2, -3],\n        \"y\": [2, 2, 11, 15, 16, 8, -1, -4, -3, -1, 1, 3, 2, 0, 3, 5, 6, 5, 3, -1, 4, 4, 5, 4, 3, -2, 3, 4, 5, 5,\n          4, 0,\n          -1, 3, 5, 7, 3, 4, 4, -2, -3, -3, -3, -1, 0, 0, -1, 0, -1, 0, 0, -1, -1, -1, 0, 1, 1, 0, 1, 0, 1,\n          3, 3, 3,\n          2, 0, 3, 5, 5, 0, 3, 1, 1, 0, 0, 0, -1, 0, 2, 3, 3, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, -1,\n          0, 0, 0,\n          1, 1, 1, 0, 0, -1, 3, 4, 5, 5, 0, 0, -1, 0, 2, 3, 3, 3, 1, -3, -1, 0, 2, 3, 3, 2, 0, -1, -1, -1,\n          0, 0, 0,\n          0, 0, 2, 2, -1, 3, 3, 1, 1, 0, -1, -1, 0, 4, 4, 2, 3, 0, 0, 0, 0, 2, 3, 4, 3, 1, 0, -1, -1, 0, 0,\n          0, 0,\n          -1, -1, -1, -2, 0, -1, 1, 2, 2, 2, 1, 0, -1, -1, 2, 5, 6, 1, 2, -1, -1, 0, 4, 3, 5, 3, 1, -1, -3,\n          -5, -1,\n          0, 0]\n      }\n    }\n  }\n, {\n  \"name\": \"R99\",\n  \"type\": \"serial\",\n  \"recoils\": {\n    \"un_aim\": {\n      \"time_points\": [0, 9, 26, 37, 46, 60, 74, 87, 99, 111, 123, 143, 154, 170, 185, 193, 206, 221, 234, 242, 258, 271, 290, 308, 320, 329, 344, 357, 366, 380, 394, 412, 431, 449, 464, 480, 492, 505, 516, 535, 553, 562, 577, 590, 601, 612, 627, 639, 657, 677, 694, 704, 719, 737, 755, 767, 776, 788, 804, 814, 824, 838, 852, 866, 883, 893, 906, 918, 929, 946, 958, 966, 983, 1001, 1015, 1027, 1044, 1063, 1080, 1093, 1105, 1114, 1129, 1139, 1154, 1162, 1175, 1190, 1203, 1211, 1224, 1240, 1258, 1267, 1279, 1295, 1308, 1322, 1338, 1347, 1361, 1374, 1387, 1396, 1408, 1424, 1436, 1449, 1466, 1485, 1493, 1506],\n      \"x\": [-1, -1, -1, -2, -2, -1, -1, -1, -1, 0, 0, -1, 1, 1, 1, 3, 1, 2, 0, -2, -3, -4, -6, -6, -3, -3, -2, -4, -2, -3, -3, -5, -5, -3, -3, -4, -2, -3, -3, 3, 5, 5, 6, 5, 2, 2, -2, -6, 3, 3, 6, 3, 1, -3, -1, -4, -3, -3, -3, -3, -2, -3, -1, -2, 2, 1, 3, -3, -3, -3, -4, -2, 1, 3, 3, 5, 10, 8, 6, 5, 8, 6, 3, 10, 0, 1, -1, -1, 1, 1, 2, 3, 1, -1, -1, -1, -2, -3, -6, -6, -5, -5, -3, -3, -1, -3, -2, -3, -3, -3, -1, -1],\n      \"y\": [3, 3, 3, 4, 5, 5, 5, 6, 8, 8, 6, 5, 5, 5, 5, 5, 10, 14, 15, 12, 10, 14, 12, 8, 12, 18, 19, 12, 12, 11, 10, 6, 6, 7, 7, 6, 15, 15, 17, 8, 8, 7, 7, 6, 7, 6, 6, 5, 6, 9, 6, 6, 13, 15, 9, 5, 5, 5, 1, 1, 1, 1, 3, 2, 1, 3, 1, 0, 1, 1, 3, 3, 3, 8, 7, 6, 4, 2, 1, 1, 3, 3, 3, 2, 3, 3, 3, 3, 4, 5, 9, 10, 3, -4, -4, -7, -6, 3, 6, 6, 5, 1, -3, -6, -6, -6, -6, -4, 2, 2, 1, 1]\n    },\n    \"aim\": {\n      \"time_points\": [0, 12, 27, 38, 54, 63, 80, 97, 109, 120, 134, 148, 164, 174, 189, 201, 210, 222, 238, 250, 262, 270, 284, 300, 312, 323, 337, 346, 361, 370, 383, 395, 407, 418, 434, 443, 454, 469, 479, 510, 538, 547, 560, 575, 590, 607, 621, 633, 649, 661, 670, 711, 722, 731, 744, 759, 768, 782, 809, 817, 833, 847, 864, 894, 909, 921, 937, 951, 968, 989, 1005, 1017, 1048, 1057, 1069, 1084, 1109, 1125, 1136, 1148, 1161, 1173, 1188, 1201, 1220, 1237, 1249, 1262, 1277, 1289, 1384, 1397, 1409, 1433, 1445, 1458, 1470, 1483],\n      \"x\": [0, 0, -1, -1, -1, -1, -1, 1, 0, 1, 1, 3, 1, 1, 1, -1, -2, -1, -1, -2, -3, -1, -3, -1, -4, -4, -3, 0, -3, -4, -3, -3, 1, -4, -2, -3, 1, 1, 1, 1, 2, 2, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, -1, 0, -1, -1, -5, -6, -6, -3, 1, 1, -3, -3, -5, -3, 1, 4, 3, 3, 3, 3, 3, 3, 1, 1, 3, 3, 4, 2, 1, 5, 5, 3, -1, -1, -3, -3, -12, -12, -12, -3, 1, 1, 1, 0],\n      \"y\": [-3, -3, 1, 5, 5, 4, 3, 5, 5, 4, 4, 2, 0, -1, 2, 7, 8, 9, 4, 7, 12, 16, 12, 7, 11, 11, 7, 3, 2, 4, 5, 4, 2, 4, 7, 5, 4, 2, 5, 4, 10, 11, 9, 5, 6, 7, 4, 4, 10, 9, 8, 6, 6, 6, 7, 9, 7, 4, -3, -5, -5, -5, 2, 4, 3, 2, 2, 2, 2, 3, 2, 3, -2, -2, -3, -1, 0, 1, 4, 4, 4, 2, 0, 2, 2, 2, 2, 4, 3, 2, -2, -2, -2, 0, 2, 2, -5, -7]\n    }\n  }\n},\n  {\n    \"name\": \"car\",\n    \"type\": \"serial\",\n    \"recoils\": {\n      \"un_aim\": {\n        \"time_points\": [0, 16, 29, 47, 65, 80, 96, 113, 127, 143, 156, 170, 187, 199, 218, 237, 249, 267, 284,\n          298, 304, 321, 338, 348, 364, 376, 388, 400, 416, 434, 452, 466, 478, 489, 503, 520,\n          538, 550, 568, 581, 589, 606, 623, 642, 655, 667, 679, 696, 709, 716, 738, 746, 763,\n          776, 794, 806, 818, 831, 843, 854, 872, 891, 903, 921, 939, 951, 965, 981, 994, 1007,\n          1024, 1036, 1049, 1061, 1069, 1091, 1104, 1116, 1133, 1146, 1163, 1183, 1199, 1214,\n          1230, 1242, 1255, 1274, 1292, 1315, 1339, 1354, 1371, 1390, 1403, 1419, 1433, 1452,\n          1468, 1481, 1498, 1516, 1535, 1553, 1571, 1589, 1602, 1619, 1639, 1655, 1669, 1687,\n          1701, 1718, 1736, 1748, 1764, 1774, 1797, 1814, 1830, 1850, 1869, 1882, 1893, 1905,\n          1919],\n        \"x\": [2, 2, 7, -11, -3, 1, 1, 3, 3, 3, 2, 1, 0, -1, -1, 1, 2, 3, 1, 2, 1, 2, -1, 1, 0, 1, 1, 1, 2, 2, 2,\n          1, 2, 1, 0, 0, -2, -3, -3, -3, -3, -3, 0, 0, 1, 1, -2, -1, -3, -3, -3, -3, -3, -3, -3, -4, -5, -5,\n          -5, -4, -3, -1, 1, 1, 0, 1, 2, 2, 2, 4, 4, 2, 2, 3, 3, 3, 1, 1, 0, -1, -2, -2, -3, -3, -3, -2, -3,\n          -2, -2, -2, -2, -4, -5, -5, -4, -4, -3, -2, 0, 1, -1, 0, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 0, 0,\n          0, 0, 0, 1, 2, 1, 2, 2, 2, 1, 0],\n        \"y\": [-2, -2, 1, 4, 6, 5, 8, 7, 8, 8, 6, 7, 4, 5, 4, 6, 8, 9, 7, 10, 11, 11, 9, 8, 7, 8, 6, 6, 6, 6, 4,\n          4, 5, 6, 7, 6, 4, 5, 6, 6, 6, 4, 6, 7, 7, 7, 6, 6, 4, 4, 3, 0, 0, -1, -2, -1, -1, 0, 1, 1, 2, 2,\n          3, 3, 2, 3, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 1, 2, 2, 3, 3, 1, 1, 1, 0, -2, -2, -2,\n          -2, -1, -1, 1, 1, 2, 3, 2, 2, 3, 2, 2, 2, 3, 3, 1, 2, 3, 3, 2, 1, 1, 0, 0, 0, -1, -2, -2, -4, -5,\n          -6, -8, -8, -8]\n      },\n      \"aim\": {\n        \"time_points\": [1, 11, 20, 30, 42, 49, 60, 69, 79, 88, 109, 118, 128, 140, 148, 158, 170, 177, 189, 198,\n          209, 221, 233, 244, 253, 263, 274, 285, 293, 302, 311, 323, 336, 349, 361, 372, 385,\n          392, 403, 416, 428, 439, 453, 461, 468, 478, 489, 501, 510, 520, 531, 539, 550, 558,\n          569, 580, 589, 600, 610, 618, 630, 643, 655, 667, 679, 686, 698, 709, 722, 728, 740,\n          752, 759, 771, 783, 794, 801, 813, 821, 833, 844, 857, 866, 882, 893, 905, 918, 931,\n          943, 956, 968, 980, 992, 1004, 1017, 1028, 1041, 1053, 1066, 1078, 1089, 1102, 1111,\n          1121, 1133, 1145, 1157, 1169, 1182, 1194, 1206, 1220, 1233, 1243, 1255, 1268, 1281,\n          1292, 1304, 1316, 1329, 1338, 1348, 1360, 1372, 1384, 1396, 1405, 1416, 1428, 1440,\n          1451, 1464, 1476, 1487, 1506, 1531, 1543, 1555, 1562, 1574, 1594, 1605, 1618, 1622,\n          1636, 1643, 1654, 1666, 1674, 1685, 1692, 1704, 1715, 1725, 1734, 1746, 1754, 1764,\n          1776, 1784, 1795, 1807, 1819, 1831, 1839, 1851, 1862, 1871, 1881],\n        \"x\": [0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 2, 1, 1, 2, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 2, 2, 1, 1, 0, 0, 0, 0, 0,\n          1, 2, 3, 3, 2, 2, 3, 2, 1, 0, 0, 0, -1, -1, -1, -1, -1, -1, -3, -3, -4, -4, -3, -2, -2, -1, 0, 1,\n          1, -1, -2, -3, -3, -3, -3, -3, -2, -2, -2, -1, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0, -1, -1, 1, 2, 3, 2,\n          2, 2, 3, 3, 3, 2, 1, 2, 3, 3, 2, 2, -2, -3, -3, -4, -3, -4, -5, -4, -4, -2, -2, 0, 0, -1, -1, -3,\n          -3, -3, -2, -2, -1, -2, -2, -2, -2, -1, -2, -2, -2, -1, -1, 0, 2, 3, 4, 2, 2, 2, 2, 1, -1, -1, -1,\n          -1, -1, 0, 0, 0, 1, 1, 1, 6, 6, 5, 4, 4, 1, -1, -1, -2, -3, -2, -1, 0, 1, 2, 2, 2, 2],\n        \"y\": [-1, -1, -1, 0, 3, 3, 4, 4, 3, 3, 5, 5, 5, 5, 3, 4, 5, 4, 4, 3, 2, 1, 4, 5, 6, 7, 5, 5, 4, 5, 3, 2,\n          2, 2, 5, 6, 6, 5, 5, 6, 7, 5, 3, 2, 2, 2, 3, 4, 4, 4, 2, 5, 5, 5, 5, 3, 2, 3, 5, 6, 5, 4, 2, 2, 4,\n          3, 4, 2, 1, -1, -2, -2, -2, -2, -1, -1, 0, 0, 0, 0, 1, 2, 2, 2, 2, 2, 3, 3, 3, 2, 2, 1, 0, -1, -1,\n          -2, 0, 1, 1, 2, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 1, -1, -1, -1, 0, -1, -1, -2, -2, -1, -1, -1, 1,\n          1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 3, 2, 2, 2, 2, 2, 2, 3, 3, 12, 8, 2, 2, -1, -2, -2, -3, 0, 1, 1,\n          2, 2, 0, 0, 0, -2, -3, -4, -5, -5, -5, -5, -5, -5, -5]\n      }\n    }\n  }\n]\n"
  },
  {
    "path": "core/Config.py",
    "content": "import json\nimport os\nimport os.path as op\nimport shutil\n\nimport jsonpath as jsonpath\n\nfrom log import LogFactory\nfrom tools.Tools import Tools\n\nscreenshot_resolution = {\n    (1920, 1080): (1542, 959, 1695, 996),\n    (2560, 1440): (2093, 1281, 2275, 1332),\n    # (2560, 1440): (1905, 1092, 2087, 1143),\n    (3440, 1440): (2093, 1281, 2275, 1332),\n    (1920, 1200): (1539, 1142, 1728, 1142),\n    (2048, 1152): (1927, 1172, 2089, 1208),\n\n    (1680, 1050): (1350, 944, 1503, 979),\n    (2560, 1600): (2076, 1441, 2276, 1490),\n    (3840, 2160): (3113, 1920, 3429, 1987),\n    (3440, 1440): (2952, 1285, 3173, 1329)\n}\n\nscope_screenshot_resolution = {\n    (2560, 1440): [(2034, 1338, 2059, 1363), (2069, 1338, 2094, 1363), (2106, 1338, 2131, 1363)],\n    (1920, 1080): [(1522, 1002, 1542, 1022), (1551, 1002, 1571, 1022), (1579, 1002, 1599, 1022)],\n    (2048, 1152): [(1880, 1213, 1901, 1234), (1910, 1213, 1931, 1234), (1940, 1213, 1961, 1234)],\n\n    (1680, 1050): [(1333, 982, 1350, 999), (1357, 982, 1374, 999), (1382, 982, 1399, 999)],\n    (2560, 1600): [(2031, 1495, 2056, 1520), (2069, 1495, 2094, 1520), (2106, 1495, 2131, 1520)],\n    (3840, 2160): [(3045, 2003, 3084, 2042), (3101, 2003, 3140, 2042), (3157, 2003, 3196, 2042)],\n    (3440, 1440): [(2910, 1335, 2937, 1362), (2948, 1335, 2975, 1362), (2985, 1335, 3012, 1362)]\n}\nhop_up_screenshot_resolution = {\n    (2560, 1440): [(2142, 1338, 2167, 1363), (2180, 1338, 2205, 1363)],\n    (1920, 1080): [(1607, 1002, 1627, 1022), (1635, 1002, 1655, 1022)],\n    (2048, 1152): [(1970, 1213, 1991, 1234), (2000, 1213, 2021, 1234)],\n\n    (1680, 1050): [(1406, 982, 1423, 999), (1430, 982, 1447, 999)],\n    (2560, 1600): [(2144, 1495, 2169, 1520), (2181, 1495, 2206, 1520)],\n    (3840, 2160): [(3213, 2003, 3252, 2042), (3269, 2003, 3308, 2042)],\n    (3440, 1440): [(3022, 1335, 3049, 1362), (3059, 1335, 3086, 1362)]\n}\n\n\nclass Config:\n    \"\"\"\n        全局配置\n    \"\"\"\n\n    def __init__(self, base_path='config\\\\',\n                 ref_dir='ref\\\\',\n                 use_ref_name='ref.txt',\n                 default_ref_config_name='global_config'):\n\n        self.base_path = None\n        self.ref_dir = None\n        self.ref_config_name = None\n        self.use_ref_name = None\n        self.config_path = None\n        self.config_data = None\n\n        self.desktop_width = None\n        self.desktop_height = None\n        self.game_width = None\n        self.game_height = None\n        self.refresh_buttons = []\n        self.mouse_mover = None\n        self.rea_snow_mouse_mover = None\n        self.server_mouse_mover = None\n        self.log_model = None\n        self.game_solution = None\n        self.mouse_mover_params = None\n        self.select_gun_bbox = None\n        self.licking_state_bbox = None\n        self.select_scope_bbox = None\n        self.select_hop_up_bbox = None\n        self.image_path = None\n        self.scope_path = None\n        self.hop_up_path = None\n        self.licking_state_path = None\n        self.shake_gun_toggle = None\n        self.shake_gun_toggle_button = None\n        self.shake_gun_trigger_button = None\n        self.has_turbocharger = None\n        self.comparator_mode = None\n        # self.net_images_path = None\n        # self.local_images_path = None\n        self.read_image_mode = None\n        self.image_base_path = None\n        self.key_trigger_mode = None\n\n        self.delayed_activation_key_list = None\n        self.zen_toggle_key = None\n        self.mouse_c1_to_key = None\n        self.joy_to_key_map = None\n        self.toggle_key = None\n        self.toggle_hold_key = None\n        self.distributed_param = None\n        self.screen_taker = None\n        self.rea_snow_gun_config_name = None\n        self.s1_switch_hold_map = None\n\n        self.delay_refresh_buttons = None\n        self.cap_param = {}\n\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.update(base_path, ref_dir, use_ref_name, default_ref_config_name)\n\n    def update(self,\n               base_path='config\\\\',\n               ref_dir='ref\\\\',\n               use_ref_name='ref.txt',\n               default_ref_config_name='global_config'):\n        \"\"\"\n            重新做一次初始化操作，复用init\n        :param base_path:\n        :param ref_dir:\n        :param use_ref_name:\n        :param default_ref_config_name:\n        \"\"\"\n        self.base_path = base_path\n        self.ref_dir = self.base_path + ref_dir\n        self.ref_config_name = default_ref_config_name\n        self.use_ref_name = use_ref_name\n        self.config_data = self.read_config()\n        self.init()\n\n    def init(self):\n        \"\"\"\n            配置初始化\n        \"\"\"\n\n        x, y = Tools.get_resolution()\n        # 分辨率\n        self.desktop_width = self.get_config(self.config_data, 'desktop_width', x)\n        self.desktop_height = self.get_config(self.config_data, 'desktop_height', y)\n        self.logger.print_log(f\"识别到桌面分辨率为:{self.desktop_width}x{self.desktop_height}\")\n\n        self.game_width = self.get_config(self.config_data, 'screen_width', self.desktop_width)\n        self.game_height = self.get_config(self.config_data, 'screen_height',\n                                           self.desktop_height)\n\n        self.game_solution = (self.game_width, self.game_height)\n        if self.game_solution in screenshot_resolution:\n            self.select_gun_bbox = screenshot_resolution[\n                self.game_solution]  # 选择枪械的区域\n        else:\n            self.select_gun_bbox = screenshot_resolution[(1920, 1080)]\n\n        self.licking_state_bbox = [(0, 0, self.desktop_width, self.desktop_height)]\n\n        if self.game_solution in scope_screenshot_resolution:\n            self.select_scope_bbox = scope_screenshot_resolution[self.game_solution]\n\n        if self.game_solution in hop_up_screenshot_resolution:\n            self.select_hop_up_bbox = hop_up_screenshot_resolution[self.game_solution]\n\n        self.comparator_mode = self.get_config(self.config_data, 'comparator_mode', \"local\")\n        self.read_image_mode = self.get_config(self.config_data, 'read_image_mode', \"local\")\n        self.key_trigger_mode = self.get_config(self.config_data, 'key_trigger_mode', \"local\")\n        # self.net_images_path = self.get_config(self.config_data, 'net_images_path',\n        #                                        \"https://gitee.com/wdragondragon/apex_images/raw/master/\")\n        # self.local_images_path = self.get_config(self.config_data, 'local_images_path', \"images/\")\n\n        self.image_base_path = \"images/\" if self.read_image_mode == \"local\" else \"http://1.15.138.227:9000/apex/images/\"\n\n        self.image_path = '{}x{}/'.format(*self.game_solution)  # 枪械图片路径\n        self.scope_path = 'scope/{}x{}/'.format(*self.game_solution)  # 镜子图片路径\n        self.hop_up_path = 'hop_up/{}x{}/'.format(*self.game_solution)  # 镜子图片路径\n        self.licking_state_path = 'licking/{}x{}/'.format(*self.game_solution)\n\n        self.refresh_buttons = self.get_config(self.config_data, 'refresh_buttons', ['1', '2', 'E', 'e'])\n        self.delay_refresh_buttons = self.get_config(self.config_data, 'delay_refresh_buttons', {})\n\n        self.mouse_mover = self.get_config(self.config_data, \"mouse_mover\", \"win32api\")\n        self.rea_snow_mouse_mover = self.get_config(self.config_data, \"rea_snow_mouse_mover\", \"distributed\")\n        self.server_mouse_mover = self.get_config(self.config_data, \"server_mouse_mover\", \"km_box_net\")\n        self.mouse_mover_params = self.get_config(self.config_data, \"mouse_mover_params\", {\n            \"win32api\": {},\n            \"km_box\": {\n                \"VID/PID\": \"66882021\"\n            },\n            \"wu_ya\": {\n                \"VID/PID\": \"26121701\"\n            }\n        })\n        self.log_model = self.get_config(self.config_data, \"log_model\", \"window\")\n        self.shake_gun_toggle = self.get_config(self.config_data, \"shake_gun_toggle\", True)\n        self.shake_gun_toggle_button = self.get_config(self.config_data, \"shake_gun_toggle_button\",\n                                                       [[\"left\"], [\"right\"]])\n        self.shake_gun_trigger_button = self.get_config(self.config_data, \"shake_gun_trigger_button\", \"caps_lock\")\n        self.has_turbocharger = self.get_config(self.config_data, \"has_turbocharger\", [\n            \"专注\",\n            \"哈沃克\"\n        ])\n        self.delayed_activation_key_list = self.get_config(self.config_data, \"delayed_activation_key_list\", {})\n        self.zen_toggle_key = self.get_config(self.config_data, \"zen_toggle_key\", \"\")\n        self.mouse_c1_to_key = self.get_config(self.config_data, \"mouse_c1_to_key\", [])\n        self.joy_to_key_map = self.get_config(self.config_data, \"joy_to_key_map\", {})\n\n        # self.toggle_hold_key = self.get_config(self.config_data, \"toggle_hold_key\", {})\n        self.toggle_hold_key = {}\n        self.distributed_param = self.get_config(self.config_data, \"distributed_param\", {\n            \"ip\": \"127.0.0.1\",\n            \"port\": 12345\n        })\n        self.screen_taker = self.get_config(self.config_data, \"screen_taker\", \"local\")\n        self.rea_snow_gun_config_name = self.get_config(self.config_data, \"rea_snow_gun_config_name\", \"ReaSnowGun\")\n        self.s1_switch_hold_map = self.get_config(self.config_data, \"s1_switch_hold_map\",\n                                                  {\n                                                      \"key\": {},\n                                                      \"toggle_key\": \"\"\n                                                  })\n        self.cap_param = self.get_config(self.config_data, \"cap_param\", {\n            \"width\": self.game_width,\n            \"height\": self.game_height,\n            \"frame_rate\": 144,\n            \"format\": \"MJPG\"\n        })\n\n    def get_config(self, read_config, pattern=None, default=None):\n        \"\"\"\n            从配置中获取项值\n        :param read_config:\n        :param pattern:\n        :param default:\n        :return:\n        \"\"\"\n        if pattern is not None:\n            value = jsonpath.jsonpath(read_config, pattern)\n            if value is None or not value:\n                if default is not None:\n                    read_config[pattern] = default\n                    return default\n                else:\n                    return False\n            if isinstance(value, list) and len(value) == 1:\n                return value[0]\n            else:\n                return value\n        else:\n            return read_config\n\n    def set_config(self, key, value):\n        \"\"\"\n            配置选项变更\n        :param key:\n        :param value:\n        \"\"\"\n        self.config_data[key] = value\n\n    def save_config(self):\n        \"\"\"\n            保存配置\n        \"\"\"\n        with open(self.config_path, \"w\", encoding=\"utf8\") as f:\n            json.dump(self.config_data, f, ensure_ascii=False, indent=4)\n        self.logger.print_log(\"保存配置文件到:{0}\".format(self.config_path))\n        self.init()\n\n    def read_config(self):\n        \"\"\"\n            根据当前配置名读取配置\n        :return:\n        \"\"\"\n        all_config_name = self.get_all_config_file_name()\n        ref_config_name = self.read_config_file_name()\n        if ref_config_name in all_config_name:\n            self.logger.print_log(\"读取预设配置：{0}\".format(ref_config_name))\n            self.ref_config_name = ref_config_name\n\n        self.config_path = '{0}{1}.json'.format(self.ref_dir, self.ref_config_name)\n        if op.exists(self.config_path):\n            with open(self.config_path, encoding='utf-8') as global_file:\n                return json.load(global_file)\n        return {}\n\n    def get_all_config_file_name(self):\n        \"\"\"\n            获取所有配置名\n        :return:\n        \"\"\"\n        directory = self.ref_dir\n        # 获取指定目录下的所有文件和子目录\n        if not os.path.exists(directory):\n            os.makedirs(directory, exist_ok=True)\n        files = os.listdir(directory)\n        files_name = []\n        # 遍历所有文件和子目录\n        for file in files:\n            # 使用 os.path.join() 构建文件的完整路径\n            file_path = os.path.join(directory, file)\n\n            # 检查是否为文件\n            if os.path.isfile(file_path):\n                # 使用 os.path.splitext 分离文件名和扩展名\n                filename, _ = os.path.splitext(file)\n                files_name.append(filename)\n\n        return files_name\n\n    def read_config_file_name(self, default=\"global_config\"):\n        \"\"\"\n            从当前配置名称中加载配置\n        :param default:\n        :return:\n        \"\"\"\n        file_path = self.base_path + self.use_ref_name\n        try:\n            if not os.path.exists(file_path):\n                return default\n            # 使用 open 函数打开文件\n            with open(file_path) as file:\n                # 读取文件内容\n                return file.read()\n        except FileNotFoundError:\n            self.logger.print_log(f\"文件 '{file_path}' 不存在.\")\n        except Exception as e:\n            self.logger.print_log(f\"发生错误: {e}\")\n\n    def writer_config_file_name(self):\n        \"\"\"\n            修改当前配置文件名称\n        \"\"\"\n        file_path = self.base_path + self.use_ref_name\n        try:\n            # 使用 open 函数以写入模式打开文件\n            with open(file_path, 'w') as file:\n                # 将内容写入文件\n                file.write(self.ref_config_name)\n            self.logger.print_log(f\"成功写入文件: {file_path}\")\n        except Exception as e:\n            self.logger.print_log(f\"写入文件时发生错误: {e}\")\n\n    def copy_config(self, target):\n        \"\"\"\n            复制当前配置文件到目标路径\n        :param target:\n        \"\"\"\n        try:\n            source_path = '{0}{1}.json'.format(self.ref_dir, self.read_config_file_name())\n            target_path = '{0}{1}.json'.format(self.ref_dir, target)\n            # 使用 shutil.copy 复制文件\n            shutil.copy(source_path, target_path)\n            self.logger.print_log(f\"成功复制文件: {source_path} 到 {target_path}\")\n        except Exception as e:\n            self.logger.print_log(f\"复制文件时发生错误: {e}\")\n"
  },
  {
    "path": "core/GameWindowsStatus.py",
    "content": "import threading\nimport time\n\nfrom log import LogFactory\nfrom tools.Tools import Tools\n\n\nclass GameWindowsStatus:\n    \"\"\"\n        游戏窗口状态检测\n    \"\"\"\n\n    def __init__(self):\n        self.status = False\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.timing_get_status_thread()\n\n    def timing_get_status_thread(self):\n        \"\"\"\n            新线程检测\n        \"\"\"\n        threading.Thread(target=self.timing_get_status).start()\n\n    def timing_get_status(self):\n        \"\"\"\n            检测窗口\n        \"\"\"\n        while True:\n            status = Tools.is_apex_windows()\n            if self.status != status:\n                self.status = status\n                self.logger.print_log(f\"窗口状态切换{self.status}\")\n            time.sleep(2)\n\n    def get_game_windows_status(self):\n        \"\"\"\n            获取状态\n        \"\"\"\n        return self.status\n"
  },
  {
    "path": "core/KeyAndMouseListener.py",
    "content": "from log import LogFactory\nfrom tools.Tools import Tools\n\n\nclass KeyListener:\n    \"\"\"\n        键盘监听器\n    \"\"\"\n\n    def __init__(self):\n        super().__init__()\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.press_key = dict()\n        self.toggle_key_map = []\n\n    def on_press(self, key):\n        \"\"\"\n            键盘按下事件\n        :param key:\n        \"\"\"\n        key_name = self.get_key_name(key)\n\n        if key_name is not None:\n            self.press_key[key_name] = Tools.current_milli_time()\n\n        if key_name in self.toggle_key_map:\n            self.toggle_key_map.remove(key_name)\n        else:\n            self.toggle_key_map.append(key_name)\n        for cb in KMCallBack.toggle_call_back:\n            if cb.key_type == 'k' and cb.key == key_name and cb.is_press:\n                cb.call_back(cb.key_type, cb.key, True, cb.key in self.toggle_key_map)\n\n    # 释放按钮，按esc按键会退出监听\n    def on_release(self, key):\n        \"\"\"\n            键盘释放事件\n        :param key:\n        \"\"\"\n        key_name = self.get_key_name(key)\n        if key_name is not None and key_name in self.press_key:\n            self.press_key.pop(key_name)\n        for cb in KMCallBack.toggle_call_back:\n            if cb.key_type == 'k' and cb.key == key_name and not cb.is_press:\n                cb.call_back(cb.key_type, cb.key, True, cb.key in self.toggle_key_map)\n\n    def is_open(self, button):\n        \"\"\"\n            判断按钮作为开关的开关状态\n        :param button:\n        :return:\n        \"\"\"\n        return button in self.press_key\n\n    def get_key_name(self, key):\n        \"\"\"\n            从key中获取key_name\n        :param key:\n        :return:\n        \"\"\"\n        key_name = None\n        if not hasattr(key, 'name') and hasattr(key, 'char') and key.char is not None:\n            key_name = key.char\n        elif hasattr(key, 'name') and key.name is not None:\n            key_name = key.name\n        return key_name\n\n\nclass MouseListener:\n    \"\"\"\n        鼠标监听器\n    \"\"\"\n\n    def __init__(self):\n        super().__init__()\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.on_mouse_key_map = dict()\n        self.toggle_mouse_key_map = []\n\n    def on_move(self, x, y):\n        \"\"\"\n            鼠标移动监听\n        :param x:\n        :param y:\n        \"\"\"\n        pass\n\n    def on_click(self, x, y, button, pressed):\n        \"\"\"\n            鼠标按下释放监听\n        :param x:\n        :param y:\n        :param button:\n        :param pressed:`\n        :return:\n        \"\"\"\n        if pressed:\n            if button in self.on_mouse_key_map:\n                return\n            self.on_mouse_key_map[button] = Tools.current_milli_time()\n            if button.name in self.toggle_mouse_key_map:\n                self.toggle_mouse_key_map.remove(button.name)\n            else:\n                self.toggle_mouse_key_map.append(button.name)\n            for cb in KMCallBack.toggle_call_back:\n                if cb.key_type == 'm' and cb.key == button.name and cb.is_press:\n                    cb.call_back(cb.key_type, cb.key, pressed, cb.key in self.toggle_mouse_key_map)\n        elif not pressed:\n            if button not in self.on_mouse_key_map:\n                return\n            self.on_mouse_key_map.pop(button)\n            for cb in KMCallBack.toggle_call_back:\n                if cb.key_type == 'm' and cb.key == button.name and not cb.is_press:\n                    cb.call_back(cb.key_type, cb.key, pressed, cb.key in self.toggle_mouse_key_map)\n\n    def on_scroll(self, x, y, dx, dy):\n        \"\"\"\n            鼠标滚轮监听\n        :param x:\n        :param y:\n        :param dx:\n        :param dy:\n        \"\"\"\n        pass\n\n    def is_press(self, button):\n        \"\"\"\n            判断鼠标是否处于按下状态\n        :param button:\n        :return:\n        \"\"\"\n        return button in self.on_mouse_key_map\n\n    def is_toggle(self, button):\n        \"\"\"\n            判断鼠标按键作为开关时的开关状态\n        :param button:\n        :return:\n        \"\"\"\n        return button.name in self.toggle_mouse_key_map\n\n    def press_time(self, button):\n        \"\"\"\n            获取鼠标按下时长\n        :param button:\n        :return:\n        \"\"\"\n        if self.is_press(button):\n            return Tools.current_milli_time() - self.on_mouse_key_map[button]\n        else:\n            return 0\n\n\nclass KMCallBack:\n    \"\"\"\n        注册键盘或鼠标回调事件\n    \"\"\"\n    toggle_call_back = []\n\n    def __init__(self, key_type, key, call_back, is_press=True):\n        super().__init__()\n        self.key_type = key_type\n        self.key = key\n        self.call_back = call_back\n        self.is_press = is_press\n\n    @staticmethod\n    def connect(callback):\n        \"\"\"\n            注册事件\n        :param callback:\n        \"\"\"\n        KMCallBack.toggle_call_back.append(callback)\n\n    @staticmethod\n    def remove(key_type, key, is_press=True):\n        \"\"\"\n            移除事件\n        :param key_type:\n        :param key:\n        :param is_press:\n        \"\"\"\n        remove_cb = []\n        for cb in KMCallBack.toggle_call_back:\n            if cb.key_type == key_type and cb.key == key and cb.is_press == is_press:\n                remove_cb.append(cb)\n        for cb in remove_cb:\n            KMCallBack.toggle_call_back.remove(cb)\n"
  },
  {
    "path": "core/ReaSnowSelectGun.py",
    "content": "import json\nimport os.path as op\n\nfrom log import LogFactory\nfrom mouse_mover.MouseMover import MouseMover\nfrom tools.Tools import Tools\n\n\nclass ReaSnowSelectGun:\n    \"\"\"\n        转换器自动识别按键宏触发\n    \"\"\"\n\n    def __init__(self, mouse_mover: MouseMover, config_name='ReaSnowGun'):\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.config_path = f\".\\\\config\\\\{config_name}.json\"\n        self.mouse_mover = mouse_mover\n        self.current_gun = None\n        self.current_scope = None\n        self.current_hot_pop = None\n        self.last_scope_data = None\n        if op.exists(self.config_path):\n            with open(self.config_path, encoding='utf-8') as global_file:\n                self.key_dict = json.load(global_file)\n        if \"close_key\" in self.key_dict:\n            self.no_macro_key = self.key_dict[\"close_key\"]\n        else:\n            self.no_macro_key = \"0x35\"\n\n        if \"no_found_click_close_key\" in self.key_dict:\n            self.no_found_click_close_key = self.key_dict[\"no_found_click_close_key\"]\n        else:\n            self.no_found_click_close_key = True\n\n        if \"auto_caps\" in self.key_dict:\n            self.auto_caps = self.key_dict[\"auto_caps\"]\n        else:\n            self.auto_caps = True\n\n        self.no_macro_key = Tools.convert_to_decimal(self.no_macro_key)\n\n    def trigger_button(self, select_gun, select_scope, hot_pop):\n        \"\"\"\n\n        :param select_gun:\n        :param select_scope:\n        :param hot_pop:\n        :return:\n        \"\"\"\n        if select_gun is None or select_scope is None:\n            self.logger.print_log(f\"未识别到枪械{'，关闭宏' if self.no_found_click_close_key else ''}\")\n            if self.no_found_click_close_key:\n                self.mouse_mover.click_key(self.no_macro_key)\n                self.mouse_mover.toggle_caps_lock(False)\n            return\n\n        gun_scope_dict = self.key_dict.get(select_gun)\n        if gun_scope_dict is None:\n            self.logger.print_log(f\"枪械[{select_gun}]没有数据{'，关闭宏' if self.no_found_click_close_key else ''}\")\n            if self.no_found_click_close_key:\n                self.mouse_mover.click_key(self.no_macro_key)\n                self.mouse_mover.toggle_caps_lock(False)\n            return\n        if hot_pop is not None and hot_pop in gun_scope_dict:\n            gun_scope_dict = gun_scope_dict[hot_pop]\n\n        first_char = select_scope[0]\n\n        caps_lock = True\n        if \"caps_\" + first_char in gun_scope_dict:\n            caps_lock = gun_scope_dict[\"caps_\" + first_char]\n        elif \"caps\" in gun_scope_dict:\n            caps_lock = gun_scope_dict[\"caps\"]\n\n        if first_char in gun_scope_dict:\n            scope_data = gun_scope_dict[first_char]\n        else:\n            scope_data = None\n        if \"0\" in gun_scope_dict:\n            scope_data = gun_scope_dict[\"0\"]\n            self.logger.print_log(f\"枪械[{select_gun}使用通用数据]\")\n        if scope_data is not None:\n            self.logger.print_log(f\"枪械[{select_gun}]按下键位[{scope_data}]切换数据\")\n            self.mouse_mover.click_key(Tools.convert_to_decimal(scope_data))\n            if self.auto_caps:\n                self.mouse_mover.toggle_caps_lock(caps_lock)\n        self.current_gun = select_gun\n        self.current_scope = select_scope\n        self.current_hot_pop = hot_pop\n        self.last_scope_data = scope_data\n\n    def close_key(self):\n        \"\"\"\n            关宏\n        \"\"\"\n        if self.no_macro_key is not None:\n            self.mouse_mover.click_key(self.no_macro_key)\n\n    def click_current(self):\n        \"\"\"\n            开最后一个识别的宏\n        \"\"\"\n        if self.last_scope_data is not None:\n            self.mouse_mover.click_key(Tools.convert_to_decimal(self.last_scope_data))\n"
  },
  {
    "path": "core/RecoildsCore.py",
    "content": "import json\nimport os.path as op\nimport time\n\nimport requests\nfrom pynput.mouse import Button\n\nfrom core.KeyAndMouseListener import MouseListener\nfrom core.SelectGun import SelectGun\nfrom log import LogFactory\nfrom mouse_mover.IntentManager import IntentManager\n\n\nclass RecoilsConfig:\n    \"\"\"\n        枪械配置后座力配置\n    \"\"\"\n\n    def __init__(self):\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.specs_data = []\n        self.local_specs_data = []\n        self.load()\n\n    def load(self):\n        \"\"\"\n            加载压枪数据\n        \"\"\"\n        config_json_str = RecoilsConfig.read_file_from_url(\"http://1.15.138.227:9000/apex/specs.json\")\n        if config_json_str is not None:\n            self.specs_data = json.loads(config_json_str)\n            self.logger.print_log(\"加载内置配置文件成功\")\n        config_file_path = 'config\\\\specs.json'\n        if op.exists(config_file_path):\n            with open(config_file_path, encoding='utf8') as file:\n                self.local_specs_data = json.load(file)\n                self.logger.print_log(\"加载外部配置文件: {}\".format(config_file_path))\n\n    def get_config(self, name):\n        \"\"\"\n            根据枪协名称获取后座力数据\n        :param name:\n        :return:\n        \"\"\"\n        for spec in self.local_specs_data:\n            if spec['name'] == name:\n                return spec\n        for spec in self.specs_data:\n            if spec['name'] == name:\n                return spec\n        return None\n\n    @staticmethod\n    def read_file_from_url(url):\n        \"\"\"\n\n        :param url:\n        :return:\n        \"\"\"\n        try:\n            # 发送GET请求获取文件内容\n            # headers = random.choice(headers_list)\n            response = requests.get(url)\n            response.encoding = 'utf-8'\n            # 检查请求是否成功\n            if response.status_code == 200:\n                # 根据换行符切割文件内容并返回列表\n                text = response.text\n                return text\n            else:\n                print(f\"Failed to read file from URL. Status code: {response.status_code}\")\n                return None\n        except Exception as e:\n            print(f\"An error occurred: {e}\")\n            return None\n\n\nclass RecoilsListener:\n    \"\"\"\n        压枪监听，监听到开火，将识别到的枪械名称配置读取，然后推送到移动意图管理器中\n    \"\"\"\n\n    def __init__(self,\n                 recoils_config: RecoilsConfig,\n                 mouse_listener: MouseListener,\n                 select_gun: SelectGun,\n                 intent_manager: IntentManager, game_windows_status):\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.recoils_config = recoils_config\n        self.mouse_listener = mouse_listener\n        self.select_gun = select_gun\n        self.intent_manager = intent_manager\n        self.game_windows_status = game_windows_status\n\n    def start(self):\n        \"\"\"\n            开始监听\n        \"\"\"\n        start_time = None\n        num = 0\n        sleep_time = 0.001\n        last_left_press_time = None\n        last_press_status = None\n        go_on_num = 0\n        while True:\n            if (not self.game_windows_status.get_game_windows_status() or\n                    not self.intent_manager.mouse_mover.is_caps_locked()):\n                time.sleep(1)\n                continue\n            current_gun = self.select_gun.current_gun\n            left_press = self.mouse_listener.is_press(Button.left)\n            right_press = self.mouse_listener.is_press(Button.right)\n            now = time.time()\n            if last_press_status is not None and not last_press_status and left_press:\n                if last_left_press_time is not None and now - last_left_press_time < 0.5:\n                    self.logger.print_log(f\"继续：{go_on_num}\")\n                else:\n                    go_on_num = 0\n\n            if current_gun is not None and left_press:\n                current_hot_pop = self.select_gun.current_hot_pop\n                spec = self.recoils_config.get_config(current_gun)\n                if spec is not None:\n                    last_left_press_time = time.time()\n                    last_press_status = True\n                    recoil_type = spec['type']\n                    spec = spec['recoils']\n                    if current_hot_pop is not None and current_hot_pop in spec:\n                        spec = spec[current_hot_pop]\n                    if start_time is None:\n                        start_time = time.time()\n                        self.logger.print_log(\"开始压枪\")\n                    if right_press:\n                        spec = spec['aim']\n                    else:\n                        spec = spec['un_aim']\n                    if recoil_type == 'serial':\n                        num, sleep_time = self.handle_serial(spec, start_time, num)\n                    else:\n                        go_on_num, sleep_time = self.handle_intermittent(spec, go_on_num)\n                else:\n                    self.logger.print_log(f\"未找到[{current_gun}的压枪数据]\")\n            else:\n                last_press_status = False\n                start_time = None\n                num = 0\n                sleep_time = 0.01\n            if sleep_time != 0:\n                time.sleep(sleep_time)\n\n    def handle_serial(self, spec, start_time, num):\n        \"\"\"\n            全自动枪械处理轨迹\n        \"\"\"\n        time_points = spec['time_points']\n        if len(time_points) == 0:\n            return num, 0.01\n        if self.move_index_xy(spec=spec, current_index=num, point=(time.time() - start_time) * 1000):\n            num += 1\n        return num, 0.001\n\n    def handle_intermittent(self, spec, num):\n        \"\"\"\n            连发枪处理轨迹\n        \"\"\"\n        spec_len = len(spec)\n        if spec_len > num:\n            spec = spec[num]\n            time_points = spec['time_points']\n            time_points_len = len(time_points)\n            if time_points_len == 0:\n                return num + 1, 0.001\n            start_time = time.time()\n            sub_num = 0\n            while time_points_len > sub_num:\n                if self.move_index_xy(spec=spec, current_index=sub_num, point=(time.time() - start_time) * 1000):\n                    sub_num += 1\n                time.sleep(0.001)\n            return num + 1, 0.001\n        else:\n            return num, 0.01\n\n    def move_index_xy(self, spec, current_index, point):\n        \"\"\"\n            真实的移动轨迹方法\n        \"\"\"\n        time_points = spec['time_points']\n        # 获取对应下标的x和y\n        x_values = spec['x']\n        y_values = spec['y']\n        index = len(time_points) - 1 if point > time_points[-1] else next(\n            (i - 1 for i, time_point in enumerate(time_points) if time_point > point),\n            -1)\n        if index is not None and index >= 0 and current_index <= index:\n            if len(x_values) >= current_index + 1:\n                x_value = x_values[current_index]\n                y_value = y_values[current_index]\n                self.logger.print_log(\n                    f'执行时间：[{time_points[current_index]}]<[{point}],正在压第{str(current_index + 1)}步，剩余{str(len(time_points) - (current_index + 1))}步，鼠标移动轨迹为({x_value},{y_value})')\n                # self.intent_manager.set_intention(x_value, y_value)\n                self.intent_manager.mouse_mover.move_rp(x_value, y_value)\n            else:\n                self.logger.print_log(\n                    f'缺失第[{current_index + 1}个轨迹，时间为{time_points[current_index]}])')\n            return True\n        return False\n"
  },
  {
    "path": "core/SelectGun.py",
    "content": "import threading\nimport time\nimport traceback\n\nfrom core.KeyAndMouseListener import KMCallBack\nfrom core.screentaker.ScreenTaker import ScreenTaker\nfrom log import LogFactory\n\n\nclass SelectGun:\n    \"\"\"\n        枪械识别\n    \"\"\"\n\n    def __init__(self, bbox, image_path, scope_bbox, scope_path, hop_up_bbox, hop_up_path,\n                 refresh_buttons, has_turbocharger, image_comparator, screen_taker: ScreenTaker, game_windows_status,\n                 delay_refresh_buttons=None):\n        super().__init__()\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.on_key_map = dict()\n        self.bbox = bbox\n        self.image_path = image_path\n        self.scope_bbox = scope_bbox\n        self.scope_path = scope_path\n        self.select_gun_sign = True\n        self.current_gun = None\n        self.current_scope = None\n        self.current_hot_pop = None\n        self.refresh_buttons = refresh_buttons\n        self.has_turbocharger = has_turbocharger\n        self.hop_up_bbox = hop_up_bbox\n        self.hop_up_path = hop_up_path\n        self.call_back = []\n        self.fail_time = 0\n        self.image_comparator = image_comparator\n        self.screen_taker = screen_taker\n        self.game_windows_status = game_windows_status\n        self.select_gun_cache = {}\n\n        for refresh_button in self.refresh_buttons:\n            KMCallBack.connect(KMCallBack(\"k\", refresh_button, self.select_gun_threading, False))\n\n        if delay_refresh_buttons is None:\n            delay_refresh_buttons = {}\n        self.delay_refresh_buttons = delay_refresh_buttons\n        self.delay_refresh_buttons_map = {}\n        for refresh_button, delay in self.delay_refresh_buttons.items():\n            self.delay_refresh_buttons_map[refresh_button] = delay\n            KMCallBack.connect(KMCallBack(\"k\", refresh_button, self.select_gun_threading, False))\n\n        threading.Thread(target=self.timing_execution).start()\n\n    def timing_execution(self):\n        \"\"\"\n            定时识别\n        \"\"\"\n        while True:\n            try:\n                if self.game_windows_status.get_game_windows_status():\n                    self.logger.print_log(\"定时识别开始\")\n                    if self.select_gun_with_sign(None, None, auto=True):\n                        self.fail_time = 0\n                    else:\n                        self.fail_time += 1\n                    self.logger.print_log(f\"下一轮定时识别在[{1 + self.fail_time / 5}]秒后\")\n                else:\n                    self.fail_time = 0\n            except Exception as e:\n                traceback.print_exc()\n                pass\n            time.sleep(1 + self.fail_time / 5)\n\n    def select_gun_threading(self, key_type, key, pressed=False, toggle=False):\n        \"\"\"\n\n        :param pressed:\n        :param toggle:\n        :param key_type:\n        :param key:\n        :return:\n        \"\"\"\n        if self.select_gun_sign:\n            return\n        threading.Thread(target=self.select_gun_with_sign, args=(key_type, key, pressed, toggle, False)).start()\n\n    def select_gun_with_sign(self, key_type, key, pressed=False, toggle=False, auto=False):\n        \"\"\"\n\n        :param pressed:\n        :param toggle:\n        :param auto:\n        :param delay:\n        :return:\n        \"\"\"\n        if self.select_gun_sign:\n            return\n        delay = 0\n        if key in self.delay_refresh_buttons_map:\n            delay = self.delay_refresh_buttons_map[key]\n            time.sleep(delay / 1000)\n        self.select_gun_sign = True\n        start = time.time()\n        result = self.select_gun(key_type, key, pressed, toggle, auto)\n        self.logger.print_log(f\"该次识别延迟：{delay}ms 耗时：{int((time.time() - start) * 1000)}ms\")\n        self.select_gun_sign = False\n        return result\n\n    def get_images_from_bbox(self, bbox_list):\n        \"\"\"\n        Get images from specified bounding boxes.\n\n        :param bbox_list: List of bounding boxes [(x1, y1, x2, y2), ...]\n        :return: Generator yielding images\n        \"\"\"\n        # try:\n        #     return list(ImageGrab.grab(bbox=bbox) for bbox in bbox_list)\n        # except Exception as e:\n        #     self.logger.print_log(f\"Error in get_images_from_bbox: {e}\")\n        return self.screen_taker.get_images_from_bbox(bbox_list)\n\n    def select_gun(self, key_type, key, pressed=False, toggle=False, auto=False):\n        \"\"\"\n            使用图片对比，逐一识别枪械，相似度最高设置为current_gun\n        :return:\n        \"\"\"\n        # cache_key = key_type + \":\" + key\n        # if cache_key not in self.select_gun_cache:\n        #\n        if not self.game_windows_status.get_game_windows_status():\n            return False\n\n        gun_temp, score_temp = self.image_comparator.compare_with_path(self.image_path,\n                                                                       self.get_images_from_bbox([self.bbox]), 0.9, 0.7)\n        if gun_temp is None:\n            self.logger.print_log(\"未找到枪械\")\n            self.current_gun = None\n            self.current_scope = None\n            self.current_hot_pop = None\n        else:\n            scope_temp, score_scope_temp = self.image_comparator.compare_with_path(self.scope_path,\n                                                                                   self.get_images_from_bbox(\n                                                                                       self.scope_bbox), 0.9,\n                                                                                   0.4)\n            if scope_temp is None:\n                self.logger.print_log(\"未找到配件，默认为1倍\")\n                scope_temp = '1x'\n\n            if gun_temp in self.has_turbocharger:\n                hop_up_temp, score_hop_up_temp = self.image_comparator.compare_with_path(self.hop_up_path,\n                                                                                         self.get_images_from_bbox(\n                                                                                             self.hop_up_bbox),\n                                                                                         0.9, 0.6)\n            else:\n                hop_up_temp = None\n                score_hop_up_temp = 0\n\n            if gun_temp == self.current_gun and scope_temp == self.current_scope and hop_up_temp == self.current_hot_pop:\n                self.logger.print_log(\n                    \"当前枪械搭配已经是: {}-{}-{}\".format(self.current_gun, self.current_scope, self.current_hot_pop))\n                if auto:\n                    return False\n            else:\n                self.current_scope = scope_temp\n                self.current_gun = gun_temp\n                self.current_hot_pop = hop_up_temp\n                self.logger.print_log(\n                    \"枪械: {},相似: {}-配件: {},相似: {}-hop_up: {},相似: {}\".format(self.current_gun, score_temp,\n                                                                                     self.current_scope,\n                                                                                     score_scope_temp,\n                                                                                     self.current_hot_pop,\n                                                                                     score_hop_up_temp))\n\n        for func in self.call_back:\n            func(self.current_gun, self.current_scope, self.current_hot_pop)\n\n        return self.current_gun is not None\n\n    def connect(self, func):\n        self.call_back.append(func)\n\n    def test(self):\n        self.logger.print_log(\"自动识别初始化中，请稍后……\")\n        start = time.time()\n        self.image_comparator.compare_with_path(self.image_path,\n                                                self.get_images_from_bbox([self.bbox]), 0.9, 0.7)\n        self.image_comparator.compare_with_path(self.scope_path,\n                                                self.get_images_from_bbox(\n                                                    self.scope_bbox), 0.9,\n                                                0.4)\n        self.image_comparator.compare_with_path(self.hop_up_path,\n                                                self.get_images_from_bbox(\n                                                    self.hop_up_bbox),\n                                                0.9, 0.6)\n        self.logger.print_log(f\"自动识别初始化完毕，耗时[{int((time.time() - start) * 1000)}]\")\n        self.select_gun_sign = False\n"
  },
  {
    "path": "core/ShakeGun.py",
    "content": "import math\nimport threading\nimport time\n\nfrom core.Config import Config\nfrom core.KeyAndMouseListener import KMCallBack, MouseListener\nfrom core.SelectGun import SelectGun\nfrom log import LogFactory\nfrom mouse_mover.MouseMover import MouseMover\n\n\nclass ShakeGun:\n    \"\"\"\n        抖枪\n    \"\"\"\n\n    def __init__(self, config: Config,\n                 mouse_listener: MouseListener,\n                 mouse_mover: MouseMover,\n                 select_gun: SelectGun):\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.mouse_listener = mouse_listener\n        self.mouse_mover = mouse_mover\n        self.select_gun = select_gun\n        self.config = config\n        self.in_shake = False\n        self.LMD = 3.0\n        self.pushDown = 6\n        self.shakeNum = 3\n        self.ADS = 1.0\n        self.Level = 5\n        self.Decline = 9\n        self.frequency = 11\n        # self.shake_range = (6 // (self.LMD * self.ADS)) + self.Level - 2\n        self.shake_range = 17\n        self.declineRange = (self.Decline + 2) * self.LMD\n        self.declineTime = 0\n        self.holdShakeTime = 0\n        self.lastFreshCasLockTime = time.time()\n        self.shake_gun_toggle_button = self.config.shake_gun_toggle_button\n        self.shake_gun_trigger_button = self.config.shake_gun_trigger_button\n\n        KMCallBack.connect(KMCallBack(\"k\", self.shake_gun_trigger_button, self.shake_gun_threading))\n\n        for button_list in self.shake_gun_toggle_button:\n            for button in button_list:\n                KMCallBack.connect(KMCallBack(\"m\", button, self.shake_gun_threading))\n\n    def shake_gun_threading(self, key_type, key, pressed, toggled):\n        if self.in_shake:\n            return\n        threading.Thread(target=self.shake_gun).start()\n        self.in_shake = False\n\n    def shake_gun(self):\n        if self.in_shake:\n            return\n        if self.mouse_mover.is_caps_locked() and self.is_press():\n            self.in_shake = True\n            self.logger.print_log(\"开始抖枪\")\n        else:\n            return\n        self.clear_time()\n        while self.mouse_mover.is_caps_locked() and self.in_shake and self.is_press():\n            self.rock_shake()\n            self.mouse_relative_by_hold_shake_time()\n        self.in_shake = False\n        self.logger.print_log(\"结束抖枪\")\n\n    def is_press(self):\n        # 遍历外层数组，判断与的关系\n        and_result = True\n        for and_group in self.shake_gun_toggle_button:\n            # 遍历内层数组，判断或的关系\n            or_result = False\n            for or_button in and_group:\n                is_button_press = self.mouse_listener.is_press(or_button)\n                # 如果有一个按钮被按下，则内层结果为 True\n                or_result = or_result or is_button_press\n                if or_result:\n                    break\n            and_result = and_result and or_result\n            if not and_result:\n                break\n        # 如果所有外层结果都为 False，则整体结果为 False\n        return and_result\n\n    def rock_shake(self):\n        horizontal = self.shake_range\n        vertical = self.shake_range + 5\n        for _ in range(self.shakeNum):\n            self.mouse_mover.move_rp(int(-horizontal), int(-vertical))\n            self.better_sleep(self.frequency)\n            self.mouse_mover.move_rp(int(horizontal), int(vertical))\n            self.better_sleep(self.frequency)\n        pass\n\n    def mouse_relative_by_hold_shake_time(self):\n        if self.declineTime >= self.declineRange:\n            relative_time = math.log(self.holdShakeTime / 100, 2)\n            relative_time = max(relative_time, -1)\n            relative_time = min(relative_time, 2)\n            relative_time = math.floor(relative_time)\n            relative_time = 3 - relative_time\n            for _ in range(relative_time):\n                self.mouse_mover.move_rp(0, self.pushDown)\n            self.declineTime = 0\n\n    def clear_time(self):\n        self.declineTime = 0\n        self.holdShakeTime = 0\n        self.lastFreshCasLockTime = time.time()\n\n    def better_sleep(self, t):\n        self.declineTime += t\n        self.holdShakeTime += t\n        time.sleep(t / 1000)\n"
  },
  {
    "path": "core/__init__.py",
    "content": ""
  },
  {
    "path": "core/image_comparator/DynamicSizeImageComparator.py",
    "content": "from core.image_comparator.LocalImageComparator import LocalImageComparator\nfrom log import LogFactory\n\n\nclass DynamicSizeImageComparator(LocalImageComparator):\n    \"\"\"\n        可动态模糊匹配的网络图片对比\n    \"\"\"\n\n    def __init__(self, base_path, screen_taker, base_image_comparator):\n        super().__init__(base_path)\n        self.image_cache = {}\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.base_path = base_path\n        self.screen_taker = screen_taker\n        self.base_image_comparator = base_image_comparator\n\n    def compare_with_path(self, path, images, lock_score, discard_score):\n        path = self.base_path + path\n        image_info_arr = [image_info.split() for image_info in\n                          super().read_file_from_url_and_cache(path, \"list.txt\")]\n        select_name, score_temp = self.match_template(path, image_info_arr, threshold=discard_score)\n        return select_name, score_temp\n\n    def match_template(self, path, image_info_arr, threshold=0.8):\n        for image_info in image_info_arr:\n            image_path, x, y, w, h = image_info\n            image_path = path + image_path\n            box = (int(x), int(y), int(w), int(h))\n            img = self.screen_taker.get_images_from_bbox([box])[0]\n            score = super().compare_image(img, image_path)\n            if score > threshold:\n                return image_info[0].split(\".\")[0], score\n        return \"\", 0.0\n\n    def cache_image(self, base_path, line_content):\n        arr = line_content.split()\n        if len(arr) == 5:\n            image_path, x, y, w, h = arr[0], arr[1], arr[2], arr[3], arr[4]\n            image_path = base_path + image_path\n        else:\n            image_path = line_content\n        super().cache_image(\"\", image_path)\n"
  },
  {
    "path": "core/image_comparator/ImageComparator.py",
    "content": "import concurrent.futures\nimport traceback\nfrom io import BytesIO\n\nimport cv2\nimport numpy as np\nfrom skimage.metrics import structural_similarity\n\nfrom log import LogFactory\n\n\nclass ImageComparator:\n    \"\"\"\n        图片对比\n    \"\"\"\n\n    def __init__(self, base_path):\n        # 用于缓存图片\n        self.image_cache = {}\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.base_path = base_path\n\n    def compare_image(self, img, path_image):\n        \"\"\"\n            图片对比\n        :param img:\n        :param path_image:\n        :return:\n        \"\"\"\n        # 下载图片到内存\n        try:\n            downloaded_image = self.get_image_from_cache(path_image)\n\n            if downloaded_image:\n                downloaded_image.seek(0)\n                image_a = cv2.imdecode(np.frombuffer(downloaded_image.getvalue(), dtype=np.uint8), cv2.IMREAD_COLOR)\n                downloaded_image.close()\n                image_b = np.array(img)\n                gray_a = cv2.cvtColor(image_a, cv2.COLOR_BGR2GRAY)\n                gray_b = cv2.cvtColor(image_b, cv2.COLOR_BGR2GRAY)\n                (score, diff) = structural_similarity(gray_a, gray_b, full=True)\n                return score\n            else:\n                # 图片下载失败时的处理\n                return 0\n        except Exception as e:\n            print(e)\n            traceback.print_exc()\n            self.logger.print_log(f\"对比图片错误：{path_image}\")\n            return 0\n    def get_image_from_cache(self, url):\n        \"\"\"\n            缓存获取图片\n        \"\"\"\n        # 如果图像已经在缓存中，直接返回缓存的图像\n        url = url.strip()\n        if url not in self.image_cache:\n            self.cache_image(\"\", url)\n        return BytesIO(self.image_cache[url])\n\n\n    def compare_with_path(self, path, images, lock_score, discard_score):\n        \"\"\"\n            截图范围与文件路径内的所有图片对比\n        :param path:\n        :param images:\n        :param lock_score:\n        :param discard_score:\n        :return:\n        \"\"\"\n        path = self.base_path + path\n        select_name = ''\n        score_temp = 0.00000000000000000000\n        for img in images:\n            for fileName in self.read_file_from_url_and_cache(path, \"list.txt\"):\n                score = self.compare_image(img, path + fileName)\n                if score > score_temp:\n                    score_temp = score\n                    select_name = fileName.split('.')[0]\n                if score_temp > lock_score:\n                    break\n        if score_temp < discard_score:\n            select_name = None\n        return select_name, score_temp\n\n    def read_file_from_url_and_cache(self, base_path, file_name):\n        \"\"\"\n            从文件中读取并下载图片\n        \"\"\"\n        images_path = self.read_file_from_url(base_path + file_name)\n        if images_path is None:\n            return None\n\n        # 使用线程池\n        with concurrent.futures.ThreadPoolExecutor() as executor:\n            # 提交每个下载任务给线程池\n            futures = [executor.submit(self.cache_image, base_path, image_path) for image_path in images_path]\n\n            # 等待所有任务完成\n            concurrent.futures.wait(futures)\n\n        return images_path\n\n    def read_file_from_url(self, url):\n        \"\"\"\n        :param url\n        \"\"\"\n        return []\n\n    def cache_image(self, base_path, url):\n        \"\"\"\n        :param base_path:\n        :param url:\n        :return:\n        \"\"\"\n        self.logger.print_log(\"Caching image is no working...\")\n        pass\n"
  },
  {
    "path": "core/image_comparator/ImageComparatorFactory.py",
    "content": "from core.image_comparator.LocalImageComparator import LocalImageComparator\nfrom net.socket.NetImageComparator import NetImageComparator\nfrom net.socket.SocketImageComparator import SocketImageComparator\n\n\ndef get_image_comparator(comparator_mode, config):\n    \"\"\"\n        获取图片对比器\n    :param config:\n    :param comparator_mode:\n    :param logger:\n    :return:\n    \"\"\"\n    if comparator_mode == \"local\":\n        return LocalImageComparator(config.image_base_path)\n    elif comparator_mode == \"net\":\n        return NetImageComparator(config.image_base_path)\n    elif comparator_mode == \"distributed\":\n        # return SocketImageComparator(logger, (\"1.15.138.227\", 12345))\n        return SocketImageComparator((config.distributed_param[\"ip\"], config.distributed_param[\"port\"]))\n"
  },
  {
    "path": "core/image_comparator/LocalImageComparator.py",
    "content": "import os\nimport re\n\nfrom core.image_comparator.ImageComparator import ImageComparator\nfrom log import LogFactory\n\nnet_file_cache = {}\n\n\nclass LocalImageComparator(ImageComparator):\n    \"\"\"\n        本地图片对比\n    \"\"\"\n\n    def __init__(self, base_path):\n        super().__init__(base_path)\n        self.image_cache = {}\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.base_path = base_path\n\n\n    def read_file_from_url(self, filepath):\n        \"\"\"\n        从本地文件读取内容并按行返回\n        :param filepath: 本地文件路径\n        :return: 按行分割后的字符串列表，或 None（失败时）\n        \"\"\"\n        try:\n            if filepath in net_file_cache:\n                return net_file_cache[filepath]\n\n            if not os.path.isfile(filepath):\n                print(f\"File not found: {filepath}\")\n                return None\n\n            with open(filepath, 'r', encoding='utf-8') as f:\n                text = f.read()\n\n                lines = re.split(r'\\r\\n|\\r|\\n', text)\n                net_file_cache[filepath] = lines\n                return lines\n        except Exception as e:\n            print(f\"An error occurred while reading local file: {e}\")\n            return None\n\n    def cache_image(self, base_path, url):\n        # 如果图像已经在缓存中，直接返回缓存的图像\n        url = base_path + url\n        url = url.strip()\n        if url in self.image_cache:\n            return\n        self.logger.print_log(f\"正在加载图片：{url.replace(self.base_path, '')}\")\n        if os.path.exists(url) and os.path.isfile(url):\n            with open(url, 'rb') as f:\n                self.image_cache[url] = f.read()\n        else:\n            # 如果请求失败，打印错误信息\n            self.logger.print_log(f\"Failed to load image: {url}. check exists\")"
  },
  {
    "path": "core/image_comparator/__init__.py",
    "content": ""
  },
  {
    "path": "core/joy_listener/JoyListener.py",
    "content": "import threading\nimport traceback\n\nimport pygame\nfrom PyQt5.QtWidgets import QMessageBox\n\nfrom log import LogFactory\nfrom log.Logger import Logger\n\nrocker_cache = []\nexist_rocket_time = []\n\nhold_time = None\n\n\nclass JoyListener:\n    \"\"\"\n        手柄监听器\n    \"\"\"\n\n    def __init__(self):\n        self.axis = dict()\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.run_sign = False\n        self.axis_list = []\n        self.call_back_list = []\n        self.call_back_joystick = {}\n        self.joy_listener = True\n\n    def start(self, main_windows):\n        \"\"\"\n            开始监听\n        :param main_windows:\n        :return:\n        \"\"\"\n        try:\n            if self.run_sign:\n                return\n            pygame.joystick.init()\n            pygame.joystick.Joystick(0)\n            self.logger.print_log(\"手柄初始化成功\")\n            pygame.joystick.quit()\n            threading.Thread(target=self.aync).start()\n        except:\n            self.logger.print_log(\"未插手柄\")\n            QMessageBox.warning(main_windows, \"错误\", \"未插手柄，请插入手柄后，重新勾选手柄模式\")\n            return\n\n    def aync(self):\n        \"\"\"\n            监听手柄按键\n        \"\"\"\n        self.run_sign = True\n        pygame.init()\n        pygame.joystick.init()\n        joystick = pygame.joystick.Joystick(0)\n        joystick.init()\n        clock = pygame.time.Clock()\n        while self.joy_listener:\n            for event in pygame.event.get():  # User did something\n                if event.type == pygame.JOYAXISMOTION:\n                    self.axis[event.axis] = event.value\n                    for func in self.axis_list:\n                        try:\n                            func(event.axis, event.value)\n                        except:\n                            traceback.print_exc()\n                elif event.type == pygame.JOYBUTTONDOWN:\n                    self.logger.print_log(f\"检测到按下手柄按键:{event.button}\")\n                    for func in self.call_back_list:\n                        try:\n                            func('b' + str(event.button))\n                        except:\n                            traceback.print_exc()\n                elif event.type == pygame.JOYBUTTONUP:\n                    self.logger.print_log(f\"检测到松开手柄按键:{event.button}\")\n                if event.type in self.call_back_joystick:\n                    for func in self.call_back_joystick[event.type]:\n                        try:\n                            func(joystick, event)\n                        except:\n                            traceback.print_exc()\n            clock.tick(1000)\n        self.axis.clear()\n        pygame.joystick.quit()\n        pygame.quit()\n        self.run_sign = False\n        self.logger.print_log(\"关闭手柄监听\")\n\n    def is_press(self, value):\n        \"\"\"\n            判断手柄按键是否按下\n        :param value:\n        :return:\n        \"\"\"\n        if value not in self.axis:\n            return False\n        return self.axis[value] > -1.0\n\n    def connect_axis(self, func):\n        \"\"\"\n            连接回调方法\n        :param func:\n        \"\"\"\n        self.axis_list.append(func)\n\n    def connect_button(self, func):\n        \"\"\"\n            连接回调方法\n        :param func:\n        \"\"\"\n        self.call_back_list.append(func)\n\n    def connect_joystick(self, py_type, func):\n        \"\"\"\n            监听整个joystick\n        \"\"\"\n        if py_type not in self.call_back_joystick:\n            self.call_back_joystick[py_type] = [func]\n        else:\n            self.call_back_joystick[py_type].append(func)\n\n    def stop(self):\n        \"\"\"\n            销毁\n        \"\"\"\n        self.joy_listener = False\n"
  },
  {
    "path": "core/joy_listener/JoyToKey.py",
    "content": "from log import LogFactory\n\n\nclass JoyToKey:\n    \"\"\"\n        jtk\n    \"\"\"\n\n    def __init__(self, joy_to_key_map, c1_mouse_mover, game_windows_status):\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.c1_mouse_mover = c1_mouse_mover\n        self.joy_to_key_map = joy_to_key_map\n        self.joy_to_key_last_status_map = {}\n        self.game_windows_status = game_windows_status\n        self.init_status_map()\n        self.toggle_func = []\n\n    def init_status_map(self):\n        \"\"\"\n            初始化状态\n        \"\"\"\n        for joy_to_key in self.joy_to_key_map:\n            for joy in self.joy_to_key_map[joy_to_key]:\n                self.joy_to_key_last_status_map[joy_to_key + joy] = False\n\n    def axis_to_key(self, axis, value):\n        \"\"\"\n\n        :param axis:\n        :param value:\n        \"\"\"\n        if not self.game_windows_status.get_game_windows_status():\n            return\n\n        if \"axis\" not in self.joy_to_key_map:\n            return\n        axis = str(axis)\n        axis_joy_to_key_map = self.joy_to_key_map[\"axis\"]\n\n        hold_status = value > -1.0\n        key = \"axis\" + axis\n        if key not in self.joy_to_key_last_status_map:\n            return\n\n        toggle_key_status = self.joy_to_key_last_status_map[key]\n        joy_to_key = axis_joy_to_key_map[axis]\n\n        if not toggle_key_status and hold_status:\n            self.logger.print_log(f\"joy to key [{joy_to_key['key_type']}.{joy_to_key['key']}] down\")\n            if joy_to_key['key_type'] == \"mouse\" and self.toggle():\n                self.c1_mouse_mover.mouse_click(joy_to_key['key'], True)\n            # if self.all_hold(key) and joy_to_key['key_type'] == \"mouse\":\n            #     self.logger.print_log(f\"joy to key all down\")\n            #     for values in axis_joy_to_key_map.values():\n            #         self.c1_mouse_mover.mouse_click(values['key'], True)\n        if toggle_key_status and not hold_status:\n            self.logger.print_log(f\"joy to key [{joy_to_key['key_type']}.{joy_to_key['key']}] up\")\n            if joy_to_key['key_type'] == \"mouse\":\n                self.c1_mouse_mover.mouse_click(joy_to_key['key'], False)\n            # if joy_to_key['key_type'] == \"mouse\":\n            #     self.logger.print_log(f\"joy to key all up\")\n            #     for values in axis_joy_to_key_map.values():\n            #         self.c1_mouse_mover.mouse_click(values['key'], False)\n\n        self.joy_to_key_last_status_map[key] = hold_status\n\n    def all_hold(self, current):\n        return all(value for key, value in self.joy_to_key_last_status_map.items() if key != current)\n\n    def reg_toggle_func(self, func):\n        self.toggle_func.append(func)\n\n    def toggle(self):\n        for func in self.toggle_func:\n            if not func():\n                return False\n        return True\n"
  },
  {
    "path": "core/joy_listener/RockerMonitor.py",
    "content": "import time\n\nimport pygame\n\nfrom core.ReaSnowSelectGun import ReaSnowSelectGun\nfrom core.SelectGun import SelectGun\nfrom core.joy_listener.JoyListener import JoyListener\nfrom log import LogFactory\n\n\nclass RockerMonitor:\n    \"\"\"\n        监听摇杆\n    \"\"\"\n\n    def __init__(self, joy_listener: JoyListener, select_gun: SelectGun | ReaSnowSelectGun = None):\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.rocker_cache = []\n        self.exist_rocket_time = []\n        self.select_gun = select_gun\n        self.hold_time = None\n        joy_listener.connect_joystick(pygame.JOYAXISMOTION, self.monitor)\n\n    def monitor(self, joystick, event):\n        \"\"\"\n        :param joystick\n        \"\"\"\n        left = joystick.get_axis(5)\n        right = joystick.get_axis(4)\n        axis_x = joystick.get_axis(2)\n        axis_y = joystick.get_axis(3)\n        if axis_x is None:\n            axis_x = 0\n        if axis_y is None:\n            axis_y = 0\n        if left == -1:\n            if len(self.rocker_cache) > 0:\n                log_text = ''\n                length = len(self.rocker_cache)\n                log_text += f'-----{self.select_gun.current_gun}-{self.select_gun.current_scope}-{self.select_gun.current_hot_pop}-----\\n'\n                for i, (t_time, xy) in enumerate(self.rocker_cache):\n                    keep_time = 0\n                    if i != length - 1:\n                        next_time, _ = self.rocker_cache[i + 1]\n                        keep_time = next_time - t_time\n                    x, y = xy\n                    # log_text += f'{i + 1},触发时间：{t_time}ms, 摇杆：{round(x * 100, 4)}，{-(round(y * 100, 4))} 持续时间：{keep_time}ms\\n'\n                    log_text += (f'|{str(i + 1).ljust(3)}|{\"{:g}\".format(round(x * 100, 4)).ljust(8)}'\n                                 f'|{\"{:g}\".format(-(round(y * 100, 4))).ljust(8)}|{str(keep_time).ljust(4)}|\\n')\n                log_text += '-----压枪摇杆监听结束-----'\n                self.rocker_cache.clear()\n                self.exist_rocket_time.clear()\n                self.hold_time = None\n                self.logger.print_log(log_text)\n        elif left > -1:\n            if self.hold_time is None:\n                self.hold_time = time.time()\n            rocket_time = int((time.time() - self.hold_time) * 1000)\n            if rocket_time not in self.exist_rocket_time:\n                self.rocker_cache.append((rocket_time, (axis_x, axis_y)))\n                self.exist_rocket_time.append(rocket_time)\n"
  },
  {
    "path": "core/joy_listener/S1SwitchMonitor.py",
    "content": "import threading\nimport time\n\nimport pygame\n\nfrom core.ReaSnowSelectGun import ReaSnowSelectGun\nfrom core.image_comparator.DynamicSizeImageComparator import DynamicSizeImageComparator\nfrom core.joy_listener.JoyListener import JoyListener\nfrom log import LogFactory\nfrom mouse_mover.MouseMover import MouseMover\nfrom tools.Tools import Tools\n\n\nclass S1SwitchMonitor:\n    \"\"\"\n        监听s1切层\n    \"\"\"\n\n    def __init__(self, joy_listener: JoyListener,\n                 licking_state_path,\n                 licking_state_bbox,\n                 dynamic_size_image_comparator: DynamicSizeImageComparator,\n                 mouser_mover: MouseMover, rea_snow_select_gun: ReaSnowSelectGun, s1_switch_hold_map, retry=5):\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.dynamic_size_image_comparator = dynamic_size_image_comparator\n        self.licking_state_path = licking_state_path\n        self.licking_state_bbox = licking_state_bbox\n        self.rea_snow_select_gun = rea_snow_select_gun\n        self.mouser_mover = mouser_mover\n        # self.click_state = False\n        # self.threading_state = False\n        self.threading_state_scene_map = {}\n        self.retry = retry\n        self.dict = {\n            pygame.JOYBUTTONDOWN: \"JOYBUTTONDOWN\",\n            pygame.JOYBUTTONUP: \"JOYBUTTONUP\"\n        }\n        self.s1_switch_hold_map = s1_switch_hold_map\n        # self.hold_key = self.s1_switch_hold_map\n        # self.toggle_key = self.s1_switch_hold_map[\"toggle_key\"]\n        self.hole_key_status_map = {}\n        self.down_key_time = {}\n        # todo 添加监听手柄按键类型\n        joy_listener.connect_joystick(pygame.JOYBUTTONUP, self.monitor)\n        joy_listener.connect_joystick(pygame.JOYBUTTONDOWN, self.monitor)\n\n    def monitor(self, joystick, event):\n        if event.type in self.dict:\n            if event.type == pygame.JOYBUTTONDOWN:\n                self.hole_key_status_map[event.button] = time.time()\n            elif event.type == pygame.JOYBUTTONUP and event.button in self.hole_key_status_map:\n                self.hole_key_status_map.pop(event.button)\n\n            for (scene, key_map) in self.s1_switch_hold_map.items():\n                if str(event.button) in key_map[\"key\"] and scene not in self.threading_state_scene_map:\n                    self.logger.print_log(f\"切换层进入场景{scene}的识别\")\n                    self.threading_state_scene_map[scene] = True\n                    threading.Thread(target=self.monitor_thread, args=(joystick, scene, key_map)).start()\n\n    def monitor_thread(self, joystick, scene, key_map):\n        # todo 需要添加监听手柄舔包键长按之后触发识别\n        retry = 0\n        # 触发后背包判断后，开始识别，识别到背包中则按下切层，直到未识别到背包则松开并退出循环\n        # start = time.time()\n        detect_time = None\n        skip_detect = False\n        skip_delay = 0\n        toggle_key = key_map[\"toggle_key\"]\n        hold_key = key_map[\"key\"]\n        click_state = False\n        down_key_time = time.time()\n        while True:\n            for key in hold_key:\n                if key != \"toggle_key\" and int(key) in self.hole_key_status_map.keys():\n                    start_time = self.hole_key_status_map[int(key)]\n                    delay = hold_key[key][\"delay\"]\n\n                    if self.time_out(start_time, delay):\n                        detect_time = hold_key[key][\"detect_time\"]\n                        skip_detect = hold_key[key][\"skip_detect\"]\n                        if skip_detect:\n                            skip_delay = hold_key[key][\"skip_delay\"]\n                            if toggle_key in self.down_key_time and self.down_key_time[toggle_key][\"scene\"] != scene:\n                                self.logger.print_log(f\"已存在识别中的按键{toggle_key}，跳过不识别的检测\")\n                                self.finish_scence(scene)\n                                return\n                        self.logger.print_log(f\"按下{key}超过{delay}ms，开始识别{detect_time}ms\")\n                        break\n            if detect_time is not None:\n                break\n            time.sleep(0.001)\n\n        start_time = time.time()\n        detect_status = False\n        if skip_delay > 0:\n            time.sleep(skip_delay / 1000.0)\n\n        while True:\n            if not skip_detect or (skip_detect and click_state):\n                select_name, score = self.dynamic_size_image_comparator.compare_with_path(\n                    path=self.licking_state_path + scene + \"/\",\n                    images=None,\n                    lock_score=1,\n                    discard_score=0.6)\n                if score > 0.0:\n                    detect_status = True\n            else:\n                select_name, score = \"default\", 1\n\n            if not click_state:\n                if score > 0.0:\n                    click_state = True\n                    down_key_time = time.time()\n                    self.down_key_time[toggle_key] = {\"down_key_time\": down_key_time, \"scene\": scene}\n                    self.mouser_mover.key_down(Tools.convert_to_decimal(toggle_key))\n                    self.logger.print_log(f\"{scene}按下舔包键:{toggle_key}\")\n                    self.rea_snow_select_gun.close_key()\n                else:\n                    retry += 1\n                    self.logger.print_log(f\"{scene}未识别到，重试:{retry}\")\n                    if self.time_out(start_time, detect_time):\n                        break\n            elif click_state and score <= 0.0:\n                if not skip_detect or (skip_detect and (detect_status or self.time_out(start_time, detect_time))):\n                    if down_key_time == self.down_key_time[toggle_key][\"down_key_time\"]:\n                        self.mouser_mover.key_up(Tools.convert_to_decimal(toggle_key))\n                        self.down_key_time.pop(toggle_key)\n                        self.logger.print_log(f\"{scene}松开舔包键:{toggle_key}\")\n                        self.rea_snow_select_gun.click_current()\n                    else:\n                        self.logger.print_log(f\"{scene}跳过松开舔包键:{toggle_key}\")\n                    break\n                else:\n                    retry += 1\n                    self.logger.print_log(f\"{scene}未识别到，重试:{retry}\")\n\n        self.finish_scence(scene)\n\n    def time_out(self, start_time, detect_time):\n        \"\"\"\n            超时\n        \"\"\"\n        return int((time.time() - start_time) * 1000) > detect_time\n\n    def finish_scence(self, scene):\n        \"\"\"\n            结束场景\n        \"\"\"\n        self.threading_state_scene_map.pop(scene)\n        self.logger.print_log(f\"切换层结束场景{scene}的识别\")\n"
  },
  {
    "path": "core/joy_listener/__init__.py",
    "content": ""
  },
  {
    "path": "core/kmnet_listener/KmBoxNetListener.py",
    "content": "import time\nimport traceback\n\nfrom pynput.mouse import Button\n\nfrom mouse_mover.KmBoxNetMover import KmBoxNetMover\n\n\nclass KmBoxNetListener:\n    def __init__(self, km_box_net_mover: KmBoxNetMover, mouse_listener):\n        import kmNet\n        self.kmNet = kmNet\n        self.mouse_listener = mouse_listener\n        self.km_box_net_mover = km_box_net_mover\n        self.listener_sign = False\n        self.down_key_map = []\n        self.down_mouse_map = []\n        self.connect_func = []\n        self.connect_mouse_func = []\n        kmNet.monitor(10000)\n        # kmNet.unmask_all()\n        # kmNet.mask_keyboard(0x06)\n\n    def km_box_net_start(self):\n        self.listener_sign = True\n        print(\"km box net 监听启动\")\n        while self.listener_sign:\n            if self.kmNet.isdown_left():\n                if \"left\" not in self.down_mouse_map:\n                    self.down_mouse_map.append(\"left\")\n                    self.mouse_listener.on_click(*self.km_box_net_mover.get_position(), Button.left, True)\n            else:\n                if \"left\" in self.down_mouse_map:\n                    self.down_mouse_map.remove(\"left\")\n                    self.mouse_listener.on_click(*self.km_box_net_mover.get_position(), Button.left, False)\n\n            if self.kmNet.isdown_right():\n                if \"right\" not in self.down_mouse_map:\n                    self.down_mouse_map.append(\"right\")\n                    self.mouse_listener.on_click(*self.km_box_net_mover.get_position(), Button.right, True)\n            else:\n                if \"right\" in self.down_mouse_map:\n                    self.down_mouse_map.remove(\"right\")\n                    self.mouse_listener.on_click(*self.km_box_net_mover.get_position(), Button.right, False)\n\n            if self.kmNet.isdown_middle():\n                if \"middle\" not in self.down_mouse_map:\n                    self.down_mouse_map.append(\"middle\")\n                    self.mouse_listener.on_click(*self.km_box_net_mover.get_position(), Button.middle, True)\n            else:\n                if \"middle\" in self.down_mouse_map:\n                    self.down_mouse_map.remove(\"middle\")\n                    self.mouse_listener.on_click(*self.km_box_net_mover.get_position(), Button.middle, False)\n\n            if self.kmNet.isdown_side1():\n                if \"x1\" not in self.down_mouse_map:\n                    self.down_mouse_map.append(\"x1\")\n                    self.mouse_listener.on_click(*self.km_box_net_mover.get_position(), Button.x1, True)\n\n            else:\n                if \"x1\" in self.down_mouse_map:\n                    self.down_mouse_map.remove(\"x1\")\n                    self.mouse_listener.on_click(*self.km_box_net_mover.get_position(), Button.x1, False)\n            if self.kmNet.isdown_side2():\n                if \"x2\" not in self.down_mouse_map:\n                    self.down_mouse_map.append(\"x2\")\n                    self.mouse_listener.on_click(*self.km_box_net_mover.get_position(), Button.x2, True)\n            else:\n                if \"x2\" in self.down_mouse_map:\n                    self.down_mouse_map.remove(\"x2\")\n                    self.mouse_listener.on_click(*self.km_box_net_mover.get_position(), Button.x2, False)\n\n            for func in self.connect_mouse_func:\n                func(self.down_mouse_map)\n\n            for func in self.connect_func:\n                try:\n                    func()\n                except:\n                    traceback.print_exc()\n            time.sleep(0.01)\n        print(\"km box net 监听结束\")\n\n    def stop(self):\n        \"\"\"\n            销毁\n        \"\"\"\n        self.listener_sign = False\n        self.connect_func.clear()\n\n    def connect(self, func):\n        \"\"\"\n\n        :param func:\n        \"\"\"\n        self.connect_func.append(func)\n\n    def connect_mouse_listner(self, func):\n        \"\"\"\n\n        :param func:\n        \"\"\"\n        self.connect_mouse_func.append(func)\n"
  },
  {
    "path": "core/kmnet_listener/ToggleKeyListener.py",
    "content": "import time\n\nfrom core.kmnet_listener.KmBoxNetListener import KmBoxNetListener\nfrom log import LogFactory\nfrom mouse_mover.MouseMover import MouseMover\nfrom tools.Tools import Tools\n\n\nclass ToggleKeyListener:\n    \"\"\"\n        监听kmnet 关于辅助开关键的实现\n    \"\"\"\n\n    def __init__(self, km_box_net_listener: KmBoxNetListener, delayed_activation_key_list,\n                 mouse_mover: MouseMover, c1_mouse_mover: MouseMover, toggle_hold_key, game_windows_status):\n        import kmNet\n        self.kmNet = kmNet\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.mouse_mover = mouse_mover\n        self.c1_mouse_mover = c1_mouse_mover\n        self.km_box_net_listener = km_box_net_listener\n        self.game_windows_status = game_windows_status\n        # 自定义按住延迟转换\n        self.delayed_activation_key_status_map = {}\n        self.delayed_activation_key_list = [(Tools.convert_to_decimal(key), value) for key, value in\n                                            delayed_activation_key_list.items()]\n        km_box_net_listener.connect(self.delayed_activation)\n\n        # 自定义切换按住键\n        self.key_status_map = {}\n        self.toggle_hold_key = toggle_hold_key\n        self.toggle_close_key = {}\n\n        for key in self.toggle_hold_key:\n            close_keys = self.toggle_hold_key[key]\n            for close_key in close_keys:\n                if close_key not in self.toggle_close_key:\n                    self.toggle_close_key[close_key] = []\n                if Tools.convert_to_decimal(key) is None:\n                    continue\n                self.toggle_close_key[close_key].append(key)\n\n        self.mask_toggle_key()\n        km_box_net_listener.connect(self.toggle_change)\n\n    def mask_toggle_key(self):\n        self.kmNet.unmask_all()\n        for key in self.toggle_hold_key:\n            self.kmNet.mask_keyboard(Tools.convert_to_decimal(key))\n            self.key_status_map[key] = ToggleKey()\n\n    def toggle_change(self):\n        if not self.game_windows_status.get_game_windows_status():\n            return\n        for key in self.toggle_hold_key:\n            num_key = Tools.convert_to_decimal(key)\n            if num_key is None:\n                continue\n            hold_status = self.kmNet.isdown_keyboard(num_key) == 1\n            toggle_key_status = self.key_status_map[key]\n\n            if not toggle_key_status.last_hold_status and hold_status:\n                toggle_key_status.toggle()\n                if toggle_key_status.toggle_status:\n                    self.logger.print_log(f\"启动长按\" + key)\n                    self.mouse_mover.key_down(num_key)\n                else:\n                    self.logger.print_log(f\"关闭长按\" + key)\n                    self.mouse_mover.key_up(num_key)\n            toggle_key_status.hold(hold_status)\n\n        for close_key in self.toggle_close_key:\n            num_close_key = Tools.convert_to_decimal(close_key)\n            if num_close_key is None:\n                continue\n            hold_status = self.kmNet.isdown_keyboard(num_close_key) == 1\n            if not hold_status:\n                continue\n            keys = self.toggle_close_key[close_key]\n            for key in keys:\n                if key not in self.key_status_map:\n                    continue\n                toggle_key_status = self.key_status_map[key]\n                if toggle_key_status.toggle_status:\n                    self.logger.print_log(f\"关闭长按\" + key)\n                    self.mouse_mover.key_up(Tools.convert_to_decimal(key))\n                    toggle_key_status.toggle()\n\n    def controller_toggle_hold_change(self, key):\n        if key in self.toggle_close_key:\n            keys = self.toggle_close_key[key]\n            for key in keys:\n                if key not in self.key_status_map:\n                    continue\n                toggle_key_status = self.key_status_map[key]\n                if toggle_key_status.toggle_status:\n                    self.logger.print_log(f\"关闭长按\" + key)\n                    self.mouse_mover.key_up(Tools.convert_to_decimal(key))\n                    toggle_key_status.toggle()\n\n    def delayed_activation(self):\n        if not self.game_windows_status.get_game_windows_status():\n            return\n        for key, delayed_param in self.delayed_activation_key_list:\n            key_time = delayed_param[\"delay\"] if \"delay\" in delayed_param else None\n            up_deactivation = delayed_param[\"up_deactivation\"]\n            down_deactivation = delayed_param[\"down_deactivation\"]\n            click_key = delayed_param[\"click_key\"] if \"click_key\" in delayed_param else None\n            click_keys = delayed_param[\"click_keys\"] if \"click_keys\" in delayed_param else None\n\n            hold_status = self.kmNet.isdown_keyboard(key) == 1\n\n            if hold_status:\n                if click_keys is None:\n                    if key not in self.delayed_activation_key_status_map:\n                        self.delayed_activation_key_status_map[key] = DelayedActivationKey()\n\n                    delayed_activation_key_status = self.delayed_activation_key_status_map[key]\n                    if down_deactivation:\n                        if (int((time.time() - delayed_activation_key_status.hold_time) * 1000) >= key_time\n                                and not delayed_activation_key_status.handle):\n                            delayed_activation_key_status.handle = True\n                            self.logger.print_log(f\"持续按下{key},{key_time}ms，转换器开关按下：[{click_key}]\")\n                            # 转换器切换键\n                            self.mouse_mover.click_key(Tools.convert_to_decimal(click_key))\n                else:\n                    if down_deactivation:\n                        for click_key_item in click_keys:\n                            key_time = click_key_item[\"delay\"]\n                            click_key = click_key_item[\"click_key\"]\n                            if key not in self.delayed_activation_key_status_map:\n                                self.delayed_activation_key_status_map[key] = DelayedActivationKey()\n\n                            delayed_activation_key_status = self.delayed_activation_key_status_map[key]\n                            if (int((time.time() - delayed_activation_key_status.hold_time) * 1000) >= key_time\n                                    and not delayed_activation_key_status.in_handle_list(key_time)):\n                                delayed_activation_key_status.list_handle(key_time)\n                                self.logger.print_log(f\"持续按下{key},{key_time}ms，转换器开关按下：[{click_key}]\")\n                                # 转换器切换键\n                                self.mouse_mover.click_key(Tools.convert_to_decimal(click_key))\n\n            else:\n                if key in self.delayed_activation_key_status_map:\n                    if up_deactivation:\n                        delayed_activation_key_status = self.delayed_activation_key_status_map[key]\n                        # 转换器切换键\n                        if delayed_activation_key_status.handle:\n                            self.logger.print_log(f\"持续按下{key}后弹起，转换器开关按下：[{click_key}]\")\n                            self.mouse_mover.click_key(Tools.convert_to_decimal(click_key))\n                        else:\n                            if click_keys is None:\n                                if int((time.time() - delayed_activation_key_status.hold_time) * 1000) >= key_time:\n                                    self.logger.print_log(f\"按下{key}开关，转换器开关按下：[{click_key}]\")\n                                    self.mouse_mover.click_key(Tools.convert_to_decimal(click_key))\n                            else:\n                                click_keys = sorted(click_keys, key=lambda x: x[\"delay\"], reverse=True)\n                                for click_key_item in click_keys:\n                                    key_time = click_key_item[\"delay\"]\n                                    click_key = click_key_item[\"click_key\"]\n                                    if int((time.time() - delayed_activation_key_status.hold_time) * 1000) >= key_time:\n                                        if click_key is not None:\n                                            self.logger.print_log(\n                                                f\"符合按键时长{key_time}，按下{key}开关，转换器开关按下：[{click_key}]\")\n                                            self.mouse_mover.click_key(Tools.convert_to_decimal(click_key))\n                                        break\n                    self.delayed_activation_key_status_map.pop(key)\n\n    def destory(self):\n        self.kmNet.unmask_all()\n\n\nclass DelayedActivationKey:\n    \"\"\"\n        开关状态\n    \"\"\"\n\n    def __init__(self):\n        self.hold_time = time.time()\n        self.handle = False\n        self.handle_list = dict()\n\n    def in_handle_list(self, delay):\n        return delay in self.handle_list and self.handle_list[delay]\n\n    def list_handle(self, delay):\n        self.handle_list[delay] = True\n\n\nclass ToggleKey:\n    \"\"\"\n        开关状态\n    \"\"\"\n\n    def __init__(self):\n        self.last_hold_status = False\n        self.toggle_status = False\n\n    def toggle(self):\n        self.toggle_status = not self.toggle_status\n\n    def hold(self, status):\n        self.last_hold_status = status\n"
  },
  {
    "path": "core/kmnet_listener/__init__.py",
    "content": ""
  },
  {
    "path": "core/screentaker/CapScreenTaker.py",
    "content": "import cv2\n\nfrom core.screentaker.ScreenTaker import ScreenTaker\nfrom log import LogFactory\n\n\nclass CapScreenTaker(ScreenTaker):\n    \"\"\"\n        本地截图\n    \"\"\"\n\n    def __init__(self, cap_param):\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.width = cap_param[\"width\"]\n        self.height = cap_param[\"height\"]\n        self.frame_rate = cap_param[\"frame_rate\"]\n        self.format = cap_param[\"format\"]\n        self.cap = cv2.VideoCapture(0)  # 视频流\n        # self.cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1920)\n        # self.cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 1080)\n        self.cap.set(cv2.CAP_PROP_FRAME_WIDTH, self.width)\n        self.cap.set(cv2.CAP_PROP_FRAME_HEIGHT, self.height)\n        self.cap.set(cv2.CAP_PROP_FPS, self.frame_rate)\n        self.cap.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter_fourcc(*self.format))\n        self.logger.print_log(f\"使用视频采集卡：{cap_param}\")\n\n    def get_images_from_bbox(self, bbox_list):\n        frames = []\n        ret, frame = self.cap.read()\n        for monitor in bbox_list:\n            frames.append(frame[monitor[1]: monitor[3], monitor[0]: monitor[2]])\n        return list(frames)\n"
  },
  {
    "path": "core/screentaker/LocalMssScreenTaker.py",
    "content": "import mss\n\nfrom core.screentaker.ScreenTaker import ScreenTaker\nfrom log import LogFactory\n\n\nclass LocalMssScreenTaker(ScreenTaker):\n    \"\"\"\n        本地截图\n    \"\"\"\n\n    def __init__(self):\n        self.logger = LogFactory.getLogger(self.__class__)\n\n    def get_images_from_bbox(self, bbox_list):\n        \"\"\"\n        Get images from specified bounding boxes.\n\n        :param bbox_list: List of bounding boxes [(x1, y1, x2, y2), ...]\n        :return: Generator yielding images\n        \"\"\"\n\n        try:\n            with mss.mss() as sct:\n                return list(\n                    sct.grab({'top': bbox[1], 'left': bbox[0], 'width': bbox[2] - bbox[0], 'height': bbox[3] - bbox[1]})\n                    for bbox in bbox_list)\n        except Exception as e:\n            self.logger.print_log(f\"Error in get_images_from_bbox: {e}\")\n"
  },
  {
    "path": "core/screentaker/LocalScreenTaker.py",
    "content": "from PIL import ImageGrab\n\nfrom core.screentaker.ScreenTaker import ScreenTaker\nfrom log import LogFactory\n\n\nclass LocalScreenTaker(ScreenTaker):\n    \"\"\"\n        本地截图\n    \"\"\"\n\n    def __init__(self):\n        self.logger = LogFactory.getLogger(self.__class__)\n\n    def get_images_from_bbox(self, bbox_list):\n        \"\"\"\n        Get images from specified bounding boxes.\n\n        :param bbox_list: List of bounding boxes [(x1, y1, x2, y2), ...]\n        :return: Generator yielding images\n        \"\"\"\n\n        try:\n            return list(ImageGrab.grab(bbox=bbox) for bbox in bbox_list)\n        except Exception as e:\n            self.logger.print_log(f\"Error in get_images_from_bbox: {e}\")\n"
  },
  {
    "path": "core/screentaker/ScreenTaker.py",
    "content": "class ScreenTaker:\n\n    def get_images_from_bbox(self, bbox_list):\n        \"\"\"\n            截图\n        \"\"\"\n        pass\n"
  },
  {
    "path": "core/screentaker/ScreenTakerFactory.py",
    "content": "from core.screentaker.CapScreenTaker import CapScreenTaker\nfrom core.screentaker.LocalMssScreenTaker import LocalMssScreenTaker\nfrom net.socket.SocketScreenTaker import SocketScreenTaker\n\n\ndef get_screen_taker(config):\n    \"\"\"\n        根据配置获取截图器\n    \"\"\"\n    screen_taker = config.screen_taker\n    if screen_taker == \"local\":\n        return LocalMssScreenTaker()\n    elif screen_taker == \"distributed\":\n        return SocketScreenTaker((config.distributed_param[\"ip\"], config.distributed_param[\"port\"]))\n    elif screen_taker == 'cap':\n        return CapScreenTaker(config.cap_param)\n"
  },
  {
    "path": "core/screentaker/__init__.py",
    "content": ""
  },
  {
    "path": "demo.py",
    "content": "import time\n\nimport kmNet\n\n# import time\n\nkmNet.init('192.168.2.188', '35368', '8A6E5C53')  # 连接盒子0\ntime.sleep(1)\nkmNet.keydown(78)\nkmNet.keyup(78)\n# kmNet.unmask_all()/*# kmNet.monitor(10000)-\n# while True:\n#     print(kmNet.isdown_keyboard(0xE0) == 1)+\n\"\"\"-   0x2D    0x56-\n+   0x2E    0x57\n[   0x2F\n]   0x30\n\\   0x31\n;   0x33\n'   0x34\n`   0x35\n,   0x36\n.   0x37    0x63\n/   0x38\nCAPS LOCK   0x39\nINSERT  0x49\nPAGEUP   0x4B\nPAGEDN  0x4E+\nDELETE  0x4C\nUP  0x52\nDOWN    0x51\nLEFT    0x50\nSCRLK   0x47\nPAUSE   0x48\n\n\n\"\"\"\n"
  },
  {
    "path": "images/1920x1080/list.txt",
    "content": "3030.png\ncar.png\nEVA-8.png\nG7.png\nlstart.png\np2020.png\nR99.png\nR-301.png\nre-45.png\n三重.png\n专注.png\n充能步枪.png\n克雷贝尔.png\n和平捍卫者.png\n哈沃克.png\n哨兵.png\n喷火.png\n复仇女神.png\n小帮手.png\n平行步枪.png\n手刀.png\n敖犬.png\n暴走.png\n汗洛.png\n波塞克.png\n猎兽.png\n电能.png\n莫桑比克.png\n转换者.png\n长弓.png"
  },
  {
    "path": "images/1920x1200/list.txt",
    "content": "3030.jpg\ncar.jpg\nEVA-8.jpg\nG7.jpg\nlstart.jpg\np2020.jpg\nR99.jpg\nR-301.jpg\nre-45.jpg\n三重.jpg\n专注.jpg\n充能步枪.jpg\n克雷贝尔.jpg\n和平捍卫者.jpg\n哈沃克.jpg\n哨兵.jpg\n喷火.jpg\n复仇女神.jpg\n小帮手.jpg\n平行步枪.jpg\n手刀.jpg\n敖犬.jpg\n暴走.jpg\n汗洛.jpg\n波塞克.jpg\n猎兽.jpg\n电能.jpg\n莫桑比克.jpg\n转换者.jpg\n长弓.jpg"
  },
  {
    "path": "images/2048x1152/list.txt",
    "content": "3030.png\ncar.png\nEVA-8.png\nG7.png\nlstart.png\np2020.png\nR99.png\nR-301.png\nre-45.png\n三重.png\n专注.png\n充能步枪.png\n克雷贝尔.png\n和平捍卫者.png\n哈沃克.png\n哨兵.png\n喷火.png\n复仇女神.png\n小帮手.png\n平行步枪.png\n手刀.png\n敖犬.png\n暴走.png\n汗洛.png\n波塞克.png\n猎兽.png\n电能.png\n莫桑比克.png\n转换者.png\n长弓.png"
  },
  {
    "path": "images/2560x1440/list.txt",
    "content": "3030.jpg\ncar.jpg\nEVA-8.jpg\nG7.jpg\nlstart.jpg\np2020.jpg\nR99.jpg\nR-301.jpg\nre-45.jpg\n三重.jpg\n专注.jpg\n充能步枪.jpg\n克雷贝尔.jpg\n和平捍卫者.jpg\n哈沃克.jpg\n哨兵.jpg\n喷火.jpg\n复仇女神.jpg\n小帮手.jpg\n平行步枪.jpg\n手刀.jpg\n敖犬.jpg\n暴走.jpg\n汗洛.jpg\n波塞克.jpg\n猎兽.jpg\n电能.jpg\n莫桑比克.jpg\n转换者.jpg\n长弓.jpg"
  },
  {
    "path": "images/hop_up/1920x1080/list.txt",
    "content": "turbocharger.png"
  },
  {
    "path": "images/hop_up/2560x1440/list.txt",
    "content": "turbocharger.png"
  },
  {
    "path": "images/scope/1920x1080/list.txt",
    "content": "1x-2xVariableHolo.png\n1xClassic.png\n1xDigitalThreat.png\n1xHolo.png\n2xBruiser.png\n3xRanger.png\n4xVariableAOG.png"
  },
  {
    "path": "images/scope/2560x1440/list.txt",
    "content": "1x-2xVariableHolo.png\n1xClassic.png\n1xDigitalThreat.png\n1xHolo.png\n2xBruiser.png\n3xRanger.png\n4xVariableAOG.png"
  },
  {
    "path": "log/LogFactory.py",
    "content": "import json\nimport os.path\n\nfrom log.LogWindow import LogWindow\nfrom log.Logger import Logger\n\ncurrent_logger: Logger = None\n\n\ndef init_logger(log_mode=\"console\", windows_name=\"AG\"):\n    \"\"\"\n        初始化全局日志打印\n    \"\"\"\n    global current_logger\n    if \"console\" == log_mode:\n        current_logger = Logger()\n    else:\n        current_logger = LogWindow(windows_name)\n\n\ndef logger():\n    \"\"\"\n        获取当前全局日志打印\n    \"\"\"\n    return current_logger\n\n\ndef getLogger(cls):\n    \"\"\"\n        获取打印日志实峛\n    \"\"\"\n    return MultipleLogger(cls)\n\n\nlog_map = {}\nlog_json = \"config/log.json\"\nif os.path.exists(log_json):\n    with open(log_json, encoding='utf-8') as file:\n        log_map = json.load(file)\n\n\ndef prefix_search(full_path):\n    \"\"\"\n        前缀匹配\n    \"\"\"\n    longest_prefix = (0, \"\")\n    for (key, value) in log_map.items():\n        if full_path.startswith(key):\n            max_length, log_type = longest_prefix\n            length = len(key.split(\".\"))\n            if length > max_length:\n                longest_prefix = (length, value)\n    return longest_prefix\n\n\nclass MultipleLogger(Logger):\n    def __init__(self, cls):\n        self.cls = cls\n        self.full_path = f\"{cls.__module__}.{cls.__name__}\"\n\n    def print_log(self, text, log_type=\"default\"):\n        if current_logger is None:\n            init_logger(log_map[\"log_mode\"])\n\n        length, search_log_type = prefix_search(self.full_path)\n        if length != 0:\n            current_logger.print_log(text, search_log_type)\n        else:\n            current_logger.print_log(text, log_type)\n"
  },
  {
    "path": "log/LogWindow.py",
    "content": "import os\nimport time\nimport traceback\n\nfrom PyQt5.QtCore import Qt, QThread, pyqtSignal\nfrom PyQt5.QtWidgets import QMainWindow, QTextEdit, QVBoxLayout, QWidget, QApplication, QTabWidget\n\nfrom log.Logger import Logger\nfrom tools.Tools import Tools\n\n\nclass LogWindow(QMainWindow, Logger):\n    \"\"\"\n        日志窗口\n    \"\"\"\n    # 类变量用于保存单例实例\n    _instance = None\n\n    def __new__(cls, *args, **kwargs):\n        if not cls._instance:\n            cls._instance = super().__new__(cls)\n        return cls._instance\n\n    def __init__(self, windows_name=\"Apex gun\"):\n        super().__init__()\n        if not hasattr(self, 'log_text'):\n            self.tab_widget = None\n            self.log_texts = {}\n            self.log_queue = Tools.GetBlockQueue(name='log_queue', maxsize=1000)\n            self.setWindowTitle(windows_name)\n            self.init_ui()\n            # 实例化对象\n            self.print_log_thread = PrintLogThread(self.log_queue)\n            # 信号连接到界面显示槽函数\n            self.print_log_thread.log_signal.connect(self.real_print)\n            # 多线程开始\n            self.print_log_thread.start()\n            self.setWindowFlags(Qt.WindowStaysOnTopHint)\n        self.show()\n\n    def init_ui(self):\n        \"\"\"\n            初始化UI\n        \"\"\"\n        self.setGeometry(100, 100, 600, 300)\n        # 创建 QTextEdit 组件用于显示日志\n        self.tab_widget = QTabWidget()\n\n        # 添加 QTextEdit 组件到主窗口\n        layout = QVBoxLayout()\n        layout.addWidget(self.tab_widget)\n\n        container = QWidget()\n        container.setLayout(layout)\n        self.setCentralWidget(container)\n\n    def print_log(self, log, log_type=\"default\"):\n        \"\"\"\n            打印日志\n        :param log:\n        :param log_type:\n        \"\"\"\n        self.log_queue.put((log, log_type))\n\n    def closeEvent(self, event):\n        \"\"\"\n            关闭事件\n        :param event:\n        \"\"\"\n        QApplication.quit()\n        os._exit(0)\n\n    def real_print(self, log_data):\n        \"\"\"\n            真实打印函数\n        :param log_data:\n        \"\"\"\n        log, log_type = log_data\n        if log_type not in self.log_texts:\n            self.add_log_tab(log_type)\n        log_text = self.log_texts[log_type]\n        log_text.append(log)\n        log_text.moveCursor(log_text.textCursor().End)\n        super().print_log(text=log)\n\n    def add_log_tab(self, log_type):\n        \"\"\"\n            添加日志类型标签页\n        :param log_type:\n        \"\"\"\n        log_text = QTextEdit()\n        log_text.document().setMaximumBlockCount(1000)\n        log_text.setReadOnly(True)\n        self.tab_widget.addTab(log_text, log_type)\n        self.log_texts[log_type] = log_text\n\n\nclass PrintLogThread(QThread):\n    \"\"\"\n        使用信号槽来多线程更新ui\n    \"\"\"\n    log_signal = pyqtSignal(tuple)\n\n    def __init__(self, log_queue: Tools.GetBlockQueue):\n        super().__init__()\n        self.log_queue = log_queue\n\n    def run(self):\n        \"\"\"\n            避免多线程影响ui，在一个线程中启动队列消费打印\n        \"\"\"\n        self.log_signal.emit((\"打印日志线程启动\", \"default\"))\n        while True:\n            try:\n                log_data = self.log_queue.get()\n                self.log_signal.emit(log_data)\n            except Exception as e:\n                print(e)\n                traceback.print_exc()\n                time.sleep(0.1)\n"
  },
  {
    "path": "log/Logger.py",
    "content": "import inspect\nimport os\n\nmax_length = 0\n\n\nclass Logger:\n    \"\"\"\n        日志抽象\n    \"\"\"\n\n    def print_log(self, text, log_type=\"default\"):\n        \"\"\"\n            打印日志\n        :param text:\n        :param log_type:\n        \"\"\"\n        global max_length\n        # 获取被调用函数所在模块文件名\n        file_path = inspect.stack()[2][1]\n\n        (filepath, file_name) = os.path.split(file_path)\n        (file_name, extension) = os.path.splitext(file_name)\n        func_name = inspect.stack()[2][3]\n        line_num = inspect.stack()[2][2]\n        text_split = text.split(\"\\n\")\n        log_text = f'[{file_name}:{func_name}][{line_num}]'\n        max_length = max(max_length, len(log_text))\n        for content in text_split:\n            print(str.ljust(log_text, max_length) + content)\n"
  },
  {
    "path": "log/__init__.py",
    "content": ""
  },
  {
    "path": "mouse_mover/FeiMover.py",
    "content": "import ctypes\n\nfrom log import LogFactory\nfrom mouse_mover.MouseMover import MouseMover\n\n\nclass FeiMover(MouseMover):\n    def __init__(self, mouse_mover_param):\n        # 进程内注册插件,模块所在的路径按照实际位置修改\n        super().__init__(mouse_mover_param)\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.init_dll()\n        self.dll = self.init_dll()\n        vid_pid = mouse_mover_param[\"VID/PID\"]\n        vid = int(vid_pid[:4], 16)\n        pid = int(vid_pid[4:], 16)\n        self.hdl = self.dll.M_Open_VidPid(vid, pid)\n\n    def move_rp(self, short_x: int, short_y: int):\n        self.dll.M_MoveR(self.hdl, short_x, short_y)\n\n    def move(self, short_x: int, short_y: int):\n        self.dll.M_MoveR2(self.hdl, short_x, short_y)\n\n    def left_click(self):\n        self.dll.M_LeftClick(self.hdl, 1)\n\n    def click_key(self, value):\n        self.dll.M_KeyPress(self.hdl, value, 1)\n\n    def key_down(self, value):\n        self.dll.M_KeyDown(self.hdl, value)\n\n    def key_up(self, value):\n        self.dll.M_KeyUp(self.hdl, value)\n\n    def init_dll(self):\n        objdll = ctypes.cdll.LoadLibrary(r\".\\msdk.dll\")\n        # 定义函数原型\n        M_Open = objdll.M_Open\n        M_Open.argtypes = [ctypes.c_int]\n        M_Open.restype = ctypes.c_void_p\n\n        M_Open_VidPid = objdll.M_Open_VidPid\n        M_Open_VidPid.argtypes = [ctypes.c_int, ctypes.c_int]\n        M_Open_VidPid.restype = ctypes.c_void_p\n\n        M_KeyPress = objdll.M_KeyPress\n        M_KeyPress.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_int]\n        M_KeyPress.restype = ctypes.c_int\n\n        M_KeyDown = objdll.M_KeyDown\n        M_KeyDown.argtypes = [ctypes.c_void_p, ctypes.c_int]\n        M_KeyDown.restype = ctypes.c_int\n\n        M_KeyUp = objdll.M_KeyUp\n        M_KeyUp.argtypes = [ctypes.c_void_p, ctypes.c_int]\n        M_KeyUp.restype = ctypes.c_int\n\n        M_LeftClick = objdll.M_LeftClick\n        M_LeftClick.argtypes = [ctypes.c_void_p, ctypes.c_int]\n        M_LeftClick.restype = ctypes.c_int\n\n        M_LeftDown = objdll.M_LeftDown\n        M_LeftDown.argtypes = [ctypes.c_void_p]\n        M_LeftDown.restype = ctypes.c_int\n\n        M_LeftUp = objdll.M_LeftUp\n        M_LeftUp.argtypes = [ctypes.c_void_p, ctypes.c_int]\n        M_LeftUp.restype = ctypes.c_int\n\n        M_RightClick = objdll.M_RightClick\n        M_RightClick.argtypes = [ctypes.c_void_p, ctypes.c_int]\n        M_RightClick.restype = ctypes.c_int\n\n        M_RightDown = objdll.M_RightDown\n        M_RightDown.argtypes = [ctypes.c_void_p]\n        M_RightDown.restype = ctypes.c_int\n\n        M_RightUp = objdll.M_RightUp\n        M_RightUp.argtypes = [ctypes.c_void_p]\n        M_RightUp.restype = ctypes.c_int\n\n        # 拟人移动\n        M_MoveR2 = objdll.M_MoveR2\n        M_MoveR2.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_int]\n        M_MoveR2.restype = ctypes.c_int\n\n        # 无拟人移动\n        M_MoveR = objdll.M_MoveR\n        M_MoveR.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_int]\n        M_MoveR.restype = ctypes.c_int\n\n        M_Close = objdll.M_Close\n        M_Close.argtypes = [ctypes.c_void_p]\n        M_Close.restype = ctypes.c_int\n        return objdll\n"
  },
  {
    "path": "mouse_mover/GHubMover.py",
    "content": "from ctypes import CDLL\n\nfrom log import LogFactory\nfrom mouse_mover.MouseMover import MouseMover\n\n\nclass GHubMover(MouseMover):\n    def __init__(self, mouse_mover_param):\n        super().__init__(mouse_mover_param)\n        self.logger = LogFactory.getLogger(self.__class__)\n        try:\n            self.gm = CDLL(r'./ghub_device.dll')\n            self.gmok = self.gm.device_open() == 1\n            if not self.gmok:\n                print('未安装ghub或者lgs驱动!!!')\n            else:\n                print('初始化成功!')\n        except FileNotFoundError:\n            print('缺少文件')\n\n    def move_rp(self, x: int, y: int, re_cut_size=0):\n        self.move(x, y)\n\n    def move(self, x: int, y: int):\n        self.gm.moveR(int(x), int(y), False)\n\n    def left_click(self):\n        self.click_mouse_button(1)\n\n    def click_mouse_button(self, button):\n        self.press_mouse_button(button)\n        self.release_mouse_button(button)\n\n    # 按下鼠标按键\n    def press_mouse_button(self, button):\n        if self.gmok:\n            self.gm.mouse_down(button)\n\n    # 松开鼠标按键\n    def release_mouse_button(self, button):\n        if self.gmok:\n            self.gm.mouse_up(button)\n"
  },
  {
    "path": "mouse_mover/IntentManager.py",
    "content": "import threading\nimport time\n\nfrom log import LogFactory\nfrom mouse_mover.MouseMover import MouseMover\n\nintention = None\n\n\nclass IntentManager:\n    \"\"\"\n        意图管理器，负责推送移动意图\n    \"\"\"\n\n    def __init__(self, mouse_mover: MouseMover):\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.intention = None\n        self.change_coordinates_num = 0\n        self.mouse_mover = mouse_mover\n        self.intention_lock = threading.Lock()\n\n    def set_intention(self, x, y):\n        \"\"\"\n            设置移动意图\n        :param x:\n        :param y:\n        \"\"\"\n        self.intention_lock.acquire()\n        try:\n            self.intention = (x, y)\n            self.change_coordinates_num += 1\n        finally:\n            # 释放锁\n            self.intention_lock.release()\n\n    def start(self):\n        \"\"\"\n            开始读取移动意图并移动\n        \"\"\"\n        sleep_time = 0.01\n        while True:\n            if self.intention is not None:\n                (x, y) = self.intention\n                while x != 0 or y != 0:\n                    self.intention_lock.acquire()\n                    try:\n                        (x, y) = self.intention\n                        move_step_temp = 1\n                        move_step_y_temp = 1\n                        move_up = min(move_step_temp, abs(x)) * (1 if x > 0 else -1)\n                        move_down = min(move_step_y_temp, abs(y)) * (1 if y > 0 else -1)\n                        if x == 0:\n                            move_up = 0\n                        elif y == 0:\n                            move_down = 0\n                        x -= move_up\n                        y -= move_down\n                        self.intention = (x, y)\n                    finally:\n                        self.intention_lock.release()\n                    self.mouse_mover.move_rp(int(move_up), int(move_down))\n                self.intention = None\n                sleep_time = 0.001\n            time.sleep(sleep_time)\n            self.change_coordinates_num = 0\n"
  },
  {
    "path": "mouse_mover/KmBoxMover.py",
    "content": "import ctypes\n\nfrom log import LogFactory\nfrom mouse_mover.MouseMover import MouseMover\n\n\nclass KmBoxMover(MouseMover):\n\n    def __init__(self, mouse_mover_param):\n        # 初始化\n        # dll地址\n        super().__init__(mouse_mover_param)\n        self.logger = LogFactory.getLogger(self.__class__)\n        vid_pid = mouse_mover_param[\"VID/PID\"]\n        self.km_box_A = ctypes.cdll.LoadLibrary(r\".\\kmbox_dll_64bit.dll\")\n        self.km_box_A.KM_init.argtypes = [ctypes.c_ushort, ctypes.c_ushort]\n        self.km_box_A.KM_init.restype = ctypes.c_ushort\n        self.km_box_A.KM_move.argtypes = [ctypes.c_short, ctypes.c_short]\n        self.km_box_A.KM_move.restype = ctypes.c_int\n        vid = int(vid_pid[:4], 16)\n        pid = int(vid_pid[4:], 16)\n        # 连接km_box_VER a\n        ts = self.km_box_A.KM_init(ctypes.c_ushort(vid), ctypes.c_ushort(pid))\n        self.logger.print_log(\"初始化:{}\".format(ts))\n\n    def left_click(self):\n        # 左键\n        self.left(1)\n        self.left(0)\n\n    def left(self, vk_key: int):\n        \"\"\"\n            鼠标左键控制 0松开 1按下\n        \"\"\"\n        # 左键\n        self.km_box_A.KM_left(ctypes.c_char(vk_key))\n\n    def move_rp(self, short_x: int, short_y: int):\n        self.move(short_x, short_y)\n\n    def move(self, short_x: int, short_y: int):\n        \"\"\"\n        鼠标相对移动\n        x\t\t:鼠标X轴方向移动距离\n        y\t\t:鼠标Y轴方向移动距离\n        返回值：\n                -1：发送失败\\n\n                0：发送成功\\n\n        \"\"\"\n        self.km_box_A.KM_move(short_x, short_y)\n"
  },
  {
    "path": "mouse_mover/KmBoxNetMover.py",
    "content": "from log import LogFactory\nfrom mouse_mover.MouseMover import MouseMover\n\n\nclass KmBoxNetMover(MouseMover):\n\n    def __init__(self, mouse_mover_param):\n        import kmNet\n        self.kmNet = kmNet\n        # 初始化\n        super().__init__(mouse_mover_param)\n        self.logger = LogFactory.getLogger(self.__class__)\n        ip = mouse_mover_param[\"ip\"]\n        port = mouse_mover_param[\"port\"]\n        uuid = mouse_mover_param[\"uuid\"]\n        self.kmNet.init(ip, port, uuid)  # 连接盒子\n        self.listener = None\n        self.toggle_key_listener = None\n\n    def left_click(self):\n        # 左键\n        self.left(1)\n        self.left(0)\n\n    def left(self, vk_key: int):\n        \"\"\"\n            鼠标左键控制 0松开 1按下\n        \"\"\"\n        # 左键\n        self.kmNet.left(1)\n        self.kmNet.left(0)\n\n    def move_rp(self, short_x: int, short_y: int, re_cut_size=0):\n        self.kmNet.move(short_x, short_y)\n\n    def move(self, short_x: int, short_y: int):\n        \"\"\"\n        鼠标相对移动\n        x\t\t:鼠标X轴方向移动距离\n        y\t\t:鼠标Y轴方向移动距离\n        返回值：\n                -1：发送失败\\n\n                0：发送成功\\n\n        \"\"\"\n\n        self.kmNet.move_auto(short_x, short_y, int(max(5, short_x / 10, short_y / 10)))\n\n    def destroy(self):\n        \"\"\"\n            销毁\n        \"\"\"\n        if self.listener is not None:\n            self.listener.stop()\n        if self.toggle_key_listener is not None:\n            self.toggle_key_listener.destory()\n\n    def click_key(self, value):\n        self.kmNet.keydown(value)\n        self.kmNet.keyup(value)\n\n    def key_down(self, value):\n        self.kmNet.keydown(value)\n\n    def key_up(self, value):\n        self.kmNet.keyup(value)\n\n    def show_pic(self, pic_array):\n        self.kmNet.lcd_picture_bottom(pic_array)\n"
  },
  {
    "path": "mouse_mover/MouseMover.py",
    "content": "from ctypes import Structure, c_ulong, byref, windll\n\nimport win32api\nimport win32con\n\n\nclass PointAPI(Structure):\n    \"\"\"\n        坐标API结构体\n    \"\"\"\n    # PointAPI类型,用于获取鼠标坐标\n    _fields_ = [(\"x\", c_ulong), (\"y\", c_ulong)]\n\n\nclass MouseMover:\n    \"\"\"\n        鼠标移动抽象\n    \"\"\"\n\n    def __init__(self, mouse_mover_param):\n        self.mouse_mover_param = mouse_mover_param\n\n    def move_rp(self, x: int, y: int):\n        \"\"\"\n            鼠标移动，原生移动\n        :param x:\n        :param y:\n        \"\"\"\n        pass\n\n    def move(self, x: int, y: int):\n        \"\"\"\n            鼠标移动，盒子移动\n        :param x:\n        :param y:\n        \"\"\"\n        pass\n\n    def left_click(self):\n        \"\"\"\n            点击按键\n        :param button:\n        \"\"\"\n        pass\n\n    def mouse_click(self, key, press):\n        \"\"\"\n            点击鼠标\n        :param key:\n        :param press:\n        \"\"\"\n        if key == \"left\":\n            if press:\n                self.left_down()\n            else:\n                self.left_up()\n        elif key == \"right\":\n            if press:\n                self.right_down()\n            else:\n                self.right_up()\n\n    def left_down(self):\n        \"\"\"\n            左键按下\n        \"\"\"\n        pass\n\n    def left_up(self):\n        \"\"\"\n            左键弹起\n        \"\"\"\n        pass\n\n    def right_down(self):\n        \"\"\"\n            右键按下\n        \"\"\"\n        pass\n\n    def right_up(self):\n        \"\"\"\n            右键弹起\n        \"\"\"\n        pass\n\n    def get_position(self):\n        \"\"\"\n            获取鼠标位置\n        \"\"\"\n        po = PointAPI()\n        windll.user32.GetCursorPos(byref(po))\n        return int(po.x), int(po.y)\n\n    def is_num_locked(self):\n        \"\"\"\n            使用ctypes获取键盘状态信息\n            0x90 是Num Lock键的虚拟键码\n            返回值是一个表示键盘状态的整数，最低位bit为1表示Num Lock被锁定\n        :return:\n        \"\"\"\n        key_state = windll.user32.GetKeyState(0x90)\n\n        # 判断Num Lock键的状态\n        # 第16位是最低位，如果为1表示Num Lock被锁定，否则未锁定\n        num_lock_state = key_state & 1\n\n        return num_lock_state == 1\n\n    def is_caps_locked(self):\n        \"\"\"\n        使用ctypes获取键盘状态信息\n        0x14 是Caps Lock键的虚拟键码\n        返回值是一个表示键盘状态的整数，最低位bit为1表示Caps Lock被锁定\n        :return:\n        \"\"\"\n        key_state = windll.user32.GetKeyState(0x14)\n\n        # 判断Caps Lock键的状态\n        # 第16位是最低位，如果为1表示Caps Lock被锁定，否则未锁定\n        caps_lock_state = key_state & 1\n\n        return caps_lock_state == 1\n\n    def click_key(self, value):\n        \"\"\"\n\n        :param value:\n        :return:\n        \"\"\"\n        pass\n\n    def key_down(self, value):\n        \"\"\"\n            按下按键\n        \"\"\"\n        pass\n\n    def key_up(self, value):\n        \"\"\"\n            松开按键\n        \"\"\"\n        pass\n\n    def toggle_caps_lock(self, lock_status):\n        \"\"\"\n        切换Caps Lock键的状态\n        \"\"\"\n        if self.is_caps_locked() ^ lock_status:\n            # 模拟按下Caps Lock键\n            win32api.keybd_event(win32con.VK_CAPITAL, 0, win32con.KEYEVENTF_EXTENDEDKEY, 0)\n            # 模拟释放Caps Lock键\n            win32api.keybd_event(win32con.VK_CAPITAL, 0, win32con.KEYEVENTF_EXTENDEDKEY | win32con.KEYEVENTF_KEYUP, 0)\n"
  },
  {
    "path": "mouse_mover/MoverFactory.py",
    "content": "import threading\n\nfrom core.kmnet_listener.KmBoxNetListener import KmBoxNetListener\nfrom core.kmnet_listener.ToggleKeyListener import ToggleKeyListener\nfrom log import LogFactory\nfrom mouse_mover.FeiMover import FeiMover\nfrom mouse_mover.GHubMover import GHubMover\nfrom mouse_mover.KmBoxMover import KmBoxMover\nfrom mouse_mover.KmBoxNetMover import KmBoxNetMover\nfrom mouse_mover.PanNiMover import PanNiMover\nfrom mouse_mover.Win32ApiMover import Win32ApiMover\nfrom mouse_mover.WuYaMover import WuYaMover\nfrom net.socket.SocketMouseMover import SocketMouseMover\n\n\ndef get_mover(config, mouse_listener=None, mouse_model=None, parent_mover=None, c1_mover=None,\n              game_windows_status=None):\n    \"\"\"\n        获取键鼠管理器\n    \"\"\"\n    if mouse_model is None:\n        mouse_model = config.mouse_mover\n    mouse_mover_params = config.mouse_mover_params\n    mouse_mover_param = mouse_mover_params[mouse_model]\n    if mouse_mover_param is None:\n        LogFactory.logger().print_log(f\"鼠标模式:[{mouse_model}]不可用\")\n    else:\n        LogFactory.logger().print_log(f\"初始化鼠标模式：[{mouse_model}]\")\n    if mouse_model == 'win32api':\n        return Win32ApiMover(mouse_mover_param)\n    elif mouse_model == \"km_box\":\n        return KmBoxMover(mouse_mover_param)\n    elif mouse_model == \"wu_ya\":\n        return WuYaMover(mouse_mover_param)\n    elif mouse_model == 'logitech':\n        return GHubMover(mouse_mover_param)\n    elif mouse_model == \"pan_ni\":\n        return PanNiMover(mouse_mover_param)\n    elif mouse_model == \"fei_yi_lai\" or mouse_model == 'fei_yi_lai_single':\n        return FeiMover(mouse_mover_param)\n    elif mouse_model == \"km_box_net\":\n        current_mover = KmBoxNetMover(mouse_mover_param)\n        if mouse_listener is not None:\n            current_mover.listener = KmBoxNetListener(current_mover, mouse_listener)\n            threading.Thread(target=current_mover.listener.km_box_net_start).start()\n            if parent_mover is None:\n                parent_mover = current_mover\n            if config.rea_snow_gun_config_name is not None and config.rea_snow_gun_config_name != '':\n                current_mover.toggle_key_listener = ToggleKeyListener(km_box_net_listener=current_mover.listener,\n                                                                      delayed_activation_key_list=config.delayed_activation_key_list,\n                                                                      mouse_mover=parent_mover, c1_mouse_mover=c1_mover,\n                                                                      toggle_hold_key=config.toggle_hold_key,\n                                                                      game_windows_status=game_windows_status)\n        return current_mover\n    elif mouse_model == \"distributed\" or mouse_model == \"distributed_c1\":\n        current_mover = SocketMouseMover(mouse_mover_param=mouse_mover_param,\n                                         mode=\"mouse_mover\" if mouse_model == \"distributed\" else \"c1_mouse_mover\")\n        # server_mover = get_mover(logger=logger, mouse_listener=mouse_listener, config=config,\n        #                          mouse_model=config.server_mouse_mover, parent_mover=current_mover, c1_mover=c1_mover,\n        #                          game_windows_status=game_windows_status)\n        # current_mover.server_mouse_mover = server_mover\n        return current_mover\n"
  },
  {
    "path": "mouse_mover/PanNiMover.py",
    "content": "import ctypes\nimport random\nimport sys\nimport time\n\nfrom log import LogFactory\nfrom mouse_mover.MouseMover import MouseMover\n\n\nclass PanNiMover(MouseMover):\n    def __init__(self, mouse_mover_param):\n        super().__init__(mouse_mover_param)\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.dev = None\n        self.version = 0\n        self.model = 0\n        self.vid = 0\n        self.pid = 0\n        self.wait_respon = False\n        if sys.platform == \"win32\":\n            user32 = ctypes.windll.user32\n            self.screenX = user32.GetSystemMetrics(78)\n            self.screenY = user32.GetSystemMetrics(79)\n        else:\n            import tkinter\n            root = tkinter.Tk()\n            self.screenX = root.winfo_vrootwidth()\n            self.screenY = root.winfo_vrootheight()\n            root.quit()\n        vid_pid = mouse_mover_param[\"VID/PID\"]\n        vid = int(vid_pid[:4], 16)\n        pid = int(vid_pid[4:], 16)\n        if not self.OpenDevice(vid, pid):\n            print(\"设备连接失败\")\n            return\n        print(\"型号:\", chr(self.model + 64))\n        print(\"版本:\", self.version)\n        print(\"序列号:\", self.GetChipID())\n        print(\"空间大小:\", self.GetStorageSize())\n        self.SetWaitRespon(True)\n\n    def __del__(self):\n        self.Close()\n\n    def OpenDevice(self, pid, vid):\n        \"\"\"\n            打开默认设备\n        :return:\n        \"\"\"\n        return self.OpenDeviceByID(pid, vid)\n\n    def OpenDeviceByID(self, vid, pid):\n        \"\"\"\n            通过pid vid打开设备\n        :param vid:\n        :param pid:\n        :return:\n        \"\"\"\n        dev = HID()\n        devices = dev.enum_device()\n        vidpid_str = \"#vid_{:04x}&pid_{:04x}&\".format(vid, pid)\n        for device in devices:\n            if device.find(vidpid_str) == -1:\n                continue\n            print(\"open\", device)\n            ret = dev.open(device)\n            if not ret:\n                dev.close()\n            else:\n                self.dev = dev\n                ret = self._getVersion()\n                if not ret:\n                    continue\n                self.version = ret[1]\n                self.model = ret[0]\n                return True\n        return False\n\n    def _getVersion(self):\n        self.write_cmd(1)\n        return self.read_data_timeout_promise(1, 10)\n\n    def write_cmd(self, cmd, dat=None):\n        \"\"\"\n\n        :param cmd:\n        :param dat:\n        :return:\n        \"\"\"\n        if not self.dev:\n            return -1\n        if dat and len(dat) > 61:\n            return -2\n        buf = [32, 1, cmd]\n        if dat:\n            buf[1] = len(dat) + 1\n            buf.extend(dat)\n        buf.extend([0xff] * (64 - len(buf)))\n        ret = self.dev.write(buf)\n        # print(ret)\n        if ret < 0:\n            self.Close()\n        return ret\n\n    def read_data_timeout_promise(self, cmd, timeout=None):\n        \"\"\"\n\n        :param cmd:\n        :param timeout:\n        :return:\n        \"\"\"\n        if not self.dev:\n            return None\n        for i in range(0, 10):\n            ret = self.read_data_timeout(timeout)\n            if ret and ret[0] == cmd:\n                return ret[1]\n        return None\n\n    def read_data_timeout(self, timeout=None):\n        \"\"\"\n\n        :param timeout:\n        :return:\n        \"\"\"\n        if not self.dev:\n            return None\n        try:\n            ret = self.dev.read(64, timeout)\n            if ret and ret[0] == 31:\n                return ret[2], ret[3:ret[1] + 2]\n            else:\n                return None\n        except OSError:\n            self.Close()\n            return None\n\n    def GetChipID(self):\n        \"\"\"\n\n        :return:\n        \"\"\"\n        self.write_cmd(12)\n        ret = self.read_data_timeout_promise(9, 10)\n        if not ret:\n            return -1\n        result = int.from_bytes(ret, byteorder='little', signed=True)\n        result += 113666\n        return ctypes.c_int32(result).value\n\n    def GetStorageSize(self):\n        \"\"\"\n\n        :return:\n        \"\"\"\n        self.write_cmd(2)\n        ret = self.read_data_timeout_promise(2, 10)\n        if not ret:\n            return -1\n        result = int.from_bytes(ret, byteorder='little', signed=True)\n        return result\n\n    def SetWaitRespon(self, wait):\n        \"\"\"\n\n        :param wait:\n        \"\"\"\n        self.wait_respon = wait\n        self.write_cmd(34)\n        self.read_data_timeout_promise(39, 10)\n\n    def Close(self):\n        \"\"\"\n            关闭盒子\n        \"\"\"\n        if self.dev:\n            self.dev.close()\n            self.dev = None\n        self.version = 0\n        self.model = 0\n        self.vid = 0\n        self.pid = 0\n        self.wait_respon = False\n\n    def mouse_event(self, e, x=0, y=0, extra1=0, extra2=0):\n        \"\"\"\n            鼠标事件\n        :param e:\n        :param x:\n        :param y:\n        :param extra1:\n        :param extra2:\n        :return:\n        \"\"\"\n        cmd = [0xff] * 12\n        cmd[0] = e\n        if e >= 1 and e <= 7:\n            pass\n        elif e == 8:\n            if x < 0:\n                x = 0\n            if y < 0:\n                y = 0\n\n            screenx = self.screenX\n            screeny = self.screenY\n            if x >= screenx:\n                x = screenx - 1\n            if y >= screeny:\n                y = screeny - 1\n\n            x = int((x << 15) / screenx)\n            y = int((y << 15) / screeny)\n            cmd[1] = (x >> 8) & 0xff\n            cmd[2] = x & 0xff\n            cmd[3] = (y >> 8) & 0xff\n            cmd[4] = y & 0xff\n        elif e == 9:\n            if x < -128 or x > 127 or y < -128 or y > 127:\n                return\n            cmd[1] = x\n            cmd[2] = y\n        elif e == 91:\n            if x < -32768 or x > 32767 or y < -32768 or y > 32767:\n                return\n            cmd[1] = (x >> 8) & 0xff\n            cmd[2] = x & 0xff\n            cmd[3] = (y >> 8) & 0xff\n            cmd[4] = y & 0xff\n        elif e == 10:\n            if x < -128 or x > 127:\n                return\n            cmd[1] = x\n        elif e == 11:\n            if x < 0:\n                x = 0\n            if y < 0:\n                y = 0\n\n            cmd[1] = (x >> 8) & 0xff\n            cmd[2] = x & 0xff\n            cmd[3] = (y >> 8) & 0xff\n            cmd[4] = y & 0xff\n            screenx = self.screenX\n            screeny = self.screenY\n            cmd[5] = (screenx >> 8) & 0xff\n            cmd[6] = screenx & 0xff\n            cmd[7] = (screeny >> 8) & 0xff\n            cmd[8] = screeny & 0xff\n            cmd[9] = extra1\n            cmd[10] = extra2\n        elif e == 12:\n            cmd[1] = (x >> 8) & 0xff\n            cmd[2] = x & 0xff\n            cmd[3] = (y >> 8) & 0xff\n            cmd[4] = y & 0xff\n            screenx = self.screenX\n            screeny = self.screenY\n            cmd[5] = (screenx >> 8) & 0xff\n            cmd[6] = screenx & 0xff\n            cmd[7] = (screeny >> 8) & 0xff\n            cmd[8] = screeny & 0xff\n            cmd[9] = extra1\n            cmd[10] = extra2\n        elif e == 13 or e == 14:\n            cmd[1] = x\n        self.write_cmd(16, cmd)\n        if self.wait_respon:\n            self.read_data_timeout_promise(20, 10)\n\n    def key_event(self, e, key):\n        \"\"\"\n            键盘事件\n        :param e:\n        :param key:\n        \"\"\"\n        cmd = [e, 0xff]\n        if isinstance(key, str):\n            key = self.GetScanCodeFromKeyName(key)\n        cmd[1] = key\n        self.write_cmd(17, cmd)\n        if self.wait_respon:\n            self.read_data_timeout_promise(20, 10)\n\n    @staticmethod\n    def DelayRandom(delay_min, delay_max):\n        \"\"\"\n\n        :param delay_min:\n        :param delay_max:\n        \"\"\"\n        delay = 0\n        if delay_max >= delay_min >= 0 and delay_max > 0:\n            delay = random.randint(delay_min, delay_max)\n        elif delay_max == 0 and delay_min > 0:\n            delay = delay_min\n        if delay > 0:\n            time.sleep(delay / 1000)\n\n    @staticmethod\n    def GetScanCodeFromKeyName(keyname):\n        \"\"\"\n            键值表\n        :param keyname:\n        :return:\n        \"\"\"\n        keymap = {\n            \"a\": 4, \"b\": 5, \"c\": 6, \"d\": 7, \"e\": 8, \"f\": 9, \"g\": 10, \"h\": 11, \"i\": 12, \"j\": 13, \"k\": 14, \"l\": 15,\n            \"m\": 16, \"n\": 17, \"o\": 18, \"p\": 19, \"q\": 20,\n            \"r\": 21, \"s\": 22, \"t\": 23, \"u\": 24, \"v\": 25, \"w\": 26, \"x\": 27, \"y\": 28, \"z\": 29, \"1\": 30, \"2\": 31, \"3\": 32,\n            \"4\": 33, \"5\": 34, \"6\": 35, \"7\": 36,\n            \"8\": 37, \"9\": 38, \"0\": 39, \"enter\": 40, \"esc\": 41, \"backspace\": 42, \"tab\": 43, \"space\": 44, \" \": 44,\n            \"空格键\": 44, \"-\": 45, \"=\": 46, \"[\": 47, \"]\": 48,\n            \"\\\\\": 49, \";\": 51, \"'\": 52, \"`\": 53, \",\": 54, \".\": 55, \"/\": 56, \"capslock\": 57, \"f1\": 58, \"f2\": 59,\n            \"f3\": 60, \"f4\": 61, \"f5\": 62, \"f6\": 63, \"f7\": 64,\n            \"f8\": 65, \"f9\": 66, \"f10\": 67, \"f11\": 68, \"f12\": 69, \"printscreen\": 70, \"scrolllock\": 71, \"pause\": 72,\n            \"break\": 72, \"insert\": 73, \"home\": 74,\n            \"pageup\": 75, \"delete\": 76, \"end\": 77, \"pagedown\": 78, \"right\": 79, \"left\": 80, \"down\": 81, \"up\": 82,\n            \"numlock\": 83, \"小键盘/\": 84, \"小键盘*\": 85,\n            \"小键盘-\": 86, \"小键盘+\": 87, \"小键盘enter\": 88, \"小键盘1\": 89, \"小键盘2\": 90, \"小键盘3\": 91, \"小键盘4\": 92,\n            \"小键盘5\": 93, \"小键盘6\": 94,\n            \"小键盘7\": 95, \"小键盘8\": 96, \"小键盘9\": 97, \"小键盘0\": 98, \"小键盘.\": 99, \"menu\": 101, \"小键盘=\": 103,\n            \"静音\": 127, \"音量加\": 128, \"音量减\": 129,\n            \"lctrl\": 224, \"lshift\": 225, \"lalt\": 226, \"lwin\": 227, \"rctrl\": 228, \"rshift\": 229, \"ralt\": 230,\n            \"rwin\": 231,\n            \"ctrl\": 224, \"shift\": 225, \"alt\": 226, \"win\": 227\n        }\n        keyname = keyname.lower()\n        if keyname in keymap:\n            return keymap[keyname]\n        else:\n            return 0\n\n    def move_rp(self, x: int, y: int):\n        self.mouse_event(91, x, y)\n\n    def move(self, x: int, y: int):\n        move_max = max(x, y)\n        if move_max == 0:\n            return\n        move_max = min(255, move_max)\n        self.mouse_event(12, x, y, 1, move_max)\n\n    def left_click(self):\n        self.left_down()\n        self.DelayRandom(0, 50)\n        self.left_up()\n\n    def mouse_click(self, key, press):\n        print(\"未实现 mouse_click\")\n\n    def left_down(self):\n        self.mouse_event(1)\n\n    def left_up(self):\n        self.mouse_event(2)\n\n    def right_down(self):\n        self.mouse_event(3)\n\n    def right_up(self):\n        self.mouse_event(4)\n\n    def click_key(self, value):\n        self.key_down(value)\n        self.DelayRandom(0, 20)\n        self.key_up(value)\n\n    def key_down(self, value):\n        self.key_event(1, value)\n\n    def key_up(self, value):\n        self.key_event(2, value)\n\n\n# -*- coding: utf-8 -*-\n\nfrom ctypes import *\nimport platform\n\n\nclass GUID(Structure):\n    _fields_ = [(\"Data1\", c_ulong),\n                (\"Data2\", c_ushort),\n                (\"Data3\", c_ushort),\n                (\"Data4\", c_ubyte * 8)]\n\n\nclass SP_DEVICE_INTERFACE_DATA(Structure):\n    _fields_ = [(\"cbSize\", c_ulong),\n                (\"InterfaceClassGuid\", GUID),\n                (\"Flags\", c_ulong),\n                (\"Reserved\", c_ulong)]\n\n\ndef SP_DATA_A_factory(length):\n    class SP_DEVICE_INTERFACE_DETAIL_DATA_A(Structure):\n        _fields_ = [(\"cbSize\", c_ulong), (\"DevicePath\", c_char * (length - 4))]\n\n    return SP_DEVICE_INTERFACE_DETAIL_DATA_A\n\n\nclass HID:\n    \"\"\"\n\n    \"\"\"\n\n    def __init__(self):\n        self.setupapi_dll = WinDLL(\"setupapi.dll\")\n        info_value = [c_ulong(0x4d1e55b2), c_ushort(0xf16f), c_ushort(0x11cf),\n                      (c_ubyte * 8)(0x88, 0xcb, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30)]\n        self.InterfaceClassGuid = GUID(*info_value)\n        self.handle = None\n        self.setupapi_dll.SetupDiGetClassDevsA.restype = c_void_p\n        self.setupapi_dll.SetupDiEnumDeviceInterfaces.argtypes = (\n            c_void_p, c_void_p, POINTER(GUID), c_ulong, POINTER(SP_DEVICE_INTERFACE_DATA))\n\n    def __del__(self):\n        self.close()\n\n    def enum_device(self):\n        \"\"\"\n\n        :return:\n        \"\"\"\n        result = []\n        device_info_set = self.setupapi_dll.SetupDiGetClassDevsA(pointer(self.InterfaceClassGuid), None, None, 0x12)\n        if device_info_set != -1:\n            # print(device_info_set)\n            device_index = 0\n            while True:\n                if platform.architecture()[0] == \"64bit\":\n                    info_value = [c_ulong(32), self.InterfaceClassGuid, 0, 0]\n                else:\n                    info_value = [c_ulong(28), self.InterfaceClassGuid, 0, 0]\n                device_interface_data = SP_DEVICE_INTERFACE_DATA(*info_value)\n                ret = self.setupapi_dll.SetupDiEnumDeviceInterfaces(device_info_set, None,\n                                                                    pointer(self.InterfaceClassGuid), device_index,\n                                                                    byref(device_interface_data))\n                if not ret:\n                    err = GetLastError()\n                    if err != 259:\n                        print(\"SetupDiEnumDeviceInterfaces return:\", err)\n                    break\n                required_size = c_ulong(0)\n                SP_DATA_A = SP_DATA_A_factory(8)\n                self.setupapi_dll.SetupDiGetDeviceInterfaceDetailA.argtypes = (\n                    c_void_p, POINTER(SP_DEVICE_INTERFACE_DATA), POINTER(SP_DATA_A), c_ulong, POINTER(c_ulong),\n                    c_void_p)\n                ret = self.setupapi_dll.SetupDiGetDeviceInterfaceDetailA(device_info_set,\n                                                                         pointer(device_interface_data), None, 0,\n                                                                         byref(required_size), None)\n                # print(required_size.value)\n                SP_DATA_A = SP_DATA_A_factory(required_size.value)\n                self.setupapi_dll.SetupDiGetDeviceInterfaceDetailA.argtypes = (\n                    c_void_p, POINTER(SP_DEVICE_INTERFACE_DATA), POINTER(SP_DATA_A), c_ulong, POINTER(c_ulong),\n                    c_void_p)\n                if platform.architecture()[0] == \"64bit\":\n                    device_interface_detail_data = SP_DATA_A(*[8, b''])\n                else:\n                    device_interface_detail_data = SP_DATA_A(*[5, b''])\n                ret = self.setupapi_dll.SetupDiGetDeviceInterfaceDetailA(device_info_set,\n                                                                         pointer(device_interface_data),\n                                                                         byref(device_interface_detail_data),\n                                                                         required_size, None, None)\n                # print(ret)\n                if ret:\n                    # print(device_interface_detail_data.DevicePath)\n                    device_path = device_interface_detail_data.DevicePath.decode(\"gbk\")\n                    # print(device_path)\n                    if device_path.find(\"pid\") != -1:\n                        # print(device_path)\n                        if device_path.find(\"&mi_00#\") != -1:\n                            result.append(device_path)\n                else:\n                    print(\"SetupDiGetDeviceInterfaceDetailA return:\", GetLastError())\n                device_index += 1\n        return result\n\n    def open(self, path):\n        \"\"\"\n\n        :param path:\n        :return:\n        \"\"\"\n        handle = windll.kernel32.CreateFileA(c_char_p(bytes(path, \"gbk\")), 0xc0000000, 3, None, 3, 0x00000080, 0)\n        if handle == -1:\n            return False\n        self.handle = handle\n        return True\n\n    def close(self):\n        \"\"\"\n\n        \"\"\"\n        if self.handle:\n            windll.kernel32.CancelIo(self.handle)\n            windll.kernel32.CloseHandle(self.handle)\n            self.handle = None\n\n    def write(self, data):\n        \"\"\"\n\n        :param data:\n        :return:\n        \"\"\"\n        if self.handle == -1:\n            return -1\n        length = len(data)\n        buf = bytearray(data)\n        ret = windll.kernel32.WriteFile(self.handle, c_char_p(bytes(buf)), length, None, None)\n        return ret\n\n    def read(self, len, timeout):\n        \"\"\"\n\n        :param len:\n        :param timeout:\n        :return:\n        \"\"\"\n        if self.handle == -1:\n            return -1\n        buf = create_string_buffer(len)\n        bytes_read = c_ulong(0)\n        ret = windll.kernel32.ReadFile(self.handle, buf, len, byref(bytes_read), None)\n        if ret:\n            return bytes(buf)\n        else:\n            return None\n"
  },
  {
    "path": "mouse_mover/Win32ApiMover.py",
    "content": "from ctypes import windll\n\nfrom log import LogFactory\nfrom mouse_mover.MouseMover import MouseMover\n\nMOUSE_EVEN_TF_LEFT_DOWN = 0x2\nMOUSE_EVEN_TF_LEFT_UP = 0x4\nMOUSE_EVEN_TF_MIDDLE_DOWN = 0x20\nMOUSE_EVEN_TF_MIDDLE_UP = 0x40\nMOUSE_EVEN_TF_RIGHT_DOWN = 0x8\nMOUSE_EVEN_TF_RIGHT_UP = 0x10\nMOUSE_EVEN_TF_MOVE = 0x1\n\n\nclass Win32ApiMover(MouseMover):\n\n    def __init__(self, mouse_mover_param):\n        super().__init__(mouse_mover_param)\n        self.user32 = windll.user32\n        self.logger = LogFactory.getLogger(self.__class__)\n\n    def move_rp(self, x: int, y: int):\n        self.user32.mouse_event(MOUSE_EVEN_TF_MOVE, x, y)\n\n    def move(self, x, y):\n        self.move_rp(x, y)\n\n    def left_click(self):\n        self.user32.mouse_event(MOUSE_EVEN_TF_LEFT_DOWN, 0, 0, 0, 0)\n        self.user32.mouse_event(MOUSE_EVEN_TF_LEFT_UP, 0, 0, 0, 0)\n\n    def left_down(self):\n        self.user32.mouse_event(MOUSE_EVEN_TF_LEFT_DOWN, 0, 0, 0, 0)\n\n    def left_up(self):\n        self.user32.mouse_event(MOUSE_EVEN_TF_LEFT_UP, 0, 0, 0, 0)\n\n    def right_down(self):\n        self.user32.mouse_event(MOUSE_EVEN_TF_RIGHT_DOWN, 0, 0, 0, 0)\n\n    def right_up(self):\n        self.user32.mouse_event(MOUSE_EVEN_TF_RIGHT_UP, 0, 0, 0, 0)\n"
  },
  {
    "path": "mouse_mover/WuYaMover.py",
    "content": "from ctypes import *\n\nimport win32com.client\n\nfrom log import LogFactory\nfrom mouse_mover.MouseMover import MouseMover\n\n\nclass WuYaMover(MouseMover):\n    def __init__(self, mouse_mover_param):\n        # 进程内注册插件,模块所在的路径按照实际位置修改\n        super().__init__(mouse_mover_param)\n        self.logger = LogFactory.getLogger(self.__class__)\n        vid_pid = mouse_mover_param[\"VID/PID\"]\n        hkm_dll = windll.LoadLibrary(\"wy_hkm.dll\")\n        hkm_dll.DllInstall.argtypes = (c_long, c_longlong)\n        if hkm_dll.DllInstall(1, 2) < 0:\n            self.logger.print_log(\"注册失败!\")\n        vid = int(vid_pid[:4], 16)\n        pid = int(vid_pid[4:], 16)\n        try:\n            self.wy_hkm = win32com.client.Dispatch(\"wyp.hkm\")\n        except Exception as e:\n            self.logger.print_log(\"创建对象失败!\")\n            print(e)\n        version = self.wy_hkm.GetVersion()\n        self.logger.print_log(\"无涯键鼠盒子模块版本：\" + hex(version))\n        dev_id = self.wy_hkm.SearchDevice(vid, pid, 0)\n        if dev_id == -1:\n            self.logger.print_log(\"未找到无涯键鼠盒子\")\n        if not self.wy_hkm.Open(dev_id, 0):\n            self.logger.print_log(\"打开无涯键鼠盒子失败\")\n\n    def move_rp(self, short_x: int, short_y: int):\n        self.wy_hkm.MoveRP(short_x, short_y)\n\n    def move(self, short_x: int, short_y: int):\n        self.wy_hkm.MoveR(short_x, short_y)\n\n    def left_click(self):\n        self.wy_hkm.LeftClick()\n"
  },
  {
    "path": "mouse_mover/__init__.py",
    "content": ""
  },
  {
    "path": "net/__init__.py",
    "content": ""
  },
  {
    "path": "net/socket/Client.py",
    "content": "import pickle  # 用于序列化/反序列化数据\nimport socket\nimport threading\n\nfrom auth.check_run import auth\nfrom net.socket import SocketUtil\n\nclient_cache = {}\n\n\nclass Client:\n    \"\"\"\n        识别客户端\n    \"\"\"\n\n    # @auth\n    def __init__(self, socket_address, client_type):\n        self.client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n        self.client_socket.connect(socket_address)\n        data = pickle.dumps(client_type)\n        SocketUtil.send(self.client_socket, data)\n        self.intention_lock = threading.Lock()\n\n    def compare_with_path(self, path, images, lock_score, discard_score):\n        \"\"\"\n        :param path:\n        :param images:\n        :param lock_score:\n        :param discard_score:\n        :return:\n        \"\"\"\n        with self.intention_lock:\n            data = (path, images, lock_score, discard_score)\n            # data = {\"type\": \"compare_with_path\", \"data\": (path, images, lock_score, discard_score)}\n            data = pickle.dumps(data)\n            SocketUtil.send(self.client_socket, data)\n            result_data = SocketUtil.recv(self.client_socket)\n            result = pickle.loads(result_data)\n            if result == 'msg:error':\n                return 0, 0\n            return result\n\n    def key_trigger(self, select_gun, select_scope, hot_pop):\n        \"\"\"\n\n        :param select_gun:\n        :param select_scope:\n        :param hot_pop:\n        \"\"\"\n        with self.intention_lock:\n            data = (select_gun, select_scope, hot_pop)\n            data = pickle.dumps(data)\n            SocketUtil.send(self.client_socket, data)\n            SocketUtil.recv(self.client_socket)\n\n    def mouse_mover(self, func_name, param):\n        \"\"\"\n\n        :param func_name:\n        :param param:\n        :return:\n        \"\"\"\n        with self.intention_lock:\n            data = (func_name, param)\n            data = pickle.dumps(data)\n            SocketUtil.send(self.client_socket, data)\n            SocketUtil.recv(self.client_socket)\n\n    def get_images_from_bbox(self, bbox_list):\n        \"\"\"\n            从服务获取截图，反向架构\n        \"\"\"\n        with self.intention_lock:\n            data = bbox_list\n            data = pickle.dumps(data)\n            SocketUtil.send(self.client_socket, data)\n            result_data = SocketUtil.recv(self.client_socket)\n            result = pickle.loads(result_data)\n            if result == 'msg:error':\n                return None\n            return result\n"
  },
  {
    "path": "net/socket/NetImageComparator.py",
    "content": "import re\n\nimport requests\n\nfrom core.image_comparator.ImageComparator import ImageComparator\nfrom log import LogFactory\n\nheaders_list = [\n    {\n        'user-agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; Android 8.0.0; SM-G955U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Mobile Safari/537.36'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; Android 10; SM-G981B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36'\n    }, {\n        'user-agent': 'Mozilla/5.0 (iPad; CPU OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; Android) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.109 Safari/537.36 CrKey/1.54.248666'\n    }, {\n        'user-agent': 'Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.188 Safari/537.36 CrKey/1.54.250320'\n    }, {\n        'user-agent': 'Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+'\n    }, {\n        'user-agent': 'Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML like Gecko) Version/7.2.1.0 Safari/536.2+'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; U; Android 4.3; en-us; SM-N900T Build/JSS15J) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; U; Android 4.1; en-us; GT-N7100 Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; U; Android 4.0; en-us; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.111 Mobile Safari/537.36'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.80 Safari/537.36'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/102.0.0.0 Mobile Safari/537.36'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/14.14263'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; Android 6.0.1; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36'\n    }, {\n        'user-agent': 'Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 520)'\n    }, {\n        'user-agent': 'Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.158 Mobile Safari/537.36'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; Android 11; Pixel 3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.181 Mobile Safari/537.36'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36'\n    }, {\n        'user-agent': 'Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36'\n    }, {\n        'user-agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1'\n    }, {\n        'user-agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1'\n    }, {\n        'user-agent': 'Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1'\n    }\n]\n\nnet_file_cache = {}\n\n\nclass NetImageComparator(ImageComparator):\n    def __init__(self, base_path):\n        super().__init__(base_path)\n        # 用于缓存已下载图像的字典\n        self.image_cache = {}\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.base_path = base_path\n\n    def read_file_from_url(self, url):\n        \"\"\"\n\n        :param url:\n        :return:\n        \"\"\"\n        try:\n            if url in net_file_cache:\n                return net_file_cache[url]\n            # 发送GET请求获取文件内容\n            # headers = random.choice(headers_list)\n            response = requests.get(url)\n            response.encoding = 'utf-8'\n            # 检查请求是否成功\n            if response.status_code == 200:\n                # 根据换行符切割文件内容并返回列表\n                text = response.text\n                lines = re.split(r'\\r\\n|\\r|\\n', text)\n                net_file_cache[url] = lines\n                return lines\n            else:\n                print(f\"Failed to read file from URL. Status code: {response.status_code}\")\n                return None\n        except Exception as e:\n            print(f\"An error occurred: {e}\")\n            return None\n\n    def cache_image(self, base_path, url):\n        # 如果图像已经在缓存中，直接返回缓存的图像\n        url = base_path + url\n        url = url.strip()\n        if url in self.image_cache:\n            return\n        self.logger.print_log(f\"正在加载图片：{url.replace(self.base_path, '')}\")\n        # 发送GET请求获取图片的二进制数据\n        # 发送GET请求获取文件内容\n        # headers = random.choice(headers_list)\n        response = requests.get(url)\n\n        # 检查请求是否成功\n        if response.status_code == 200:\n            # 将二进制数据转换为图像对象\n            image_bytes = response.content\n            # 将图像添加到缓存\n            self.image_cache[url] = image_bytes\n        else:\n            # 如果请求失败，打印错误信息\n            self.logger.print_log(f\"Failed to download image: {url}. Status code: {response.status_code}\")\n"
  },
  {
    "path": "net/socket/ReaSnowSelectGunSocket.py",
    "content": "import time\n\nfrom core.SelectGun import SelectGun\nfrom log import LogFactory\nfrom net.socket.Client import Client\n\n\nclass ReaSnowSelectGunSocket:\n    \"\"\"\n        通过网络socket触发按键\n    \"\"\"\n\n    def __init__(self, select_gun: SelectGun, socket_address=(\"127.0.0.1\", 12345)):\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.client = Client(socket_address, \"key_trigger\")\n        select_gun.connect(self.trigger_button)\n\n    def trigger_button(self, select_gun, select_scope, hot_pop):\n        \"\"\"\n\n        :param select_gun:\n        :param select_scope:\n        :param hot_pop:\n        :return:\n        \"\"\"\n        if select_gun is None or select_scope is None:\n            return\n        start = time.time()\n        self.client.key_trigger(select_gun, select_scope, hot_pop)\n        self.logger.print_log(f\"该次按键触发耗时：{int(1000 * (time.time() - start))}ms\")\n\n"
  },
  {
    "path": "net/socket/Server.py",
    "content": "import pickle\nimport socket\nimport threading\nimport traceback\n\nfrom auth.check_run import auth\nfrom core.ReaSnowSelectGun import ReaSnowSelectGun\nfrom core.screentaker.ScreenTaker import ScreenTaker\nfrom log import LogFactory\nfrom mouse_mover.MouseMover import MouseMover\nfrom net.socket import SocketUtil\n\n\nclass Server:\n    \"\"\"\n        识别服务端\n    \"\"\"\n\n    # @auth\n    def __init__(self, server_address, image_comparator, select_gun: ReaSnowSelectGun,\n                 mouse_mover: MouseMover, c1_mouse_mover: MouseMover, screen_taker: ScreenTaker):\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.server_address = server_address\n        self.image_comparator = image_comparator\n        self.mouse_mover = mouse_mover\n        self.c1_mouse_mover = c1_mouse_mover\n        self.select_gun = select_gun\n        self.screen_taker = screen_taker\n        self.server_socket = None\n        self.buffer_size = 4096\n        self.open()\n\n    def open(self):\n        \"\"\"\n            打开服务端\n        \"\"\"\n        # 创建一个TCP/IP套接字\n        self.server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n        # 绑定服务器地址和端口\n        self.server_socket.bind(self.server_address)\n        # 监听客户端连接\n        self.server_socket.listen(1)\n\n    def wait_client(self):\n        \"\"\"\n            监听\n        \"\"\"\n        while True:\n            self.logger.print_log('等待客户端连接...')\n            # 等待客户端连接\n            client_socket, client_address = self.server_socket.accept()\n            self.logger.print_log('客户端已连接:{}'.format(client_address))\n            data = SocketUtil.recv(client_socket)\n            data = pickle.loads(data)\n            self.logger.print_log(\"客户端类型：{}\".format(data))\n            threading.Thread(target=self.listener, args=(client_socket, data)).start()\n\n    def listener(self, client_socket, data_type):\n        \"\"\"\n\n        :param data_type:\n        :param client_socket:\n        \"\"\"\n        try:\n            while True:\n                try:\n                    data = SocketUtil.recv(client_socket)\n                    data = pickle.loads(data)\n                    if data_type == \"compare_with_path\":\n                        result = self.image_comparator.compare_with_path(*data)\n                        result_data = pickle.dumps(result)\n                        SocketUtil.send(client_socket, result_data)\n                    elif data_type == \"key_trigger\":\n                        self.select_gun.trigger_button(*data)\n                        SocketUtil.send(client_socket, pickle.dumps('ok'))\n                    elif data_type == \"mouse_mover\" or data_type == \"c1_mouse_mover\":\n                        func_name, param = data\n                        self.logger.print_log(f\"{data_type}:{func_name}({param})) \")\n                        mouse_mover = getattr(self, data_type)\n                        f = getattr(mouse_mover, func_name)\n                        f(*param)\n                        SocketUtil.send(client_socket, pickle.dumps('ok'))\n                    elif data_type == \"screen_taker\":\n                        images = self.screen_taker.get_images_from_bbox(data)\n                        result_data = pickle.dumps(images)\n                        SocketUtil.send(client_socket, result_data)\n                except Exception as e:\n                    print(e)\n                    traceback.print_exc()\n                    SocketUtil.send(client_socket, pickle.dumps(\"msg:error\"))\n        except Exception as e:\n            print(e)\n            traceback.print_exc()\n        finally:\n            # 关闭连接\n            try:\n                client_socket.close()\n            except Exception as e:\n                print(e)\n                traceback.print_exc()\n"
  },
  {
    "path": "net/socket/SocketImageComparator.py",
    "content": "from core.image_comparator.ImageComparator import ImageComparator\nfrom log import LogFactory\nfrom net.socket.Client import Client\n\n\nclass SocketImageComparator(ImageComparator):\n    def __init__(self, base_path, socket_address=(\"127.0.0.1\", 12345)):\n        # 用于缓存已下载图像的字典\n        super().__init__(base_path)\n        self.image_cache = {}\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.client = Client(socket_address, \"compare_with_path\")\n\n    def compare_with_path(self, path, images, lock_score, discard_score):\n        \"\"\"\n            截图范围与文件路径内的所有图片对比\n        :param path:\n        :param images:\n        :param lock_score:\n        :param discard_score:\n        :return:\n        \"\"\"\n        return self.client.compare_with_path(path, images, lock_score, discard_score)\n"
  },
  {
    "path": "net/socket/SocketMouseMover.py",
    "content": "from log import LogFactory\nfrom mouse_mover.MouseMover import MouseMover\nfrom net.socket.Client import Client\n\n\nclass SocketMouseMover(MouseMover):\n    def __init__(self, mouse_mover_param, mode=\"mouse_mover\"):\n        super().__init__(mouse_mover_param)\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.mode = mode\n        self.client = Client((mouse_mover_param[\"ip\"], mouse_mover_param[\"port\"]), mode)\n        self.listener = None\n        self.toggle_key_listener = None\n\n    def move_rp(self, x: int, y: int):\n        self.client.mouse_mover(\"move_rp\", (x, y))\n\n    def move(self, x: int, y: int):\n        self.client.mouse_mover(\"move\", (x, y))\n\n    def left_click(self):\n        self.client.mouse_mover(\"left_click\", ())\n\n    def key_down(self, value):\n        self.client.mouse_mover(\"key_down\", (value,))\n\n    def key_up(self, value):\n        self.client.mouse_mover(\"key_up\", (value,))\n\n    def get_position(self):\n        return super().get_position()\n\n    def is_num_locked(self):\n        return super().is_num_locked()\n\n    def is_caps_locked(self):\n        return super().is_caps_locked()\n\n    def click_key(self, value):\n        self.client.mouse_mover(\"click_key\", (value,))\n\n    def destroy(self):\n        \"\"\"\n            销毁\n        \"\"\"\n        self.listener.stop()\n        self.toggle_key_listener.destory()\n\n    def toggle_caps_lock(self, lock_status):\n        self.client.mouse_mover(\"toggle_caps_lock\", (lock_status,))\n\n    def mouse_click(self, key, press):\n        self.client.mouse_mover(\"mouse_click\", (key, press))\n"
  },
  {
    "path": "net/socket/SocketScreenTaker.py",
    "content": "from core.screentaker.ScreenTaker import ScreenTaker\nfrom log import LogFactory\nfrom net.socket.Client import Client\n\n\nclass SocketScreenTaker(ScreenTaker):\n    \"\"\"\n        网络截图\n    \"\"\"\n\n    def __init__(self, socket_address=(\"127.0.0.1\", 12345)):\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.client = Client(socket_address, \"screen_taker\")\n\n    def get_images_from_bbox(self, bbox_list):\n        return self.client.get_images_from_bbox(bbox_list)\n"
  },
  {
    "path": "net/socket/SocketUtil.py",
    "content": "def send(send_socket, byte_array, buffer_size=4096):\n    \"\"\"\n\n    :param send_socket:\n    :param byte_array:\n    :param buffer_size:\n    \"\"\"\n    send_socket.sendall(str(len(byte_array)).encode('utf-8'))\n    ready = send_socket.recv(buffer_size)\n    if ready == b'ready':\n        send_socket.sendall(byte_array)\n\n\ndef recv(recv_socket, buffer_size=4096):\n    \"\"\"\n\n    :param recv_socket:\n    :param buffer_size:\n    :return:\n    \"\"\"\n    data_length = recv_socket.recv(32)\n    if not data_length:\n        return None\n    recv_socket.send(b'ready')\n    data_length = int(data_length.decode('utf-8'))\n    recv_data_count = 0\n    recv_data = bytearray()\n    while recv_data_count < data_length:\n        if data_length - recv_data_count < buffer_size:\n            data_temp = recv_socket.recv(data_length - recv_data_count)\n        else:\n            data_temp = recv_socket.recv(buffer_size)\n        recv_data.extend(data_temp)\n        recv_data_count += len(data_temp)\n    return recv_data\n"
  },
  {
    "path": "net/socket/__init__.py",
    "content": ""
  },
  {
    "path": "server.py",
    "content": "import sys\nimport threading\n\nfrom PyQt5.QtWidgets import QApplication\n\nfrom auth.check_run import open_check\nfrom core.Config import Config\nfrom core.GameWindowsStatus import GameWindowsStatus\nfrom core.ReaSnowSelectGun import ReaSnowSelectGun\nfrom core.image_comparator.LocalImageComparator import LocalImageComparator\nfrom core.screentaker.LocalScreenTaker import LocalScreenTaker\nfrom log import LogFactory\nfrom mouse_mover import MoverFactory\nfrom mouse_mover.MouseMover import MouseMover\nfrom net.socket.NetImageComparator import NetImageComparator\nfrom net.socket.Server import Server\nfrom windows.SystemTrayApp import SystemTrayApp\n\n\n# @open_check(\"apex_recoils_server\")\ndef main():\n    \"\"\"\n        main\n    \"\"\"\n    app = QApplication(sys.argv)\n\n    # Tools.hide_process()\n    config = Config(default_ref_config_name=\"server\")\n    game_windows_status = GameWindowsStatus()\n\n    if config.read_image_mode == \"local\":\n        image_comparator = LocalImageComparator(config.image_base_path)\n    else:\n        image_comparator = NetImageComparator(config.image_base_path)\n\n    mouse_mover: MouseMover = MoverFactory.get_mover(config=config,\n                                                     mouse_model=config.server_mouse_mover,\n                                                     game_windows_status=game_windows_status)\n    rea_snow_select_gun = None\n    if config.rea_snow_gun_config_name != '':\n        rea_snow_select_gun = ReaSnowSelectGun(mouse_mover=mouse_mover,\n                                               config_name=config.rea_snow_gun_config_name)\n\n    c1_mouse_mover: MouseMover = MoverFactory.get_mover(config=config,\n                                                        mouse_model=config.mouse_mover,\n                                                        game_windows_status=game_windows_status)\n\n    system_tray_app = SystemTrayApp(\"server\")\n    server = Server(server_address=(config.distributed_param[\"ip\"], config.distributed_param[\"port\"]),\n                    image_comparator=image_comparator,\n                    select_gun=rea_snow_select_gun,\n                    mouse_mover=mouse_mover,\n                    c1_mouse_mover=c1_mouse_mover,\n                    screen_taker=LocalScreenTaker())\n    threading.Thread(target=server.wait_client).start()\n    sys.exit(app.exec_())\n\n\nif __name__ == '__main__':\n    main()"
  },
  {
    "path": "test/__init__.py",
    "content": ""
  },
  {
    "path": "test/cap_test.py",
    "content": "import cv2\n\nfrom core.screentaker.CapScreenTaker import CapScreenTaker\nfrom log import LogFactory\nfrom net.socket.NetImageComparator import NetImageComparator\n\nif __name__ == '__main__':\n    LogFactory.init_logger()\n    base_path = \"http://1.15.138.227:9000/apex/images/\"\n    screen_taker = CapScreenTaker({\n        \"width\": 2560,\n        \"height\": 1440,\n        \"frame_rate\": 144,\n        \"format\": \"MJPG\"\n    })\n    image_comparator = NetImageComparator(base_path)\n    image_path, x, y, w, h = \"bag_cap.png\", 779, 37, 897, 75\n    box = (int(x), int(y), int(w), int(h))\n    image_path = base_path + \"licking/2560x1440/bag/\" + image_path\n    # 显示两张图片\n    while True:\n        img = screen_taker.get_images_from_bbox([box])[0]\n        # 显示这帧内容\n        score = image_comparator.compare_image(img, image_path)\n        print(score)\n        # 如果按下 'q' 键则退出\n        if cv2.waitKey(1) & 0xFF == ord('q'):\n            break\n        # 释放摄像头并关闭所有窗口\n    cv2.destroyAllWindows()\n"
  },
  {
    "path": "test/fei_test.py",
    "content": "import ctypes\n\n\nclass FeiMover:\n    \"\"\"\n        飞易来vip盒子，在python311下测试 ctypes.__version__==1.1.0\n    \"\"\"\n\n    def __init__(self, vid_pid):\n        # 进程内注册插件,模块所在的路径按照实际位置修改\n        self.dll = self.init_dll()\n        vid = int(vid_pid[:4], 16)\n        pid = int(vid_pid[4:], 16)\n        self.hdl = self.dll.M_Open_VidPid(vid, pid)\n\n    def move_rp(self, short_x: int, short_y: int):\n        self.dll.M_MoveR(self.hdl, short_x, short_y)\n\n    def move(self, short_x: int, short_y: int):\n        self.dll.M_MoveR2(self.hdl, short_x, short_y)\n\n    def left_click(self):\n        self.dll.M_LeftClick(self.hdl, 1)\n\n    def click_key(self, value):\n        self.dll.M_KeyPress(self.hdl, value, 1)\n\n    def init_dll(self):\n        objdll = ctypes.cdll.LoadLibrary(r\".\\msdk.dll\")\n        # 定义函数原型\n        M_Open = objdll.M_Open\n        M_Open.argtypes = [ctypes.c_int]\n        M_Open.restype = ctypes.c_void_p\n\n        M_Open_VidPid = objdll.M_Open_VidPid\n        M_Open_VidPid.argtypes = [ctypes.c_int, ctypes.c_int]\n        M_Open_VidPid.restype = ctypes.c_void_p\n\n        M_KeyPress = objdll.M_KeyPress\n        M_KeyPress.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_int]\n        M_KeyPress.restype = ctypes.c_int\n\n        M_KeyDown = objdll.M_KeyDown\n        M_KeyDown.argtypes = [ctypes.c_void_p, ctypes.c_int]\n        M_KeyDown.restype = ctypes.c_int\n\n        M_KeyUp = objdll.M_KeyDown\n        M_KeyUp.argtypes = [ctypes.c_void_p, ctypes.c_int]\n        M_KeyUp.restype = ctypes.c_int\n\n        M_LeftClick = objdll.M_LeftClick\n        M_LeftClick.argtypes = [ctypes.c_void_p, ctypes.c_int]\n        M_LeftClick.restype = ctypes.c_int\n\n        M_LeftDown = objdll.M_LeftDown\n        M_LeftDown.argtypes = [ctypes.c_void_p]\n        M_LeftDown.restype = ctypes.c_int\n\n        M_LeftUp = objdll.M_LeftUp\n        M_LeftUp.argtypes = [ctypes.c_void_p, ctypes.c_int]\n        M_LeftUp.restype = ctypes.c_int\n\n        M_RightClick = objdll.M_RightClick\n        M_RightClick.argtypes = [ctypes.c_void_p, ctypes.c_int]\n        M_RightClick.restype = ctypes.c_int\n\n        M_RightDown = objdll.M_RightDown\n        M_RightDown.argtypes = [ctypes.c_void_p]\n        M_RightDown.restype = ctypes.c_int\n\n        M_RightUp = objdll.M_RightUp\n        M_RightUp.argtypes = [ctypes.c_void_p]\n        M_RightUp.restype = ctypes.c_int\n\n        # 拟人移动\n        M_MoveR2 = objdll.M_MoveR2\n        M_MoveR2.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_int]\n        M_MoveR2.restype = ctypes.c_int\n\n        # 无拟人移动\n        M_MoveR = objdll.M_MoveR\n        M_MoveR.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_int]\n        M_MoveR.restype = ctypes.c_int\n\n        M_Close = objdll.M_Close\n        M_Close.argtypes = [ctypes.c_void_p]\n        M_Close.restype = ctypes.c_int\n        return objdll\n\n\nfei = FeiMover(\"C2160102\")\n\nfei.move_rp(100, 100)\n"
  },
  {
    "path": "test/image_match/__init__.py",
    "content": ""
  },
  {
    "path": "test/image_match/image_match.py",
    "content": "import time\n\nimport cv2\nimport numpy as np\n\n\ndef match_template(origin_image, match_image_list, save_image=False, early_termination=True, threshold=0.6,\n                   dynamic_range=0.5):\n    # 转换为灰度图\n    image_gray = cv2.cvtColor(origin_image, cv2.COLOR_BGR2GRAY)\n    found_list = []\n    temp_scale = None\n    for match_image in match_image_list:\n        template_gray = cv2.cvtColor(match_image, cv2.COLOR_BGR2GRAY)\n        # 获取模板的原始宽高\n        template_height, template_width = template_gray.shape[:2]\n        found = None\n        # 定义缩放范围\n        if temp_scale is None:\n            scales = np.linspace(1 - dynamic_range, 1 + dynamic_range, 5)\n        else:\n            scales = np.linspace(temp_scale - dynamic_range, temp_scale + dynamic_range, 5)\n        for scale in scales:\n            resized = cv2.resize(template_gray, (int(template_width * scale), int(template_height * scale)))\n            r = float(resized.shape[1]) / template_gray.shape[1]\n\n            if resized.shape[0] > image_gray.shape[0] or resized.shape[1] > image_gray.shape[1]:\n                continue\n\n            result = cv2.matchTemplate(image_gray, resized, cv2.TM_CCOEFF_NORMED)\n            min_val, max_val, min_loc, max_loc = cv2.minMaxLoc(result)\n\n            if found is None or max_val > found[0]:\n                found = (max_val, max_loc, r)\n                if found[0] > threshold:\n                    temp_scale = scale\n                    print(scales)\n                    break\n\n        if found is not None and found[0] >= threshold:\n            max_val, max_loc, r = found\n            print(f\"Match found with value: {max_val}\")\n            start_x, start_y = int(max_loc[0]), int(max_loc[1])\n            end_x, end_y = int((max_loc[0] + template_width * r)), int((max_loc[1] + template_height * r))\n            found_list.append((start_x, start_y, end_x, end_y))\n            if early_termination:\n                break\n        else:\n            print(\"no found\")\n    if save_image and len(found_list) > 0:\n        for found in found_list:\n            # 在原图上绘制矩形框\n            cv2.rectangle(origin_image, (found[0], found[1]), (found[2], found[3]), (0, 255, 0), 2)\n        cv2.imwrite('result.png', origin_image)\n\n\nif __name__ == '__main__':\n    # 读取图像\n    image_path = 'box.png'  # 替换为你的大图路径\n    image = cv2.imread(image_path)\n\n    template_path = ['s.png', 's2.png', 's3.png']  # 替换为你要查找的小图路径\n    template_image = [cv2.imread(template) for template in template_path]\n\n    start = time.time()\n    match_template(image, template_image, save_image=True, early_termination=False)\n    end = time.time()\n    print(f\"Match template time: {int((end - start) * 1000)}ms\")\n"
  },
  {
    "path": "test/test.py",
    "content": "import os\n\nprint(os.path.expanduser('~'))\n"
  },
  {
    "path": "tools/Tools.py",
    "content": "import ctypes\nimport os\nimport queue\nimport threading\nimport time\nfrom io import BytesIO\nfrom shutil import copyfile\n\nimport cv2\nimport numpy as np\nimport win32gui\nfrom skimage.metrics import structural_similarity\nfrom collections import deque\nimport mss\n\n\nclass Tools:\n    \"\"\"\n        工具类\n    \"\"\"\n\n    @staticmethod\n    def get_resolution():\n        \"\"\"\n            获取当前屏幕分辨率\n        :return:\n        \"\"\"\n        user32 = ctypes.windll.user32\n        user32.SetProcessDPIAware(2)\n        [xw, yh] = [user32.GetSystemMetrics(0), user32.GetSystemMetrics(1)]\n        return xw, yh\n\n    @staticmethod\n    def compare_image(img, path_image):\n        \"\"\"\n            图片对比\n        :param img:\n        :param path_image:\n        :return:\n        \"\"\"\n        buffer = BytesIO()\n        img.save(buffer, format=\"PNG\")\n        buffer.seek(0)\n        image_a = cv2.imdecode(np.frombuffer(buffer.getvalue(), dtype=np.uint8), cv2.IMREAD_COLOR)\n        buffer.close()\n        image_b = cv2.imdecode(np.fromfile(path_image, dtype=np.uint8), cv2.IMREAD_COLOR)\n        gray_a = cv2.cvtColor(image_a, cv2.COLOR_BGR2GRAY)\n        gray_b = cv2.cvtColor(image_b, cv2.COLOR_BGR2GRAY)\n        (score, diff) = structural_similarity(gray_a, gray_b, full=True)\n        return score\n\n    def mss_shot(sel, bbox):\n        with mss.mss() as sct:\n            return sct.grab(bbox)\n\n    @staticmethod\n    def current_milli_time():\n        \"\"\"\n            获取当前时间戳13位\n        :return:\n        \"\"\"\n        return int(round(time.time() * 1000))\n\n    @staticmethod\n    def copy_file(source_path, target_path):\n        \"\"\"\n            复制文件\n        :param source_path:\n        :param target_path:\n        \"\"\"\n        op = os.path\n        if isinstance(source_path, str):\n            if op.exists(source_path):\n                copyfile(source_path, target_path)\n            else:\n                print(\"源文件不存在\")\n\n    @staticmethod\n    def convert_to_decimal(input_str):\n        try:\n            # 尝试将输入字符串解析为16进制数字\n            decimal_value = int(input_str, 10)\n        except ValueError:\n            try:\n                # 如果解析失败，则尝试将输入字符串解析为10进制数字\n                decimal_value = int(input_str, 16)\n            except ValueError:\n                # 如果两者都失败，返回一个适当的错误或默认值\n                # print(\"无法解析输入字符串为数字\")\n                return None\n\n        return decimal_value\n\n    @staticmethod\n    def is_apex_windows():\n        \"\"\"\n            是否处于apex窗口中\n        :return:\n        \"\"\"\n        window_handle = win32gui.GetForegroundWindow()\n        window_title = win32gui.GetWindowText(window_handle)\n        return window_title == 'Apex Legends'\n\n    @staticmethod\n    def hide_process():\n        try:\n            # 获取进程ID\n            pid = ctypes.windll.kernel32.GetCurrentProcessId()\n\n            # 获取进程句柄\n            handle = ctypes.windll.kernel32.OpenProcess(1, False, pid)\n\n            # 隐藏进程窗口\n            ctypes.windll.user32.ShowWindow(handle, 0)\n            ctypes.windll.kernel32.CloseHandle(handle)\n\n        except Exception as e:\n            print(f\"Error: {e}\")\n\n    class FixedSizeQueue:\n        \"\"\"\n            固定长度队列\n        \"\"\"\n\n        def __init__(self, max_size):\n            self.queue = deque(maxlen=max_size)\n\n        def push(self, item):\n            \"\"\"\n                将数据入队\n            :param item:\n            \"\"\"\n            self.queue.append(item)\n\n        def pop(self):\n            \"\"\"\n                出队最先入队的数据\n            :return:\n            \"\"\"\n            return self.queue.popleft()\n\n        def size(self):\n            \"\"\"\n                获取队列当前数据量\n            :return:\n            \"\"\"\n            return len(self.queue)\n\n        def get_last(self):\n            \"\"\"\n                获取最后入队的数据，不出队\n            :return:\n            \"\"\"\n            # 获取最后一次进队的元素但不出队\n            return self.queue[-1] if self.queue else None\n\n    class GetBlockQueue:\n        \"\"\"\n            阻塞队列\n        \"\"\"\n\n        def __init__(self, name, maxsize=1):\n            self.name = name\n            self.lock = threading.Lock()\n            self.queue = queue.Queue(maxsize=maxsize)\n\n        def get(self):\n            o = self.queue.get()\n            return o\n\n        def put(self, data):\n            with self.lock:\n                while True:\n                    try:\n                        self.queue.put(data, block=False)\n                        break\n                    except queue.Full:\n                        try:\n                            self.queue.get_nowait()\n                        except queue.Empty:\n                            pass\n\n        def clear(self):\n            with self.lock:\n                while not self.queue.empty():\n                    self.queue.get()"
  },
  {
    "path": "tools/__init__.py",
    "content": ""
  },
  {
    "path": "tools/image_tool.conf",
    "content": "[conf]\npath = temp\nbbox = 991,37,1112,77\nprint_screen_key = f"
  },
  {
    "path": "tools/image_tool.py",
    "content": "import cv2\nimport numpy as np\nfrom PIL import ImageGrab\nimport configparser\nfrom pynput.keyboard import Controller, Listener\n\nfrom core.screentaker.CapScreenTaker import CapScreenTaker\nfrom core.screentaker.LocalMssScreenTaker import LocalMssScreenTaker\nfrom log import LogFactory\n\nconfig = configparser.ConfigParser()  # 创建对象\nconfig.read(\"image_tool.conf\", encoding=\"utf-8\")\npath = config.get(\"conf\", \"path\")  # 需要保存到E盘的目录文件名\nbbox = tuple(int(x) for x in config.get(\"conf\", \"bbox\").split(\",\"))\nprint_screen_key = config.get(\"conf\", \"print_screen_key\")\nkeyboard = Controller()\ni = 1\n\nLogFactory.init_logger()\n\n# screen_taker = CapScreenTaker({\n#     \"width\": 2560,\n#     \"height\": 1440,\n#     \"frame_rate\": 144,\n#     \"format\": \"MJPG\"\n# })\n\nscreen_taker = LocalMssScreenTaker()\n\ndef on_press(key):\n    # print('{0} 被按下'.format(key))\n    pass\n\n\n# 释放按钮，按esc按键会退出监听\ndef on_release(key):\n    # print('{0} 被释放'.format(key))\n    global i\n\n    if not hasattr(key, 'name') and (key.char == print_screen_key):\n        # img = ImageGrab.grab(bbox=bbox)  # 也可以不传参数，默认截取整个屏幕\n        # img.save(path + str(i) + \".png\")  # 保存到E盘目录\n\n        img = screen_taker.get_images_from_bbox([bbox])[0]\n        img = np.array(img)\n        cv2.imwrite(path + str(i) + \".png\", img)\n\n        print('截图保存成功')\n        i += 1\n\n\n# 创建监听\nwith Listener(on_press=on_press, on_release=on_release) as listener:\n    listener.join()\n\n# imsrc = ac.imread(path)  # 需要用aircv转换，方便cv2.imshow函数打开\n# cv2.imshow('python屏幕截图后自动打开该图片', imsrc)\n# cv2.waitKey(0)\n# cv2.destroyAllWindows()\n"
  },
  {
    "path": "windows/SystemTrayApp.py",
    "content": "import os\nimport sys\n\nfrom PyQt5.QtGui import QIcon\nfrom PyQt5.QtWidgets import QSystemTrayIcon, QMenu, QAction, QMainWindow\n\nfrom log import LogFactory\n\n\nclass SystemTrayApp(QMainWindow):\n    \"\"\"\n        系统托盘\n    \"\"\"\n    def __init__(self, icon_path):\n        super().__init__()\n        self.logger = LogFactory.getLogger(self.__class__)\n        self.tray_menu = None\n        self.tray_icon = None\n\n        if not QSystemTrayIcon.isSystemTrayAvailable():\n            self.logger.print_log(\"系统托盘不可用\")\n            return\n        path = f\"images/{icon_path}.png\"\n\n        if not os.path.exists(path):\n            bundle_dir = getattr(sys, '_MEIPASS', os.path.abspath(os.path.dirname(__file__)))\n            path = os.path.join(bundle_dir, f\"images/{icon_path}.png\")\n            if not os.path.exists(path):\n                self.logger.print_log(\"无法找到图标\")\n        self.icon = QIcon(path)\n        if self.icon.isNull():\n            self.logger.print_log(\"无效的图标\")\n            return\n\n        self.exit_action = QAction(\"退出\", self)\n        self.init_icon()\n\n    def init_icon(self):\n        self.tray_menu = QMenu(self)\n        self.tray_menu.addAction(self.exit_action)\n        self.exit_action.triggered.connect(self.exit_app)\n\n        self.tray_icon = QSystemTrayIcon(self)\n        self.tray_icon.setIcon(self.icon)\n        self.tray_icon.setContextMenu(self.tray_menu)\n        self.tray_icon.show()\n\n    def exit_app(self):\n        self.tray_icon.hide()\n        os._exit(0)\n"
  },
  {
    "path": "windows/__init__.py",
    "content": ""
  }
]