[
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms to help and support BetterCrewLink project\n\ngithub: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]\npatreon: # Replace with a single Patreon username\nopen_collective: # Replace with a single Open Collective username\nko_fi: ohmyguus # Replace with a single Ko-fi username\ntidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel\ncommunity_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry\nliberapay: # Replace with a single Liberapay username\nissuehunt: # Replace with a single IssueHunt username\notechie: # Replace with a single Otechie username\ncustom: paypal.com/donate/?hosted_button_id=KS43BDTGN76JQ # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug Report\nabout: Create a report to help us improve.\ntitle: \"[BUG REPORT]\"\nlabels: bug\nassignees: ''\n\n---\n\n# You MUST use this template or your issue will be deleted.\n\n**Before reporting a bug, always look at the [FAQ](https://discord.gg/qDqTzvj4SH) in Discord Server that there usually has a solution for your bug**\n\n**If your problem is with BetterCrewLink on your PC, [click here](https://github.com/OhMyGuus/BetterCrewLink/issues) and make an issue there, if your problem is with BetterCrewLink on your mobile or the web version, ignore that and continue with your bug report**\n\n# Pre-Flight Checklist\nPlease use this checklist to avoid spamming:\n\n1. [ ] I am not asking a question => use the [Discord](https://discord.gg/qDqTzvj4SH) if you are\n2. [ ] I have tried to use an [alternative voice server](https://bettercrewl.ink/)\n3. [ ] I have checked everyone in my lobby is on the same BetterCrewLink/CrewLink server\n4. [ ] I have clicked in `Refresh` on the BetterCrewLink mobile app when I can't hear some people (this is a known issue)\n5. [ ] I have checked that the BetterCrewLink/CrewLink server I'm using is up to date\n6. [ ] I have a screenshot of any errors\n7. [ ] I have checked that someone else has not reported this using the [search bar](https://github.com/OhMyGuus/BetterCrewlink-mobile/issues?q=is%3Aissue)\n\n**Describe the bug**\n<!-- A clear and concise description of what the bug is. -->\n\n**To Reproduce**\nSteps to reproduce the behaviour:\n1. Go to '...'\n2. Click on '....'\n3. Scroll down to '....'\n4. See error\n\n**Expected behaviour**\n<!-- A clear and concise description of what you expected to happen. -->\n\n**Screenshots**\n<!-- If applicable, add screenshots to help explain your problem. -->\n\n**Smartphone (please complete the following information):**\n - Device: [e.g. Motorola G8 Play]\n - OS: [e.g. Android 11]\n - Version: [e.g. 1.0.20]\n - Browser: [e.g. Chrome] (optional, only if you use the [web version](https://web.bettercrewl.ink/))\n\n**Additional context**\n<!-- Add any other context about the problem here. -->\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "content": "blank_issues_enabled: false\ncontact_links:\n  - name: YOU MUST USE ONE OF THE ABOVE TEMPLATES OR YOUR ISSUE WILL BE DELETED!\n    url: https://github.com/OhMyGuus/BetterCrewlink-mobile/issues/new/choose\n    about: This is to prevent duplicate issues and spam.\n  - name: I need help\n    url:  https://discord.gg/qDqTzvj4SH\n    about: Please ask and answer questions here.\n  - name: Security issue\n    url: https://discordapp.com/users/508426414387757057\n    about: Please report security vulnerabilities directly to ThaGuus#2140 in Discord.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "content": "---\nname: Feature Request\nabout: Suggest an idea for this project.\ntitle: \"[FEATURE]\"\nlabels: enhancement\nassignees: ''\n\n---\n\n# Pre-Flight Checklist\nPlease use this checklist to avoid spamming:\n\n1. [ ] I am not asking a question => use the [Discord](https://discord.gg/qDqTzvj4SH) if you are\n2. [ ] I have checked that someone else has not suggested this using the [search bar](https://github.com/OhMyGuus/BetterCrewlink-mobile/issues?q=is%3Aissue)\n3. [ ] My feature request is not one of the **commonly suggested features**:\n- iOS app (its already being development)\n\n**Is your feature request related to a problem? Please describe.**\n<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->\n\n**Describe the solution you'd like**\n<!-- A clear and concise description of what you want to happen. -->\n\n**Describe alternatives you've considered**\n<!-- A clear and concise description of any alternative solutions or features you've considered. -->\n\n**Additional context**\n<!-- Add any other context or screenshots about the feature request here. -->\n"
  },
  {
    "path": ".gitignore",
    "content": "# Specifies intentionally untracked files to ignore when using Git\n# http://git-scm.com/docs/gitignore\n\n# Angular build and cache\n/.angular/cache\n/.angular/*\n\n# Capacitor\n/ios/\n\n# Environment files\n/src/environments/environment.*.ts\n\n# OS generated files\nehthumbs.db\nIcon?\nDesktop.ini\n\n# VSCode settings\n.vscode/\n\n# Mac\n*.DS_Store\n\n# Windows\nThumbs.db\n$RECYCLE.BIN/\n\n# Logs\n*.log\nlog.txt\nnpm-debug.log*\n\n# Node\nnode_modules/\n\n# Build output\n/dist/\n/www/\n/coverage/\n\n# IDEs\n.idea/\n*.sublime-project\n*.sublime-workspace\n\n# Misc\n*~\n*.sw[mnpcod]\n.tmp\n*.tmp\n*.tmp.*\n.sass-cache/\n.sourcemaps/\n.versions/\n/platforms/\n# /plugins/\nUserInterfaceState.xcuserstate\n"
  },
  {
    "path": ".httaccess",
    "content": "RewriteEngine on\n# Don’t rewrite files or directories\nRewriteCond %{REQUEST_FILENAME} -f [OR]\nRewriteCond %{REQUEST_FILENAME} -d\nRewriteRule ^ - [L]\n# Rewrite everything else to index.html to allow HTML5 state links\nRewriteRule ^ index.html [L]"
  },
  {
    "path": ".prettierignore",
    "content": ""
  },
  {
    "path": ".prettierrc.yaml",
    "content": "trailingComma: 'es5'\nuseTabs: true\nsemi: true\nsingleQuote: true\nprintWidth: 120\n\n"
  },
  {
    "path": "LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<https://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<https://www.gnu.org/licenses/why-not-lgpl.html>.\n"
  },
  {
    "path": "README.md",
    "content": "[![GitHub Downloads][github-shield]][github-url] [![GPL-3.0 License][license-shield]][license-url] [![Support BetterCrewLink][paypal-shield]][paypal-url] [![Support BetterCrewLink][kofi-shield]][kofi-url] [![Discord Server][discord-shield]][discord-url] [![Contributors][contributors-shield]][contributors-url]\n\n<br />\n<p align=\"center\">\n  <a href=\"https://github.com/OhMyGuus/BetterCrewlink-mobile\">\n    <img src=\"logo.png\" alt=\"Logo\" width=\"80\" height=\"80\">\n  </a>\n  <h3 align=\"center\">BetterCrewLink Mobile is here!</h3>\n\n\n  <p align=\"center\">\n    Free, open, Among Us proximity voice chat.\n    <br />\n    <a href=\"https://github.com/OhMyGuus/BetterCrewlink-mobile/issues\">Report Bug</a>\n    ·\n    <a href=\"https://github.com/OhMyGuus/BetterCrewlink-mobile/issues\">Request Feature</a>\n    ·\n    <a href=\"#installation\">Installation Instructions</a>\n  </p>\n  <p align=\"center\">\n    <b><a href=\"https://www.paypal.com/donate?hosted_button_id=KS43BDTGN76JQ\">Donate to BetterCrewLink</a></b></br>\n  (all donations will be used for the apple developer license and extra servers)</br>\n   <b><a href=\"https://paypal.me/ottomated\">Donate to ottomated (offical crewlink)</a></b>\n  </p>\n</p>\n<hr />\n\n<p>\n  \n<b>Notes:</b><br />\n\n- This is an unofficial fork of CrewLink, for any problem, question, issue or suggestion you have with BetterCrewLink talk to us on our [Discord](https://discord.gg/qDqTzvj4SH), or [GitHub](https://github.com/OhMyGuus/BetterCrewlink-mobile/issues) or message me on Discord ([ThaGuus#2140](https://discordapp.com/users/508426414387757057)) do not report any problems to the official Discord or GitHub project of CrewLink as they will not support you.\n\n- To get the most of BetterCrewLink use the voice server: <a href=\"https://bettercrewl.ink\">`https://bettercrewl.ink`</a>\n\n</p>\n<a href=\"https://discord.gg/qDqTzvj4SH\"> <img src=\"https://i.imgur.com/XpnBhTW.png\" width=\"150px\" /> </a>\n\n<!-- TABLE OF CONTENTS -->\n## Table of Contents\n\n* [About the Project](#about-the-project)\n* [Installation](#installation)\n  * [Setup Instructions](#setup-instructions)\n  * [Android](#android)\n  * [iOS](#ios)\n* [Development](#development)\n  * [Prerequisites](#prerequisites)\n  * [Setup](#setup)\n* [Contributing](#contributing)\n  * [Contributors](#contributors)\n* [License](#license)\n\n<!-- ABOUT THE PROJECT -->\n## About The Project\n\nThis project implements proximity voice chat for mobile users in Among Us. As long as there is a PC user with \"Mobile Host\" enabled in your lobby, you will be able to hear people near you.\n\n## Installation\n\nDownload the latest version from [releases](https://github.com/OhMyGuus/BetterCrewlink-mobile/releases/latest) and run the `Bettercrewlink-v-X-X-X-a.apk` file on your phone. You may have to allow chrome to install apps on your phone.\n\nYou can also use the web version in your browser [here](https://web.bettercrewl.ink/).\n\nIf you have a PC and want to download the PC version of BetterCrewLink (without being the Bluestacks) go to category [Windows](https://github.com/OhMyGuus/BetterCrewLink#windows).\n\n## Setup Instructions\n\n### Android\n\n* Open the app.\n* Ensure there is one person in the lobby with \"Mobile Host\" enabled on their PC (they must use [BetterCrewLink](https://github.com/OhMyGuus/BetterCrewLink)).\n* Fill in the required information (make sure you have a unique name in your lobby).\n* Hit the connect button.\n  * If you are waiting on the connecting screen for a while you may want to check that all the information is correct and the is a pc user with \"Mobile Host\" enabled in the lobby.\n* All done!\n\n### iOS\n\nAn iOS version is still being developed and will be released soon, but you can use in the meantime the [web version](https://web.bettercrewl.ink/). (requires a PC player)\n\n## Development\n\nYou only need to follow the below instructions if you are trying to modify this software. Otherwise, please download the latest version from the [github releases](https://github.com/OhMyGuus/BetterCrewlink-mobile/releases).\n\nServer code is located at [OhMyGuus/BetterCrewLink-server](https://github.com/OhMyGuus/BetterCrewLink-server). Please use a local server for development purposes.\n\n### Prerequisites\n\nThis is an example of how to list things you need to use the software and how to install them.\n* [node.js](https://nodejs.org/en/download/)\n* Ionic cli\n```sh\nnpm install -g @ionic/cli\n```\n\n### Setup\n\n1. Clone the repo\n```sh\ngit clone https://github.com/OhMyGuus/BetterCrewlink-mobile.git\ncd BetterCrewlink-mobile\n```\n2. Install packages and sync\n```sh\nnpm install \nionic capacitor sync\n```\n3. Run the project\n```JS\nionic serve\n```\n\n<!-- CONTRIBUTING -->\n## Contributing\n\nAny contributions you make are greatly appreciated.\n\n1. [Fork the Project](https://github.com/OhMyGuus/BetterCrewlink-mobile/fork)\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## Contributors\n\n[![Contributors][contributors-shield]][contributors-url]\n\n* [OhMyGuus](https://github.com/OhMyGuus) for make various things for [BetterCrewLink](https://github.com/OhMyGuus/BetterCrewLink), example: NAT Fix, more overlays, support for Mobile and owner of project\n* [ottomated](https://github.com/ottomated) for make [CrewLink](https://github.com/ottomated/CrewLink)\n* [vrnagy](https://github.com/vrnagy) for make WebRTC reconnects automatically for [BetterCrewLink](https://github.com/OhMyGuus/BetterCrewLink)\n* [TheGreatMcPain](https://github.com/TheGreatMcPain) & [Donokami](https://github.com/Donokami) for make support for Linux\n* [squarebracket](https://github.com/squarebracket) for make support overlay for Linux\n* [JKohlman](https://github.com/JKohlman) for make various things for [BetterCrewLink](https://github.com/OhMyGuus/BetterCrewLink), example: push to mute, visual changes and making Multi Stage builds for [BetterCrewLink Server](https://github.com/OhMyGuus/BetterCrewLink-server)\n* [Diemo-zz](https://github.com/Diemo-zz) for make the default Voice Server for: <a href=\"https://bettercrewl.ink\">`https://bettercrewl.ink`</a>\n* [KadenBiel](https://github.com/KadenBiel) for make various things for [BetterCrewLink Mobile](https://github.com/OhMyGuus/BetterCrewlink-mobile), example: Better UI, Settings page\n* [adofou](https://github.com/adofou) for make new parameters for node-turn server for [BetterCrewLink-Server](https://github.com/OhMyGuus/BetterCrewLink-server)\n* [Kore-Development](https://github.com/Kore-Development) for make support for Repl.it and gitignore changes for [BetterCrewLink-Server](https://github.com/OhMyGuus/BetterCrewLink-server)\n* [cybershard](https://github.com/cybershard) & [edqx](https://github.com/edqx) for make Only hear people in vision, Walls block voice and Hear through cameras\n* [electron-overlay-window](https://github.com/SnosMe/electron-overlay-window) for make it easier to do overlays\n* [node-keyboard-watcher](https://github.com/OhMyGuus/node-keyboard-watcher) for make it easy to push to talk and push to mute\n* [MatadorProBr](https://github.com/MatadorProBr) for make this list of Contribuators, better README.md, wiki\n\nA big thank you to all those people who contributed and still contribute to this project to stay alive, thank you for being part of this BetterCrewLink community!\n\n## License\n\nDistributed under the GNU General Public License v3.0. See <a href=\"https://github.com/OhMyGuus/BetterCrewlink-mobile/blob/master/LICENSE\">`LICENSE`</a> for more information.\n\n[github-shield]: https://img.shields.io/github/downloads/OhMyGuus/BetterCrewlink-mobile/total?label=Downloads\n[github-url]: https://github.com/OhMyGuus/BetterCrewlink-mobile/releases/\n[license-shield]: https://img.shields.io/github/license/OhMyGuus/BetterCrewlink-mobile?label=License\n[license-url]: https://github.com/OhMyGuus/BetterCrewlink-mobile/blob/master/LICENSE\n[paypal-shield]: https://img.shields.io/badge/Support-BetterCrewLink-purple?logo=PayPal\n[paypal-url]: https://www.paypal.com/donate?hosted_button_id=KS43BDTGN76JQ\n[kofi-shield]: https://img.shields.io/badge/Support-BetterCrewLink-purple?logo=Ko-fi&logoColor=white\n[kofi-url]: https://ko-fi.com/ohmyguus\n[discord-shield]: https://img.shields.io/discord/791516611143270410?color=cornflowerblue&label=Discord&logo=Discord&logoColor=white\n[discord-url]: https://discord.gg/qDqTzvj4SH\n[contributors-shield]: https://img.shields.io/github/contributors/OhMyGuus/BetterCrewlink-mobile?label=Contributors\n[contributors-url]: https://github.com/OhMyGuus/BetterCrewlink-mobile/graphs/contributors"
  },
  {
    "path": "TODO.md",
    "content": "# TODO\n\n## Server\n\n- [x] Migrate from socket.io to a raw websocket connection. Ensure it auto-reconnects.\n- [x] Move the default server to a better host.\n- [x] Rewrite all error messages to be even more human-readable.\n- [ ] Integrate an official server list into the client.\n- [x] Detect the reason *why* the server can't provide offsets: i.e. Among Us just updated, it's an old version of Among Us, the server hasn't updated, etc.\n- [x] Repl.it support.\n\n### Stretch\n\n- [ ] Distribute the server load, with a centralized matchmaking database.\n- [ ] Re-write the server in Rust.\n\n## Voice / WebRTC\n\n- [ ] Add a microphone mute button.\n- [x] Add a microphone boost slider.\n- [x] Add a speaker adjustment slider.\n- [x] Add individual adjustment sliders to each of the players.\n- [x] Add an OBS Overlay.\n- [x] Add an option in \"Host Settings\" for hearing through cams.\n- [x] Add an option in \"Host Settings\" to disable talking through walls.\n- [x] Handle all RTC errors to make it unnecessary to ever re-open an RTC connection.\n- [x] Detect reason for RTC failure: NAT type, etc?\n- [x] Re-enable all `navigator.getUserMedia` functions that can be re-enabled with autoGainControl kicking in.\n- [x] Move all player-to-player communication logic to RTC data channels, versus sending them over the websocket.\n- [ ] Change VAD to send the status towards the server.\n\n### Stretch\n\n- [x] Implement an optional TURN server.\n\n## Game Reader\n\n- [x] Fix unicode characters in player names\n- [ ] Indicate to the user when it can't read memory properly. Example: screen displays `MENU` while in lobby due to some misplaced offset.\n- [x] Don't use the Unity Analytics file to read the game version. Use either a hash of the GameAssembly dll, or DMA it from the process.\n\n### Stretch\n\n- [ ] Move away from DMA and towards a different method. Probably network packet sniffing? Maybe DLL injection?\n- [x] Add Android Support.\n- [ ] Add iOS Support.\n- [x] Add Linux Support.\n- [ ] Support for other languages.\n- [ ] Customizable Window Size.\n- [ ] Support for Local games.\n- [ ] Ask to update and not auto update.\n- [x] Custom Color Support.\n"
  },
  {
    "path": "android/.gitignore",
    "content": "# Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore\n\n# Built application files\n*.apk\n*.aar\n*.ap_\n*.aab\n\n# Files for the ART/Dalvik VM\n*.dex\n\n# Java class files\n*.class\n\n# Generated files\nbin/\ngen/\nout/\n#  Uncomment the following line in case you need and you don't have the release build type files in your app\n# release/\n\n# Gradle files\n.gradle/\nbuild/\n\n# Local configuration file (sdk path, etc)\nlocal.properties\n\n# Proguard folder generated by Eclipse\nproguard/\n\n# Log Files\n*.log\n\n# Android Studio Navigation editor temp files\n.navigation/\n\n# Android Studio captures folder\ncaptures/\n\n# IntelliJ\n*.iml\n.idea/workspace.xml\n.idea/tasks.xml\n.idea/gradle.xml\n.idea/assetWizardSettings.xml\n.idea/dictionaries\n.idea/libraries\n# Android Studio 3 in .gitignore file.\n.idea/caches\n.idea/modules.xml\n# Comment next line if keeping position of elements in Navigation Editor is relevant for you\n.idea/navEditor.xml\n\n# Keystore files\n# Uncomment the following lines if you do not want to check your keystore files in.\n#*.jks\n#*.keystore\n\n# External native build folder generated in Android Studio 2.2 and later\n.externalNativeBuild\n.cxx/\n\n# Google Services (e.g. APIs or Firebase)\n# google-services.json\n\n# Freeline\nfreeline.py\nfreeline/\nfreeline_project_description.json\n\n# fastlane\nfastlane/report.xml\nfastlane/Preview.html\nfastlane/screenshots\nfastlane/test_output\nfastlane/readme.md\n\n# Version control\nvcs.xml\n\n# lint\nlint/intermediates/\nlint/generated/\nlint/outputs/\nlint/tmp/\n# lint/reports/\n\n# Android Profiling\n*.hprof\n\n# Cordova plugins for Capacitor\ncapacitor-cordova-android-plugins\n\n# Copied web assets\napp/src/main/assets/public\n\n# Generated Config files\napp/src/main/assets/capacitor.config.json\napp/src/main/assets/capacitor.plugins.json\napp/src/main/res/xml/config.xml\n"
  },
  {
    "path": "android/app/.gitignore",
    "content": "/build/*\n!/build/.npmkeep\n"
  },
  {
    "path": "android/app/build.gradle",
    "content": "apply plugin: 'com.android.application'\n\nandroid {\n    namespace \"io.bettercrewlink.app\"\n    compileSdk rootProject.ext.compileSdkVersion\n    defaultConfig {\n        applicationId \"io.bettercrewlink.app\"\n        minSdkVersion rootProject.ext.minSdkVersion\n        targetSdkVersion rootProject.ext.targetSdkVersion\n        versionCode 32\n        versionName \"1.0.32\"\n        testInstrumentationRunner \"androidx.test.runner.AndroidJUnitRunner\"\n        aaptOptions {\n             // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.\n             // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61\n            ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'\n        }\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n}\n\nrepositories {\n    flatDir{\n        dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'\n    }\n}\n\ndependencies {\n    implementation fileTree(include: ['*.jar'], dir: 'libs')\n    implementation \"androidx.appcompat:appcompat:$androidxAppCompatVersion\"\n    implementation \"androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion\"\n    implementation \"androidx.core:core-splashscreen:$coreSplashScreenVersion\"\n    implementation project(':capacitor-android')\n    testImplementation \"junit:junit:$junitVersion\"\n    androidTestImplementation \"androidx.test.ext:junit:$androidxJunitVersion\"\n    androidTestImplementation \"androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion\"\n    implementation project(':capacitor-cordova-android-plugins')\n}\n\napply from: 'capacitor.build.gradle'\n\ntry {\n    def servicesJSON = file('google-services.json')\n    if (servicesJSON.text) {\n        apply plugin: 'com.google.gms.google-services'\n    }\n} catch(Exception e) {\n    logger.info(\"google-services.json not found, google-services plugin not applied. Push Notifications won't work\")\n}\n"
  },
  {
    "path": "android/app/capacitor.build.gradle",
    "content": "// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME \"capacitor update\" IS RUN\n\nandroid {\n  compileOptions {\n      sourceCompatibility JavaVersion.VERSION_21\n      targetCompatibility JavaVersion.VERSION_21\n  }\n}\n\napply from: \"../capacitor-cordova-android-plugins/cordova.variables.gradle\"\ndependencies {\n    implementation project(':bcl-mobile-overlay')\n\n}\n\n\nif (hasProperty('postBuildExtras')) {\n  postBuildExtras()\n}\n"
  },
  {
    "path": "android/app/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n\n# Uncomment this to preserve the line number information for\n# debugging stack traces.\n#-keepattributes SourceFile,LineNumberTable\n\n# If you keep the line number information, uncomment this to\n# hide the original source file name.\n#-renamesourcefileattribute SourceFile\n"
  },
  {
    "path": "android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java",
    "content": "package com.getcapacitor.myapp;\n\nimport static org.junit.Assert.*;\n\nimport android.content.Context;\nimport androidx.test.ext.junit.runners.AndroidJUnit4;\nimport androidx.test.platform.app.InstrumentationRegistry;\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\n\n/**\n * Instrumented test, which will execute on an Android device.\n *\n * @see <a href=\"http://d.android.com/tools/testing\">Testing documentation</a>\n */\n@RunWith(AndroidJUnit4.class)\npublic class ExampleInstrumentedTest {\n\n    @Test\n    public void useAppContext() throws Exception {\n        // Context of the app under test.\n        Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();\n\n        assertEquals(\"com.getcapacitor.app\", appContext.getPackageName());\n    }\n}\n"
  },
  {
    "path": "android/app/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <application\n        android:allowBackup=\"true\"\n        android:icon=\"@mipmap/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:roundIcon=\"@mipmap/ic_launcher_round\"\n        android:supportsRtl=\"true\"\n        android:theme=\"@style/AppTheme\">\n\n        <activity\n            android:configChanges=\"orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode|navigation\"\n            android:name=\".MainActivity\"\n            android:label=\"@string/title_activity_main\"\n            android:theme=\"@style/AppTheme.NoActionBarLaunch\"\n            android:launchMode=\"singleTask\"\n            android:exported=\"true\">\n\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n\n        </activity>\n\n        <provider\n            android:name=\"androidx.core.content.FileProvider\"\n            android:authorities=\"${applicationId}.fileprovider\"\n            android:exported=\"false\"\n            android:grantUriPermissions=\"true\">\n            <meta-data\n                android:name=\"android.support.FILE_PROVIDER_PATHS\"\n                android:resource=\"@xml/file_paths\"></meta-data>\n        </provider>\n\n        <service\n            android:name=\"de.appplant.cordova.plugin.background.ForegroundService\"\n            android:exported=\"false\"\n            android:foregroundServiceType=\"microphone\" />\n\n    </application>\n\n    <!-- Permissions -->\n\n\n    <uses-permission android:name=\"android.permission.RECORD_AUDIO\" />\n    <uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>\n    <uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\" />\n    <uses-permission android:name=\"android.permission.POST_NOTIFICATIONS\"/>\n    <uses-permission android:name=\"android.permission.FOREGROUND_SERVICE_MICROPHONE\" />\n    <uses-permission android:name=\"android.permission.RECORD_AUDIO\" />\n    <uses-permission android:name=\"android.permission.FOREGROUND_SERVICE\" />\n    <uses-permission android:name=\"android.permission.INTERNET\" />\n</manifest>\n"
  },
  {
    "path": "android/app/src/main/assets/capacitor.config.json",
    "content": "{\n\t\"appId\": \"io.bettercrewlink.app\",\n\t\"appName\": \"BetterCrewlinkMobile\",\n\t\"bundledWebRuntime\": false,\n\t\"npmClient\": \"npm\",\n\t\"webDir\": \"www\",\n\t\"plugins\": {\n\t\t\"SplashScreen\": {\n\t\t\t\"launchShowDuration\": 0\n\t\t}\n\t},\n\t\"overrideUserAgent\": \"CrewLink/2.0.1 (win32)\",\n\t\"cordova\": {\n\t\t\"preferences\": {\n\t\t\t\"APP_SECRET\": \"968c50f3-eb43-4ceb-9b3d-55458601a601\"\n\t\t}\n\t},\n\t\"android\": {\n\t\t\"minSdkVersion\": 24,\n\t\t\"compileSdkVersion\": 34,\n\t\t\"targetSdkVersion\": 34\n\t}\n}\n"
  },
  {
    "path": "android/app/src/main/assets/capacitor.plugins.json",
    "content": "[\n\t{\n\t\t\"pkg\": \"bcl-mobile-overlay\",\n\t\t\"classpath\": \"io.bettercrewlink.plugin.BetterCrewlinkNativeServicePlugin\"\n\t}\n]\n"
  },
  {
    "path": "android/app/src/main/java/io/bettercrewlink/app/MainActivity.java",
    "content": "package io.bettercrewlink.app;\n\nimport com.getcapacitor.BridgeActivity;\n\npublic class MainActivity extends BridgeActivity {}\n"
  },
  {
    "path": "android/app/src/main/res/drawable/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android:viewportHeight=\"108\"\n    android:viewportWidth=\"108\">\n    <path\n        android:fillColor=\"#26A69A\"\n        android:pathData=\"M0,0h108v108h-108z\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M9,0L9,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,0L19,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M29,0L29,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M39,0L39,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M49,0L49,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M59,0L59,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M69,0L69,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M79,0L79,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M89,0L89,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M99,0L99,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,9L108,9\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,19L108,19\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,29L108,29\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,39L108,39\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,49L108,49\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,59L108,59\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,69L108,69\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,79L108,79\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,89L108,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,99L108,99\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,29L89,29\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,39L89,39\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,49L89,49\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,59L89,59\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,69L89,69\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,79L89,79\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M29,19L29,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M39,19L39,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M49,19L49,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M59,19L59,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M69,19L69,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M79,19L79,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n</vector>\n"
  },
  {
    "path": "android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:aapt=\"http://schemas.android.com/aapt\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android:viewportHeight=\"108\"\n    android:viewportWidth=\"108\">\n    <path\n        android:fillType=\"evenOdd\"\n        android:pathData=\"M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z\"\n        android:strokeColor=\"#00000000\"\n        android:strokeWidth=\"1\">\n        <aapt:attr name=\"android:fillColor\">\n            <gradient\n                android:endX=\"78.5885\"\n                android:endY=\"90.9159\"\n                android:startX=\"48.7653\"\n                android:startY=\"61.0927\"\n                android:type=\"linear\">\n                <item\n                    android:color=\"#44000000\"\n                    android:offset=\"0.0\" />\n                <item\n                    android:color=\"#00000000\"\n                    android:offset=\"1.0\" />\n            </gradient>\n        </aapt:attr>\n    </path>\n    <path\n        android:fillColor=\"#FFFFFF\"\n        android:fillType=\"nonZero\"\n        android:pathData=\"M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z\"\n        android:strokeColor=\"#00000000\"\n        android:strokeWidth=\"1\" />\n</vector>\n"
  },
  {
    "path": "android/app/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    tools:context=\".MainActivity\">\n\n    <WebView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\" />\n</androidx.coordinatorlayout.widget.CoordinatorLayout>\n"
  },
  {
    "path": "android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@color/ic_launcher_background\"/>\n    <foreground android:drawable=\"@mipmap/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@color/ic_launcher_background\"/>\n    <foreground android:drawable=\"@mipmap/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "android/app/src/main/res/values/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"ic_launcher_background\">#FFFFFF</color>\n</resources>"
  },
  {
    "path": "android/app/src/main/res/values/strings.xml",
    "content": "<?xml version='1.0' encoding='utf-8'?>\n<resources>\n    <string name=\"app_name\">BetterCrewlinkMobile</string>\n    <string name=\"title_activity_main\">BetterCrewlinkMobile</string>\n    <string name=\"package_name\">io.bettercrewlink.app</string>\n    <string name=\"custom_url_scheme\">io.bettercrewlink.app</string>\n</resources>\n"
  },
  {
    "path": "android/app/src/main/res/values/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar\">\n        <!-- Customize your theme here. -->\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n    </style>\n\n    <style name=\"AppTheme.NoActionBar\" parent=\"Theme.AppCompat.DayNight.NoActionBar\">\n        <item name=\"windowActionBar\">false</item>\n        <item name=\"windowNoTitle\">true</item>\n        <item name=\"android:background\">@null</item>\n    </style>\n\n\n    <style name=\"AppTheme.NoActionBarLaunch\" parent=\"Theme.SplashScreen\">\n        <item name=\"android:background\">@drawable/splash</item>\n    </style>\n</resources>"
  },
  {
    "path": "android/app/src/main/res/xml/config.xml",
    "content": "<?xml version='1.0' encoding='utf-8'?>\n<widget version=\"1.0.0\" xmlns=\"http://www.w3.org/ns/widgets\" xmlns:cdv=\"http://cordova.apache.org/ns/1.0\">\n  <access origin=\"*\" />\n  \n  <feature name=\"Permissions\">\n    <param name=\"android-package\" value=\"com.android.plugins.Permissions\"/>\n  </feature>\n\n  <feature name=\"BackgroundMode\">\n    <param name=\"android-package\" value=\"de.appplant.cordova.plugin.background.BackgroundMode\"/>\n  </feature>\n  <feature name=\"BackgroundModeExt\">\n    <param name=\"android-package\" value=\"de.appplant.cordova.plugin.background.BackgroundModeExt\"/>\n  </feature>\n\n  <feature name=\"Device\">\n    <param name=\"android-package\" value=\"org.apache.cordova.device.Device\"/>\n  </feature>\n\n  \n  <preference name=\"APP_SECRET\" value=\"968c50f3-eb43-4ceb-9b3d-55458601a601\" />\n</widget>"
  },
  {
    "path": "android/app/src/main/res/xml/file_paths.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<paths xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <external-path name=\"my_images\" path=\".\" />\n    <cache-path name=\"my_cache_images\" path=\".\" />\n</paths>"
  },
  {
    "path": "android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java",
    "content": "package com.getcapacitor.myapp;\n\nimport static org.junit.Assert.*;\n\nimport org.junit.Test;\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n * @see <a href=\"http://d.android.com/tools/testing\">Testing documentation</a>\n */\npublic class ExampleUnitTest {\n\n    @Test\n    public void addition_isCorrect() throws Exception {\n        assertEquals(4, 2 + 2);\n    }\n}\n"
  },
  {
    "path": "android/build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    \n    repositories {\n        google()\n        mavenCentral()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:8.7.2'\n        classpath 'com.google.gms:google-services:4.4.2'\n\n        // NOTE: Do not place your application dependencies here; they belong\n        // in the individual module build.gradle files\n    }\n}\n\napply from: \"variables.gradle\"\n\nallprojects {\n    repositories {\n        google()\n        mavenCentral()\n    }\n}\n\ntask clean(type: Delete) {\n    delete rootProject.buildDir\n}\n"
  },
  {
    "path": "android/capacitor.settings.gradle",
    "content": "// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME \"capacitor update\" IS RUN\ninclude ':capacitor-android'\nproject(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')\n\ninclude ':bcl-mobile-overlay'\nproject(':bcl-mobile-overlay').projectDir = new File('../plugins/bcl-mobile-overlay/android')\n"
  },
  {
    "path": "android/gradle/wrapper/gradle-wrapper.properties",
    "content": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-8.11.1-all.zip\nnetworkTimeout=10000\nvalidateDistributionUrl=true\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n"
  },
  {
    "path": "android/gradle.properties",
    "content": "# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\norg.gradle.jvmargs=-Xmx1536m\n\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\n\n# AndroidX package structure to make it clearer which packages are bundled with the\n# Android operating system, and which are packaged with your app's APK\n# https://developer.android.com/topic/libraries/support-library/androidx-rn\nandroid.useAndroidX=true\n"
  },
  {
    "path": "android/gradlew",
    "content": "#!/bin/sh\n\n#\n# Copyright © 2015-2021 the original authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# SPDX-License-Identifier: Apache-2.0\n#\n\n##############################################################################\n#\n#   Gradle start up script for POSIX generated by Gradle.\n#\n#   Important for running:\n#\n#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is\n#       noncompliant, but you have some other compliant shell such as ksh or\n#       bash, then to run this script, type that shell name before the whole\n#       command line, like:\n#\n#           ksh Gradle\n#\n#       Busybox and similar reduced shells will NOT work, because this script\n#       requires all of these POSIX shell features:\n#         * functions;\n#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,\n#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;\n#         * compound commands having a testable exit status, especially «case»;\n#         * various built-in commands including «command», «set», and «ulimit».\n#\n#   Important for patching:\n#\n#   (2) This script targets any POSIX shell, so it avoids extensions provided\n#       by Bash, Ksh, etc; in particular arrays are avoided.\n#\n#       The \"traditional\" practice of packing multiple parameters into a\n#       space-separated string is a well documented source of bugs and security\n#       problems, so this is (mostly) avoided, by progressively accumulating\n#       options in \"$@\", and eventually passing that to Java.\n#\n#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,\n#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;\n#       see the in-line comments for details.\n#\n#       There are tweaks for specific operating systems such as AIX, CygWin,\n#       Darwin, MinGW, and NonStop.\n#\n#   (3) This script is generated from the Groovy template\n#       https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt\n#       within the Gradle project.\n#\n#       You can find Gradle at https://github.com/gradle/gradle/.\n#\n##############################################################################\n\n# Attempt to set APP_HOME\n\n# Resolve links: $0 may be a link\napp_path=$0\n\n# Need this for daisy-chained symlinks.\nwhile\n    APP_HOME=${app_path%\"${app_path##*/}\"}  # leaves a trailing /; empty if no leading path\n    [ -h \"$app_path\" ]\ndo\n    ls=$( ls -ld \"$app_path\" )\n    link=${ls#*' -> '}\n    case $link in             #(\n      /*)   app_path=$link ;; #(\n      *)    app_path=$APP_HOME$link ;;\n    esac\ndone\n\n# This is normally unused\n# shellcheck disable=SC2034\nAPP_BASE_NAME=${0##*/}\n# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)\nAPP_HOME=$( cd -P \"${APP_HOME:-./}\" > /dev/null && printf '%s\n' \"$PWD\" ) || exit\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=maximum\n\nwarn () {\n    echo \"$*\"\n} >&2\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n} >&2\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"$( uname )\" in                #(\n  CYGWIN* )         cygwin=true  ;; #(\n  Darwin* )         darwin=true  ;; #(\n  MSYS* | MINGW* )  msys=true    ;; #(\n  NONSTOP* )        nonstop=true ;;\nesac\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=$JAVA_HOME/jre/sh/java\n    else\n        JAVACMD=$JAVA_HOME/bin/java\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=java\n    if ! command -v java >/dev/null 2>&1\n    then\n        die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nfi\n\n# Increase the maximum file descriptors if we can.\nif ! \"$cygwin\" && ! \"$darwin\" && ! \"$nonstop\" ; then\n    case $MAX_FD in #(\n      max*)\n        # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.\n        # shellcheck disable=SC2039,SC3045\n        MAX_FD=$( ulimit -H -n ) ||\n            warn \"Could not query maximum file descriptor limit\"\n    esac\n    case $MAX_FD in  #(\n      '' | soft) :;; #(\n      *)\n        # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.\n        # shellcheck disable=SC2039,SC3045\n        ulimit -n \"$MAX_FD\" ||\n            warn \"Could not set maximum file descriptor limit to $MAX_FD\"\n    esac\nfi\n\n# Collect all arguments for the java command, stacking in reverse order:\n#   * args from the command line\n#   * the main class name\n#   * -classpath\n#   * -D...appname settings\n#   * --module-path (only if needed)\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.\n\n# For Cygwin or MSYS, switch paths to Windows format before running java\nif \"$cygwin\" || \"$msys\" ; then\n    APP_HOME=$( cygpath --path --mixed \"$APP_HOME\" )\n    CLASSPATH=$( cygpath --path --mixed \"$CLASSPATH\" )\n\n    JAVACMD=$( cygpath --unix \"$JAVACMD\" )\n\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    for arg do\n        if\n            case $arg in                                #(\n              -*)   false ;;                            # don't mess with options #(\n              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath\n                    [ -e \"$t\" ] ;;                      #(\n              *)    false ;;\n            esac\n        then\n            arg=$( cygpath --path --ignore --mixed \"$arg\" )\n        fi\n        # Roll the args list around exactly as many times as the number of\n        # args, so each arg winds up back in the position where it started, but\n        # possibly modified.\n        #\n        # NB: a `for` loop captures its iteration list before it begins, so\n        # changing the positional parameters here affects neither the number of\n        # iterations, nor the values presented in `arg`.\n        shift                   # remove old arg\n        set -- \"$@\" \"$arg\"      # push replacement arg\n    done\nfi\n\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS='\"-Xmx64m\" \"-Xms64m\"'\n\n# Collect all arguments for the java command:\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,\n#     and any embedded shellness will be escaped.\n#   * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be\n#     treated as '${Hostname}' itself on the command line.\n\nset -- \\\n        \"-Dorg.gradle.appname=$APP_BASE_NAME\" \\\n        -classpath \"$CLASSPATH\" \\\n        org.gradle.wrapper.GradleWrapperMain \\\n        \"$@\"\n\n# Stop when \"xargs\" is not available.\nif ! command -v xargs >/dev/null 2>&1\nthen\n    die \"xargs is not available\"\nfi\n\n# Use \"xargs\" to parse quoted args.\n#\n# With -n1 it outputs one arg per line, with the quotes and backslashes removed.\n#\n# In Bash we could simply go:\n#\n#   readarray ARGS < <( xargs -n1 <<<\"$var\" ) &&\n#   set -- \"${ARGS[@]}\" \"$@\"\n#\n# but POSIX shell has neither arrays nor command substitution, so instead we\n# post-process each arg (as a line of input to sed) to backslash-escape any\n# character that might be a shell metacharacter, then use eval to reverse\n# that process (while maintaining the separation between arguments), and wrap\n# the whole thing up as a single \"set\" statement.\n#\n# This will of course break if any of these variables contains a newline or\n# an unmatched quote.\n#\n\neval \"set -- $(\n        printf '%s\\n' \"$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\" |\n        xargs -n1 |\n        sed ' s~[^-[:alnum:]+,./:=@_]~\\\\&~g; ' |\n        tr '\\n' ' '\n    )\" '\"$@\"'\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "android/gradlew.bat",
    "content": "@rem\n@rem Copyright 2015 the original author or authors.\n@rem\n@rem Licensed under the Apache License, Version 2.0 (the \"License\");\n@rem you may not use this file except in compliance with the License.\n@rem You may obtain a copy of the License at\n@rem\n@rem      https://www.apache.org/licenses/LICENSE-2.0\n@rem\n@rem Unless required by applicable law or agreed to in writing, software\n@rem distributed under the License is distributed on an \"AS IS\" BASIS,\n@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n@rem See the License for the specific language governing permissions and\n@rem limitations under the License.\n@rem\n@rem SPDX-License-Identifier: Apache-2.0\n@rem\n\n@if \"%DEBUG%\"==\"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\"==\"\" set DIRNAME=.\n@rem This is normally unused\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Resolve any \".\" and \"..\" in APP_HOME to make it shorter.\nfor %%i in (\"%APP_HOME%\") do set APP_HOME=%%~fi\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\"-Xmx64m\" \"-Xms64m\"\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif %ERRORLEVEL% equ 0 goto execute\n\necho. 1>&2\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2\necho. 1>&2\necho Please set the JAVA_HOME variable in your environment to match the 1>&2\necho location of your Java installation. 1>&2\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto execute\n\necho. 1>&2\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2\necho. 1>&2\necho Please set the JAVA_HOME variable in your environment to match the 1>&2\necho location of your Java installation. 1>&2\n\ngoto fail\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %*\n\n:end\n@rem End local scope for the variables with windows NT shell\nif %ERRORLEVEL% equ 0 goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nset EXIT_CODE=%ERRORLEVEL%\nif %EXIT_CODE% equ 0 set EXIT_CODE=1\nif not \"\"==\"%GRADLE_EXIT_CONSOLE%\" exit %EXIT_CODE%\nexit /b %EXIT_CODE%\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "android/settings.gradle",
    "content": "include ':app'\ninclude ':capacitor-cordova-android-plugins'\nproject(':capacitor-cordova-android-plugins').projectDir = new File('./capacitor-cordova-android-plugins/')\n\napply from: 'capacitor.settings.gradle'"
  },
  {
    "path": "android/variables.gradle",
    "content": "ext {\n    minSdkVersion = 23\n    compileSdkVersion = 35\n    targetSdkVersion = 35\n    androidxActivityVersion = '1.9.2'\n    androidxAppCompatVersion = '1.7.0'\n    androidxCoordinatorLayoutVersion = '1.2.0'\n    androidxCoreVersion = '1.15.0'\n    androidxFragmentVersion = '1.8.4'\n    coreSplashScreenVersion = '1.0.1'\n    androidxWebkitVersion = '1.12.1'\n    junitVersion = '4.13.2'\n    androidxJunitVersion = '1.2.1'\n    androidxEspressoCoreVersion = '3.6.1'\n    cordovaAndroidVersion = '10.1.1'\n}"
  },
  {
    "path": "angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"app\": {\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"projectType\": \"application\",\n      \"prefix\": \"app\",\n      \"schematics\": {},\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular-devkit/build-angular:browser\",\n          \"options\": {\n            \"outputPath\": \"www\",\n            \"index\": \"src/index.html\",\n            \"main\": \"src/main.ts\",\n            \"polyfills\": \"src/polyfills.ts\",\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"src/assets\",\n                \"output\": \"assets\"\n              },\n              {\n                \"glob\": \"**/*.svg\",\n                \"input\": \"node_modules/ionicons/dist/ionicons/svg\",\n                \"output\": \"./svg\"\n              },\n              \"src/manifest.webmanifest\"\n            ],\n            \"styles\": [\n              {\n                \"input\": \"src/theme/variables.scss\"\n              },\n              {\n                \"input\": \"src/global.scss\"\n              }\n            ],\n            \"scripts\": []\n          },\n          \"configurations\": {\n            \"production\": {\n              \"fileReplacements\": [\n                {\n                  \"replace\": \"src/environments/environment.ts\",\n                  \"with\": \"src/environments/environment.prod.ts\"\n                }\n              ],\n              \"optimization\": true,\n              \"outputHashing\": \"all\",\n              \"sourceMap\": true,\n              \"namedChunks\": false,\n              \"aot\": true,\n              \"extractLicenses\": true,\n              \"vendorChunk\": false,\n              \"buildOptimizer\": true,\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"2mb\",\n                  \"maximumError\": \"5mb\"\n                }\n              ],\n              \"serviceWorker\": true,\n              \"ngswConfigPath\": \"ngsw-config.json\"\n            },\n            \"ci\": {\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"sourceMap\": true,\n              \"namedChunks\": true,\n              \"aot\": false,\n              \"extractLicenses\": false,\n              \"vendorChunk\": true,\n              \"buildOptimizer\": false\n            }\n          }\n        },\n        \"serve\": {\n          \"builder\": \"@angular-devkit/build-angular:dev-server\",\n          \"options\": {\n            \"buildTarget\": \"app:build\"\n          },\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"app:build:production\"\n            },\n            \"ci\": {\n            }\n          }\n        },\n        \"extract-i18n\": {\n          \"builder\": \"@angular-devkit/build-angular:extract-i18n\",\n          \"options\": {\n            \"buildTarget\": \"app:build\"\n          }\n        },\n        \"test\": {\n          \"builder\": \"@angular-devkit/build-angular:karma\",\n          \"options\": {\n            \"main\": \"src/test.ts\",\n            \"polyfills\": \"src/polyfills.ts\",\n            \"tsConfig\": \"tsconfig.spec.json\",\n            \"karmaConfig\": \"karma.conf.js\",\n            \"styles\": [],\n            \"scripts\": [],\n            \"assets\": [\n              {\n                \"glob\": \"favicon.ico\",\n                \"input\": \"src/\",\n                \"output\": \"/\"\n              },\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"src/assets\",\n                \"output\": \"/assets\"\n              },\n              \"src/manifest.webmanifest\"\n            ]\n          },\n          \"configurations\": {\n            \"ci\": {\n              \"progress\": false,\n              \"watch\": false\n            }\n          }\n        },\n        \"lint\": {\n          \"builder\": \"@angular-devkit/build-angular:tslint\",\n          \"options\": {\n            \"tsConfig\": [\n              \"tsconfig.app.json\",\n              \"tsconfig.spec.json\",\n              \"e2e/tsconfig.json\"\n            ],\n            \"exclude\": [\"**/node_modules/**\"]\n          }\n        },\n        \"e2e\": {\n          \"builder\": \"@angular-devkit/build-angular:protractor\",\n          \"options\": {\n            \"protractorConfig\": \"e2e/protractor.conf.js\",\n            \"devServerTarget\": \"app:serve\"\n          },\n          \"configurations\": {\n            \"production\": {\n              \"devServerTarget\": \"app:serve:production\"\n            },\n            \"ci\": {\n              \"devServerTarget\": \"app:serve:ci\"\n            }\n          }\n        },\n        \"ionic-cordova-build\": {\n          \"builder\": \"@ionic/angular-toolkit:cordova-build\",\n          \"options\": {\n            \"browserTarget\": \"app:build\"\n          },\n          \"configurations\": {\n            \"production\": {\n              \"browserTarget\": \"app:build:production\"\n            }\n          }\n        },\n        \"ionic-cordova-serve\": {\n          \"builder\": \"@ionic/angular-toolkit:cordova-serve\",\n          \"options\": {\n            \"cordovaBuildTarget\": \"app:ionic-cordova-build\",\n            \"devServerTarget\": \"app:serve\"\n          },\n          \"configurations\": {\n            \"production\": {\n              \"cordovaBuildTarget\": \"app:ionic-cordova-build:production\",\n              \"devServerTarget\": \"app:serve:production\"\n            }\n          }\n        }\n      }\n    }\n  },\n  \"cli\": {\n    \"analytics\": false,\n    \"schematicCollections\": [\n      \"@ionic/angular-toolkit\"\n    ]\n  },\n  \"schematics\": {\n    \"@ionic/angular-toolkit:component\": {\n      \"styleext\": \"scss\"\n    },\n    \"@ionic/angular-toolkit:page\": {\n      \"styleext\": \"scss\"\n    }\n  }\n}\n"
  },
  {
    "path": "browserslist",
    "content": "# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.\n# For additional information regarding the format and rule options, please see:\n# https://github.com/browserslist/browserslist#queries\n\n# You can see what browsers were selected by your queries by running:\n#   npx browserslist\n\n> 0.5%\nlast 2 versions\nFirefox ESR\nnot dead\nnot IE 9-11 # For IE 9-11 support, remove 'not'.\n"
  },
  {
    "path": "capacitor.config.json",
    "content": "{\n  \"appId\": \"io.bettercrewlink.app\",\n  \"appName\": \"BetterCrewlinkMobile\",\n  \"bundledWebRuntime\": false,\n  \"npmClient\": \"npm\",\n  \"webDir\": \"www\",\n  \"plugins\": {\n    \"SplashScreen\": {\n      \"launchShowDuration\": 0\n    }\n  },\n  \"overrideUserAgent\": \"CrewLink/2.0.1 (win32)\",\n  \"cordova\": {\n    \"preferences\": {\n      \"APP_SECRET\": \"968c50f3-eb43-4ceb-9b3d-55458601a601\"\n    }\n  },\n  \"android\": {\n    \"minSdkVersion\": 24,\n    \"compileSdkVersion\": 34,\n    \"targetSdkVersion\": 34\n  }\n}"
  },
  {
    "path": "e2e/protractor.conf.js",
    "content": "// @ts-check\n// Protractor configuration file, see link for more information\n// https://github.com/angular/protractor/blob/master/lib/config.ts\n\nconst { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter');\n\n/**\n * @type { import(\"protractor\").Config }\n */\nexports.config = {\n  allScriptsTimeout: 11000,\n  specs: [\n    './src/**/*.e2e-spec.ts'\n  ],\n  capabilities: {\n    browserName: 'chrome'\n  },\n  directConnect: true,\n  baseUrl: 'http://localhost:4200/',\n  framework: 'jasmine',\n  jasmineNodeOpts: {\n    showColors: true,\n    defaultTimeoutInterval: 30000,\n    print: function() {}\n  },\n  onPrepare() {\n    require('ts-node').register({\n      project: require('path').join(__dirname, './tsconfig.json')\n    });\n    jasmine.getEnv().addReporter(new SpecReporter({\n      spec: {\n        displayStacktrace: StacktraceOption.PRETTY\n      }\n    }));\n  }\n};\n"
  },
  {
    "path": "e2e/src/app.e2e-spec.ts",
    "content": "import { AppPage } from './app.po';\n\ndescribe('new App', () => {\n\tlet page: AppPage;\n\n\tbeforeEach(() => {\n\t\tpage = new AppPage();\n\t});\n\tdescribe('default screen', () => {\n\t\tbeforeEach(() => {\n\t\t\tpage.navigateTo('/Inbox');\n\t\t});\n\t\tit('should say Inbox', () => {\n\t\t\texpect(page.getParagraphText()).toContain('Inbox');\n\t\t});\n\t});\n});\n"
  },
  {
    "path": "e2e/src/app.po.ts",
    "content": "import { browser, by, element } from 'protractor';\n\nexport class AppPage {\n\tnavigateTo(destination) {\n\t\treturn browser.get(destination);\n\t}\n\n\tgetParagraphText() {\n\t\treturn element(by.deepCss('app-root ion-content')).getText();\n\t}\n}\n"
  },
  {
    "path": "e2e/tsconfig.json",
    "content": "{\n  \"extends\": \"../tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"../out-tsc/app\",\n    \"module\": \"commonjs\",\n    \"target\": \"es5\",\n    \"types\": [\n      \"jasmine\",\n      \"jasminewd2\",\n      \"node\"\n    ]\n  }\n}\n"
  },
  {
    "path": "ionic.config.json",
    "content": "{\n  \"name\": \"BetterCrewlinkMobile\",\n  \"integrations\": {\n    \"capacitor\": {},\n    \"cordova\": {}\n  },\n  \"type\": \"angular\",\n  \"id\": \"f5ec6ee4\"\n}\n"
  },
  {
    "path": "karma.conf.js",
    "content": "// Karma configuration file, see link for more information\n// https://karma-runner.github.io/1.0/config/configuration-file.html\n\nmodule.exports = function (config) {\n  config.set({\n    basePath: '',\n    frameworks: ['jasmine', '@angular-devkit/build-angular'],\n    plugins: [\n      require('karma-jasmine'),\n      require('karma-chrome-launcher'),\n      require('karma-jasmine-html-reporter'),\n      require('karma-coverage-istanbul-reporter'),\n      require('@angular-devkit/build-angular/plugins/karma')\n    ],\n    client: {\n      clearContext: false // leave Jasmine Spec Runner output visible in browser\n    },\n    coverageIstanbulReporter: {\n      dir: require('path').join(__dirname, '../coverage'),\n      reports: ['html', 'lcovonly', 'text-summary'],\n      fixWebpackSourcePaths: true\n    },\n    reporters: ['progress', 'kjhtml'],\n    port: 9876,\n    colors: true,\n    logLevel: config.LOG_INFO,\n    autoWatch: true,\n    browsers: ['Chrome'],\n    singleRun: false\n  });\n};\n"
  },
  {
    "path": "ngsw-config.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/service-worker/config/schema.json\",\n  \"index\": \"/index.html\",\n  \"assetGroups\": [\n    {\n      \"name\": \"app\",\n      \"installMode\": \"prefetch\",\n      \"resources\": {\n        \"files\": [\n          \"/favicon.ico\",\n          \"/index.html\",\n          \"/manifest.webmanifest\",\n          \"/*.css\",\n          \"/*.js\"\n        ]\n      }\n    },\n    {\n      \"name\": \"assets\",\n      \"installMode\": \"lazy\",\n      \"updateMode\": \"prefetch\",\n      \"resources\": {\n        \"files\": [\n          \"/assets/**\",\n          \"/*.(eot|svg|cur|jpg|png|webp|gif|otf|ttf|woff|woff2|ani)\"\n        ]\n      }\n    }\n  ]\n}\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"better-crewlink-mobile\",\n  \"version\": \"0.0.5\",\n  \"author\": \"OhMyGuus\",\n  \"homepage\": \"https://bettercrewlink.app\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"ngbuild\": \"ng build\",\n    \"test\": \"ng test\",\n    \"lint\": \"ng lint\",\n    \"e2e\": \"ng e2e\",\n    \"dev\": \"ionic serve --external --ssl --configuration=development\",\n    \"build\": \"ionic capacitor build android --prod\"\n  },\n  \"private\": true,\n  \"dependencies\": {\n    \"@angular/common\": \"~17.3.12\",\n    \"@angular/core\": \"~17.3.12\",\n    \"@angular/forms\": \"^17.3.12\",\n    \"@angular/platform-browser\": \"~17.3.12\",\n    \"@angular/platform-browser-dynamic\": \"~17.3.12\",\n    \"@angular/platform-server\": \"~17.3.12\",\n    \"@angular/service-worker\": \"~17.3.12\",\n    \"@awesome-cordova-plugins/android-permissions\": \"^6.16.0\",\n    \"@awesome-cordova-plugins/background-mode\": \"^6.16.0\",\n    \"@awesome-cordova-plugins/core\": \"^6.16.0\",\n    \"@capacitor/android\": \"^7.0.0\",\n    \"@capacitor/core\": \"^7.0.0\",\n    \"@ionic/angular\": \"^8.5.8\",\n    \"@ionic/angular-server\": \"^8.5.8\",\n    \"@ionic/storage\": \"^4.0.0\",\n    \"@ionic/storage-angular\": \"^4.0.0\",\n    \"bcl-mobile-overlay\": \"file:plugins/bcl-mobile-overlay\",\n    \"cordova-plugin-android-permissions\": \"^1.1.5\",\n    \"cordova-plugin-background-mode\": \"github:OhMyGuus/cordova-plugin-background-mode\",\n    \"cordova-plugin-device\": \"^2.0.3\",\n    \"jetifier\": \"^1.6.6\",\n    \"rxjs\": \"~7.8.0\",\n    \"simple-peer\": \"^9.9.3\",\n    \"socket.io-client\": \"^2.3.1\",\n    \"tslib\": \"^2.0.0\",\n    \"zone.js\": \"~0.14.10\"\n  },\n  \"devDependencies\": {\n    \"@angular-devkit/build-angular\": \"~17.3.17\",\n    \"@angular/cli\": \"~17.3.17\",\n    \"@angular/compiler\": \"~17.3.12\",\n    \"@angular/compiler-cli\": \"~17.3.12\",\n    \"@angular/language-service\": \"~17.3.12\",\n    \"@angular/router\": \"^17.3.12\",\n    \"@capacitor/cli\": \"^7.0.0\",\n    \"@ionic/angular-toolkit\": \"^11.0.1\",\n    \"@types/angular\": \"^1.8.9\",\n    \"@types/jasmine\": \"~3.5.0\",\n    \"@types/jasminewd2\": \"~2.0.3\",\n    \"@types/node\": \"^12.19.11\",\n    \"@types/socket.io-client\": \"^1.4.34\",\n    \"codelyzer\": \"^6.0.0\",\n    \"jasmine-core\": \"~3.8.0\",\n    \"jasmine-spec-reporter\": \"~5.0.0\",\n    \"karma\": \"~6.3.0\",\n    \"karma-chrome-launcher\": \"~3.1.0\",\n    \"karma-coverage-istanbul-reporter\": \"~3.0.2\",\n    \"karma-jasmine\": \"~3.3.0\",\n    \"karma-jasmine-html-reporter\": \"^1.7.0\",\n    \"protractor\": \"~7.0.0\",\n    \"ts-node\": \"~8.3.0\",\n    \"tslint\": \"~6.1.0\",\n    \"typescript\": \"~5.4.5\"\n  },\n  \"description\": \"Bettercrewlink mobile\"\n}\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/.eslintignore",
    "content": "build\ndist\nexample-app\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/.gitignore",
    "content": "# node files\ndist\nnode_modules\n\n# iOS files\nPods\nPodfile.lock\nPackage.resolved\nBuild\nxcuserdata\n/.build\n/Packages\nxcuserdata/\nDerivedData/\n.swiftpm/configuration/registries.json\n.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata\n.netrc\n\n\n# macOS files\n.DS_Store\n\n\n\n# Based on Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore\n\n# Built application files\n*.apk\n*.ap_\n\n# Files for the ART/Dalvik VM\n*.dex\n\n# Java class files\n*.class\n\n# Generated files\nbin\ngen\nout\n\n# Gradle files\n.gradle\nbuild\n\n# Local configuration file (sdk path, etc)\nlocal.properties\n\n# Proguard folder generated by Eclipse\nproguard\n\n# Log Files\n*.log\n\n# Android Studio Navigation editor temp files\n.navigation\n\n# Android Studio captures folder\ncaptures\n\n# IntelliJ\n*.iml\n.idea\n\n# Keystore files\n# Uncomment the following line if you do not want to check your keystore files in.\n#*.jks\n\n# External native build folder generated in Android Studio 2.2 and later\n.externalNativeBuild\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/.prettierignore",
    "content": "example-app\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/BclMobileOverlay.podspec",
    "content": "require 'json'\n\npackage = JSON.parse(File.read(File.join(__dir__, 'package.json')))\n\nPod::Spec.new do |s|\n  s.name = 'BclMobileOverlay'\n  s.version = package['version']\n  s.summary = package['description']\n  s.license = package['license']\n  s.homepage = package['repository']['url']\n  s.author = package['author']\n  s.source = { :git => package['repository']['url'], :tag => s.version.to_s }\n  s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'\n  s.ios.deployment_target = '14.0'\n  s.dependency 'Capacitor'\n  s.swift_version = '5.1'\nend\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/CONTRIBUTING.md",
    "content": "# Contributing\n\nThis guide provides instructions for contributing to this Capacitor plugin.\n\n## Developing\n\n### Local Setup\n\n1. Fork and clone the repo.\n1. Install the dependencies.\n\n    ```shell\n    npm install\n    ```\n\n1. Install SwiftLint if you're on macOS.\n\n    ```shell\n    brew install swiftlint\n    ```\n\n### Scripts\n\n#### `npm run build`\n\nBuild the plugin web assets and generate plugin API documentation using [`@capacitor/docgen`](https://github.com/ionic-team/capacitor-docgen).\n\nIt will compile the TypeScript code from `src/` into ESM JavaScript in `dist/esm/`. These files are used in apps with bundlers when your plugin is imported.\n\nThen, Rollup will bundle the code into a single file at `dist/plugin.js`. This file is used in apps without bundlers by including it as a script in `index.html`.\n\n#### `npm run verify`\n\nBuild and validate the web and native projects.\n\nThis is useful to run in CI to verify that the plugin builds for all platforms.\n\n#### `npm run lint` / `npm run fmt`\n\nCheck formatting and code quality, autoformat/autofix if possible.\n\nThis template is integrated with ESLint, Prettier, and SwiftLint. Using these tools is completely optional, but the [Capacitor Community](https://github.com/capacitor-community/) strives to have consistent code style and structure for easier cooperation.\n\n## Publishing\n\nThere is a `prepublishOnly` hook in `package.json` which prepares the plugin before publishing, so all you need to do is run:\n\n```shell\nnpm publish\n```\n\n> **Note**: The [`files`](https://docs.npmjs.com/cli/v7/configuring-npm/package-json#files) array in `package.json` specifies which files get published. If you rename files/directories or add files elsewhere, you may need to update it.\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/Package.swift",
    "content": "// swift-tools-version: 5.9\nimport PackageDescription\n\nlet package = Package(\n    name: \"BclMobileOverlay\",\n    platforms: [.iOS(.v14)],\n    products: [\n        .library(\n            name: \"BclMobileOverlay\",\n            targets: [\"BetterCrewlinkNativeServicePlugin\"])\n    ],\n    dependencies: [\n        .package(url: \"https://github.com/ionic-team/capacitor-swift-pm.git\", from: \"7.0.0\")\n    ],\n    targets: [\n        .target(\n            name: \"BetterCrewlinkNativeServicePlugin\",\n            dependencies: [\n                .product(name: \"Capacitor\", package: \"capacitor-swift-pm\"),\n                .product(name: \"Cordova\", package: \"capacitor-swift-pm\")\n            ],\n            path: \"ios/Sources/BetterCrewlinkNativeServicePlugin\"),\n        .testTarget(\n            name: \"BetterCrewlinkNativeServicePluginTests\",\n            dependencies: [\"BetterCrewlinkNativeServicePlugin\"],\n            path: \"ios/Tests/BetterCrewlinkNativeServicePluginTests\")\n    ]\n)"
  },
  {
    "path": "plugins/bcl-mobile-overlay/README.md",
    "content": "# bcl-mobile-overlay\n\noverlay for bcl mobile\n\n## Install\n\n```bash\nnpm install bcl-mobile-overlay\nnpx cap sync\n```\n\n## API\n\n<docgen-index>\n\n* [`disconnect()`](#disconnect)\n* [`showTalking(...)`](#showtalking)\n* [`showNotification(...)`](#shownotification)\n\n</docgen-index>\n\n<docgen-api>\n<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->\n\n### disconnect()\n\n```typescript\ndisconnect() => Promise<{ value: string; }>\n```\n\n**Returns:** <code>Promise&lt;{ value: string; }&gt;</code>\n\n--------------------\n\n\n### showTalking(...)\n\n```typescript\nshowTalking(options: { color: number; talking: boolean; }) => Promise<{ value: string; }>\n```\n\n| Param         | Type                                              |\n| ------------- | ------------------------------------------------- |\n| **`options`** | <code>{ color: number; talking: boolean; }</code> |\n\n**Returns:** <code>Promise&lt;{ value: string; }&gt;</code>\n\n--------------------\n\n\n### showNotification(...)\n\n```typescript\nshowNotification(options: { audiomuted: boolean; micmuted: boolean; overlayEnabled: boolean; }) => Promise<{ value: string; }>\n```\n\n| Param         | Type                                                                              |\n| ------------- | --------------------------------------------------------------------------------- |\n| **`options`** | <code>{ audiomuted: boolean; micmuted: boolean; overlayEnabled: boolean; }</code> |\n\n**Returns:** <code>Promise&lt;{ value: string; }&gt;</code>\n\n--------------------\n\n</docgen-api>\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/android/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/android/build.gradle",
    "content": "ext {\n    junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'\n    androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'\n    androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'\n    androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'\n}\n\nbuildscript {\n    repositories {\n        google()\n        mavenCentral()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:8.7.2'\n    }\n}\n\napply plugin: 'com.android.library'\n\nandroid {\n    namespace \"io.bettercrewlink.plugin\"\n    compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35\n    defaultConfig {\n        minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23\n        targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35\n        versionCode 1\n        versionName \"1.0\"\n        testInstrumentationRunner \"androidx.test.runner.AndroidJUnitRunner\"\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n    lintOptions {\n        abortOnError false\n    }\n    compileOptions {\n        sourceCompatibility JavaVersion.VERSION_21\n        targetCompatibility JavaVersion.VERSION_21\n    }\n}\n\nrepositories {\n    google()\n    mavenCentral()\n}\n\n\ndependencies {\n    implementation fileTree(dir: 'libs', include: ['*.jar'])\n    implementation project(':capacitor-android')\n    implementation \"androidx.appcompat:appcompat:$androidxAppCompatVersion\"\n    testImplementation \"junit:junit:$junitVersion\"\n    androidTestImplementation \"androidx.test.ext:junit:$androidxJunitVersion\"\n    androidTestImplementation \"androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion\"\n}\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/android/gradle/wrapper/gradle-wrapper.properties",
    "content": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-8.11.1-all.zip\nnetworkTimeout=10000\nvalidateDistributionUrl=true\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/android/gradle.properties",
    "content": "# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\norg.gradle.jvmargs=-Xmx1536m\n\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\n\n# AndroidX package structure to make it clearer which packages are bundled with the\n# Android operating system, and which are packaged with your app's APK\n# https://developer.android.com/topic/libraries/support-library/androidx-rn\nandroid.useAndroidX=true\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/android/gradlew",
    "content": "#!/bin/sh\n\n#\n# Copyright © 2015-2021 the original authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# SPDX-License-Identifier: Apache-2.0\n#\n\n##############################################################################\n#\n#   Gradle start up script for POSIX generated by Gradle.\n#\n#   Important for running:\n#\n#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is\n#       noncompliant, but you have some other compliant shell such as ksh or\n#       bash, then to run this script, type that shell name before the whole\n#       command line, like:\n#\n#           ksh Gradle\n#\n#       Busybox and similar reduced shells will NOT work, because this script\n#       requires all of these POSIX shell features:\n#         * functions;\n#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,\n#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;\n#         * compound commands having a testable exit status, especially «case»;\n#         * various built-in commands including «command», «set», and «ulimit».\n#\n#   Important for patching:\n#\n#   (2) This script targets any POSIX shell, so it avoids extensions provided\n#       by Bash, Ksh, etc; in particular arrays are avoided.\n#\n#       The \"traditional\" practice of packing multiple parameters into a\n#       space-separated string is a well documented source of bugs and security\n#       problems, so this is (mostly) avoided, by progressively accumulating\n#       options in \"$@\", and eventually passing that to Java.\n#\n#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,\n#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;\n#       see the in-line comments for details.\n#\n#       There are tweaks for specific operating systems such as AIX, CygWin,\n#       Darwin, MinGW, and NonStop.\n#\n#   (3) This script is generated from the Groovy template\n#       https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt\n#       within the Gradle project.\n#\n#       You can find Gradle at https://github.com/gradle/gradle/.\n#\n##############################################################################\n\n# Attempt to set APP_HOME\n\n# Resolve links: $0 may be a link\napp_path=$0\n\n# Need this for daisy-chained symlinks.\nwhile\n    APP_HOME=${app_path%\"${app_path##*/}\"}  # leaves a trailing /; empty if no leading path\n    [ -h \"$app_path\" ]\ndo\n    ls=$( ls -ld \"$app_path\" )\n    link=${ls#*' -> '}\n    case $link in             #(\n      /*)   app_path=$link ;; #(\n      *)    app_path=$APP_HOME$link ;;\n    esac\ndone\n\n# This is normally unused\n# shellcheck disable=SC2034\nAPP_BASE_NAME=${0##*/}\n# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)\nAPP_HOME=$( cd -P \"${APP_HOME:-./}\" > /dev/null && printf '%s\n' \"$PWD\" ) || exit\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=maximum\n\nwarn () {\n    echo \"$*\"\n} >&2\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n} >&2\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"$( uname )\" in                #(\n  CYGWIN* )         cygwin=true  ;; #(\n  Darwin* )         darwin=true  ;; #(\n  MSYS* | MINGW* )  msys=true    ;; #(\n  NONSTOP* )        nonstop=true ;;\nesac\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=$JAVA_HOME/jre/sh/java\n    else\n        JAVACMD=$JAVA_HOME/bin/java\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=java\n    if ! command -v java >/dev/null 2>&1\n    then\n        die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nfi\n\n# Increase the maximum file descriptors if we can.\nif ! \"$cygwin\" && ! \"$darwin\" && ! \"$nonstop\" ; then\n    case $MAX_FD in #(\n      max*)\n        # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.\n        # shellcheck disable=SC2039,SC3045\n        MAX_FD=$( ulimit -H -n ) ||\n            warn \"Could not query maximum file descriptor limit\"\n    esac\n    case $MAX_FD in  #(\n      '' | soft) :;; #(\n      *)\n        # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.\n        # shellcheck disable=SC2039,SC3045\n        ulimit -n \"$MAX_FD\" ||\n            warn \"Could not set maximum file descriptor limit to $MAX_FD\"\n    esac\nfi\n\n# Collect all arguments for the java command, stacking in reverse order:\n#   * args from the command line\n#   * the main class name\n#   * -classpath\n#   * -D...appname settings\n#   * --module-path (only if needed)\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.\n\n# For Cygwin or MSYS, switch paths to Windows format before running java\nif \"$cygwin\" || \"$msys\" ; then\n    APP_HOME=$( cygpath --path --mixed \"$APP_HOME\" )\n    CLASSPATH=$( cygpath --path --mixed \"$CLASSPATH\" )\n\n    JAVACMD=$( cygpath --unix \"$JAVACMD\" )\n\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    for arg do\n        if\n            case $arg in                                #(\n              -*)   false ;;                            # don't mess with options #(\n              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath\n                    [ -e \"$t\" ] ;;                      #(\n              *)    false ;;\n            esac\n        then\n            arg=$( cygpath --path --ignore --mixed \"$arg\" )\n        fi\n        # Roll the args list around exactly as many times as the number of\n        # args, so each arg winds up back in the position where it started, but\n        # possibly modified.\n        #\n        # NB: a `for` loop captures its iteration list before it begins, so\n        # changing the positional parameters here affects neither the number of\n        # iterations, nor the values presented in `arg`.\n        shift                   # remove old arg\n        set -- \"$@\" \"$arg\"      # push replacement arg\n    done\nfi\n\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS='\"-Xmx64m\" \"-Xms64m\"'\n\n# Collect all arguments for the java command:\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,\n#     and any embedded shellness will be escaped.\n#   * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be\n#     treated as '${Hostname}' itself on the command line.\n\nset -- \\\n        \"-Dorg.gradle.appname=$APP_BASE_NAME\" \\\n        -classpath \"$CLASSPATH\" \\\n        org.gradle.wrapper.GradleWrapperMain \\\n        \"$@\"\n\n# Stop when \"xargs\" is not available.\nif ! command -v xargs >/dev/null 2>&1\nthen\n    die \"xargs is not available\"\nfi\n\n# Use \"xargs\" to parse quoted args.\n#\n# With -n1 it outputs one arg per line, with the quotes and backslashes removed.\n#\n# In Bash we could simply go:\n#\n#   readarray ARGS < <( xargs -n1 <<<\"$var\" ) &&\n#   set -- \"${ARGS[@]}\" \"$@\"\n#\n# but POSIX shell has neither arrays nor command substitution, so instead we\n# post-process each arg (as a line of input to sed) to backslash-escape any\n# character that might be a shell metacharacter, then use eval to reverse\n# that process (while maintaining the separation between arguments), and wrap\n# the whole thing up as a single \"set\" statement.\n#\n# This will of course break if any of these variables contains a newline or\n# an unmatched quote.\n#\n\neval \"set -- $(\n        printf '%s\\n' \"$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\" |\n        xargs -n1 |\n        sed ' s~[^-[:alnum:]+,./:=@_]~\\\\&~g; ' |\n        tr '\\n' ' '\n    )\" '\"$@\"'\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/android/gradlew.bat",
    "content": "@rem\n@rem Copyright 2015 the original author or authors.\n@rem\n@rem Licensed under the Apache License, Version 2.0 (the \"License\");\n@rem you may not use this file except in compliance with the License.\n@rem You may obtain a copy of the License at\n@rem\n@rem      https://www.apache.org/licenses/LICENSE-2.0\n@rem\n@rem Unless required by applicable law or agreed to in writing, software\n@rem distributed under the License is distributed on an \"AS IS\" BASIS,\n@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n@rem See the License for the specific language governing permissions and\n@rem limitations under the License.\n@rem\n@rem SPDX-License-Identifier: Apache-2.0\n@rem\n\n@if \"%DEBUG%\"==\"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\"==\"\" set DIRNAME=.\n@rem This is normally unused\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Resolve any \".\" and \"..\" in APP_HOME to make it shorter.\nfor %%i in (\"%APP_HOME%\") do set APP_HOME=%%~fi\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\"-Xmx64m\" \"-Xms64m\"\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif %ERRORLEVEL% equ 0 goto execute\n\necho. 1>&2\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2\necho. 1>&2\necho Please set the JAVA_HOME variable in your environment to match the 1>&2\necho location of your Java installation. 1>&2\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto execute\n\necho. 1>&2\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2\necho. 1>&2\necho Please set the JAVA_HOME variable in your environment to match the 1>&2\necho location of your Java installation. 1>&2\n\ngoto fail\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %*\n\n:end\n@rem End local scope for the variables with windows NT shell\nif %ERRORLEVEL% equ 0 goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nset EXIT_CODE=%ERRORLEVEL%\nif %EXIT_CODE% equ 0 set EXIT_CODE=1\nif not \"\"==\"%GRADLE_EXIT_CONSOLE%\" exit %EXIT_CODE%\nexit /b %EXIT_CODE%\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/android/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n\n# Uncomment this to preserve the line number information for\n# debugging stack traces.\n#-keepattributes SourceFile,LineNumberTable\n\n# If you keep the line number information, uncomment this to\n# hide the original source file name.\n#-renamesourcefileattribute SourceFile\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/android/settings.gradle",
    "content": "include ':capacitor-android'\nproject(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')"
  },
  {
    "path": "plugins/bcl-mobile-overlay/android/src/androidTest/java/com/getcapacitor/android/ExampleInstrumentedTest.java",
    "content": "package com.getcapacitor.android;\n\nimport static org.junit.Assert.*;\n\nimport android.content.Context;\nimport androidx.test.ext.junit.runners.AndroidJUnit4;\nimport androidx.test.platform.app.InstrumentationRegistry;\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\n\n/**\n * Instrumented test, which will execute on an Android device.\n *\n * @see <a href=\"http://d.android.com/tools/testing\">Testing documentation</a>\n */\n@RunWith(AndroidJUnit4.class)\npublic class ExampleInstrumentedTest {\n\n    @Test\n    public void useAppContext() throws Exception {\n        // Context of the app under test.\n        Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();\n\n        assertEquals(\"com.getcapacitor.android\", appContext.getPackageName());\n    }\n}\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/android/src/main/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <uses-permission android:name=\"android.permission.POST_NOTIFICATIONS\" />\n\n<application>\n    <service\n        android:name=\"io.bettercrewlink.plugin.BetterCrewlinkNativeService\"\n        android:exported=\"false\"/>\n    <service\n        android:name=\"io.bettercrewlink.plugin.OverlayService\"\n        android:exported=\"false\"/>\n\n</application>\n</manifest>\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/android/src/main/java/io/bettercrewlink/plugin/BetterCrewlinkNativeService.java",
    "content": "package io.bettercrewlink.plugin;\n\nimport android.app.IntentService;\nimport android.content.Intent;\n\nimport com.getcapacitor.Bridge;\n\npublic class BetterCrewlinkNativeService extends IntentService {\n    public static final String REFRESH = \"REFRESH\";\n    public static final String MUTEAUDIO = \"MUTEAUDIO\";\n    public static final String MUTEMICROPHONE = \"MUTEMICROPHONE\";\n    public static final String DISCONNECT = \"DISCONNECT\";\n\n//    public static final String ACTION2 = \"ACTION2\";\n\n    Bridge bridge;\n\n    public BetterCrewlinkNativeService() {\n        super(\"BetterCrewlinkNativeService\");\n    }\n\n    public void setBridge(Bridge bridge) {\n        this.bridge = bridge;\n    }\n\n    @Override\n    public void onHandleIntent(Intent intent) {\n        android.util.Log.d(\"BetterCrewlinkNativeService\", \"onHandleIntent called with action: \" + (intent != null ? intent.getAction() : \"null\"));\n        if(BetterCrewlinkNativeServicePlugin.bridgeP != null) {\n            final String action = intent.getAction();\n            BetterCrewlinkNativeServicePlugin.bridgeP.triggerWindowJSEvent(\"bettercrewlink_notification\", \"{ 'action': '\"+action+\"' }\");\n        }\n    }\n}"
  },
  {
    "path": "plugins/bcl-mobile-overlay/android/src/main/java/io/bettercrewlink/plugin/BetterCrewlinkNativeServicePlugin.java",
    "content": "package io.bettercrewlink.plugin;\n\nimport com.getcapacitor.JSObject;\nimport com.getcapacitor.Plugin;\nimport com.getcapacitor.PluginCall;\nimport com.getcapacitor.PluginMethod;\nimport com.getcapacitor.annotation.CapacitorPlugin;\nimport com.getcapacitor.Bridge;\n\nimport android.Manifest;\nimport android.annotation.SuppressLint;\nimport android.app.NotificationChannel;\nimport android.app.NotificationManager;\nimport android.app.PendingIntent;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.content.pm.PackageManager;\nimport android.os.Build;\nimport android.provider.Settings;\nimport android.net.Uri;\nimport android.text.Html;\nimport android.text.SpannableString;\n\nimport java.util.Timer;\nimport java.util.TimerTask;\nimport static androidx.core.content.ContextCompat.getSystemService;\n\nimport androidx.core.app.ActivityCompat;\nimport androidx.core.app.NotificationCompat;\nimport androidx.core.app.NotificationManagerCompat;\n\n@CapacitorPlugin(name = \"BetterCrewlinkNativeService\")\npublic class BetterCrewlinkNativeServicePlugin extends Plugin {\n\n    static Bridge bridgeP;\n    private Boolean audionMuted = false;\n    private boolean micMuted = false;\n    private boolean timmerRunning = false;\n    private boolean running = false;\n    private boolean overlayShown = false;\n\n    @PluginMethod()\n    public void showNotification(PluginCall call) {\n        Boolean audioMuted = call.getBoolean(\"audiomuted\");\n        Boolean micMuted = call.getBoolean(\"micmuted\");\n        Boolean overlayEnabled = call.getBoolean(\"overlayEnabled\");\n\n        this.audionMuted = audioMuted;\n        this.micMuted = micMuted;\n        String message = call.getString(\"message\");\n        String CallbackId = call.getCallbackId();\n        JSObject ret = new JSObject();\n        ret.put(\"result\", \"ok\");\n        CreateNotification();\n        call.resolve(ret);\n        CreateTimer();\n        OverlayService.updateMuteIcons(micMuted, audioMuted);\n        if ((!overlayShown) && overlayEnabled && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n            if (!Settings.canDrawOverlays(this.getContext())) {\n                Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,\n                        Uri.parse(\"package:\" + this.getContext().getPackageName()));\n                startActivityForResult(call, intent, 0);\n            } else {\n                Context context = this.getContext();\n                context.startService(new Intent(context, OverlayService.class));\n                overlayShown = true;\n            }\n        }\n        if (overlayShown) {\n            OverlayService.HideShow(false);\n        }\n        running = true;\n    }\n\n    @PluginMethod()\n    public void showTalking(PluginCall call) {\n        int color = call.getInt(\"color\");\n        Boolean talking = call.getBoolean(\"talking\");\n        Context context = this.getContext();\n        OverlayService.setVisible(color, talking);\n    }\n\n    @PluginMethod()\n    public void disconnect(PluginCall call) {\n        if (overlayShown)\n            OverlayService.HideShow(true);\n\n        running = false;\n    }\n\n    private void CreateTimer() {\n        if (timmerRunning) {\n            return;\n        }\n        timmerRunning = true;\n        Timer t = new Timer();\n        t.scheduleAtFixedRate(new TimerTask() {\n            @Override\n            public void run() {\n                OnTimerTick();\n            }\n        }, 1000, 5000);\n    }\n\n    private void OnTimerTick() {\n        if (running)\n            CreateNotification();\n    }\n\n    boolean NotifactionChannelCreated = false;\n\n    private void createNotificationChannel() {\n        if (NotifactionChannelCreated) {\n            return;\n        }\n        // Create the NotificationChannel, but only on API 26+ because\n        // the NotificationChannel class is new and not in the support library\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n            CharSequence name = \"1\";\n            String description = \"2\";\n            int importance = NotificationManager.IMPORTANCE_DEFAULT;\n            NotificationChannel channel = new NotificationChannel(\"1\", name, importance);\n            channel.setSound(null, null);\n            channel.setDescription(description);\n            // Register the channel with the system; you can't change the importance\n            // or other notification behaviors after this\n            NotificationManager notificationManager = getSystemService(this.getContext(), NotificationManager.class);\n            notificationManager.createNotificationChannel(channel);\n        }\n    }\n\n    public PendingIntent createAction(String action) {\n        Intent intent = new Intent(this.getContext(), BetterCrewlinkNativeService.class);\n        intent.setAction(action);\n        PendingIntent piAction1 = PendingIntent.getService(\n                this.getContext(),\n                0,\n                intent,\n                PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE\n        );\n        return piAction1;\n    }\n    int notificationCount = 0;\n\n    public void CreateNotification() {\n      //  createNotificationChannel();\n        bridgeP = bridge;\n        BetterCrewlinkNativeService service = getSystemService(this.getContext(), BetterCrewlinkNativeService.class);\n        PendingIntent refreshAction = createAction(BetterCrewlinkNativeService.REFRESH);\n        String body = \"<b>Guus(red)</b> talking <br><b>player2(lime)</b> talking\";\n        SpannableString spannableString = new SpannableString(\n                Build.VERSION.SDK_INT < Build.VERSION_CODES.N ? Html.fromHtml(body)\n                        : Html.fromHtml(body, Html.FROM_HTML_MODE_LEGACY));\n\n        NotificationCompat.Builder builder = new NotificationCompat.Builder(this.getContext(),\n                \"bettercrewlink-background-id\")\n                .setSmallIcon(R.drawable.ic_notification)\n                .setContentIntent(refreshAction)\n                .setContentTitle(\"BetterCrewlink\")\n                .setContentText(\"Click to refresh or expand for more\")\n\n                // .setStyle(new\n                // NotificationCompat.BigTextStyle().bigText(spannableString).setBigContentTitle(\"BetterCrewlink\"))\n                .addAction(0, \"refresh\", refreshAction)\n                .addAction(0, this.micMuted ? \"unmute\" : \"mute\",\n                        createAction(BetterCrewlinkNativeService.MUTEMICROPHONE))\n                .addAction(0, this.audionMuted ? \"undeafen\" : \"deafen\",\n                        createAction(BetterCrewlinkNativeService.MUTEAUDIO))\n                .setAutoCancel(false)\n                .setPriority(NotificationCompat.PRIORITY_DEFAULT);\n\n        NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this.getContext());\n\n        // notificationId is a unique int for each notification that you must define\n\n        notificationManager.notify(-574543954, builder.build());\n    }\n\n}\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/android/src/main/java/io/bettercrewlink/plugin/OverlayService.java",
    "content": "package io.bettercrewlink.plugin;\n\nimport android.app.Service;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.content.res.Resources;\nimport android.graphics.PixelFormat;\nimport android.os.Handler;\nimport android.os.IBinder;\nimport android.os.Looper;\nimport android.view.GestureDetector;\nimport android.view.Gravity;\nimport android.view.LayoutInflater;\nimport android.view.MotionEvent;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.view.WindowManager;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport io.bettercrewlink.plugin.R;\n\npublic class OverlayService extends Service {\n\n    private WindowManager windowManager;\n    private View iconsContainerView;\n    private static List<ImageView> imageViews = new ArrayList<ImageView>();\n    private static ImageView audioImageView;\n    private static ImageView micImageView;\n    private static ImageView refreshImageview;\n    private static boolean mic_muted = false;\n    private static boolean audio_muted = false;\n\n    enum OVERLAY_BUTTON {\n        MICROPHONE,\n        AUDIO,\n        REFRESH\n    }\n\n    @Override\n    public IBinder onBind(Intent intent) {\n        return null;\n    }\n\n    public static void setVisible(int color, boolean visible) {\n        if (color >= 0 && color <= 12) {\n            runOnUiThread(new Runnable() {\n                @Override\n                public void run() {\n                    if (color < imageViews.size())\n                        imageViews.get(color).setVisibility(visible ? View.VISIBLE : View.GONE);\n                }\n            });\n        }\n    }\n\n    public static void HideShow(boolean hide){\n        runOnUiThread(new Runnable() {\n            @Override\n            public void run() {\n                if (audioImageView != null && micImageView != null && refreshImageview != null) {\n                    audioImageView.setVisibility(hide ? View.GONE : View.VISIBLE);\n                    micImageView.setVisibility(hide ? View.GONE : View.VISIBLE);\n                    refreshImageview.setVisibility(hide ? View.GONE : View.VISIBLE);\n                }\n            }\n        });\n\n    }\n\n    public static void updateMuteIcons(boolean mic_muted, boolean audio_muted) {\n        OverlayService.mic_muted = mic_muted;\n        OverlayService.audio_muted = audio_muted;\n        runOnUiThread(new Runnable() {\n            @Override\n            public void run() {\n                if (audioImageView != null && micImageView != null) {\n                    audioImageView.setImageResource(audio_muted ? R.drawable.audio_off : R.drawable.audio_on);\n                    micImageView.setImageResource(mic_muted ? R.drawable.mic_off : R.drawable.mic_on);\n                }\n            }\n        });\n    }\n\n\n    ImageView addImage(int resId, boolean addToViewList) {\n        return addImage(resId, addToViewList, 40, 40);\n    }\n\n    ImageView addImage(int resId, boolean addToViewList, int width, int height) {\n        float density = Resources.getSystem().getDisplayMetrics().density;\n        int calcWidth = (int) (width * density);\n        int calcHeight = (int) (height * density);\n        LinearLayout row = iconsContainerView.findViewById(R.id.overlay_player_container);\n        ImageView img = new ImageView(this);\n        img.setImageResource(resId);\n        row.addView(img);\n        img.requestLayout();\n        ViewGroup.LayoutParams layoutParams = img.getLayoutParams();\n        layoutParams.width = calcWidth;\n        layoutParams.height = calcHeight;\n        if (addToViewList) {\n            imageViews.add(img);\n        }\n        return img;\n    }\n\n    public void pressOverlayButton(OVERLAY_BUTTON button) {\n        BetterCrewlinkNativeServicePlugin.bridgeP.triggerWindowJSEvent(\"press_overlay\", \"{ 'action': '\" + button + \"' }\");\n    }\n\n\n    @Override\n    public void onCreate() {\n        super.onCreate();\n\n        windowManager = (WindowManager) getSystemService(WINDOW_SERVICE);\n        iconsContainerView = LayoutInflater.from(this).inflate(R.layout.overlay_layout, null);\n        refreshImageview = addImage(R.drawable.refresh_button, false);\n        micImageView = addImage(mic_muted ? R.drawable.mic_off : R.drawable.mic_on, false);\n        audioImageView = addImage(audio_muted ? R.drawable.audio_off : R.drawable.audio_on, false);\n\n\n        for (int i = 0; i < 12; i++) {\n            ImageView view = addImage(this.getResources().getIdentifier(\"playericon_\" + i, \"drawable\", this.getPackageName()), true);\n            view.setVisibility(View.GONE);\n        }\n\n        WindowManager.LayoutParams params = new WindowManager.LayoutParams(\n                WindowManager.LayoutParams.WRAP_CONTENT,\n                WindowManager.LayoutParams.WRAP_CONTENT,\n                WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY,\n                WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,\n                PixelFormat.TRANSPARENT);\n        Context context = this;\n\n\n        params.gravity = Gravity.TOP | Gravity.LEFT;\n        params.x = 0;\n        params.y = 100;\n\n        AddTouchEventListner(context, iconsContainerView, params);\n        windowManager.addView(iconsContainerView, params);\n\n    }\n\n\n    public void AddTouchEventListner(Context context, View view, WindowManager.LayoutParams\n            params) {\n        iconsContainerView.setOnTouchListener(new View.OnTouchListener() {\n            private int initialX;\n            private int initialY;\n            private float initialTouchX;\n            private float initialTouchY;\n            private boolean side = false;\n\n            private GestureDetector gestureDetector = new GestureDetector(context, new GestureDetector.SimpleOnGestureListener() {\n                @Override\n                public boolean onDoubleTap(MotionEvent e) {\n                    LinearLayout row = iconsContainerView.findViewById(R.id.overlay_player_container);\n\n                    if (!side) {\n                        row.setOrientation(LinearLayout.VERTICAL);\n                        side = true;\n                    } else {\n                        row.setOrientation(LinearLayout.HORIZONTAL);\n                        side = false;\n                    }\n                    params.x = 0;\n                    params.y = 0;\n                    windowManager.updateViewLayout(iconsContainerView, params);\n\n                    return super.onDoubleTap(e);\n                }\n            });\n            boolean clickingOnVolume = false;\n            boolean clickingOnMic = false;\n            boolean clickingOnRefresh = false;\n\n            @Override\n            public boolean onTouch(View v, MotionEvent event) {\n//                Log.w(\"OOF\", \"volumeImageView x: \" + volumeImageView.getX() + \" y:\" + volumeImageView.getY() + \" w: \" + volumeImageView.getWidth() + \" h: \" + volumeImageView.getHeight() + \" --> \" + event.getX() + \" -- \" + event.getY());\n\n                gestureDetector.onTouchEvent(event);\n                switch (event.getAction()) {\n                    case MotionEvent.ACTION_DOWN:\n                        initialX = params.x;\n                        initialY = params.y;\n                        initialTouchX = event.getRawX();\n                        initialTouchY = event.getRawY();\n                        clickingOnVolume = event.getX() >= audioImageView.getX() && event.getX() <= audioImageView.getX() + audioImageView.getWidth() &&\n                                event.getY() >= audioImageView.getY() && event.getY() <= audioImageView.getY() + audioImageView.getHeight();\n                        clickingOnMic = event.getX() >= micImageView.getX() && event.getX() <= micImageView.getX() + micImageView.getWidth() &&\n                                event.getY() >= micImageView.getY() && event.getY() <= micImageView.getY() + micImageView.getHeight();\n                        clickingOnRefresh = event.getX() >= refreshImageview.getX() && event.getX() <= refreshImageview.getX() + refreshImageview.getWidth() &&\n                                event.getY() >= refreshImageview.getY() && event.getY() <= refreshImageview.getY() + refreshImageview.getHeight();\n\n                        return false;\n                    case MotionEvent.ACTION_UP:\n                        int movedPixels = Math.abs(initialX - params.x) + Math.abs(initialY - params.y);\n                        if (movedPixels > 10) {\n                            return false;\n                        }\n                        if (clickingOnMic) {\n                            pressOverlayButton(OVERLAY_BUTTON.MICROPHONE);\n                        }\n                        if (clickingOnVolume) {\n                            pressOverlayButton(OVERLAY_BUTTON.AUDIO);\n                        }\n                        if (clickingOnRefresh) {\n                            pressOverlayButton(OVERLAY_BUTTON.REFRESH);\n                        }\n                        return false;\n                    case MotionEvent.ACTION_MOVE:\n                        params.x = initialX + (int) (event.getRawX() - initialTouchX);\n                        params.y = initialY + (int) (event.getRawY() - initialTouchY);\n                        windowManager.updateViewLayout(iconsContainerView, params);\n                        return false;\n                }\n                return false;\n            }\n        });\n    }\n\n    @Override\n    public void onDestroy() {\n        super.onDestroy();\n        if (iconsContainerView != null) windowManager.removeView(iconsContainerView);\n    }\n\n    private static void runOnUiThread(Runnable action) {\n        new Handler(Looper.getMainLooper()).post(action);\n    }\n}"
  },
  {
    "path": "plugins/bcl-mobile-overlay/android/src/main/res/.gitkeep",
    "content": ""
  },
  {
    "path": "plugins/bcl-mobile-overlay/android/src/main/res/layout/overlay_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<TableLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    android:layout_gravity=\"center_horizontal\"\n    android:id=\"@+id/overlay_layout_root\"\n    android:orientation=\"horizontal\"\n\n    >\n    <LinearLayout\n        android:orientation=\"horizontal\"\n        android:id=\"@+id/overlay_player_container\"\n        >\n\n    </LinearLayout>\n\n</TableLayout>"
  },
  {
    "path": "plugins/bcl-mobile-overlay/android/src/test/java/com/getcapacitor/ExampleUnitTest.java",
    "content": "package com.getcapacitor;\n\nimport static org.junit.Assert.*;\n\nimport org.junit.Test;\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n * @see <a href=\"http://d.android.com/tools/testing\">Testing documentation</a>\n */\npublic class ExampleUnitTest {\n\n    @Test\n    public void addition_isCorrect() throws Exception {\n        assertEquals(4, 2 + 2);\n    }\n}\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/ios/.gitignore",
    "content": ".DS_Store\n.build\n/Packages\nxcuserdata/\nDerivedData/\n.swiftpm/configuration/registries.json\n.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata\n.netrc"
  },
  {
    "path": "plugins/bcl-mobile-overlay/ios/Sources/BetterCrewlinkNativeServicePlugin/BetterCrewlinkNativeService.swift",
    "content": "import Foundation\n\n@objc public class BetterCrewlinkNativeService: NSObject {\n    @objc public func echo(_ value: String) -> String {\n        print(value)\n        return value\n    }\n}\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/ios/Sources/BetterCrewlinkNativeServicePlugin/BetterCrewlinkNativeServicePlugin.swift",
    "content": "import Foundation\nimport Capacitor\n\n/**\n * Please read the Capacitor iOS Plugin Development Guide\n * here: https://capacitorjs.com/docs/plugins/ios\n */\n@objc(BetterCrewlinkNativeServicePlugin)\npublic class BetterCrewlinkNativeServicePlugin: CAPPlugin, CAPBridgedPlugin {\n    public let identifier = \"BetterCrewlinkNativeServicePlugin\"\n    public let jsName = \"BetterCrewlinkNativeService\"\n    public let pluginMethods: [CAPPluginMethod] = [\n        CAPPluginMethod(name: \"echo\", returnType: CAPPluginReturnPromise)\n    ]\n    private let implementation = BetterCrewlinkNativeService()\n\n    @objc func echo(_ call: CAPPluginCall) {\n        let value = call.getString(\"value\") ?? \"\"\n        call.resolve([\n            \"value\": implementation.echo(value)\n        ])\n    }\n}\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/ios/Tests/BetterCrewlinkNativeServicePluginTests/BetterCrewlinkNativeServicePluginTests.swift",
    "content": "import XCTest\n@testable import BetterCrewlinkNativeServicePlugin\n\nclass BetterCrewlinkNativeServiceTests: XCTestCase {\n    func testEcho() {\n        // This is an example of a functional test case for a plugin.\n        // Use XCTAssert and related functions to verify your tests produce the correct results.\n\n        let implementation = BetterCrewlinkNativeService()\n        let value = \"Hello, World!\"\n        let result = implementation.echo(value)\n\n        XCTAssertEqual(value, result)\n    }\n}\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/package.json",
    "content": "{\n  \"name\": \"bcl-mobile-overlay\",\n  \"version\": \"0.0.1\",\n  \"description\": \"overlay for bcl mobile\",\n  \"main\": \"dist/plugin.cjs.js\",\n  \"module\": \"dist/esm/index.js\",\n  \"types\": \"dist/esm/index.d.ts\",\n  \"unpkg\": \"dist/plugin.js\",\n  \"files\": [\n    \"android/src/main/\",\n    \"android/build.gradle\",\n    \"dist/\",\n    \"ios/Sources\",\n    \"ios/Tests\",\n    \"Package.swift\",\n    \"BclMobileOverlay.podspec\"\n  ],\n  \"author\": \"\",\n  \"license\": \"MIT\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/OhMyGuus/bcl-mobile-overlay.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/OhMyGuus/bcl-mobile-overlay/issues\"\n  },\n  \"keywords\": [\n    \"capacitor\",\n    \"plugin\",\n    \"native\"\n  ],\n  \"scripts\": {\n    \"verify\": \"npm run verify:ios && npm run verify:android && npm run verify:web\",\n    \"verify:ios\": \"xcodebuild -scheme BclMobileOverlay -destination generic/platform=iOS\",\n    \"verify:android\": \"cd android && ./gradlew clean build test && cd ..\",\n    \"verify:web\": \"npm run build\",\n    \"lint\": \"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint\",\n    \"fmt\": \"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format\",\n    \"eslint\": \"eslint . --ext ts\",\n    \"prettier\": \"prettier \\\"**/*.{css,html,ts,js,java}\\\" --plugin=prettier-plugin-java\",\n    \"swiftlint\": \"node-swiftlint\",\n    \"docgen\": \"docgen --api BetterCrewlinkNativeServicePlugin --output-readme README.md --output-json dist/docs.json\",\n    \"build\": \"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs\",\n    \"clean\": \"rimraf ./dist\",\n    \"watch\": \"tsc --watch\",\n    \"prepublishOnly\": \"npm run build\"\n  },\n  \"devDependencies\": {\n    \"@capacitor/android\": \"^7.0.0\",\n    \"@capacitor/core\": \"^7.0.0\",\n    \"@capacitor/docgen\": \"^0.3.0\",\n    \"@capacitor/ios\": \"^7.0.0\",\n    \"@ionic/eslint-config\": \"^0.4.0\",\n    \"@ionic/prettier-config\": \"^4.0.0\",\n    \"@ionic/swiftlint-config\": \"^2.0.0\",\n    \"eslint\": \"^8.57.0\",\n    \"prettier\": \"^3.4.2\",\n    \"prettier-plugin-java\": \"^2.6.6\",\n    \"rimraf\": \"^6.0.1\",\n    \"rollup\": \"^4.30.1\",\n    \"swiftlint\": \"^2.0.0\",\n    \"typescript\": \"~4.1.5\"\n  },\n  \"peerDependencies\": {\n    \"@capacitor/core\": \">=7.0.0\"\n  },\n  \"prettier\": \"@ionic/prettier-config\",\n  \"swiftlint\": \"@ionic/swiftlint-config\",\n  \"eslintConfig\": {\n    \"extends\": \"@ionic/eslint-config/recommended\"\n  },\n  \"capacitor\": {\n    \"ios\": {\n      \"src\": \"ios\"\n    },\n    \"android\": {\n      \"src\": \"android\"\n    }\n  }\n}\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/rollup.config.mjs",
    "content": "export default {\n  input: 'dist/esm/index.js',\n  output: [\n    {\n      file: 'dist/plugin.js',\n      format: 'iife',\n      name: 'capacitorBetterCrewlinkNativeService',\n      globals: {\n        '@capacitor/core': 'capacitorExports',\n      },\n      sourcemap: true,\n      inlineDynamicImports: true,\n    },\n    {\n      file: 'dist/plugin.cjs.js',\n      format: 'cjs',\n      sourcemap: true,\n      inlineDynamicImports: true,\n    },\n  ],\n  external: ['@capacitor/core'],\n};\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/src/definitions.ts",
    "content": "export interface BetterCrewlinkNativeServicePlugin {\n  disconnect(): Promise<{ value: string }>;\n  showTalking(options: { color: number, talking: boolean }): Promise<{ value: string }>;\n  showNotification(options: { audiomuted: boolean, micmuted: boolean, overlayEnabled: boolean }): Promise<{ value: string }>;\n\n}\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/src/index.ts",
    "content": "import { registerPlugin } from '@capacitor/core';\n\nimport type { BetterCrewlinkNativeServicePlugin } from './definitions';\n\nconst BetterCrewlinkNativeService = registerPlugin<BetterCrewlinkNativeServicePlugin>('BetterCrewlinkNativeService', {\n  web: () => import('./web').then((m) => new m.BetterCrewlinkNativeServiceWeb()),\n});\n\nexport * from './definitions';\nexport { BetterCrewlinkNativeService };\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/src/web.ts",
    "content": "import { WebPlugin } from '@capacitor/core';\n\nimport type { BetterCrewlinkNativeServicePlugin } from './definitions';\n\nexport class BetterCrewlinkNativeServiceWeb extends WebPlugin implements BetterCrewlinkNativeServicePlugin {\n  disconnect(): Promise<{ value: string; }> {\n    console.log('disconnect');\n    return Promise.resolve({ value: 'Disconnected' });\n  }\n  showTalking({ color, talking }: { color: number; talking: boolean; }): Promise<{ value: string; }> {\n    console.log('showTalking', { color, talking });\n    return Promise.resolve({ value: `Talking: ${talking}, Color: ${color}` });\n  }\n  showNotification(_options: { audiomuted: boolean; micmuted: boolean; overlayEnabled: boolean; }): Promise<{ value: string; }> {\n    console.log('showNotification', _options);\n    return Promise.resolve({ value: 'Notification shown' });\n  }\n  async echo(options: { value: string }): Promise<{ value: string }> {\n    console.log('ECHO', options);\n    return options;\n  }\n}\n"
  },
  {
    "path": "plugins/bcl-mobile-overlay/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"allowUnreachableCode\": false,\n    \"declaration\": true,\n    \"esModuleInterop\": true,\n    \"inlineSources\": true,\n    \"lib\": [\"dom\", \"es2017\"],\n    \"module\": \"esnext\",\n    \"moduleResolution\": \"node\",\n    \"noFallthroughCasesInSwitch\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"outDir\": \"dist/esm\",\n    \"pretty\": true,\n    \"sourceMap\": true,\n    \"strict\": true,\n    \"target\": \"es2017\"\n  },\n  \"files\": [\"src/index.ts\"]\n}\n"
  },
  {
    "path": "src/app/app-routing.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { PreloadAllModules, RouterModule, Routes } from '@angular/router';\nimport { SettingsComponent } from './pages/settings/settings.component';\nimport { GameComponent } from './pages/game/game.component';\n\nconst routes: Routes = [\n\t{\n\t\tpath: '',\n\t\tredirectTo: 'settings',\n\t\tpathMatch: 'full',\n\t},\n\t{\n\t\tpath: 'game',\n\t\tcomponent: GameComponent,\n\t},\n\t{\n\t\tpath: 'settings',\n\t\tcomponent: SettingsComponent,\n\t},\n\t{ path: '**', redirectTo: '/settings', pathMatch: 'full' },\n];\n\n@NgModule({\n\timports: [RouterModule.forRoot(routes, {})],\n\texports: [RouterModule],\n})\nexport class AppRoutingModule {}\n"
  },
  {
    "path": "src/app/app.component.html",
    "content": "<ion-app>\n\t<ion-menu contentId=\"main-content\">\n\t\t<ion-content color=\"secondary\">\n\n\t\t\t<ion-list id=\"inbox-list\" style=\"background-color: #25232a\">\n\t\t\t\t<ion-item><b>BetterCrewlink Mobile v1.0.35</b></ion-item>\n\t\t\t\t<ion-menu-toggle auto-hide=\"false\" *ngFor=\"let p of appPages; let i = index\">\n\t\t\t\t\t<ion-item\n\t\t\t\t\t\t(click)=\"selectedIndex = i\"\n\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\trouterDirection=\"root\"\n\t\t\t\t\t\t[routerLink]=\"[p.url]\"\n\t\t\t\t\t\tlines=\"none\"\n\t\t\t\t\t\tdetail=\"false\"\n\t\t\t\t\t\t[class.selected]=\"selectedIndex == i\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ion-icon slot=\"start\" color=\"light\" [ios]=\"p.icon + '-outline'\" [md]=\"p.icon + '-sharp'\"></ion-icon>\n\t\t\t\t\t\t<ion-label>{{ p.title }} </ion-label>\n\t\t\t\t\t</ion-item>\n\t\t\t\t</ion-menu-toggle>\n\t\t\t</ion-list>\n\t\t</ion-content>\n\t</ion-menu>\n\t<ion-header>\n\t\t<app-header></app-header>\n\t</ion-header>\n\t<ion-router-outlet id=\"main-content\" style=\"height: 40% !important;\"></ion-router-outlet>\n\t<ion-footer class=\"footer\">\n\t\t<app-footer></app-footer>\n\t</ion-footer>\n</ion-app>\n"
  },
  {
    "path": "src/app/app.component.scss",
    "content": "\nion-menu ion-content {\n  --background: var(--ion-item-background, var(--ion-background-color, #fff));\n}\n\nion-menu.md ion-content {\n  --padding-start: 8px;\n  --padding-end: 8px;\n  --padding-top: 20px;\n  --padding-bottom: 20px;\n}\n\nion-menu.md ion-list {\n  padding: 20px 0;\n}\n\nion-menu.md ion-note {\n  margin-bottom: 30px;\n}\n\nion-menu.md ion-list-header,\nion-menu.md ion-note {\n  padding-left: 10px; \n}\n\nion-menu.md ion-list#inbox-list {\n  border-bottom: 1px solid var(--ion-color-step-150, #d7d8da);\n}\n\nion-menu.md ion-list#inbox-list ion-list-header {\n  font-size: 22px;\n  font-weight: 600;\n\n  min-height: 20px;\n}\n\nion-menu.md ion-list#labels-list ion-list-header {\n  font-size: 16px;\n\n  margin-bottom: 18px;\n\n  color: #757575;\n\n  min-height: 26px;\n}\n\nion-menu.md ion-item {\n  --padding-start: 10px;\n  --padding-end: 10px;\n  border-radius: 4px;\n}\n\nion-menu.md ion-item.selected {\n  --background: rgba(var(--ion-color-primary-rgb), 0.14);\n}\n\nion-menu.md ion-item.selected ion-icon {\n  color: var(--ion-color-primary);\n}\n\nion-menu.md ion-item ion-icon {\n  color: #616e7e;\n}\n\nion-menu.md ion-item ion-label {\n  font-weight: 500;\n}\n\nion-menu.ios ion-content {\n  --padding-bottom: 20px;\n}\n\nion-menu.ios ion-list {\n  padding: 20px 0 0 0;\n}\n\nion-menu.ios ion-note {\n  line-height: 24px;\n  margin-bottom: 20px;\n}\n\nion-menu.ios ion-item {\n  --padding-start: 16px;\n  --padding-end: 16px;\n  --min-height: 50px;\n}\n\nion-menu.ios ion-item.selected ion-icon {\n  color: var(--ion-color-primary);\n}\n\nion-menu.ios ion-item ion-icon {\n  font-size: 24px;\n  color: #73849a;\n}\n\nion-menu.ios ion-list#labels-list ion-list-header {\n  margin-bottom: 8px;\n}\n\nion-menu.ios ion-list-header,\nion-menu.ios ion-note {\n  padding-left: 16px;\n  padding-right: 16px;\n}\n\nion-menu.ios ion-note {\n  margin-bottom: 8px;\n}\n\nion-note {\n  display: inline-block;\n  font-size: 16px;\n\n  color: var(--ion-color-medium-shade);\n}\n\nion-item.selected {\n  --color: var(--ion-color-primary);\n}\n\n.full-width-select{\n    max-width: unset !important;\n    width: 100% !important;\n}\n\n\n\n.footer {\n  position: fixed;\n  bottom:0;\n  width: 100%;\n  justify-content : center;\n  }\n\n"
  },
  {
    "path": "src/app/app.component.spec.ts",
    "content": "import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { TestBed, waitForAsync } from '@angular/core/testing';\n\nimport { Platform } from '@ionic/angular';\nimport { RouterTestingModule } from '@angular/router/testing';\n\nimport { AppComponent } from './app.component';\n\ndescribe('AppComponent', () => {\n\t// tslint:disable-next-line\n\tlet platformReadySpy, platformSpy;\n\n\tbeforeEach(waitForAsync(() => {\n\t\tplatformReadySpy = Promise.resolve();\n\t\tplatformSpy = jasmine.createSpyObj('Platform', { ready: platformReadySpy });\n\n\t\tTestBed.configureTestingModule({\n\t\t\tdeclarations: [AppComponent],\n\t\t\timports: [RouterTestingModule],\n\t\t\tproviders: [\n\t\t\t\t{ provide: Platform, useValue: platformSpy },\n\t\t\t],\n\t\t\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\t\t}).compileComponents();\n\t}));\n\n\tit('should create the app', async () => {\n\t\tconst fixture = TestBed.createComponent(AppComponent);\n\t\tconst app = fixture.debugElement.componentInstance;\n\t\texpect(app).toBeTruthy();\n\t});\n\n\tit('should initialize the app', async () => {\n\t\tTestBed.createComponent(AppComponent);\n\t\texpect(platformSpy.ready).toHaveBeenCalled();\n\t\tawait platformReadySpy;\n\t});\n\n\tit('should have menu labels', async () => {\n\t\tconst fixture = await TestBed.createComponent(AppComponent);\n\t\tawait fixture.detectChanges();\n\t\tconst app = fixture.nativeElement;\n\t\tconst menuItems = app.querySelectorAll('ion-label');\n\t\texpect(menuItems.length).toEqual(12);\n\t\texpect(menuItems[0].textContent).toContain('Inbox');\n\t\texpect(menuItems[1].textContent).toContain('Outbox');\n\t});\n\n\tit('should have urls', async () => {\n\t\tconst fixture = await TestBed.createComponent(AppComponent);\n\t\tawait fixture.detectChanges();\n\t\tconst app = fixture.nativeElement;\n\t\tconst menuItems = app.querySelectorAll('ion-item');\n\t\texpect(menuItems.length).toEqual(12);\n\t\texpect(menuItems[0].getAttribute('ng-reflect-router-link')).toEqual('/folder/Inbox');\n\t\texpect(menuItems[1].getAttribute('ng-reflect-router-link')).toEqual('/folder/Outbox');\n\t});\n});\n"
  },
  {
    "path": "src/app/app.component.ts",
    "content": "import { Component, Inject, OnInit } from '@angular/core';\nimport { Storage } from '@ionic/storage';\nimport { SettingsService } from './services/settings.service';\n@Component({\n\tselector: 'app-root',\n\ttemplateUrl: 'app.component.html',\n\tstyleUrls: ['app.component.scss'],\n})\nexport class AppComponent implements OnInit {\n\tpublic selectedIndex = 0;\n\tpublic appPages = [\n\t\t{\n\t\t\ttitle: 'game',\n\t\t\turl: '/game',\n\t\t\ticon: 'home',\n\t\t},\n\t\t{\n\t\t\ttitle: 'settings',\n\t\t\turl: '/settings',\n\t\t\ticon: 'settings',\n\t\t},\n\t];\n\n\tconstructor(private settingsService: SettingsService) {\n\t\tthis.initializeApp();\n\t}\n\n\tinitializeApp() {}\n\n\tasync ngOnInit() {\n\t\tconsole.log('AppComponent initialized');\n\t\tthis.settingsService.load();\n\t}\n}\n"
  },
  {
    "path": "src/app/app.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { RouteReuseStrategy } from '@angular/router';\nimport { IonicModule, IonicRouteStrategy } from '@ionic/angular';\nimport { AppComponent } from './app.component';\nimport { AppRoutingModule } from './app-routing.module';\nimport { IonicStorageModule } from '@ionic/storage-angular';\nimport { Platform } from '@ionic/angular';\nimport { ServiceWorkerModule } from '@angular/service-worker';\nimport { environment } from '../environments/environment';\nimport { SettingsComponent } from './pages/settings/settings.component';\nimport { GameComponent } from './pages/game/game.component';\nimport { FormsModule } from '@angular/forms';\nimport { GlobalFooterComponent } from './compontents/global-footer/global-footer.component';\nimport { GlobalHeaderComponent } from './compontents/global-header/global-header.component';\nimport { AvatarComponent } from './compontents/avatar/avatar.component';\nimport { AndroidPermissions } from '@awesome-cordova-plugins/android-permissions/ngx';\nimport { BackgroundMode } from '@awesome-cordova-plugins/background-mode/ngx';\n@NgModule({\n\tdeclarations: [\n\t\tAppComponent,\n\t\tGlobalFooterComponent,\n\t\tAvatarComponent,\n\t\tGlobalHeaderComponent,\n\t\tSettingsComponent,\n\t\tGameComponent,\n\t],\n\timports: [\n\t\tBrowserModule,\n\t\tIonicModule.forRoot(),\n\t\tAppRoutingModule,\n\t\tIonicStorageModule.forRoot(),\n\t\tServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }),\n\t\tFormsModule,\n\t],\n\tproviders: [\n\t\tBackgroundMode,\n\t\tAndroidPermissions,\n\t\t{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },\n\t\tPlatform,\n\t],\n\tbootstrap: [AppComponent],\n})\nexport class AppModule {}\n"
  },
  {
    "path": "src/app/compontents/avatar/avatar.component.html",
    "content": "<div class=\"avatarBase\">\n\t<div *ngIf=\"this.volumeOpen\" class=\"volumeslider\" (mouseout)=\"openVolume(false)\">\n\t\t<div class=\"volumeslider-1\">\n\t\t\t<ion-range\n\t\t\t\tclass=\"volumeSliderThingy\"\n\t\t\t\t[(ngModel)]=\"settings.volume\"\n\t\t\t\t(ionChange)=\"onVolumeChange()\"\n\t\t\t\tcolor=\"light\"\n\t\t\t\tmax=\"{{ MAXVOLUME }}\"\n\t\t\t\tmin=\"0\"\n\t\t\t\tstep=\"1\"\n\t\t\t\tpin=\"1\"\n\t\t\t>\n\t\t\t\t<ion-icon slot=\"start\" size=\"small\" name=\"volume-high-outline\"></ion-icon>\n\t\t\t</ion-range>\n\t\t</div>\n\t</div>\n\t<div class=\"avatar\" [class.talking]=\"talking\" (click)=\"openVolume()\">\n\t\t<div class=\"avatar avatar-2\">\n\t\t\t<img\n\t\t\t\tsrc=\"assets/avatar/players/{{ player.colorId }}-{{ isDead ? 'dead' : 'alive' }}.png\"\n\t\t\t\tclass=\"base no-drag-img\"\n\t\t\t\tstyle=\"display: none\"\n\t\t\t\tonload=\"this.style.display=''\"\n\t\t\t/>\n\t\t\t<img\n\t\t\t\t*ngIf=\"!isDead && player.skinId > 0\"\n\t\t\t\tsrc=\"assets/avatar/skins/{{ player.skinId }}.png\"\n\t\t\t\tclass=\"skin no-drag-img\"\n\t\t\t\tstyle=\"display: none\"\n\t\t\t\tonload=\"this.style.display=''\"\n\t\t\t\tonerror=\"this.style.display='none'\"\n\t\t\t/>\n\n\t\t\t<!-- {overflow && <img src={coloredHats[`${hat}${color}`] || hats[hat]} ref={hatImg} className={classes.hat} />} -->\n\t\t</div>\n\t\t<img\n\t\t\t*ngIf=\"!isDead && player.hatId > 0\"\n\t\t\tsrc=\"assets/avatar/hats/{{ getHatImage() }}.png\"\n\t\t\t[style.top]=\"getHatY()\"\n\t\t\t[class]=\"backLayerHats.has(player.hatId) ? 'backlayerd-hat' : ''\"\n\t\t\tclass=\"hat no-drag-img\"\n\t\t\tstyle=\"display: none\"\n\t\t\tonload=\"this.style.display=''\"\n\t\t\tonerror=\"this.style.display='none'\"\n\t\t/>\n\t</div>\n\t<p class=\"playername_container\">\n\t\t<span class=\"playername noselect\">{{ player.name }}</span>\n\t</p>\n</div>\n"
  },
  {
    "path": "src/app/compontents/avatar/avatar.component.scss",
    "content": ".no-drag-img {\n\tuser-select: none;\n\t-moz-user-select: none;\n\t-webkit-user-drag: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n}\n\n.avatar {\n\twidth: 100%;\n\tposition: relative;\n\ttransition: border-color 0.2s ease-out;\n\tborder-style: solid;\n\tborder-radius: 50%;\n\tpadding-bottom: 100%;\n\tborder-width: 2px;\n\tborder-color: transparent;\n}\n\n.avatar-2 {\n\tcursor: pointer;\n\toverflow: hidden;\n\tposition: absolute;\n\t// top: -2.5px;\n\t// left: -2.5px;\n\tborder-width: 2px;\n\ttransform: unset;\n}\n\n.volumeslider {\n\tposition: absolute;\n\twidth: 100%;\n\tborder-radius: 20px;\n\t//  height: 20px;\n\tbackground-color: #000000; //60\n\tz-index: 40;\n\theight: 30px;\n}\n.volumeslider-1 {\n\tposition: absolute;\n\twidth: 90%;\n}\n.volumeSliderThingy {\n\tpadding: 0px;\n\tmargin-top: -5px;\n\tmargin-left: 10px;\n}\n\n.skin {\n\ttop: calc(33% + 22%);\n\twidth: 105%;\n\tz-index: 3;\n\tposition: absolute;\n\tleft: -7px;\n}\n\n.base {\n\twidth: 105%;\n\tposition: absolute;\n\ttop: 22%;\n\tleft: -7px;\n\tz-index: 2;\n}\n\n.hat {\n\tcursor: pointer;\n\tposition: absolute;\n\tdisplay: block;\n\tleft: -6px;\n\ttop: -11%;\n\tz-index: 3;\n\twidth: 100%;\n}\n.backlayerd-hat {\n\tz-index: 1;\n}\n\n.avatarBase {\n\tposition: relative;\n\t// max-width: 75px\n\t//  height: 500px;\n}\n\n.avatar.talking {\n\tborder-color: limegreen !important;\n}\n\n.playername_container {\n\twidth: 100%;\n\tz-index: 20;\n\tbottom: -6px;\n\tposition: absolute;\n\ttext-align: center;\n}\n.playername {\n\tfont-weight: bold;\n\tcolor: white;\n\ttext-align: center;\n\tpadding: 5px 10px 5px 10px;\n\tbackground-color: rgb(0 0 0 / 69%);\n\tborder-radius: 20px;\n}\n\n.noselect {\n\t-webkit-touch-callout: none; /* iOS Safari */\n\t-webkit-user-select: none; /* Safari */\n\t-khtml-user-select: none; /* Konqueror HTML */\n\t-moz-user-select: none; /* Old versions of Firefox */\n\t-ms-user-select: none; /* Internet Explorer/Edge */\n\tuser-select: none; /* Non-prefixed version, currently\n                                    supported by Chrome, Edge, Opera and Firefox */\n}\n"
  },
  {
    "path": "src/app/compontents/avatar/avatar.component.spec.ts",
    "content": "import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';\nimport { IonicModule } from '@ionic/angular';\n\nimport { AvatarComponent } from './avatar.component';\n\ndescribe('AvatarComponent', () => {\n\tlet component: AvatarComponent;\n\tlet fixture: ComponentFixture<AvatarComponent>;\n\n\tbeforeEach(waitForAsync(() => {\n\t\tTestBed.configureTestingModule({\n\t\t\tdeclarations: [AvatarComponent],\n\t\t\timports: [IonicModule.forRoot()],\n\t\t}).compileComponents();\n\n\t\tfixture = TestBed.createComponent(AvatarComponent);\n\t\tcomponent = fixture.componentInstance;\n\t\tfixture.detectChanges();\n\t}));\n\n\tit('should create', () => {\n\t\texpect(component).toBeTruthy();\n\t});\n});\n"
  },
  {
    "path": "src/app/compontents/avatar/avatar.component.ts",
    "content": "import { Component, Input, OnInit } from '@angular/core';\nimport { Player } from '../../services/AmongUsState';\nimport { SocketElement, PlayerSetting } from '../../services/smallInterfaces';\nimport { SettingsService } from '../../services/settings.service';\n\nconst hatOffsets: { [key in number]: number | undefined } = {\n\t7: -50,\n\t21: -50,\n\t28: -50,\n\t35: -50,\n\t77: -50,\n\t90: -50,\n\t94: -15,\n\t103: -50,\n};\n\nconst coloredHats: number[] = [77, 90];\n\n@Component({\n\tselector: 'app-avatar',\n\ttemplateUrl: './avatar.component.html',\n\tstyleUrls: ['./avatar.component.scss'],\n})\nexport class AvatarComponent implements OnInit {\n\tbackLayerHats =new Set([39, 4, 6, 15, 29, 42, 75, 85, 102, 105, 106, 104, 103]);\n\t@Input() player: Player;\n\t@Input() talking: boolean;\n\t@Input() isDead: boolean = false;\n\t@Input() settings: PlayerSetting = undefined;\n\tvolumeOpen: boolean;\n\treadonly MAXVOLUME = 500;\n\tconstructor(private settingsService: SettingsService) {}\n\n\tclickable() {\n\t\treturn this.settings !== undefined;\n\t}\n\tgetHatY(): string {\n\t\treturn `${(hatOffsets[this.player.hatId] || -33) + 22}%`;\n\t}\n\tgetHatImage(): string {\n\t\treturn coloredHats.includes(this.player.hatId)\n\t\t\t? `${this.player.hatId}-${this.player.colorId}`\n\t\t\t: `${this.player.hatId}`;\n\t}\n\n\topenVolume(state = !this.volumeOpen) {\n\t\tconsole.log(this.settings);\n\t\tif (!this.settings) {\n\t\t\treturn;\n\t\t}\n\t\tthis.volumeOpen = state;\n\t}\n\n\tonVolumeChange() {\n\t\tconsole.log(\"Volume: \",this.player.nameHash, this.settings )\n\n\t\tif (this.settings) {\n\t\t\tconsole.log(\"Volume: \",this.player.nameHash, this.settings )\n\t\t\tthis.settingsService.savePlayerSetting(this.player.nameHash, this.settings);\n\t\t}\n\t}\n\n\tngOnInit() {}\n}\n"
  },
  {
    "path": "src/app/compontents/global-footer/global-footer.component.html",
    "content": "<ng-container>\n  <ion-toolbar color=\"primary\">\n    <ion-row class=\"ion-justify-content-center\">\n      <ion-col>\n        <ion-row class=\"ion-justify-content-center\">\n          <ion-button class=\"round\" href=\"https://discord.gg/qDqTzvj4SH\"> \n            <img \n              src=\"../../assets/icon/discordicon.png\"\n            />\n          </ion-button>\n        </ion-row>\n      </ion-col>\n      <ion-col>\n        <ion-row class=\"ion-justify-content-center\">\n          <ion-button class=\"round\" href=\"https://github.com/OhMyGuus/better-crewlink-mobile\">\n            <img\n              src=\"../../assets/icon/giticon.png\"\n            /> \n          </ion-button>\n        </ion-row>\n      </ion-col>\n    </ion-row>\n  </ion-toolbar>\n</ng-container>"
  },
  {
    "path": "src/app/compontents/global-footer/global-footer.component.scss",
    "content": ".round {\n    width: 60px;\n    height: 60px;\n    justify-self: center !important;\n    --border-radius: 30px;\n    --vertical-align: middle;\n}  "
  },
  {
    "path": "src/app/compontents/global-footer/global-footer.component.ts",
    "content": "import { Component, OnInit } from '@angular/core';\n\n@Component({\n\tselector: 'app-footer',\n\ttemplateUrl: './global-footer.component.html',\n\tstyleUrls: ['./global-footer.component.scss'],\n})\nexport class GlobalFooterComponent implements OnInit {\n\tconstructor() {}\n\n\tngOnInit() {}\n}\n"
  },
  {
    "path": "src/app/compontents/global-header/global-header.component.html",
    "content": "<ng-container>\n\t<ion-toolbar color=\"primary\" #container>\n\t\t<ion-buttons slot=\"start\" id=\"Menu\">\n\t\t\t<ion-menu-button></ion-menu-button>\n\t\t</ion-buttons>\n\t\t<ion-buttons slot=\"end\">\n\t\t\t<ion-button\n\t\t\t\tright\n\t\t\t\t*ngIf=\"gameHelper.cManager.connectionState !== 0\"\n\t\t\t\t[routerLink]=\"['/settings']\"\n\t\t\t\t(click)=\"gameHelper.disconnect()\"\n\t\t\t\t>Disconnect</ion-button\n\t\t\t>\n\t\t</ion-buttons>\n\t\t<!-- <ion-title fittext [minFontSize]=\"'40px'\" *ngIf=\"gameHelper.cManager.connectionState !== 0\" class=\"ion-text-center small-title\"\n\t\t\t>BetterCrewlink Mobile v1.0.13</ion-title\n\t\t> -->\n\t\t<div>BetterCrewlink</div>\n\t\t<!-- <ion-title  *ngIf=\"gameHelper.cManager.connectionState == 0\" class=\"ion-text-center small-title\"\n\t\t\t>BetterCrewlink Mobile v1.0.13</ion-title\n\t\t> -->\n\t</ion-toolbar>\n</ng-container>\n"
  },
  {
    "path": "src/app/compontents/global-header/global-header.component.scss",
    "content": ".small-title {\n   // font-size: 25px;\n    //font-size: 2vw;\n}\n\n@media screen and (min-width: 1200px) {\n    .small-title {\n      // /-size: 25px;\n    }\n  } "
  },
  {
    "path": "src/app/compontents/global-header/global-header.component.spec.ts",
    "content": "import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';\nimport { IonicModule } from '@ionic/angular';\n\nimport { GlobalHeaderComponent } from './global-header.component';\n\ndescribe('GlobalHeaderComponent', () => {\n\tlet component: GlobalHeaderComponent;\n\tlet fixture: ComponentFixture<GlobalHeaderComponent>;\n\n\tbeforeEach(waitForAsync(() => {\n\t\tTestBed.configureTestingModule({\n\t\t\tdeclarations: [GlobalHeaderComponent],\n\t\t\timports: [IonicModule.forRoot()],\n\t\t}).compileComponents();\n\n\t\tfixture = TestBed.createComponent(GlobalHeaderComponent);\n\t\tcomponent = fixture.componentInstance;\n\t\tfixture.detectChanges();\n\t}));\n\n\tit('should create', () => {\n\t\texpect(component).toBeTruthy();\n\t});\n});\n"
  },
  {
    "path": "src/app/compontents/global-header/global-header.component.ts",
    "content": "import { Component, OnInit } from '@angular/core';\nimport { GameHelperService } from 'src/app/services/game-helper.service';\n\n@Component({\n\tselector: 'app-header',\n\ttemplateUrl: './global-header.component.html',\n\tstyleUrls: ['./global-header.component.scss'],\n})\nexport class GlobalHeaderComponent implements OnInit {\n\tconstructor(public gameHelper: GameHelperService) {}\n\tngOnInit(): void {\n\t}\n}\n"
  },
  {
    "path": "src/app/pages/game/game.component.html",
    "content": "<ion-content color=\"secondary\">\n\t<ion-grid>\n\t\t<ng-container [ngSwitch]=\"gameHelper.cManager.connectionState\">\n\t\t\t<ng-container *ngSwitchDefault>\n\t\t\t\t<ion-row class=\"ion-justify-content-center\">\n\t\t\t\t\t<p style=\"text-align: center\"><b>Please go to the settings page to setup Crewlink</b></p>\n\t\t\t\t</ion-row>\n\t\t\t\t<ion-row class=\"ion-justify-content-center\">\n\t\t\t\t\t<ion-button [routerLink]=\"['/settings']\">Settings</ion-button>\n\t\t\t\t\t<ion-button (click)=\"gameHelper.connect()\">Reconnect</ion-button>\n\t\t\t\t</ion-row>\n\t\t\t</ng-container>\n\t\t\t<ng-container id=\"connectPg\" *ngSwitchCase=\"1\">\n\t\t\t\t<ion-row class=\"ion-justify-content-center\">\n\t\t\t\t\t<ion-spinner paused=\"false\" id=\"spinnyBoi\" color=\"light\"></ion-spinner>\n\t\t\t\t</ion-row>\n\t\t\t\t<p style=\"text-align: center\"><b>{{gameHelper.getConnectionStage()}}</b></p>\n\t\t\t\t<p style=\"text-align: center\">\n\t\t\t\t\t**Please make sure there is a PC user with \"Mobile Host\" enabled on Crewlink in the lobby**\n\t\t\t\t</p>\n\t\t\t\t<ion-row class=\"ion-justify-content-center\">\n\t\t\t\t\t<ion-button (click)=\"gameHelper.connect()\">refresh</ion-button>\n\t\t\t\t\t<ion-button [routerLink]=\"['/settings']\">Settings</ion-button>\n\t\t\t\t\t<ion-button (click)=\"gameHelper.disconnect()\">Disconnect</ion-button>\n\t\t\t\t</ion-row>\n\t\t\t</ng-container>\n\n\t\t\t<ng-container id=\"connectPg\" *ngSwitchCase=\"3\">\n\t\t\t\t<h2 style=\"text-align: center; color: red\">Error</h2>\n\t\t\t\t<p style=\"text-align: center;\">{{ gameHelper.getError() }}</p>\n\t\t\t\t<ion-row class=\"ion-justify-content-center\">\n\t\t\t\t\t<ion-button (click)=\"gameHelper.connect()\">refresh</ion-button>\n\t\t\t\t\t<ion-button [routerLink]=\"['/settings']\">Settings</ion-button>\n\t\t\t\t</ion-row>\n\t\t\t</ng-container>\n\t\t\t<ng-container id=\"connectedPg\" *ngSwitchCase=\"2\">\n\t\t\t\t<ion-grid style=\"height: 80%\">\n\t\t\t\t\t<ion-row class=\"playerGrid localPLayerRow\">\n\t\t\t\t\t\t<ion-col size=\"4\">\n\t\t\t\t\t\t\t<app-avatar\n\t\t\t\t\t\t\t\t[isDead]=\"gameHelper.cManager.localPLayer.isDead\"\n\t\t\t\t\t\t\t\t[player]=\"gameHelper.cManager.localPLayer\"\n\t\t\t\t\t\t\t\t[talking]=\"gameHelper.localTalking()\"\n\t\t\t\t\t\t\t></app-avatar>\n\t\t\t\t\t\t</ion-col>\n\t\t\t\t\t\t<ion-col size=\"4\">\n\t\t\t\t\t\t\t<div class=\"nameCode-Container\">\n\t\t\t\t\t\t\t\t<span class=\"nameCode-username\">{{ gameHelper.cManager?.localPLayer?.name }} </span\n\t\t\t\t\t\t\t\t><span class=\"nameCode-code\" style=\"background: rgb(62, 67, 70)\">{{\n\t\t\t\t\t\t\t\t\tgameHelper.cManager.currentGameCode\n\t\t\t\t\t\t\t\t}}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</ion-col>\n\t\t\t\t\t\t<ion-col size=\"2\">\n\t\t\t\t\t\t\t<div class=\"nameCode-Container\">\n\t\t\t\t\t\t\t\t<ion-button fill=\"clear\" (click)=\"gameHelper.muteMicrophone()\">\n\t\t\t\t\t\t\t\t\t<ion-icon\n\t\t\t\t\t\t\t\t\t\t[style.color]=\"gameHelper.microphoneMuted() ? 'red' : 'white'\"\n\t\t\t\t\t\t\t\t\t\t[name]=\"gameHelper.microphoneMuted() ? 'mic-off-circle-outline' : 'mic-circle-outline'\"\n\t\t\t\t\t\t\t\t\t\tname=\"close-circle\"\n\t\t\t\t\t\t\t\t\t\tstyle=\"zoom: 2\"\n\t\t\t\t\t\t\t\t\t></ion-icon>\n\t\t\t\t\t\t\t\t</ion-button>\n\t\t\t\t\t\t\t\t<ion-button fill=\"clear\" (click)=\"gameHelper.muteAudio()\">\n\t\t\t\t\t\t\t\t\t<ion-icon\n\t\t\t\t\t\t\t\t\t\t[style.color]=\"gameHelper.audioMuted() ? 'red' : 'white'\"\n\t\t\t\t\t\t\t\t\t\t[name]=\"gameHelper.audioMuted() ? 'volume-mute-outline' : 'volume-high-outline'\"\n\t\t\t\t\t\t\t\t\t\tname=\"close-circle\"\n\t\t\t\t\t\t\t\t\t\tstyle=\"zoom: 2\"\n\t\t\t\t\t\t\t\t\t></ion-icon>\n\t\t\t\t\t\t\t\t</ion-button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</ion-col>\n\t\t\t\t\t</ion-row>\n\t\t\t\t\t<ion-row class=\"playerGrid playersGrid\">\n\t\t\t\t\t\t<ng-container *ngFor=\"let item of getPlayers()\">\n\t\t\t\t\t\t\t<ion-col *ngIf=\"item.player\" size=\"4\" class=\"testColumn\">\n\t\t\t\t\t\t\t\t<app-avatar\n\t\t\t\t\t\t\t\t\tsettings=\"item.socketId\"\n\t\t\t\t\t\t\t\t\t*ngIf=\"item.player\"\n\t\t\t\t\t\t\t\t\t[settings]=\"item.settings\"\n\t\t\t\t\t\t\t\t\t[isDead]=\"item.isDead\"\n\t\t\t\t\t\t\t\t\t[player]=\"item.player\"\n\t\t\t\t\t\t\t\t\t[talking]=\"item.talking && item.audible\"\n\t\t\t\t\t\t\t\t></app-avatar\n\t\t\t\t\t\t\t></ion-col>\n\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t</ion-row>\n\t\t\t\t</ion-grid>\n\t\t\t</ng-container>\n\t\t</ng-container>\n\t</ion-grid>\n</ion-content>\n\n<div class=\"testButtons\" *ngIf=\"gameHelper.cManager.connectionState == 2\">\n\t<ion-row>\n\t\t<ion-button (click)=\"gameHelper.connect()\">Refresh</ion-button>\n\t\t<ion-button (click)=\"gameHelper.disconnect()\">Disconnect</ion-button>\n\t</ion-row>\n</div>\n"
  },
  {
    "path": "src/app/pages/game/game.component.scss",
    "content": ".masters {\n\tbackground-color: #25232a;\n}\n\n.fixedLabel {\n\tmin-width: 20% !important;\n\tmax-width: 20% !important;\n}\n.playerGrid {\n\tmax-width: 450px;\n}\n\n.playersGrid {\n\tmin-height: 400px;\n}\n.localPLayerRow {\n\tborder-bottom: solid 1px #00000041;\n}\n\n@media only screen and (max-width: 1024) {\n\t.playerGrid {\n\t\tmax-width: unset !important;\n\t}\n}\n\n.nameCode-code {\n\twidth: fit-content;\n\tmargin: 5px auto;\n\tdisplay: block;\n\tpadding: 5px;\n\tfont-size: 28px;\n\tfont-family: 'Source Code Pro', monospace;\n\tborder-radius: 5px;\n}\n\n.nameCode-username {\n\tdisplay: block;\n\tfont-size: 20px;\n\ttext-align: center;\n}\n\n.nameCode-Container {\n\theight: 100%;\n\tdisplay: flex;\n\talign-items: center;\n\tflex-direction: column;\n\tjustify-content: center;\n}\n\n.nameCode-Container1 {\n\theight: 100%;\n\tdisplay: flex;\n\talign-items: center;\n\tflex-direction: column;\n\tjustify-content: center;\n}\n\n.nameCode-Container {\n\tfloat: left;\n\theight: 100%;\n\tdisplay: flex;\n\talign-items: center;\n\tflex-direction: column;\n\tjustify-content: center;\n}\n\n.muteIcon {\n\tfont-size: 200px;\n}\n\n.muteAndDeafenIcons-Container {\n\tfloat: left;\n\twidth: 10px;\n\theight: 100%;\n\tdisplay: flex;\n\talign-items: center;\n\tflex-direction: column;\n\tjustify-content: center;\n}\n\n.testButtons {\n\tposition: absolute;\n\tbottom:85px;\n\tleft:5px\n}\n"
  },
  {
    "path": "src/app/pages/game/game.component.ts",
    "content": "import { Component, OnInit, ChangeDetectorRef } from '@angular/core';\nimport Peer from 'simple-peer';\nimport { GameHelperService } from 'src/app/services/game-helper.service';\nimport { IDeviceInfo } from 'src/app/services/smallInterfaces';\nimport { SocketElement } from '../../services/smallInterfaces';\nimport { Player } from '../../services/AmongUsState';\n\n@Component({\n\tselector: 'app-game',\n\ttemplateUrl: './game.component.html',\n\tstyleUrls: ['./game.component.scss'],\n})\nexport class GameComponent implements OnInit {\n\tclient: SocketIOClient.Socket;\n\tpeerConnections: Array<Peer> = [];\n\tconstructor(public gameHelper: GameHelperService, private changeDetectorRef: ChangeDetectorRef) {}\n\n\tcompareFn(e1: IDeviceInfo, e2: IDeviceInfo): boolean {\n\t\treturn e1 && e2 ? e1.id === e2.id : false;\n\t}\n\n\tgetValues(map) {\n\t\treturn Array.from(map.values());\n\t}\n\n\tgetPlayers() {\n\t\treturn Array.from(this.gameHelper.cManager.socketElements.values())\n\t\t\t.filter((o) => o.player !== undefined)\n\t\t\t.sort((a, b) => a.player?.colorId -  b.player?.colorId);\n\t}\n\n\tgetValues2(map): SocketElement[] {\n\t\treturn Array.from(map.values());\n\t}\n\n\tngOnInit() {\n\t\tconsole.log('ngOninit');\n\t\tthis.gameHelper.events.on('onChange', () => {\n\t\t\tthis.changeDetectorRef.detectChanges();\n\t\t});\n\t}\n}\n"
  },
  {
    "path": "src/app/pages/settings/settings.component.html",
    "content": "<ion-content color=\"secondary\">\n\t<div>\n\t\t<ion-list lines=\"full\" class=\"ion-no-margin\" style=\"background-color: #25232a\">\n\t\t\t<ion-list-header lines=\"full\" color=\"secondary\">\n\t\t\t\t<ion-label fixed class=\"fixedLabel\"> Connection Settings: </ion-label>\n\t\t\t</ion-list-header>\n\t\t\t<ion-item>\n\t\t\t\t<ion-col size=\"5\" class=\"settingLabelCol\">\n\t\t\t\t\t<ion-label>Voice server</ion-label>\n\t\t\t\t</ion-col>\n\t\t\t\t<ion-col size=\"7\" class=\"settingInputCol\">\n\t\t\t\t\t<ion-select text-wrap [(ngModel)]=\"getSettings().voiceServerOption\" (ionChange)=\"onSettingsChange()\">\n\t\t\t\t\t\t<ion-select-option [value]=\"1\">Better-Crewlink</ion-select-option>\n\t\t\t\t\t\t<ion-select-option [value]=\"2\">Custom server</ion-select-option>\n\t\t\t\t\t</ion-select>\n\t\t\t\t</ion-col>\n\t\t\t</ion-item>\n\t\t\t<ion-item color=\"secondary\" *ngIf=\"getSettings().voiceServerOption === 2\">\n\t\t\t\t<ion-col size=\"5\" class=\"settingLabelCol\">\n\t\t\t\t\t<ion-label>Custom server</ion-label>\n\t\t\t\t</ion-col>\n\t\t\t\t<ion-col size=\"7\">\n\t\t\t\t\t<ion-input\n\t\t\t\t\t\t[(ngModel)]=\"getSettings().customVoiceServer\"\n\t\t\t\t\t\t(ionChange)=\"onSettingsChange()\"\n\t\t\t\t\t\tplaceholder=\"Voice server URL\"\n\t\t\t\t\t></ion-input>\n\t\t\t\t</ion-col>\n\t\t\t</ion-item>\n\t\t\t<ion-item color=\"secondary\">\n\t\t\t\t<ion-col size=\"5\" class=\"settingLabelCol\">\n\t\t\t\t\t<ion-label>Ingame name</ion-label>\n\t\t\t\t</ion-col>\n\t\t\t\t<ion-col size=\"7\">\n\t\t\t\t\t<ion-input\n\t\t\t\t\t\t[(ngModel)]=\"getSettings().username\"\n\t\t\t\t\t\t(ionChange)=\"onSettingsChange()\"\n\t\t\t\t\t\tplaceholder=\"'Coochie Man'\"\n\t\t\t\t\t></ion-input>\n\t\t\t\t</ion-col>\n\t\t\t</ion-item>\n\t\t\t<ion-item color=\"secondary\">\n\t\t\t\t<ion-col size=\"5\" class=\"settingLabelCol\">\n\t\t\t\t\t<ion-label>Lobby code</ion-label>\n\t\t\t\t</ion-col>\n\t\t\t\t<ion-col size=\"7\">\n\t\t\t\t\t<ion-input\n\t\t\t\t\t\tstyle=\"text-transform: uppercase\"\n\t\t\t\t\t\tpattern=\"^[A-Za-z]{4}$|^[A-Za-z]{6}$\"\n\t\t\t\t\t\t[(ngModel)]=\"getSettings().gamecode\"\n\t\t\t\t\t\t(ionChange)=\"onSettingsChange()\"\n\t\t\t\t\t\tplaceholder=\"'ABCDEF'\"\n\t\t\t\t\t\tmaxlength=\"6\"\n\t\t\t\t\t></ion-input>\n\t\t\t\t</ion-col>\n\t\t\t</ion-item>\n\t\t\t<ion-item *ngIf=\"getSettings().isMobile\">\n\t\t\t\t<ion-col size=\"5\" class=\"settingLabelCol\">\n\t\t\t\t\t<ion-label>Overlay enabled</ion-label>\n\t\t\t\t</ion-col>\n\t\t\t\t<ion-col size=\"7\" class=\"settingInputCol\">\n\t\t\t\t\t<ion-checkbox\n\t\t\t\t\t\t[(ngModel)]=\"getSettings().overlayEnabled\"\n\t\t\t\t\t\t(ionChange)=\"onSettingsChange()\"\n\t\t\t\t\t\tplaceholder=\"Overlay enabled\"\n\t\t\t\t\t></ion-checkbox>\n\t\t\t\t</ion-col>\n\t\t\t</ion-item>\n\t\t\t<ion-item>\n\t\t\t\t<ion-col size=\"5\" class=\"settingLabelCol\">\n\t\t\t\t\t<ion-label>NAT FIX</ion-label>\n\t\t\t\t</ion-col>\n\t\t\t\t<ion-col size=\"7\" class=\"settingInputCol\">\n\t\t\t\t\t<ion-checkbox\n\t\t\t\t\t\t[(ngModel)]=\"getSettings().natFix\"\n\t\t\t\t\t\t(ionChange)=\"onSettingsChange()\"\n\t\t\t\t\t\tplaceholder=\"NAT FIX\"\n\t\t\t\t\t></ion-checkbox>\n\t\t\t\t</ion-col>\n\t\t\t</ion-item>\n\t\t\t<ion-item>\n\t\t\t\t<ion-col size=\"5\" class=\"settingLabelCol\">\n\t\t\t\t\t<ion-label>Microphone</ion-label>\n\t\t\t\t</ion-col>\n\t\t\t\t<ion-col size=\"7\" class=\"settingInputCol\">\n\t\t\t\t\t<ion-select\n\t\t\t\t\t\t[(ngModel)]=\"getSettings().selectedMicrophone\"\n\t\t\t\t\t\t[compareWith]=\"compareFn\"\n\t\t\t\t\t\t(ionChange)=\"onSettingsChange()\"\n\t\t\t\t\t\tclass=\"full-width-select\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ion-select-option *ngFor=\"let microphone of gameHelper.microphones\" [value]=\"microphone\">\n\t\t\t\t\t\t\t{{ microphone.label }}</ion-select-option\n\t\t\t\t\t\t>\n\t\t\t\t\t</ion-select>\n\t\t\t\t</ion-col>\n\t\t\t</ion-item>\n\t\t\t<hr />\n\t\t\t<ng-container [ngSwitch]=\"gameHelper.cManager.connectionState\">\n\t\t\t\t<ng-container *ngSwitchDefault>\n\t\t\t\t\t<ion-item color=\"secondary\">\n\t\t\t\t\t\t<ion-button (click)=\"gameHelper.connect()\" [routerLink]=\"['/game']\">Connect</ion-button>\n\t\t\t\t\t</ion-item>\n\t\t\t\t</ng-container>\n\t\t\t\t<ng-container *ngSwitchCase=\"1 || 2\">\n\t\t\t\t\t<ion-item color=\"secondary\">\n\t\t\t\t\t\t<ion-button (click)=\"gameHelper.connect()\">Refresh</ion-button>\n\t\t\t\t\t\t<ion-button (click)=\"gameHelper.disconnect()\">disconnect</ion-button>\n\t\t\t\t\t</ion-item>\n\t\t\t\t</ng-container>\n\t\t\t</ng-container>\n\t\t</ion-list>\n\t</div>\n</ion-content>\n"
  },
  {
    "path": "src/app/pages/settings/settings.component.scss",
    "content": "ion-label {\n\tmax-width: 300px;\n\tmin-width: 100px;\n\tborder-right: 1px solid rgba(56, 49, 49, 0.274);\n\tmargin-right: 5px;\n}\n\nion-select {\n\tpadding-left: 9px;\n\tmax-width: unset !important;\n}\n\nion-checkbox {\n\tmargin-left: 9px;\n}\n\n.settingLabelCol {\n\tmax-width: 200px !important;\n}\n\n.settingInputCol {\n\tmax-width: 300px !important;\n}\n"
  },
  {
    "path": "src/app/pages/settings/settings.component.ts",
    "content": "import { Component, OnInit, ChangeDetectorRef } from '@angular/core';\nimport { GameHelperService } from 'src/app/services/game-helper.service';\nimport { IDeviceInfo } from 'src/app/services/smallInterfaces';\nimport { SettingsService } from '../../services/settings.service';\n\n// const { OverlayPlugin } = Plugins;\n// const { BetterCrewlinkNativePlugin } = Plugins;\n\n@Component({\n\tselector: 'app-settings',\n\ttemplateUrl: './settings.component.html',\n\tstyleUrls: ['./settings.component.scss'],\n})\nexport class SettingsComponent implements OnInit {\n\tconstructor(\n\t\tpublic gameHelper: GameHelperService,\n\t\tprivate changeDetectorRef: ChangeDetectorRef,\n\t\tprivate settings: SettingsService\n\t) {}\n\n\tgetSettings() {\n\t\treturn this.settings.get();\n\t}\n\n\tonSettingsChange() {\n\t\tthis.settings.save();\n\t\tconsole.log('Settings changed:', this.settings.get());\n\t}\n\n\tcompareFn(e1: IDeviceInfo, e2: IDeviceInfo): boolean {\n\t\treturn e1 && e2 ? e1.id === e2.id : false;\n\t}\n\n\t// async test() {\n\t// \talert((await BetterCrewlinkNativePlugin.showNotification({ message: 'CUSTOM MESSAGE' })).result);\n\n\t// \t//\talert((await OverlayPlugin.echo({value: 'somefilter'})).value);\n\t// }\n\n\tngOnInit() {\n\t\tthis.gameHelper.events.on('onChange', () => {\n\t\t\tthis.changeDetectorRef.detectChanges();\n\t\t});\n\t}\n}\n"
  },
  {
    "path": "src/app/services/AmongUsState.ts",
    "content": "import { ILobbySettings } from './smallInterfaces';\n\nexport interface MobileData {\n\tgameState: AmongUsState;\n\tlobbySettings: ILobbySettings;\n}\n\nexport interface AmongUsState {\n\tgameState: GameState;\n\toldGameState: GameState;\n\tlobbyCode: string;\n\tplayers: Player[];\n\tisHost: boolean;\n\tclientId: number;\n\thostId: number;\n\tcomsSabotaged: boolean;\n\tlightRadius: number;\n}\n\nexport interface Player {\n\tptr: number;\n\tid: number;\n\tclientId: number;\n\tname: string;\n\tcolorId: number;\n\thatId: number;\n\tpetId: number;\n\tskinId: number;\n\tdisconnected: boolean;\n\tisImpostor: boolean;\n\tisDead: boolean;\n\ttaskPtr: number;\n\tobjectPtr: number;\n\tisLocal: boolean;\n\tnameHash: number;\n\tx: number;\n\ty: number;\n\tinVent: boolean;\n\tisbetter: boolean;\n}\n\nexport enum GameState {\n\tLOBBY,\n\tTASKS,\n\tDISCUSSION,\n\tMENU,\n\tUNKNOWN,\n}\n"
  },
  {
    "path": "src/app/services/AudioController.service.ts",
    "content": "import { EventEmitter as EventEmitterO } from 'events';\nimport { AmongUsState, GameState, Player } from './AmongUsState';\nimport { SocketElement, AudioElement, IDeviceInfo } from './smallInterfaces';\nimport { ConnectingStage, ConnectionController } from './ConnectionController.service';\nimport VAD from './vad';\n\nexport default class AudioController {\n\tlocalTalking: boolean;\n\tconstructor(private connectionController: ConnectionController) {\n\t\tthis.audioElementsCotainer = document.getElementById('AudioElements');\n\t}\n\taudioDeviceId = 'default';\n\tstream: MediaStream;\n\taudioElementsCotainer: HTMLElement;\n\tpermissionRequested: boolean;\n\taudioMuted: boolean;\n\tmicrophoneMuted: boolean;\n\tpublic events: EventEmitterO = new EventEmitterO();\n\n\tasync startAudio() {\n\t\tif (this.stream) {\n\t\t\tthis.connectionController.updateConnectingStage(ConnectingStage.startingMicrophone);\n\t\t\treturn;\n\t\t}\n\n\t\tconst audio: MediaTrackConstraintSet = {\n\t\t\tdeviceId: this.connectionController.deviceID,\n\t\t\tautoGainControl: false,\n\t\t\techoCancellation: true,\n\t\t\tnoiseSuppression: true,\n\t\t};\n\t\tthis.stream = await navigator.mediaDevices.getUserMedia({ video: false, audio });\n\t\tconst AudioContext = window.webkitAudioContext || window.AudioContext;\n\t\tconst context = new AudioContext();\n\n\t\tVAD(context, context.createMediaStreamSource(this.stream), undefined, {\n\t\t\tonVoiceStart: () => {\n\t\t\t\tthis.localTalking = true;\n\t\t\t\tthis.events.emit('local_talk', true);\n\t\t\t\tthis.connectionController?.socketIOClient?.emit('VAD', true);\n\t\t\t\t\n\t\t\t},\n\t\t\tonVoiceStop: () => {\n\t\t\t\tthis.localTalking = false;\n\t\t\t\tthis.events.emit('local_talk', false);\n\t\t\t\tthis.connectionController?.socketIOClient?.emit('VAD', false);\n\n\t\t\t},\n\t\t\tstereo: false,\n\t\t});\n\n\t\tthis.stream.getAudioTracks()[0].enabled = !this.microphoneMuted && !this.audioMuted;\n\t\tthis.connectionController.updateConnectingStage(ConnectingStage.startingMicrophone);\n\t}\n\n\tchangeMuteState(microphoneMuted: boolean, audioMuted: boolean) {\n\t\tthis.microphoneMuted = microphoneMuted;\n\t\tthis.audioMuted = audioMuted;\n\n\t\tif (this.audioMuted) {\n\t\t\tthis.connectionController.socketElements.forEach((value) => {\n\t\t\t\tif (value?.audioElement?.gain?.gain) {\n\t\t\t\t\tvalue.audioElement.gain.gain.value = 0;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tthis.stream.getAudioTracks()[0].enabled = !this.microphoneMuted && !this.audioMuted; // this might needs to be diffrent since it might open the app.\n\t}\n\n\tcreateAudioElement(stream: MediaStream, update: (bool: boolean) => void): AudioElement {\n\t\tconsole.log('[createAudioElement]');\n\t\tconst htmlAudioElement = document.createElement('audio');\n\t\thtmlAudioElement.setAttribute('playsinline', 'true');\n\t\thtmlAudioElement.setAttribute('controls', 'true');\n\n\t\tthis.audioElementsCotainer.appendChild(htmlAudioElement);\n\t\thtmlAudioElement.srcObject = stream;\n\n\t\tconst AudioContext = window.webkitAudioContext || window.AudioContext;\n\t\tconst context = new AudioContext();\n\n\t\tconst source = context.createMediaStreamSource(stream);\n\t\tconst gain = context.createGain();\n\t\tconst pan = context.createPanner();\n\n\t\tpan.refDistance = 0.1;\n\t\tpan.panningModel = 'equalpower';\n\t\tpan.distanceModel = 'linear';\n\t\tpan.maxDistance = this.connectionController.lobbySettings.maxDistance;\n\t\tpan.rolloffFactor = 1;\n\t\tgain.gain.value = 0;\n\t\thtmlAudioElement.volume = 1;\n\n\t\tconst muffle = context.createBiquadFilter();\n\t\tmuffle.type = 'lowpass';\n\t\tmuffle.Q.value = 0;\n\t\t// const reverb = context.createConvolver();\n\t\t// reverb.buffer = convolverBuffer.current;\n\n\t\tsource.connect(pan);\n\t\tpan.connect(gain);\n\n\t\tconst audioContext = pan.context;\n\t\tconst panPos = [3, 0];\n\n\t\tif (pan.positionZ) {\n\t\t\tpan.positionZ.setValueAtTime(-0.5, audioContext.currentTime);\n\t\t\tpan.positionX.setValueAtTime(panPos[0], audioContext.currentTime);\n\t\t\tpan.positionY.setValueAtTime(panPos[1], audioContext.currentTime);\n\t\t} else {\n\t\t\tpan.setPosition(panPos[0], panPos[1], -0.5);\n\t\t}\n\t\n\t\tgain.connect(context.destination);\n\n\t\treturn {\n\t\t\thtmlAudioElement,\n\t\t\taudioContext: context,\n\t\t\tmediaStreamAudioSource: source,\n\t\t\tgain,\n\t\t\tpan,\n\t\t\tmuffle,\n\t\t\tdestination: context.destination,\n\t\t\tmuffleConnected: false,\n\t\t} as AudioElement;\n\t}\n\n\tapplyEffect(gain: AudioNode, effectNode: AudioNode, destination: AudioNode, player: Player) {\n\t\ttry {\n\t\t\tgain.disconnect(destination);\n\t\t\tgain.connect(effectNode);\n\t\t\teffectNode.connect(destination);\n\t\t} catch {\n\t\t\tconsole.log('error with applying effect: ', player.name, effectNode);\n\t\t}\n\t}\n\n\trestoreEffect(gain: AudioNode, effectNode: AudioNode, destination: AudioNode, player: Player) {\n\t\ttry {\n\t\t\teffectNode.disconnect(destination);\n\t\t\tgain.disconnect(effectNode);\n\t\t\tgain.connect(destination);\n\t\t} catch {\n\t\t\tconsole.log('error with applying effect: ', player.name, effectNode);\n\t\t}\n\t}\n\n\t// move to different controller\n\tupdateAudioLocation(state: AmongUsState, element: SocketElement, localPLayer: Player): number {\n\t\tif (!element.audioElement || !element.client || !element.player || !localPLayer || this.audioMuted) {\n\t\t\treturn 0;\n\t\t}\n\t\t// console.log('[updateAudioLocation]');\n\t\tconst pan = element.audioElement.pan;\n\t\tconst gain = element.audioElement.gain;\n\t\tconst muffle = element.audioElement.muffle;\n\t\tconst audioContext = pan.context;\n\t\t// const reverb = element.audioElement.reverb;\n\t\tconst destination = element.audioElement.destination;\n\t\tconst lobbySettings = this.connectionController.lobbySettings;\n\t\tlet maxdistance = lobbySettings.maxDistance;\n\n\t\tconst other = element.player; // this.getPlayer(element.client?.clientId);\n\t\tlet panPos = [other.x - localPLayer.x, other.y - localPLayer.y];\n\t\tlet endGain = 0;\n\t\tswitch (state.gameState) {\n\t\t\tcase GameState.MENU:\n\t\t\t\tendGain = 0;\n\t\t\t\tbreak;\n\n\t\t\tcase GameState.LOBBY:\n\t\t\t\tendGain = 1;\n\t\t\t\tbreak;\n\n\t\t\tcase GameState.TASKS:\n\t\t\t\tendGain = 1;\n\n\t\t\t\tif (lobbySettings.meetingGhostOnly) {\n\t\t\t\t\tendGain = 0;\n\t\t\t\t}\n\t\t\t\tif (!localPLayer.isDead && lobbySettings.commsSabotage && state.comsSabotaged && !localPLayer.isImpostor) {\n\t\t\t\t\tendGain = 0;\n\t\t\t\t}\n\n\t\t\t\t// Mute other players which are in a vent\n\t\t\t\tif (\n\t\t\t\t\tother.inVent &&\n\t\t\t\t\t!(lobbySettings.hearImpostorsInVents || (lobbySettings.impostersHearImpostersInvent && localPLayer.inVent))\n\t\t\t\t) {\n\t\t\t\t\tendGain = 0;\n\t\t\t\t}\n\n\t\t\t\t// if (\n\t\t\t\t// \tlobbySettings.wallsBlockAudio &&\n\t\t\t\t// \t!me.isDead &&\n\t\t\t\t// \tposeCollide({ x: me.x, y: me.y }, { x: other.x, y: other.y }, gameState.map)\n\t\t\t\t// ) {\n\t\t\t\t// \tendGain = 0;\n\t\t\t\t// }\n\n\t\t\t\tif (!localPLayer.isDead && other.isDead && localPLayer.isImpostor && lobbySettings.haunting) {\n\t\t\t\t\t// if (!element.audioElement.reverbConnected) {\n\t\t\t\t\t// \telement.audioElement.reverbConnected = true;\n\t\t\t\t\t// \tthis.applyEffect(gain, reverb, destination, other);\n\t\t\t\t\t// }\n\t\t\t\t\tendGain = 0.2;\n\t\t\t\t} else {\n\t\t\t\t\tif (other.isDead && !localPLayer.isDead) {\n\t\t\t\t\t\tendGain = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\tcase GameState.DISCUSSION:\n\t\t\t\tpanPos = [0, 0];\n\t\t\t\tendGain = 1;\n\t\t\t\t// Mute dead players for still living players\n\t\t\t\tif (!localPLayer.isDead && other.isDead) {\n\t\t\t\t\tendGain = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase GameState.UNKNOWN:\n\t\t\tdefault:\n\t\t\t\tendGain = 0;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (!other.isDead || state.gameState !== GameState.TASKS || !localPLayer.isImpostor || localPLayer.isDead) {\n\t\t\t// if (element.audioElement.reverbConnected && reverb) {\n\t\t\t// \telement.audioElement.reverbConnected = false;\n\t\t\t// \tthis.restoreEffect(gain, reverb, destination, other);\n\t\t\t// }\n\t\t}\n\n\t\tif (lobbySettings.deadOnly) {\n\t\t\tpanPos = [0, 0];\n\t\t\tif (!localPLayer.isDead || !other.isDead) {\n\t\t\t\tendGain = 0;\n\t\t\t}\n\t\t}\n\n\t\tconst isOnCamera = false;\n\t\t// Muffling in vents\n\t\tif (\n\t\t\t((localPLayer.inVent && !localPLayer.isDead) || (other.inVent && !other.isDead)) &&\n\t\t\tstate.gameState === GameState.TASKS\n\t\t) {\n\t\t\tif (!element.audioElement.muffleConnected) {\n\t\t\t\telement.audioElement.muffleConnected = true;\n\t\t\t\tthis.applyEffect(gain, muffle, destination, other);\n\t\t\t}\n\t\t\tmaxdistance = isOnCamera ? 3 : 0.8;\n\t\t\tmuffle.frequency.value = isOnCamera ? 2300 : 2000;\n\t\t\tmuffle.Q.value = isOnCamera ? -15 : 20;\n\t\t\tif (endGain === 1) {\n\t\t\t\tendGain = isOnCamera ? 0.8 : 0.5;\n\t\t\t} // Too loud at 1\n\t\t} else {\n\t\t\tif (element.audioElement.muffleConnected) {\n\t\t\t\telement.audioElement.muffleConnected = false;\n\t\t\t\tthis.restoreEffect(gain, muffle, destination, other);\n\t\t\t}\n\t\t}\n\n\t\t// Mute players if distancte between two players is too big\n\t\t// console.log({ x: other.x, y: other.y }, Math.sqrt(panPos[0] * panPos[0] + panPos[1] * panPos[1]));\n\t\t//console.log(state.currentCamera);\n\t\tif (Math.sqrt(panPos[0] * panPos[0] + panPos[1] * panPos[1]) > maxdistance) {\n\t\t\treturn 0;\n\t\t}\n\n\t\t// if (!settings.enableSpatialAudio) {\n\t\t// \tpanPos = [0, 0];\n\t\t// }\n\n\t\tif (pan.positionZ) {\n\t\t\tpan.positionZ.setValueAtTime(-0.5, audioContext.currentTime);\n\t\t\tpan.positionX.setValueAtTime(panPos[0], audioContext.currentTime);\n\t\t\tpan.positionY.setValueAtTime(panPos[1], audioContext.currentTime);\n\t\t} else {\n\t\t\tpan.setPosition(panPos[0], panPos[1], -0.5);\n\t\t}\n\t\treturn endGain;\n\t}\n\n\tdisconnect() {\n\t\tif (this.stream) {\n\t\t\tthis.stream.getTracks().forEach((track) => track.stop());\n\t\t\tthis.stream = undefined;\n\t\t}\n\t}\n\n\tdisconnectElement(socketElement: SocketElement) {\n\t\tconsole.log('disconnectElement');\n\n\t\tif (!socketElement.audioElement) {\n\t\t\tconsole.log('disconnectElement -> !socketElement.audioElement -> ', socketElement);\n\t\t\treturn;\n\t\t}\n\t\tconsole.log('disconnectElement -> !uff?');\n\t\tsocketElement?.audioElement?.muffle?.disconnect();\n\t\tsocketElement?.audioElement?.pan?.disconnect();\n\t\tsocketElement?.audioElement?.gain?.disconnect();\n\t\tsocketElement?.audioElement?.mediaStreamAudioSource?.disconnect();\n\t\tsocketElement?.audioElement?.audioContext\n\t\t\t?.close()\n\t\t\t.then(() => {})\n\t\t\t.catch(() => {});\n\n\t\tconsole.log('socketElement?.audioElement?.htmlAudioElement');\n\n\t\tif (socketElement?.audioElement?.htmlAudioElement) {\n\t\t\tconsole.log('remove_element');\n\t\t\tsocketElement?.audioElement?.htmlAudioElement.remove();\n\t\t}\n\t\tsocketElement.peer?.destroy();\n\t\tsocketElement.audioElement = undefined;\n\t\tsocketElement.peer = undefined;\n\t}\n\n\tasync requestPermissions() {\n\t\tif (!this.permissionRequested) {\n\t\t\tconst stream = await navigator.mediaDevices.getUserMedia({ video: false, audio: true });\n\t\t\tstream.getTracks().forEach((track) => {\n\t\t\t\ttrack.stop();\n\t\t\t});\n\t\t\tthis.permissionRequested = true;\n\t\t}\n\t}\n\n\tasync getDevices(output: boolean = true): Promise<IDeviceInfo[]> {\n\t\tawait this.requestPermissions();\n\t\tlet deviceId = 0;\n\t\treturn (await navigator.mediaDevices.enumerateDevices())\n\t\t\t.filter((o) => (o.kind === 'audiooutput' && output) || o.kind === 'audioinput')\n\t\t\t.sort((a, b) => b.kind.localeCompare(a.kind))\n\t\t\t.map((o) => {\n\t\t\t\tconst id = deviceId++;\n\t\t\t\treturn {\n\t\t\t\t\tid,\n\t\t\t\t\tkind: o.kind,\n\t\t\t\t\tlabel: o.label || `mic ${o.kind.charAt(5)} ${id}`,\n\t\t\t\t\tdeviceId: o.deviceId,\n\t\t\t\t};\n\t\t\t});\n\t}\n}\n"
  },
  {
    "path": "src/app/services/ConnectionController.service.ts",
    "content": "import { EventEmitter as EventEmitterO } from 'events';\nimport Peer from 'simple-peer';\nimport * as io from 'socket.io-client';\nimport { AmongUsState, GameState, Player, MobileData } from './AmongUsState';\nimport {\n\tSocketElementMap,\n\tSocketElement,\n\tClient,\n\tAudioElement,\n\tSocketClientMap,\n\tILobbySettings,\n\tDEFAULT_LOBBYSETTINGS,\n} from './smallInterfaces';\nimport { DEFAULT_ICE_CONFIG, DEFAULT_ICE_CONFIG_TURN } from './turnServers';\nimport { Injectable } from '@angular/core';\nimport AudioController from './AudioController.service';\nimport { SettingsService } from './settings.service';\n\nexport enum ConnectionState {\n\tdisconnected = 0,\n\tconnecting = 1,\n\tconencted = 2,\n\terror = 3,\n}\n\nexport enum ConnectingStage {\n\tconnectingToVoiceServer = 0,\n\tstartingMicrophone = 1,\n\tsearchingForHost = 2,\n\twaitingForHostToEnable = 3,\n\tWaitingForGameData = 4,\n\twaitingForYouToJoin = 5,\n\tparsingGameData = 6,\n\tFullyConnected = 7,\n}\n\ninterface mobileHostInfo {\n\tmobileHostInfo: {\n\t\tisHostingMobile: boolean;\n\t\tisGameHost: boolean;\n\t};\n}\n\nexport declare interface IConnectionController {\n\tcurrentGameState: AmongUsState;\n\tconnectionState: ConnectionState;\n\tconnectingStage: ConnectingStage;\n\tconnect(voiceserver: string, gamecode: string, username: string, deviceID: string, natFix: boolean);\n}\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class ConnectionController implements IConnectionController {\n\tsocketIOClient: SocketIOClient.Socket;\n\tpublic currentGameState: AmongUsState;\n\tpublic oldGameState: AmongUsState;\n\n\tsocketElements: SocketElementMap = new SocketElementMap();\n\tamongusUsername: string;\n\tcurrentGameCode: string;\n\tconnectingStage = 0;\n\tconnectionState = ConnectionState.disconnected;\n\tgamecode: string;\n\tlastPing: number = -1;\n\tlocalPLayer: Player;\n\tdeviceID: string;\n\tpublic lobbySettings: ILobbySettings = DEFAULT_LOBBYSETTINGS;\n\tnatFix: boolean = false;\n\tpublic audioController: AudioController;\n\tpublic mobileHosts: Map<string, mobileHostInfo> = new Map<string, mobileHostInfo>();\n\tprivate currentHost: string;\n\tprivate triedGameHost: boolean;\n\tprivate lastHostIndex = -1;\n\tpublic error: string | undefined;\n\tpublic events = new EventEmitterO();\n\tconstructor(private settingsService: SettingsService) {\n\t\tthis.audioController = new AudioController(this);\n\t\tthis.ConnectionCheck();\n\t}\n\n\tupdateConnectingStage(state: ConnectingStage) {\n\t\tif (this.connectingStage === state) {\n\t\t\tthis.connectingStage += 1;\n\t\t}\n\t\tthis.updateViews();\n\t}\n\n\tprivate ConnectionCheck() {\n\t\tconst recievedDataLength = Date.now() - this.lastPing;\n\t\tif (this.connectionState !== ConnectionState.disconnected && this.lastPing !== -1 && recievedDataLength > 2000) {\n\t\t\tlet index = 0;\n\t\t\tconst nextIndex = this.mobileHosts.size > this.lastHostIndex ? this.lastHostIndex + 1 : 0;\n\t\t\tthis.mobileHosts.forEach((mobiledata, from) => {\n\t\t\t\tif (mobiledata.mobileHostInfo.isGameHost || (this.triedGameHost && index++ === nextIndex)) {\n\t\t\t\t\tthis.currentHost = from;\n\t\t\t\t\tthis.lastHostIndex = this.triedGameHost ? nextIndex : -1;\n\n\t\t\t\t\tthis.socketIOClient?.emit('signal', {\n\t\t\t\t\t\tto: from,\n\t\t\t\t\t\tdata: { mobilePlayerInfo: { code: this.gamecode, askingForHost: true } },\n\t\t\t\t\t});\n\t\t\t\t\tthis.updateConnectingStage(ConnectingStage.waitingForHostToEnable);\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.triedGameHost = true;\n\t\t} else {\n\t\t\tthis.triedGameHost = false;\n\t\t}\n\t\tsetTimeout(() => this.ConnectionCheck(), 8000);\n\t}\n\tprivate getSocketElement(socketId: string): SocketElement {\n\t\tif (!this.socketElements.has(socketId)) {\n\t\t\tthis.socketElements.set(socketId, new SocketElement(socketId));\n\t\t}\n\t\treturn this.socketElements.get(socketId);\n\t}\n\n\tpublic getSocketElementByClientID(clientId: number): SocketElement | undefined {\n\t\treturn Array.from(this.socketElements.values()).find((o) => o.client?.clientId === clientId);\n\t}\n\n\tgetPlayer(clientId: number): Player {\n\t\t// cache clientid & socketid\n\t\treturn this.currentGameState.players.find((o) => o.clientId === clientId);\n\t}\n\n\tconnect(voiceserver: string, gamecode: string, username: string, deviceID: string, natFix: boolean) {\n\t\tconsole.log('Connect called??');\n\t\tthis.socketElements.clear();\n\t\tthis.lobbySettings = DEFAULT_LOBBYSETTINGS;\n\t\tthis.connectingStage = 0;\n\t\tthis.lastPing = Date.now();\n\t\tthis.lastHostIndex = -1;\n\t\tthis.connectionState = ConnectionState.connecting;\n\t\tthis.gamecode = gamecode;\n\t\tthis.amongusUsername = username;\n\t\tthis.deviceID = deviceID;\n\t\tthis.mobileHosts.clear();\n\t\tthis.natFix = natFix;\n\t\tthis.currentGameState = undefined;\n\t\tthis.oldGameState = undefined;\n\t\tthis.initialize(voiceserver);\n\t}\n\n\tdisconnect(disconnectAudio: boolean) {\n\t\tif (this.connectionState === ConnectionState.disconnected) {\n\t\t\treturn;\n\t\t}\n\t\tthis.connectionState = ConnectionState.disconnected;\n\t\tthis.gamecode = '';\n\t\tthis.amongusUsername = '';\n\t\tthis.socketIOClient?.emit('leave');\n\t\tthis.socketIOClient?.disconnect();\n\t\tthis.disconnectSockets();\n\t\tif (disconnectAudio) {\n\t\t\tthis.audioController.disconnect();\n\t\t}\n\t}\n\n\tprivate disconnectElement(element: SocketElement) {\n\t\tconsole.log('disconnectElement!!!');\n\t\tif (!element) {\n\t\t\treturn;\n\t\t}\n\t\tconsole.log('removing socket element form the list...');\n\t\tthis.socketElements.delete(element.socketId);\n\t\tthis.audioController.disconnectElement(element);\n\t}\n\n\tprivate disconnectSockets() {\n\t\tfor (const element of this.socketElements.values()) {\n\t\t\tthis.disconnectElement(element);\n\t\t}\n\t}\n\n\t// move to different controller\n\tprivate async startAudio() {\n\t\tthis.socketIOClient.on('join', async (peerId: string, client: Client) => {\n\t\t\tconsole.log('[client.join]', { peerId, client });\n\t\t\tconst elementByClient = this.getSocketElementByClientID(client.clientId);\n\t\t\tif (elementByClient) {\n\t\t\t\tthis.disconnectElement(elementByClient);\n\t\t\t}\n\t\t\tconst element = this.getSocketElement(peerId);\n\t\t\telement.client = client;\n\t\t\tthis.ensurePeerConnection(element, true);\n\t\t});\n\t}\n\n\tprivate ensurePeerConnection(element: SocketElement, initiator: boolean) {\n\t\tif (!element.peer) {\n\t\t\telement.peer = this.createPeerConnection(element.socketId, this.audioController.stream, initiator);\n\t\t}\n\t}\n\n\tprivate updateViews() {\n\t\tthis.events.emit('onChange');\n\t}\n\n\tprivate createPeerConnection(socketId: string, stream: MediaStream, initiator): Peer {\n\t\tconsole.log('[createPeerConnection1], ', { peerId: socketId });\n\t\tconst peer: Peer = new Peer({\n\t\t\tstream,\n\t\t\tinitiator, // @ts-ignore-line\n\t\t\tconfig: this.natFix ? DEFAULT_ICE_CONFIG_TURN : DEFAULT_ICE_CONFIG,\n\t\t\tobjectMode: true,\n\t\t});\n\t\tpeer.on('connect', () => {});\n\n\t\tpeer.on('stream', (recievedDtream: MediaStream) => {\n\t\t\tconsole.log('stream recieved', { recievedDtream });\n\t\t\tconst socketElement = this.getSocketElement(socketId);\n\t\t\tconst audioElement = this.audioController.createAudioElement(recievedDtream, (bool: boolean) => {\n\t\t\t\tsocketElement.talking = bool;\n\t\t\t\tthis.events.emit('player_talk', socketElement.client?.clientId ?? -1, bool);\n\t\t\t});\n\n\t\t\tsocketElement.audioElement = audioElement;\n\t\t\tconsole.log('ONSTREAM, ', socketElement, audioElement);\n\t\t});\n\n\t\tpeer.on('signal', (data) => {\n\t\t\tthis.socketIOClient.emit('signal', {\n\t\t\t\tdata,\n\t\t\t\tto: socketId,\n\t\t\t});\n\t\t});\n\n\t\tpeer.on('close', () => {\n\t\t\tconsole.log('PEER ON CLOSE?');\n\t\t\tconst socketElement = this.getSocketElement(socketId);\n\t\t\tthis.audioController.disconnectElement(socketElement);\n\t\t});\n\n\t\tpeer.on('error', (err) => {\n\t\t\tconsole.log('PEER ON error? : ', err);\n\t\t});\n\n\t\tconsole.log(peer);\n\t\tconsole.log('peerConnections', this.socketElements);\n\t\treturn peer;\n\t}\n\n\tprivate onLobbySettingsChange(settings: ILobbySettings) {\n\t\tlet changed = false;\n\n\t\tObject.keys(this.lobbySettings).forEach((field: string) => {\n\t\t\tif (field in settings) {\n\t\t\t\tif (this.lobbySettings[field] !== settings[field]) {\n\t\t\t\t\tchanged = true;\n\t\t\t\t\tthis.lobbySettings[field] = settings[field];\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tif (changed) {\n\t\t\tthis.socketElements.forEach((value) => {\n\t\t\t\tif (value.audioElement?.pan?.maxDistance) {\n\t\t\t\t\tvalue.audioElement.pan.maxDistance = this.lobbySettings.maxDistance;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate muteAll() {\n\t\tthis.socketElements.forEach((value) => {\n\t\t\tif (value?.audioElement?.gain) {\n\t\t\t\tvalue.audioElement.gain.gain.value = 0;\n\t\t\t}\n\t\t});\n\t}\n\tprivate onGameStateChange(amongUsState: AmongUsState) {\n\t\ttry {\n\t\t\t// console.log(this.socketElements);\n\t\t\tthis.oldGameState = this.currentGameState;\n\t\t\tthis.currentGameState = amongUsState;\n\t\t\tconst newLocalplayer = amongUsState.players.filter(\n\t\t\t\t(o) => o.name.replace(' ', '') === this.amongusUsername.replace(' ', '')\n\t\t\t)[0];\n\t\t\tthis.updateConnectingStage(ConnectingStage.WaitingForGameData);\n\t\t\tif (!newLocalplayer) {\n\t\t\t\tthis.muteAll(); // if localplayer not found mute all players in lobby.\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tthis.updateConnectingStage(ConnectingStage.waitingForYouToJoin);\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tthis.connectionState === ConnectionState.conencted &&\n\t\t\t\tthis.localPLayer &&\n\t\t\t\t(this.localPLayer.id !== newLocalplayer.id || this.localPLayer.clientId !== newLocalplayer.clientId)\n\t\t\t) {\n\t\t\t\tthis.socketIOClient.emit('id', newLocalplayer.id, newLocalplayer.clientId);\n\t\t\t}\n\n\t\t\tthis.localPLayer = newLocalplayer;\n\n\t\t\tif (this.connectionState === ConnectionState.connecting || this.currentGameCode !== this.gamecode) {\n\t\t\t\tthis.currentGameCode = this.gamecode;\n\t\t\t\tconsole.log(this.localPLayer);\n\t\t\t\tthis.startAudio().then(() => {\n\t\t\t\t\tthis.socketIOClient.emit('join', this.gamecode, this.localPLayer.id, this.localPLayer.clientId);\n\t\t\t\t\tthis.socketIOClient.emit('id', this.localPLayer.id, this.localPLayer.clientId);\n\t\t\t\t});\n\t\t\t\tthis.updateConnectingStage(ConnectingStage.parsingGameData);\n\t\t\t\tthis.connectionState = ConnectionState.conencted;\n\t\t\t}\n\n\t\t\tthis.socketElements.forEach((value) => {\n\t\t\t\tif (value.client?.clientId === this.localPLayer?.clientId) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvalue.updatePLayer(this);\n\t\t\t\tif (value.player) {\n\t\t\t\t\tvalue.player.isbetter = this.mobileHosts.has(value.socketId);\n\t\t\t\t}\n\t\t\t\tif (!value.settings && value.player) {\n\t\t\t\t\tvalue.settings = this.settingsService.getPlayerSettings(value.player?.nameHash);\n\t\t\t\t}\n\n\t\t\t\tif (value?.audioElement?.gain) {\n\t\t\t\t\tlet endGain = this.audioController.updateAudioLocation(this.currentGameState, value, this.localPLayer);\n\t\t\t\t\tif (value.settings && endGain > 0) {\n\t\t\t\t\t\tendGain *= value.settings.volume / 100;\n\t\t\t\t\t}\n\t\t\t\t\tvalue.audioElement.gain.gain.value = endGain;\n\t\t\t\t\tvalue.audible = endGain > 0;\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tconsole.error(\"ERROR:\", e);\n\t\t\tthis.error = e.message;\n\t\t\tthis.connectionState = ConnectionState.error;\n\t\t}\n\t}\n\n\tprivate initialize(serverUrl: string) {\n\t\tthis.socketIOClient?.disconnect();\n\t\tconsole.log('[Connect] got called');\n\t\tthis.socketIOClient = io(serverUrl, {\n\t\t\ttransports: ['websocket'],\n\t\t});\n\n\t\tthis.socketIOClient.on('error', (error: string) => {\n\t\t\tconsole.log('[client.error', error);\n\t\t});\n\t\tthis.socketIOClient.on('connect', () => {\n\t\t\tconsole.log('[client.connect]');\n\t\t\tif (this.connectionState !== ConnectionState.disconnected) {\n\t\t\t\tthis.updateConnectingStage(ConnectingStage.connectingToVoiceServer);\n\t\t\t\tthis.connectionState = ConnectionState.connecting; // resetting it to connecting since connection to voice server got reset;\n\t\t\t\tthis.audioController.startAudio().then(() => {\n\t\t\t\t\tthis.socketIOClient.emit('join', this.gamecode + '_mobile', Number(Date.now()), Number(Date.now()));\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tthis.socketIOClient.on('disconnect', () => {\n\t\t\tconsole.log('[client.disconnect]');\n\t\t});\n\n\t\tthis.socketIOClient.on('setClient', (socketId: string, client: Client) => {\n\t\t\tconsole.log('[client.setClient]', { socketId, client });\n\t\t\tconst socketElement = this.getSocketElementByClientID(client.clientId);\n\t\t\tif (socketElement && socketElement.socketId !== socketId) {\n\t\t\t\tthis.disconnectElement(socketElement);\n\t\t\t}\n\t\t\tthis.getSocketElement(socketId).client = client;\n\t\t});\n\n\t\tthis.socketIOClient.on('setClients', (clients: SocketClientMap) => {\n\t\t\tconsole.log('[client.setClients]', { clients });\n\t\t\tfor (const socketId of Object.keys(clients)) {\n\t\t\t\tconst socketElement = this.getSocketElementByClientID(clients[socketId].clientId);\n\t\t\t\tif (socketElement && socketElement.socketId !== socketId) {\n\t\t\t\t\tthis.disconnectElement(socketElement);\n\t\t\t\t} else {\n\t\t\t\t\tthis.getSocketElement(socketId).client = clients[socketId];\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tthis.socketIOClient.on('VAD', (data: { activity: boolean; client: Client; socketId: string }) => {\n\t\t\tlet socketElement = this.getSocketElementByClientID(data.client.clientId);\n\t\t\tif (socketElement) {\n\t\t\t\tsocketElement.talking = data.activity;\n\t\t\t\tthis.events.emit('player_talk', socketElement.client?.clientId ?? -1, data.activity);\n\t\t\t}\n\t\t});\n\n\t\tthis.socketIOClient.on('signal', ({ data, from }: { data: any; from: string }) => {\n\t\t\tif (data.hasOwnProperty('mobileHostInfo')) {\n\t\t\t\tconst mobiledata = data as mobileHostInfo;\n\t\t\t\tthis.mobileHosts.set(from, mobiledata);\n\t\t\t\tthis.updateConnectingStage(ConnectingStage.searchingForHost);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (data.hasOwnProperty('gameState')) {\n\t\t\t\tthis.lastPing = Date.now();\n\t\t\t\tthis.updateConnectingStage(ConnectingStage.waitingForHostToEnable);\n\t\t\t\tconst mobiledata = data as MobileData;\n\t\t\t\tthis.onLobbySettingsChange(mobiledata.lobbySettings);\n\t\t\t\tthis.onGameStateChange(mobiledata.gameState);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!this.audioController.stream) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst socketElement = this.getSocketElement(from);\n\t\t\tthis.ensurePeerConnection(socketElement, false);\n\t\t\tsocketElement.peer.signal(data);\n\t\t});\n\t}\n}\n"
  },
  {
    "path": "src/app/services/game-helper.service.ts",
    "content": "import { ChangeDetectorRef, Injectable } from '@angular/core';\nimport { ISettings, IDeviceInfo, VoiceServerOption } from './smallInterfaces';\nimport { AndroidPermissions } from '@awesome-cordova-plugins/android-permissions/ngx';import { Platform } from '@ionic/angular';\nimport { ConnectingStage, ConnectionController, ConnectionState } from './ConnectionController.service';\nimport { EventEmitter as EventEmitterO } from 'events';\nimport { BackgroundMode } from '@awesome-cordova-plugins/background-mode/ngx';\nimport { element } from 'protractor';\nimport { SettingsService } from './settings.service';\nimport { BetterCrewlinkNativeService } from 'bcl-mobile-overlay';\n\n\nexport declare interface IGameHelperService {\n}\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class GameHelperService implements IGameHelperService {\n\tmicrophones: IDeviceInfo[] = [];\n\tIsMobile: boolean = false;\n\terror: string;\n\tevents: EventEmitterO = new EventEmitterO();\n\taudioMuted = () => this.cManager.audioController.audioMuted ?? false;\n\tmicrophoneMuted = () =>\n\t\t(this.cManager.audioController.microphoneMuted || this.cManager.audioController.audioMuted) ?? false;\n\tlocalTalking = () => this.cManager?.audioController?.localTalking ?? false;\n\tconstructor(\n\t\tprivate androidPermissions: AndroidPermissions,\n\t\tpublic platform: Platform,\n\t\tpublic cManager: ConnectionController,\n\t\tprivate backgroundMode: BackgroundMode,\n\t\tprivate settings: SettingsService\n\t) {\n\t\tthis.IsMobile = true;//this.platform.is('cordova') || this.platform.is('android') || this.platform.is('mobile');\n\t\tthis.load();\n\t}\n\n\treconnect() {\n\t\tthis.cManager.disconnect(false);\n\t\tthis.cManager.connect(\n\t\t\tthis.settings.getVoiceServer(),\n\t\t\tthis.settings.get().gamecode.toUpperCase(),\n\t\t\tthis.settings.get().username,\n\t\t\tthis.settings.get().selectedMicrophone.deviceId,\n\t\t\tthis.settings.get().natFix\n\t\t);\n\t\tsetTimeout(() => {\n\t\t\tthis.updateViews();\n\t\t}, 1500);\n\t}\n\n\tconnect() {\n\t\tthis.disconnect(false);\n\n\t\tthis.requestPermissions().then((haspermissions) => {\n\t\t\tif (!haspermissions) {\n\t\t\t\tconsole.error('permissions failed');\n\t\t\t\tthis.cManager.connectionState = ConnectionState.error;\n\t\t\t\tthis.error = 'No permissions to use microphone.';\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.backgroundMode.enable();\n\t\t\tthis.cManager.connect(\n\t\t\t\tthis.settings.getVoiceServer(),\n\t\t\t\tthis.settings.get().gamecode.toUpperCase(),\n\t\t\t\tthis.settings.get().username,\n\t\t\t\tthis.settings.get().selectedMicrophone.deviceId,\n\t\t\t\tthis.settings.get().natFix\n\t\t\t);\n\t\t\tthis.showNotification();\n\t\t});\n\t\tsetTimeout(() => {\n\t\t\tthis.updateViews();\n\t\t}, 1500);\n\t}\n\n\tdisconnect(disableBackgroundMode = true) {\n\t\tif (disableBackgroundMode) {\n\t\t\tthis.backgroundMode.disable();\n\t\t\tif (this.IsMobile) {\n\t\t\t\tBetterCrewlinkNativeService.disconnect();\n\t\t\t}\n\t\t}\n\t\tthis.cManager.disconnect(true);\n\t}\n\n\tmuteMicrophone() {\n\t\tthis.cManager.audioController.changeMuteState(!this.cManager.audioController.microphoneMuted, false);\n\t\tthis.showNotification();\n\t}\n\n\tmuteAudio() {\n\t\tthis.cManager.audioController.changeMuteState(\n\t\t\tthis.cManager.audioController.microphoneMuted,\n\t\t\t!this.cManager.audioController.audioMuted\n\t\t);\n\t\tthis.showNotification();\n\t}\n\n\tasync showNotification() {\n\t\tif (!this.IsMobile) return;\n\t\tconsole.log('showNotification BCL PLUGIN');\n\t\tawait BetterCrewlinkNativeService.showNotification({\n\t\t\taudiomuted: this.audioMuted(),\n\t\t\tmicmuted: this.microphoneMuted(),\n\t\t\toverlayEnabled: this.settings.get().overlayEnabled,\n\t\t});\n\t}\n\n\tgetError(): string {\n\t\treturn this.error;\n\t}\n\n\tasync requestPermissions(): Promise<boolean> {\n\t\tif (this.platform.is('cordova') || this.platform.is('android')) {\n\t\t\tconst PERMISSIONS_NEEDED = [\n\t\t\t\t'android.permission.BLUETOOTH',\n\t\t\t\t// this.androidPermissions.PERMISSION.RECORD_AUDIO,\n\t\t\t\t// this.androidPermissions.PERMISSION.INTERNET,\n\t\t\t];\n\n\t\t\ttry {\n\t\t\t\tconst reqPermissionRespons = await this.androidPermissions.requestPermissions(PERMISSIONS_NEEDED);\n\t\t\t\tfor (const permission of PERMISSIONS_NEEDED) {\n\t\t\t\t\tconst permissionResponse = await this.androidPermissions.checkPermission(permission);\n\t\t\t\t\tif (!permissionResponse.hasPermission) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (exception) {\n\t\t\t\t//\tthis.error = 'Bluetooth audio permission denied';\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tawait this.cManager.audioController.requestPermissions();\n\t\t} catch (exception) {\n\t\t\tthis.error = 'No permission to use microphone';\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tgetConnectionStage() {\n\t\tconst test = ['LOBBY', 'TASKS', 'DISCUSSION', 'MENU', 'UNKNOWN'];\n\t\tswitch (this.cManager.connectingStage) {\n\t\t\tcase ConnectingStage.connectingToVoiceServer:\n\t\t\t\treturn 'Connecting to voice server..';\n\t\t\tcase ConnectingStage.startingMicrophone:\n\t\t\t\treturn 'Initializing audio/microphone';\n\t\t\tcase ConnectingStage.searchingForHost:\n\t\t\t\treturn `Searching for bettercrewlink PC players in lobby: ${this.cManager.gamecode}`;\n\t\t\tcase ConnectingStage.waitingForHostToEnable:\n\t\t\t\treturn 'Waiting for a PC player to respond';\n\t\t\tcase ConnectingStage.WaitingForGameData:\n\t\t\t\treturn 'Waiting to recieve gamedata from player';\n\t\t\tcase ConnectingStage.waitingForYouToJoin:\n\t\t\t\treturn `Waiting for you to join with the name ${this.cManager.amongusUsername} --> ${\n\t\t\t\t\ttest[this.cManager.oldGameState.gameState.toString()]\n\t\t\t\t}`;\n\t\t\tcase ConnectingStage.parsingGameData:\n\t\t\t\treturn 'Waiting for gamedata...';\n\t\t\tcase ConnectingStage.FullyConnected:\n\t\t\t\treturn 'Connected to the game...';\n\t\t\tdefault:\n\t\t\t\treturn `unkown state ${this.cManager.connectingStage}`;\n\t\t}\n\t}\n\n\tupdateViews() {\n\t\tthis.events.emit('onChange');\n\t}\n\n\tload() {\n\t\tconsole.log('load??');\n\n\t\tthis.cManager.events.on('onchange', () => {\n\t\t\tthis.updateViews();\n\t\t});\n\n\t\tthis.cManager.audioController.getDevices(this.IsMobile).then((devices) => {\n\t\t\tthis.microphones = devices;\n\t\t\tif (!this.microphones.some((o) => o.id === this.settings.get().selectedMicrophone?.id)) {\n\t\t\t\tthis.settings.get().selectedMicrophone = devices.filter((o) => o.kind === 'audioinput')[0] ?? {\n\t\t\t\t\tid: 0,\n\t\t\t\t\tlabel: 'default',\n\t\t\t\t\tdeviceId: 'default',\n\t\t\t\t\tkind: 'audioinput',\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tthis.settings.get().selectedMicrophone = this.microphones.find(\n\t\t\t\t\t(o) => o.id === this.settings.get().selectedMicrophone.id\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\n\t\t// this.connect();\n\n\t\twindow.addEventListener('bettercrewlink_notification', (info: any) => {\n\t\t\tconsole.log('[EVENT] bettercrewlink_notification: ', JSON.stringify(info));\n\t\t\tswitch (info.action) {\n\t\t\t\tcase 'REFRESH': {\n\t\t\t\t\tthis.reconnect();\n\t\t\t\t\tbreak; \n\t\t\t\t}\n\t\t\t\tcase 'MUTEAUDIO': {\n\t\t\t\t\tthis.muteAudio();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 'MUTEMICROPHONE': {\n\t\t\t\t\tthis.muteMicrophone();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 'DISCONNECT': {\n\t\t\t\t\tthis.disconnect(true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tconsole.log('unkown notification action: ', info);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconsole.log('Notification action done');\n\t\t});\n\t\tthis.cManager.events.on('player_talk', async (clientId: number, talking: boolean) => {\n\t\t\tif (!this.IsMobile) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetTimeout(\n\t\t\t\t() => {\n\t\t\t\t\tconst sElement = this.cManager.getSocketElementByClientID(clientId);\n\t\t\t\t\tif (sElement && sElement.player && sElement.talking === talking) {\n\t\t\t\t\t\tBetterCrewlinkNativeService.showTalking({\n\t\t\t\t\t\t\tcolor: sElement.player?.colorId,\n\t\t\t\t\t\t\ttalking,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\ttalking ? 0 : 2000\n\t\t\t);\n\t\t});\n\n\t\tthis.cManager.audioController.events.on('local_talk', async (talking: boolean) => {\n\t\t\tif (!this.IsMobile) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetTimeout(\n\t\t\t\t() => {\n\t\t\t\t\tif (talking === this.localTalking() && this.cManager.localPLayer) {\n\t\t\t\t\t\tBetterCrewlinkNativeService.showTalking({\n\t\t\t\t\t\t\tcolor: this.cManager.localPLayer.colorId,\n\t\t\t\t\t\t\ttalking,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\ttalking ? 0 : 2000\n\t\t\t);\n\t\t});\n\n\t\twindow.addEventListener('press_overlay', (info: any) => {\n\t\t\tconsole.log('[EVENT] press_overlay: ', JSON.stringify(info));\n\t\t\tif (info.action === 'MICROPHONE') {\n\t\t\t\tthis.muteMicrophone();\n\t\t\t} else if (info.action === 'AUDIO') {\n\t\t\t\tthis.muteAudio();\n\t\t\t} else if (info.action === 'REFRESH') {\n\t\t\t\tthis.reconnect();\n\t\t\t}\n\t\t});\n\t\t// LocalNotifications.on('yes').subscribe((notification) => {\n\t\t// \tthis.connect();\n\t\t// \tthis.showNotification();\n\t\t// });\n\n\t\t// LocalNotifications.on('click').subscribe((notification) => {\n\t\t// \tthis.connect();\n\t\t// \tthis.showNotification();\n\t\t// });\n\t}\n}\n"
  },
  {
    "path": "src/app/services/settings.service.ts",
    "content": "import { Injectable, OnInit } from '@angular/core';\nimport { VoiceServerOption, ISettings, PlayerSettingsMap, PlayerSetting } from './smallInterfaces';\nimport { Platform } from '@ionic/angular';\nimport { Storage } from '@ionic/storage';\n\nconst DEFAULTSETTINGS: ISettings = {\n\tgamecode: '',\n\tvoiceServerOption: VoiceServerOption.BETTERCREWLINK,\n\tcustomVoiceServer: 'https://bettercrewl.ink',\n\tusername: '',\n\tselectedMicrophone: { id: 0, label: 'default', deviceId: 'default', kind: 'audioinput' },\n\tnatFix: false,\n\tplayerSettings: new PlayerSettingsMap(),\n\toverlayEnabled: false,\n\tisMobile: false\n};\n\nconst DEFAULTPLAYERSETTING: PlayerSetting = {\n\tvolume: 100,\n};\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class SettingsService {\n\tprivate settings: ISettings | undefined = DEFAULTSETTINGS;\n\tIsMobile: boolean;\n\tloaded = false;\n\n\tconstructor(private storage: Storage, private platform: Platform) {\n\t\tthis.IsMobile = this.platform.is('cordova') || this.platform.is('capacitor');\n\t}\n\n\tget() {\n\t\tif (this.settings.isMobile !== this.IsMobile) {\n\t\t\tthis.settings.isMobile = this.IsMobile;\n\t\t}\n\t\treturn this.settings;\n\t}\n\n\tgetPlayerSettings(nameHash: number): PlayerSetting {\n\t\tif (!this.settings.playerSettings.has(nameHash)) {\n\t\t\treturn { ...DEFAULTPLAYERSETTING };\n\t\t}\n\t\treturn this.settings.playerSettings.get(nameHash);\n\t}\n\n\tsavePlayerSetting(nameHash: number, playerSetting: PlayerSetting) {\n\t\tthis.settings.playerSettings.set(nameHash, playerSetting);\n\t\tthis.save();\n\t}\n\n\tgetVoiceServer() {\n\t\tswitch (this.settings.voiceServerOption) {\n\t\t\tcase VoiceServerOption.ORIGINALCREWLINK:\n\t\t\tcase VoiceServerOption.BETTERCREWLINK:\n\t\t\t\treturn 'https://bettercrewl.ink';\n\t\t\tcase VoiceServerOption.CUSTOM:\n\t\t\t\treturn !this.IsMobile && this.settings.customVoiceServer.includes('//crewl.ink')\n\t\t\t\t\t? 'https://ubuntu1.guus.info'\n\t\t\t\t\t: this.settings.customVoiceServer;\n\t\t}\n\t}\n\n\tsave() {\n\t\tthis.storage.set('settings', this.settings);\n\t}\n\n\tasync load() {\n\t\tif (this.loaded) {\n\t\t\treturn;\n\t\t}\n\t\tthis.storage.create();\n\t\tthis.loaded = true;\n\t\tconst loadedSettings = await this.storage.get('settings');\n\t\tconsole.log('loaded settings: ', loadedSettings);\n\t\tif (loadedSettings && loadedSettings !== null) {\n\t\t\tfor (const key of Object.keys(this.settings)) {\n\t\t\t\tif (key in loadedSettings) {\n\t\t\t\t\tthis.settings[key] = loadedSettings[key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\n}\n"
  },
  {
    "path": "src/app/services/smallInterfaces.ts",
    "content": "import Peer from 'simple-peer';\nimport { Player, GameState } from './AmongUsState';\nimport { ConnectionController } from './ConnectionController.service';\n\nexport enum VoiceServerOption {\n\tORIGINALCREWLINK = 0,\n\tBETTERCREWLINK = 1,\n\tCUSTOM = 2,\n}\nexport interface PlayerSetting {\n\tvolume: number;\n}\n\nexport interface ISettings {\n\tvoiceServerOption: VoiceServerOption;\n\tcustomVoiceServer: string;\n\tusername: string;\n\tgamecode: string;\n\tselectedMicrophone: IDeviceInfo;\n\tnatFix: boolean;\n\tplayerSettings: PlayerSettingsMap;\n\toverlayEnabled: boolean;\n\tisMobile: boolean;\n}\n\nexport interface Client {\n\tplayerId: number;\n\tclientId: number;\n}\n\nexport interface SocketClientMap {\n\t[socketId: string]: Client;\n}\n\nexport interface IDeviceInfo {\n\tkind: string;\n\tlabel: string;\n\tdeviceId: string;\n\tid: number;\n}\n\nexport interface AudioElement {\n\thtmlAudioElement: HTMLAudioElement;\n\taudioContext: AudioContext;\n\tmediaStreamAudioSource: MediaStreamAudioSourceNode;\n\tgain: GainNode;\n\tpan: PannerNode;\n\tmuffle: BiquadFilterNode;\n\t// reverb: ConvolverNode;\n\tdestination: AudioNode;\n\t// reverbConnected: boolean;\n\tmuffleConnected: boolean;\n}\n\nexport interface ILobbySettings {\n\tmaxDistance: number;\n\thaunting: boolean;\n\thearImpostorsInVents: boolean;\n\timpostersHearImpostersInvent: boolean;\n\tcommsSabotage: boolean;\n\tdeadOnly: boolean;\n\tmeetingGhostOnly: boolean;\n\thearThroughCameras: boolean;\n\twallsBlockAudio: boolean;\n}\n\nexport const DEFAULT_LOBBYSETTINGS: ILobbySettings = {\n\tmaxDistance: 5.32,\n\thaunting: false,\n\thearImpostorsInVents: false,\n\timpostersHearImpostersInvent: false,\n\tcommsSabotage: false,\n\tdeadOnly: false,\n\thearThroughCameras: false,\n\twallsBlockAudio: false,\n\tmeetingGhostOnly: false,\n};\n\nexport class SocketElement {\n\tsocketId: string;\n\tpeer?: Peer;\n\tclient?: Client;\n\taudioElement?: AudioElement;\n\tplayer?: Player;\n\ttalking: boolean = false;\n\taudible: boolean = false;\n\n\tisDead: boolean;\n\tsettings: PlayerSetting | undefined;\n\tconstructor(socketId: string, peer?: Peer, client?: Client, audioElement?: AudioElement, player?: Player) {\n\t\tthis.socketId = socketId;\n\t\tthis.peer = peer;\n\t\tthis.client = client;\n\t\tthis.audioElement = audioElement;\n\t\tthis.player = player;\n\t}\n\n\tupdatePLayer(connectionController: ConnectionController) {\n\t\tthis.player = this.client ? connectionController.getPlayer(this.client?.clientId) : undefined;\n\t\tif (this.isDead && !this.player?.isDead) {\n\t\t\tthis.isDead = false;\n\t\t} else if (\n\t\t\tthis.player?.isDead &&\n\t\t\t(connectionController.localPLayer.isDead ||\n\t\t\t\tconnectionController.oldGameState?.gameState === GameState.DISCUSSION ||\n\t\t\t\tconnectionController.oldGameState.gameState === GameState.LOBBY)\n\t\t) {\n\t\t\tthis.isDead = true;\n\t\t}\n\n\t\tif (this.player && this.client && this.player.disconnected) {\n\t\t\tthis.client.clientId = -100;\n\t\t\tthis.player.clientId = -100;\n\t\t}\n\t}\n}\n\nexport class SocketElementMap extends Map<string, SocketElement> {}\n\nexport class PlayerSettingsMap extends Map<number, PlayerSetting> {}\n"
  },
  {
    "path": "src/app/services/turnServers.ts",
    "content": "\nexport const DEFAULT_ICE_CONFIG: RTCConfiguration = {\n\ticeTransportPolicy: 'all',\n\ticeServers: [\n\t\t{\n\t\t\turls: 'stun:stun.l.google.com:19302',\n\t\t},\n\t],\n};\n\n\nexport const DEFAULT_ICE_CONFIG_TURN: RTCConfiguration = {\n\ticeTransportPolicy: 'relay',\n\ticeServers: [\n\t\t{\n\t\t\turls: 'turn:turn.bettercrewl.ink:3478',\n\t\t\tusername: 'M9DRVaByiujoXeuYAAAG',\n\t\t\tcredential: 'TpHR9HQNZ8taxjb3',\n\t\t}\n\t],\n};\n\n\n"
  },
  {
    "path": "src/app/services/vad.ts",
    "content": "export interface VADOptions {\n\tfftSize: number;\n\tbufferLen: number;\n\tsmoothingTimeConstant: number;\n\tminCaptureFreq: number;\n\tmaxCaptureFreq: number;\n\tnoiseCaptureDuration: number;\n\tminNoiseLevel: number;\n\tmaxNoiseLevel: number;\n\tavgNoiseMultiplier: number;\n\tonVoiceStart: () => void;\n\tonVoiceStop: () => void;\n\tonUpdate: (val: number) => void;\n\tstereo: boolean;\n}\n\nfunction clamp(value: number, min: number, max: number): number {\n\treturn min < max ? (value < min ? min : value > max ? max : value) : value < max ? max : value > min ? min : value;\n}\n\n// https://github.com/Jam3/audio-frequency-to-index\nfunction frequencyToIndex(frequency: number, sampleRate: number, frequencyBinCount: number): number {\n\tconst nyquist = sampleRate / 2;\n\tconst index = Math.round((frequency / nyquist) * frequencyBinCount);\n\treturn clamp(index, 0, frequencyBinCount);\n}\n\n// https://github.com/Jam3/analyser-frequency-average\nfunction analyserFrequency(analyser: AnalyserNode, frequencies: Uint8Array, minHz: number, maxHz: number): number {\n\tconst sampleRate = analyser.context.sampleRate;\n\tconst binCount = analyser.frequencyBinCount;\n\tlet start = frequencyToIndex(minHz, sampleRate, binCount);\n\tconst end = frequencyToIndex(maxHz, sampleRate, binCount);\n\tconst count = end - start;\n\tlet sum = 0;\n\tfor (; start < end; start++) {\n\t\tsum += frequencies[start] / 255;\n\t}\n\treturn count === 0 ? 0 : sum / count;\n}\n\nexport default function (\n\taudioContext: AudioContext,\n\tsource: AudioNode,\n\tdestination: AudioNode | undefined,\n\topts: Partial<VADOptions>\n): {\n\tdestination: AudioNode;\n\tconnect: () => void;\n\tdestroy: () => void;\n\tinit: () => void;\n\toptions: VADOptions;\n} {\n\topts = opts || {};\n\n\tconst defaults: VADOptions = {\n\t\tfftSize: 1024,\n\t\tbufferLen: 1024,\n\t\tsmoothingTimeConstant: 0.2,\n\t\tminCaptureFreq: 85, // in Hz\n\t\tmaxCaptureFreq: 255, // in Hz\n\t\tnoiseCaptureDuration: 1000, // in ms\n\t\tminNoiseLevel: 0.15, // from 0 to 1\n\t\tmaxNoiseLevel: 0.7, // from 0 to 1\n\t\tavgNoiseMultiplier: 1.2,\n\t\tonVoiceStart: function () {\n\t\t\t/* DO NOTHING */\n\t\t},\n\t\tonVoiceStop: function () {\n\t\t\t/* DO NOTHING */\n\t\t},\n\t\tonUpdate: function () {\n\t\t\t/* DO NOTHING */\n\t\t},\n\t\tstereo: true\n\t};\n\n\tconst options: VADOptions = Object.assign({}, defaults, opts);\n\n\tlet baseLevel = 0;\n\tlet voiceScale = 1;\n\tlet activityCounter = 0;\n\tconst activityCounterMin = 0;\n\tconst activityCounterMax = 30;\n\tconst activityCounterThresh = 5;\n\n\tlet envFreqRange: number[] = [];\n\tlet isNoiseCapturing = true;\n\tlet prevVadState: boolean | undefined = undefined;\n\tlet vadState = false;\n\tlet captureTimeout: number | null = null;\n\n\t// var source = audioContext.createMediaStreamSource(stream);\n\tconst analyser = audioContext.createAnalyser();\n\tanalyser.smoothingTimeConstant = options.smoothingTimeConstant;\n\tanalyser.fftSize = options.fftSize;\n\n\tconst channels = options.stereo ? 2 : 1;\n\tconst scriptProcessorNode = audioContext.createScriptProcessor(options.bufferLen, channels, channels);\n\tconnect();\n\tscriptProcessorNode.onaudioprocess = monitor;\n\n\tif (isNoiseCapturing) {\n\t\t//console.log('VAD: start noise capturing');\n\t\tcaptureTimeout = (setTimeout(init, options.noiseCaptureDuration) as unknown) as number;\n\t}\n\n\tfunction init() {\n\t\t//console.log('VAD: stop noise capturing');\n\t\tisNoiseCapturing = false;\n\n\t\tenvFreqRange = envFreqRange\n\t\t\t.filter(function (val) {\n\t\t\t\treturn val;\n\t\t\t})\n\t\t\t.sort();\n\t\tconst averageEnvFreq = envFreqRange.length\n\t\t\t? envFreqRange.reduce(function (p, c) {\n\t\t\t\t\treturn Math.min(p, c);\n\t\t\t  }, 1)\n\t\t\t: options.minNoiseLevel || 0.1;\n\n\t\tbaseLevel = averageEnvFreq * options.avgNoiseMultiplier;\n\t\tif (options.minNoiseLevel && baseLevel < options.minNoiseLevel) baseLevel = options.minNoiseLevel;\n\t\tif (options.maxNoiseLevel && baseLevel > options.maxNoiseLevel) baseLevel = options.maxNoiseLevel;\n\n\t\tvoiceScale = 1 - baseLevel;\n\n\t//\tconsole.log('VAD: base level:', options.minNoiseLevel);\n\t}\n\n\tfunction connect() {\n\t\tsource.connect(analyser);\n\t\tanalyser.connect(scriptProcessorNode);\n\t\tif (destination) scriptProcessorNode.connect(destination);\n\t\telse scriptProcessorNode.connect(audioContext.destination);\n\t}\n\n\tfunction disconnect() {\n\t\tscriptProcessorNode.disconnect();\n\t\tanalyser.disconnect();\n\t\tsource.disconnect();\n\t\tif (destination) {\n\t\t\tdestination.disconnect();\n\t\t\tsource.connect(destination);\n\t\t}\n\t}\n\n\tfunction destroy() {\n\t\tcaptureTimeout && clearTimeout(captureTimeout);\n\t\tdisconnect();\n\t\tscriptProcessorNode.onaudioprocess = null;\n\t}\n\n\tfunction monitor(event: AudioProcessingEvent) {\n\t\tif (destination) {\n\t\t\tfor (let channel = 0; channel < event.outputBuffer.numberOfChannels; channel++) {\n\t\t\t\tconst inputData = event.inputBuffer.getChannelData(channel);\n\t\t\t\tconst outputData = event.outputBuffer.getChannelData(channel);\n\t\t\t\tfor (let sample = 0; sample < event.inputBuffer.length; sample++) {\n\t\t\t\t\t// make output equal to the same as the input\n\t\t\t\t\toutputData[sample] = inputData[sample];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tconst frequencies = new Uint8Array(analyser.frequencyBinCount);\n\t\tanalyser.getByteFrequencyData(frequencies);\n\n\t\tconst average = analyserFrequency(analyser, frequencies, options.minCaptureFreq, options.maxCaptureFreq);\n\t\tif (isNoiseCapturing) {\n\t\t\tenvFreqRange.push(average);\n\t\t\treturn;\n\t\t}\n\t\tif (average >= baseLevel && activityCounter < activityCounterMax) {\n\t\t\tactivityCounter++;\n\t\t} else if (average < baseLevel && activityCounter > activityCounterMin) {\n\t\t\tactivityCounter--;\n\t\t}\n\t\tvadState = activityCounter > activityCounterThresh;\n\n\t\tif (prevVadState !== vadState) {\n\t\t\tvadState ? onVoiceStart() : onVoiceStop();\n\t\t\tprevVadState = vadState;\n\t\t}\n\n\t\toptions.onUpdate(Math.max(0, average - baseLevel) / voiceScale);\n\t}\n\n\tfunction onVoiceStart() {\n\t\toptions.onVoiceStart();\n\t}\n\n\tfunction onVoiceStop() {\n\t\toptions.onVoiceStop();\n\t}\n\n\treturn { destination: analyser, connect, destroy, options, init };\n}\n"
  },
  {
    "path": "src/environments/environment.ts",
    "content": "// This file can be replaced during build by using the `fileReplacements` array.\n// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.\n// The list of file replacements can be found in `angular.json`.\n\nexport const environment = {\n\tproduction: false,\n};\n\n/*\n * For easier debugging in development mode, you can import the following file\n * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.\n *\n * This import should be commented out in production mode because it will have a negative impact\n * on performance if an error is thrown.\n */\n// import 'zone.js/dist/zone-error';  // Included with Angular CLI.\n"
  },
  {
    "path": "src/global.scss",
    "content": "/*\n * App Global CSS\n * ----------------------------------------------------------------------------\n * Put style rules here that you want to apply globally. These styles are for\n * the entire app and not just one component. Additionally, this file can be\n * used as an entry point to import other CSS/Sass files to be included in the\n * output CSS.\n * For more information on global stylesheets, visit the documentation:\n * https://ionicframework.com/docs/layout/global-stylesheets\n */\n\n/* Core CSS required for Ionic components to work properly */\n@import '~@ionic/angular/css/core.css';\n\n/* Basic CSS for apps built with Ionic */\n@import '~@ionic/angular/css/normalize.css';\n@import '~@ionic/angular/css/structure.css';\n@import '~@ionic/angular/css/typography.css';\n@import '~@ionic/angular/css/display.css';\n\n/* Optional CSS utils that can be commented out */\n@import '~@ionic/angular/css/padding.css';\n@import '~@ionic/angular/css/float-elements.css';\n@import '~@ionic/angular/css/text-alignment.css';\n@import '~@ionic/angular/css/text-transformation.css';\n@import '~@ionic/angular/css/flex-utils.css';\n\n:root {\n\t--ion-item-color: #ffffff;\n\t--ion-item-background: #25232a;\n\t--ion-color-primary: #1d1a23;\n\t--ion-color-primary-contrast: #ba68c8;\n\t--ion-color-secondary: #25232a;\n\t--ion-color-secondary-contrast: #ffffff;\n\t--ion-color-secondary-shade: #121114;\n\t--ion-color-secondary-tint: #464250;\n\t--ion-color-light: #dfdfdf;\n}\n.masters {\n\tbackground-color: #25232a;\n}\n\n.alert-wrapper {\n\t width: 100% !important;\n\tmax-width: 20vw !important;\n}\n\n.ion-page > ion-content\n{\n   //top: 56px;//your headers height\n\n}\n\n\n#main-content{\n     height: calc(100% - 78px);\n// overflow:visible !important;\n}\n\n#main-content .ion-page{\n\ttop:56px;\n//\theight: calc(100% - 53px);\n//\tmargin-bottom: 80px;\n}"
  },
  {
    "path": "src/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n  <meta charset=\"utf-8\"/>\n  <title>BetterCrewlink - App</title>\n\n  <base href=\"/\"/>\n\n  <meta name=\"color-scheme\" content=\"light dark\"/>\n  <meta name=\"viewport\" content=\"viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no\"/>\n  <meta name=\"format-detection\" content=\"telephone=no\"/>\n  <meta name=\"msapplication-tap-highlight\" content=\"no\"/>\n\n  <link rel=\"icon\" type=\"image/png\" href=\"assets/icon/favicon.png\"/>\t\n  <link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"assets/icons/icon-180x180.png\">\n\n  <!-- add to homescreen for ios -->\n  <meta name=\"apple-mobile-web-app-capable\" content=\"yes\"/>\n  <meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\"/>\n  <link rel=\"manifest\" href=\"manifest.webmanifest\">\n  <meta name=\"theme-color\" content=\"#1976d2\">\n</head>\n\n<body>\n  <app-root></app-root>\n  <noscript>Please enable JavaScript to continue using this application.</noscript>\n\n  <div style=\"visibility: hidden;\" id=\"AudioElements\"></div>\n</body>\n\n</html>\n"
  },
  {
    "path": "src/main.ts",
    "content": "import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n\tenableProdMode();\n}\n\nplatformBrowserDynamic()\n\t.bootstrapModule(AppModule)\n\t.catch((err) => console.log(err));\n"
  },
  {
    "path": "src/manifest.webmanifest",
    "content": "{\n\t\"name\": \"BetterCrewlink-PWA\",\n\t\"short_name\": \"BetterCrewlink-PWA\",\n\t\"theme_color\": \"#1976d2\",\n\t\"background_color\": \"#fafafa\",\n\t\"display\": \"standalone\",\n\t\"scope\": \"./\",\n\t\"start_url\": \"./\",\n\t\"icons\": [\n\t\t{\n\t\t\t\"src\": \"assets/icons/icon-192x192.png\",\n\t\t\t\"sizes\": \"192x192\",\n\t\t\t\"type\": \"image/png\"\n\t\t},\n\t\t{\n\t\t\t\"src\": \"assets/icons/icon-256x256.png\",\n\t\t\t\"sizes\": \"256x256\",\n\t\t\t\"type\": \"image/png\"\n\t\t},\n\t\t{\n\t\t\t\"src\": \"assets/icons/icon-384x384.png\",\n\t\t\t\"sizes\": \"384x384\",\n\t\t\t\"type\": \"image/png\"\n\t\t},\n\t\t{\n\t\t\t\"src\": \"assets/icons/icon-512x512.png\",\n\t\t\t\"sizes\": \"512x512\",\n\t\t\t\"type\": \"image/png\"\n\t\t}\n\t]\n}\n"
  },
  {
    "path": "src/polyfills.ts",
    "content": "/**\n * This file includes polyfills needed by Angular and is loaded before the app.\n * You can add your own extra polyfills to this file.\n *\n * This file is divided into 2 sections:\n *   1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.\n *   2. Application imports. Files imported after ZoneJS that should be loaded before your main\n *      file.\n *\n * The current setup is for so-called \"evergreen\" browsers; the last versions of browsers that\n * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),\n * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.\n *\n * Learn more in https://angular.io/guide/browser-support\n */\n\n/***************************************************************************************************\n * BROWSER POLYFILLS\n */\n\n/** IE10 and IE11 requires the following for NgClass support on SVG elements */\n// import 'classlist.js';  // Run `npm install --save classlist.js`.\n\n/**\n * Web Animations `@angular/platform-browser/animations`\n * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.\n * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).\n */\n// import 'web-animations-js';  // Run `npm install --save web-animations-js`.\n\n/**\n * By default, zone.js will patch all possible macroTask and DomEvents\n * user can disable parts of macroTask/DomEvents patch by setting following flags\n * because those flags need to be set before `zone.js` being loaded, and webpack\n * will put import in the top of bundle, so user need to create a separate file\n * in this directory (for example: zone-flags.ts), and put the following flags\n * into that file, and then add the following code before importing zone.js.\n * import './zone-flags.ts';\n *\n * The flags allowed in zone-flags.ts are listed here.\n *\n * The following flags will work for all browsers.\n *\n * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame\n * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick\n * (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames\n *\n *  in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js\n *  with the following flag, it will bypass `zone.js` patch for IE/Edge\n *\n *  (window as any).__Zone_enable_cross_context_check = true;\n *\n */\n\nimport './zone-flags';\n\n/***************************************************************************************************\n * Zone JS is required by default for Angular itself.\n */\n\nimport 'zone.js'; // Updated for Angular 17+\n\n/***************************************************************************************************\n * APPLICATION IMPORTS\n */\n\n(window as any).global = window;\n\n(window as any).process = (window as any).process || {\n\tenv: { DEBUG: undefined },\n\tnextTick() {\n\t\treturn null;\n\t},\n};\n\ndeclare global {\n\tinterface Window {\n\t\twebkitAudioContext: typeof AudioContext;\n\t}\n}\n\n// navigator.getUserMedia =\n// \tnavigator.getUserMedia ||\n// \tnavigator.webkitGetUserMedia ||\n// \tnavigator.mozGetUserMedia ||\n// \tnavigator.msGetUserMedia;\n"
  },
  {
    "path": "src/test.ts",
    "content": "// This file is required by karma.conf.js and loads recursively all the .spec and framework files\n\nimport 'zone.js/dist/zone-testing';\nimport { getTestBed } from '@angular/core/testing';\nimport { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';\n\n// First, initialize the Angular testing environment.\ngetTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());\n"
  },
  {
    "path": "src/theme/variables.scss",
    "content": "// Ionic Variables and Theming. For more info, please see:\n// http://ionicframework.com/docs/theming/\n\n/** Ionic CSS Variables **/\n:root {\n\n  /** primary **/\n  --ion-color-primary: #3880FF;\n  --ion-color-primary-rgb: 56, 128, 255;\n  --ion-color-primary-contrast: #ffffff;\n  --ion-color-primary-contrast-rgb: 255, 255, 255;\n  --ion-color-primary-shade: #3171e0;\n  --ion-color-primary-tint: #4c8dff;\n\n  /** secondary **/\n  --ion-color-secondary: #3dc2ff;\n  --ion-color-secondary-rgb: 61, 194, 255;\n  --ion-color-secondary-contrast: #ffffff;\n  --ion-color-secondary-contrast-rgb: 255, 255, 255;\n  --ion-color-secondary-shade: #36abe0;\n  --ion-color-secondary-tint: #50c8ff;\n\n  /** tertiary **/\n  --ion-color-tertiary: #5260ff;\n  --ion-color-tertiary-rgb: 82, 96, 255;\n  --ion-color-tertiary-contrast: #ffffff;\n  --ion-color-tertiary-contrast-rgb: 255, 255, 255;\n  --ion-color-tertiary-shade: #4854e0;\n  --ion-color-tertiary-tint: #6370ff;\n\n  /** success **/\n  --ion-color-success: #2dd36f;\n  --ion-color-success-rgb: 45, 211, 111;\n  --ion-color-success-contrast: #ffffff;\n  --ion-color-success-contrast-rgb: 255, 255, 255;\n  --ion-color-success-shade: #28ba62;\n  --ion-color-success-tint: #42d77d;\n\n  /** warning **/\n  --ion-color-warning: #ffc409;\n  --ion-color-warning-rgb: 255, 196, 9;\n  --ion-color-warning-contrast: #000000;\n  --ion-color-warning-contrast-rgb: 0, 0, 0;\n  --ion-color-warning-shade: #e0ac08;\n  --ion-color-warning-tint: #ffca22;\n\n  /** danger **/\n  --ion-color-danger: #eb445a;\n  --ion-color-danger-rgb: 235, 68, 90;\n  --ion-color-danger-contrast: #ffffff;\n  --ion-color-danger-contrast-rgb: 255, 255, 255;\n  --ion-color-danger-shade: #cf3c4f;\n  --ion-color-danger-tint: #ed576b;\n\n  /** dark **/\n  --ion-color-dark: #222428;\n  --ion-color-dark-rgb: 34, 36, 40;\n  --ion-color-dark-contrast: #ffffff;\n  --ion-color-dark-contrast-rgb: 255, 255, 255;\n  --ion-color-dark-shade: #1e2023;\n  --ion-color-dark-tint: #383a3e;\n\n  /** medium **/\n  --ion-color-medium: #92949c;\n  --ion-color-medium-rgb: 146, 148, 156;\n  --ion-color-medium-contrast: #ffffff;\n  --ion-color-medium-contrast-rgb: 255, 255, 255;\n  --ion-color-medium-shade: #808289;\n  --ion-color-medium-tint: #9d9fa6;\n\n  /** light **/\n  --ion-color-light: #f4f5f8;\n  --ion-color-light-rgb: 244, 245, 248;\n  --ion-color-light-contrast: #000000;\n  --ion-color-light-contrast-rgb: 0, 0, 0;\n  --ion-color-light-shade: #d7d8da;\n  --ion-color-light-tint: #f5f6f9;\n}\n\n@media (prefers-color-scheme: dark_DISABLE) {\n  /*\n   * Dark Colors\n   * -------------------------------------------\n   */\n\n  body {\n\n    --ion-color-primary: #afccff;\n    --ion-color-primary-rgb: 175, 204, 255;\n    --ion-color-primary-contrast: #000000;\n    --ion-color-primary-contrast-rgb: 0, 0, 0;\n    --ion-color-primary-shade: #9ab4e0;\n    --ion-color-primary-tint: #b7d1ff;\n\n    --ion-color-secondary: #50c8ff;\n    --ion-color-secondary-rgb: 80,200,255;\n    --ion-color-secondary-contrast: #ffffff;\n    --ion-color-secondary-contrast-rgb: 255,255,255;\n    --ion-color-secondary-shade: #46b0e0;\n    --ion-color-secondary-tint: #62ceff;\n\n    --ion-color-tertiary: #6a64ff;\n    --ion-color-tertiary-rgb: 106,100,255;\n    --ion-color-tertiary-contrast: #ffffff;\n    --ion-color-tertiary-contrast-rgb: 255,255,255;\n    --ion-color-tertiary-shade: #5d58e0;\n    --ion-color-tertiary-tint: #7974ff;\n\n    --ion-color-success: #2fdf75;\n    --ion-color-success-rgb: 47,223,117;\n    --ion-color-success-contrast: #000000;\n    --ion-color-success-contrast-rgb: 0,0,0;\n    --ion-color-success-shade: #29c467;\n    --ion-color-success-tint: #44e283;\n\n    --ion-color-warning: #ffd534;\n    --ion-color-warning-rgb: 255,213,52;\n    --ion-color-warning-contrast: #000000;\n    --ion-color-warning-contrast-rgb: 0,0,0;\n    --ion-color-warning-shade: #e0bb2e;\n    --ion-color-warning-tint: #ffd948;\n\n    --ion-color-danger: #ff4961;\n    --ion-color-danger-rgb: 255,73,97;\n    --ion-color-danger-contrast: #ffffff;\n    --ion-color-danger-contrast-rgb: 255,255,255;\n    --ion-color-danger-shade: #e04055;\n    --ion-color-danger-tint: #ff5b71;\n\n    --ion-color-dark: #f4f5f8;\n    --ion-color-dark-rgb: 244,245,248;\n    --ion-color-dark-contrast: #000000;\n    --ion-color-dark-contrast-rgb: 0,0,0;\n    --ion-color-dark-shade: #d7d8da;\n    --ion-color-dark-tint: #f5f6f9;\n\n    --ion-color-medium: #989aa2;\n    --ion-color-medium-rgb: 152,154,162;\n    --ion-color-medium-contrast: #000000;\n    --ion-color-medium-contrast-rgb: 0,0,0;\n    --ion-color-medium-shade: #86888f;\n    --ion-color-medium-tint: #a2a4ab;\n\n    --ion-color-light: #222428;\n    --ion-color-light-rgb: 34,36,40;\n    --ion-color-light-contrast: #ffffff;\n    --ion-color-light-contrast-rgb: 255,255,255;\n    --ion-color-light-shade: #1e2023;\n    --ion-color-light-tint: #383a3e;\n\n  }\n\n  /*\n   * iOS Dark Theme\n   * -------------------------------------------\n   */\n\n  .ios body {\n    --ion-background-color: #000000;\n    --ion-background-color-rgb: 0,0,0;\n\n    --ion-text-color: #ffffff;\n    --ion-text-color-rgb: 255,255,255;\n\n    --ion-color-step-50: #0d0d0d;\n    --ion-color-step-100: #1a1a1a;\n    --ion-color-step-150: #262626;\n    --ion-color-step-200: #333333;\n    --ion-color-step-250: #404040;\n    --ion-color-step-300: #4d4d4d;\n    --ion-color-step-350: #595959;\n    --ion-color-step-400: #666666;\n    --ion-color-step-450: #737373;\n    --ion-color-step-500: #808080;\n    --ion-color-step-550: #8c8c8c;\n    --ion-color-step-600: #999999;\n    --ion-color-step-650: #a6a6a6;\n    --ion-color-step-700: #b3b3b3;\n    --ion-color-step-750: #bfbfbf;\n    --ion-color-step-800: #cccccc;\n    --ion-color-step-850: #d9d9d9;\n    --ion-color-step-900: #e6e6e6;\n    --ion-color-step-950: #f2f2f2;\n\n    --ion-toolbar-background: #0d0d0d;\n\n    --ion-item-background: #000000;\n\n    --ion-card-background: #1c1c1d;\n  }\n\n\n  /*\n   * Material Design Dark Theme\n   * -------------------------------------------\n   */\n\n  .md body {\n    --ion-background-color: #121212;\n    --ion-background-color-rgb: 18,18,18;\n    --background: #121212;\n    --ion-text-color: #ffffff;\n    --ion-text-color-rgb: 255,255,255;\n\n    --ion-border-color: #222222;\n\n    --ion-color-step-50: #1e1e1e;\n    --ion-color-step-100: #2a2a2a;\n    --ion-color-step-150: #363636;\n    --ion-color-step-200: #414141;\n    --ion-color-step-250: #4d4d4d;\n    --ion-color-step-300: #595959;\n    --ion-color-step-350: #656565;\n    --ion-color-step-400: #717171;\n    --ion-color-step-450: #7d7d7d;\n    --ion-color-step-500: #898989;\n    --ion-color-step-550: #949494;\n    --ion-color-step-600: #a0a0a0;\n    --ion-color-step-650: #acacac;\n    --ion-color-step-700: #b8b8b8;\n    --ion-color-step-750: #c4c4c4;\n    --ion-color-step-800: #d0d0d0;\n    --ion-color-step-850: #dbdbdb;\n    --ion-color-step-900: #e7e7e7;\n    --ion-color-step-950: #f3f3f3;\n\n    --ion-item-background: #1e1e1e;\n\n    --ion-toolbar-background: #1f1f1f;\n\n    --ion-tab-bar-background: #1f1f1f;\n\n    --ion-card-background: #1e1e1e;\n  }\n}"
  },
  {
    "path": "src/web.config",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n    <system.webServer>\n        <rewrite>\n            <rules>\n                <rule name=\"Default\" patternSyntax=\"ExactMatch\">\n                    <match url=\"main\" />\n                    <action type=\"Rewrite\" url=\"index.html\" />\n                </rule>\n            </rules>\n        </rewrite>\n    </system.webServer>\n</configuration>\n"
  },
  {
    "path": "src/zone-flags.ts",
    "content": "/**\n * Prevents Angular change detection from\n * running with certain Web Component callbacks\n */\n(window as any).__Zone_disable_customElements = true;\n"
  },
  {
    "path": "tsconfig.app.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"files\": [\n    \"src/main.ts\",\n    \"src/polyfills.ts\"\n  ],\n  \"include\": [\n    \"src/**/*.ts\",\n    \"src/**/*.d.ts\"\n  ],\n  \"exclude\": [\n    \"src/**/*.spec.ts\"\n  ]\n}\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"baseUrl\": \"./\",\n    \"outDir\": \"./dist/out-tsc\",\n    \"sourceMap\": true,\n    \"declaration\": false,\n    \"downlevelIteration\": true,\n    \"experimentalDecorators\": true,\n    \"emitDecoratorMetadata\": true,\n    \"module\": \"esnext\",\n    \"moduleResolution\": \"node\",\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"lib\": [\n      \"es2018\",\n      \"dom\"\n    ],\n    \"useDefineForClassFields\": false\n  },\n  \"angularCompilerOptions\": {\n    \"fullTemplateTypeCheck\": true,\n    \"strictInjectionParameters\": true\n  },\n\n}"
  },
  {
    "path": "tsconfig.spec.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/spec\",\n    \"types\": [\n      \"jasmine\",\n      \"node\"\n    ]\n  },\n  \"files\": [\n    \"src/test.ts\",\n    \"src/polyfills.ts\"\n  ],\n  \"include\": [\n    \"src/**/*.spec.ts\",\n    \"src/**/*.d.ts\"\n  ]\n}"
  },
  {
    "path": "tslint.json",
    "content": "{\n\t\"extends\": \"tslint:recommended\",\n\t\"rules\": {\n\t\t\"align\": {\n\t\t\t\"options\": [\"parameters\", \"statements\"]\n\t\t},\n\t\t\"array-type\": false,\n\t\t\"arrow-return-shorthand\": true,\n\t\t\"curly\": true,\n\t\t\"deprecation\": {\n\t\t\t\"severity\": \"warning\"\n\t\t},\n\t\t\"component-class-suffix\": [true, \"Page\", \"Component\"],\n\t\t\"contextual-lifecycle\": true,\n\t\t\"directive-class-suffix\": true,\n\t\t\"directive-selector\": [true, \"attribute\", \"app\", \"camelCase\"],\n\t\t\"component-selector\": [true, \"element\", \"app\", \"kebab-case\"],\n\t\t\"eofline\": true,\n\t\t\"import-blacklist\": [true, \"rxjs/Rx\"],\n\t\t\"import-spacing\": true,\n\t\t\"indent\": {\n\t\t\t\"options\": [\"tabs\"]\n\t\t},\n\t\t\"max-classes-per-file\": false,\n\t\t\"max-line-length\": [true, 140],\n\t\t\"member-ordering\": [\n\t\t\ttrue,\n\t\t\t{\n\t\t\t\t\"order\": [\"static-field\", \"instance-field\", \"static-method\", \"instance-method\"]\n\t\t\t}\n\t\t],\n\t\t\"no-console\": [true, \"debug\", \"info\", \"time\", \"timeEnd\", \"trace\"],\n\t\t\"no-empty\": false,\n\t\t\"no-inferrable-types\": [false, \"ignore-params\"],\n\t\t\"no-non-null-assertion\": true,\n\t\t\"no-redundant-jsdoc\": true,\n\t\t\"no-switch-case-fall-through\": true,\n\t\t\"no-var-requires\": false,\n\t\t\"object-literal-key-quotes\": [true, \"as-needed\"],\n\t\t\"quotemark\": [true, \"single\"],\n\t\t\"semicolon\": {\n\t\t\t\"options\": [\"always\"]\n\t\t},\n\t\t\"space-before-function-paren\": {\n\t\t\t\"options\": {\n\t\t\t\t\"anonymous\": \"never\",\n\t\t\t\t\"asyncArrow\": \"always\",\n\t\t\t\t\"constructor\": \"never\",\n\t\t\t\t\"method\": \"never\",\n\t\t\t\t\"named\": \"never\"\n\t\t\t}\n\t\t},\n\t\t\"typedef-whitespace\": {\n\t\t\t\"options\": [\n\t\t\t\t{\n\t\t\t\t\t\"call-signature\": \"nospace\",\n\t\t\t\t\t\"index-signature\": \"nospace\",\n\t\t\t\t\t\"parameter\": \"nospace\",\n\t\t\t\t\t\"property-declaration\": \"nospace\",\n\t\t\t\t\t\"variable-declaration\": \"nospace\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"call-signature\": \"onespace\",\n\t\t\t\t\t\"index-signature\": \"onespace\",\n\t\t\t\t\t\"parameter\": \"onespace\",\n\t\t\t\t\t\"property-declaration\": \"onespace\",\n\t\t\t\t\t\"variable-declaration\": \"onespace\"\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"variable-name\": {\n\t\t\t\"options\": [\"ban-keywords\", \"check-format\", \"allow-pascal-case\"]\n\t\t},\n\t\t\"whitespace\": {\n\t\t\t\"options\": [\"check-branch\", \"check-decl\", \"check-operator\", \"check-separator\", \"check-type\", \"check-typecast\"]\n\t\t},\n\t\t\"no-conflicting-lifecycle\": true,\n\t\t\"no-host-metadata-property\": true,\n\t\t\"no-input-rename\": true,\n\t\t\"no-inputs-metadata-property\": true,\n\t\t\"no-output-native\": true,\n\t\t\"no-output-on-prefix\": true,\n\t\t\"no-output-rename\": true,\n\t\t\"no-outputs-metadata-property\": true,\n\t\t\"template-banana-in-box\": true,\n\t\t\"template-no-negated-async\": true,\n\t\t\"use-lifecycle-interface\": true,\n\t\t\"use-pipe-transform-interface\": true,\n\t\t\"object-literal-sort-keys\": false\n\t},\n\t\"rulesDirectory\": [\"codelyzer\"]\n}\n"
  }
]