commit beb9034cd4d1dfb454e5a0d851edf137d1f4811b Author: Илья Глазунов Date: Wed Jan 14 22:57:19 2026 +0300 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..91b19f6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,95 @@ +# Logs +src/data +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock +.DS_Store + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# next.js build output +.next + +# nuxt.js build output +.nuxt + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# Webpack +.webpack/ + +# Vite +.vite/ + +# Electron-Forge +out/ +.specstory +.specstory/ diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..d67f374 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +node-linker=hoisted diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..1734101 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +src/assets +node_modules diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..2ef7ebb --- /dev/null +++ b/.prettierrc @@ -0,0 +1,10 @@ +{ + "semi": true, + "tabWidth": 4, + "printWidth": 150, + "singleQuote": true, + "trailingComma": "es5", + "bracketSpacing": true, + "arrowParens": "avoid", + "endOfLine": "lf" +} diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..e7853fa --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,130 @@ +# Repo Guidelines + +This repository is a fork of [`cheating-daddy`](https://github.com/sohzm/cheating-daddy). +It provides an Electron-based real‑time assistant which captures screen and audio +for contextual AI responses. The code is JavaScript and uses Electron Forge for +packaging. + +## Getting started + +Install dependencies and run the development app: + +``` +1. npm install +2. npm start +``` + +## Style + +Run `npx prettier --write .` before committing. Prettier uses the settings in +`.prettierrc` (four-space indentation, print width 150, semicolons and single +quotes). `src/assets` and `node_modules` are ignored via `.prettierignore`. +The project does not provide linting; `npm run lint` simply prints +"No linting configured". + +## Code standards + +Development is gradually migrating toward a TypeScript/React codebase inspired by the +[transcriber](https://github.com/Gatecrashah/transcriber) project. Keep the following +rules in mind as new files are created: + +- **TypeScript strict mode** – avoid `any` and prefer explicit interfaces. +- **React components** should be functional with hooks and wrapped in error + boundaries where appropriate. +- **Secure IPC** – validate and sanitize all parameters crossing the renderer/main + boundary. +- **Non‑blocking audio** – heavy processing must stay off the UI thread. +- **Tests** – every new feature requires tests once the test suite is available. + +## Shadcn and Electron + +The interface is being rebuilt with [shadcn/ui](https://ui.shadcn.com) components. +Follow these guidelines when working on UI code: + +- **Component directory** – place generated files under `src/components/ui` and export them from that folder. +- **Add components with the CLI** – run `npx shadcn@latest add `; never hand-roll components. +- **Component pattern** – use `React.forwardRef` with the `cn()` helper for class names. +- **Path aliases** – import modules from `src` using the `@/` prefix. +- **React 19 + Compiler** – target React 19 with the new compiler when available. +- **Context isolation** – maintain Electron's context isolation pattern for IPC. +- **TypeScript strict mode** – run `npm run typecheck` before claiming work complete. +- **Tailwind theming** – rely on CSS variables and utilities in `@/utils/tailwind` for styling. +- **Testing without running** – confirm `npm run typecheck` and module resolution with `node -e "require('')"`. + +## Tests + +No automated tests yet. When a suite is added, run `npm test` before each +commit. Until then, at minimum ensure `npm install` and `npm start` work after +merging upstream changes. + +## Merging upstream PRs + +Pull requests from are commonly +cherry‑picked here. When merging: + +1. Inspect the diff and keep commit messages short (`feat:` / `fix:` etc.). +2. After merging, run the application locally to verify it still builds and + functions. + +## Strategy and Future Work + +We plan to extend this project with ideas from the +[`transcriber`](https://github.com/Gatecrashah/transcriber) project which also +uses Electron. Key goals are: + +- **Local Transcription** – integrate `whisper.cpp` to allow offline speech-to- + text. Investigate the architecture used in `transcriber/src/main` for model + validation and GPU acceleration. +- **Dual Audio Capture** – capture microphone and system audio simultaneously. + `transcriber` shows one approach using a native helper for macOS and + Electron's `getDisplayMedia` for other platforms. +- **Speaker Diarization** – explore tinydiarize for identifying speakers in mono + audio streams. +- **Voice Activity Detection** – skip silent or low‑quality segments before + sending to the AI service. +- **Improved Note Handling** – store transcriptions locally and associate them + with meeting notes, similar to `transcriber`'s note management system. +- **Testing Infrastructure** – adopt Jest and React Testing Library (if React is + introduced) to cover audio capture and transcription modules. + +### TODO + +1. Research and prototype local transcription using `whisper.cpp`. +2. Add dual‑stream audio capture logic for cross‑platform support. +3. Investigate speaker diarization options and integrate when feasible. +4. Plan a migration path toward a proper testing setup (Jest or similar). +5. Document security considerations for audio storage and processing. +6. Rebuild the entire UI using shadcn components. + +These plans are aspirational; implement them gradually while keeping the app +functional. + +## Audio processing principles + +When implementing transcription features borrow the following rules from +`transcriber`: + +- **16 kHz compatibility** – resample all audio before sending to whisper.cpp. +- **Dual‑stream architecture** – capture microphone and system audio on separate + channels. +- **Speaker diarization** – integrate tinydiarize (`--tinydiarize` flag) for mono + audio and parse `[SPEAKER_TURN]` markers to label speakers (Speaker A, B, C…). +- **Voice activity detection** – pre‑filter silent segments to improve speed. +- **Quality preservation** – keep sample fidelity and avoid blocking the UI + during heavy processing. +- **Memory efficiency** – stream large audio files instead of loading them all at + once. +- **Error recovery** – handle audio device failures gracefully. + +## Privacy by design + +- **Local processing** – transcriptions should happen locally whenever possible. +- **User control** – provide clear options for data retention and deletion. +- **Transparency** – document what is stored and where. +- **Minimal data** – only persist what is required for functionality. + +## LLM plans + +There are placeholder files for future LLM integration (e.g. Qwen models via +`llama.cpp`). Continue development after the core transcription pipeline is +stable and ensure tests cover this new functionality. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README.md b/README.md new file mode 100644 index 0000000..fd1c6bf --- /dev/null +++ b/README.md @@ -0,0 +1,60 @@ +cd (1) + +## Recall.ai - API for desktop recording + +If you’re looking for a hosted desktop recording API, consider checking out [Recall.ai](https://www.recall.ai/product/desktop-recording-sdk/?utm_source=github&utm_medium=sponsorship&utm_campaign=sohzm-cheating-daddy), an API that records Zoom, Google Meet, Microsoft Teams, in-person meetings, and more. + +This project is sponsored by Recall.ai. + +--- + +> [!NOTE] +> Use latest MacOS and Windows version, older versions have limited support + +> [!NOTE] +> During testing it wont answer if you ask something, you need to simulate interviewer asking question, which it will answer + +A real-time AI assistant that provides contextual help during video calls, interviews, presentations, and meetings using screen capture and audio analysis. + +## Features + +- **Live AI Assistance**: Real-time help powered by Google Gemini 2.0 Flash Live +- **Screen & Audio Capture**: Analyzes what you see and hear for contextual responses +- **Multiple Profiles**: Interview, Sales Call, Business Meeting, Presentation, Negotiation +- **Transparent Overlay**: Always-on-top window that can be positioned anywhere +- **Click-through Mode**: Make window transparent to clicks when needed +- **Cross-platform**: Works on macOS, Windows, and Linux (kinda, dont use, just for testing rn) + +## Setup + +1. **Get a Gemini API Key**: Visit [Google AI Studio](https://aistudio.google.com/apikey) +2. **Install Dependencies**: `npm install` +3. **Run the App**: `npm start` + +## Usage + +1. Enter your Gemini API key in the main window +2. Choose your profile and language in settings +3. Click "Start Session" to begin +4. Position the window using keyboard shortcuts +5. The AI will provide real-time assistance based on your screen and what interview asks + +## Keyboard Shortcuts + +- **Window Movement**: `Ctrl/Cmd + Arrow Keys` - Move window +- **Click-through**: `Ctrl/Cmd + M` - Toggle mouse events +- **Close/Back**: `Ctrl/Cmd + \` - Close window or go back +- **Send Message**: `Enter` - Send text to AI + +## Audio Capture + +- **macOS**: [SystemAudioDump](https://github.com/Mohammed-Yasin-Mulla/Sound) for system audio +- **Windows**: Loopback audio capture +- **Linux**: Microphone input + +## Requirements + +- Electron-compatible OS (macOS, Windows, Linux) +- Gemini API key +- Screen recording permissions +- Microphone/audio permissions diff --git a/entitlements.plist b/entitlements.plist new file mode 100644 index 0000000..61b197a --- /dev/null +++ b/entitlements.plist @@ -0,0 +1,22 @@ + + + + + com.apple.security.cs.allow-jit + + com.apple.security.cs.allow-unsigned-executable-memory + + com.apple.security.cs.debugger + + com.apple.security.cs.disable-library-validation + + com.apple.security.device.audio-input + + com.apple.security.device.microphone + + com.apple.security.network.client + + com.apple.security.network.server + + + \ No newline at end of file diff --git a/forge.config.js b/forge.config.js new file mode 100644 index 0000000..f76082f --- /dev/null +++ b/forge.config.js @@ -0,0 +1,76 @@ +const { FusesPlugin } = require('@electron-forge/plugin-fuses'); +const { FuseV1Options, FuseVersion } = require('@electron/fuses'); + +module.exports = { + packagerConfig: { + asar: true, + extraResource: ['./src/assets/SystemAudioDump'], + name: 'Cheating Daddy', + icon: 'src/assets/logo', + // use `security find-identity -v -p codesigning` to find your identity + // for macos signing + // also fuck apple + // osxSign: { + // identity: '', + // optionsForFile: (filePath) => { + // return { + // entitlements: 'entitlements.plist', + // }; + // }, + // }, + // notarize if off cuz i ran this for 6 hours and it still didnt finish + // osxNotarize: { + // appleId: 'your apple id', + // appleIdPassword: 'app specific password', + // teamId: 'your team id', + // }, + }, + rebuildConfig: {}, + makers: [ + { + name: '@electron-forge/maker-squirrel', + config: { + name: 'cheating-daddy', + productName: 'Cheating Daddy', + shortcutName: 'Cheating Daddy', + createDesktopShortcut: true, + createStartMenuShortcut: true, + }, + }, + { + name: '@electron-forge/maker-dmg', + platforms: ['darwin'], + }, + { + name: '@reforged/maker-appimage', + platforms: ['linux'], + config: { + options: { + name: 'Cheating Daddy', + productName: 'Cheating Daddy', + genericName: 'AI Assistant', + description: 'AI assistant for interviews and learning', + categories: ['Development', 'Education'], + icon: 'src/assets/logo.png' + } + }, + }, + ], + plugins: [ + { + name: '@electron-forge/plugin-auto-unpack-natives', + config: {}, + }, + // Fuses are used to enable/disable various Electron functionality + // at package time, before code signing the application + new FusesPlugin({ + version: FuseVersion.V1, + [FuseV1Options.RunAsNode]: false, + [FuseV1Options.EnableCookieEncryption]: true, + [FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false, + [FuseV1Options.EnableNodeCliInspectArguments]: false, + [FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true, + [FuseV1Options.OnlyLoadAppFromAsar]: true, + }), + ], +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..62920af --- /dev/null +++ b/package.json @@ -0,0 +1,45 @@ +{ + "name": "cheating-daddy", + "productName": "cheating-daddy", + "version": "0.5.0", + "description": "cheating daddy", + "main": "src/index.js", + "scripts": { + "start": "electron-forge start", + "package": "electron-forge package", + "make": "electron-forge make", + "publish": "electron-forge publish", + "lint": "echo \"No linting configured\"" + }, + "keywords": [ + "cheating daddy", + "cheating daddy ai", + "cheating daddy ai assistant", + "cheating daddy ai assistant for interviews", + "cheating daddy ai assistant for interviews" + ], + "author": { + "name": "sohzm", + "email": "sohambharambe9@gmail.com" + }, + "license": "GPL-3.0", + "dependencies": { + "@google/genai": "^1.35.0", + "electron-squirrel-startup": "^1.0.1", + "openai": "^6.16.0", + "ws": "^8.18.0" + }, + "devDependencies": { + "@electron-forge/cli": "^7.11.1", + "@electron-forge/maker-deb": "^7.11.1", + "@electron-forge/maker-dmg": "^7.11.1", + "@electron-forge/maker-rpm": "^7.11.1", + "@electron-forge/maker-squirrel": "^7.11.1", + "@electron-forge/maker-zip": "^7.11.1", + "@electron-forge/plugin-auto-unpack-natives": "^7.11.1", + "@electron-forge/plugin-fuses": "^7.11.1", + "@electron/fuses": "^2.0.0", + "@reforged/maker-appimage": "^5.1.1", + "electron": "^39.2.7" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..90f36d4 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,4717 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + '@google/genai': + specifier: ^1.35.0 + version: 1.35.0 + electron-squirrel-startup: + specifier: ^1.0.1 + version: 1.0.1 + openai: + specifier: ^6.16.0 + version: 6.16.0(ws@8.19.0) + ws: + specifier: ^8.18.0 + version: 8.19.0 + devDependencies: + '@electron-forge/cli': + specifier: ^7.11.1 + version: 7.11.1(encoding@0.1.13) + '@electron-forge/maker-deb': + specifier: ^7.11.1 + version: 7.11.1 + '@electron-forge/maker-dmg': + specifier: ^7.11.1 + version: 7.11.1 + '@electron-forge/maker-rpm': + specifier: ^7.11.1 + version: 7.11.1 + '@electron-forge/maker-squirrel': + specifier: ^7.11.1 + version: 7.11.1 + '@electron-forge/maker-zip': + specifier: ^7.11.1 + version: 7.11.1 + '@electron-forge/plugin-auto-unpack-natives': + specifier: ^7.11.1 + version: 7.11.1 + '@electron-forge/plugin-fuses': + specifier: ^7.11.1 + version: 7.11.1(@electron/fuses@2.0.0) + '@electron/fuses': + specifier: ^2.0.0 + version: 2.0.0 + '@reforged/maker-appimage': + specifier: ^5.1.1 + version: 5.1.1 + electron: + specifier: ^39.2.7 + version: 39.2.7 + +packages: + + '@electron-forge/cli@7.11.1': + resolution: {integrity: sha512-pk8AoLsr7t7LBAt0cFD06XFA6uxtPdvtLx06xeal7O9o7GHGCbj29WGwFoJ8Br/ENM0Ho868S3PrAn1PtBXt5g==} + engines: {node: '>= 16.4.0'} + hasBin: true + + '@electron-forge/core-utils@7.11.1': + resolution: {integrity: sha512-9UxRWVsfcziBsbAA2MS0Oz4yYovQCO2BhnGIfsbKNTBtMc/RcVSxAS0NMyymce44i43p1ZC/FqWhnt1XqYw3bQ==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/core@7.11.1': + resolution: {integrity: sha512-YtuPLzggPKPabFAD2rOZFE0s7f4KaUTpGRduhSMbZUqpqD1TIPyfoDBpYiZvao3Ht8pyZeOJjbzcC0LpFs9gIQ==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/maker-base@7.11.1': + resolution: {integrity: sha512-yhZrCGoN6bDeiB5DHFaueZ1h84AReElEj+f0hl2Ph4UbZnO0cnLpbx+Bs+XfMLAiA+beC8muB5UDK5ysfuT9BQ==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/maker-deb@7.11.1': + resolution: {integrity: sha512-QTYiryQLYPDkq6pIfBmx0GQ6D8QatUkowH7rTlW5MnCUa0uumX0Xu7yGIjesuwW37fxT3Lv4xi+FSXMCm2eC1w==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/maker-dmg@7.11.1': + resolution: {integrity: sha512-7zs5/Ewz1PcOl4N1102stFgBiFGWxU18+UPFUSd/fgf9MErBl4HBWuVNMIHyeJ/56rdfkcmTxTqE+9TBEYrZcg==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/maker-rpm@7.11.1': + resolution: {integrity: sha512-iEfJPRQQyaTqk2EbUfZgulChNWvxGXeYUH0xBX/r5cj1pL4vcJXt3jLMQBVn3mk/0Ytv9UWRs8R/XuNWX6sf2w==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/maker-squirrel@7.11.1': + resolution: {integrity: sha512-oSg7fgad6l+X0DjtRkSpMzB0AjzyDO4mb2gzM4kTodkP1ADeiMi08bxy0ZeCESqLm5+fG72cAPmEr3BAPvI1yw==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/maker-zip@7.11.1': + resolution: {integrity: sha512-30rcp0AbJLfkFBX2hmO14LKXx7z9V61LffTVbTCFMh5vUB2kZvcA5xAhsBk2oUJWfGVxe1DuSEU0rDR9bUMHUg==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/plugin-auto-unpack-natives@7.11.1': + resolution: {integrity: sha512-5uRM3WNv7jIeDt8pLP3V4U2puWHPGJ/3qRuSE47RKgTp5qxpZidWHSYcEJJxjoqOL/7KFwSqKSQ/a36GoZV4Fg==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/plugin-base@7.11.1': + resolution: {integrity: sha512-lKpSOV1GA3FoYiD9k05i6v4KaQVmojnRgCr7d6VL1bFp13QOtXSaAWhFI9mtSY7rGElOacX6Zt7P7rPoB8T9eQ==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/plugin-fuses@7.11.1': + resolution: {integrity: sha512-Td517mHf+RjQAayFDM2kKb7NaGdRXrZfPbc7KOHlGbXthp5YTkFu2cCZGWokiqt1y1wsFaAodULhqBIg7vbbbw==} + engines: {node: '>= 16.4.0'} + peerDependencies: + '@electron/fuses': ^1.0.0 + + '@electron-forge/publisher-base@7.11.1': + resolution: {integrity: sha512-rXE9oMFGMtdQrixnumWYH5TTGsp99iPHZb3jI74YWq518ctCh6DlIgWlhf6ok2X0+lhWovcIb45KJucUFAQ13w==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/shared-types@7.11.1': + resolution: {integrity: sha512-vvBWdAEh53UJlDGUevpaJk1+sqDMQibfrbHR+0IPA4MPyQex7/Uhv3vYH9oGHujBVAChQahjAuJt0fG6IJBLZg==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/template-base@7.11.1': + resolution: {integrity: sha512-XpTaEf+EfQw+0BlSAtSpZKYIKYvKu4raNzSGHZZoSYHp+HDC7R+MlpFQmSJiGdYQzQ14C+uxO42tVjgM0DMbpw==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/template-vite-typescript@7.11.1': + resolution: {integrity: sha512-Us4AHXFb+4z+gXgZImSqMBS63oKnsQWLOhqRg321xiDzu2UcQPlwgWNb4rAEKNVC1e7LXrUNDHuBiTrQkvWXbg==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/template-vite@7.11.1': + resolution: {integrity: sha512-Or8Lxf4awoeUZoMTKJEw5KQDIhqOFs24WhVka3yZXxc6VgVWN79KmYKYM6uM/YMQttmafhsBhY2t1Lxo1WR/ug==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/template-webpack-typescript@7.11.1': + resolution: {integrity: sha512-6ExfFnFkHBz8rvRFTFg5HVGTC12uJpbVk4q8DVg0R8rhhxhqiVNh8lF2UPtZ2yT2UtGWjXNVlyP3Y3T6q6E3GQ==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/template-webpack@7.11.1': + resolution: {integrity: sha512-15lbXxi+er461MPk6sbwAOyjofAHwmQjTvxNCiNpaU2naEwbj3t0SlLq/BMr5HxnVOaMmA7+lKV9afkIom+d4Q==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/tracer@7.11.1': + resolution: {integrity: sha512-tiB6cglVQFcSw9N8GRwVwZUeB9u0DOx2Mj7aFXBUsFLUYQapvVGv51tUSy/UAW5lvmubGscYIILuVko+II3+NA==} + engines: {node: '>= 14.17.5'} + + '@electron/asar@3.4.1': + resolution: {integrity: sha512-i4/rNPRS84t0vSRa2HorerGRXWyF4vThfHesw0dmcWHp+cspK743UanA0suA5Q5y8kzY2y6YKrvbIUn69BCAiA==} + engines: {node: '>=10.12.0'} + hasBin: true + + '@electron/fuses@2.0.0': + resolution: {integrity: sha512-lyb1zK3YHeWUjaz7yiK0GnxSPduwASKMyiDbCtbn3spP6EEt+UWtktggWehG0icFrXAk3GwvcJ4nCrJO0N9IhQ==} + engines: {node: '>=22.12.0'} + hasBin: true + + '@electron/get@2.0.3': + resolution: {integrity: sha512-Qkzpg2s9GnVV2I2BjRksUi43U5e6+zaQMcjoJy0C+C5oxaKl+fmckGDQFtRpZpZV0NQekuZZ+tGz7EA9TVnQtQ==} + engines: {node: '>=12'} + + '@electron/get@3.1.0': + resolution: {integrity: sha512-F+nKc0xW+kVbBRhFzaMgPy3KwmuNTYX1fx6+FxxoSnNgwYX6LD7AKBTWkU0MQ6IBoe7dz069CNkR673sPAgkCQ==} + engines: {node: '>=14'} + + '@electron/node-gyp@https://codeload.github.com/electron/node-gyp/tar.gz/06b29aafb7708acef8b3669835c8a7857ebc92d2': + resolution: {tarball: https://codeload.github.com/electron/node-gyp/tar.gz/06b29aafb7708acef8b3669835c8a7857ebc92d2} + version: 10.2.0-electron.1 + engines: {node: '>=12.13.0'} + hasBin: true + + '@electron/notarize@2.5.0': + resolution: {integrity: sha512-jNT8nwH1f9X5GEITXaQ8IF/KdskvIkOFfB2CvwumsveVidzpSc+mvhhTMdAGSYF3O+Nq49lJ7y+ssODRXu06+A==} + engines: {node: '>= 10.0.0'} + + '@electron/osx-sign@1.3.3': + resolution: {integrity: sha512-KZ8mhXvWv2rIEgMbWZ4y33bDHyUKMXnx4M0sTyPNK/vcB81ImdeY9Ggdqy0SWbMDgmbqyQ+phgejh6V3R2QuSg==} + engines: {node: '>=12.0.0'} + hasBin: true + + '@electron/packager@18.4.4': + resolution: {integrity: sha512-fTUCmgL25WXTcFpM1M72VmFP8w3E4d+KNzWxmTDRpvwkfn/S206MAtM2cy0GF78KS9AwASMOUmlOIzCHeNxcGQ==} + engines: {node: '>= 16.13.0'} + hasBin: true + + '@electron/rebuild@3.7.2': + resolution: {integrity: sha512-19/KbIR/DAxbsCkiaGMXIdPnMCJLkcf8AvGnduJtWBs/CBwiAjY1apCqOLVxrXg+rtXFCngbXhBanWjxLUt1Mg==} + engines: {node: '>=12.13.0'} + hasBin: true + + '@electron/universal@2.0.3': + resolution: {integrity: sha512-Wn9sPYIVFRFl5HmwMJkARCCf7rqK/EurkfQ/rJZ14mHP3iYTjZSIOSVonEAnhWeAXwtw7zOekGRlc6yTtZ0t+g==} + engines: {node: '>=16.4'} + + '@electron/windows-sign@1.2.2': + resolution: {integrity: sha512-dfZeox66AvdPtb2lD8OsIIQh12Tp0GNCRUDfBHIKGpbmopZto2/A8nSpYYLoedPIHpqkeblZ/k8OV0Gy7PYuyQ==} + engines: {node: '>=14.14'} + hasBin: true + + '@gar/promisify@1.1.3': + resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==} + + '@google/genai@1.35.0': + resolution: {integrity: sha512-ZC1d0PSM5eS73BpbVIgL3ZsmXeMKLVJurxzww1Z9axy3B2eUB3ioEytbQt4Qu0Od6qPluKrTDew9pSi9kEuPaw==} + engines: {node: '>=20.0.0'} + peerDependencies: + '@modelcontextprotocol/sdk': ^1.24.0 + peerDependenciesMeta: + '@modelcontextprotocol/sdk': + optional: true + + '@inquirer/checkbox@3.0.1': + resolution: {integrity: sha512-0hm2nrToWUdD6/UHnel/UKGdk1//ke5zGUpHIvk5ZWmaKezlGxZkOJXNSWsdxO/rEqTkbB3lNC2J6nBElV2aAQ==} + engines: {node: '>=18'} + + '@inquirer/confirm@4.0.1': + resolution: {integrity: sha512-46yL28o2NJ9doViqOy0VDcoTzng7rAb6yPQKU7VDLqkmbCaH4JqK4yk4XqlzNWy9PVC5pG1ZUXPBQv+VqnYs2w==} + engines: {node: '>=18'} + + '@inquirer/core@9.2.1': + resolution: {integrity: sha512-F2VBt7W/mwqEU4bL0RnHNZmC/OxzNx9cOYxHqnXX3MP6ruYvZUZAW9imgN9+h/uBT/oP8Gh888J2OZSbjSeWcg==} + engines: {node: '>=18'} + + '@inquirer/editor@3.0.1': + resolution: {integrity: sha512-VA96GPFaSOVudjKFraokEEmUQg/Lub6OXvbIEZU1SDCmBzRkHGhxoFAVaF30nyiB4m5cEbDgiI2QRacXZ2hw9Q==} + engines: {node: '>=18'} + + '@inquirer/expand@3.0.1': + resolution: {integrity: sha512-ToG8d6RIbnVpbdPdiN7BCxZGiHOTomOX94C2FaT5KOHupV40tKEDozp12res6cMIfRKrXLJyexAZhWVHgbALSQ==} + engines: {node: '>=18'} + + '@inquirer/figures@1.0.15': + resolution: {integrity: sha512-t2IEY+unGHOzAaVM5Xx6DEWKeXlDDcNPeDyUpsRc6CUhBfU3VQOEl+Vssh7VNp1dR8MdUJBWhuObjXCsVpjN5g==} + engines: {node: '>=18'} + + '@inquirer/input@3.0.1': + resolution: {integrity: sha512-BDuPBmpvi8eMCxqC5iacloWqv+5tQSJlUafYWUe31ow1BVXjW2a5qe3dh4X/Z25Wp22RwvcaLCc2siHobEOfzg==} + engines: {node: '>=18'} + + '@inquirer/number@2.0.1': + resolution: {integrity: sha512-QpR8jPhRjSmlr/mD2cw3IR8HRO7lSVOnqUvQa8scv1Lsr3xoAMMworcYW3J13z3ppjBFBD2ef1Ci6AE5Qn8goQ==} + engines: {node: '>=18'} + + '@inquirer/password@3.0.1': + resolution: {integrity: sha512-haoeEPUisD1NeE2IanLOiFr4wcTXGWrBOyAyPZi1FfLJuXOzNmxCJPgUrGYKVh+Y8hfGJenIfz5Wb/DkE9KkMQ==} + engines: {node: '>=18'} + + '@inquirer/prompts@6.0.1': + resolution: {integrity: sha512-yl43JD/86CIj3Mz5mvvLJqAOfIup7ncxfJ0Btnl0/v5TouVUyeEdcpknfgc+yMevS/48oH9WAkkw93m7otLb/A==} + engines: {node: '>=18'} + + '@inquirer/rawlist@3.0.1': + resolution: {integrity: sha512-VgRtFIwZInUzTiPLSfDXK5jLrnpkuSOh1ctfaoygKAdPqjcjKYmGh6sCY1pb0aGnCGsmhUxoqLDUAU0ud+lGXQ==} + engines: {node: '>=18'} + + '@inquirer/search@2.0.1': + resolution: {integrity: sha512-r5hBKZk3g5MkIzLVoSgE4evypGqtOannnB3PKTG9NRZxyFRKcfzrdxXXPcoJQsxJPzvdSU2Rn7pB7lw0GCmGAg==} + engines: {node: '>=18'} + + '@inquirer/select@3.0.1': + resolution: {integrity: sha512-lUDGUxPhdWMkN/fHy1Lk7pF3nK1fh/gqeyWXmctefhxLYxlDsc7vsPBEpxrfVGDsVdyYJsiJoD4bJ1b623cV1Q==} + engines: {node: '>=18'} + + '@inquirer/type@1.5.5': + resolution: {integrity: sha512-MzICLu4yS7V8AA61sANROZ9vT1H3ooca5dSmI1FjZkzq7o/koMsRfQSzRtFo+F3Ao4Sf1C0bpLKejpKB/+j6MA==} + engines: {node: '>=18'} + + '@inquirer/type@2.0.0': + resolution: {integrity: sha512-XvJRx+2KR3YXyYtPUUy+qd9i7p+GO9Ko6VIIpWlBrpWwXDv8WLFeHTxz35CfQFUiBMLXlGHhGzys7lqit9gWag==} + engines: {node: '>=18'} + + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@jridgewell/gen-mapping@0.3.13': + resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/source-map@0.3.11': + resolution: {integrity: sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==} + + '@jridgewell/sourcemap-codec@1.5.5': + resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} + + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + + '@listr2/prompt-adapter-inquirer@2.0.22': + resolution: {integrity: sha512-hV36ZoY+xKL6pYOt1nPNnkciFkn89KZwqLhAFzJvYysAvL5uBQdiADZx/8bIDXIukzzwG0QlPYolgMzQUtKgpQ==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@inquirer/prompts': '>= 3 < 8' + + '@malept/cross-spawn-promise@1.1.1': + resolution: {integrity: sha512-RTBGWL5FWQcg9orDOCcp4LvItNzUPcyEU9bwaeJX0rJ1IQxzucC48Y0/sQLp/g6t99IQgAlGIaesJS+gTn7tVQ==} + engines: {node: '>= 10'} + + '@malept/cross-spawn-promise@2.0.0': + resolution: {integrity: sha512-1DpKU0Z5ThltBwjNySMC14g0CkbyhCaz9FkhxqNsZI6uAPJXFS8cMXlBKo26FJ8ZuW6S9GCMcR9IO5k2X5/9Fg==} + engines: {node: '>= 12.13.0'} + + '@nodelib/fs.scandir@2.1.5': + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + + '@nodelib/fs.stat@2.0.5': + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + + '@nodelib/fs.walk@1.2.8': + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + + '@npmcli/fs@2.1.2': + resolution: {integrity: sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + + '@npmcli/move-file@2.0.1': + resolution: {integrity: sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + deprecated: This functionality has been moved to @npmcli/fs + + '@pkgjs/parseargs@0.11.0': + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + + '@reforged/maker-appimage@5.1.1': + resolution: {integrity: sha512-KjuMp2UXY2Tca/82J+ocWfNFCULBgBPJugDFn/qOgMfT9rPwmvTMjjJpc4AgtTWIpYJ2eytYbGdi1HLx/pvGQg==} + engines: {node: '>=19.0.0 || ^18.11.0'} + + '@reforged/maker-types@2.0.0': + resolution: {integrity: sha512-Vc8xblKLfo+CP7CE/5Yshtyo6NwBkE4ZW00boCI50yePHG2wN04w1qrFlSxAmuau70J3alMhUrByeMrddlxAyw==} + + '@sindresorhus/is@4.6.0': + resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} + engines: {node: '>=10'} + + '@spacingbat3/lss@1.2.0': + resolution: {integrity: sha512-aywhxHNb6l7COooF3m439eT/6QN8E/RSl5IVboSKthMHcp0GlZYMSoS7546rqDLmFRxTD8f1tu/NIS9vtDwYAg==} + + '@szmarczak/http-timer@4.0.6': + resolution: {integrity: sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==} + engines: {node: '>=10'} + + '@tootallnate/once@2.0.0': + resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} + engines: {node: '>= 10'} + + '@types/appdmg@0.5.5': + resolution: {integrity: sha512-G+n6DgZTZFOteITE30LnWj+HRVIGr7wMlAiLWOO02uJFWVEitaPU9JVXm9wJokkgshBawb2O1OykdcsmkkZfgg==} + + '@types/cacheable-request@6.0.3': + resolution: {integrity: sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==} + + '@types/eslint-scope@3.7.7': + resolution: {integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==} + + '@types/eslint@9.6.1': + resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==} + + '@types/estree@1.0.8': + resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} + + '@types/fs-extra@9.0.13': + resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} + + '@types/http-cache-semantics@4.0.4': + resolution: {integrity: sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==} + + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + + '@types/keyv@3.1.4': + resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} + + '@types/mute-stream@0.0.4': + resolution: {integrity: sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow==} + + '@types/node@22.19.6': + resolution: {integrity: sha512-qm+G8HuG6hOHQigsi7VGuLjUVu6TtBo/F05zvX04Mw2uCg9Dv0Qxy3Qw7j41SidlTcl5D/5yg0SEZqOB+EqZnQ==} + + '@types/node@25.0.8': + resolution: {integrity: sha512-powIePYMmC3ibL0UJ2i2s0WIbq6cg6UyVFQxSCpaPxxzAaziRfimGivjdF943sSGV6RADVbk0Nvlm5P/FB44Zg==} + + '@types/responselike@1.0.3': + resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==} + + '@types/wrap-ansi@3.0.0': + resolution: {integrity: sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==} + + '@types/yauzl@2.10.3': + resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} + + '@vscode/sudo-prompt@9.3.2': + resolution: {integrity: sha512-gcXoCN00METUNFeQOFJ+C9xUI0DKB+0EGMVg7wbVYRHBw2Eq3fKisDZOkRdOz3kqXRKOENMfShPOmypw1/8nOw==} + + '@webassemblyjs/ast@1.14.1': + resolution: {integrity: sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==} + + '@webassemblyjs/floating-point-hex-parser@1.13.2': + resolution: {integrity: sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==} + + '@webassemblyjs/helper-api-error@1.13.2': + resolution: {integrity: sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==} + + '@webassemblyjs/helper-buffer@1.14.1': + resolution: {integrity: sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==} + + '@webassemblyjs/helper-numbers@1.13.2': + resolution: {integrity: sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==} + + '@webassemblyjs/helper-wasm-bytecode@1.13.2': + resolution: {integrity: sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==} + + '@webassemblyjs/helper-wasm-section@1.14.1': + resolution: {integrity: sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==} + + '@webassemblyjs/ieee754@1.13.2': + resolution: {integrity: sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==} + + '@webassemblyjs/leb128@1.13.2': + resolution: {integrity: sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==} + + '@webassemblyjs/utf8@1.13.2': + resolution: {integrity: sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==} + + '@webassemblyjs/wasm-edit@1.14.1': + resolution: {integrity: sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==} + + '@webassemblyjs/wasm-gen@1.14.1': + resolution: {integrity: sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==} + + '@webassemblyjs/wasm-opt@1.14.1': + resolution: {integrity: sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==} + + '@webassemblyjs/wasm-parser@1.14.1': + resolution: {integrity: sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==} + + '@webassemblyjs/wast-printer@1.14.1': + resolution: {integrity: sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==} + + '@xmldom/xmldom@0.8.11': + resolution: {integrity: sha512-cQzWCtO6C8TQiYl1ruKNn2U6Ao4o4WBBcbL61yJl84x+j5sOWWFU9X7DpND8XZG3daDppSsigMdfAIl2upQBRw==} + engines: {node: '>=10.0.0'} + + '@xtuc/ieee754@1.2.0': + resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} + + '@xtuc/long@4.2.2': + resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==} + + abbrev@1.1.1: + resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} + + acorn-import-phases@1.0.4: + resolution: {integrity: sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ==} + engines: {node: '>=10.13.0'} + peerDependencies: + acorn: ^8.14.0 + + acorn@8.15.0: + resolution: {integrity: sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==} + engines: {node: '>=0.4.0'} + hasBin: true + + agent-base@6.0.2: + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} + + agent-base@7.1.4: + resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==} + engines: {node: '>= 14'} + + agentkeepalive@4.6.0: + resolution: {integrity: sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==} + engines: {node: '>= 8.0.0'} + + aggregate-error@3.1.0: + resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} + engines: {node: '>=8'} + + ajv-formats@2.1.1: + resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + + ajv-keywords@5.1.0: + resolution: {integrity: sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==} + peerDependencies: + ajv: ^8.8.2 + + ajv@8.17.1: + resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} + + ansi-escapes@4.3.2: + resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} + engines: {node: '>=8'} + + ansi-escapes@5.0.0: + resolution: {integrity: sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA==} + engines: {node: '>=12'} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.2.2: + resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==} + engines: {node: '>=12'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ansi-styles@6.2.3: + resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} + engines: {node: '>=12'} + + appdmg@0.6.6: + resolution: {integrity: sha512-GRmFKlCG+PWbcYF4LUNonTYmy0GjguDy6Jh9WP8mpd0T6j80XIJyXBiWlD0U+MLNhqV9Nhx49Gl9GpVToulpLg==} + engines: {node: '>=8.5'} + os: [darwin] + hasBin: true + + async@1.5.2: + resolution: {integrity: sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==} + + at-least-node@1.0.0: + resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==} + engines: {node: '>= 4.0.0'} + + author-regex@1.0.0: + resolution: {integrity: sha512-KbWgR8wOYRAPekEmMXrYYdc7BRyhn2Ftk7KWfMUnQ43hFdojWEFRxhhRUm3/OFEdPa1r0KAvTTg9YQK57xTe0g==} + engines: {node: '>=0.8'} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + base32-encode@1.2.0: + resolution: {integrity: sha512-cHFU8XeRyx0GgmoWi5qHMCVRiqU6J3MHWxVgun7jggCBUpVzm1Ir7M9dYr2whjSNc3tFeXfQ/oZjQu/4u55h9A==} + + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + + baseline-browser-mapping@2.9.14: + resolution: {integrity: sha512-B0xUquLkiGLgHhpPBqvl7GWegWBUNuujQ6kXd/r1U38ElPT6Ok8KZ8e+FpUGEc2ZoRQUzq/aUnaKFc/svWUGSg==} + hasBin: true + + bignumber.js@9.3.1: + resolution: {integrity: sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==} + + bl@4.1.0: + resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + + bluebird@3.7.2: + resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==} + + boolean@3.2.0: + resolution: {integrity: sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. + + bplist-creator@0.0.8: + resolution: {integrity: sha512-Za9JKzD6fjLC16oX2wsXfc+qBEhJBJB1YPInoAQpMLhDuj5aVOv1baGeIQSq1Fr3OCqzvsoQcSBSwGId/Ja2PA==} + + brace-expansion@1.1.12: + resolution: {integrity: sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==} + + brace-expansion@2.0.2: + resolution: {integrity: sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==} + + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + + browserslist@4.28.1: + resolution: {integrity: sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + + buffer-crc32@0.2.13: + resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} + + buffer-equal-constant-time@1.0.1: + resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} + + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + + buffer@5.7.1: + resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + + cacache@16.1.3: + resolution: {integrity: sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + + cacheable-lookup@5.0.4: + resolution: {integrity: sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==} + engines: {node: '>=10.6.0'} + + cacheable-request@7.0.4: + resolution: {integrity: sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==} + engines: {node: '>=8'} + + caniuse-lite@1.0.30001764: + resolution: {integrity: sha512-9JGuzl2M+vPL+pz70gtMF9sHdMFbY9FJaQBi186cHKH3pSzDvzoUJUPV6fqiKIMyXbud9ZLg4F3Yza1vJ1+93g==} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + chardet@0.7.0: + resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + + chownr@2.0.0: + resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} + engines: {node: '>=10'} + + chrome-trace-event@1.0.4: + resolution: {integrity: sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==} + engines: {node: '>=6.0'} + + clean-stack@2.2.0: + resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} + engines: {node: '>=6'} + + cli-cursor@3.1.0: + resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} + engines: {node: '>=8'} + + cli-cursor@4.0.0: + resolution: {integrity: sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + cli-spinners@2.9.2: + resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} + engines: {node: '>=6'} + + cli-truncate@3.1.0: + resolution: {integrity: sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + cli-width@4.1.0: + resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} + engines: {node: '>= 12'} + + cliui@7.0.4: + resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + clone-response@1.0.3: + resolution: {integrity: sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==} + + clone@1.0.4: + resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} + engines: {node: '>=0.8'} + + color-convert@0.5.3: + resolution: {integrity: sha512-RwBeO/B/vZR3dfKL1ye/vx8MHZ40ugzpyfeVG5GsiuGnrlMWe2o8wxBbLCpw9CsxV+wHuzYlCiWnybrIA0ling==} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + colorette@2.0.20: + resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} + + commander@11.1.0: + resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==} + engines: {node: '>=16'} + + commander@2.20.3: + resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + + commander@5.1.0: + resolution: {integrity: sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==} + engines: {node: '>= 6'} + + commander@9.5.0: + resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==} + engines: {node: ^12.20.0 || >=14} + + compare-version@0.1.2: + resolution: {integrity: sha512-pJDh5/4wrEnXX/VWRZvruAGHkzKdr46z11OlTPN+VrATlWWhSKewNCJ1futCO5C7eJB3nPMFZA1LeYtcFboZ2A==} + engines: {node: '>=0.10.0'} + + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + + cross-dirname@0.1.0: + resolution: {integrity: sha512-+R08/oI0nl3vfPcqftZRpytksBXDzOUveBq/NBVx0sUp1axwzPQrKinNx5yd5sxPu8j1wIy8AfnVQ+5eFdha6Q==} + + cross-spawn@6.0.6: + resolution: {integrity: sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==} + engines: {node: '>=4.8'} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + cross-zip@4.0.1: + resolution: {integrity: sha512-n63i0lZ0rvQ6FXiGQ+/JFCKAUyPFhLQYJIqKaa+tSJtfKeULF/IDNDAbdnSIxgS4NTuw2b0+lj8LzfITuq+ZxQ==} + engines: {node: '>=12.10'} + + data-uri-to-buffer@4.0.1: + resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} + engines: {node: '>= 12'} + + debug@2.6.9: + resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decompress-response@6.0.0: + resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} + engines: {node: '>=10'} + + defaults@1.0.4: + resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + + defer-to-connect@2.0.1: + resolution: {integrity: sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==} + engines: {node: '>=10'} + + define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + + define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} + engines: {node: '>= 0.4'} + + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} + + detect-node@2.1.0: + resolution: {integrity: sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==} + + dir-compare@4.2.0: + resolution: {integrity: sha512-2xMCmOoMrdQIPHdsTawECdNPwlVFB9zGcz3kuhmBO6U3oU+UQjsue0i8ayLKpgBcm+hcXPMVSGUN9d+pvJ6+VQ==} + + ds-store@0.1.6: + resolution: {integrity: sha512-kY21M6Lz+76OS3bnCzjdsJSF7LBpLYGCVfavW8TgQD2XkcqIZ86W0y9qUDZu6fp7SIZzqosMDW2zi7zVFfv4hw==} + + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + + ecdsa-sig-formatter@1.0.11: + resolution: {integrity: sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==} + + electron-installer-common@0.10.4: + resolution: {integrity: sha512-8gMNPXfAqUE5CfXg8RL0vXpLE9HAaPkgLXVoHE3BMUzogMWenf4LmwQ27BdCUrEhkjrKl+igs2IHJibclR3z3Q==} + engines: {node: '>= 10.0.0'} + + electron-installer-debian@3.2.0: + resolution: {integrity: sha512-58ZrlJ1HQY80VucsEIG9tQ//HrTlG6sfofA3nRGr6TmkX661uJyu4cMPPh6kXW+aHdq/7+q25KyQhDrXvRL7jw==} + engines: {node: '>= 10.0.0'} + os: [darwin, linux] + hasBin: true + + electron-installer-dmg@5.0.1: + resolution: {integrity: sha512-qOa1aAQdX57C+vzhDk3549dd/PRlNL4F8y736MTD1a43qptD+PvHY97Bo9gSf+OZ8iUWE7BrYSpk/FgLUe40EA==} + engines: {node: '>= 16'} + hasBin: true + + electron-installer-redhat@3.4.0: + resolution: {integrity: sha512-gEISr3U32Sgtj+fjxUAlSDo3wyGGq6OBx7rF5UdpIgbnpUvMN4W5uYb0ThpnAZ42VEJh/3aODQXHbFS4f5J3Iw==} + engines: {node: '>= 10.0.0'} + os: [darwin, linux] + hasBin: true + + electron-squirrel-startup@1.0.1: + resolution: {integrity: sha512-sTfFIHGku+7PsHLJ7v0dRcZNkALrV+YEozINTW8X1nM//e5O3L+rfYuvSW00lmGHnYmUjARZulD8F2V8ISI9RA==} + + electron-to-chromium@1.5.267: + resolution: {integrity: sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==} + + electron-winstaller@5.4.0: + resolution: {integrity: sha512-bO3y10YikuUwUuDUQRM4KfwNkKhnpVO7IPdbsrejwN9/AABJzzTQ4GeHwyzNSrVO+tEH3/Np255a3sVZpZDjvg==} + engines: {node: '>=8.0.0'} + + electron@39.2.7: + resolution: {integrity: sha512-KU0uFS6LSTh4aOIC3miolcbizOFP7N1M46VTYVfqIgFiuA2ilfNaOHLDS9tCMvwwHRowAsvqBrh9NgMXcTOHCQ==} + engines: {node: '>= 12.20.55'} + hasBin: true + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + + encode-utf8@1.0.3: + resolution: {integrity: sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw==} + + encoding@0.1.13: + resolution: {integrity: sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==} + + end-of-stream@1.4.5: + resolution: {integrity: sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==} + + enhanced-resolve@5.18.4: + resolution: {integrity: sha512-LgQMM4WXU3QI+SYgEc2liRgznaD5ojbmY3sb8LxyguVkIg5FxdpTkvk72te2R38/TGKxH634oLxXRGY6d7AP+Q==} + engines: {node: '>=10.13.0'} + + env-paths@2.2.1: + resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} + engines: {node: '>=6'} + + err-code@2.0.3: + resolution: {integrity: sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==} + + error-ex@1.3.4: + resolution: {integrity: sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==} + + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + es-module-lexer@2.0.0: + resolution: {integrity: sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw==} + + es6-error@4.1.1: + resolution: {integrity: sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==} + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + eslint-scope@5.1.1: + resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} + engines: {node: '>=8.0.0'} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@4.3.0: + resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + + eventemitter3@5.0.1: + resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} + + events@3.3.0: + resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} + engines: {node: '>=0.8.x'} + + execa@1.0.0: + resolution: {integrity: sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==} + engines: {node: '>=6'} + + exponential-backoff@3.1.3: + resolution: {integrity: sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA==} + + extend@3.0.2: + resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} + + external-editor@3.1.0: + resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} + engines: {node: '>=4'} + + extract-zip@2.0.1: + resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==} + engines: {node: '>= 10.17.0'} + hasBin: true + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-glob@3.3.3: + resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} + engines: {node: '>=8.6.0'} + + fast-uri@3.1.0: + resolution: {integrity: sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==} + + fastq@1.20.1: + resolution: {integrity: sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==} + + fd-slicer@1.1.0: + resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} + + fetch-blob@3.2.0: + resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} + engines: {node: ^12.20 || >= 14.13} + + filename-reserved-regex@2.0.0: + resolution: {integrity: sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ==} + engines: {node: '>=4'} + + filenamify@4.3.0: + resolution: {integrity: sha512-hcFKyUG57yWGAzu1CMt/dPzYZuv+jAJUT85bL8mrXvNe6hWj6yEHEc4EdcgiA6Z3oi1/9wXJdZPXF2dZNgwgOg==} + engines: {node: '>=8'} + + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + + find-up@2.1.0: + resolution: {integrity: sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==} + engines: {node: '>=4'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flora-colossus@2.0.0: + resolution: {integrity: sha512-dz4HxH6pOvbUzZpZ/yXhafjbR2I8cenK5xL0KtBFb7U2ADsR+OwXifnxZjij/pZWF775uSCMzWVd+jDik2H2IA==} + engines: {node: '>= 12'} + + fmix@0.1.0: + resolution: {integrity: sha512-Y6hyofImk9JdzU8k5INtTXX1cu8LDlePWDFU5sftm9H+zKCr5SGrVjdhkvsim646cw5zD0nADj8oHyXMZmCZ9w==} + + foreground-child@3.3.1: + resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} + engines: {node: '>=14'} + + formdata-polyfill@4.0.10: + resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} + engines: {node: '>=12.20.0'} + + fs-extra@10.1.0: + resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} + engines: {node: '>=12'} + + fs-extra@11.3.3: + resolution: {integrity: sha512-VWSRii4t0AFm6ixFFmLLx1t7wS1gh+ckoa84aOeapGum0h+EZd1EhEumSB+ZdDLnEPuucsVB9oB7cxJHap6Afg==} + engines: {node: '>=14.14'} + + fs-extra@7.0.1: + resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} + engines: {node: '>=6 <7 || >=8'} + + fs-extra@8.1.0: + resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} + engines: {node: '>=6 <7 || >=8'} + + fs-extra@9.1.0: + resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==} + engines: {node: '>=10'} + + fs-minipass@2.1.0: + resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} + engines: {node: '>= 8'} + + fs-temp@1.2.1: + resolution: {integrity: sha512-okTwLB7/Qsq82G6iN5zZJFsOfZtx2/pqrA7Hk/9fvy+c+eJS9CvgGXT2uNxwnI14BDY9L/jQPkaBgSvlKfSW9w==} + + fs-xattr@0.3.1: + resolution: {integrity: sha512-UVqkrEW0GfDabw4C3HOrFlxKfx0eeigfRne69FxSBdHIP8Qt5Sq6Pu3RM9KmMlkygtC4pPKkj5CiPO5USnj2GA==} + engines: {node: '>=8.6.0'} + os: ['!win32'] + + fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + galactus@1.0.0: + resolution: {integrity: sha512-R1fam6D4CyKQGNlvJne4dkNF+PvUUl7TAJInvTGa9fti9qAv95quQz29GXapA4d8Ec266mJJxFVh82M4GIIGDQ==} + engines: {node: '>= 12'} + + gar@1.0.4: + resolution: {integrity: sha512-w4n9cPWyP7aHxKxYHFQMegj7WIAsL/YX/C4Bs5Rr8s1H9M1rNtRWRsw+ovYMkXDQ5S4ZbYHsHAPmevPjPgw44w==} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. + + gaxios@7.1.3: + resolution: {integrity: sha512-YGGyuEdVIjqxkxVH1pUTMY/XtmmsApXrCVv5EU25iX6inEPbV+VakJfLealkBtJN69AQmh1eGOdCl9Sm1UP6XQ==} + engines: {node: '>=18'} + + gcp-metadata@8.1.2: + resolution: {integrity: sha512-zV/5HKTfCeKWnxG0Dmrw51hEWFGfcF2xiXqcA3+J90WDuP0SvoiSO5ORvcBsifmx/FoIjgQN3oNOGaQ5PhLFkg==} + engines: {node: '>=18'} + + generate-function@2.3.1: + resolution: {integrity: sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==} + + generate-object-property@1.2.0: + resolution: {integrity: sha512-TuOwZWgJ2VAMEGJvAyPWvpqxSANF0LDpmyHauMjFYzaACvn+QTT/AZomvPCzVBV7yDN3OmwHQ5OvHaeLKre3JQ==} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + get-folder-size@2.0.1: + resolution: {integrity: sha512-+CEb+GDCM7tkOS2wdMKTn9vU7DgnKUTuDlehkNJKNSovdCOVxs14OfKCk4cvSaR3za4gj+OBdl9opPN9xrJ0zA==} + hasBin: true + + get-package-info@1.0.0: + resolution: {integrity: sha512-SCbprXGAPdIhKAXiG+Mk6yeoFH61JlYunqdFQFHDtLjJlDjFf6x07dsS8acO+xWt52jpdVo49AlVDnUVK1sDNw==} + engines: {node: '>= 4.0'} + + get-stream@4.1.0: + resolution: {integrity: sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==} + engines: {node: '>=6'} + + get-stream@5.2.0: + resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} + engines: {node: '>=8'} + + glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + + glob-to-regexp@0.4.1: + resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} + + glob@10.5.0: + resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==} + hasBin: true + + glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported + + glob@8.1.0: + resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} + engines: {node: '>=12'} + deprecated: Glob versions prior to v9 are no longer supported + + global-agent@3.0.0: + resolution: {integrity: sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==} + engines: {node: '>=10.0'} + + global-dirs@3.0.1: + resolution: {integrity: sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==} + engines: {node: '>=10'} + + globalthis@1.0.4: + resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} + engines: {node: '>= 0.4'} + + google-auth-library@10.5.0: + resolution: {integrity: sha512-7ABviyMOlX5hIVD60YOfHw4/CxOfBhyduaYB+wbFWCWoni4N7SLcV46hrVRktuBbZjFC9ONyqamZITN7q3n32w==} + engines: {node: '>=18'} + + google-logging-utils@1.1.3: + resolution: {integrity: sha512-eAmLkjDjAFCVXg7A1unxHsLf961m6y17QFqXqAXGj/gVkKFrEICfStRfwUlGNfeCEjNRa32JEWOUTlYXPyyKvA==} + engines: {node: '>=14'} + + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + + got@11.8.6: + resolution: {integrity: sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==} + engines: {node: '>=10.19.0'} + + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + gtoken@8.0.0: + resolution: {integrity: sha512-+CqsMbHPiSTdtSO14O51eMNlrp9N79gmeqmXeouJOhfucAedHw9noVe/n5uJk3tbKE6a+6ZCQg3RPhVhHByAIw==} + engines: {node: '>=18'} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + + hosted-git-info@2.8.9: + resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} + + http-cache-semantics@4.2.0: + resolution: {integrity: sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==} + + http-proxy-agent@5.0.0: + resolution: {integrity: sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==} + engines: {node: '>= 6'} + + http2-wrapper@1.0.3: + resolution: {integrity: sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==} + engines: {node: '>=10.19.0'} + + https-proxy-agent@5.0.1: + resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} + engines: {node: '>= 6'} + + https-proxy-agent@7.0.6: + resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} + engines: {node: '>= 14'} + + humanize-ms@1.2.1: + resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} + + iconv-lite@0.4.24: + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} + + iconv-lite@0.6.3: + resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} + engines: {node: '>=0.10.0'} + + ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + + image-size@0.7.5: + resolution: {integrity: sha512-Hiyv+mXHfFEP7LzUL/llg9RwFxxY+o9N3JVLIeG5E7iFIFAalxvRU9UZthBdYDEVnzHMgjnKJPPpay5BWf1g9g==} + engines: {node: '>=6.9.0'} + hasBin: true + + imul@1.0.1: + resolution: {integrity: sha512-WFAgfwPLAjU66EKt6vRdTlKj4nAgIDQzh29JonLa4Bqtl6D8JrIMvWjCnx7xEjVNmP3U0fM5o8ZObk7d0f62bA==} + engines: {node: '>=0.10.0'} + + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + + indent-string@4.0.0: + resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} + engines: {node: '>=8'} + + infer-owner@1.0.4: + resolution: {integrity: sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==} + + inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + ini@2.0.0: + resolution: {integrity: sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==} + engines: {node: '>=10'} + + interpret@3.1.1: + resolution: {integrity: sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==} + engines: {node: '>=10.13.0'} + + ip-address@10.1.0: + resolution: {integrity: sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==} + engines: {node: '>= 12'} + + is-arrayish@0.2.1: + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + + is-core-module@2.16.1: + resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} + engines: {node: '>= 0.4'} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-fullwidth-code-point@4.0.0: + resolution: {integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==} + engines: {node: '>=12'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-interactive@1.0.0: + resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} + engines: {node: '>=8'} + + is-lambda@1.0.1: + resolution: {integrity: sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==} + + is-my-ip-valid@1.0.1: + resolution: {integrity: sha512-jxc8cBcOWbNK2i2aTkCZP6i7wkHF1bqKFrwEHuN5Jtg5BSaZHUZQ/JTOJwoV41YvHnOaRyWWh72T/KvfNz9DJg==} + + is-my-json-valid@2.20.6: + resolution: {integrity: sha512-1JQwulVNjx8UqkPE/bqDaxtH4PXCe/2VRh/y3p99heOV87HG4Id5/VfDswd+YiAfHcRTfDlWgISycnHuhZq1aw==} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + is-property@1.0.2: + resolution: {integrity: sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==} + + is-stream@1.1.0: + resolution: {integrity: sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==} + engines: {node: '>=0.10.0'} + + is-unicode-supported@0.1.0: + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} + + isbinaryfile@4.0.10: + resolution: {integrity: sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==} + engines: {node: '>= 8.0.0'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + + jest-worker@27.5.1: + resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} + engines: {node: '>= 10.13.0'} + + jiti@2.6.1: + resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} + hasBin: true + + json-bigint@1.0.0: + resolution: {integrity: sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==} + + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-parse-even-better-errors@2.3.1: + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + + json-stringify-safe@5.0.1: + resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} + + jsonfile@4.0.0: + resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + + jsonfile@6.2.0: + resolution: {integrity: sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==} + + jsonpointer@5.0.1: + resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==} + engines: {node: '>=0.10.0'} + + junk@3.1.0: + resolution: {integrity: sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ==} + engines: {node: '>=8'} + + jwa@2.0.1: + resolution: {integrity: sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==} + + jws@4.0.1: + resolution: {integrity: sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==} + + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + + listr2@7.0.2: + resolution: {integrity: sha512-rJysbR9GKIalhTbVL2tYbF2hVyDnrf7pFUZBwjPaMIdadYHmeT+EVi/Bu3qd7ETQPahTotg2WRCatXwRBW554g==} + engines: {node: '>=16.0.0'} + + load-json-file@2.0.0: + resolution: {integrity: sha512-3p6ZOGNbiX4CdvEd1VcE6yi78UrGNpjHO33noGwHCnT/o2fyllJDepsm8+mFFv/DvtwFHht5HIHSyOy5a+ChVQ==} + engines: {node: '>=4'} + + loader-runner@4.3.1: + resolution: {integrity: sha512-IWqP2SCPhyVFTBtRcgMHdzlf9ul25NwaFx4wCEH/KjAXuuHY4yNjvPXsBokp8jCB936PyWRaPKUNh8NvylLp2Q==} + engines: {node: '>=6.11.5'} + + locate-path@2.0.0: + resolution: {integrity: sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==} + engines: {node: '>=4'} + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + lodash.get@4.4.2: + resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} + deprecated: This package is deprecated. Use the optional chaining (?.) operator instead. + + lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + + log-symbols@4.1.0: + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} + + log-update@5.0.1: + resolution: {integrity: sha512-5UtUDQ/6edw4ofyljDNcOVJQ4c7OjDro4h3y8e1GQL5iYElYclVHJ3zeWchylvMaKnDbDilC8irOVyexnA/Slw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + lowercase-keys@2.0.0: + resolution: {integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==} + engines: {node: '>=8'} + + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + + lru-cache@7.18.3: + resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} + engines: {node: '>=12'} + + macos-alias@0.2.12: + resolution: {integrity: sha512-yiLHa7cfJcGRFq4FrR4tMlpNHb4Vy4mWnpajlSSIFM5k4Lv8/7BbbDLzCAVogWNl0LlLhizRp1drXv0hK9h0Yw==} + os: [darwin] + + make-fetch-happen@10.2.1: + resolution: {integrity: sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + + map-age-cleaner@0.1.3: + resolution: {integrity: sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==} + engines: {node: '>=6'} + + matcher@3.0.0: + resolution: {integrity: sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==} + engines: {node: '>=10'} + + mem@4.3.0: + resolution: {integrity: sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==} + engines: {node: '>=6'} + + merge-stream@2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + + merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + + mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + + mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + + mimic-fn@2.1.0: + resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} + engines: {node: '>=6'} + + mimic-response@1.0.1: + resolution: {integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==} + engines: {node: '>=4'} + + mimic-response@3.1.0: + resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} + engines: {node: '>=10'} + + minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + + minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} + + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + + minipass-collect@1.0.2: + resolution: {integrity: sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==} + engines: {node: '>= 8'} + + minipass-fetch@2.1.2: + resolution: {integrity: sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + + minipass-flush@1.0.5: + resolution: {integrity: sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==} + engines: {node: '>= 8'} + + minipass-pipeline@1.2.4: + resolution: {integrity: sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==} + engines: {node: '>=8'} + + minipass-sized@1.0.3: + resolution: {integrity: sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==} + engines: {node: '>=8'} + + minipass@3.3.6: + resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} + engines: {node: '>=8'} + + minipass@5.0.0: + resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} + engines: {node: '>=8'} + + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + + minizlib@2.1.2: + resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} + engines: {node: '>= 8'} + + mkdirp@0.5.6: + resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} + hasBin: true + + mkdirp@1.0.4: + resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} + engines: {node: '>=10'} + hasBin: true + + ms@2.0.0: + resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + murmur-32@0.2.0: + resolution: {integrity: sha512-ZkcWZudylwF+ir3Ld1n7gL6bI2mQAzXvSobPwVtu8aYi2sbXeipeSkdcanRLzIofLcM5F53lGaKm2dk7orBi7Q==} + + mute-stream@1.0.0: + resolution: {integrity: sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + + nan@2.24.0: + resolution: {integrity: sha512-Vpf9qnVW1RaDkoNKFUvfxqAbtI8ncb8OJlqZ9wwpXzWPEsvsB1nvdUi6oYrHIkQ1Y/tMDnr1h4nczS0VB9Xykg==} + + negotiator@0.6.4: + resolution: {integrity: sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==} + engines: {node: '>= 0.6'} + + neo-async@2.6.2: + resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + + nice-try@1.0.5: + resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} + + node-abi@3.85.0: + resolution: {integrity: sha512-zsFhmbkAzwhTft6nd3VxcG0cvJsT70rL+BIGHWVq5fi6MwGrHwzqKaxXE+Hl2GmnGItnDKPPkO5/LQqjVkIdFg==} + engines: {node: '>=10'} + + node-api-version@0.2.1: + resolution: {integrity: sha512-2xP/IGGMmmSQpI1+O/k72jF/ykvZ89JeuKX3TLJAYPDVLUalrshrLHkeVcCCZqG/eEa635cr8IBYzgnDvM2O8Q==} + + node-domexception@1.0.0: + resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} + engines: {node: '>=10.5.0'} + deprecated: Use your platform's native DOMException instead + + node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + + node-fetch@3.3.2: + resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + node-releases@2.0.27: + resolution: {integrity: sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==} + + nopt@6.0.0: + resolution: {integrity: sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + hasBin: true + + normalize-package-data@2.5.0: + resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} + + normalize-url@6.1.0: + resolution: {integrity: sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==} + engines: {node: '>=10'} + + npm-run-path@2.0.2: + resolution: {integrity: sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==} + engines: {node: '>=4'} + + object-keys@1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + onetime@5.1.2: + resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} + engines: {node: '>=6'} + + openai@6.16.0: + resolution: {integrity: sha512-fZ1uBqjFUjXzbGc35fFtYKEOxd20kd9fDpFeqWtsOZWiubY8CZ1NAlXHW3iathaFvqmNtCWMIsosCuyeI7Joxg==} + hasBin: true + peerDependencies: + ws: ^8.18.0 + zod: ^3.25 || ^4.0 + peerDependenciesMeta: + ws: + optional: true + zod: + optional: true + + ora@5.4.1: + resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} + engines: {node: '>=10'} + + os-tmpdir@1.0.2: + resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} + engines: {node: '>=0.10.0'} + + p-cancelable@2.1.1: + resolution: {integrity: sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==} + engines: {node: '>=8'} + + p-defer@1.0.0: + resolution: {integrity: sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==} + engines: {node: '>=4'} + + p-finally@1.0.0: + resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} + engines: {node: '>=4'} + + p-is-promise@2.1.0: + resolution: {integrity: sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==} + engines: {node: '>=6'} + + p-limit@1.3.0: + resolution: {integrity: sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==} + engines: {node: '>=4'} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@2.0.0: + resolution: {integrity: sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==} + engines: {node: '>=4'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + p-map@4.0.0: + resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} + engines: {node: '>=10'} + + p-try@1.0.0: + resolution: {integrity: sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==} + engines: {node: '>=4'} + + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + + parse-author@2.0.0: + resolution: {integrity: sha512-yx5DfvkN8JsHL2xk2Os9oTia467qnvRgey4ahSm2X8epehBLx/gWLcy5KI+Y36ful5DzGbCS6RazqZGgy1gHNw==} + engines: {node: '>=0.10.0'} + + parse-color@1.0.0: + resolution: {integrity: sha512-fuDHYgFHJGbpGMgw9skY/bj3HL/Jrn4l/5rSspy00DoT4RyLnDcRvPxdZ+r6OFwIsgAuhDh4I09tAId4mI12bw==} + + parse-json@2.2.0: + resolution: {integrity: sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==} + engines: {node: '>=0.10.0'} + + path-exists@3.0.0: + resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} + engines: {node: '>=4'} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + + path-key@2.0.1: + resolution: {integrity: sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==} + engines: {node: '>=4'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + + path-scurry@1.11.1: + resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} + engines: {node: '>=16 || 14 >=14.18'} + + path-type@2.0.0: + resolution: {integrity: sha512-dUnb5dXUf+kzhC/W/F4e5/SkluXIFf5VUHolW1Eg1irn1hGWjPGdsRcvYJ1nD6lhk8Ir7VM0bHJKsYTx8Jx9OQ==} + engines: {node: '>=4'} + + pe-library@1.0.1: + resolution: {integrity: sha512-nh39Mo1eGWmZS7y+mK/dQIqg7S1lp38DpRxkyoHf0ZcUs/HDc+yyTjuOtTvSMZHmfSLuSQaX945u05Y2Q6UWZg==} + engines: {node: '>=14', npm: '>=7'} + + pend@1.2.0: + resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + + pify@2.3.0: + resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} + engines: {node: '>=0.10.0'} + + plist@3.1.0: + resolution: {integrity: sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ==} + engines: {node: '>=10.4.0'} + + postject@1.0.0-alpha.6: + resolution: {integrity: sha512-b9Eb8h2eVqNE8edvKdwqkrY6O7kAwmI8kcnBv1NScolYJbo59XUF0noFq+lxbC1yN20bmC0WBEbDC5H/7ASb0A==} + engines: {node: '>=14.0.0'} + hasBin: true + + prettier@3.7.4: + resolution: {integrity: sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==} + engines: {node: '>=14'} + hasBin: true + + proc-log@2.0.1: + resolution: {integrity: sha512-Kcmo2FhfDTXdcbfDH76N7uBYHINxc/8GW7UAVuVP9I+Va3uHSerrnKV6dLooga/gh7GlgzuCCr/eoldnL1muGw==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + + progress@2.0.3: + resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} + engines: {node: '>=0.4.0'} + + promise-inflight@1.0.1: + resolution: {integrity: sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==} + peerDependencies: + bluebird: '*' + peerDependenciesMeta: + bluebird: + optional: true + + promise-retry@2.0.1: + resolution: {integrity: sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==} + engines: {node: '>=10'} + + pump@3.0.3: + resolution: {integrity: sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==} + + queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + + quick-lru@5.1.1: + resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} + engines: {node: '>=10'} + + random-path@0.1.2: + resolution: {integrity: sha512-4jY0yoEaQ5v9StCl5kZbNIQlg1QheIDBrdkDn53EynpPb9FgO6//p3X/tgMnrC45XN6QZCzU1Xz/+pSSsJBpRw==} + + randombytes@2.1.0: + resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + + read-binary-file-arch@1.0.6: + resolution: {integrity: sha512-BNg9EN3DD3GsDXX7Aa8O4p92sryjkmzYYgmgTAc6CA4uGLEDzFfxOxugu21akOxpcXHiEgsYkC6nPsQvLLLmEg==} + hasBin: true + + read-pkg-up@2.0.0: + resolution: {integrity: sha512-1orxQfbWGUiTn9XsPlChs6rLie/AV9jwZTGmu2NZw/CUDJQchXJFYE0Fq5j7+n558T1JhDWLdhyd1Zj+wLY//w==} + engines: {node: '>=4'} + + read-pkg@2.0.0: + resolution: {integrity: sha512-eFIBOPW7FGjzBuk3hdXEuNSiTZS/xEMlH49HxMyzb0hyPfu4EhVjT2DH32K1hSSmVq4sebAWnZuuY5auISUTGA==} + engines: {node: '>=4'} + + readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + + rechoir@0.8.0: + resolution: {integrity: sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==} + engines: {node: '>= 10.13.0'} + + repeat-string@1.6.1: + resolution: {integrity: sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==} + engines: {node: '>=0.10'} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + + resedit@2.0.3: + resolution: {integrity: sha512-oTeemxwoMuxxTYxXUwjkrOPfngTQehlv0/HoYFNkB4uzsP1Un1A9nI8JQKGOFkxpqkC7qkMs0lUsGrvUlbLNUA==} + engines: {node: '>=14', npm: '>=7'} + + resolve-alpn@1.2.1: + resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==} + + resolve@1.22.11: + resolution: {integrity: sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==} + engines: {node: '>= 0.4'} + hasBin: true + + responselike@2.0.1: + resolution: {integrity: sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==} + + restore-cursor@3.1.0: + resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} + engines: {node: '>=8'} + + restore-cursor@4.0.0: + resolution: {integrity: sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + retry@0.12.0: + resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==} + engines: {node: '>= 4'} + + reusify@1.1.0: + resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + + rfdc@1.4.1: + resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} + + rimraf@2.6.3: + resolution: {integrity: sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + + rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + + rimraf@5.0.10: + resolution: {integrity: sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==} + hasBin: true + + roarr@2.15.4: + resolution: {integrity: sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==} + engines: {node: '>=8.0'} + + run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + schema-utils@4.3.3: + resolution: {integrity: sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==} + engines: {node: '>= 10.13.0'} + + semver-compare@1.0.0: + resolution: {integrity: sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==} + + semver@5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} + hasBin: true + + semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + + semver@7.7.3: + resolution: {integrity: sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==} + engines: {node: '>=10'} + hasBin: true + + serialize-error@7.0.1: + resolution: {integrity: sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==} + engines: {node: '>=10'} + + serialize-javascript@6.0.2: + resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} + + shebang-command@1.2.0: + resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} + engines: {node: '>=0.10.0'} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@1.0.0: + resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} + engines: {node: '>=0.10.0'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + slice-ansi@5.0.0: + resolution: {integrity: sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==} + engines: {node: '>=12'} + + smart-buffer@4.2.0: + resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} + engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} + + socks-proxy-agent@7.0.0: + resolution: {integrity: sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==} + engines: {node: '>= 10'} + + socks@2.8.7: + resolution: {integrity: sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==} + engines: {node: '>= 10.0.0', npm: '>= 3.0.0'} + + source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + + spdx-correct@3.2.0: + resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} + + spdx-exceptions@2.5.0: + resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} + + spdx-expression-parse@3.0.1: + resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} + + spdx-license-ids@3.0.22: + resolution: {integrity: sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ==} + + sprintf-js@1.1.3: + resolution: {integrity: sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==} + + ssri@9.0.1: + resolution: {integrity: sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + + stream-buffers@2.2.0: + resolution: {integrity: sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg==} + engines: {node: '>= 0.10.0'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + + string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-ansi@7.1.2: + resolution: {integrity: sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==} + engines: {node: '>=12'} + + strip-bom@3.0.0: + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} + engines: {node: '>=4'} + + strip-eof@1.0.0: + resolution: {integrity: sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==} + engines: {node: '>=0.10.0'} + + strip-outer@1.0.1: + resolution: {integrity: sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==} + engines: {node: '>=0.10.0'} + + sumchecker@3.0.1: + resolution: {integrity: sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==} + engines: {node: '>= 8.0'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + + supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + + tapable@2.3.0: + resolution: {integrity: sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==} + engines: {node: '>=6'} + + tar@6.2.1: + resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} + engines: {node: '>=10'} + + temp@0.9.4: + resolution: {integrity: sha512-yYrrsWnrXMcdsnu/7YMYAofM1ktpL5By7vZhf15CrXijWWrEYZks5AXBudalfSWJLlnen/QUJUB5aoB0kqZUGA==} + engines: {node: '>=6.0.0'} + + terser-webpack-plugin@5.3.16: + resolution: {integrity: sha512-h9oBFCWrq78NyWWVcSwZarJkZ01c2AyGrzs1crmHZO3QUg9D61Wu4NPjBy69n7JqylFF5y+CsUZYmYEIZ3mR+Q==} + engines: {node: '>= 10.13.0'} + peerDependencies: + '@swc/core': '*' + esbuild: '*' + uglify-js: '*' + webpack: ^5.1.0 + peerDependenciesMeta: + '@swc/core': + optional: true + esbuild: + optional: true + uglify-js: + optional: true + + terser@5.44.1: + resolution: {integrity: sha512-t/R3R/n0MSwnnazuPpPNVO60LX0SKL45pyl9YlvxIdkH0Of7D5qM2EVe+yASRIlY5pZ73nclYJfNANGWPwFDZw==} + engines: {node: '>=10'} + hasBin: true + + tiny-each-async@2.0.3: + resolution: {integrity: sha512-5ROII7nElnAirvFn8g7H7MtpfV1daMcyfTGQwsn/x2VtyV+VPiO5CjReCJtWLvoKTDEDmZocf3cNPraiMnBXLA==} + + tmp-promise@3.0.3: + resolution: {integrity: sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==} + + tmp@0.0.33: + resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} + engines: {node: '>=0.6.0'} + + tmp@0.2.5: + resolution: {integrity: sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==} + engines: {node: '>=14.14'} + + tn1150@0.1.0: + resolution: {integrity: sha512-DbplOfQFkqG5IHcDyyrs/lkvSr3mPUVsFf/RbDppOshs22yTPnSJWEe6FkYd1txAwU/zcnR905ar2fi4kwF29w==} + engines: {node: '>=0.12'} + + to-data-view@1.1.0: + resolution: {integrity: sha512-1eAdufMg6mwgmlojAx3QeMnzB/BTVp7Tbndi3U7ftcT2zCZadjxkkmLmd97zmaxWi+sgGcgWrokmpEoy0Dn0vQ==} + + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + + tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + + trim-repeated@1.0.0: + resolution: {integrity: sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==} + engines: {node: '>=0.10.0'} + + type-fest@0.13.1: + resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} + engines: {node: '>=10'} + + type-fest@0.21.3: + resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} + engines: {node: '>=10'} + + type-fest@1.4.0: + resolution: {integrity: sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==} + engines: {node: '>=10'} + + typescript@5.4.5: + resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} + engines: {node: '>=14.17'} + hasBin: true + + undici-types@6.21.0: + resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} + + undici-types@7.16.0: + resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==} + + unique-filename@2.0.1: + resolution: {integrity: sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + + unique-slug@3.0.0: + resolution: {integrity: sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + + universalify@0.1.2: + resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} + engines: {node: '>= 4.0.0'} + + universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} + + unorm@1.6.0: + resolution: {integrity: sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA==} + engines: {node: '>= 0.4.0'} + + update-browserslist-db@1.2.3: + resolution: {integrity: sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + + username@5.1.0: + resolution: {integrity: sha512-PCKbdWw85JsYMvmCv5GH3kXmM66rCd9m1hBEDutPNv94b/pqCMT4NtcKyeWYvLFiE8b+ha1Jdl8XAaUdPn5QTg==} + engines: {node: '>=8'} + + util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + + validate-npm-package-license@3.0.4: + resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} + + watchpack@2.5.0: + resolution: {integrity: sha512-e6vZvY6xboSwLz2GD36c16+O/2Z6fKvIf4pOXptw2rY9MVwE/TXc6RGqxD3I3x0a28lwBY7DE+76uTPSsBrrCA==} + engines: {node: '>=10.13.0'} + + wcwidth@1.0.1: + resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + + web-streams-polyfill@3.3.3: + resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} + engines: {node: '>= 8'} + + webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + + webpack-sources@3.3.3: + resolution: {integrity: sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg==} + engines: {node: '>=10.13.0'} + + webpack@5.104.1: + resolution: {integrity: sha512-Qphch25abbMNtekmEGJmeRUhLDbe+QfiWTiqpKYkpCOWY64v9eyl+KRRLmqOFA2AvKPpc9DC6+u2n76tQLBoaA==} + engines: {node: '>=10.13.0'} + hasBin: true + peerDependencies: + webpack-cli: '*' + peerDependenciesMeta: + webpack-cli: + optional: true + + whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + + which@1.3.1: + resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} + hasBin: true + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + + wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + + ws@8.19.0: + resolution: {integrity: sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + xmlbuilder@15.1.1: + resolution: {integrity: sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==} + engines: {node: '>=8.0'} + + xtend@4.0.2: + resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} + engines: {node: '>=0.4'} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + + yargs-parser@20.2.9: + resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} + engines: {node: '>=10'} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs@16.2.0: + resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} + engines: {node: '>=10'} + + yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + + yauzl@2.10.0: + resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + + yoctocolors-cjs@2.1.3: + resolution: {integrity: sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==} + engines: {node: '>=18'} + +snapshots: + + '@electron-forge/cli@7.11.1(encoding@0.1.13)': + dependencies: + '@electron-forge/core': 7.11.1(encoding@0.1.13) + '@electron-forge/core-utils': 7.11.1 + '@electron-forge/shared-types': 7.11.1 + '@electron/get': 3.1.0 + '@inquirer/prompts': 6.0.1 + '@listr2/prompt-adapter-inquirer': 2.0.22(@inquirer/prompts@6.0.1) + chalk: 4.1.2 + commander: 11.1.0 + debug: 4.4.3 + fs-extra: 10.1.0 + listr2: 7.0.2 + log-symbols: 4.1.0 + semver: 7.7.3 + transitivePeerDependencies: + - '@swc/core' + - bluebird + - encoding + - esbuild + - supports-color + - uglify-js + - webpack-cli + + '@electron-forge/core-utils@7.11.1': + dependencies: + '@electron-forge/shared-types': 7.11.1 + '@electron/rebuild': 3.7.2 + '@malept/cross-spawn-promise': 2.0.0 + chalk: 4.1.2 + debug: 4.4.3 + find-up: 5.0.0 + fs-extra: 10.1.0 + log-symbols: 4.1.0 + parse-author: 2.0.0 + semver: 7.7.3 + transitivePeerDependencies: + - bluebird + - supports-color + + '@electron-forge/core@7.11.1(encoding@0.1.13)': + dependencies: + '@electron-forge/core-utils': 7.11.1 + '@electron-forge/maker-base': 7.11.1 + '@electron-forge/plugin-base': 7.11.1 + '@electron-forge/publisher-base': 7.11.1 + '@electron-forge/shared-types': 7.11.1 + '@electron-forge/template-base': 7.11.1 + '@electron-forge/template-vite': 7.11.1 + '@electron-forge/template-vite-typescript': 7.11.1 + '@electron-forge/template-webpack': 7.11.1 + '@electron-forge/template-webpack-typescript': 7.11.1 + '@electron-forge/tracer': 7.11.1 + '@electron/get': 3.1.0 + '@electron/packager': 18.4.4 + '@electron/rebuild': 3.7.2 + '@malept/cross-spawn-promise': 2.0.0 + '@vscode/sudo-prompt': 9.3.2 + chalk: 4.1.2 + debug: 4.4.3 + fast-glob: 3.3.3 + filenamify: 4.3.0 + find-up: 5.0.0 + fs-extra: 10.1.0 + global-dirs: 3.0.1 + got: 11.8.6 + interpret: 3.1.1 + jiti: 2.6.1 + listr2: 7.0.2 + lodash: 4.17.21 + log-symbols: 4.1.0 + node-fetch: 2.7.0(encoding@0.1.13) + rechoir: 0.8.0 + semver: 7.7.3 + source-map-support: 0.5.21 + username: 5.1.0 + transitivePeerDependencies: + - '@swc/core' + - bluebird + - encoding + - esbuild + - supports-color + - uglify-js + - webpack-cli + + '@electron-forge/maker-base@7.11.1': + dependencies: + '@electron-forge/shared-types': 7.11.1 + fs-extra: 10.1.0 + which: 2.0.2 + transitivePeerDependencies: + - bluebird + - supports-color + + '@electron-forge/maker-deb@7.11.1': + dependencies: + '@electron-forge/maker-base': 7.11.1 + '@electron-forge/shared-types': 7.11.1 + optionalDependencies: + electron-installer-debian: 3.2.0 + transitivePeerDependencies: + - bluebird + - supports-color + + '@electron-forge/maker-dmg@7.11.1': + dependencies: + '@electron-forge/maker-base': 7.11.1 + '@electron-forge/shared-types': 7.11.1 + fs-extra: 10.1.0 + optionalDependencies: + electron-installer-dmg: 5.0.1 + transitivePeerDependencies: + - bluebird + - supports-color + + '@electron-forge/maker-rpm@7.11.1': + dependencies: + '@electron-forge/maker-base': 7.11.1 + '@electron-forge/shared-types': 7.11.1 + optionalDependencies: + electron-installer-redhat: 3.4.0 + transitivePeerDependencies: + - bluebird + - supports-color + + '@electron-forge/maker-squirrel@7.11.1': + dependencies: + '@electron-forge/maker-base': 7.11.1 + '@electron-forge/shared-types': 7.11.1 + fs-extra: 10.1.0 + optionalDependencies: + electron-winstaller: 5.4.0 + transitivePeerDependencies: + - bluebird + - supports-color + + '@electron-forge/maker-zip@7.11.1': + dependencies: + '@electron-forge/maker-base': 7.11.1 + '@electron-forge/shared-types': 7.11.1 + cross-zip: 4.0.1 + fs-extra: 10.1.0 + got: 11.8.6 + transitivePeerDependencies: + - bluebird + - supports-color + + '@electron-forge/plugin-auto-unpack-natives@7.11.1': + dependencies: + '@electron-forge/plugin-base': 7.11.1 + '@electron-forge/shared-types': 7.11.1 + transitivePeerDependencies: + - bluebird + - supports-color + + '@electron-forge/plugin-base@7.11.1': + dependencies: + '@electron-forge/shared-types': 7.11.1 + transitivePeerDependencies: + - bluebird + - supports-color + + '@electron-forge/plugin-fuses@7.11.1(@electron/fuses@2.0.0)': + dependencies: + '@electron-forge/plugin-base': 7.11.1 + '@electron-forge/shared-types': 7.11.1 + '@electron/fuses': 2.0.0 + transitivePeerDependencies: + - bluebird + - supports-color + + '@electron-forge/publisher-base@7.11.1': + dependencies: + '@electron-forge/shared-types': 7.11.1 + transitivePeerDependencies: + - bluebird + - supports-color + + '@electron-forge/shared-types@7.11.1': + dependencies: + '@electron-forge/tracer': 7.11.1 + '@electron/packager': 18.4.4 + '@electron/rebuild': 3.7.2 + listr2: 7.0.2 + transitivePeerDependencies: + - bluebird + - supports-color + + '@electron-forge/template-base@7.11.1': + dependencies: + '@electron-forge/core-utils': 7.11.1 + '@electron-forge/shared-types': 7.11.1 + '@malept/cross-spawn-promise': 2.0.0 + debug: 4.4.3 + fs-extra: 10.1.0 + semver: 7.7.3 + username: 5.1.0 + transitivePeerDependencies: + - bluebird + - supports-color + + '@electron-forge/template-vite-typescript@7.11.1': + dependencies: + '@electron-forge/shared-types': 7.11.1 + '@electron-forge/template-base': 7.11.1 + fs-extra: 10.1.0 + transitivePeerDependencies: + - bluebird + - supports-color + + '@electron-forge/template-vite@7.11.1': + dependencies: + '@electron-forge/shared-types': 7.11.1 + '@electron-forge/template-base': 7.11.1 + fs-extra: 10.1.0 + transitivePeerDependencies: + - bluebird + - supports-color + + '@electron-forge/template-webpack-typescript@7.11.1': + dependencies: + '@electron-forge/shared-types': 7.11.1 + '@electron-forge/template-base': 7.11.1 + fs-extra: 10.1.0 + typescript: 5.4.5 + webpack: 5.104.1 + transitivePeerDependencies: + - '@swc/core' + - bluebird + - esbuild + - supports-color + - uglify-js + - webpack-cli + + '@electron-forge/template-webpack@7.11.1': + dependencies: + '@electron-forge/shared-types': 7.11.1 + '@electron-forge/template-base': 7.11.1 + fs-extra: 10.1.0 + transitivePeerDependencies: + - bluebird + - supports-color + + '@electron-forge/tracer@7.11.1': + dependencies: + chrome-trace-event: 1.0.4 + + '@electron/asar@3.4.1': + dependencies: + commander: 5.1.0 + glob: 7.2.3 + minimatch: 3.1.2 + + '@electron/fuses@2.0.0': {} + + '@electron/get@2.0.3': + dependencies: + debug: 4.4.3 + env-paths: 2.2.1 + fs-extra: 8.1.0 + got: 11.8.6 + progress: 2.0.3 + semver: 6.3.1 + sumchecker: 3.0.1 + optionalDependencies: + global-agent: 3.0.0 + transitivePeerDependencies: + - supports-color + + '@electron/get@3.1.0': + dependencies: + debug: 4.4.3 + env-paths: 2.2.1 + fs-extra: 8.1.0 + got: 11.8.6 + progress: 2.0.3 + semver: 6.3.1 + sumchecker: 3.0.1 + optionalDependencies: + global-agent: 3.0.0 + transitivePeerDependencies: + - supports-color + + '@electron/node-gyp@https://codeload.github.com/electron/node-gyp/tar.gz/06b29aafb7708acef8b3669835c8a7857ebc92d2': + dependencies: + env-paths: 2.2.1 + exponential-backoff: 3.1.3 + glob: 8.1.0 + graceful-fs: 4.2.11 + make-fetch-happen: 10.2.1 + nopt: 6.0.0 + proc-log: 2.0.1 + semver: 7.7.3 + tar: 6.2.1 + which: 2.0.2 + transitivePeerDependencies: + - bluebird + - supports-color + + '@electron/notarize@2.5.0': + dependencies: + debug: 4.4.3 + fs-extra: 9.1.0 + promise-retry: 2.0.1 + transitivePeerDependencies: + - supports-color + + '@electron/osx-sign@1.3.3': + dependencies: + compare-version: 0.1.2 + debug: 4.4.3 + fs-extra: 10.1.0 + isbinaryfile: 4.0.10 + minimist: 1.2.8 + plist: 3.1.0 + transitivePeerDependencies: + - supports-color + + '@electron/packager@18.4.4': + dependencies: + '@electron/asar': 3.4.1 + '@electron/get': 3.1.0 + '@electron/notarize': 2.5.0 + '@electron/osx-sign': 1.3.3 + '@electron/universal': 2.0.3 + '@electron/windows-sign': 1.2.2 + '@malept/cross-spawn-promise': 2.0.0 + debug: 4.4.3 + extract-zip: 2.0.1 + filenamify: 4.3.0 + fs-extra: 11.3.3 + galactus: 1.0.0 + get-package-info: 1.0.0 + junk: 3.1.0 + parse-author: 2.0.0 + plist: 3.1.0 + prettier: 3.7.4 + resedit: 2.0.3 + resolve: 1.22.11 + semver: 7.7.3 + yargs-parser: 21.1.1 + transitivePeerDependencies: + - supports-color + + '@electron/rebuild@3.7.2': + dependencies: + '@electron/node-gyp': https://codeload.github.com/electron/node-gyp/tar.gz/06b29aafb7708acef8b3669835c8a7857ebc92d2 + '@malept/cross-spawn-promise': 2.0.0 + chalk: 4.1.2 + debug: 4.4.3 + detect-libc: 2.1.2 + fs-extra: 10.1.0 + got: 11.8.6 + node-abi: 3.85.0 + node-api-version: 0.2.1 + ora: 5.4.1 + read-binary-file-arch: 1.0.6 + semver: 7.7.3 + tar: 6.2.1 + yargs: 17.7.2 + transitivePeerDependencies: + - bluebird + - supports-color + + '@electron/universal@2.0.3': + dependencies: + '@electron/asar': 3.4.1 + '@malept/cross-spawn-promise': 2.0.0 + debug: 4.4.3 + dir-compare: 4.2.0 + fs-extra: 11.3.3 + minimatch: 9.0.5 + plist: 3.1.0 + transitivePeerDependencies: + - supports-color + + '@electron/windows-sign@1.2.2': + dependencies: + cross-dirname: 0.1.0 + debug: 4.4.3 + fs-extra: 11.3.3 + minimist: 1.2.8 + postject: 1.0.0-alpha.6 + transitivePeerDependencies: + - supports-color + + '@gar/promisify@1.1.3': {} + + '@google/genai@1.35.0': + dependencies: + google-auth-library: 10.5.0 + ws: 8.19.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@inquirer/checkbox@3.0.1': + dependencies: + '@inquirer/core': 9.2.1 + '@inquirer/figures': 1.0.15 + '@inquirer/type': 2.0.0 + ansi-escapes: 4.3.2 + yoctocolors-cjs: 2.1.3 + + '@inquirer/confirm@4.0.1': + dependencies: + '@inquirer/core': 9.2.1 + '@inquirer/type': 2.0.0 + + '@inquirer/core@9.2.1': + dependencies: + '@inquirer/figures': 1.0.15 + '@inquirer/type': 2.0.0 + '@types/mute-stream': 0.0.4 + '@types/node': 22.19.6 + '@types/wrap-ansi': 3.0.0 + ansi-escapes: 4.3.2 + cli-width: 4.1.0 + mute-stream: 1.0.0 + signal-exit: 4.1.0 + strip-ansi: 6.0.1 + wrap-ansi: 6.2.0 + yoctocolors-cjs: 2.1.3 + + '@inquirer/editor@3.0.1': + dependencies: + '@inquirer/core': 9.2.1 + '@inquirer/type': 2.0.0 + external-editor: 3.1.0 + + '@inquirer/expand@3.0.1': + dependencies: + '@inquirer/core': 9.2.1 + '@inquirer/type': 2.0.0 + yoctocolors-cjs: 2.1.3 + + '@inquirer/figures@1.0.15': {} + + '@inquirer/input@3.0.1': + dependencies: + '@inquirer/core': 9.2.1 + '@inquirer/type': 2.0.0 + + '@inquirer/number@2.0.1': + dependencies: + '@inquirer/core': 9.2.1 + '@inquirer/type': 2.0.0 + + '@inquirer/password@3.0.1': + dependencies: + '@inquirer/core': 9.2.1 + '@inquirer/type': 2.0.0 + ansi-escapes: 4.3.2 + + '@inquirer/prompts@6.0.1': + dependencies: + '@inquirer/checkbox': 3.0.1 + '@inquirer/confirm': 4.0.1 + '@inquirer/editor': 3.0.1 + '@inquirer/expand': 3.0.1 + '@inquirer/input': 3.0.1 + '@inquirer/number': 2.0.1 + '@inquirer/password': 3.0.1 + '@inquirer/rawlist': 3.0.1 + '@inquirer/search': 2.0.1 + '@inquirer/select': 3.0.1 + + '@inquirer/rawlist@3.0.1': + dependencies: + '@inquirer/core': 9.2.1 + '@inquirer/type': 2.0.0 + yoctocolors-cjs: 2.1.3 + + '@inquirer/search@2.0.1': + dependencies: + '@inquirer/core': 9.2.1 + '@inquirer/figures': 1.0.15 + '@inquirer/type': 2.0.0 + yoctocolors-cjs: 2.1.3 + + '@inquirer/select@3.0.1': + dependencies: + '@inquirer/core': 9.2.1 + '@inquirer/figures': 1.0.15 + '@inquirer/type': 2.0.0 + ansi-escapes: 4.3.2 + yoctocolors-cjs: 2.1.3 + + '@inquirer/type@1.5.5': + dependencies: + mute-stream: 1.0.0 + + '@inquirer/type@2.0.0': + dependencies: + mute-stream: 1.0.0 + + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.1.2 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + + '@jridgewell/gen-mapping@0.3.13': + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/source-map@0.3.11': + dependencies: + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/sourcemap-codec@1.5.5': {} + + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.5 + + '@listr2/prompt-adapter-inquirer@2.0.22(@inquirer/prompts@6.0.1)': + dependencies: + '@inquirer/prompts': 6.0.1 + '@inquirer/type': 1.5.5 + + '@malept/cross-spawn-promise@1.1.1': + dependencies: + cross-spawn: 7.0.6 + optional: true + + '@malept/cross-spawn-promise@2.0.0': + dependencies: + cross-spawn: 7.0.6 + + '@nodelib/fs.scandir@2.1.5': + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + + '@nodelib/fs.stat@2.0.5': {} + + '@nodelib/fs.walk@1.2.8': + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.20.1 + + '@npmcli/fs@2.1.2': + dependencies: + '@gar/promisify': 1.1.3 + semver: 7.7.3 + + '@npmcli/move-file@2.0.1': + dependencies: + mkdirp: 1.0.4 + rimraf: 3.0.2 + + '@pkgjs/parseargs@0.11.0': + optional: true + + '@reforged/maker-appimage@5.1.1': + dependencies: + '@electron-forge/maker-base': 7.11.1 + '@reforged/maker-types': 2.0.0 + '@spacingbat3/lss': 1.2.0 + semver: 7.7.3 + transitivePeerDependencies: + - bluebird + - supports-color + + '@reforged/maker-types@2.0.0': {} + + '@sindresorhus/is@4.6.0': {} + + '@spacingbat3/lss@1.2.0': {} + + '@szmarczak/http-timer@4.0.6': + dependencies: + defer-to-connect: 2.0.1 + + '@tootallnate/once@2.0.0': {} + + '@types/appdmg@0.5.5': + dependencies: + '@types/node': 25.0.8 + optional: true + + '@types/cacheable-request@6.0.3': + dependencies: + '@types/http-cache-semantics': 4.0.4 + '@types/keyv': 3.1.4 + '@types/node': 25.0.8 + '@types/responselike': 1.0.3 + + '@types/eslint-scope@3.7.7': + dependencies: + '@types/eslint': 9.6.1 + '@types/estree': 1.0.8 + + '@types/eslint@9.6.1': + dependencies: + '@types/estree': 1.0.8 + '@types/json-schema': 7.0.15 + + '@types/estree@1.0.8': {} + + '@types/fs-extra@9.0.13': + dependencies: + '@types/node': 25.0.8 + optional: true + + '@types/http-cache-semantics@4.0.4': {} + + '@types/json-schema@7.0.15': {} + + '@types/keyv@3.1.4': + dependencies: + '@types/node': 25.0.8 + + '@types/mute-stream@0.0.4': + dependencies: + '@types/node': 22.19.6 + + '@types/node@22.19.6': + dependencies: + undici-types: 6.21.0 + + '@types/node@25.0.8': + dependencies: + undici-types: 7.16.0 + + '@types/responselike@1.0.3': + dependencies: + '@types/node': 25.0.8 + + '@types/wrap-ansi@3.0.0': {} + + '@types/yauzl@2.10.3': + dependencies: + '@types/node': 22.19.6 + optional: true + + '@vscode/sudo-prompt@9.3.2': {} + + '@webassemblyjs/ast@1.14.1': + dependencies: + '@webassemblyjs/helper-numbers': 1.13.2 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + + '@webassemblyjs/floating-point-hex-parser@1.13.2': {} + + '@webassemblyjs/helper-api-error@1.13.2': {} + + '@webassemblyjs/helper-buffer@1.14.1': {} + + '@webassemblyjs/helper-numbers@1.13.2': + dependencies: + '@webassemblyjs/floating-point-hex-parser': 1.13.2 + '@webassemblyjs/helper-api-error': 1.13.2 + '@xtuc/long': 4.2.2 + + '@webassemblyjs/helper-wasm-bytecode@1.13.2': {} + + '@webassemblyjs/helper-wasm-section@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-buffer': 1.14.1 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/wasm-gen': 1.14.1 + + '@webassemblyjs/ieee754@1.13.2': + dependencies: + '@xtuc/ieee754': 1.2.0 + + '@webassemblyjs/leb128@1.13.2': + dependencies: + '@xtuc/long': 4.2.2 + + '@webassemblyjs/utf8@1.13.2': {} + + '@webassemblyjs/wasm-edit@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-buffer': 1.14.1 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/helper-wasm-section': 1.14.1 + '@webassemblyjs/wasm-gen': 1.14.1 + '@webassemblyjs/wasm-opt': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + '@webassemblyjs/wast-printer': 1.14.1 + + '@webassemblyjs/wasm-gen@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/ieee754': 1.13.2 + '@webassemblyjs/leb128': 1.13.2 + '@webassemblyjs/utf8': 1.13.2 + + '@webassemblyjs/wasm-opt@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-buffer': 1.14.1 + '@webassemblyjs/wasm-gen': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + + '@webassemblyjs/wasm-parser@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-api-error': 1.13.2 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/ieee754': 1.13.2 + '@webassemblyjs/leb128': 1.13.2 + '@webassemblyjs/utf8': 1.13.2 + + '@webassemblyjs/wast-printer@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@xtuc/long': 4.2.2 + + '@xmldom/xmldom@0.8.11': {} + + '@xtuc/ieee754@1.2.0': {} + + '@xtuc/long@4.2.2': {} + + abbrev@1.1.1: {} + + acorn-import-phases@1.0.4(acorn@8.15.0): + dependencies: + acorn: 8.15.0 + + acorn@8.15.0: {} + + agent-base@6.0.2: + dependencies: + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + agent-base@7.1.4: {} + + agentkeepalive@4.6.0: + dependencies: + humanize-ms: 1.2.1 + + aggregate-error@3.1.0: + dependencies: + clean-stack: 2.2.0 + indent-string: 4.0.0 + + ajv-formats@2.1.1(ajv@8.17.1): + optionalDependencies: + ajv: 8.17.1 + + ajv-keywords@5.1.0(ajv@8.17.1): + dependencies: + ajv: 8.17.1 + fast-deep-equal: 3.1.3 + + ajv@8.17.1: + dependencies: + fast-deep-equal: 3.1.3 + fast-uri: 3.1.0 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + + ansi-escapes@4.3.2: + dependencies: + type-fest: 0.21.3 + + ansi-escapes@5.0.0: + dependencies: + type-fest: 1.4.0 + + ansi-regex@5.0.1: {} + + ansi-regex@6.2.2: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + ansi-styles@6.2.3: {} + + appdmg@0.6.6: + dependencies: + async: 1.5.2 + ds-store: 0.1.6 + execa: 1.0.0 + fs-temp: 1.2.1 + fs-xattr: 0.3.1 + image-size: 0.7.5 + is-my-json-valid: 2.20.6 + minimist: 1.2.8 + parse-color: 1.0.0 + path-exists: 4.0.0 + repeat-string: 1.6.1 + optional: true + + async@1.5.2: + optional: true + + at-least-node@1.0.0: {} + + author-regex@1.0.0: {} + + balanced-match@1.0.2: {} + + base32-encode@1.2.0: + dependencies: + to-data-view: 1.1.0 + optional: true + + base64-js@1.5.1: {} + + baseline-browser-mapping@2.9.14: {} + + bignumber.js@9.3.1: {} + + bl@4.1.0: + dependencies: + buffer: 5.7.1 + inherits: 2.0.4 + readable-stream: 3.6.2 + + bluebird@3.7.2: {} + + boolean@3.2.0: + optional: true + + bplist-creator@0.0.8: + dependencies: + stream-buffers: 2.2.0 + optional: true + + brace-expansion@1.1.12: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + + brace-expansion@2.0.2: + dependencies: + balanced-match: 1.0.2 + + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + + browserslist@4.28.1: + dependencies: + baseline-browser-mapping: 2.9.14 + caniuse-lite: 1.0.30001764 + electron-to-chromium: 1.5.267 + node-releases: 2.0.27 + update-browserslist-db: 1.2.3(browserslist@4.28.1) + + buffer-crc32@0.2.13: {} + + buffer-equal-constant-time@1.0.1: {} + + buffer-from@1.1.2: {} + + buffer@5.7.1: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + + cacache@16.1.3: + dependencies: + '@npmcli/fs': 2.1.2 + '@npmcli/move-file': 2.0.1 + chownr: 2.0.0 + fs-minipass: 2.1.0 + glob: 8.1.0 + infer-owner: 1.0.4 + lru-cache: 7.18.3 + minipass: 3.3.6 + minipass-collect: 1.0.2 + minipass-flush: 1.0.5 + minipass-pipeline: 1.2.4 + mkdirp: 1.0.4 + p-map: 4.0.0 + promise-inflight: 1.0.1 + rimraf: 3.0.2 + ssri: 9.0.1 + tar: 6.2.1 + unique-filename: 2.0.1 + transitivePeerDependencies: + - bluebird + + cacheable-lookup@5.0.4: {} + + cacheable-request@7.0.4: + dependencies: + clone-response: 1.0.3 + get-stream: 5.2.0 + http-cache-semantics: 4.2.0 + keyv: 4.5.4 + lowercase-keys: 2.0.0 + normalize-url: 6.1.0 + responselike: 2.0.1 + + caniuse-lite@1.0.30001764: {} + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chardet@0.7.0: {} + + chownr@2.0.0: {} + + chrome-trace-event@1.0.4: {} + + clean-stack@2.2.0: {} + + cli-cursor@3.1.0: + dependencies: + restore-cursor: 3.1.0 + + cli-cursor@4.0.0: + dependencies: + restore-cursor: 4.0.0 + + cli-spinners@2.9.2: {} + + cli-truncate@3.1.0: + dependencies: + slice-ansi: 5.0.0 + string-width: 5.1.2 + + cli-width@4.1.0: {} + + cliui@7.0.4: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + optional: true + + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + clone-response@1.0.3: + dependencies: + mimic-response: 1.0.1 + + clone@1.0.4: {} + + color-convert@0.5.3: + optional: true + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + colorette@2.0.20: {} + + commander@11.1.0: {} + + commander@2.20.3: {} + + commander@5.1.0: {} + + commander@9.5.0: {} + + compare-version@0.1.2: {} + + concat-map@0.0.1: {} + + cross-dirname@0.1.0: {} + + cross-spawn@6.0.6: + dependencies: + nice-try: 1.0.5 + path-key: 2.0.1 + semver: 5.7.2 + shebang-command: 1.2.0 + which: 1.3.1 + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + cross-zip@4.0.1: {} + + data-uri-to-buffer@4.0.1: {} + + debug@2.6.9: + dependencies: + ms: 2.0.0 + + debug@4.4.3: + dependencies: + ms: 2.1.3 + + decompress-response@6.0.0: + dependencies: + mimic-response: 3.1.0 + + defaults@1.0.4: + dependencies: + clone: 1.0.4 + + defer-to-connect@2.0.1: {} + + define-data-property@1.1.4: + dependencies: + es-define-property: 1.0.1 + es-errors: 1.3.0 + gopd: 1.2.0 + optional: true + + define-properties@1.2.1: + dependencies: + define-data-property: 1.1.4 + has-property-descriptors: 1.0.2 + object-keys: 1.1.1 + optional: true + + detect-libc@2.1.2: {} + + detect-node@2.1.0: + optional: true + + dir-compare@4.2.0: + dependencies: + minimatch: 3.1.2 + p-limit: 3.1.0 + + ds-store@0.1.6: + dependencies: + bplist-creator: 0.0.8 + macos-alias: 0.2.12 + tn1150: 0.1.0 + optional: true + + eastasianwidth@0.2.0: {} + + ecdsa-sig-formatter@1.0.11: + dependencies: + safe-buffer: 5.2.1 + + electron-installer-common@0.10.4: + dependencies: + '@electron/asar': 3.4.1 + '@malept/cross-spawn-promise': 1.1.1 + debug: 4.4.3 + fs-extra: 9.1.0 + glob: 7.2.3 + lodash: 4.17.21 + parse-author: 2.0.0 + semver: 7.7.3 + tmp-promise: 3.0.3 + optionalDependencies: + '@types/fs-extra': 9.0.13 + transitivePeerDependencies: + - supports-color + optional: true + + electron-installer-debian@3.2.0: + dependencies: + '@malept/cross-spawn-promise': 1.1.1 + debug: 4.4.3 + electron-installer-common: 0.10.4 + fs-extra: 9.1.0 + get-folder-size: 2.0.1 + lodash: 4.17.21 + word-wrap: 1.2.5 + yargs: 16.2.0 + transitivePeerDependencies: + - supports-color + optional: true + + electron-installer-dmg@5.0.1: + dependencies: + '@types/appdmg': 0.5.5 + debug: 4.4.3 + minimist: 1.2.8 + optionalDependencies: + appdmg: 0.6.6 + transitivePeerDependencies: + - supports-color + optional: true + + electron-installer-redhat@3.4.0: + dependencies: + '@malept/cross-spawn-promise': 1.1.1 + debug: 4.4.3 + electron-installer-common: 0.10.4 + fs-extra: 9.1.0 + lodash: 4.17.21 + word-wrap: 1.2.5 + yargs: 16.2.0 + transitivePeerDependencies: + - supports-color + optional: true + + electron-squirrel-startup@1.0.1: + dependencies: + debug: 2.6.9 + transitivePeerDependencies: + - supports-color + + electron-to-chromium@1.5.267: {} + + electron-winstaller@5.4.0: + dependencies: + '@electron/asar': 3.4.1 + debug: 4.4.3 + fs-extra: 7.0.1 + lodash: 4.17.21 + temp: 0.9.4 + optionalDependencies: + '@electron/windows-sign': 1.2.2 + transitivePeerDependencies: + - supports-color + optional: true + + electron@39.2.7: + dependencies: + '@electron/get': 2.0.3 + '@types/node': 22.19.6 + extract-zip: 2.0.1 + transitivePeerDependencies: + - supports-color + + emoji-regex@8.0.0: {} + + emoji-regex@9.2.2: {} + + encode-utf8@1.0.3: + optional: true + + encoding@0.1.13: + dependencies: + iconv-lite: 0.6.3 + optional: true + + end-of-stream@1.4.5: + dependencies: + once: 1.4.0 + + enhanced-resolve@5.18.4: + dependencies: + graceful-fs: 4.2.11 + tapable: 2.3.0 + + env-paths@2.2.1: {} + + err-code@2.0.3: {} + + error-ex@1.3.4: + dependencies: + is-arrayish: 0.2.1 + + es-define-property@1.0.1: + optional: true + + es-errors@1.3.0: + optional: true + + es-module-lexer@2.0.0: {} + + es6-error@4.1.1: + optional: true + + escalade@3.2.0: {} + + escape-string-regexp@1.0.5: {} + + escape-string-regexp@4.0.0: + optional: true + + eslint-scope@5.1.1: + dependencies: + esrecurse: 4.3.0 + estraverse: 4.3.0 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@4.3.0: {} + + estraverse@5.3.0: {} + + eventemitter3@5.0.1: {} + + events@3.3.0: {} + + execa@1.0.0: + dependencies: + cross-spawn: 6.0.6 + get-stream: 4.1.0 + is-stream: 1.1.0 + npm-run-path: 2.0.2 + p-finally: 1.0.0 + signal-exit: 3.0.7 + strip-eof: 1.0.0 + + exponential-backoff@3.1.3: {} + + extend@3.0.2: {} + + external-editor@3.1.0: + dependencies: + chardet: 0.7.0 + iconv-lite: 0.4.24 + tmp: 0.0.33 + + extract-zip@2.0.1: + dependencies: + debug: 4.4.3 + get-stream: 5.2.0 + yauzl: 2.10.0 + optionalDependencies: + '@types/yauzl': 2.10.3 + transitivePeerDependencies: + - supports-color + + fast-deep-equal@3.1.3: {} + + fast-glob@3.3.3: + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.8 + + fast-uri@3.1.0: {} + + fastq@1.20.1: + dependencies: + reusify: 1.1.0 + + fd-slicer@1.1.0: + dependencies: + pend: 1.2.0 + + fetch-blob@3.2.0: + dependencies: + node-domexception: 1.0.0 + web-streams-polyfill: 3.3.3 + + filename-reserved-regex@2.0.0: {} + + filenamify@4.3.0: + dependencies: + filename-reserved-regex: 2.0.0 + strip-outer: 1.0.1 + trim-repeated: 1.0.0 + + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + + find-up@2.1.0: + dependencies: + locate-path: 2.0.0 + + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flora-colossus@2.0.0: + dependencies: + debug: 4.4.3 + fs-extra: 10.1.0 + transitivePeerDependencies: + - supports-color + + fmix@0.1.0: + dependencies: + imul: 1.0.1 + optional: true + + foreground-child@3.3.1: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + + formdata-polyfill@4.0.10: + dependencies: + fetch-blob: 3.2.0 + + fs-extra@10.1.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.2.0 + universalify: 2.0.1 + + fs-extra@11.3.3: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.2.0 + universalify: 2.0.1 + + fs-extra@7.0.1: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 4.0.0 + universalify: 0.1.2 + optional: true + + fs-extra@8.1.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 4.0.0 + universalify: 0.1.2 + + fs-extra@9.1.0: + dependencies: + at-least-node: 1.0.0 + graceful-fs: 4.2.11 + jsonfile: 6.2.0 + universalify: 2.0.1 + + fs-minipass@2.1.0: + dependencies: + minipass: 3.3.6 + + fs-temp@1.2.1: + dependencies: + random-path: 0.1.2 + optional: true + + fs-xattr@0.3.1: + optional: true + + fs.realpath@1.0.0: {} + + function-bind@1.1.2: {} + + galactus@1.0.0: + dependencies: + debug: 4.4.3 + flora-colossus: 2.0.0 + fs-extra: 10.1.0 + transitivePeerDependencies: + - supports-color + + gar@1.0.4: + optional: true + + gaxios@7.1.3: + dependencies: + extend: 3.0.2 + https-proxy-agent: 7.0.6 + node-fetch: 3.3.2 + rimraf: 5.0.10 + transitivePeerDependencies: + - supports-color + + gcp-metadata@8.1.2: + dependencies: + gaxios: 7.1.3 + google-logging-utils: 1.1.3 + json-bigint: 1.0.0 + transitivePeerDependencies: + - supports-color + + generate-function@2.3.1: + dependencies: + is-property: 1.0.2 + optional: true + + generate-object-property@1.2.0: + dependencies: + is-property: 1.0.2 + optional: true + + get-caller-file@2.0.5: {} + + get-folder-size@2.0.1: + dependencies: + gar: 1.0.4 + tiny-each-async: 2.0.3 + optional: true + + get-package-info@1.0.0: + dependencies: + bluebird: 3.7.2 + debug: 2.6.9 + lodash.get: 4.4.2 + read-pkg-up: 2.0.0 + transitivePeerDependencies: + - supports-color + + get-stream@4.1.0: + dependencies: + pump: 3.0.3 + + get-stream@5.2.0: + dependencies: + pump: 3.0.3 + + glob-parent@5.1.2: + dependencies: + is-glob: 4.0.3 + + glob-to-regexp@0.4.1: {} + + glob@10.5.0: + dependencies: + foreground-child: 3.3.1 + jackspeak: 3.4.3 + minimatch: 9.0.5 + minipass: 7.1.2 + package-json-from-dist: 1.0.1 + path-scurry: 1.11.1 + + glob@7.2.3: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + + glob@8.1.0: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 5.1.6 + once: 1.4.0 + + global-agent@3.0.0: + dependencies: + boolean: 3.2.0 + es6-error: 4.1.1 + matcher: 3.0.0 + roarr: 2.15.4 + semver: 7.7.3 + serialize-error: 7.0.1 + optional: true + + global-dirs@3.0.1: + dependencies: + ini: 2.0.0 + + globalthis@1.0.4: + dependencies: + define-properties: 1.2.1 + gopd: 1.2.0 + optional: true + + google-auth-library@10.5.0: + dependencies: + base64-js: 1.5.1 + ecdsa-sig-formatter: 1.0.11 + gaxios: 7.1.3 + gcp-metadata: 8.1.2 + google-logging-utils: 1.1.3 + gtoken: 8.0.0 + jws: 4.0.1 + transitivePeerDependencies: + - supports-color + + google-logging-utils@1.1.3: {} + + gopd@1.2.0: + optional: true + + got@11.8.6: + dependencies: + '@sindresorhus/is': 4.6.0 + '@szmarczak/http-timer': 4.0.6 + '@types/cacheable-request': 6.0.3 + '@types/responselike': 1.0.3 + cacheable-lookup: 5.0.4 + cacheable-request: 7.0.4 + decompress-response: 6.0.0 + http2-wrapper: 1.0.3 + lowercase-keys: 2.0.0 + p-cancelable: 2.1.1 + responselike: 2.0.1 + + graceful-fs@4.2.11: {} + + gtoken@8.0.0: + dependencies: + gaxios: 7.1.3 + jws: 4.0.1 + transitivePeerDependencies: + - supports-color + + has-flag@4.0.0: {} + + has-property-descriptors@1.0.2: + dependencies: + es-define-property: 1.0.1 + optional: true + + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 + + hosted-git-info@2.8.9: {} + + http-cache-semantics@4.2.0: {} + + http-proxy-agent@5.0.0: + dependencies: + '@tootallnate/once': 2.0.0 + agent-base: 6.0.2 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + http2-wrapper@1.0.3: + dependencies: + quick-lru: 5.1.1 + resolve-alpn: 1.2.1 + + https-proxy-agent@5.0.1: + dependencies: + agent-base: 6.0.2 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + https-proxy-agent@7.0.6: + dependencies: + agent-base: 7.1.4 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + humanize-ms@1.2.1: + dependencies: + ms: 2.1.3 + + iconv-lite@0.4.24: + dependencies: + safer-buffer: 2.1.2 + + iconv-lite@0.6.3: + dependencies: + safer-buffer: 2.1.2 + optional: true + + ieee754@1.2.1: {} + + image-size@0.7.5: + optional: true + + imul@1.0.1: + optional: true + + imurmurhash@0.1.4: {} + + indent-string@4.0.0: {} + + infer-owner@1.0.4: {} + + inflight@1.0.6: + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + + inherits@2.0.4: {} + + ini@2.0.0: {} + + interpret@3.1.1: {} + + ip-address@10.1.0: {} + + is-arrayish@0.2.1: {} + + is-core-module@2.16.1: + dependencies: + hasown: 2.0.2 + + is-extglob@2.1.1: {} + + is-fullwidth-code-point@3.0.0: {} + + is-fullwidth-code-point@4.0.0: {} + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-interactive@1.0.0: {} + + is-lambda@1.0.1: {} + + is-my-ip-valid@1.0.1: + optional: true + + is-my-json-valid@2.20.6: + dependencies: + generate-function: 2.3.1 + generate-object-property: 1.2.0 + is-my-ip-valid: 1.0.1 + jsonpointer: 5.0.1 + xtend: 4.0.2 + optional: true + + is-number@7.0.0: {} + + is-property@1.0.2: + optional: true + + is-stream@1.1.0: {} + + is-unicode-supported@0.1.0: {} + + isbinaryfile@4.0.10: {} + + isexe@2.0.0: {} + + jackspeak@3.4.3: + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + + jest-worker@27.5.1: + dependencies: + '@types/node': 25.0.8 + merge-stream: 2.0.0 + supports-color: 8.1.1 + + jiti@2.6.1: {} + + json-bigint@1.0.0: + dependencies: + bignumber.js: 9.3.1 + + json-buffer@3.0.1: {} + + json-parse-even-better-errors@2.3.1: {} + + json-schema-traverse@1.0.0: {} + + json-stringify-safe@5.0.1: + optional: true + + jsonfile@4.0.0: + optionalDependencies: + graceful-fs: 4.2.11 + + jsonfile@6.2.0: + dependencies: + universalify: 2.0.1 + optionalDependencies: + graceful-fs: 4.2.11 + + jsonpointer@5.0.1: + optional: true + + junk@3.1.0: {} + + jwa@2.0.1: + dependencies: + buffer-equal-constant-time: 1.0.1 + ecdsa-sig-formatter: 1.0.11 + safe-buffer: 5.2.1 + + jws@4.0.1: + dependencies: + jwa: 2.0.1 + safe-buffer: 5.2.1 + + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + + listr2@7.0.2: + dependencies: + cli-truncate: 3.1.0 + colorette: 2.0.20 + eventemitter3: 5.0.1 + log-update: 5.0.1 + rfdc: 1.4.1 + wrap-ansi: 8.1.0 + + load-json-file@2.0.0: + dependencies: + graceful-fs: 4.2.11 + parse-json: 2.2.0 + pify: 2.3.0 + strip-bom: 3.0.0 + + loader-runner@4.3.1: {} + + locate-path@2.0.0: + dependencies: + p-locate: 2.0.0 + path-exists: 3.0.0 + + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + lodash.get@4.4.2: {} + + lodash@4.17.21: {} + + log-symbols@4.1.0: + dependencies: + chalk: 4.1.2 + is-unicode-supported: 0.1.0 + + log-update@5.0.1: + dependencies: + ansi-escapes: 5.0.0 + cli-cursor: 4.0.0 + slice-ansi: 5.0.0 + strip-ansi: 7.1.2 + wrap-ansi: 8.1.0 + + lowercase-keys@2.0.0: {} + + lru-cache@10.4.3: {} + + lru-cache@7.18.3: {} + + macos-alias@0.2.12: + dependencies: + nan: 2.24.0 + optional: true + + make-fetch-happen@10.2.1: + dependencies: + agentkeepalive: 4.6.0 + cacache: 16.1.3 + http-cache-semantics: 4.2.0 + http-proxy-agent: 5.0.0 + https-proxy-agent: 5.0.1 + is-lambda: 1.0.1 + lru-cache: 7.18.3 + minipass: 3.3.6 + minipass-collect: 1.0.2 + minipass-fetch: 2.1.2 + minipass-flush: 1.0.5 + minipass-pipeline: 1.2.4 + negotiator: 0.6.4 + promise-retry: 2.0.1 + socks-proxy-agent: 7.0.0 + ssri: 9.0.1 + transitivePeerDependencies: + - bluebird + - supports-color + + map-age-cleaner@0.1.3: + dependencies: + p-defer: 1.0.0 + + matcher@3.0.0: + dependencies: + escape-string-regexp: 4.0.0 + optional: true + + mem@4.3.0: + dependencies: + map-age-cleaner: 0.1.3 + mimic-fn: 2.1.0 + p-is-promise: 2.1.0 + + merge-stream@2.0.0: {} + + merge2@1.4.1: {} + + micromatch@4.0.8: + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + + mime-db@1.52.0: {} + + mime-types@2.1.35: + dependencies: + mime-db: 1.52.0 + + mimic-fn@2.1.0: {} + + mimic-response@1.0.1: {} + + mimic-response@3.1.0: {} + + minimatch@3.1.2: + dependencies: + brace-expansion: 1.1.12 + + minimatch@5.1.6: + dependencies: + brace-expansion: 2.0.2 + + minimatch@9.0.5: + dependencies: + brace-expansion: 2.0.2 + + minimist@1.2.8: {} + + minipass-collect@1.0.2: + dependencies: + minipass: 3.3.6 + + minipass-fetch@2.1.2: + dependencies: + minipass: 3.3.6 + minipass-sized: 1.0.3 + minizlib: 2.1.2 + optionalDependencies: + encoding: 0.1.13 + + minipass-flush@1.0.5: + dependencies: + minipass: 3.3.6 + + minipass-pipeline@1.2.4: + dependencies: + minipass: 3.3.6 + + minipass-sized@1.0.3: + dependencies: + minipass: 3.3.6 + + minipass@3.3.6: + dependencies: + yallist: 4.0.0 + + minipass@5.0.0: {} + + minipass@7.1.2: {} + + minizlib@2.1.2: + dependencies: + minipass: 3.3.6 + yallist: 4.0.0 + + mkdirp@0.5.6: + dependencies: + minimist: 1.2.8 + optional: true + + mkdirp@1.0.4: {} + + ms@2.0.0: {} + + ms@2.1.3: {} + + murmur-32@0.2.0: + dependencies: + encode-utf8: 1.0.3 + fmix: 0.1.0 + imul: 1.0.1 + optional: true + + mute-stream@1.0.0: {} + + nan@2.24.0: + optional: true + + negotiator@0.6.4: {} + + neo-async@2.6.2: {} + + nice-try@1.0.5: {} + + node-abi@3.85.0: + dependencies: + semver: 7.7.3 + + node-api-version@0.2.1: + dependencies: + semver: 7.7.3 + + node-domexception@1.0.0: {} + + node-fetch@2.7.0(encoding@0.1.13): + dependencies: + whatwg-url: 5.0.0 + optionalDependencies: + encoding: 0.1.13 + + node-fetch@3.3.2: + dependencies: + data-uri-to-buffer: 4.0.1 + fetch-blob: 3.2.0 + formdata-polyfill: 4.0.10 + + node-releases@2.0.27: {} + + nopt@6.0.0: + dependencies: + abbrev: 1.1.1 + + normalize-package-data@2.5.0: + dependencies: + hosted-git-info: 2.8.9 + resolve: 1.22.11 + semver: 5.7.2 + validate-npm-package-license: 3.0.4 + + normalize-url@6.1.0: {} + + npm-run-path@2.0.2: + dependencies: + path-key: 2.0.1 + + object-keys@1.1.1: + optional: true + + once@1.4.0: + dependencies: + wrappy: 1.0.2 + + onetime@5.1.2: + dependencies: + mimic-fn: 2.1.0 + + openai@6.16.0(ws@8.19.0): + optionalDependencies: + ws: 8.19.0 + + ora@5.4.1: + dependencies: + bl: 4.1.0 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-spinners: 2.9.2 + is-interactive: 1.0.0 + is-unicode-supported: 0.1.0 + log-symbols: 4.1.0 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + + os-tmpdir@1.0.2: {} + + p-cancelable@2.1.1: {} + + p-defer@1.0.0: {} + + p-finally@1.0.0: {} + + p-is-promise@2.1.0: {} + + p-limit@1.3.0: + dependencies: + p-try: 1.0.0 + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@2.0.0: + dependencies: + p-limit: 1.3.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + + p-map@4.0.0: + dependencies: + aggregate-error: 3.1.0 + + p-try@1.0.0: {} + + package-json-from-dist@1.0.1: {} + + parse-author@2.0.0: + dependencies: + author-regex: 1.0.0 + + parse-color@1.0.0: + dependencies: + color-convert: 0.5.3 + optional: true + + parse-json@2.2.0: + dependencies: + error-ex: 1.3.4 + + path-exists@3.0.0: {} + + path-exists@4.0.0: {} + + path-is-absolute@1.0.1: {} + + path-key@2.0.1: {} + + path-key@3.1.1: {} + + path-parse@1.0.7: {} + + path-scurry@1.11.1: + dependencies: + lru-cache: 10.4.3 + minipass: 7.1.2 + + path-type@2.0.0: + dependencies: + pify: 2.3.0 + + pe-library@1.0.1: {} + + pend@1.2.0: {} + + picocolors@1.1.1: {} + + picomatch@2.3.1: {} + + pify@2.3.0: {} + + plist@3.1.0: + dependencies: + '@xmldom/xmldom': 0.8.11 + base64-js: 1.5.1 + xmlbuilder: 15.1.1 + + postject@1.0.0-alpha.6: + dependencies: + commander: 9.5.0 + + prettier@3.7.4: {} + + proc-log@2.0.1: {} + + progress@2.0.3: {} + + promise-inflight@1.0.1: {} + + promise-retry@2.0.1: + dependencies: + err-code: 2.0.3 + retry: 0.12.0 + + pump@3.0.3: + dependencies: + end-of-stream: 1.4.5 + once: 1.4.0 + + queue-microtask@1.2.3: {} + + quick-lru@5.1.1: {} + + random-path@0.1.2: + dependencies: + base32-encode: 1.2.0 + murmur-32: 0.2.0 + optional: true + + randombytes@2.1.0: + dependencies: + safe-buffer: 5.2.1 + + read-binary-file-arch@1.0.6: + dependencies: + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + read-pkg-up@2.0.0: + dependencies: + find-up: 2.1.0 + read-pkg: 2.0.0 + + read-pkg@2.0.0: + dependencies: + load-json-file: 2.0.0 + normalize-package-data: 2.5.0 + path-type: 2.0.0 + + readable-stream@3.6.2: + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + + rechoir@0.8.0: + dependencies: + resolve: 1.22.11 + + repeat-string@1.6.1: + optional: true + + require-directory@2.1.1: {} + + require-from-string@2.0.2: {} + + resedit@2.0.3: + dependencies: + pe-library: 1.0.1 + + resolve-alpn@1.2.1: {} + + resolve@1.22.11: + dependencies: + is-core-module: 2.16.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + + responselike@2.0.1: + dependencies: + lowercase-keys: 2.0.0 + + restore-cursor@3.1.0: + dependencies: + onetime: 5.1.2 + signal-exit: 3.0.7 + + restore-cursor@4.0.0: + dependencies: + onetime: 5.1.2 + signal-exit: 3.0.7 + + retry@0.12.0: {} + + reusify@1.1.0: {} + + rfdc@1.4.1: {} + + rimraf@2.6.3: + dependencies: + glob: 7.2.3 + optional: true + + rimraf@3.0.2: + dependencies: + glob: 7.2.3 + + rimraf@5.0.10: + dependencies: + glob: 10.5.0 + + roarr@2.15.4: + dependencies: + boolean: 3.2.0 + detect-node: 2.1.0 + globalthis: 1.0.4 + json-stringify-safe: 5.0.1 + semver-compare: 1.0.0 + sprintf-js: 1.1.3 + optional: true + + run-parallel@1.2.0: + dependencies: + queue-microtask: 1.2.3 + + safe-buffer@5.2.1: {} + + safer-buffer@2.1.2: {} + + schema-utils@4.3.3: + dependencies: + '@types/json-schema': 7.0.15 + ajv: 8.17.1 + ajv-formats: 2.1.1(ajv@8.17.1) + ajv-keywords: 5.1.0(ajv@8.17.1) + + semver-compare@1.0.0: + optional: true + + semver@5.7.2: {} + + semver@6.3.1: {} + + semver@7.7.3: {} + + serialize-error@7.0.1: + dependencies: + type-fest: 0.13.1 + optional: true + + serialize-javascript@6.0.2: + dependencies: + randombytes: 2.1.0 + + shebang-command@1.2.0: + dependencies: + shebang-regex: 1.0.0 + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@1.0.0: {} + + shebang-regex@3.0.0: {} + + signal-exit@3.0.7: {} + + signal-exit@4.1.0: {} + + slice-ansi@5.0.0: + dependencies: + ansi-styles: 6.2.3 + is-fullwidth-code-point: 4.0.0 + + smart-buffer@4.2.0: {} + + socks-proxy-agent@7.0.0: + dependencies: + agent-base: 6.0.2 + debug: 4.4.3 + socks: 2.8.7 + transitivePeerDependencies: + - supports-color + + socks@2.8.7: + dependencies: + ip-address: 10.1.0 + smart-buffer: 4.2.0 + + source-map-support@0.5.21: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + + source-map@0.6.1: {} + + spdx-correct@3.2.0: + dependencies: + spdx-expression-parse: 3.0.1 + spdx-license-ids: 3.0.22 + + spdx-exceptions@2.5.0: {} + + spdx-expression-parse@3.0.1: + dependencies: + spdx-exceptions: 2.5.0 + spdx-license-ids: 3.0.22 + + spdx-license-ids@3.0.22: {} + + sprintf-js@1.1.3: + optional: true + + ssri@9.0.1: + dependencies: + minipass: 3.3.6 + + stream-buffers@2.2.0: + optional: true + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.2 + + string_decoder@1.3.0: + dependencies: + safe-buffer: 5.2.1 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-ansi@7.1.2: + dependencies: + ansi-regex: 6.2.2 + + strip-bom@3.0.0: {} + + strip-eof@1.0.0: {} + + strip-outer@1.0.1: + dependencies: + escape-string-regexp: 1.0.5 + + sumchecker@3.0.1: + dependencies: + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + supports-color@8.1.1: + dependencies: + has-flag: 4.0.0 + + supports-preserve-symlinks-flag@1.0.0: {} + + tapable@2.3.0: {} + + tar@6.2.1: + dependencies: + chownr: 2.0.0 + fs-minipass: 2.1.0 + minipass: 5.0.0 + minizlib: 2.1.2 + mkdirp: 1.0.4 + yallist: 4.0.0 + + temp@0.9.4: + dependencies: + mkdirp: 0.5.6 + rimraf: 2.6.3 + optional: true + + terser-webpack-plugin@5.3.16(webpack@5.104.1): + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + jest-worker: 27.5.1 + schema-utils: 4.3.3 + serialize-javascript: 6.0.2 + terser: 5.44.1 + webpack: 5.104.1 + + terser@5.44.1: + dependencies: + '@jridgewell/source-map': 0.3.11 + acorn: 8.15.0 + commander: 2.20.3 + source-map-support: 0.5.21 + + tiny-each-async@2.0.3: + optional: true + + tmp-promise@3.0.3: + dependencies: + tmp: 0.2.5 + optional: true + + tmp@0.0.33: + dependencies: + os-tmpdir: 1.0.2 + + tmp@0.2.5: + optional: true + + tn1150@0.1.0: + dependencies: + unorm: 1.6.0 + optional: true + + to-data-view@1.1.0: + optional: true + + to-regex-range@5.0.1: + dependencies: + is-number: 7.0.0 + + tr46@0.0.3: {} + + trim-repeated@1.0.0: + dependencies: + escape-string-regexp: 1.0.5 + + type-fest@0.13.1: + optional: true + + type-fest@0.21.3: {} + + type-fest@1.4.0: {} + + typescript@5.4.5: {} + + undici-types@6.21.0: {} + + undici-types@7.16.0: {} + + unique-filename@2.0.1: + dependencies: + unique-slug: 3.0.0 + + unique-slug@3.0.0: + dependencies: + imurmurhash: 0.1.4 + + universalify@0.1.2: {} + + universalify@2.0.1: {} + + unorm@1.6.0: + optional: true + + update-browserslist-db@1.2.3(browserslist@4.28.1): + dependencies: + browserslist: 4.28.1 + escalade: 3.2.0 + picocolors: 1.1.1 + + username@5.1.0: + dependencies: + execa: 1.0.0 + mem: 4.3.0 + + util-deprecate@1.0.2: {} + + validate-npm-package-license@3.0.4: + dependencies: + spdx-correct: 3.2.0 + spdx-expression-parse: 3.0.1 + + watchpack@2.5.0: + dependencies: + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.11 + + wcwidth@1.0.1: + dependencies: + defaults: 1.0.4 + + web-streams-polyfill@3.3.3: {} + + webidl-conversions@3.0.1: {} + + webpack-sources@3.3.3: {} + + webpack@5.104.1: + dependencies: + '@types/eslint-scope': 3.7.7 + '@types/estree': 1.0.8 + '@types/json-schema': 7.0.15 + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/wasm-edit': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + acorn: 8.15.0 + acorn-import-phases: 1.0.4(acorn@8.15.0) + browserslist: 4.28.1 + chrome-trace-event: 1.0.4 + enhanced-resolve: 5.18.4 + es-module-lexer: 2.0.0 + eslint-scope: 5.1.1 + events: 3.3.0 + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.11 + json-parse-even-better-errors: 2.3.1 + loader-runner: 4.3.1 + mime-types: 2.1.35 + neo-async: 2.6.2 + schema-utils: 4.3.3 + tapable: 2.3.0 + terser-webpack-plugin: 5.3.16(webpack@5.104.1) + watchpack: 2.5.0 + webpack-sources: 3.3.3 + transitivePeerDependencies: + - '@swc/core' + - esbuild + - uglify-js + + whatwg-url@5.0.0: + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + + which@1.3.1: + dependencies: + isexe: 2.0.0 + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + word-wrap@1.2.5: + optional: true + + wrap-ansi@6.2.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.3 + string-width: 5.1.2 + strip-ansi: 7.1.2 + + wrappy@1.0.2: {} + + ws@8.19.0: {} + + xmlbuilder@15.1.1: {} + + xtend@4.0.2: + optional: true + + y18n@5.0.8: {} + + yallist@4.0.0: {} + + yargs-parser@20.2.9: + optional: true + + yargs-parser@21.1.1: {} + + yargs@16.2.0: + dependencies: + cliui: 7.0.4 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 20.2.9 + optional: true + + yargs@17.7.2: + dependencies: + cliui: 8.0.1 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + + yauzl@2.10.0: + dependencies: + buffer-crc32: 0.2.13 + fd-slicer: 1.1.0 + + yocto-queue@0.1.0: {} + + yoctocolors-cjs@2.1.3: {} diff --git a/src/assets/SystemAudioDump b/src/assets/SystemAudioDump new file mode 100755 index 0000000..56bcc77 Binary files /dev/null and b/src/assets/SystemAudioDump differ diff --git a/src/assets/highlight-11.9.0.min.js b/src/assets/highlight-11.9.0.min.js new file mode 100644 index 0000000..5d699ae --- /dev/null +++ b/src/assets/highlight-11.9.0.min.js @@ -0,0 +1,1213 @@ +/*! + Highlight.js v11.9.0 (git: f47103d4f1) + (c) 2006-2023 undefined and other contributors + License: BSD-3-Clause + */ +var hljs=function(){"use strict";function e(n){ +return n instanceof Map?n.clear=n.delete=n.set=()=>{ +throw Error("map is read-only")}:n instanceof Set&&(n.add=n.clear=n.delete=()=>{ +throw Error("set is read-only") +}),Object.freeze(n),Object.getOwnPropertyNames(n).forEach((t=>{ +const a=n[t],i=typeof a;"object"!==i&&"function"!==i||Object.isFrozen(a)||e(a) +})),n}class n{constructor(e){ +void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1} +ignoreMatch(){this.isMatchIgnored=!0}}function t(e){ +return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'") +}function a(e,...n){const t=Object.create(null);for(const n in e)t[n]=e[n] +;return n.forEach((e=>{for(const n in e)t[n]=e[n]})),t}const i=e=>!!e.scope +;class r{constructor(e,n){ +this.buffer="",this.classPrefix=n.classPrefix,e.walk(this)}addText(e){ +this.buffer+=t(e)}openNode(e){if(!i(e))return;const n=((e,{prefix:n})=>{ +if(e.startsWith("language:"))return e.replace("language:","language-") +;if(e.includes(".")){const t=e.split(".") +;return[`${n}${t.shift()}`,...t.map(((e,n)=>`${e}${"_".repeat(n+1)}`))].join(" ") +}return`${n}${e}`})(e.scope,{prefix:this.classPrefix});this.span(n)} +closeNode(e){i(e)&&(this.buffer+="")}value(){return this.buffer}span(e){ +this.buffer+=``}}const s=(e={})=>{const n={children:[]} +;return Object.assign(n,e),n};class o{constructor(){ +this.rootNode=s(),this.stack=[this.rootNode]}get top(){ +return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){ +this.top.children.push(e)}openNode(e){const n=s({scope:e}) +;this.add(n),this.stack.push(n)}closeNode(){ +if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){ +for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)} +walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,n){ +return"string"==typeof n?e.addText(n):n.children&&(e.openNode(n), +n.children.forEach((n=>this._walk(e,n))),e.closeNode(n)),e}static _collapse(e){ +"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{ +o._collapse(e)})))}}class l extends o{constructor(e){super(),this.options=e} +addText(e){""!==e&&this.add(e)}startScope(e){this.openNode(e)}endScope(){ +this.closeNode()}__addSublanguage(e,n){const t=e.root +;n&&(t.scope="language:"+n),this.add(t)}toHTML(){ +return new r(this,this.options).value()}finalize(){ +return this.closeAllNodes(),!0}}function c(e){ +return e?"string"==typeof e?e:e.source:null}function d(e){return b("(?=",e,")")} +function g(e){return b("(?:",e,")*")}function u(e){return b("(?:",e,")?")} +function b(...e){return e.map((e=>c(e))).join("")}function m(...e){const n=(e=>{ +const n=e[e.length-1] +;return"object"==typeof n&&n.constructor===Object?(e.splice(e.length-1,1),n):{} +})(e);return"("+(n.capture?"":"?:")+e.map((e=>c(e))).join("|")+")"} +function p(e){return RegExp(e.toString()+"|").exec("").length-1} +const _=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./ +;function h(e,{joinWith:n}){let t=0;return e.map((e=>{t+=1;const n=t +;let a=c(e),i="";for(;a.length>0;){const e=_.exec(a);if(!e){i+=a;break} +i+=a.substring(0,e.index), +a=a.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?i+="\\"+(Number(e[1])+n):(i+=e[0], +"("===e[0]&&t++)}return i})).map((e=>`(${e})`)).join(n)} +const f="[a-zA-Z]\\w*",E="[a-zA-Z_]\\w*",y="\\b\\d+(\\.\\d+)?",N="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",w="\\b(0b[01]+)",v={ +begin:"\\\\[\\s\\S]",relevance:0},O={scope:"string",begin:"'",end:"'", +illegal:"\\n",contains:[v]},k={scope:"string",begin:'"',end:'"',illegal:"\\n", +contains:[v]},x=(e,n,t={})=>{const i=a({scope:"comment",begin:e,end:n, +contains:[]},t);i.contains.push({scope:"doctag", +begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)", +end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0}) +;const r=m("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/) +;return i.contains.push({begin:b(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i +},M=x("//","$"),S=x("/\\*","\\*/"),A=x("#","$");var C=Object.freeze({ +__proto__:null,APOS_STRING_MODE:O,BACKSLASH_ESCAPE:v,BINARY_NUMBER_MODE:{ +scope:"number",begin:w,relevance:0},BINARY_NUMBER_RE:w,COMMENT:x, +C_BLOCK_COMMENT_MODE:S,C_LINE_COMMENT_MODE:M,C_NUMBER_MODE:{scope:"number", +begin:N,relevance:0},C_NUMBER_RE:N,END_SAME_AS_BEGIN:e=>Object.assign(e,{ +"on:begin":(e,n)=>{n.data._beginMatch=e[1]},"on:end":(e,n)=>{ +n.data._beginMatch!==e[1]&&n.ignoreMatch()}}),HASH_COMMENT_MODE:A,IDENT_RE:f, +MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:{begin:"\\.\\s*"+E,relevance:0}, +NUMBER_MODE:{scope:"number",begin:y,relevance:0},NUMBER_RE:y, +PHRASAL_WORDS_MODE:{ +begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ +},QUOTE_STRING_MODE:k,REGEXP_MODE:{scope:"regexp",begin:/\/(?=[^/\n]*\/)/, +end:/\/[gimuy]*/,contains:[v,{begin:/\[/,end:/\]/,relevance:0,contains:[v]}]}, +RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", +SHEBANG:(e={})=>{const n=/^#![ ]*\// +;return e.binary&&(e.begin=b(n,/.*\b/,e.binary,/\b.*/)),a({scope:"meta",begin:n, +end:/$/,relevance:0,"on:begin":(e,n)=>{0!==e.index&&n.ignoreMatch()}},e)}, +TITLE_MODE:{scope:"title",begin:f,relevance:0},UNDERSCORE_IDENT_RE:E, +UNDERSCORE_TITLE_MODE:{scope:"title",begin:E,relevance:0}});function T(e,n){ +"."===e.input[e.index-1]&&n.ignoreMatch()}function R(e,n){ +void 0!==e.className&&(e.scope=e.className,delete e.className)}function D(e,n){ +n&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)", +e.__beforeBegin=T,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords, +void 0===e.relevance&&(e.relevance=0))}function I(e,n){ +Array.isArray(e.illegal)&&(e.illegal=m(...e.illegal))}function L(e,n){ +if(e.match){ +if(e.begin||e.end)throw Error("begin & end are not supported with match") +;e.begin=e.match,delete e.match}}function B(e,n){ +void 0===e.relevance&&(e.relevance=1)}const $=(e,n)=>{if(!e.beforeMatch)return +;if(e.starts)throw Error("beforeMatch cannot be used with starts") +;const t=Object.assign({},e);Object.keys(e).forEach((n=>{delete e[n] +})),e.keywords=t.keywords,e.begin=b(t.beforeMatch,d(t.begin)),e.starts={ +relevance:0,contains:[Object.assign(t,{endsParent:!0})] +},e.relevance=0,delete t.beforeMatch +},z=["of","and","for","in","not","or","if","then","parent","list","value"],F="keyword" +;function U(e,n,t=F){const a=Object.create(null) +;return"string"==typeof e?i(t,e.split(" ")):Array.isArray(e)?i(t,e):Object.keys(e).forEach((t=>{ +Object.assign(a,U(e[t],n,t))})),a;function i(e,t){ +n&&(t=t.map((e=>e.toLowerCase()))),t.forEach((n=>{const t=n.split("|") +;a[t[0]]=[e,j(t[0],t[1])]}))}}function j(e,n){ +return n?Number(n):(e=>z.includes(e.toLowerCase()))(e)?0:1}const P={},K=e=>{ +console.error(e)},H=(e,...n)=>{console.log("WARN: "+e,...n)},q=(e,n)=>{ +P[`${e}/${n}`]||(console.log(`Deprecated as of ${e}. ${n}`),P[`${e}/${n}`]=!0) +},G=Error();function Z(e,n,{key:t}){let a=0;const i=e[t],r={},s={} +;for(let e=1;e<=n.length;e++)s[e+a]=i[e],r[e+a]=!0,a+=p(n[e-1]) +;e[t]=s,e[t]._emit=r,e[t]._multi=!0}function W(e){(e=>{ +e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope, +delete e.scope)})(e),"string"==typeof e.beginScope&&(e.beginScope={ +_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope +}),(e=>{if(Array.isArray(e.begin)){ +if(e.skip||e.excludeBegin||e.returnBegin)throw K("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), +G +;if("object"!=typeof e.beginScope||null===e.beginScope)throw K("beginScope must be object"), +G;Z(e,e.begin,{key:"beginScope"}),e.begin=h(e.begin,{joinWith:""})}})(e),(e=>{ +if(Array.isArray(e.end)){ +if(e.skip||e.excludeEnd||e.returnEnd)throw K("skip, excludeEnd, returnEnd not compatible with endScope: {}"), +G +;if("object"!=typeof e.endScope||null===e.endScope)throw K("endScope must be object"), +G;Z(e,e.end,{key:"endScope"}),e.end=h(e.end,{joinWith:""})}})(e)}function Q(e){ +function n(n,t){ +return RegExp(c(n),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(t?"g":"")) +}class t{constructor(){ +this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0} +addRule(e,n){ +n.position=this.position++,this.matchIndexes[this.matchAt]=n,this.regexes.push([n,e]), +this.matchAt+=p(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null) +;const e=this.regexes.map((e=>e[1]));this.matcherRe=n(h(e,{joinWith:"|" +}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex +;const n=this.matcherRe.exec(e);if(!n)return null +;const t=n.findIndex(((e,n)=>n>0&&void 0!==e)),a=this.matchIndexes[t] +;return n.splice(0,t),Object.assign(n,a)}}class i{constructor(){ +this.rules=[],this.multiRegexes=[], +this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){ +if(this.multiRegexes[e])return this.multiRegexes[e];const n=new t +;return this.rules.slice(e).forEach((([e,t])=>n.addRule(e,t))), +n.compile(),this.multiRegexes[e]=n,n}resumingScanAtSamePosition(){ +return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,n){ +this.rules.push([e,n]),"begin"===n.type&&this.count++}exec(e){ +const n=this.getMatcher(this.regexIndex);n.lastIndex=this.lastIndex +;let t=n.exec(e) +;if(this.resumingScanAtSamePosition())if(t&&t.index===this.lastIndex);else{ +const n=this.getMatcher(0);n.lastIndex=this.lastIndex+1,t=n.exec(e)} +return t&&(this.regexIndex+=t.position+1, +this.regexIndex===this.count&&this.considerAll()),t}} +if(e.compilerExtensions||(e.compilerExtensions=[]), +e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.") +;return e.classNameAliases=a(e.classNameAliases||{}),function t(r,s){const o=r +;if(r.isCompiled)return o +;[R,L,W,$].forEach((e=>e(r,s))),e.compilerExtensions.forEach((e=>e(r,s))), +r.__beforeBegin=null,[D,I,B].forEach((e=>e(r,s))),r.isCompiled=!0;let l=null +;return"object"==typeof r.keywords&&r.keywords.$pattern&&(r.keywords=Object.assign({},r.keywords), +l=r.keywords.$pattern, +delete r.keywords.$pattern),l=l||/\w+/,r.keywords&&(r.keywords=U(r.keywords,e.case_insensitive)), +o.keywordPatternRe=n(l,!0), +s&&(r.begin||(r.begin=/\B|\b/),o.beginRe=n(o.begin),r.end||r.endsWithParent||(r.end=/\B|\b/), +r.end&&(o.endRe=n(o.end)), +o.terminatorEnd=c(o.end)||"",r.endsWithParent&&s.terminatorEnd&&(o.terminatorEnd+=(r.end?"|":"")+s.terminatorEnd)), +r.illegal&&(o.illegalRe=n(r.illegal)), +r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map((e=>(e=>(e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((n=>a(e,{ +variants:null},n)))),e.cachedVariants?e.cachedVariants:X(e)?a(e,{ +starts:e.starts?a(e.starts):null +}):Object.isFrozen(e)?a(e):e))("self"===e?r:e)))),r.contains.forEach((e=>{t(e,o) +})),r.starts&&t(r.starts,s),o.matcher=(e=>{const n=new i +;return e.contains.forEach((e=>n.addRule(e.begin,{rule:e,type:"begin" +}))),e.terminatorEnd&&n.addRule(e.terminatorEnd,{type:"end" +}),e.illegal&&n.addRule(e.illegal,{type:"illegal"}),n})(o),o}(e)}function X(e){ +return!!e&&(e.endsWithParent||X(e.starts))}class V extends Error{ +constructor(e,n){super(e),this.name="HTMLInjectionError",this.html=n}} +const J=t,Y=a,ee=Symbol("nomatch"),ne=t=>{ +const a=Object.create(null),i=Object.create(null),r=[];let s=!0 +;const o="Could not find the language '{}', did you forget to load/include a language module?",c={ +disableAutodetect:!0,name:"Plain text",contains:[]};let p={ +ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i, +languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-", +cssSelector:"pre code",languages:null,__emitter:l};function _(e){ +return p.noHighlightRe.test(e)}function h(e,n,t){let a="",i="" +;"object"==typeof n?(a=e, +t=n.ignoreIllegals,i=n.language):(q("10.7.0","highlight(lang, code, ...args) has been deprecated."), +q("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), +i=e,a=n),void 0===t&&(t=!0);const r={code:a,language:i};x("before:highlight",r) +;const s=r.result?r.result:f(r.language,r.code,t) +;return s.code=r.code,x("after:highlight",s),s}function f(e,t,i,r){ +const l=Object.create(null);function c(){if(!x.keywords)return void S.addText(A) +;let e=0;x.keywordPatternRe.lastIndex=0;let n=x.keywordPatternRe.exec(A),t="" +;for(;n;){t+=A.substring(e,n.index) +;const i=w.case_insensitive?n[0].toLowerCase():n[0],r=(a=i,x.keywords[a]);if(r){ +const[e,a]=r +;if(S.addText(t),t="",l[i]=(l[i]||0)+1,l[i]<=7&&(C+=a),e.startsWith("_"))t+=n[0];else{ +const t=w.classNameAliases[e]||e;g(n[0],t)}}else t+=n[0] +;e=x.keywordPatternRe.lastIndex,n=x.keywordPatternRe.exec(A)}var a +;t+=A.substring(e),S.addText(t)}function d(){null!=x.subLanguage?(()=>{ +if(""===A)return;let e=null;if("string"==typeof x.subLanguage){ +if(!a[x.subLanguage])return void S.addText(A) +;e=f(x.subLanguage,A,!0,M[x.subLanguage]),M[x.subLanguage]=e._top +}else e=E(A,x.subLanguage.length?x.subLanguage:null) +;x.relevance>0&&(C+=e.relevance),S.__addSublanguage(e._emitter,e.language) +})():c(),A=""}function g(e,n){ +""!==e&&(S.startScope(n),S.addText(e),S.endScope())}function u(e,n){let t=1 +;const a=n.length-1;for(;t<=a;){if(!e._emit[t]){t++;continue} +const a=w.classNameAliases[e[t]]||e[t],i=n[t];a?g(i,a):(A=i,c(),A=""),t++}} +function b(e,n){ +return e.scope&&"string"==typeof e.scope&&S.openNode(w.classNameAliases[e.scope]||e.scope), +e.beginScope&&(e.beginScope._wrap?(g(A,w.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap), +A=""):e.beginScope._multi&&(u(e.beginScope,n),A="")),x=Object.create(e,{parent:{ +value:x}}),x}function m(e,t,a){let i=((e,n)=>{const t=e&&e.exec(n) +;return t&&0===t.index})(e.endRe,a);if(i){if(e["on:end"]){const a=new n(e) +;e["on:end"](t,a),a.isMatchIgnored&&(i=!1)}if(i){ +for(;e.endsParent&&e.parent;)e=e.parent;return e}} +if(e.endsWithParent)return m(e.parent,t,a)}function _(e){ +return 0===x.matcher.regexIndex?(A+=e[0],1):(D=!0,0)}function h(e){ +const n=e[0],a=t.substring(e.index),i=m(x,e,a);if(!i)return ee;const r=x +;x.endScope&&x.endScope._wrap?(d(), +g(n,x.endScope._wrap)):x.endScope&&x.endScope._multi?(d(), +u(x.endScope,e)):r.skip?A+=n:(r.returnEnd||r.excludeEnd||(A+=n), +d(),r.excludeEnd&&(A=n));do{ +x.scope&&S.closeNode(),x.skip||x.subLanguage||(C+=x.relevance),x=x.parent +}while(x!==i.parent);return i.starts&&b(i.starts,e),r.returnEnd?0:n.length} +let y={};function N(a,r){const o=r&&r[0];if(A+=a,null==o)return d(),0 +;if("begin"===y.type&&"end"===r.type&&y.index===r.index&&""===o){ +if(A+=t.slice(r.index,r.index+1),!s){const n=Error(`0 width match regex (${e})`) +;throw n.languageName=e,n.badRule=y.rule,n}return 1} +if(y=r,"begin"===r.type)return(e=>{ +const t=e[0],a=e.rule,i=new n(a),r=[a.__beforeBegin,a["on:begin"]] +;for(const n of r)if(n&&(n(e,i),i.isMatchIgnored))return _(t) +;return a.skip?A+=t:(a.excludeBegin&&(A+=t), +d(),a.returnBegin||a.excludeBegin||(A=t)),b(a,e),a.returnBegin?0:t.length})(r) +;if("illegal"===r.type&&!i){ +const e=Error('Illegal lexeme "'+o+'" for mode "'+(x.scope||"")+'"') +;throw e.mode=x,e}if("end"===r.type){const e=h(r);if(e!==ee)return e} +if("illegal"===r.type&&""===o)return 1 +;if(R>1e5&&R>3*r.index)throw Error("potential infinite loop, way more iterations than matches") +;return A+=o,o.length}const w=v(e) +;if(!w)throw K(o.replace("{}",e)),Error('Unknown language: "'+e+'"') +;const O=Q(w);let k="",x=r||O;const M={},S=new p.__emitter(p);(()=>{const e=[] +;for(let n=x;n!==w;n=n.parent)n.scope&&e.unshift(n.scope) +;e.forEach((e=>S.openNode(e)))})();let A="",C=0,T=0,R=0,D=!1;try{ +if(w.__emitTokens)w.__emitTokens(t,S);else{for(x.matcher.considerAll();;){ +R++,D?D=!1:x.matcher.considerAll(),x.matcher.lastIndex=T +;const e=x.matcher.exec(t);if(!e)break;const n=N(t.substring(T,e.index),e) +;T=e.index+n}N(t.substring(T))}return S.finalize(),k=S.toHTML(),{language:e, +value:k,relevance:C,illegal:!1,_emitter:S,_top:x}}catch(n){ +if(n.message&&n.message.includes("Illegal"))return{language:e,value:J(t), +illegal:!0,relevance:0,_illegalBy:{message:n.message,index:T, +context:t.slice(T-100,T+100),mode:n.mode,resultSoFar:k},_emitter:S};if(s)return{ +language:e,value:J(t),illegal:!1,relevance:0,errorRaised:n,_emitter:S,_top:x} +;throw n}}function E(e,n){n=n||p.languages||Object.keys(a);const t=(e=>{ +const n={value:J(e),illegal:!1,relevance:0,_top:c,_emitter:new p.__emitter(p)} +;return n._emitter.addText(e),n})(e),i=n.filter(v).filter(k).map((n=>f(n,e,!1))) +;i.unshift(t);const r=i.sort(((e,n)=>{ +if(e.relevance!==n.relevance)return n.relevance-e.relevance +;if(e.language&&n.language){if(v(e.language).supersetOf===n.language)return 1 +;if(v(n.language).supersetOf===e.language)return-1}return 0})),[s,o]=r,l=s +;return l.secondBest=o,l}function y(e){let n=null;const t=(e=>{ +let n=e.className+" ";n+=e.parentNode?e.parentNode.className:"" +;const t=p.languageDetectRe.exec(n);if(t){const n=v(t[1]) +;return n||(H(o.replace("{}",t[1])), +H("Falling back to no-highlight mode for this block.",e)),n?t[1]:"no-highlight"} +return n.split(/\s+/).find((e=>_(e)||v(e)))})(e);if(_(t))return +;if(x("before:highlightElement",{el:e,language:t +}),e.dataset.highlighted)return void console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e) +;if(e.children.length>0&&(p.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), +console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), +console.warn("The element with unescaped HTML:"), +console.warn(e)),p.throwUnescapedHTML))throw new V("One of your code blocks includes unescaped HTML.",e.innerHTML) +;n=e;const a=n.textContent,r=t?h(a,{language:t,ignoreIllegals:!0}):E(a) +;e.innerHTML=r.value,e.dataset.highlighted="yes",((e,n,t)=>{const a=n&&i[n]||t +;e.classList.add("hljs"),e.classList.add("language-"+a) +})(e,t,r.language),e.result={language:r.language,re:r.relevance, +relevance:r.relevance},r.secondBest&&(e.secondBest={ +language:r.secondBest.language,relevance:r.secondBest.relevance +}),x("after:highlightElement",{el:e,result:r,text:a})}let N=!1;function w(){ +"loading"!==document.readyState?document.querySelectorAll(p.cssSelector).forEach(y):N=!0 +}function v(e){return e=(e||"").toLowerCase(),a[e]||a[i[e]]} +function O(e,{languageName:n}){"string"==typeof e&&(e=[e]),e.forEach((e=>{ +i[e.toLowerCase()]=n}))}function k(e){const n=v(e) +;return n&&!n.disableAutodetect}function x(e,n){const t=e;r.forEach((e=>{ +e[t]&&e[t](n)}))} +"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(()=>{ +N&&w()}),!1),Object.assign(t,{highlight:h,highlightAuto:E,highlightAll:w, +highlightElement:y, +highlightBlock:e=>(q("10.7.0","highlightBlock will be removed entirely in v12.0"), +q("10.7.0","Please use highlightElement now."),y(e)),configure:e=>{p=Y(p,e)}, +initHighlighting:()=>{ +w(),q("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")}, +initHighlightingOnLoad:()=>{ +w(),q("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.") +},registerLanguage:(e,n)=>{let i=null;try{i=n(t)}catch(n){ +if(K("Language definition for '{}' could not be registered.".replace("{}",e)), +!s)throw n;K(n),i=c} +i.name||(i.name=e),a[e]=i,i.rawDefinition=n.bind(null,t),i.aliases&&O(i.aliases,{ +languageName:e})},unregisterLanguage:e=>{delete a[e] +;for(const n of Object.keys(i))i[n]===e&&delete i[n]}, +listLanguages:()=>Object.keys(a),getLanguage:v,registerAliases:O, +autoDetection:k,inherit:Y,addPlugin:e=>{(e=>{ +e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=n=>{ +e["before:highlightBlock"](Object.assign({block:n.el},n)) +}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=n=>{ +e["after:highlightBlock"](Object.assign({block:n.el},n))})})(e),r.push(e)}, +removePlugin:e=>{const n=r.indexOf(e);-1!==n&&r.splice(n,1)}}),t.debugMode=()=>{ +s=!1},t.safeMode=()=>{s=!0},t.versionString="11.9.0",t.regex={concat:b, +lookahead:d,either:m,optional:u,anyNumberOfTimes:g} +;for(const n in C)"object"==typeof C[n]&&e(C[n]);return Object.assign(t,C),t +},te=ne({});te.newInstance=()=>ne({});var ae=te;const ie=e=>({IMPORTANT:{ +scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{ +scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/}, +FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/}, +ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$", +contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{ +scope:"number", +begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?", +relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/} +}),re=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],se=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],oe=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],le=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],ce=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse(),de=oe.concat(le) +;var ge="[0-9](_*[0-9])*",ue=`\\.(${ge})`,be="[0-9a-fA-F](_*[0-9a-fA-F])*",me={ +className:"number",variants:[{ +begin:`(\\b(${ge})((${ue})|\\.)?|(${ue}))[eE][+-]?(${ge})[fFdD]?\\b`},{ +begin:`\\b(${ge})((${ue})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{ +begin:`(${ue})[fFdD]?\\b`},{begin:`\\b(${ge})[fFdD]\\b`},{ +begin:`\\b0[xX]((${be})\\.?|(${be})?\\.(${be}))[pP][+-]?(${ge})[fFdD]?\\b`},{ +begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${be})[lL]?\\b`},{ +begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}], +relevance:0};function pe(e,n,t){return-1===t?"":e.replace(n,(a=>pe(e,n,t-1)))} +const _e="[A-Za-z$_][0-9A-Za-z$_]*",he=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],fe=["true","false","null","undefined","NaN","Infinity"],Ee=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ye=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Ne=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],we=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],ve=[].concat(Ne,Ee,ye) +;function Oe(e){const n=e.regex,t=_e,a={begin:/<[A-Za-z0-9\\._:-]+/, +end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,n)=>{ +const t=e[0].length+e.index,a=e.input[t] +;if("<"===a||","===a)return void n.ignoreMatch();let i +;">"===a&&(((e,{after:n})=>{const t="",M={ +match:[/const|var|let/,/\s+/,t,/\s*/,/=\s*/,/(async\s*)?/,n.lookahead(x)], +keywords:"async",className:{1:"keyword",3:"title.function"},contains:[f]} +;return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:i,exports:{ +PARAMS_CONTAINS:h,CLASS_REFERENCE:y},illegal:/#(?![$_A-z])/, +contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{ +label:"use_strict",className:"meta",relevance:10, +begin:/^\s*['"]use (strict|asm)['"]/ +},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,g,u,b,m,{match:/\$\d+/},l,y,{ +className:"attr",begin:t+n.lookahead(":"),relevance:0},M,{ +begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*", +keywords:"return throw case",relevance:0,contains:[m,e.REGEXP_MODE,{ +className:"function",begin:x,returnBegin:!0,end:"\\s*=>",contains:[{ +className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{ +className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0, +excludeEnd:!0,keywords:i,contains:h}]}]},{begin:/,/,relevance:0},{match:/\s+/, +relevance:0},{variants:[{begin:"<>",end:""},{ +match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:a.begin, +"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{ +begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},N,{ +beginKeywords:"while if switch catch for"},{ +begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", +returnBegin:!0,label:"func.def",contains:[f,e.inherit(e.TITLE_MODE,{begin:t, +className:"title.function"})]},{match:/\.\.\./,relevance:0},O,{match:"\\$"+t, +relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"}, +contains:[f]},w,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/, +className:"variable.constant"},E,k,{match:/\$[(.]/}]}} +const ke=e=>b(/\b/,e,/\w$/.test(e)?/\b/:/\B/),xe=["Protocol","Type"].map(ke),Me=["init","self"].map(ke),Se=["Any","Self"],Ae=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],Ce=["false","nil","true"],Te=["assignment","associativity","higherThan","left","lowerThan","none","right"],Re=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],De=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],Ie=m(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),Le=m(Ie,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Be=b(Ie,Le,"*"),$e=m(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),ze=m($e,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Fe=b($e,ze,"*"),Ue=b(/[A-Z]/,ze,"*"),je=["attached","autoclosure",b(/convention\(/,m("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",b(/objc\(/,Fe,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],Pe=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"] +;var Ke=Object.freeze({__proto__:null,grmr_bash:e=>{const n=e.regex,t={},a={ +begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[t]}]} +;Object.assign(t,{className:"variable",variants:[{ +begin:n.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},a]});const i={ +className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},r={ +begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/, +end:/(\w+)/,className:"string"})]}},s={className:"string",begin:/"/,end:/"/, +contains:[e.BACKSLASH_ESCAPE,t,i]};i.contains.push(s);const o={begin:/\$?\(\(/, +end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,t] +},l=e.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10 +}),c={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0, +contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{ +name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/, +keyword:["if","then","else","elif","fi","for","while","until","in","do","done","case","esac","function","select"], +literal:["true","false"], +built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias","set","shopt","autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp","chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"] +},contains:[l,e.SHEBANG(),c,o,e.HASH_COMMENT_MODE,r,{match:/(\/[a-z._-]+)+/},s,{ +match:/\\"/},{className:"string",begin:/'/,end:/'/},{match:/\\'/},t]}}, +grmr_c:e=>{const n=e.regex,t=e.COMMENT("//","$",{contains:[{begin:/\\\n/}] +}),a="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",r="("+a+"|"+n.optional(i)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",s={ +className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{ +match:/\batomic_[a-z]{3,6}\b/}]},o={className:"string",variants:[{ +begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{ +begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", +end:"'",illegal:"."},e.END_SAME_AS_BEGIN({ +begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={ +className:"number",variants:[{begin:"\\b(0b[01']+)"},{ +begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" +},{ +begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" +}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{ +keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" +},contains:[{begin:/\\\n/,relevance:0},e.inherit(o,{className:"string"}),{ +className:"string",begin:/<.*?>/},t,e.C_BLOCK_COMMENT_MODE]},d={ +className:"title",begin:n.optional(i)+e.IDENT_RE,relevance:0 +},g=n.optional(i)+e.IDENT_RE+"\\s*\\(",u={ +keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"], +type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"], +literal:"true false NULL", +built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr" +},b=[c,s,t,e.C_BLOCK_COMMENT_MODE,l,o],m={variants:[{begin:/=/,end:/;/},{ +begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}], +keywords:u,contains:b.concat([{begin:/\(/,end:/\)/,keywords:u, +contains:b.concat(["self"]),relevance:0}]),relevance:0},p={ +begin:"("+r+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0, +keywords:u,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:u,relevance:0},{ +begin:g,returnBegin:!0,contains:[e.inherit(d,{className:"title.function"})], +relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/, +keywords:u,relevance:0,contains:[t,e.C_BLOCK_COMMENT_MODE,o,l,s,{begin:/\(/, +end:/\)/,keywords:u,relevance:0,contains:["self",t,e.C_BLOCK_COMMENT_MODE,o,l,s] +}]},s,t,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C",aliases:["h"],keywords:u, +disableAutodetect:!0,illegal:"=]/,contains:[{ +beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c, +strings:o,keywords:u}}},grmr_cpp:e=>{const n=e.regex,t=e.COMMENT("//","$",{ +contains:[{begin:/\\\n/}] +}),a="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",r="(?!struct)("+a+"|"+n.optional(i)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",s={ +className:"type",begin:"\\b[a-z\\d_]*_t\\b"},o={className:"string",variants:[{ +begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{ +begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", +end:"'",illegal:"."},e.END_SAME_AS_BEGIN({ +begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={ +className:"number",variants:[{begin:"\\b(0b[01']+)"},{ +begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" +},{ +begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" +}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{ +keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" +},contains:[{begin:/\\\n/,relevance:0},e.inherit(o,{className:"string"}),{ +className:"string",begin:/<.*?>/},t,e.C_BLOCK_COMMENT_MODE]},d={ +className:"title",begin:n.optional(i)+e.IDENT_RE,relevance:0 +},g=n.optional(i)+e.IDENT_RE+"\\s*\\(",u={ +type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"], +keyword:["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"], +literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"], +_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"] +},b={className:"function.dispatch",relevance:0,keywords:{ +_hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"] +}, +begin:n.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,n.lookahead(/(<[^<>]+>|)\s*\(/)) +},m=[b,c,s,t,e.C_BLOCK_COMMENT_MODE,l,o],p={variants:[{begin:/=/,end:/;/},{ +begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}], +keywords:u,contains:m.concat([{begin:/\(/,end:/\)/,keywords:u, +contains:m.concat(["self"]),relevance:0}]),relevance:0},_={className:"function", +begin:"("+r+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0, +keywords:u,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:u,relevance:0},{ +begin:g,returnBegin:!0,contains:[d],relevance:0},{begin:/::/,relevance:0},{ +begin:/:/,endsWithParent:!0,contains:[o,l]},{relevance:0,match:/,/},{ +className:"params",begin:/\(/,end:/\)/,keywords:u,relevance:0, +contains:[t,e.C_BLOCK_COMMENT_MODE,o,l,s,{begin:/\(/,end:/\)/,keywords:u, +relevance:0,contains:["self",t,e.C_BLOCK_COMMENT_MODE,o,l,s]}] +},s,t,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++", +aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:u,illegal:"",keywords:u,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:u},{ +match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/], +className:{1:"keyword",3:"title.class"}}])}},grmr_csharp:e=>{const n={ +keyword:["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"]), +built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"], +literal:["default","false","null","true"]},t=e.inherit(e.TITLE_MODE,{ +begin:"[a-zA-Z](\\.?\\w)*"}),a={className:"number",variants:[{ +begin:"\\b(0b[01']+)"},{ +begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{ +begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" +}],relevance:0},i={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}] +},r=e.inherit(i,{illegal:/\n/}),s={className:"subst",begin:/\{/,end:/\}/, +keywords:n},o=e.inherit(s,{illegal:/\n/}),l={className:"string",begin:/\$"/, +end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/ +},e.BACKSLASH_ESCAPE,o]},c={className:"string",begin:/\$@"/,end:'"',contains:[{ +begin:/\{\{/},{begin:/\}\}/},{begin:'""'},s]},d=e.inherit(c,{illegal:/\n/, +contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},o]}) +;s.contains=[c,l,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_BLOCK_COMMENT_MODE], +o.contains=[d,l,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.inherit(e.C_BLOCK_COMMENT_MODE,{ +illegal:/\n/})];const g={variants:[c,l,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE] +},u={begin:"<",end:">",contains:[{beginKeywords:"in out"},t] +},b=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",m={ +begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"], +keywords:n,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0, +contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{ +begin:"\x3c!--|--\x3e"},{begin:""}]}] +}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#", +end:"$",keywords:{ +keyword:"if else elif endif define undef warning error line region endregion pragma checksum" +}},g,a,{beginKeywords:"class interface",relevance:0,end:/[{;=]/, +illegal:/[^\s:,]/,contains:[{beginKeywords:"where class" +},t,u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace", +relevance:0,end:/[{;=]/,illegal:/[^\s:]/, +contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{ +beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/, +contains:[t,u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta", +begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{ +className:"string",begin:/"/,end:/"/}]},{ +beginKeywords:"new return throw await else",relevance:0},{className:"function", +begin:"("+b+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0, +end:/\s*[{;=]/,excludeEnd:!0,keywords:n,contains:[{ +beginKeywords:"public private protected static internal protected abstract async extern override unsafe virtual new sealed partial", +relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0, +contains:[e.TITLE_MODE,u],relevance:0},{match:/\(\)/},{className:"params", +begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n,relevance:0, +contains:[g,a,e.C_BLOCK_COMMENT_MODE] +},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},m]}},grmr_css:e=>{ +const n=e.regex,t=ie(e),a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{ +name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{ +keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"}, +contains:[t.BLOCK_COMMENT,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/ +},t.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0 +},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0 +},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{ +begin:":("+oe.join("|")+")"},{begin:":(:)?("+le.join("|")+")"}] +},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ce.join("|")+")\\b"},{ +begin:/:/,end:/[;}{]/, +contains:[t.BLOCK_COMMENT,t.HEXCOLOR,t.IMPORTANT,t.CSS_NUMBER_MODE,...a,{ +begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri" +},contains:[...a,{className:"string",begin:/[^)]/,endsWithParent:!0, +excludeEnd:!0}]},t.FUNCTION_DISPATCH]},{begin:n.lookahead(/@/),end:"[{;]", +relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/ +},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{ +$pattern:/[a-z-]+/,keyword:"and or not only",attribute:se.join(" ")},contains:[{ +begin:/[a-z-]+(?=:)/,className:"attribute"},...a,t.CSS_NUMBER_MODE]}]},{ +className:"selector-tag",begin:"\\b("+re.join("|")+")\\b"}]}},grmr_diff:e=>{ +const n=e.regex;return{name:"Diff",aliases:["patch"],contains:[{ +className:"meta",relevance:10, +match:n.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/) +},{className:"comment",variants:[{ +begin:n.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/), +end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{ +className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/, +end:/$/}]}},grmr_go:e=>{const n={ +keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"], +type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"], +literal:["true","false","iota","nil"], +built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"] +};return{name:"Go",aliases:["golang"],keywords:n,illegal:"{const n=e.regex;return{name:"GraphQL",aliases:["gql"], +case_insensitive:!0,disableAutodetect:!1,keywords:{ +keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"], +literal:["true","false","null"]}, +contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{ +scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation", +begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/, +end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{ +scope:"symbol",begin:n.concat(/[_A-Za-z][_0-9A-Za-z]*/,n.lookahead(/\s*:/)), +relevance:0}],illegal:[/[;<']/,/BEGIN/]}},grmr_ini:e=>{const n=e.regex,t={ +className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{ +begin:e.NUMBER_RE}]},a=e.COMMENT();a.variants=[{begin:/;/,end:/$/},{begin:/#/, +end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{ +begin:/\$\{(.*?)\}/}]},r={className:"literal", +begin:/\bon|off|true|false|yes|no\b/},s={className:"string", +contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{ +begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}] +},o={begin:/\[/,end:/\]/,contains:[a,r,i,s,t,"self"],relevance:0 +},l=n.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{ +name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/, +contains:[a,{className:"section",begin:/\[+/,end:/\]+/},{ +begin:n.concat(l,"(\\s*\\.\\s*",l,")*",n.lookahead(/\s*=\s*[^#\s]/)), +className:"attr",starts:{end:/$/,contains:[a,o,r,i,s,t]}}]}},grmr_java:e=>{ +const n=e.regex,t="[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*",a=t+pe("(?:<"+t+"~~~(?:\\s*,\\s*"+t+"~~~)*>)?",/~~~/g,2),i={ +keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits"], +literal:["false","true","null"], +type:["char","boolean","long","float","int","byte","short","double"], +built_in:["super","this"]},r={className:"meta",begin:"@"+t,contains:[{ +begin:/\(/,end:/\)/,contains:["self"]}]},s={className:"params",begin:/\(/, +end:/\)/,keywords:i,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0} +;return{name:"Java",aliases:["jsp"],keywords:i,illegal:/<\/|#/, +contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/, +relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{ +begin:/import java\.[a-z]+\./,keywords:"import",relevance:2 +},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/, +className:"string",contains:[e.BACKSLASH_ESCAPE] +},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{ +match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,t],className:{ +1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{ +begin:[n.concat(/(?!else)/,t),/\s+/,t,/\s+/,/=(?!=)/],className:{1:"type", +3:"variable",5:"operator"}},{begin:[/record/,/\s+/,t],className:{1:"keyword", +3:"title.class"},contains:[s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{ +beginKeywords:"new throw return else",relevance:0},{ +begin:["(?:"+a+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{ +2:"title.function"},keywords:i,contains:[{className:"params",begin:/\(/, +end:/\)/,keywords:i,relevance:0, +contains:[r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,me,e.C_BLOCK_COMMENT_MODE] +},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},me,r]}},grmr_javascript:Oe, +grmr_json:e=>{const n=["true","false","null"],t={scope:"literal", +beginKeywords:n.join(" ")};return{name:"JSON",keywords:{literal:n},contains:[{ +className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},{ +match:/[{}[\],:]/,className:"punctuation",relevance:0 +},e.QUOTE_STRING_MODE,t,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE], +illegal:"\\S"}},grmr_kotlin:e=>{const n={ +keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual", +built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing", +literal:"true false null"},t={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@" +},a={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},i={ +className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},r={className:"string", +variants:[{begin:'"""',end:'"""(?=[^"])',contains:[i,a]},{begin:"'",end:"'", +illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/, +contains:[e.BACKSLASH_ESCAPE,i,a]}]};a.contains.push(r);const s={ +className:"meta", +begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?" +},o={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/, +end:/\)/,contains:[e.inherit(r,{className:"string"}),"self"]}] +},l=me,c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={ +variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/, +contains:[]}]},g=d;return g.variants[1].contains=[d],d.variants[1].contains=[g], +{name:"Kotlin",aliases:["kt","kts"],keywords:n, +contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag", +begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,{className:"keyword", +begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol", +begin:/@\w+/}]}},t,s,o,{className:"function",beginKeywords:"fun",end:"[(]|$", +returnBegin:!0,excludeEnd:!0,keywords:n,relevance:5,contains:[{ +begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0, +contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://, +keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/, +endsParent:!0,keywords:n,relevance:0,contains:[{begin:/:/,end:/[=,\/]/, +endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,c],relevance:0 +},e.C_LINE_COMMENT_MODE,c,s,o,r,e.C_NUMBER_MODE]},c]},{ +begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{ +3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0, +illegal:"extends implements",contains:[{ +beginKeywords:"public protected internal private constructor" +},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0, +excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/, +excludeBegin:!0,returnEnd:!0},s,o]},r,{className:"meta",begin:"^#!/usr/bin/env", +end:"$",illegal:"\n"},l]}},grmr_less:e=>{ +const n=ie(e),t=de,a="[\\w-]+",i="("+a+"|@\\{"+a+"\\})",r=[],s=[],o=e=>({ +className:"string",begin:"~?"+e+".*?"+e}),l=(e,n,t)=>({className:e,begin:n, +relevance:t}),c={$pattern:/[a-z-]+/,keyword:"and or not only", +attribute:se.join(" ")},d={begin:"\\(",end:"\\)",contains:s,keywords:c, +relevance:0} +;s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,o("'"),o('"'),n.CSS_NUMBER_MODE,{ +begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]", +excludeEnd:!0} +},n.HEXCOLOR,d,l("variable","@@?"+a,10),l("variable","@\\{"+a+"\\}"),l("built_in","~?`[^`]*?`"),{ +className:"attribute",begin:a+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0 +},n.IMPORTANT,{beginKeywords:"and not"},n.FUNCTION_DISPATCH);const g=s.concat({ +begin:/\{/,end:/\}/,contains:r}),u={beginKeywords:"when",endsWithParent:!0, +contains:[{beginKeywords:"and not"}].concat(s)},b={begin:i+"\\s*:", +returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/ +},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ce.join("|")+")\\b", +end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}] +},m={className:"keyword", +begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b", +starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:s,relevance:0}},p={ +className:"variable",variants:[{begin:"@"+a+"\\s*:",relevance:15},{begin:"@"+a +}],starts:{end:"[;}]",returnEnd:!0,contains:g}},_={variants:[{ +begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:i,end:/\{/}],returnBegin:!0, +returnEnd:!0,illegal:"[<='$\"]",relevance:0, +contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,u,l("keyword","all\\b"),l("variable","@\\{"+a+"\\}"),{ +begin:"\\b("+re.join("|")+")\\b",className:"selector-tag" +},n.CSS_NUMBER_MODE,l("selector-tag",i,0),l("selector-id","#"+i),l("selector-class","\\."+i,0),l("selector-tag","&",0),n.ATTRIBUTE_SELECTOR_MODE,{ +className:"selector-pseudo",begin:":("+oe.join("|")+")"},{ +className:"selector-pseudo",begin:":(:)?("+le.join("|")+")"},{begin:/\(/, +end:/\)/,relevance:0,contains:g},{begin:"!important"},n.FUNCTION_DISPATCH]},h={ +begin:a+":(:)?"+`(${t.join("|")})`,returnBegin:!0,contains:[_]} +;return r.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m,p,h,b,_,u,n.FUNCTION_DISPATCH), +{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:r}}, +grmr_lua:e=>{const n="\\[=*\\[",t="\\]=*\\]",a={begin:n,end:t,contains:["self"] +},i=[e.COMMENT("--(?!"+n+")","$"),e.COMMENT("--"+n,t,{contains:[a],relevance:10 +})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE, +literal:"true false nil", +keyword:"and break do else elseif end for goto if in local not or repeat return then until while", +built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove" +},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)", +contains:[e.inherit(e.TITLE_MODE,{ +begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params", +begin:"\\(",endsWithParent:!0,contains:i}].concat(i) +},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string", +begin:n,end:t,contains:[a],relevance:5}])}},grmr_makefile:e=>{const n={ +className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)", +contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%{ +const n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},t={ +variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{ +begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/, +relevance:2},{ +begin:e.regex.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/), +relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{ +begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/ +},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0, +returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)", +excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[", +end:"\\]",excludeBegin:!0,excludeEnd:!0}]},a={className:"strong",contains:[], +variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}] +},i={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{ +begin:/_(?![_\s])/,end:/_/,relevance:0}]},r=e.inherit(a,{contains:[] +}),s=e.inherit(i,{contains:[]});a.contains.push(s),i.contains.push(r) +;let o=[n,t];return[a,i,r,s].forEach((e=>{e.contains=e.contains.concat(o) +})),o=o.concat(a,i),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{ +className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:o},{ +begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n", +contains:o}]}]},n,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)", +end:"\\s+",excludeEnd:!0},a,i,{className:"quote",begin:"^>\\s+",contains:o, +end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{ +begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{ +begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))", +contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{ +begin:"^[-\\*]{3,}",end:"$"},t,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{ +className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{ +className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}},grmr_objectivec:e=>{ +const n=/[a-zA-Z@][a-zA-Z0-9_]*/,t={$pattern:n, +keyword:["@interface","@class","@protocol","@implementation"]};return{ +name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"], +keywords:{"variable.language":["this","super"],$pattern:n, +keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"], +literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"], +built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"], +type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"] +},illegal:"/,end:/$/,illegal:"\\n" +},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class", +begin:"("+t.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:t, +contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE, +relevance:0}]}},grmr_perl:e=>{const n=e.regex,t=/[dualxmsipngr]{0,12}/,a={ +$pattern:/[\w.]+/, +keyword:"abs accept alarm and atan2 bind binmode bless break caller chdir chmod chomp chop chown chr chroot close closedir connect continue cos crypt dbmclose dbmopen defined delete die do dump each else elsif endgrent endhostent endnetent endprotoent endpwent endservent eof eval exec exists exit exp fcntl fileno flock for foreach fork format formline getc getgrent getgrgid getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr getnetbyname getnetent getpeername getpgrp getpriority getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid getservbyname getservbyport getservent getsockname getsockopt given glob gmtime goto grep gt hex if index int ioctl join keys kill last lc lcfirst length link listen local localtime log lstat lt ma map mkdir msgctl msgget msgrcv msgsnd my ne next no not oct open opendir or ord our pack package pipe pop pos print printf prototype push q|0 qq quotemeta qw qx rand read readdir readline readlink readpipe recv redo ref rename require reset return reverse rewinddir rindex rmdir say scalar seek seekdir select semctl semget semop send setgrent sethostent setnetent setpgrp setpriority setprotoent setpwent setservent setsockopt shift shmctl shmget shmread shmwrite shutdown sin sleep socket socketpair sort splice split sprintf sqrt srand stat state study sub substr symlink syscall sysopen sysread sysseek system syswrite tell telldir tie tied time times tr truncate uc ucfirst umask undef unless unlink unpack unshift untie until use utime values vec wait waitpid wantarray warn when while write x|0 xor y|0" +},i={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:a},r={begin:/->\{/, +end:/\}/},s={variants:[{begin:/\$\d/},{ +begin:n.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])") +},{begin:/[$%@][^\s\w{]/,relevance:0}] +},o=[e.BACKSLASH_ESCAPE,i,s],l=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],c=(e,a,i="\\1")=>{ +const r="\\1"===i?i:n.concat(i,a) +;return n.concat(n.concat("(?:",e,")"),a,/(?:\\.|[^\\\/])*?/,r,/(?:\\.|[^\\\/])*?/,i,t) +},d=(e,a,i)=>n.concat(n.concat("(?:",e,")"),a,/(?:\\.|[^\\\/])*?/,i,t),g=[s,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{ +endsWithParent:!0}),r,{className:"string",contains:o,variants:[{ +begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[", +end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{ +begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">", +relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'", +contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`", +contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{ +begin:"-?\\w+\\s*=>",relevance:0}]},{className:"number", +begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b", +relevance:0},{ +begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*", +keywords:"split return print reverse grep",relevance:0, +contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{ +begin:c("s|tr|y",n.either(...l,{capture:!0}))},{begin:c("s|tr|y","\\(","\\)")},{ +begin:c("s|tr|y","\\[","\\]")},{begin:c("s|tr|y","\\{","\\}")}],relevance:2},{ +className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{ +begin:d("(?:m|qr)?",/\//,/\//)},{begin:d("m|qr",n.either(...l,{capture:!0 +}),/\1/)},{begin:d("m|qr",/\(/,/\)/)},{begin:d("m|qr",/\[/,/\]/)},{ +begin:d("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub", +end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{ +begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$", +subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}] +}];return i.contains=g,r.contains=g,{name:"Perl",aliases:["pl","pm"],keywords:a, +contains:g}},grmr_php:e=>{ +const n=e.regex,t=/(?![A-Za-z0-9])(?![$])/,a=n.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,t),i=n.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,t),r={ +scope:"variable",match:"\\$+"+a},s={scope:"subst",variants:[{begin:/\$\w+/},{ +begin:/\{\$/,end:/\}/}]},o=e.inherit(e.APOS_STRING_MODE,{illegal:null +}),l="[ \t\n]",c={scope:"string",variants:[e.inherit(e.QUOTE_STRING_MODE,{ +illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(s)}),o,{ +begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/, +contains:e.QUOTE_STRING_MODE.contains.concat(s),"on:begin":(e,n)=>{ +n.data._beginMatch=e[1]||e[2]},"on:end":(e,n)=>{ +n.data._beginMatch!==e[1]&&n.ignoreMatch()}},e.END_SAME_AS_BEGIN({ +begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/})]},d={scope:"number",variants:[{ +begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{ +begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{ +begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?" +}],relevance:0 +},g=["false","null","true"],u=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],b=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],m={ +keyword:u,literal:(e=>{const n=[];return e.forEach((e=>{ +n.push(e),e.toLowerCase()===e?n.push(e.toUpperCase()):n.push(e.toLowerCase()) +})),n})(g),built_in:b},p=e=>e.map((e=>e.replace(/\|\d+$/,""))),_={variants:[{ +match:[/new/,n.concat(l,"+"),n.concat("(?!",p(b).join("\\b|"),"\\b)"),i],scope:{ +1:"keyword",4:"title.class"}}]},h=n.concat(a,"\\b(?!\\()"),f={variants:[{ +match:[n.concat(/::/,n.lookahead(/(?!class\b)/)),h],scope:{2:"variable.constant" +}},{match:[/::/,/class/],scope:{2:"variable.language"}},{ +match:[i,n.concat(/::/,n.lookahead(/(?!class\b)/)),h],scope:{1:"title.class", +3:"variable.constant"}},{match:[i,n.concat("::",n.lookahead(/(?!class\b)/))], +scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class", +3:"variable.language"}}]},E={scope:"attr", +match:n.concat(a,n.lookahead(":"),n.lookahead(/(?!::)/))},y={relevance:0, +begin:/\(/,end:/\)/,keywords:m,contains:[E,r,f,e.C_BLOCK_COMMENT_MODE,c,d,_] +},N={relevance:0, +match:[/\b/,n.concat("(?!fn\\b|function\\b|",p(u).join("\\b|"),"|",p(b).join("\\b|"),"\\b)"),a,n.concat(l,"*"),n.lookahead(/(?=\()/)], +scope:{3:"title.function.invoke"},contains:[y]};y.contains.push(N) +;const w=[E,f,e.C_BLOCK_COMMENT_MODE,c,d,_];return{case_insensitive:!1, +keywords:m,contains:[{begin:n.concat(/#\[\s*/,i),beginScope:"meta",end:/]/, +endScope:"meta",keywords:{literal:g,keyword:["new","array"]},contains:[{ +begin:/\[/,end:/]/,keywords:{literal:g,keyword:["new","array"]}, +contains:["self",...w]},...w,{scope:"meta",match:i}] +},e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{ +scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/, +keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE, +contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},{scope:"meta",variants:[{ +begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{ +begin:/\?>/}]},{scope:"variable.language",match:/\$this\b/},r,N,f,{ +match:[/const/,/\s/,a],scope:{1:"keyword",3:"variable.constant"}},_,{ +scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/, +excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use" +},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params", +begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:m, +contains:["self",r,f,e.C_BLOCK_COMMENT_MODE,c,d]}]},{scope:"class",variants:[{ +beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait", +illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{ +beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{ +beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/, +contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{ +beginKeywords:"use",relevance:0,end:";",contains:[{ +match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},c,d]} +},grmr_php_template:e=>({name:"PHP template",subLanguage:"xml",contains:[{ +begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*", +end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0 +},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null, +skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null, +contains:null,skip:!0})]}]}),grmr_plaintext:e=>({name:"Plain text", +aliases:["text","txt"],disableAutodetect:!0}),grmr_python:e=>{ +const n=e.regex,t=/[\p{XID_Start}_]\p{XID_Continue}*/u,a=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],i={ +$pattern:/[A-Za-z]\w+|__\w+__/,keyword:a, +built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"], +literal:["__debug__","Ellipsis","False","None","NotImplemented","True"], +type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"] +},r={className:"meta",begin:/^(>>>|\.\.\.) /},s={className:"subst",begin:/\{/, +end:/\}/,keywords:i,illegal:/#/},o={begin:/\{\{/,relevance:0},l={ +className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{ +begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/, +contains:[e.BACKSLASH_ESCAPE,r],relevance:10},{ +begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/, +contains:[e.BACKSLASH_ESCAPE,r],relevance:10},{ +begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/, +contains:[e.BACKSLASH_ESCAPE,r,o,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/, +end:/"""/,contains:[e.BACKSLASH_ESCAPE,r,o,s]},{begin:/([uU]|[rR])'/,end:/'/, +relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{ +begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/, +end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/, +contains:[e.BACKSLASH_ESCAPE,o,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/, +contains:[e.BACKSLASH_ESCAPE,o,s]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE] +},c="[0-9](_?[0-9])*",d=`(\\b(${c}))?\\.(${c})|\\b(${c})\\.`,g="\\b|"+a.join("|"),u={ +className:"number",relevance:0,variants:[{ +begin:`(\\b(${c})|(${d}))[eE][+-]?(${c})[jJ]?(?=${g})`},{begin:`(${d})[jJ]?`},{ +begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${g})`},{ +begin:`\\b0[bB](_?[01])+[lL]?(?=${g})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${g})` +},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${g})`},{begin:`\\b(${c})[jJ](?=${g})` +}]},b={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:i, +contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={ +className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/, +end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i, +contains:["self",r,u,l,e.HASH_COMMENT_MODE]}]};return s.contains=[l,u,r],{ +name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:i, +illegal:/(<\/|\?)|=>/,contains:[r,u,{begin:/\bself\b/},{beginKeywords:"if", +relevance:0},l,b,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,t],scope:{ +1:"keyword",3:"title.function"},contains:[m]},{variants:[{ +match:[/\bclass/,/\s+/,t,/\s*/,/\(\s*/,t,/\s*\)/]},{match:[/\bclass/,/\s+/,t]}], +scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{ +className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[u,m,l]}]}}, +grmr_python_repl:e=>({aliases:["pycon"],contains:[{className:"meta.prompt", +starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{ +begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}),grmr_r:e=>{ +const n=e.regex,t=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,a=n.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,r=n.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/) +;return{name:"R",keywords:{$pattern:t, +keyword:"function if in break next repeat else for while", +literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10", +built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm" +},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/, +starts:{end:n.lookahead(n.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)), +endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{ +scope:"variable",variants:[{match:t},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0 +}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}] +}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE], +variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/ +}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/ +}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/ +}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/ +}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/ +}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"', +relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{ +1:"operator",2:"number"},match:[i,a]},{scope:{1:"operator",2:"number"}, +match:[/%[^%]*%/,a]},{scope:{1:"punctuation",2:"number"},match:[r,a]},{scope:{ +2:"number"},match:[/[^a-zA-Z0-9._]|^/,a]}]},{scope:{3:"operator"}, +match:[t,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{ +match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:r},{begin:"`",end:"`", +contains:[{begin:/\\./}]}]}},grmr_ruby:e=>{ +const n=e.regex,t="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",a=n.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=n.concat(a,/(::\w+)*/),r={ +"variable.constant":["__FILE__","__LINE__","__ENCODING__"], +"variable.language":["self","super"], +keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield","include","extend","prepend","public","private","protected","raise","throw"], +built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"], +literal:["true","false","nil"]},s={className:"doctag",begin:"@[A-Za-z]+"},o={ +begin:"#<",end:">"},l=[e.COMMENT("#","$",{contains:[s] +}),e.COMMENT("^=begin","^=end",{contains:[s],relevance:10 +}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/, +end:/\}/,keywords:r},d={className:"string",contains:[e.BACKSLASH_ESCAPE,c], +variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{ +begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{ +begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//, +end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{ +begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{ +begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{ +begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{ +begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{ +begin:n.concat(/<<[-~]?'?/,n.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)), +contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/, +contains:[e.BACKSLASH_ESCAPE,c]})]}]},g="[0-9](_?[0-9])*",u={className:"number", +relevance:0,variants:[{ +begin:`\\b([1-9](_?[0-9])*|0)(\\.(${g}))?([eE][+-]?(${g})|r)?i?\\b`},{ +begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b" +},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{ +begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{ +begin:"\\b0(_?[0-7])+r?i?\\b"}]},b={variants:[{match:/\(\)/},{ +className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0, +keywords:r}]},m=[d,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{ +match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class", +4:"title.class.inherited"},keywords:r},{match:[/(include|extend)\s+/,i],scope:{ +2:"title.class"},keywords:r},{relevance:0,match:[i,/\.new[. (]/],scope:{ +1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/, +className:"variable.constant"},{relevance:0,match:a,scope:"title.class"},{ +match:[/def/,/\s+/,t],scope:{1:"keyword",3:"title.function"},contains:[b]},{ +begin:e.IDENT_RE+"::"},{className:"symbol", +begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol", +begin:":(?!\\s)",contains:[d,{begin:t}],relevance:0},u,{className:"variable", +begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{ +className:"params",begin:/\|/,end:/\|/,excludeBegin:!0,excludeEnd:!0, +relevance:0,keywords:r},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*", +keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c], +illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{ +begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[", +end:"\\][a-z]*"}]}].concat(o,l),relevance:0}].concat(o,l) +;c.contains=m,b.contains=m;const p=[{begin:/^\s*=>/,starts:{end:"$",contains:m} +},{className:"meta.prompt", +begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])", +starts:{end:"$",keywords:r,contains:m}}];return l.unshift(o),{name:"Ruby", +aliases:["rb","gemspec","podspec","thor","irb"],keywords:r,illegal:/\/\*/, +contains:[e.SHEBANG({binary:"ruby"})].concat(p).concat(l).concat(m)}}, +grmr_rust:e=>{const n=e.regex,t={className:"title.function.invoke",relevance:0, +begin:n.concat(/\b/,/(?!let|for|while|if|else|match\b)/,e.IDENT_RE,n.lookahead(/\s*\(/)) +},a="([ui](8|16|32|64|128|size)|f(32|64))?",i=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],r=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"] +;return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:r, +keyword:["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","unsafe","unsized","use","virtual","where","while","yield"], +literal:["true","false","Some","None","Ok","Err"],built_in:i},illegal:""},t]}}, +grmr_scss:e=>{const n=ie(e),t=le,a=oe,i="@[a-z-]+",r={className:"variable", +begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b",relevance:0};return{name:"SCSS", +case_insensitive:!0,illegal:"[=/|']", +contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n.CSS_NUMBER_MODE,{ +className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{ +className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0 +},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag", +begin:"\\b("+re.join("|")+")\\b",relevance:0},{className:"selector-pseudo", +begin:":("+a.join("|")+")"},{className:"selector-pseudo", +begin:":(:)?("+t.join("|")+")"},r,{begin:/\(/,end:/\)/, +contains:[n.CSS_NUMBER_MODE]},n.CSS_VARIABLE,{className:"attribute", +begin:"\\b("+ce.join("|")+")\\b"},{ +begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b" +},{begin:/:/,end:/[;}{]/,relevance:0, +contains:[n.BLOCK_COMMENT,r,n.HEXCOLOR,n.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,n.IMPORTANT,n.FUNCTION_DISPATCH] +},{begin:"@(page|font-face)",keywords:{$pattern:i,keyword:"@page @font-face"}},{ +begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/, +keyword:"and or not only",attribute:se.join(" ")},contains:[{begin:i, +className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute" +},r,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,n.HEXCOLOR,n.CSS_NUMBER_MODE] +},n.FUNCTION_DISPATCH]}},grmr_shell:e=>({name:"Shell Session", +aliases:["console","shellsession"],contains:[{className:"meta.prompt", +begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/, +subLanguage:"bash"}}]}),grmr_sql:e=>{ +const n=e.regex,t=e.COMMENT("--","$"),a=["true","false","unknown"],i=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],r=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],s=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],o=r,l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!r.includes(e))),c={ +begin:n.concat(/\b/,n.either(...o),/\s*\(/),relevance:0,keywords:{built_in:o}} +;return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{ +$pattern:/\b[\w\.]+/,keyword:((e,{exceptions:n,when:t}={})=>{const a=t +;return n=n||[],e.map((e=>e.match(/\|\d+$/)||n.includes(e)?e:a(e)?e+"|0":e)) +})(l,{when:e=>e.length<3}),literal:a,type:i, +built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"] +},contains:[{begin:n.either(...s),relevance:0,keywords:{$pattern:/[\w\.]+/, +keyword:l.concat(s),literal:a,type:i}},{className:"type", +begin:n.either("double precision","large object","with timezone","without timezone") +},c,{className:"variable",begin:/@[a-z0-9][a-z0-9_]*/},{className:"string", +variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/, +contains:[{begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t,{ +className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/, +relevance:0}]}},grmr_swift:e=>{const n={match:/\s+/,relevance:0 +},t=e.COMMENT("/\\*","\\*/",{contains:["self"]}),a=[e.C_LINE_COMMENT_MODE,t],i={ +match:[/\./,m(...xe,...Me)],className:{2:"keyword"}},r={match:b(/\./,m(...Ae)), +relevance:0},s=Ae.filter((e=>"string"==typeof e)).concat(["_|0"]),o={variants:[{ +className:"keyword", +match:m(...Ae.filter((e=>"string"!=typeof e)).concat(Se).map(ke),...Me)}]},l={ +$pattern:m(/\b\w+/,/#\w+/),keyword:s.concat(Re),literal:Ce},c=[i,r,o],g=[{ +match:b(/\./,m(...De)),relevance:0},{className:"built_in", +match:b(/\b/,m(...De),/(?=\()/)}],u={match:/->/,relevance:0},p=[u,{ +className:"operator",relevance:0,variants:[{match:Be},{match:`\\.(\\.|${Le})+`}] +}],_="([0-9]_*)+",h="([0-9a-fA-F]_*)+",f={className:"number",relevance:0, +variants:[{match:`\\b(${_})(\\.(${_}))?([eE][+-]?(${_}))?\\b`},{ +match:`\\b0x(${h})(\\.(${h}))?([pP][+-]?(${_}))?\\b`},{match:/\b0o([0-7]_*)+\b/ +},{match:/\b0b([01]_*)+\b/}]},E=(e="")=>({className:"subst",variants:[{ +match:b(/\\/,e,/[0\\tnr"']/)},{match:b(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}] +}),y=(e="")=>({className:"subst",match:b(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/) +}),N=(e="")=>({className:"subst",label:"interpol",begin:b(/\\/,e,/\(/),end:/\)/ +}),w=(e="")=>({begin:b(e,/"""/),end:b(/"""/,e),contains:[E(e),y(e),N(e)] +}),v=(e="")=>({begin:b(e,/"/),end:b(/"/,e),contains:[E(e),N(e)]}),O={ +className:"string", +variants:[w(),w("#"),w("##"),w("###"),v(),v("#"),v("##"),v("###")] +},k=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0, +contains:[e.BACKSLASH_ESCAPE]}],x={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//, +contains:k},M=e=>{const n=b(e,/\//),t=b(/\//,e);return{begin:n,end:t, +contains:[...k,{scope:"comment",begin:`#(?!.*${t})`,end:/$/}]}},S={ +scope:"regexp",variants:[M("###"),M("##"),M("#"),x]},A={match:b(/`/,Fe,/`/) +},C=[A,{className:"variable",match:/\$\d+/},{className:"variable", +match:`\\$${ze}+`}],T=[{match:/(@|#(un)?)available/,scope:"keyword",starts:{ +contains:[{begin:/\(/,end:/\)/,keywords:Pe,contains:[...p,f,O]}]}},{ +scope:"keyword",match:b(/@/,m(...je))},{scope:"meta",match:b(/@/,Fe)}],R={ +match:d(/\b[A-Z]/),relevance:0,contains:[{className:"type", +match:b(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,ze,"+") +},{className:"type",match:Ue,relevance:0},{match:/[?!]+/,relevance:0},{ +match:/\.\.\./,relevance:0},{match:b(/\s+&\s+/,d(Ue)),relevance:0}]},D={ +begin://,keywords:l,contains:[...a,...c,...T,u,R]};R.contains.push(D) +;const I={begin:/\(/,end:/\)/,relevance:0,keywords:l,contains:["self",{ +match:b(Fe,/\s*:/),keywords:"_|0",relevance:0 +},...a,S,...c,...g,...p,f,O,...C,...T,R]},L={begin://, +keywords:"repeat each",contains:[...a,R]},B={begin:/\(/,end:/\)/,keywords:l, +contains:[{begin:m(d(b(Fe,/\s*:/)),d(b(Fe,/\s+/,Fe,/\s*:/))),end:/:/, +relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params", +match:Fe}]},...a,...c,...p,f,O,...T,R,I],endsParent:!0,illegal:/["']/},$={ +match:[/(func|macro)/,/\s+/,m(A.match,Fe,Be)],className:{1:"keyword", +3:"title.function"},contains:[L,B,n],illegal:[/\[/,/%/]},z={ +match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"}, +contains:[L,B,n],illegal:/\[|%/},F={match:[/operator/,/\s+/,Be],className:{ +1:"keyword",3:"title"}},U={begin:[/precedencegroup/,/\s+/,Ue],className:{ +1:"keyword",3:"title"},contains:[R],keywords:[...Te,...Ce],end:/}/} +;for(const e of O.variants){const n=e.contains.find((e=>"interpol"===e.label)) +;n.keywords=l;const t=[...c,...g,...p,f,O,...C];n.contains=[...t,{begin:/\(/, +end:/\)/,contains:["self",...t]}]}return{name:"Swift",keywords:l, +contains:[...a,$,z,{beginKeywords:"struct protocol class extension enum actor", +end:"\\{",excludeEnd:!0,keywords:l,contains:[e.inherit(e.TITLE_MODE,{ +className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...c] +},F,U,{beginKeywords:"import",end:/$/,contains:[...a],relevance:0 +},S,...c,...g,...p,f,O,...C,...T,R,I]}},grmr_typescript:e=>{ +const n=Oe(e),t=_e,a=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={ +beginKeywords:"namespace",end:/\{/,excludeEnd:!0, +contains:[n.exports.CLASS_REFERENCE]},r={beginKeywords:"interface",end:/\{/, +excludeEnd:!0,keywords:{keyword:"interface extends",built_in:a}, +contains:[n.exports.CLASS_REFERENCE]},s={$pattern:_e, +keyword:he.concat(["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"]), +literal:fe,built_in:ve.concat(a),"variable.language":we},o={className:"meta", +begin:"@"+t},l=(e,n,t)=>{const a=e.contains.findIndex((e=>e.label===n)) +;if(-1===a)throw Error("can not find mode to replace");e.contains.splice(a,1,t)} +;return Object.assign(n.keywords,s), +n.exports.PARAMS_CONTAINS.push(o),n.contains=n.contains.concat([o,i,r]), +l(n,"shebang",e.SHEBANG()),l(n,"use_strict",{className:"meta",relevance:10, +begin:/^\s*['"]use strict['"]/ +}),n.contains.find((e=>"func.def"===e.label)).relevance=0,Object.assign(n,{ +name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n},grmr_vbnet:e=>{ +const n=e.regex,t=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,i=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,r=/\d{1,2}(:\d{1,2}){1,2}/,s={ +className:"literal",variants:[{begin:n.concat(/# */,n.either(a,t),/ *#/)},{ +begin:n.concat(/# */,r,/ *#/)},{begin:n.concat(/# */,i,/ *#/)},{ +begin:n.concat(/# */,n.either(a,t),/ +/,n.either(i,r),/ *#/)}] +},o=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}] +}),l=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]}) +;return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0, +classNameAliases:{label:"symbol"},keywords:{ +keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield", +built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort", +type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort", +literal:"true false nothing"}, +illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[{ +className:"string",begin:/"(""|[^/n])"C\b/},{className:"string",begin:/"/, +end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s,{className:"number",relevance:0, +variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/ +},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{ +begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},{ +className:"label",begin:/^\w+:/},o,l,{className:"meta", +begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/, +end:/$/,keywords:{ +keyword:"const disable else elseif enable end externalsource if region then"}, +contains:[l]}]}},grmr_wasm:e=>{e.regex;const n=e.COMMENT(/\(;/,/;\)/) +;return n.contains.push("self"),{name:"WebAssembly",keywords:{$pattern:/[\w.]+/, +keyword:["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"] +},contains:[e.COMMENT(/;;/,/$/),n,{match:[/(?:offset|align)/,/\s*/,/=/], +className:{1:"keyword",3:"operator"}},{className:"variable",begin:/\$[\w_]+/},{ +match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},{ +begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword", +3:"title.function"}},e.QUOTE_STRING_MODE,{match:/(i32|i64|f32|f64)(?!\.)/, +className:"type"},{className:"keyword", +match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/ +},{className:"number",relevance:0, +match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/ +}]}},grmr_xml:e=>{ +const n=e.regex,t=n.concat(/[\p{L}_]/u,n.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),a={ +className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},i={begin:/\s/, +contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}] +},r=e.inherit(i,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{ +className:"string"}),o=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),l={ +endsWithParent:!0,illegal:/`]+/}]}]}]};return{ +name:"HTML, XML", +aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"], +case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[i,o,s,r,{begin:/\[/,end:/\]/,contains:[{ +className:"meta",begin://,contains:[i,r,o,s]}]}] +},e.COMMENT(//,{relevance:10}),{begin://, +relevance:10},a,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/, +relevance:10,contains:[o]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag", +begin:/)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{ +end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag", +begin:/)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{ +end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{ +className:"tag",begin:/<>|<\/>/},{className:"tag", +begin:n.concat(//,/>/,/\s/)))), +end:/\/?>/,contains:[{className:"name",begin:t,relevance:0,starts:l}]},{ +className:"tag",begin:n.concat(/<\//,n.lookahead(n.concat(t,/>/))),contains:[{ +className:"name",begin:t,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]} +},grmr_yaml:e=>{ +const n="true false yes no null",t="[\\w#;/?:@&=+$,.~*'()[\\]]+",a={ +className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/ +},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable", +variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},i=e.inherit(a,{ +variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),r={ +end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},s={begin:/\{/, +end:/\}/,contains:[r],illegal:"\\n",relevance:0},o={begin:"\\[",end:"\\]", +contains:[r],illegal:"\\n",relevance:0},l=[{className:"attr",variants:[{ +begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{ +begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---\\s*$", +relevance:10},{className:"string", +begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{ +begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0, +relevance:0},{className:"type",begin:"!\\w+!"+t},{className:"type", +begin:"!<"+t+">"},{className:"type",begin:"!"+t},{className:"type",begin:"!!"+t +},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta", +begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)", +relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},{ +className:"number", +begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b" +},{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},s,o,a],c=[...l] +;return c.pop(),c.push(i),r.contains=c,{name:"YAML",case_insensitive:!0, +aliases:["yml"],contains:l}}});const He=ae;for(const e of Object.keys(Ke)){ +const n=e.replace("grmr_","").replace("_","-");He.registerLanguage(n,Ke[e])} +return He}() +;"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs); \ No newline at end of file diff --git a/src/assets/highlight-vscode-dark.min.css b/src/assets/highlight-vscode-dark.min.css new file mode 100644 index 0000000..03b6da8 --- /dev/null +++ b/src/assets/highlight-vscode-dark.min.css @@ -0,0 +1,10 @@ +pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*! + Theme: GitHub Dark + Description: Dark theme as seen on github.com + Author: github.com + Maintainer: @Hirse + Updated: 2021-05-15 + + Outdated base version: https://github.com/primer/github-syntax-dark + Current colors taken from GitHub's CSS +*/.hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#ff7b72}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#79c0ff}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-code,.hljs-comment,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}.hljs-addition{color:#aff5b4;background-color:#033a16}.hljs-deletion{color:#ffdcd7;background-color:#67060c} \ No newline at end of file diff --git a/src/assets/lit-all-2.7.4.min.js b/src/assets/lit-all-2.7.4.min.js new file mode 100644 index 0000000..daac1ec --- /dev/null +++ b/src/assets/lit-all-2.7.4.min.js @@ -0,0 +1,126 @@ +/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const t=window,i=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),e=new WeakMap;class n{constructor(t,i,e){if(this._$cssResult$=!0,e!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i}get styleSheet(){let t=this.i;const s=this.t;if(i&&void 0===t){const i=void 0!==s&&1===s.length;i&&(t=e.get(s)),void 0===t&&((this.i=t=new CSSStyleSheet).replaceSync(this.cssText),i&&e.set(s,t))}return t}toString(){return this.cssText}}const o=t=>new n("string"==typeof t?t:t+"",void 0,s),r=(t,...i)=>{const e=1===t.length?t[0]:i.reduce(((i,s,e)=>i+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[e+1]),t[0]);return new n(e,t,s)},l=(s,e)=>{i?s.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((i=>{const e=document.createElement("style"),n=t.litNonce;void 0!==n&&e.setAttribute("nonce",n),e.textContent=i.cssText,s.appendChild(e)}))},h=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let i="";for(const s of t.cssRules)i+=s.cssText;return o(i)})(t):t +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */;var u;const c=window,a=c.trustedTypes,d=a?a.emptyScript:"",v=c.reactiveElementPolyfillSupport,f={toAttribute(t,i){switch(i){case Boolean:t=t?d:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let s=t;switch(i){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},p=(t,i)=>i!==t&&(i==i||t==t),y={attribute:!0,type:String,converter:f,reflect:!1,hasChanged:p},b="finalized";class m extends HTMLElement{constructor(){super(),this.o=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this.l=null,this.u()}static addInitializer(t){var i;this.finalize(),(null!==(i=this.v)&&void 0!==i?i:this.v=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,s)=>{const e=this.p(s,i);void 0!==e&&(this.m.set(e,s),t.push(e))})),t}static createProperty(t,i=y){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const s="symbol"==typeof t?Symbol():"__"+t,e=this.getPropertyDescriptor(t,s,i);void 0!==e&&Object.defineProperty(this.prototype,t,e)}}static getPropertyDescriptor(t,i,s){return{get(){return this[i]},set(e){const n=this[t];this[i]=e,this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||y}static finalize(){if(this.hasOwnProperty(b))return!1;this[b]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.v&&(this.v=[...t.v]),this.elementProperties=new Map(t.elementProperties),this.m=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of i)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)i.unshift(h(t))}else void 0!==t&&i.push(h(t));return i}static p(t,i){const s=i.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this.g(),this.requestUpdate(),null===(t=this.constructor.v)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,s;(null!==(i=this.S)&&void 0!==i?i:this.S=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var i;null===(i=this.S)||void 0===i||i.splice(this.S.indexOf(t)>>>0,1)}g(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this.o.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const i=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return l(i,this.constructor.elementStyles),i}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this.S)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this.S)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,s){this._$AK(t,s)}$(t,i,s=y){var e;const n=this.constructor.p(t,s);if(void 0!==n&&!0===s.reflect){const o=(void 0!==(null===(e=s.converter)||void 0===e?void 0:e.toAttribute)?s.converter:f).toAttribute(i,s.type);this.l=t,null==o?this.removeAttribute(n):this.setAttribute(n,o),this.l=null}}_$AK(t,i){var s;const e=this.constructor,n=e.m.get(t);if(void 0!==n&&this.l!==n){const t=e.getPropertyOptions(n),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(s=t.converter)||void 0===s?void 0:s.fromAttribute)?t.converter:f;this.l=n,this[n]=o.fromAttribute(i,t.type),this.l=null}}requestUpdate(t,i,s){let e=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||p)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===s.reflect&&this.l!==t&&(void 0===this.C&&(this.C=new Map),this.C.set(t,s))):e=!1),!this.isUpdatePending&&e&&(this._=this.T())}async T(){this.isUpdatePending=!0;try{await this._}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this.o&&(this.o.forEach(((t,i)=>this[i]=t)),this.o=void 0);let i=!1;const s=this._$AL;try{i=this.shouldUpdate(s),i?(this.willUpdate(s),null===(t=this.S)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(s)):this.P()}catch(t){throw i=!1,this.P(),t}i&&this._$AE(s)}willUpdate(t){}_$AE(t){var i;null===(i=this.S)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}P(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._}shouldUpdate(t){return!0}update(t){void 0!==this.C&&(this.C.forEach(((t,i)=>this.$(i,this[i],t))),this.C=void 0),this.P()}updated(t){}firstUpdated(t){}} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +var g;m[b]=!0,m.elementProperties=new Map,m.elementStyles=[],m.shadowRootOptions={mode:"open"},null==v||v({ReactiveElement:m}),(null!==(u=c.reactiveElementVersions)&&void 0!==u?u:c.reactiveElementVersions=[]).push("1.6.1");const w=window,_=w.trustedTypes,$=_?_.createPolicy("lit-html",{createHTML:t=>t}):void 0,S="$lit$",T=`lit$${(Math.random()+"").slice(9)}$`,x="?"+T,E=`<${x}>`,C=document,A=()=>C.createComment(""),k=t=>null===t||"object"!=typeof t&&"function"!=typeof t,M=Array.isArray,P=t=>M(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),U="[ \t\n\f\r]",V=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,R=/-->/g,N=/>/g,O=RegExp(`>|${U}(?:([^\\s"'>=/]+)(${U}*=${U}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),L=/'/g,j=/"/g,z=/^(?:script|style|textarea|title)$/i,H=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),I=H(1),B=H(2),D=Symbol.for("lit-noChange"),W=Symbol.for("lit-nothing"),Z=new WeakMap,q=C.createTreeWalker(C,129,null,!1),F=(t,i)=>{const s=t.length-1,e=[];let n,o=2===i?"":"",r=V;for(let i=0;i"===h[0]?(r=null!=n?n:V,u=-1):void 0===h[1]?u=-2:(u=r.lastIndex-h[2].length,l=h[1],r=void 0===h[3]?O:'"'===h[3]?j:L):r===j||r===L?r=O:r===R||r===N?r=V:(r=O,n=void 0);const a=r===O&&t[i+1].startsWith("/>")?" ":"";o+=r===V?s+E:u>=0?(e.push(l),s.slice(0,u)+S+s.slice(u)+T+a):s+T+(-2===u?(e.push(void 0),i):a)}const l=o+(t[s]||"")+(2===i?"":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==$?$.createHTML(l):l,e]};class G{constructor({strings:t,_$litType$:i},s){let e;this.parts=[];let n=0,o=0;const r=t.length-1,l=this.parts,[h,u]=F(t,i);if(this.el=G.createElement(h,s),q.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(e=q.nextNode())&&l.length0){e.textContent=_?_.emptyScript:"";for(let s=0;s2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=W}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const n=this.strings;let o=!1;if(void 0===n)t=J(this,t,i,0),o=!k(t)||t!==this._$AH&&t!==D,o&&(this._$AH=t);else{const e=t;let r,l;for(t=n[0],r=0;r{var e,n;const o=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let r=o._$litPart$;if(void 0===r){const t=null!==(n=null==s?void 0:s.renderBefore)&&void 0!==n?n:null;o._$litPart$=r=new Y(i.insertBefore(A(),t),t,void 0,null!=s?s:{})}return r._$AI(t),r}; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var lt,ht;const ut=m;class ct extends m{constructor(){super(...arguments),this.renderOptions={host:this},this.st=void 0}createRenderRoot(){var t,i;const s=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=s.firstChild),s}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.st=rt(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this.st)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.st)||void 0===t||t.setConnected(!1)}render(){return D}}ct.finalized=!0,ct._$litElement$=!0,null===(lt=globalThis.litElementHydrateSupport)||void 0===lt||lt.call(globalThis,{LitElement:ct});const at=globalThis.litElementPolyfillSupport;null==at||at({LitElement:ct});const dt={_$AK:(t,i,s)=>{t._$AK(i,s)},_$AL:t=>t._$AL};(null!==(ht=globalThis.litElementVersions)&&void 0!==ht?ht:globalThis.litElementVersions=[]).push("3.3.2"); +/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const vt=!1,{G:ft}=nt,pt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,yt={HTML:1,SVG:2},bt=(t,i)=>void 0===i?void 0!==(null==t?void 0:t._$litType$):(null==t?void 0:t._$litType$)===i,mt=t=>void 0!==(null==t?void 0:t._$litDirective$),gt=t=>null==t?void 0:t._$litDirective$,wt=t=>void 0===t.strings,_t=()=>document.createComment(""),$t=(t,i,s)=>{var e;const n=t._$AA.parentNode,o=void 0===i?t._$AB:i._$AA;if(void 0===s){const i=n.insertBefore(_t(),o),e=n.insertBefore(_t(),o);s=new ft(i,e,t,t.options)}else{const i=s._$AB.nextSibling,r=s._$AM,l=r!==t;if(l){let i;null===(e=s._$AQ)||void 0===e||e.call(s,t),s._$AM=t,void 0!==s._$AP&&(i=t._$AU)!==r._$AU&&s._$AP(i)}if(i!==o||l){let t=s._$AA;for(;t!==i;){const i=t.nextSibling;n.insertBefore(t,o),t=i}}}return s},St=(t,i,s=t)=>(t._$AI(i,s),t),Tt={},xt=(t,i=Tt)=>t._$AH=i,Et=t=>t._$AH,Ct=t=>{var i;null===(i=t._$AP)||void 0===i||i.call(t,!1,!0);let s=t._$AA;const e=t._$AB.nextSibling;for(;s!==e;){const t=s.nextSibling;s.remove(),s=t}},At=t=>{t._$AR()},kt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Mt=t=>(...i)=>({_$litDirective$:t,values:i});class Pt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,s){this.et=t,this._$AM=i,this.nt=s}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const Ut=(t,i)=>{var s,e;const n=t._$AN;if(void 0===n)return!1;for(const t of n)null===(e=(s=t)._$AO)||void 0===e||e.call(s,i,!1),Ut(t,i);return!0},Vt=t=>{let i,s;do{if(void 0===(i=t._$AM))break;s=i._$AN,s.delete(t),t=i}while(0===(null==s?void 0:s.size))},Rt=t=>{for(let i;i=t._$AM;t=i){let s=i._$AN;if(void 0===s)i._$AN=s=new Set;else if(s.has(t))break;s.add(t),Lt(i)}};function Nt(t){void 0!==this._$AN?(Vt(this),this._$AM=t,Rt(this)):this._$AM=t}function Ot(t,i=!1,s=0){const e=this._$AH,n=this._$AN;if(void 0!==n&&0!==n.size)if(i)if(Array.isArray(e))for(let t=s;t{var i,s,e,n;2==t.type&&(null!==(i=(e=t)._$AP)&&void 0!==i||(e._$AP=Ot),null!==(s=(n=t)._$AQ)&&void 0!==s||(n._$AQ=Nt))};class jt extends Pt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,i,s){super._$AT(t,i,s),Rt(this),this.isConnected=t._$AU}_$AO(t,i=!0){var s,e;t!==this.isConnected&&(this.isConnected=t,t?null===(s=this.reconnected)||void 0===s||s.call(this):null===(e=this.disconnected)||void 0===e||e.call(this)),i&&(Ut(this,t),Vt(this))}setValue(t){if(wt(this.et))this.et._$AI(t,this);else{const i=[...this.et._$AH];i[this.nt]=t,this.et._$AI(i,this,0)}}disconnected(){}reconnected(){}} +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */class zt{constructor(t){this.ot=t}disconnect(){this.ot=void 0}reconnect(t){this.ot=t}deref(){return this.ot}}class Ht{constructor(){this.rt=void 0,this.lt=void 0}get(){return this.rt}pause(){var t;null!==(t=this.rt)&&void 0!==t||(this.rt=new Promise((t=>this.lt=t)))}resume(){var t;null===(t=this.lt)||void 0===t||t.call(this),this.rt=this.lt=void 0}} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */class It extends jt{constructor(){super(...arguments),this.ht=new zt(this),this.ut=new Ht}render(t,i){return D}update(t,[i,s]){if(this.isConnected||this.disconnected(),i===this.ct)return;this.ct=i;let e=0;const{ht:n,ut:o}=this;return(async(t,i)=>{for await(const s of t)if(!1===await i(s))return})(i,(async t=>{for(;o.get();)await o.get();const r=n.deref();if(void 0!==r){if(r.ct!==i)return!1;void 0!==s&&(t=s(t,e)),r.commitValue(t,e),e++}return!0})),D}commitValue(t,i){this.setValue(t)}disconnected(){this.ht.disconnect(),this.ut.pause()}reconnected(){this.ht.reconnect(this),this.ut.resume()}}const Bt=Mt(It),Dt=Mt( +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +class extends It{constructor(t){if(super(t),2!==t.type)throw Error("asyncAppend can only be used in child expressions")}update(t,i){return this.st=t,super.update(t,i)}commitValue(t,i){0===i&&At(this.st);const s=$t(this.st);St(s,t)}}),Wt=Mt( +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +class extends Pt{constructor(t){super(t),this.dt=new WeakMap}render(t){return[t]}update(t,[i]){if(bt(this.vt)&&(!bt(i)||this.vt.strings!==i.strings)){const i=Et(t).pop();let s=this.dt.get(this.vt.strings);if(void 0===s){const t=document.createDocumentFragment();s=rt(W,t),s.setConnected(!1),this.dt.set(this.vt.strings,s)}xt(s,[i]),$t(s,void 0,i)}if(bt(i)){if(!bt(this.vt)||this.vt.strings!==i.strings){const s=this.dt.get(i.strings);if(void 0!==s){const i=Et(s).pop();At(t),$t(t,void 0,i),xt(t,[i])}}this.vt=i}else this.vt=void 0;return this.render(i)}}),Zt=(t,i,s)=>{for(const s of i)if(s[0]===t)return(0,s[1])();return null==s?void 0:s()},qt=Mt( +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +class extends Pt{constructor(t){var i;if(super(t),1!==t.type||"class"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((i=>t[i])).join(" ")+" "}update(t,[i]){var s,e;if(void 0===this.ft){this.ft=new Set,void 0!==t.strings&&(this.yt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!(null===(s=this.yt)||void 0===s?void 0:s.has(t))&&this.ft.add(t);return this.render(i)}const n=t.element.classList;this.ft.forEach((t=>{t in i||(n.remove(t),this.ft.delete(t))}));for(const t in i){const s=!!i[t];s===this.ft.has(t)||(null===(e=this.yt)||void 0===e?void 0:e.has(t))||(s?(n.add(t),this.ft.add(t)):(n.remove(t),this.ft.delete(t)))}return D}}),Ft={},Gt=Mt(class extends Pt{constructor(){super(...arguments),this.bt=Ft}render(t,i){return i()}update(t,[i,s]){if(Array.isArray(i)){if(Array.isArray(this.bt)&&this.bt.length===i.length&&i.every(((t,i)=>t===this.bt[i])))return D}else if(this.bt===i)return D;return this.bt=Array.isArray(i)?Array.from(i):i,this.render(i,s)}}),Jt=t=>null!=t?t:W +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */;function*Kt(t,i){const s="function"==typeof i;if(void 0!==t){let e=-1;for(const n of t)e>-1&&(yield s?i(e):i),e++,yield n}} +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const Yt=Mt(class extends Pt{constructor(){super(...arguments),this.key=W}render(t,i){return this.key=t,i}update(t,[i,s]){return i!==this.key&&(xt(t),this.key=i),s}}),Qt=Mt( +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +class extends Pt{constructor(t){if(super(t),3!==t.type&&1!==t.type&&4!==t.type)throw Error("The `live` directive is not allowed on child or event bindings");if(!wt(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[i]){if(i===D||i===W)return i;const s=t.element,e=t.name;if(3===t.type){if(i===s[e])return D}else if(4===t.type){if(!!i===s.hasAttribute(e))return D}else if(1===t.type&&s.getAttribute(e)===i+"")return D;return xt(t),i}}); +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +function*Xt(t,i){if(void 0!==t){let s=0;for(const e of t)yield i(e,s++)}} +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function*ti(t,i,s=1){const e=void 0===i?0:t;null!=i||(i=t);for(let t=e;s>0?tnew si;class si{}const ei=new WeakMap,ni=Mt(class extends jt{render(t){return W}update(t,[i]){var s;const e=i!==this.ot;return e&&void 0!==this.ot&&this.gt(void 0),(e||this.wt!==this._t)&&(this.ot=i,this.$t=null===(s=t.options)||void 0===s?void 0:s.host,this.gt(this._t=t.element)),W}gt(t){var i;if("function"==typeof this.ot){const s=null!==(i=this.$t)&&void 0!==i?i:globalThis;let e=ei.get(s);void 0===e&&(e=new WeakMap,ei.set(s,e)),void 0!==e.get(this.ot)&&this.ot.call(this.$t,void 0),e.set(this.ot,t),void 0!==t&&this.ot.call(this.$t,t)}else this.ot.value=t}get wt(){var t,i,s;return"function"==typeof this.ot?null===(i=ei.get(null!==(t=this.$t)&&void 0!==t?t:globalThis))||void 0===i?void 0:i.get(this.ot):null===(s=this.ot)||void 0===s?void 0:s.value}disconnected(){this.wt===this._t&&this.gt(void 0)}reconnected(){this.gt(this._t)}}),oi=(t,i,s)=>{const e=new Map;for(let n=i;n<=s;n++)e.set(t[n],n);return e},ri=Mt(class extends Pt{constructor(t){if(super(t),2!==t.type)throw Error("repeat() can only be used in text expressions")}St(t,i,s){let e;void 0===s?s=i:void 0!==i&&(e=i);const n=[],o=[];let r=0;for(const i of t)n[r]=e?e(i,r):r,o[r]=s(i,r),r++;return{values:o,keys:n}}render(t,i,s){return this.St(t,i,s).values}update(t,[i,s,e]){var n;const o=Et(t),{values:r,keys:l}=this.St(i,s,e);if(!Array.isArray(o))return this.Tt=l,r;const h=null!==(n=this.Tt)&&void 0!==n?n:this.Tt=[],u=[];let c,a,d=0,v=o.length-1,f=0,p=r.length-1;for(;d<=v&&f<=p;)if(null===o[d])d++;else if(null===o[v])v--;else if(h[d]===l[f])u[f]=St(o[d],r[f]),d++,f++;else if(h[v]===l[p])u[p]=St(o[v],r[p]),v--,p--;else if(h[d]===l[p])u[p]=St(o[d],r[p]),$t(t,u[p+1],o[d]),d++,p--;else if(h[v]===l[f])u[f]=St(o[v],r[f]),$t(t,o[d],o[v]),v--,f++;else if(void 0===c&&(c=oi(l,f,p),a=oi(h,d,v)),c.has(h[d]))if(c.has(h[v])){const i=a.get(l[f]),s=void 0!==i?o[i]:null;if(null===s){const i=$t(t,o[d]);St(i,r[f]),u[f]=i}else u[f]=St(s,r[f]),$t(t,o[d],s),o[i]=null;f++}else Ct(o[v]),v--;else Ct(o[d]),d++;for(;f<=p;){const i=$t(t,u[p+1]);St(i,r[f]),u[f++]=i}for(;d<=v;){const t=o[d++];null!==t&&Ct(t)}return this.Tt=l,xt(t,u),D}}),li="important",hi=" !"+li,ui=Mt(class extends Pt{constructor(t){var i;if(super(t),1!==t.type||"style"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((i,s)=>{const e=t[s];return null==e?i:i+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${e};`}),"")}update(t,[i]){const{style:s}=t.element;if(void 0===this.xt){this.xt=new Set;for(const t in i)this.xt.add(t);return this.render(i)}this.xt.forEach((t=>{null==i[t]&&(this.xt.delete(t),t.includes("-")?s.removeProperty(t):s[t]="")}));for(const t in i){const e=i[t];if(null!=e){this.xt.add(t);const i="string"==typeof e&&e.endsWith(hi);t.includes("-")||i?s.setProperty(t,i?e.slice(0,-11):e,i?li:""):s[t]=e}}return D}}),ci=Mt( +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +class extends Pt{constructor(t){if(super(t),2!==t.type)throw Error("templateContent can only be used in child bindings")}render(t){return this.Et===t?D:(this.Et=t,document.importNode(t.content,!0))}});class ai extends Pt{constructor(t){if(super(t),this.vt=W,2!==t.type)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===W||null==t)return this.Ct=void 0,this.vt=t;if(t===D)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.vt)return this.Ct;this.vt=t;const i=[t];return i.raw=i,this.Ct={_$litType$:this.constructor.resultType,strings:i,values:[]}}}ai.directiveName="unsafeHTML",ai.resultType=1;const di=Mt(ai); +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */class vi extends ai{}vi.directiveName="unsafeSVG",vi.resultType=2;const fi=Mt(vi),pi=t=>!pt(t)&&"function"==typeof t.then,yi=1073741823; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */class bi extends jt{constructor(){super(...arguments),this.At=yi,this.kt=[],this.ht=new zt(this),this.ut=new Ht}render(...t){var i;return null!==(i=t.find((t=>!pi(t))))&&void 0!==i?i:D}update(t,i){const s=this.kt;let e=s.length;this.kt=i;const n=this.ht,o=this.ut;this.isConnected||this.disconnected();for(let t=0;tthis.At);t++){const r=i[t];if(!pi(r))return this.At=t,r;t{for(;o.get();)await o.get();const i=n.deref();if(void 0!==i){const s=i.kt.indexOf(r);s>-1&&s{if((null==t?void 0:t.r)===wi)return null==t?void 0:t._$litStatic$},$i=t=>({_$litStatic$:t,r:wi}),Si=(t,...i)=>({_$litStatic$:i.reduce(((i,s,e)=>i+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(s)+t[e+1]),t[0]),r:wi}),Ti=new Map,xi=t=>(i,...s)=>{const e=s.length;let n,o;const r=[],l=[];let h,u=0,c=!1;for(;unew o("string"==typeof t?t:t+"",void 0,s),r=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1]),t[0]);return new o(i,t,s)},h=(e,s)=>{i?e.adoptedStyleSheets=s.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):s.forEach((s=>{const i=document.createElement("style"),n=t.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=s.cssText,e.appendChild(i)}))},l=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return n(e)})(t):t +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */;var a;const u=window,c=u.trustedTypes,d=c?c.emptyScript:"",v=u.reactiveElementPolyfillSupport,p={toAttribute(t,e){switch(e){case Boolean:t=t?d:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},f=(t,e)=>e!==t&&(e==e||t==t),m={attribute:!0,type:String,converter:p,reflect:!1,hasChanged:f},y="finalized";class _ extends HTMLElement{constructor(){super(),this.o=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this.l=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.v)&&void 0!==e?e:this.v=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,s)=>{const i=this.p(s,e);void 0!==i&&(this.m.set(i,s),t.push(i))})),t}static createProperty(t,e=m){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s="symbol"==typeof t?Symbol():"__"+t,i=this.getPropertyDescriptor(t,s,e);void 0!==i&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(i){const n=this[t];this[e]=i,this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||m}static finalize(){if(this.hasOwnProperty(y))return!1;this[y]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.v&&(this.v=[...t.v]),this.elementProperties=new Map(t.elementProperties),this.m=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of e)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static p(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this.g(),this.requestUpdate(),null===(t=this.constructor.v)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,s;(null!==(e=this.S)&&void 0!==e?e:this.S=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var e;null===(e=this.S)||void 0===e||e.splice(this.S.indexOf(t)>>>0,1)}g(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this.o.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return h(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this.S)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this.S)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}$(t,e,s=m){var i;const n=this.constructor.p(t,s);if(void 0!==n&&!0===s.reflect){const o=(void 0!==(null===(i=s.converter)||void 0===i?void 0:i.toAttribute)?s.converter:p).toAttribute(e,s.type);this.l=t,null==o?this.removeAttribute(n):this.setAttribute(n,o),this.l=null}}_$AK(t,e){var s;const i=this.constructor,n=i.m.get(t);if(void 0!==n&&this.l!==n){const t=i.getPropertyOptions(n),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(s=t.converter)||void 0===s?void 0:s.fromAttribute)?t.converter:p;this.l=n,this[n]=o.fromAttribute(e,t.type),this.l=null}}requestUpdate(t,e,s){let i=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||f)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this.l!==t&&(void 0===this.C&&(this.C=new Map),this.C.set(t,s))):i=!1),!this.isUpdatePending&&i&&(this._=this.T())}async T(){this.isUpdatePending=!0;try{await this._}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this.o&&(this.o.forEach(((t,e)=>this[e]=t)),this.o=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),null===(t=this.S)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(s)):this.P()}catch(t){throw e=!1,this.P(),t}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;null===(e=this.S)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}P(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._}shouldUpdate(t){return!0}update(t){void 0!==this.C&&(this.C.forEach(((t,e)=>this.$(e,this[e],t))),this.C=void 0),this.P()}updated(t){}firstUpdated(t){}} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var b;_[y]=!0,_.elementProperties=new Map,_.elementStyles=[],_.shadowRootOptions={mode:"open"},null==v||v({ReactiveElement:_}),(null!==(a=u.reactiveElementVersions)&&void 0!==a?a:u.reactiveElementVersions=[]).push("1.6.1");const g=window,w=g.trustedTypes,S=w?w.createPolicy("lit-html",{createHTML:t=>t}):void 0,$="$lit$",C=`lit$${(Math.random()+"").slice(9)}$`,T="?"+C,P=`<${T}>`,x=document,A=()=>x.createComment(""),k=t=>null===t||"object"!=typeof t&&"function"!=typeof t,E=Array.isArray,M=t=>E(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),U="[ \t\n\f\r]",N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,R=/-->/g,O=/>/g,V=RegExp(`>|${U}(?:([^\\s"'>=/]+)(${U}*=${U}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),j=/'/g,z=/"/g,L=/^(?:script|style|textarea|title)$/i,I=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),H=I(1),B=I(2),D=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),J=new WeakMap,W=x.createTreeWalker(x,129,null,!1),Z=(t,e)=>{const s=t.length-1,i=[];let n,o=2===e?"":"",r=N;for(let e=0;e"===h[0]?(r=null!=n?n:N,a=-1):void 0===h[1]?a=-2:(a=r.lastIndex-h[2].length,l=h[1],r=void 0===h[3]?V:'"'===h[3]?z:j):r===z||r===j?r=V:r===R||r===O?r=N:(r=V,n=void 0);const c=r===V&&t[e+1].startsWith("/>")?" ":"";o+=r===N?s+P:a>=0?(i.push(l),s.slice(0,a)+$+s.slice(a)+C+c):s+C+(-2===a?(i.push(void 0),e):c)}const l=o+(t[s]||"")+(2===e?"":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==S?S.createHTML(l):l,i]};class F{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0;const r=t.length-1,l=this.parts,[h,a]=Z(t,e);if(this.el=F.createElement(h,s),W.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(i=W.nextNode())&&l.length0){i.textContent=w?w.emptyScript:"";for(let s=0;s2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=q}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,s,i){const n=this.strings;let o=!1;if(void 0===n)t=G(this,t,e,0),o=!k(t)||t!==this._$AH&&t!==D,o&&(this._$AH=t);else{const i=t;let r,l;for(t=n[0],r=0;r{var i,n;const o=null!==(i=null==s?void 0:s.renderBefore)&&void 0!==i?i:e;let r=o._$litPart$;if(void 0===r){const t=null!==(n=null==s?void 0:s.renderBefore)&&void 0!==n?n:null;o._$litPart$=r=new Q(e.insertBefore(A(),t),t,void 0,null!=s?s:{})}return r._$AI(t),r}; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var ht,lt;const at=_;class ut extends _{constructor(){super(...arguments),this.renderOptions={host:this},this.st=void 0}createRenderRoot(){var t,e;const s=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=s.firstChild),s}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.st=rt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this.st)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.st)||void 0===t||t.setConnected(!1)}render(){return D}}ut.finalized=!0,ut._$litElement$=!0,null===(ht=globalThis.litElementHydrateSupport)||void 0===ht||ht.call(globalThis,{LitElement:ut});const ct=globalThis.litElementPolyfillSupport;null==ct||ct({LitElement:ut});const dt={_$AK:(t,e,s)=>{t._$AK(e,s)},_$AL:t=>t._$AL};(null!==(lt=globalThis.litElementVersions)&&void 0!==lt?lt:globalThis.litElementVersions=[]).push("3.3.2"); +/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const vt=!1;export{o as CSSResult,ut as LitElement,_ as ReactiveElement,at as UpdatingElement,dt as _$LE,ot as _$LH,h as adoptStyles,r as css,p as defaultConverter,l as getCompatibleStyle,H as html,vt as isServer,D as noChange,f as notEqual,q as nothing,rt as render,i as supportsAdoptingStyleSheets,B as svg,n as unsafeCSS}; diff --git a/src/assets/logo.icns b/src/assets/logo.icns new file mode 100644 index 0000000..b69555d Binary files /dev/null and b/src/assets/logo.icns differ diff --git a/src/assets/logo.ico b/src/assets/logo.ico new file mode 100644 index 0000000..6399617 Binary files /dev/null and b/src/assets/logo.ico differ diff --git a/src/assets/logo.png b/src/assets/logo.png new file mode 100644 index 0000000..9eed9db Binary files /dev/null and b/src/assets/logo.png differ diff --git a/src/assets/marked-4.3.0.min.js b/src/assets/marked-4.3.0.min.js new file mode 100644 index 0000000..9402998 --- /dev/null +++ b/src/assets/marked-4.3.0.min.js @@ -0,0 +1,6 @@ +/** + * marked v4.3.0 - a markdown parser + * Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed) + * https://github.com/markedjs/marked + */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).marked={})}(this,function(r){"use strict";function i(e,t){for(var u=0;ue.length)&&(t=e.length);for(var u=0,n=new Array(t);u=e.length?{done:!0}:{done:!1,value:e[u++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function e(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}r.defaults=e();function u(e){return t[e]}var n=/[&<>"']/,l=new RegExp(n.source,"g"),o=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,a=new RegExp(o.source,"g"),t={"&":"&","<":"<",">":">",'"':""","'":"'"};function A(e,t){if(t){if(n.test(e))return e.replace(l,u)}else if(o.test(e))return e.replace(a,u);return e}var c=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function x(e){return e.replace(c,function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}var h=/(^|[^\[])\^/g;function p(u,e){u="string"==typeof u?u:u.source,e=e||"";var n={replace:function(e,t){return t=(t=t.source||t).replace(h,"$1"),u=u.replace(e,t),n},getRegex:function(){return new RegExp(u,e)}};return n}var Z=/[^\w:]/g,O=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function f(e,t,u){if(e){try{n=decodeURIComponent(x(u)).replace(Z,"").toLowerCase()}catch(e){return null}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:")||0===n.indexOf("data:"))return null}var n;t&&!O.test(u)&&(e=u,g[" "+(n=t)]||(q.test(n)?g[" "+n]=n+"/":g[" "+n]=C(n,"/",!0)),t=-1===(n=g[" "+n]).indexOf(":"),u="//"===e.substring(0,2)?t?e:n.replace(j,"$1")+e:"/"===e.charAt(0)?t?e:n.replace(P,"$1")+e:n+e);try{u=encodeURI(u).replace(/%25/g,"%")}catch(e){return null}return u}var g={},q=/^[^:]+:\/*[^/]*$/,j=/^([^:]+:)[\s\S]*$/,P=/^([^:]+:\/*[^/]*)[\s\S]*$/;var k={exec:function(){}};function d(e,t){var u=e.replace(/\|/g,function(e,t,u){for(var n=!1,r=t;0<=--r&&"\\"===u[r];)n=!n;return n?"|":" |"}).split(/ \|/),n=0;if(u[0].trim()||u.shift(),0t)u.splice(t);else for(;u.length>=1,e+=e;return u+e}function m(e,t,u,n){var r=t.href,t=t.title?A(t.title):null,i=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?(n.state.inLink=!0,e={type:"link",raw:u,href:r,title:t,text:i,tokens:n.inlineTokens(i)},n.state.inLink=!1,e):{type:"image",raw:u,href:r,title:t,text:A(i)}}var b=function(){function e(e){this.options=e||r.defaults}var t=e.prototype;return t.space=function(e){e=this.rules.block.newline.exec(e);if(e&&0=r.length?e.slice(r.length):e}).join("\n")),{type:"code",raw:t,lang:e[2]&&e[2].trim().replace(this.rules.inline._escapes,"$1"),text:u}},t.heading=function(e){var t,u,e=this.rules.block.heading.exec(e);if(e)return t=e[2].trim(),/#$/.test(t)&&(u=C(t,"#"),!this.options.pedantic&&u&&!/ $/.test(u)||(t=u.trim())),{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}},t.hr=function(e){e=this.rules.block.hr.exec(e);if(e)return{type:"hr",raw:e[0]}},t.blockquote=function(e){var t,u,n,e=this.rules.block.blockquote.exec(e);if(e)return t=e[0].replace(/^ *>[ \t]?/gm,""),u=this.lexer.state.top,this.lexer.state.top=!0,n=this.lexer.blockTokens(t),this.lexer.state.top=u,{type:"blockquote",raw:e[0],tokens:n,text:t}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){var u,n,r,i,s,l,o,a,D,c,h,p=1<(g=t[1].trim()).length,f={type:"list",raw:"",ordered:p,start:p?+g.slice(0,-1):"",loose:!1,items:[]},g=p?"\\d{1,9}\\"+g.slice(-1):"\\"+g;this.options.pedantic&&(g=p?g:"[*+-]");for(var F=new RegExp("^( {0,3}"+g+")((?:[\t ][^\\n]*)?(?:\\n|$))");e&&(h=!1,t=F.exec(e))&&!this.rules.block.hr.test(e);){if(u=t[0],e=e.substring(u.length),o=t[2].split("\n",1)[0].replace(/^\t+/,function(e){return" ".repeat(3*e.length)}),a=e.split("\n",1)[0],this.options.pedantic?(i=2,c=o.trimLeft()):(i=t[2].search(/[^ ]/),c=o.slice(i=4=i||!a.trim())c+="\n"+a.slice(i);else{if(s)break;if(4<=o.search(/[^ ]/))break;if(d.test(o))break;if(C.test(o))break;if(k.test(o))break;c+="\n"+a}s||a.trim()||(s=!0),u+=D+"\n",e=e.substring(D.length+1),o=a.slice(i)}f.loose||(l?f.loose=!0:/\n *\n *$/.test(u)&&(l=!0)),this.options.gfm&&(n=/^\[[ xX]\] /.exec(c))&&(r="[ ] "!==n[0],c=c.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:u,task:!!n,checked:r,loose:!1,text:c}),f.raw+=u}f.items[f.items.length-1].raw=u.trimRight(),f.items[f.items.length-1].text=c.trimRight(),f.raw=f.raw.trimRight();for(var E,x=f.items.length,m=0;m$/,"$1").replace(this.rules.inline._escapes,"$1"):"",n=e[3]&&e[3].substring(1,e[3].length-1).replace(this.rules.inline._escapes,"$1"),{type:"def",tag:t,raw:e[0],href:u,title:n}},t.table=function(e){e=this.rules.block.table.exec(e);if(e){var t={type:"table",header:d(e[1]).map(function(e){return{text:e}}),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(t.header.length===t.align.length){t.raw=e[0];for(var u,n,r,i=t.align.length,s=0;s/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):A(e[0]):e[0]}},t.link=function(e){e=this.rules.inline.link.exec(e);if(e){var t=e[2].trim();if(!this.options.pedantic&&/^$/.test(t))return;var u=C(t.slice(0,-1),"\\");if((t.length-u.length)%2==0)return}else{u=function(e,t){if(-1!==e.indexOf(t[1]))for(var u=e.length,n=0,r=0;r$/.test(t)?u.slice(1):u.slice(1,-1):u)&&u.replace(this.rules.inline._escapes,"$1"),title:r&&r.replace(this.rules.inline._escapes,"$1")},e[0],this.lexer)}},t.reflink=function(e,t){var u;if(u=(u=this.rules.inline.reflink.exec(e))||this.rules.inline.nolink.exec(e))return(e=t[(e=(u[2]||u[1]).replace(/\s+/g," ")).toLowerCase()])?m(u,e,u[0],this.lexer):{type:"text",raw:t=u[0].charAt(0),text:t}},t.emStrong=function(e,t,u){void 0===u&&(u="");var n=this.rules.inline.emStrong.lDelim.exec(e);if(n&&(!n[3]||!u.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var r=n[1]||n[2]||"";if(!r||""===u||this.rules.inline.punctuation.exec(u)){var i=n[0].length-1,s=i,l=0,o="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(o.lastIndex=0,t=t.slice(-1*e.length+i);null!=(n=o.exec(t));){var a,D=n[1]||n[2]||n[3]||n[4]||n[5]||n[6];if(D)if(a=D.length,n[3]||n[4])s+=a;else if((n[5]||n[6])&&i%3&&!((i+a)%3))l+=a;else if(!(0<(s-=a)))return a=Math.min(a,a+s+l),D=e.slice(0,i+n.index+(n[0].length-D.length)+a),Math.min(i,a)%2?(a=D.slice(1,-1),{type:"em",raw:D,text:a,tokens:this.lexer.inlineTokens(a)}):(a=D.slice(2,-2),{type:"strong",raw:D,text:a,tokens:this.lexer.inlineTokens(a)})}}}},t.codespan=function(e){var t,u,n,e=this.rules.inline.code.exec(e);if(e)return n=e[2].replace(/\n/g," "),t=/[^ ]/.test(n),u=/^ /.test(n)&&/ $/.test(n),n=A(n=t&&u?n.substring(1,n.length-1):n,!0),{type:"codespan",raw:e[0],text:n}},t.br=function(e){e=this.rules.inline.br.exec(e);if(e)return{type:"br",raw:e[0]}},t.del=function(e){e=this.rules.inline.del.exec(e);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}},t.autolink=function(e,t){var u,e=this.rules.inline.autolink.exec(e);if(e)return t="@"===e[2]?"mailto:"+(u=A(this.options.mangle?t(e[1]):e[1])):u=A(e[1]),{type:"link",raw:e[0],text:u,href:t,tokens:[{type:"text",raw:u,text:u}]}},t.url=function(e,t){var u,n,r,i;if(u=this.rules.inline.url.exec(e)){if("@"===u[2])r="mailto:"+(n=A(this.options.mangle?t(u[0]):u[0]));else{for(;i=u[0],u[0]=this.rules.inline._backpedal.exec(u[0])[0],i!==u[0];);n=A(u[0]),r="www."===u[1]?"http://"+u[0]:u[0]}return{type:"link",raw:u[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}},t.inlineText=function(e,t){e=this.rules.inline.text.exec(e);if(e)return t=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):A(e[0]):e[0]:A(this.options.smartypants?t(e[0]):e[0]),{type:"text",raw:e[0],text:t}},e}(),B={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:k,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/},w=(B.def=p(B.def).replace("label",B._label).replace("title",B._title).getRegex(),B.bullet=/(?:[*+-]|\d{1,9}[.)])/,B.listItemStart=p(/^( *)(bull) */).replace("bull",B.bullet).getRegex(),B.list=p(B.list).replace(/bull/g,B.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+B.def.source+")").getRegex(),B._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",B._comment=/|$)/,B.html=p(B.html,"i").replace("comment",B._comment).replace("tag",B._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),B.paragraph=p(B._paragraph).replace("hr",B.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",B._tag).getRegex(),B.blockquote=p(B.blockquote).replace("paragraph",B.paragraph).getRegex(),B.normal=F({},B),B.gfm=F({},B.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),B.gfm.table=p(B.gfm.table).replace("hr",B.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",B._tag).getRegex(),B.gfm.paragraph=p(B._paragraph).replace("hr",B.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",B.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",B._tag).getRegex(),B.pedantic=F({},B.normal,{html:p("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",B._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:k,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:p(B.normal._paragraph).replace("hr",B.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",B.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()}),{escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:k,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:k,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",w.punctuation=p(w.punctuation).replace(/punctuation/g,w._punctuation).getRegex(),w.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,w.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,w._comment=p(B._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),w.emStrong.lDelim=p(w.emStrong.lDelim).replace(/punct/g,w._punctuation).getRegex(),w.emStrong.rDelimAst=p(w.emStrong.rDelimAst,"g").replace(/punct/g,w._punctuation).getRegex(),w.emStrong.rDelimUnd=p(w.emStrong.rDelimUnd,"g").replace(/punct/g,w._punctuation).getRegex(),w._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,w._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,w._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,w.autolink=p(w.autolink).replace("scheme",w._scheme).replace("email",w._email).getRegex(),w._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,w.tag=p(w.tag).replace("comment",w._comment).replace("attribute",w._attribute).getRegex(),w._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,w._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,w._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,w.link=p(w.link).replace("label",w._label).replace("href",w._href).replace("title",w._title).getRegex(),w.reflink=p(w.reflink).replace("label",w._label).replace("ref",B._label).getRegex(),w.nolink=p(w.nolink).replace("ref",B._label).getRegex(),w.reflinkSearch=p(w.reflinkSearch,"g").replace("reflink",w.reflink).replace("nolink",w.nolink).getRegex(),w.normal=F({},w),w.pedantic=F({},w.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:p(/^!?\[(label)\]\((.*?)\)/).replace("label",w._label).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",w._label).getRegex()}),w.gfm=F({},w.normal,{escape:p(w.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\'+(u?e:A(e,!0))+"\n":"
"+(u?e:A(e,!0))+"
\n"},t.blockquote=function(e){return"
\n"+e+"
\n"},t.html=function(e){return e},t.heading=function(e,t,u,n){return this.options.headerIds?"'+e+"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
\n":"
\n"},t.list=function(e,t,u){var n=t?"ol":"ul";return"<"+n+(t&&1!==u?' start="'+u+'"':"")+">\n"+e+"\n"},t.listitem=function(e){return"
  • "+e+"
  • \n"},t.checkbox=function(e){return" "},t.paragraph=function(e){return"

    "+e+"

    \n"},t.table=function(e,t){return"\n\n"+e+"\n"+(t=t&&""+t+"")+"
    \n"},t.tablerow=function(e){return"\n"+e+"\n"},t.tablecell=function(e,t){var u=t.header?"th":"td";return(t.align?"<"+u+' align="'+t.align+'">':"<"+u+">")+e+"\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
    ":"
    "},t.del=function(e){return""+e+""},t.link=function(e,t,u){return null===(e=f(this.options.sanitize,this.options.baseUrl,e))?u:(e='"+u+"")},t.image=function(e,t,u){return null===(e=f(this.options.sanitize,this.options.baseUrl,e))?u:(e=''+u+'":">"))},t.text=function(e){return e},e}(),z=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,u){return""+u},t.image=function(e,t,u){return""+u},t.br=function(){return""},e}(),$=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var u=e,n=0;if(this.seen.hasOwnProperty(u))for(n=this.seen[e];u=e+"-"+ ++n,this.seen.hasOwnProperty(u););return t||(this.seen[e]=n,this.seen[u]=0),u},t.slug=function(e,t){void 0===t&&(t={});e=this.serialize(e);return this.getNextSafeSlug(e,t.dryrun)},e}(),S=function(){function u(e){this.options=e||r.defaults,this.options.renderer=this.options.renderer||new _,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new z,this.slugger=new $}u.parse=function(e,t){return new u(t).parse(e)},u.parseInline=function(e,t){return new u(t).parseInline(e)};var e=u.prototype;return e.parse=function(e,t){void 0===t&&(t=!0);for(var u,n,r,i,s,l,o,a,D,c,h,p,f,g,F,A,k="",d=e.length,C=0;C",i?Promise.resolve(t):s?void s(null,t):t;if(i)return Promise.reject(e);if(!s)throw e;s(e)});if(null==e)return l(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if((t=u)&&t.sanitize&&!t.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options"),u.hooks&&(u.hooks.options=u),n){var o,a=u.highlight;try{u.hooks&&(e=u.hooks.preprocess(e)),o=f(e,u)}catch(e){return l(e)}var D,c=function(t){var e;if(!t)try{u.walkTokens&&I.walkTokens(o,u.walkTokens),e=g(o,u),u.hooks&&(e=u.hooks.postprocess(e))}catch(e){t=e}return u.highlight=a,t?l(t):n(null,e)};return!a||a.length<3?c():(delete u.highlight,o.length?(D=0,I.walkTokens(o,function(u){"code"===u.type&&(D++,setTimeout(function(){a(u.text,u.lang,function(e,t){if(e)return c(e);null!=t&&t!==u.text&&(u.text=t,u.escaped=!0),0===--D&&c()})},0))}),void(0===D&&c())):c())}if(u.async)return Promise.resolve(u.hooks?u.hooks.preprocess(e):e).then(function(e){return f(e,u)}).then(function(e){return u.walkTokens?Promise.all(I.walkTokens(e,u.walkTokens)).then(function(){return e}):e}).then(function(e){return g(e,u)}).then(function(e){return u.hooks?u.hooks.postprocess(e):e}).catch(l);try{u.hooks&&(e=u.hooks.preprocess(e));var h=f(e,u),p=(u.walkTokens&&I.walkTokens(h,u.walkTokens),g(h,u));return p=u.hooks?u.hooks.postprocess(p):p}catch(e){return l(e)}}}function I(e,t,u){return R(v.lex,S.parse)(e,t,u)}T.passThroughHooks=new Set(["preprocess","postprocess"]),I.options=I.setOptions=function(e){return I.defaults=F({},I.defaults,e),e=I.defaults,r.defaults=e,I},I.getDefaults=e,I.defaults=r.defaults,I.use=function(){for(var D=I.defaults.extensions||{renderers:{},childTokens:{}},e=arguments.length,t=new Array(e),u=0;u \ No newline at end of file diff --git a/src/assets/onboarding/customize.svg b/src/assets/onboarding/customize.svg new file mode 100644 index 0000000..3c10cdd --- /dev/null +++ b/src/assets/onboarding/customize.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/onboarding/ready.svg b/src/assets/onboarding/ready.svg new file mode 100644 index 0000000..1886ab3 --- /dev/null +++ b/src/assets/onboarding/ready.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/onboarding/security.svg b/src/assets/onboarding/security.svg new file mode 100644 index 0000000..5749c3c --- /dev/null +++ b/src/assets/onboarding/security.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/onboarding/welcome.svg b/src/assets/onboarding/welcome.svg new file mode 100644 index 0000000..0bee5ee --- /dev/null +++ b/src/assets/onboarding/welcome.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/audioUtils.js b/src/audioUtils.js new file mode 100644 index 0000000..40602c6 --- /dev/null +++ b/src/audioUtils.js @@ -0,0 +1,135 @@ +const fs = require('fs'); +const path = require('path'); + +// Convert raw PCM to WAV format for easier playback and verification +function pcmToWav(pcmBuffer, outputPath, sampleRate = 24000, channels = 1, bitDepth = 16) { + const byteRate = sampleRate * channels * (bitDepth / 8); + const blockAlign = channels * (bitDepth / 8); + const dataSize = pcmBuffer.length; + + // Create WAV header + const header = Buffer.alloc(44); + + // "RIFF" chunk descriptor + header.write('RIFF', 0); + header.writeUInt32LE(dataSize + 36, 4); // File size - 8 + header.write('WAVE', 8); + + // "fmt " sub-chunk + header.write('fmt ', 12); + header.writeUInt32LE(16, 16); // Subchunk1Size (16 for PCM) + header.writeUInt16LE(1, 20); // AudioFormat (1 for PCM) + header.writeUInt16LE(channels, 22); // NumChannels + header.writeUInt32LE(sampleRate, 24); // SampleRate + header.writeUInt32LE(byteRate, 28); // ByteRate + header.writeUInt16LE(blockAlign, 32); // BlockAlign + header.writeUInt16LE(bitDepth, 34); // BitsPerSample + + // "data" sub-chunk + header.write('data', 36); + header.writeUInt32LE(dataSize, 40); // Subchunk2Size + + // Combine header and PCM data + const wavBuffer = Buffer.concat([header, pcmBuffer]); + + // Write to file + fs.writeFileSync(outputPath, wavBuffer); + + return outputPath; +} + +// Analyze audio buffer for debugging +function analyzeAudioBuffer(buffer, label = 'Audio') { + const int16Array = new Int16Array(buffer.buffer, buffer.byteOffset, buffer.length / 2); + + let minValue = 32767; + let maxValue = -32768; + let avgValue = 0; + let rmsValue = 0; + let silentSamples = 0; + + for (let i = 0; i < int16Array.length; i++) { + const sample = int16Array[i]; + minValue = Math.min(minValue, sample); + maxValue = Math.max(maxValue, sample); + avgValue += sample; + rmsValue += sample * sample; + + if (Math.abs(sample) < 100) { + silentSamples++; + } + } + + avgValue /= int16Array.length; + rmsValue = Math.sqrt(rmsValue / int16Array.length); + + const silencePercentage = (silentSamples / int16Array.length) * 100; + + console.log(`${label} Analysis:`); + console.log(` Samples: ${int16Array.length}`); + console.log(` Min: ${minValue}, Max: ${maxValue}`); + console.log(` Average: ${avgValue.toFixed(2)}`); + console.log(` RMS: ${rmsValue.toFixed(2)}`); + console.log(` Silence: ${silencePercentage.toFixed(1)}%`); + console.log(` Dynamic Range: ${20 * Math.log10(maxValue / (rmsValue || 1))} dB`); + + return { + minValue, + maxValue, + avgValue, + rmsValue, + silencePercentage, + sampleCount: int16Array.length, + }; +} + +// Save audio buffer with metadata for debugging +function saveDebugAudio(buffer, type, timestamp = Date.now()) { + const homeDir = require('os').homedir(); + const debugDir = path.join(homeDir, 'cheating-daddy-debug'); + + if (!fs.existsSync(debugDir)) { + fs.mkdirSync(debugDir, { recursive: true }); + } + + const pcmPath = path.join(debugDir, `${type}_${timestamp}.pcm`); + const wavPath = path.join(debugDir, `${type}_${timestamp}.wav`); + const metaPath = path.join(debugDir, `${type}_${timestamp}.json`); + + // Save raw PCM + fs.writeFileSync(pcmPath, buffer); + + // Convert to WAV for easy playback + pcmToWav(buffer, wavPath); + + // Analyze and save metadata + const analysis = analyzeAudioBuffer(buffer, type); + fs.writeFileSync( + metaPath, + JSON.stringify( + { + timestamp, + type, + bufferSize: buffer.length, + analysis, + format: { + sampleRate: 24000, + channels: 1, + bitDepth: 16, + }, + }, + null, + 2 + ) + ); + + console.log(`Debug audio saved: ${wavPath}`); + + return { pcmPath, wavPath, metaPath }; +} + +module.exports = { + pcmToWav, + analyzeAudioBuffer, + saveDebugAudio, +}; diff --git a/src/components/app/AppHeader.js b/src/components/app/AppHeader.js new file mode 100644 index 0000000..f0211bd --- /dev/null +++ b/src/components/app/AppHeader.js @@ -0,0 +1,340 @@ +import { html, css, LitElement } from '../../assets/lit-core-2.7.4.min.js'; + +export class AppHeader extends LitElement { + static styles = css` + * { + font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; + cursor: default; + user-select: none; + } + + .header { + -webkit-app-region: drag; + display: flex; + align-items: center; + padding: var(--header-padding); + background: var(--header-background); + border-bottom: 1px solid var(--border-color); + } + + .header-title { + flex: 1; + font-size: var(--header-font-size); + font-weight: 500; + color: var(--text-color); + -webkit-app-region: drag; + } + + .header-actions { + display: flex; + gap: var(--header-gap); + align-items: center; + -webkit-app-region: no-drag; + } + + .header-actions span { + font-size: var(--header-font-size-small); + color: var(--text-secondary); + } + + .button { + background: transparent; + color: var(--text-color); + border: 1px solid var(--border-color); + padding: var(--header-button-padding); + border-radius: 3px; + font-size: var(--header-font-size-small); + font-weight: 500; + transition: background 0.1s ease; + } + + .button:hover { + background: var(--hover-background); + } + + .icon-button { + background: transparent; + color: var(--text-secondary); + border: none; + padding: var(--header-icon-padding); + border-radius: 3px; + font-size: var(--header-font-size-small); + font-weight: 500; + display: flex; + align-items: center; + justify-content: center; + transition: all 0.1s ease; + } + + .icon-button svg { + width: var(--icon-size); + height: var(--icon-size); + } + + .icon-button:hover { + background: var(--hover-background); + color: var(--text-color); + } + + :host([isclickthrough]) .button:hover, + :host([isclickthrough]) .icon-button:hover { + background: transparent; + } + + .key { + background: var(--key-background); + padding: 2px 6px; + border-radius: 3px; + font-size: 11px; + font-family: 'SF Mono', Monaco, monospace; + } + + .click-through-indicator { + font-size: 10px; + color: var(--text-muted); + background: var(--key-background); + padding: 2px 6px; + border-radius: 3px; + font-family: 'SF Mono', Monaco, monospace; + } + + .update-button { + background: transparent; + color: #f14c4c; + border: 1px solid #f14c4c; + padding: var(--header-button-padding); + border-radius: 3px; + font-size: var(--header-font-size-small); + font-weight: 500; + display: flex; + align-items: center; + gap: 4px; + transition: all 0.1s ease; + } + + .update-button svg { + width: 14px; + height: 14px; + } + + .update-button:hover { + background: rgba(241, 76, 76, 0.1); + } + `; + + static properties = { + currentView: { type: String }, + statusText: { type: String }, + startTime: { type: Number }, + onCustomizeClick: { type: Function }, + onHelpClick: { type: Function }, + onHistoryClick: { type: Function }, + onCloseClick: { type: Function }, + onBackClick: { type: Function }, + onHideToggleClick: { type: Function }, + isClickThrough: { type: Boolean, reflect: true }, + updateAvailable: { type: Boolean }, + }; + + constructor() { + super(); + this.currentView = 'main'; + this.statusText = ''; + this.startTime = null; + this.onCustomizeClick = () => {}; + this.onHelpClick = () => {}; + this.onHistoryClick = () => {}; + this.onCloseClick = () => {}; + this.onBackClick = () => {}; + this.onHideToggleClick = () => {}; + this.isClickThrough = false; + this.updateAvailable = false; + this._timerInterval = null; + } + + connectedCallback() { + super.connectedCallback(); + this._startTimer(); + this._checkForUpdates(); + } + + async _checkForUpdates() { + try { + const currentVersion = await cheatingDaddy.getVersion(); + const response = await fetch('https://raw.githubusercontent.com/sohzm/cheating-daddy/refs/heads/master/package.json'); + if (!response.ok) return; + + const remotePackage = await response.json(); + const remoteVersion = remotePackage.version; + + if (this._isNewerVersion(remoteVersion, currentVersion)) { + this.updateAvailable = true; + } + } catch (err) { + console.log('Update check failed:', err.message); + } + } + + _isNewerVersion(remote, current) { + const remoteParts = remote.split('.').map(Number); + const currentParts = current.split('.').map(Number); + + for (let i = 0; i < Math.max(remoteParts.length, currentParts.length); i++) { + const r = remoteParts[i] || 0; + const c = currentParts[i] || 0; + if (r > c) return true; + if (r < c) return false; + } + return false; + } + + async _openUpdatePage() { + const { ipcRenderer } = require('electron'); + await ipcRenderer.invoke('open-external', 'https://cheatingdaddy.com'); + } + + disconnectedCallback() { + super.disconnectedCallback(); + this._stopTimer(); + } + + updated(changedProperties) { + super.updated(changedProperties); + + // Start/stop timer based on view change + if (changedProperties.has('currentView')) { + if (this.currentView === 'assistant' && this.startTime) { + this._startTimer(); + } else { + this._stopTimer(); + } + } + + // Start timer when startTime is set + if (changedProperties.has('startTime')) { + if (this.startTime && this.currentView === 'assistant') { + this._startTimer(); + } else if (!this.startTime) { + this._stopTimer(); + } + } + } + + _startTimer() { + // Clear any existing timer + this._stopTimer(); + + // Only start timer if we're in assistant view and have a start time + if (this.currentView === 'assistant' && this.startTime) { + this._timerInterval = setInterval(() => { + // Trigger a re-render by requesting an update + this.requestUpdate(); + }, 1000); // Update every second + } + } + + _stopTimer() { + if (this._timerInterval) { + clearInterval(this._timerInterval); + this._timerInterval = null; + } + } + + getViewTitle() { + const titles = { + onboarding: 'Welcome to Cheating Daddy', + main: 'Cheating Daddy', + customize: 'Customize', + help: 'Help & Shortcuts', + history: 'Conversation History', + advanced: 'Advanced Tools', + assistant: 'Cheating Daddy', + }; + return titles[this.currentView] || 'Cheating Daddy'; + } + + getElapsedTime() { + if (this.currentView === 'assistant' && this.startTime) { + const elapsed = Math.floor((Date.now() - this.startTime) / 1000); + if (elapsed >= 60) { + const minutes = Math.floor(elapsed / 60); + const seconds = elapsed % 60; + return `${minutes}m ${seconds}s`; + } + return `${elapsed}s`; + } + return ''; + } + + isNavigationView() { + const navigationViews = ['customize', 'help', 'history', 'advanced']; + return navigationViews.includes(this.currentView); + } + + render() { + const elapsedTime = this.getElapsedTime(); + + return html` +
    +
    ${this.getViewTitle()}
    +
    + ${this.currentView === 'assistant' + ? html` + ${elapsedTime} + ${this.statusText} + ${this.isClickThrough ? html`click-through` : ''} + ` + : ''} + ${this.currentView === 'main' + ? html` + ${this.updateAvailable ? html` + + ` : ''} + + + + ` + : ''} + ${this.currentView === 'assistant' + ? html` + + + ` + : html` + + `} +
    +
    + `; + } +} + +customElements.define('app-header', AppHeader); diff --git a/src/components/app/CheatingDaddyApp.js b/src/components/app/CheatingDaddyApp.js new file mode 100644 index 0000000..b568c87 --- /dev/null +++ b/src/components/app/CheatingDaddyApp.js @@ -0,0 +1,568 @@ +import { html, css, LitElement } from '../../assets/lit-core-2.7.4.min.js'; +import { AppHeader } from './AppHeader.js'; +import { MainView } from '../views/MainView.js'; +import { CustomizeView } from '../views/CustomizeView.js'; +import { HelpView } from '../views/HelpView.js'; +import { HistoryView } from '../views/HistoryView.js'; +import { AssistantView } from '../views/AssistantView.js'; +import { OnboardingView } from '../views/OnboardingView.js'; + +export class CheatingDaddyApp extends LitElement { + static styles = css` + * { + box-sizing: border-box; + font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; + margin: 0px; + padding: 0px; + cursor: default; + user-select: none; + } + + :host { + display: block; + width: 100%; + height: 100vh; + background-color: var(--background-transparent); + color: var(--text-color); + } + + .window-container { + height: 100vh; + overflow: hidden; + background: var(--bg-primary); + } + + .container { + display: flex; + flex-direction: column; + height: 100%; + } + + .main-content { + flex: 1; + padding: var(--main-content-padding); + overflow-y: auto; + background: var(--main-content-background); + } + + .main-content.with-border { + border-top: none; + } + + .main-content.assistant-view { + padding: 12px; + } + + .main-content.onboarding-view { + padding: 0; + background: transparent; + } + + .main-content.settings-view, + .main-content.help-view, + .main-content.history-view { + padding: 0; + } + + .view-container { + opacity: 1; + height: 100%; + } + + .view-container.entering { + opacity: 0; + } + + ::-webkit-scrollbar { + width: 8px; + height: 8px; + } + + ::-webkit-scrollbar-track { + background: transparent; + } + + ::-webkit-scrollbar-thumb { + background: var(--scrollbar-thumb); + border-radius: 4px; + } + + ::-webkit-scrollbar-thumb:hover { + background: var(--scrollbar-thumb-hover); + } + `; + + static properties = { + currentView: { type: String }, + statusText: { type: String }, + startTime: { type: Number }, + isRecording: { type: Boolean }, + sessionActive: { type: Boolean }, + selectedProfile: { type: String }, + selectedLanguage: { type: String }, + responses: { type: Array }, + currentResponseIndex: { type: Number }, + selectedScreenshotInterval: { type: String }, + selectedImageQuality: { type: String }, + layoutMode: { type: String }, + _viewInstances: { type: Object, state: true }, + _isClickThrough: { state: true }, + _awaitingNewResponse: { state: true }, + shouldAnimateResponse: { type: Boolean }, + _storageLoaded: { state: true }, + }; + + constructor() { + super(); + // Set defaults - will be overwritten by storage + this.currentView = 'main'; // Will check onboarding after storage loads + this.statusText = ''; + this.startTime = null; + this.isRecording = false; + this.sessionActive = false; + this.selectedProfile = 'interview'; + this.selectedLanguage = 'en-US'; + this.selectedScreenshotInterval = '5'; + this.selectedImageQuality = 'medium'; + this.layoutMode = 'normal'; + this.responses = []; + this.currentResponseIndex = -1; + this._viewInstances = new Map(); + this._isClickThrough = false; + this._awaitingNewResponse = false; + this._currentResponseIsComplete = true; + this.shouldAnimateResponse = false; + this._storageLoaded = false; + + // Load from storage + this._loadFromStorage(); + } + + async _loadFromStorage() { + try { + const [config, prefs] = await Promise.all([ + cheatingDaddy.storage.getConfig(), + cheatingDaddy.storage.getPreferences() + ]); + + // Check onboarding status + this.currentView = config.onboarded ? 'main' : 'onboarding'; + + // Apply background appearance (color + transparency) + this.applyBackgroundAppearance( + prefs.backgroundColor ?? '#1e1e1e', + prefs.backgroundTransparency ?? 0.8 + ); + + // Load preferences + this.selectedProfile = prefs.selectedProfile || 'interview'; + this.selectedLanguage = prefs.selectedLanguage || 'en-US'; + this.selectedScreenshotInterval = prefs.selectedScreenshotInterval || '5'; + this.selectedImageQuality = prefs.selectedImageQuality || 'medium'; + this.layoutMode = config.layout || 'normal'; + + this._storageLoaded = true; + this.updateLayoutMode(); + this.requestUpdate(); + } catch (error) { + console.error('Error loading from storage:', error); + this._storageLoaded = true; + this.requestUpdate(); + } + } + + hexToRgb(hex) { + const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); + return result ? { + r: parseInt(result[1], 16), + g: parseInt(result[2], 16), + b: parseInt(result[3], 16) + } : { r: 30, g: 30, b: 30 }; + } + + lightenColor(rgb, amount) { + return { + r: Math.min(255, rgb.r + amount), + g: Math.min(255, rgb.g + amount), + b: Math.min(255, rgb.b + amount) + }; + } + + applyBackgroundAppearance(backgroundColor, alpha) { + const root = document.documentElement; + const baseRgb = this.hexToRgb(backgroundColor); + + // Generate color variants based on the base color + const secondary = this.lightenColor(baseRgb, 7); + const tertiary = this.lightenColor(baseRgb, 15); + const hover = this.lightenColor(baseRgb, 20); + + root.style.setProperty('--header-background', `rgba(${baseRgb.r}, ${baseRgb.g}, ${baseRgb.b}, ${alpha})`); + root.style.setProperty('--main-content-background', `rgba(${baseRgb.r}, ${baseRgb.g}, ${baseRgb.b}, ${alpha})`); + root.style.setProperty('--bg-primary', `rgba(${baseRgb.r}, ${baseRgb.g}, ${baseRgb.b}, ${alpha})`); + root.style.setProperty('--bg-secondary', `rgba(${secondary.r}, ${secondary.g}, ${secondary.b}, ${alpha})`); + root.style.setProperty('--bg-tertiary', `rgba(${tertiary.r}, ${tertiary.g}, ${tertiary.b}, ${alpha})`); + root.style.setProperty('--bg-hover', `rgba(${hover.r}, ${hover.g}, ${hover.b}, ${alpha})`); + root.style.setProperty('--input-background', `rgba(${tertiary.r}, ${tertiary.g}, ${tertiary.b}, ${alpha})`); + root.style.setProperty('--input-focus-background', `rgba(${tertiary.r}, ${tertiary.g}, ${tertiary.b}, ${alpha})`); + root.style.setProperty('--hover-background', `rgba(${hover.r}, ${hover.g}, ${hover.b}, ${alpha})`); + root.style.setProperty('--scrollbar-background', `rgba(${baseRgb.r}, ${baseRgb.g}, ${baseRgb.b}, ${alpha})`); + } + + // Keep old function name for backwards compatibility + applyBackgroundTransparency(alpha) { + this.applyBackgroundAppearance('#1e1e1e', alpha); + } + + connectedCallback() { + super.connectedCallback(); + + // Apply layout mode to document root + this.updateLayoutMode(); + + // Set up IPC listeners if needed + if (window.require) { + const { ipcRenderer } = window.require('electron'); + ipcRenderer.on('new-response', (_, response) => { + this.addNewResponse(response); + }); + ipcRenderer.on('update-response', (_, response) => { + this.updateCurrentResponse(response); + }); + ipcRenderer.on('update-status', (_, status) => { + this.setStatus(status); + }); + ipcRenderer.on('click-through-toggled', (_, isEnabled) => { + this._isClickThrough = isEnabled; + }); + ipcRenderer.on('reconnect-failed', (_, data) => { + this.addNewResponse(data.message); + }); + } + } + + disconnectedCallback() { + super.disconnectedCallback(); + if (window.require) { + const { ipcRenderer } = window.require('electron'); + ipcRenderer.removeAllListeners('new-response'); + ipcRenderer.removeAllListeners('update-response'); + ipcRenderer.removeAllListeners('update-status'); + ipcRenderer.removeAllListeners('click-through-toggled'); + ipcRenderer.removeAllListeners('reconnect-failed'); + } + } + + setStatus(text) { + this.statusText = text; + + // Mark response as complete when we get certain status messages + if (text.includes('Ready') || text.includes('Listening') || text.includes('Error')) { + this._currentResponseIsComplete = true; + console.log('[setStatus] Marked current response as complete'); + } + } + + addNewResponse(response) { + // Add a new response entry (first word of a new AI response) + this.responses = [...this.responses, response]; + this.currentResponseIndex = this.responses.length - 1; + this._awaitingNewResponse = false; + console.log('[addNewResponse] Added:', response); + this.requestUpdate(); + } + + updateCurrentResponse(response) { + // Update the current response in place (streaming subsequent words) + if (this.responses.length > 0) { + this.responses = [...this.responses.slice(0, -1), response]; + console.log('[updateCurrentResponse] Updated to:', response); + } else { + // Fallback: if no responses exist, add as new + this.addNewResponse(response); + } + this.requestUpdate(); + } + + // Header event handlers + handleCustomizeClick() { + this.currentView = 'customize'; + this.requestUpdate(); + } + + handleHelpClick() { + this.currentView = 'help'; + this.requestUpdate(); + } + + handleHistoryClick() { + this.currentView = 'history'; + this.requestUpdate(); + } + + async handleClose() { + if (this.currentView === 'customize' || this.currentView === 'help' || this.currentView === 'history') { + this.currentView = 'main'; + } else if (this.currentView === 'assistant') { + cheatingDaddy.stopCapture(); + + // Close the session + if (window.require) { + const { ipcRenderer } = window.require('electron'); + await ipcRenderer.invoke('close-session'); + } + this.sessionActive = false; + this.currentView = 'main'; + console.log('Session closed'); + } else { + // Quit the entire application + if (window.require) { + const { ipcRenderer } = window.require('electron'); + await ipcRenderer.invoke('quit-application'); + } + } + } + + async handleHideToggle() { + if (window.require) { + const { ipcRenderer } = window.require('electron'); + await ipcRenderer.invoke('toggle-window-visibility'); + } + } + + // Main view event handlers + async handleStart() { + // check if api key is empty do nothing + const apiKey = await cheatingDaddy.storage.getApiKey(); + if (!apiKey || apiKey === '') { + // Trigger the red blink animation on the API key input + const mainView = this.shadowRoot.querySelector('main-view'); + if (mainView && mainView.triggerApiKeyError) { + mainView.triggerApiKeyError(); + } + return; + } + + await cheatingDaddy.initializeGemini(this.selectedProfile, this.selectedLanguage); + // Pass the screenshot interval as string (including 'manual' option) + cheatingDaddy.startCapture(this.selectedScreenshotInterval, this.selectedImageQuality); + this.responses = []; + this.currentResponseIndex = -1; + this.startTime = Date.now(); + this.currentView = 'assistant'; + } + + async handleAPIKeyHelp() { + if (window.require) { + const { ipcRenderer } = window.require('electron'); + await ipcRenderer.invoke('open-external', 'https://cheatingdaddy.com/help/api-key'); + } + } + + // Customize view event handlers + async handleProfileChange(profile) { + this.selectedProfile = profile; + await cheatingDaddy.storage.updatePreference('selectedProfile', profile); + } + + async handleLanguageChange(language) { + this.selectedLanguage = language; + await cheatingDaddy.storage.updatePreference('selectedLanguage', language); + } + + async handleScreenshotIntervalChange(interval) { + this.selectedScreenshotInterval = interval; + await cheatingDaddy.storage.updatePreference('selectedScreenshotInterval', interval); + } + + async handleImageQualityChange(quality) { + this.selectedImageQuality = quality; + await cheatingDaddy.storage.updatePreference('selectedImageQuality', quality); + } + + handleBackClick() { + this.currentView = 'main'; + this.requestUpdate(); + } + + // Help view event handlers + async handleExternalLinkClick(url) { + if (window.require) { + const { ipcRenderer } = window.require('electron'); + await ipcRenderer.invoke('open-external', url); + } + } + + // Assistant view event handlers + async handleSendText(message) { + const result = await window.cheatingDaddy.sendTextMessage(message); + + if (!result.success) { + console.error('Failed to send message:', result.error); + this.setStatus('Error sending message: ' + result.error); + } else { + this.setStatus('Message sent...'); + this._awaitingNewResponse = true; + } + } + + handleResponseIndexChanged(e) { + this.currentResponseIndex = e.detail.index; + this.shouldAnimateResponse = false; + this.requestUpdate(); + } + + // Onboarding event handlers + handleOnboardingComplete() { + this.currentView = 'main'; + } + + updated(changedProperties) { + super.updated(changedProperties); + + // Only notify main process of view change if the view actually changed + if (changedProperties.has('currentView') && window.require) { + const { ipcRenderer } = window.require('electron'); + ipcRenderer.send('view-changed', this.currentView); + + // Add a small delay to smooth out the transition + const viewContainer = this.shadowRoot?.querySelector('.view-container'); + if (viewContainer) { + viewContainer.classList.add('entering'); + requestAnimationFrame(() => { + viewContainer.classList.remove('entering'); + }); + } + } + + if (changedProperties.has('layoutMode')) { + this.updateLayoutMode(); + } + } + + renderCurrentView() { + // Only re-render the view if it hasn't been cached or if critical properties changed + const viewKey = `${this.currentView}-${this.selectedProfile}-${this.selectedLanguage}`; + + switch (this.currentView) { + case 'onboarding': + return html` + this.handleOnboardingComplete()} .onClose=${() => this.handleClose()}> + `; + + case 'main': + return html` + this.handleStart()} + .onAPIKeyHelp=${() => this.handleAPIKeyHelp()} + .onLayoutModeChange=${layoutMode => this.handleLayoutModeChange(layoutMode)} + > + `; + + case 'customize': + return html` + this.handleProfileChange(profile)} + .onLanguageChange=${language => this.handleLanguageChange(language)} + .onScreenshotIntervalChange=${interval => this.handleScreenshotIntervalChange(interval)} + .onImageQualityChange=${quality => this.handleImageQualityChange(quality)} + .onLayoutModeChange=${layoutMode => this.handleLayoutModeChange(layoutMode)} + > + `; + + case 'help': + return html` this.handleExternalLinkClick(url)}> `; + + case 'history': + return html` `; + + case 'assistant': + return html` + this.handleSendText(message)} + .shouldAnimateResponse=${this.shouldAnimateResponse} + @response-index-changed=${this.handleResponseIndexChanged} + @response-animation-complete=${() => { + this.shouldAnimateResponse = false; + this._currentResponseIsComplete = true; + console.log('[response-animation-complete] Marked current response as complete'); + this.requestUpdate(); + }} + > + `; + + default: + return html`
    Unknown view: ${this.currentView}
    `; + } + } + + render() { + const viewClassMap = { + 'assistant': 'assistant-view', + 'onboarding': 'onboarding-view', + 'customize': 'settings-view', + 'help': 'help-view', + 'history': 'history-view', + }; + const mainContentClass = `main-content ${viewClassMap[this.currentView] || 'with-border'}`; + + return html` +
    +
    + this.handleCustomizeClick()} + .onHelpClick=${() => this.handleHelpClick()} + .onHistoryClick=${() => this.handleHistoryClick()} + .onCloseClick=${() => this.handleClose()} + .onBackClick=${() => this.handleBackClick()} + .onHideToggleClick=${() => this.handleHideToggle()} + ?isClickThrough=${this._isClickThrough} + > +
    +
    ${this.renderCurrentView()}
    +
    +
    +
    + `; + } + + updateLayoutMode() { + // Apply or remove compact layout class to document root + if (this.layoutMode === 'compact') { + document.documentElement.classList.add('compact-layout'); + } else { + document.documentElement.classList.remove('compact-layout'); + } + } + + async handleLayoutModeChange(layoutMode) { + this.layoutMode = layoutMode; + await cheatingDaddy.storage.updateConfig('layout', layoutMode); + this.updateLayoutMode(); + + // Notify main process about layout change for window resizing + if (window.require) { + try { + const { ipcRenderer } = window.require('electron'); + await ipcRenderer.invoke('update-sizes'); + } catch (error) { + console.error('Failed to update sizes in main process:', error); + } + } + + this.requestUpdate(); + } +} + +customElements.define('cheating-daddy-app', CheatingDaddyApp); diff --git a/src/components/index.js b/src/components/index.js new file mode 100644 index 0000000..33c93fc --- /dev/null +++ b/src/components/index.js @@ -0,0 +1,12 @@ +// Main app components +export { CheatingDaddyApp } from './app/CheatingDaddyApp.js'; +export { AppHeader } from './app/AppHeader.js'; + +// View components +export { MainView } from './views/MainView.js'; +export { CustomizeView } from './views/CustomizeView.js'; +export { HelpView } from './views/HelpView.js'; +export { HistoryView } from './views/HistoryView.js'; +export { AssistantView } from './views/AssistantView.js'; +export { OnboardingView } from './views/OnboardingView.js'; +export { AdvancedView } from './views/AdvancedView.js'; diff --git a/src/components/views/AssistantView.js b/src/components/views/AssistantView.js new file mode 100644 index 0000000..fa1e35a --- /dev/null +++ b/src/components/views/AssistantView.js @@ -0,0 +1,636 @@ +import { html, css, LitElement } from '../../assets/lit-core-2.7.4.min.js'; + +export class AssistantView extends LitElement { + static styles = css` + :host { + height: 100%; + display: flex; + flex-direction: column; + } + + * { + font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; + cursor: default; + } + + .response-container { + height: calc(100% - 50px); + overflow-y: auto; + font-size: var(--response-font-size, 16px); + line-height: 1.6; + background: var(--bg-primary); + padding: 12px; + scroll-behavior: smooth; + user-select: text; + cursor: text; + } + + .response-container * { + user-select: text; + cursor: text; + } + + .response-container a { + cursor: pointer; + } + + /* Word display (no animation) */ + .response-container [data-word] { + display: inline-block; + } + + /* Markdown styling */ + .response-container h1, + .response-container h2, + .response-container h3, + .response-container h4, + .response-container h5, + .response-container h6 { + margin: 1em 0 0.5em 0; + color: var(--text-color); + font-weight: 600; + } + + .response-container h1 { font-size: 1.6em; } + .response-container h2 { font-size: 1.4em; } + .response-container h3 { font-size: 1.2em; } + .response-container h4 { font-size: 1.1em; } + .response-container h5 { font-size: 1em; } + .response-container h6 { font-size: 0.9em; } + + .response-container p { + margin: 0.6em 0; + color: var(--text-color); + } + + .response-container ul, + .response-container ol { + margin: 0.6em 0; + padding-left: 1.5em; + color: var(--text-color); + } + + .response-container li { + margin: 0.3em 0; + } + + .response-container blockquote { + margin: 0.8em 0; + padding: 0.5em 1em; + border-left: 2px solid var(--border-default); + background: var(--bg-secondary); + } + + .response-container code { + background: var(--bg-tertiary); + padding: 0.15em 0.4em; + border-radius: 3px; + font-family: 'SF Mono', Monaco, monospace; + font-size: 0.85em; + } + + .response-container pre { + background: var(--bg-secondary); + border: 1px solid var(--border-color); + border-radius: 3px; + padding: 12px; + overflow-x: auto; + margin: 0.8em 0; + } + + .response-container pre code { + background: none; + padding: 0; + } + + .response-container a { + color: var(--text-color); + text-decoration: underline; + text-underline-offset: 2px; + } + + .response-container strong, + .response-container b { + font-weight: 600; + } + + .response-container hr { + border: none; + border-top: 1px solid var(--border-color); + margin: 1.5em 0; + } + + .response-container table { + border-collapse: collapse; + width: 100%; + margin: 0.8em 0; + } + + .response-container th, + .response-container td { + border: 1px solid var(--border-color); + padding: 8px; + text-align: left; + } + + .response-container th { + background: var(--bg-secondary); + font-weight: 600; + } + + .response-container::-webkit-scrollbar { + width: 8px; + } + + .response-container::-webkit-scrollbar-track { + background: transparent; + } + + .response-container::-webkit-scrollbar-thumb { + background: var(--scrollbar-thumb); + border-radius: 4px; + } + + .response-container::-webkit-scrollbar-thumb:hover { + background: var(--scrollbar-thumb-hover); + } + + .text-input-container { + display: flex; + gap: 8px; + margin-top: 8px; + align-items: center; + } + + .text-input-container input { + flex: 1; + background: transparent; + color: var(--text-color); + border: none; + border-bottom: 1px solid var(--border-color); + padding: 8px 4px; + border-radius: 0; + font-size: 13px; + } + + .text-input-container input:focus { + outline: none; + border-bottom-color: var(--text-color); + } + + .text-input-container input::placeholder { + color: var(--placeholder-color); + } + + .nav-button { + background: transparent; + color: var(--text-secondary); + border: none; + padding: 6px; + border-radius: 3px; + font-size: 12px; + display: flex; + align-items: center; + justify-content: center; + transition: all 0.1s ease; + } + + .nav-button:hover { + background: var(--hover-background); + color: var(--text-color); + } + + .nav-button:disabled { + opacity: 0.3; + } + + .nav-button svg { + width: 18px; + height: 18px; + stroke: currentColor; + } + + .response-counter { + font-size: 11px; + color: var(--text-muted); + white-space: nowrap; + min-width: 50px; + text-align: center; + font-family: 'SF Mono', Monaco, monospace; + } + + .screen-answer-btn { + display: flex; + align-items: center; + gap: 6px; + background: var(--btn-primary-bg, #ffffff); + color: var(--btn-primary-text, #000000); + border: none; + padding: 6px 12px; + border-radius: 20px; + font-size: 12px; + font-weight: 500; + cursor: pointer; + transition: all 0.15s ease; + white-space: nowrap; + } + + .screen-answer-btn:hover { + background: var(--btn-primary-hover, #f0f0f0); + } + + .screen-answer-btn svg { + width: 16px; + height: 16px; + flex-shrink: 0; + } + + .screen-answer-btn .usage-count { + font-size: 11px; + opacity: 0.7; + font-family: 'SF Mono', Monaco, monospace; + } + + .screen-answer-btn-wrapper { + position: relative; + } + + .screen-answer-btn-wrapper .tooltip { + position: absolute; + bottom: 100%; + right: 0; + margin-bottom: 8px; + background: var(--tooltip-bg, #1a1a1a); + color: var(--tooltip-text, #ffffff); + padding: 8px 12px; + border-radius: 6px; + font-size: 11px; + white-space: nowrap; + opacity: 0; + visibility: hidden; + transition: opacity 0.15s ease, visibility 0.15s ease; + pointer-events: none; + box-shadow: 0 4px 12px rgba(0,0,0,0.3); + z-index: 100; + } + + .screen-answer-btn-wrapper .tooltip::after { + content: ''; + position: absolute; + top: 100%; + right: 16px; + border: 6px solid transparent; + border-top-color: var(--tooltip-bg, #1a1a1a); + } + + .screen-answer-btn-wrapper:hover .tooltip { + opacity: 1; + visibility: visible; + } + + .tooltip-row { + display: flex; + justify-content: space-between; + gap: 16px; + margin-bottom: 4px; + } + + .tooltip-row:last-child { + margin-bottom: 0; + } + + .tooltip-label { + opacity: 0.7; + } + + .tooltip-value { + font-family: 'SF Mono', Monaco, monospace; + } + + .tooltip-note { + margin-top: 6px; + padding-top: 6px; + border-top: 1px solid rgba(255,255,255,0.1); + opacity: 0.5; + font-size: 10px; + } + `; + + static properties = { + responses: { type: Array }, + currentResponseIndex: { type: Number }, + selectedProfile: { type: String }, + onSendText: { type: Function }, + shouldAnimateResponse: { type: Boolean }, + flashCount: { type: Number }, + flashLiteCount: { type: Number }, + }; + + constructor() { + super(); + this.responses = []; + this.currentResponseIndex = -1; + this.selectedProfile = 'interview'; + this.onSendText = () => {}; + this.flashCount = 0; + this.flashLiteCount = 0; + } + + getProfileNames() { + return { + interview: 'Job Interview', + sales: 'Sales Call', + meeting: 'Business Meeting', + presentation: 'Presentation', + negotiation: 'Negotiation', + exam: 'Exam Assistant', + }; + } + + getCurrentResponse() { + const profileNames = this.getProfileNames(); + return this.responses.length > 0 && this.currentResponseIndex >= 0 + ? this.responses[this.currentResponseIndex] + : `Hey, Im listening to your ${profileNames[this.selectedProfile] || 'session'}?`; + } + + renderMarkdown(content) { + // Check if marked is available + if (typeof window !== 'undefined' && window.marked) { + try { + // Configure marked for better security and formatting + window.marked.setOptions({ + breaks: true, + gfm: true, + sanitize: false, // We trust the AI responses + }); + let rendered = window.marked.parse(content); + rendered = this.wrapWordsInSpans(rendered); + return rendered; + } catch (error) { + console.warn('Error parsing markdown:', error); + return content; // Fallback to plain text + } + } + console.log('Marked not available, using plain text'); + return content; // Fallback if marked is not available + } + + wrapWordsInSpans(html) { + const parser = new DOMParser(); + const doc = parser.parseFromString(html, 'text/html'); + const tagsToSkip = ['PRE']; + + function wrap(node) { + if (node.nodeType === Node.TEXT_NODE && node.textContent.trim() && !tagsToSkip.includes(node.parentNode.tagName)) { + const words = node.textContent.split(/(\s+)/); + const frag = document.createDocumentFragment(); + words.forEach(word => { + if (word.trim()) { + const span = document.createElement('span'); + span.setAttribute('data-word', ''); + span.textContent = word; + frag.appendChild(span); + } else { + frag.appendChild(document.createTextNode(word)); + } + }); + node.parentNode.replaceChild(frag, node); + } else if (node.nodeType === Node.ELEMENT_NODE && !tagsToSkip.includes(node.tagName)) { + Array.from(node.childNodes).forEach(wrap); + } + } + Array.from(doc.body.childNodes).forEach(wrap); + return doc.body.innerHTML; + } + + getResponseCounter() { + return this.responses.length > 0 ? `${this.currentResponseIndex + 1}/${this.responses.length}` : ''; + } + + navigateToPreviousResponse() { + if (this.currentResponseIndex > 0) { + this.currentResponseIndex--; + this.dispatchEvent( + new CustomEvent('response-index-changed', { + detail: { index: this.currentResponseIndex }, + }) + ); + this.requestUpdate(); + } + } + + navigateToNextResponse() { + if (this.currentResponseIndex < this.responses.length - 1) { + this.currentResponseIndex++; + this.dispatchEvent( + new CustomEvent('response-index-changed', { + detail: { index: this.currentResponseIndex }, + }) + ); + this.requestUpdate(); + } + } + + scrollResponseUp() { + const container = this.shadowRoot.querySelector('.response-container'); + if (container) { + const scrollAmount = container.clientHeight * 0.3; // Scroll 30% of container height + container.scrollTop = Math.max(0, container.scrollTop - scrollAmount); + } + } + + scrollResponseDown() { + const container = this.shadowRoot.querySelector('.response-container'); + if (container) { + const scrollAmount = container.clientHeight * 0.3; // Scroll 30% of container height + container.scrollTop = Math.min(container.scrollHeight - container.clientHeight, container.scrollTop + scrollAmount); + } + } + + connectedCallback() { + super.connectedCallback(); + + // Load limits on mount + this.loadLimits(); + + // Set up IPC listeners for keyboard shortcuts + if (window.require) { + const { ipcRenderer } = window.require('electron'); + + this.handlePreviousResponse = () => { + console.log('Received navigate-previous-response message'); + this.navigateToPreviousResponse(); + }; + + this.handleNextResponse = () => { + console.log('Received navigate-next-response message'); + this.navigateToNextResponse(); + }; + + this.handleScrollUp = () => { + console.log('Received scroll-response-up message'); + this.scrollResponseUp(); + }; + + this.handleScrollDown = () => { + console.log('Received scroll-response-down message'); + this.scrollResponseDown(); + }; + + ipcRenderer.on('navigate-previous-response', this.handlePreviousResponse); + ipcRenderer.on('navigate-next-response', this.handleNextResponse); + ipcRenderer.on('scroll-response-up', this.handleScrollUp); + ipcRenderer.on('scroll-response-down', this.handleScrollDown); + } + } + + disconnectedCallback() { + super.disconnectedCallback(); + + // Clean up IPC listeners + if (window.require) { + const { ipcRenderer } = window.require('electron'); + if (this.handlePreviousResponse) { + ipcRenderer.removeListener('navigate-previous-response', this.handlePreviousResponse); + } + if (this.handleNextResponse) { + ipcRenderer.removeListener('navigate-next-response', this.handleNextResponse); + } + if (this.handleScrollUp) { + ipcRenderer.removeListener('scroll-response-up', this.handleScrollUp); + } + if (this.handleScrollDown) { + ipcRenderer.removeListener('scroll-response-down', this.handleScrollDown); + } + } + } + + async handleSendText() { + const textInput = this.shadowRoot.querySelector('#textInput'); + if (textInput && textInput.value.trim()) { + const message = textInput.value.trim(); + textInput.value = ''; // Clear input + await this.onSendText(message); + } + } + + handleTextKeydown(e) { + if (e.key === 'Enter' && !e.shiftKey) { + e.preventDefault(); + this.handleSendText(); + } + } + + async loadLimits() { + if (window.cheatingDaddy?.storage?.getTodayLimits) { + const limits = await window.cheatingDaddy.storage.getTodayLimits(); + this.flashCount = limits.flash?.count || 0; + this.flashLiteCount = limits.flashLite?.count || 0; + } + } + + getTotalUsed() { + return this.flashCount + this.flashLiteCount; + } + + getTotalAvailable() { + return 40; // 20 flash + 20 flash-lite + } + + async handleScreenAnswer() { + if (window.captureManualScreenshot) { + window.captureManualScreenshot(); + // Reload limits after a short delay to catch the update + setTimeout(() => this.loadLimits(), 1000); + } + } + + scrollToBottom() { + setTimeout(() => { + const container = this.shadowRoot.querySelector('.response-container'); + if (container) { + container.scrollTop = container.scrollHeight; + } + }, 0); + } + + firstUpdated() { + super.firstUpdated(); + this.updateResponseContent(); + } + + updated(changedProperties) { + super.updated(changedProperties); + if (changedProperties.has('responses') || changedProperties.has('currentResponseIndex')) { + this.updateResponseContent(); + } + } + + updateResponseContent() { + console.log('updateResponseContent called'); + const container = this.shadowRoot.querySelector('#responseContainer'); + if (container) { + const currentResponse = this.getCurrentResponse(); + console.log('Current response:', currentResponse); + const renderedResponse = this.renderMarkdown(currentResponse); + console.log('Rendered response:', renderedResponse); + container.innerHTML = renderedResponse; + // Show all words immediately (no animation) + if (this.shouldAnimateResponse) { + this.dispatchEvent(new CustomEvent('response-animation-complete', { bubbles: true, composed: true })); + } + } else { + console.log('Response container not found'); + } + } + + render() { + const responseCounter = this.getResponseCounter(); + + return html` +
    + +
    + + + ${this.responses.length > 0 ? html`${responseCounter}` : ''} + + + + + +
    +
    +
    + Flash + ${this.flashCount}/20 +
    +
    + Flash Lite + ${this.flashLiteCount}/20 +
    +
    Resets every 24 hours
    +
    + +
    +
    + `; + } +} + +customElements.define('assistant-view', AssistantView); diff --git a/src/components/views/CustomizeView.js b/src/components/views/CustomizeView.js new file mode 100644 index 0000000..4264acd --- /dev/null +++ b/src/components/views/CustomizeView.js @@ -0,0 +1,1701 @@ +import { html, css, LitElement } from '../../assets/lit-core-2.7.4.min.js'; +import { resizeLayout } from '../../utils/windowResize.js'; + +export class CustomizeView extends LitElement { + static styles = css` + * { + font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; + cursor: default; + user-select: none; + } + + :host { + display: block; + height: 100%; + } + + .settings-layout { + display: flex; + height: 100%; + } + + /* Sidebar */ + .settings-sidebar { + width: 160px; + min-width: 160px; + border-right: 1px solid var(--border-color); + padding: 8px 0; + display: flex; + flex-direction: column; + gap: 2px; + } + + .sidebar-item { + display: flex; + align-items: center; + gap: 10px; + padding: 8px 12px; + margin: 0 8px; + border-radius: 3px; + font-size: 12px; + color: var(--text-secondary); + cursor: pointer; + transition: all 0.1s ease; + border: none; + background: transparent; + text-align: left; + width: calc(100% - 16px); + } + + .sidebar-item:hover { + background: var(--hover-background); + color: var(--text-color); + } + + .sidebar-item.active { + background: var(--bg-tertiary); + color: var(--text-color); + } + + .sidebar-item svg { + width: 16px; + height: 16px; + flex-shrink: 0; + } + + .sidebar-item.danger { + color: var(--error-color); + } + + .sidebar-item.danger:hover, + .sidebar-item.danger.active { + color: var(--error-color); + } + + /* Main content */ + .settings-content { + flex: 1; + padding: 16px 0; + overflow-y: auto; + display: flex; + flex-direction: column; + } + + .settings-content > * { + flex-shrink: 0; + } + + .settings-content > .profile-section { + flex: 1; + min-height: 0; + } + + .settings-content::-webkit-scrollbar { + width: 8px; + } + + .settings-content::-webkit-scrollbar-track { + background: transparent; + } + + .settings-content::-webkit-scrollbar-thumb { + background: var(--scrollbar-thumb); + border-radius: 4px; + } + + .settings-content::-webkit-scrollbar-thumb:hover { + background: var(--scrollbar-thumb-hover); + } + + .content-header { + font-size: 16px; + font-weight: 600; + color: var(--text-color); + margin-bottom: 16px; + padding: 0 16px 12px 16px; + border-bottom: 1px solid var(--border-color); + } + + .settings-section { + padding: 12px 16px; + } + + .section-title { + font-size: 11px; + font-weight: 600; + color: var(--text-muted); + text-transform: uppercase; + letter-spacing: 0.5px; + margin-bottom: 12px; + } + + .form-grid { + display: grid; + gap: 12px; + padding: 0 16px; + } + + .form-row { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 12px; + align-items: start; + } + + @media (max-width: 600px) { + .form-row { + grid-template-columns: 1fr; + } + } + + .form-group { + display: flex; + flex-direction: column; + gap: 6px; + } + + .form-group.full-width { + grid-column: 1 / -1; + } + + .form-label { + font-weight: 500; + font-size: 12px; + color: var(--text-color); + display: flex; + align-items: center; + gap: 6px; + } + + .form-description { + font-size: 11px; + color: var(--text-muted); + line-height: 1.4; + margin-top: 2px; + } + + .form-control { + background: var(--input-background); + color: var(--text-color); + border: 1px solid var(--border-color); + padding: 8px 10px; + border-radius: 3px; + font-size: 12px; + transition: border-color 0.1s ease; + } + + .form-control:focus { + outline: none; + border-color: var(--border-default); + } + + .form-control:hover:not(:focus) { + border-color: var(--border-default); + } + + select.form-control { + cursor: pointer; + appearance: none; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b6b6b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); + background-position: right 8px center; + background-repeat: no-repeat; + background-size: 12px; + padding-right: 28px; + } + + textarea.form-control { + resize: vertical; + min-height: 60px; + line-height: 1.4; + font-family: inherit; + } + + /* Profile section with expanding textarea */ + .profile-section { + display: flex; + flex-direction: column; + height: 100%; + } + + .profile-section .form-grid { + flex: 1; + display: flex; + flex-direction: column; + } + + .profile-section .form-group.expand { + flex: 1; + display: flex; + flex-direction: column; + } + + .profile-section .form-group.expand textarea { + flex: 1; + resize: none; + } + + textarea.form-control::placeholder { + color: var(--placeholder-color); + } + + .current-selection { + display: inline-flex; + align-items: center; + font-size: 10px; + color: var(--text-secondary); + background: var(--bg-tertiary); + padding: 2px 6px; + border-radius: 3px; + font-weight: 500; + } + + .keybind-input { + cursor: pointer; + font-family: 'SF Mono', Monaco, monospace; + text-align: center; + letter-spacing: 0.5px; + font-weight: 500; + } + + .keybind-input:focus { + cursor: text; + } + + .keybind-input::placeholder { + color: var(--placeholder-color); + font-style: italic; + } + + .reset-keybinds-button { + background: transparent; + color: var(--text-color); + border: 1px solid var(--border-color); + padding: 6px 10px; + border-radius: 3px; + font-size: 11px; + font-weight: 500; + cursor: pointer; + transition: background 0.1s ease; + } + + .reset-keybinds-button:hover { + background: var(--hover-background); + } + + .keybinds-table { + width: 100%; + border-collapse: collapse; + margin-top: 8px; + } + + .keybinds-table th, + .keybinds-table td { + padding: 8px 0; + text-align: left; + border-bottom: 1px solid var(--border-color); + } + + .keybinds-table th { + font-weight: 600; + font-size: 11px; + color: var(--text-muted); + text-transform: uppercase; + letter-spacing: 0.5px; + } + + .keybinds-table td { + vertical-align: middle; + } + + .keybinds-table .action-name { + font-weight: 500; + color: var(--text-color); + font-size: 12px; + } + + .keybinds-table .action-description { + font-size: 10px; + color: var(--text-muted); + margin-top: 1px; + } + + .keybinds-table .keybind-input { + min-width: 100px; + padding: 4px 8px; + margin: 0; + font-size: 11px; + } + + .keybinds-table tr:hover { + background: var(--hover-background); + } + + .keybinds-table tr:last-child td { + border-bottom: none; + } + + .table-reset-row { + border-top: 1px solid var(--border-color); + } + + .table-reset-row td { + padding-top: 10px; + padding-bottom: 8px; + border-bottom: none; + } + + .table-reset-row:hover { + background: transparent; + } + + .settings-note { + font-size: 11px; + color: var(--text-muted); + text-align: center; + margin-top: 16px; + padding: 12px; + border-top: 1px solid var(--border-color); + } + + .checkbox-group { + display: flex; + align-items: center; + gap: 8px; + padding: 8px 0; + } + + .checkbox-input { + width: 14px; + height: 14px; + accent-color: var(--text-color); + cursor: pointer; + } + + .checkbox-label { + font-weight: 500; + font-size: 12px; + color: var(--text-color); + cursor: pointer; + user-select: none; + } + + /* Slider styles */ + .slider-container { + display: flex; + flex-direction: column; + gap: 8px; + } + + .slider-header { + display: flex; + justify-content: space-between; + align-items: center; + } + + .slider-value { + font-size: 11px; + color: var(--text-secondary); + background: var(--bg-tertiary); + padding: 2px 6px; + border-radius: 3px; + font-weight: 500; + font-family: 'SF Mono', Monaco, monospace; + } + + .slider-input { + -webkit-appearance: none; + appearance: none; + width: 100%; + height: 4px; + border-radius: 2px; + background: var(--border-color); + outline: none; + cursor: pointer; + } + + .slider-input::-webkit-slider-thumb { + -webkit-appearance: none; + appearance: none; + width: 14px; + height: 14px; + border-radius: 50%; + background: var(--text-color); + cursor: pointer; + border: none; + } + + .slider-input::-moz-range-thumb { + width: 14px; + height: 14px; + border-radius: 50%; + background: var(--text-color); + cursor: pointer; + border: none; + } + + .slider-labels { + display: flex; + justify-content: space-between; + margin-top: 4px; + font-size: 10px; + color: var(--text-muted); + } + + /* Color picker styles */ + .color-picker-container { + display: flex; + align-items: center; + gap: 10px; + } + + .color-picker-input { + -webkit-appearance: none; + appearance: none; + width: 40px; + height: 32px; + border: 1px solid var(--border-color); + border-radius: 3px; + cursor: pointer; + padding: 2px; + background: var(--input-background); + } + + .color-picker-input::-webkit-color-swatch-wrapper { + padding: 0; + } + + .color-picker-input::-webkit-color-swatch { + border: none; + border-radius: 2px; + } + + .color-hex-input { + width: 80px; + font-family: 'SF Mono', Monaco, monospace; + text-transform: uppercase; + } + + .reset-color-button { + background: transparent; + color: var(--text-secondary); + border: 1px solid var(--border-color); + padding: 6px 10px; + border-radius: 3px; + font-size: 11px; + font-weight: 500; + cursor: pointer; + transition: all 0.1s ease; + } + + .reset-color-button:hover { + background: var(--hover-background); + color: var(--text-color); + } + + /* Danger button and status */ + .danger-button { + background: transparent; + color: var(--error-color); + border: 1px solid var(--error-color); + padding: 8px 14px; + border-radius: 3px; + font-size: 11px; + font-weight: 500; + cursor: pointer; + transition: background 0.1s ease; + } + + .danger-button:hover { + background: rgba(241, 76, 76, 0.1); + } + + .danger-button:disabled { + opacity: 0.5; + cursor: not-allowed; + } + + .status-message { + margin-top: 12px; + padding: 8px 12px; + border-radius: 3px; + font-size: 11px; + font-weight: 500; + } + + .status-success { + background: var(--bg-secondary); + color: var(--success-color); + border-left: 2px solid var(--success-color); + } + + .status-error { + background: var(--bg-secondary); + color: var(--error-color); + border-left: 2px solid var(--error-color); + } + `; + + static properties = { + selectedProfile: { type: String }, + selectedLanguage: { type: String }, + selectedImageQuality: { type: String }, + layoutMode: { type: String }, + keybinds: { type: Object }, + googleSearchEnabled: { type: Boolean }, + backgroundTransparency: { type: Number }, + fontSize: { type: Number }, + theme: { type: String }, + onProfileChange: { type: Function }, + onLanguageChange: { type: Function }, + onImageQualityChange: { type: Function }, + onLayoutModeChange: { type: Function }, + activeSection: { type: String }, + isClearing: { type: Boolean }, + clearStatusMessage: { type: String }, + clearStatusType: { type: String }, + }; + + constructor() { + super(); + this.selectedProfile = 'interview'; + this.selectedLanguage = 'en-US'; + this.selectedImageQuality = 'medium'; + this.layoutMode = 'normal'; + this.keybinds = this.getDefaultKeybinds(); + this.onProfileChange = () => {}; + this.onLanguageChange = () => {}; + this.onImageQualityChange = () => {}; + this.onLayoutModeChange = () => {}; + + // Google Search default + this.googleSearchEnabled = true; + + // Clear data state + this.isClearing = false; + this.clearStatusMessage = ''; + this.clearStatusType = ''; + + // Background transparency default + this.backgroundTransparency = 0.8; + + // Font size default (in pixels) + this.fontSize = 20; + + // Audio mode default + this.audioMode = 'speaker_only'; + + // Custom prompt + this.customPrompt = ''; + + // Active section for sidebar navigation + this.activeSection = 'profile'; + + // Theme default + this.theme = 'dark'; + + // AI Provider settings + this.aiProvider = 'gemini'; + this.geminiApiKey = ''; + this.openaiApiKey = ''; + this.openaiBaseUrl = ''; + this.openaiModel = 'gpt-4o-realtime-preview-2024-12-17'; + // OpenAI SDK settings + this.openaiSdkApiKey = ''; + this.openaiSdkBaseUrl = ''; + this.openaiSdkModel = 'gpt-4o'; + this.openaiSdkVisionModel = 'gpt-4o'; + this.openaiSdkWhisperModel = 'whisper-1'; + + this._loadFromStorage(); + } + + getThemes() { + return cheatingDaddy.theme.getAll(); + } + + setActiveSection(section) { + this.activeSection = section; + this.requestUpdate(); + } + + getSidebarSections() { + return [ + { id: 'profile', name: 'Profile', icon: 'user' }, + { id: 'ai-provider', name: 'AI Provider', icon: 'cpu' }, + { id: 'appearance', name: 'Appearance', icon: 'display' }, + { id: 'audio', name: 'Audio', icon: 'mic' }, + { id: 'language', name: 'Language', icon: 'globe' }, + { id: 'capture', name: 'Capture', icon: 'camera' }, + { id: 'keyboard', name: 'Keyboard', icon: 'keyboard' }, + { id: 'search', name: 'Search', icon: 'search' }, + { id: 'advanced', name: 'Advanced', icon: 'warning', danger: true }, + ]; + } + + renderSidebarIcon(icon) { + const icons = { + user: html` + + + `, + mic: html` + + + + + `, + globe: html` + + + + `, + display: html` + + + + `, + camera: html` + + + `, + keyboard: html` + + + + + + + + + + `, + search: html` + + + `, + cpu: html` + + + + + + + + + + + `, + warning: html` + + + + `, + }; + return icons[icon] || ''; + } + + async _loadFromStorage() { + try { + const [prefs, keybinds, credentials, openaiCreds, openaiSdkCreds] = await Promise.all([ + cheatingDaddy.storage.getPreferences(), + cheatingDaddy.storage.getKeybinds(), + cheatingDaddy.storage.getCredentials(), + cheatingDaddy.storage.getOpenAICredentials(), + cheatingDaddy.storage.getOpenAISDKCredentials() + ]); + + this.googleSearchEnabled = prefs.googleSearchEnabled ?? true; + this.backgroundTransparency = prefs.backgroundTransparency ?? 0.8; + this.fontSize = prefs.fontSize ?? 20; + this.audioMode = prefs.audioMode ?? 'speaker_only'; + this.customPrompt = prefs.customPrompt ?? ''; + this.theme = prefs.theme ?? 'dark'; + this.aiProvider = prefs.aiProvider ?? 'gemini'; + + // Load Gemini API key + this.geminiApiKey = credentials.apiKey ?? ''; + + // Load OpenAI Realtime credentials + this.openaiApiKey = openaiCreds.apiKey ?? ''; + this.openaiBaseUrl = openaiCreds.baseUrl ?? ''; + this.openaiModel = openaiCreds.model ?? 'gpt-4o-realtime-preview-2024-12-17'; + + // Load OpenAI SDK credentials + this.openaiSdkApiKey = openaiSdkCreds.apiKey ?? ''; + this.openaiSdkBaseUrl = openaiSdkCreds.baseUrl ?? ''; + this.openaiSdkModel = openaiSdkCreds.model ?? 'gpt-4o'; + this.openaiSdkVisionModel = openaiSdkCreds.visionModel ?? 'gpt-4o'; + this.openaiSdkWhisperModel = openaiSdkCreds.whisperModel ?? 'whisper-1'; + + if (keybinds) { + this.keybinds = { ...this.getDefaultKeybinds(), ...keybinds }; + } + + this.updateBackgroundTransparency(); + this.updateFontSize(); + this.requestUpdate(); + } catch (error) { + console.error('Error loading settings:', error); + } + } + + connectedCallback() { + super.connectedCallback(); + // Resize window for this view + resizeLayout(); + } + + getProfiles() { + return [ + { + value: 'interview', + name: 'Job Interview', + description: 'Get help with answering interview questions', + }, + { + value: 'sales', + name: 'Sales Call', + description: 'Assist with sales conversations and objection handling', + }, + { + value: 'meeting', + name: 'Business Meeting', + description: 'Support for professional meetings and discussions', + }, + { + value: 'presentation', + name: 'Presentation', + description: 'Help with presentations and public speaking', + }, + { + value: 'negotiation', + name: 'Negotiation', + description: 'Guidance for business negotiations and deals', + }, + { + value: 'exam', + name: 'Exam Assistant', + description: 'Academic assistance for test-taking and exam questions', + }, + ]; + } + + getLanguages() { + return [ + { value: 'en-US', name: 'English (US)' }, + { value: 'en-GB', name: 'English (UK)' }, + { value: 'en-AU', name: 'English (Australia)' }, + { value: 'en-IN', name: 'English (India)' }, + { value: 'de-DE', name: 'German (Germany)' }, + { value: 'es-US', name: 'Spanish (United States)' }, + { value: 'es-ES', name: 'Spanish (Spain)' }, + { value: 'fr-FR', name: 'French (France)' }, + { value: 'fr-CA', name: 'French (Canada)' }, + { value: 'hi-IN', name: 'Hindi (India)' }, + { value: 'pt-BR', name: 'Portuguese (Brazil)' }, + { value: 'ar-XA', name: 'Arabic (Generic)' }, + { value: 'id-ID', name: 'Indonesian (Indonesia)' }, + { value: 'it-IT', name: 'Italian (Italy)' }, + { value: 'ja-JP', name: 'Japanese (Japan)' }, + { value: 'tr-TR', name: 'Turkish (Turkey)' }, + { value: 'vi-VN', name: 'Vietnamese (Vietnam)' }, + { value: 'bn-IN', name: 'Bengali (India)' }, + { value: 'gu-IN', name: 'Gujarati (India)' }, + { value: 'kn-IN', name: 'Kannada (India)' }, + { value: 'ml-IN', name: 'Malayalam (India)' }, + { value: 'mr-IN', name: 'Marathi (India)' }, + { value: 'ta-IN', name: 'Tamil (India)' }, + { value: 'te-IN', name: 'Telugu (India)' }, + { value: 'nl-NL', name: 'Dutch (Netherlands)' }, + { value: 'ko-KR', name: 'Korean (South Korea)' }, + { value: 'cmn-CN', name: 'Mandarin Chinese (China)' }, + { value: 'pl-PL', name: 'Polish (Poland)' }, + { value: 'ru-RU', name: 'Russian (Russia)' }, + { value: 'th-TH', name: 'Thai (Thailand)' }, + ]; + } + + getProfileNames() { + return { + interview: 'Job Interview', + sales: 'Sales Call', + meeting: 'Business Meeting', + presentation: 'Presentation', + negotiation: 'Negotiation', + exam: 'Exam Assistant', + }; + } + + handleProfileSelect(e) { + this.selectedProfile = e.target.value; + this.onProfileChange(this.selectedProfile); + } + + handleLanguageSelect(e) { + this.selectedLanguage = e.target.value; + this.onLanguageChange(this.selectedLanguage); + } + + handleImageQualitySelect(e) { + this.selectedImageQuality = e.target.value; + this.onImageQualityChange(e.target.value); + } + + handleLayoutModeSelect(e) { + this.layoutMode = e.target.value; + this.onLayoutModeChange(e.target.value); + } + + async handleCustomPromptInput(e) { + this.customPrompt = e.target.value; + await cheatingDaddy.storage.updatePreference('customPrompt', e.target.value); + } + + async handleAudioModeSelect(e) { + this.audioMode = e.target.value; + await cheatingDaddy.storage.updatePreference('audioMode', e.target.value); + this.requestUpdate(); + } + + async handleThemeChange(e) { + this.theme = e.target.value; + await cheatingDaddy.theme.save(this.theme); + this.updateBackgroundAppearance(); + this.requestUpdate(); + } + + getDefaultKeybinds() { + const isMac = cheatingDaddy.isMacOS || navigator.platform.includes('Mac'); + return { + moveUp: isMac ? 'Alt+Up' : 'Ctrl+Up', + moveDown: isMac ? 'Alt+Down' : 'Ctrl+Down', + moveLeft: isMac ? 'Alt+Left' : 'Ctrl+Left', + moveRight: isMac ? 'Alt+Right' : 'Ctrl+Right', + toggleVisibility: isMac ? 'Cmd+\\' : 'Ctrl+\\', + toggleClickThrough: isMac ? 'Cmd+M' : 'Ctrl+M', + nextStep: isMac ? 'Cmd+Enter' : 'Ctrl+Enter', + previousResponse: isMac ? 'Cmd+[' : 'Ctrl+[', + nextResponse: isMac ? 'Cmd+]' : 'Ctrl+]', + scrollUp: isMac ? 'Cmd+Shift+Up' : 'Ctrl+Shift+Up', + scrollDown: isMac ? 'Cmd+Shift+Down' : 'Ctrl+Shift+Down', + }; + } + + async saveKeybinds() { + await cheatingDaddy.storage.setKeybinds(this.keybinds); + // Send to main process to update global shortcuts + if (window.require) { + const { ipcRenderer } = window.require('electron'); + ipcRenderer.send('update-keybinds', this.keybinds); + } + } + + handleKeybindChange(action, value) { + this.keybinds = { ...this.keybinds, [action]: value }; + this.saveKeybinds(); + this.requestUpdate(); + } + + async resetKeybinds() { + this.keybinds = this.getDefaultKeybinds(); + await cheatingDaddy.storage.setKeybinds(null); + this.requestUpdate(); + if (window.require) { + const { ipcRenderer } = window.require('electron'); + ipcRenderer.send('update-keybinds', this.keybinds); + } + } + + getKeybindActions() { + return [ + { + key: 'moveUp', + name: 'Move Window Up', + description: 'Move the application window up', + }, + { + key: 'moveDown', + name: 'Move Window Down', + description: 'Move the application window down', + }, + { + key: 'moveLeft', + name: 'Move Window Left', + description: 'Move the application window left', + }, + { + key: 'moveRight', + name: 'Move Window Right', + description: 'Move the application window right', + }, + { + key: 'toggleVisibility', + name: 'Toggle Window Visibility', + description: 'Show/hide the application window', + }, + { + key: 'toggleClickThrough', + name: 'Toggle Click-through Mode', + description: 'Enable/disable click-through functionality', + }, + { + key: 'nextStep', + name: 'Ask Next Step', + description: 'Take screenshot and ask AI for the next step suggestion', + }, + { + key: 'previousResponse', + name: 'Previous Response', + description: 'Navigate to the previous AI response', + }, + { + key: 'nextResponse', + name: 'Next Response', + description: 'Navigate to the next AI response', + }, + { + key: 'scrollUp', + name: 'Scroll Response Up', + description: 'Scroll the AI response content up', + }, + { + key: 'scrollDown', + name: 'Scroll Response Down', + description: 'Scroll the AI response content down', + }, + ]; + } + + handleKeybindFocus(e) { + e.target.placeholder = 'Press key combination...'; + e.target.select(); + } + + handleKeybindInput(e) { + e.preventDefault(); + + const modifiers = []; + const keys = []; + + // Check modifiers + if (e.ctrlKey) modifiers.push('Ctrl'); + if (e.metaKey) modifiers.push('Cmd'); + if (e.altKey) modifiers.push('Alt'); + if (e.shiftKey) modifiers.push('Shift'); + + // Get the main key + let mainKey = e.key; + + // Handle special keys + switch (e.code) { + case 'ArrowUp': + mainKey = 'Up'; + break; + case 'ArrowDown': + mainKey = 'Down'; + break; + case 'ArrowLeft': + mainKey = 'Left'; + break; + case 'ArrowRight': + mainKey = 'Right'; + break; + case 'Enter': + mainKey = 'Enter'; + break; + case 'Space': + mainKey = 'Space'; + break; + case 'Backslash': + mainKey = '\\'; + break; + case 'KeyS': + if (e.shiftKey) mainKey = 'S'; + break; + case 'KeyM': + mainKey = 'M'; + break; + default: + if (e.key.length === 1) { + mainKey = e.key.toUpperCase(); + } + break; + } + + // Skip if only modifier keys are pressed + if (['Control', 'Meta', 'Alt', 'Shift'].includes(e.key)) { + return; + } + + // Construct keybind string + const keybind = [...modifiers, mainKey].join('+'); + + // Get the action from the input's data attribute + const action = e.target.dataset.action; + + // Update the keybind + this.handleKeybindChange(action, keybind); + + // Update the input value + e.target.value = keybind; + e.target.blur(); + } + + async handleGoogleSearchChange(e) { + this.googleSearchEnabled = e.target.checked; + await cheatingDaddy.storage.updatePreference('googleSearchEnabled', this.googleSearchEnabled); + + // Notify main process if available + if (window.require) { + try { + const { ipcRenderer } = window.require('electron'); + await ipcRenderer.invoke('update-google-search-setting', this.googleSearchEnabled); + } catch (error) { + console.error('Failed to notify main process:', error); + } + } + + this.requestUpdate(); + } + + async handleAIProviderChange(e) { + this.aiProvider = e.target.value; + await cheatingDaddy.storage.updatePreference('aiProvider', e.target.value); + this.requestUpdate(); + } + + async handleGeminiApiKeyInput(e) { + this.geminiApiKey = e.target.value; + await cheatingDaddy.storage.setApiKey(e.target.value); + } + + async handleOpenAIApiKeyInput(e) { + this.openaiApiKey = e.target.value; + await cheatingDaddy.storage.setOpenAICredentials({ + apiKey: e.target.value + }); + } + + async handleOpenAIBaseUrlInput(e) { + this.openaiBaseUrl = e.target.value; + await cheatingDaddy.storage.setOpenAICredentials({ + baseUrl: e.target.value + }); + } + + async handleOpenAIModelInput(e) { + this.openaiModel = e.target.value; + await cheatingDaddy.storage.setOpenAICredentials({ + model: e.target.value + }); + } + + // OpenAI SDK handlers + async handleOpenAISdkApiKeyInput(e) { + this.openaiSdkApiKey = e.target.value; + await cheatingDaddy.storage.setOpenAISDKCredentials({ + apiKey: e.target.value + }); + } + + async handleOpenAISdkBaseUrlInput(e) { + this.openaiSdkBaseUrl = e.target.value; + await cheatingDaddy.storage.setOpenAISDKCredentials({ + baseUrl: e.target.value + }); + } + + async handleOpenAISdkModelInput(e) { + this.openaiSdkModel = e.target.value; + await cheatingDaddy.storage.setOpenAISDKCredentials({ + model: e.target.value + }); + } + + async handleOpenAISdkVisionModelInput(e) { + this.openaiSdkVisionModel = e.target.value; + await cheatingDaddy.storage.setOpenAISDKCredentials({ + visionModel: e.target.value + }); + } + + async handleOpenAISdkWhisperModelInput(e) { + this.openaiSdkWhisperModel = e.target.value; + await cheatingDaddy.storage.setOpenAISDKCredentials({ + whisperModel: e.target.value + }); + } + + async clearLocalData() { + if (this.isClearing) return; + + this.isClearing = true; + this.clearStatusMessage = ''; + this.clearStatusType = ''; + this.requestUpdate(); + + try { + await cheatingDaddy.storage.clearAll(); + + this.clearStatusMessage = 'Successfully cleared all local data'; + this.clearStatusType = 'success'; + this.requestUpdate(); + + // Close the application after a short delay + setTimeout(() => { + this.clearStatusMessage = 'Closing application...'; + this.requestUpdate(); + setTimeout(async () => { + if (window.require) { + const { ipcRenderer } = window.require('electron'); + await ipcRenderer.invoke('quit-application'); + } + }, 1000); + }, 2000); + } catch (error) { + console.error('Error clearing data:', error); + this.clearStatusMessage = `Error clearing data: ${error.message}`; + this.clearStatusType = 'error'; + } finally { + this.isClearing = false; + this.requestUpdate(); + } + } + + async handleBackgroundTransparencyChange(e) { + this.backgroundTransparency = parseFloat(e.target.value); + await cheatingDaddy.storage.updatePreference('backgroundTransparency', this.backgroundTransparency); + this.updateBackgroundAppearance(); + this.requestUpdate(); + } + + updateBackgroundAppearance() { + // Use theme's background color + const colors = cheatingDaddy.theme.get(this.theme); + cheatingDaddy.theme.applyBackgrounds(colors.background, this.backgroundTransparency); + } + + // Keep old function name for backwards compatibility + updateBackgroundTransparency() { + this.updateBackgroundAppearance(); + } + + async handleFontSizeChange(e) { + this.fontSize = parseInt(e.target.value, 10); + await cheatingDaddy.storage.updatePreference('fontSize', this.fontSize); + this.updateFontSize(); + this.requestUpdate(); + } + + updateFontSize() { + const root = document.documentElement; + root.style.setProperty('--response-font-size', `${this.fontSize}px`); + } + + renderProfileSection() { + const profiles = this.getProfiles(); + const profileNames = this.getProfileNames(); + const currentProfile = profiles.find(p => p.value === this.selectedProfile); + + return html` +
    +
    AI Profile
    +
    +
    + + +
    + +
    + + +
    + Personalize the AI's behavior with specific instructions +
    +
    +
    +
    + `; + } + + renderAudioSection() { + return html` +
    Audio Settings
    +
    +
    + + +
    + Choose which audio sources to capture for the AI. +
    +
    +
    + `; + } + + renderLanguageSection() { + const languages = this.getLanguages(); + const currentLanguage = languages.find(l => l.value === this.selectedLanguage); + + return html` +
    Language
    +
    +
    + + +
    Language for speech recognition and AI responses
    +
    +
    + `; + } + + renderAppearanceSection() { + const themes = this.getThemes(); + const currentTheme = themes.find(t => t.value === this.theme); + + return html` +
    Appearance
    +
    +
    + + +
    + Choose a color theme for the interface +
    +
    + +
    + + +
    + ${this.layoutMode === 'compact' + ? 'Smaller window with reduced padding' + : 'Standard layout with comfortable spacing' + } +
    +
    + +
    +
    +
    + + ${Math.round(this.backgroundTransparency * 100)}% +
    + +
    + Transparent + Opaque +
    +
    +
    + +
    +
    +
    + + ${this.fontSize}px +
    + +
    + 12px + 32px +
    +
    +
    +
    + `; + } + + renderCaptureSection() { + return html` +
    Screen Capture
    +
    +
    + + +
    + ${this.selectedImageQuality === 'high' + ? 'Best quality, uses more tokens' + : this.selectedImageQuality === 'medium' + ? 'Balanced quality and token usage' + : 'Lower quality, uses fewer tokens' + } +
    +
    +
    + `; + } + + renderKeyboardSection() { + return html` +
    Keyboard Shortcuts
    +
    + + + + + + + + + ${this.getKeybindActions().map( + action => html` + + + + + ` + )} + + + + +
    ActionShortcut
    +
    ${action.name}
    +
    ${action.description}
    +
    + +
    + +
    +
    + `; + } + + renderAIProviderSection() { + const providerNames = { + 'gemini': 'Google Gemini', + 'openai-realtime': 'OpenAI Realtime', + 'openai-sdk': 'OpenAI SDK (BotHub, etc.)' + }; + + return html` +
    AI Provider
    +
    +
    + + +
    + Choose which AI provider to use for conversations and screen analysis +
    +
    + + ${this.aiProvider === 'gemini' ? html` +
    + + +
    + Get your API key from Google AI Studio +
    +
    + ` : this.aiProvider === 'openai-realtime' ? html` +
    + + +
    + Get your API key from OpenAI Platform +
    +
    + +
    + + +
    + Override the base URL for OpenAI-compatible APIs +
    +
    + +
    + + +
    + Realtime API model to use +
    +
    + ` : html` +
    + + +
    + API key for your provider (BotHub, Azure, OpenRouter, etc.) +
    +
    + +
    + + +
    + API endpoint URL (e.g., https://bothub.chat/api/v2/openai/v1) +
    +
    + +
    +
    + + +
    +
    + + +
    +
    + +
    + + +
    + Model for audio transcription +
    +
    + `} + +
    + Note: You must restart the AI session for provider changes to take effect. +
    +
    + `; + } + + renderSearchSection() { + return html` +
    Search
    +
    +
    + + +
    +
    + Allow the AI to search Google for up-to-date information during conversations. +
    Note: Changes take effect when starting a new AI session. +
    +
    + `; + } + + renderAdvancedSection() { + return html` +
    Advanced
    +
    +
    + +
    + Warning: This action will permanently delete all local data including API keys, preferences, and session history. This cannot be undone. +
    + + ${this.clearStatusMessage ? html` +
    + ${this.clearStatusMessage} +
    + ` : ''} +
    +
    + `; + } + + renderSectionContent() { + switch (this.activeSection) { + case 'profile': + return this.renderProfileSection(); + case 'ai-provider': + return this.renderAIProviderSection(); + case 'appearance': + return this.renderAppearanceSection(); + case 'audio': + return this.renderAudioSection(); + case 'language': + return this.renderLanguageSection(); + case 'capture': + return this.renderCaptureSection(); + case 'keyboard': + return this.renderKeyboardSection(); + case 'search': + return this.renderSearchSection(); + case 'advanced': + return this.renderAdvancedSection(); + default: + return this.renderProfileSection(); + } + } + + render() { + const sections = this.getSidebarSections(); + + return html` +
    + +
    + ${this.renderSectionContent()} +
    +
    + `; + } +} + +customElements.define('customize-view', CustomizeView); diff --git a/src/components/views/HelpView.js b/src/components/views/HelpView.js new file mode 100644 index 0000000..7f6f44b --- /dev/null +++ b/src/components/views/HelpView.js @@ -0,0 +1,450 @@ +import { html, css, LitElement } from '../../assets/lit-core-2.7.4.min.js'; +import { resizeLayout } from '../../utils/windowResize.js'; + +export class HelpView extends LitElement { + static styles = css` + * { + font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; + cursor: default; + user-select: none; + } + + :host { + display: block; + padding: 0; + } + + .help-container { + display: flex; + flex-direction: column; + } + + .option-group { + padding: 16px 12px; + border-bottom: 1px solid var(--border-color); + } + + .option-group:last-child { + border-bottom: none; + } + + .option-label { + font-size: 11px; + font-weight: 600; + color: var(--text-muted); + text-transform: uppercase; + letter-spacing: 0.5px; + margin-bottom: 12px; + } + + .description { + color: var(--text-secondary); + font-size: 12px; + line-height: 1.4; + user-select: text; + cursor: text; + } + + .description strong { + color: var(--text-color); + font-weight: 500; + } + + .link { + color: var(--text-color); + text-decoration: underline; + text-underline-offset: 2px; + cursor: pointer; + } + + .key { + background: var(--bg-tertiary); + color: var(--text-color); + border: 1px solid var(--border-color); + padding: 2px 6px; + border-radius: 3px; + font-size: 10px; + font-family: 'SF Mono', Monaco, monospace; + font-weight: 500; + margin: 0 1px; + white-space: nowrap; + } + + .keyboard-section { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); + gap: 12px; + margin-top: 8px; + } + + .keyboard-group { + padding: 10px 0; + border-bottom: 1px solid var(--border-color); + } + + .keyboard-group:last-child { + border-bottom: none; + } + + .keyboard-group-title { + font-weight: 600; + font-size: 12px; + color: var(--text-color); + margin-bottom: 8px; + } + + .shortcut-item { + display: flex; + justify-content: space-between; + align-items: center; + padding: 4px 0; + font-size: 11px; + } + + .shortcut-description { + color: var(--text-secondary); + } + + .shortcut-keys { + display: flex; + gap: 2px; + } + + .profiles-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); + gap: 8px; + margin-top: 8px; + } + + .profile-item { + padding: 8px 0; + border-bottom: 1px solid var(--border-color); + } + + .profile-item:last-child { + border-bottom: none; + } + + .profile-name { + font-weight: 500; + font-size: 12px; + color: var(--text-color); + margin-bottom: 2px; + } + + .profile-description { + font-size: 11px; + color: var(--text-muted); + line-height: 1.3; + } + + .community-links { + display: flex; + gap: 8px; + flex-wrap: wrap; + } + + .community-link { + display: flex; + align-items: center; + gap: 6px; + padding: 6px 10px; + background: transparent; + border: 1px solid var(--border-color); + border-radius: 3px; + color: var(--text-color); + font-size: 11px; + font-weight: 500; + transition: background 0.1s ease; + cursor: pointer; + } + + .community-link:hover { + background: var(--hover-background); + } + + .community-link svg { + width: 14px; + height: 14px; + flex-shrink: 0; + } + + .usage-steps { + counter-reset: step-counter; + } + + .usage-step { + counter-increment: step-counter; + position: relative; + padding-left: 24px; + margin-bottom: 8px; + font-size: 11px; + line-height: 1.4; + color: var(--text-secondary); + } + + .usage-step::before { + content: counter(step-counter); + position: absolute; + left: 0; + top: 0; + width: 16px; + height: 16px; + background: var(--bg-tertiary); + color: var(--text-color); + border-radius: 3px; + display: flex; + align-items: center; + justify-content: center; + font-size: 10px; + font-weight: 600; + } + + .usage-step strong { + color: var(--text-color); + } + `; + + static properties = { + onExternalLinkClick: { type: Function }, + keybinds: { type: Object }, + }; + + constructor() { + super(); + this.onExternalLinkClick = () => {}; + this.keybinds = this.getDefaultKeybinds(); + this._loadKeybinds(); + } + + async _loadKeybinds() { + try { + const keybinds = await cheatingDaddy.storage.getKeybinds(); + if (keybinds) { + this.keybinds = { ...this.getDefaultKeybinds(), ...keybinds }; + this.requestUpdate(); + } + } catch (error) { + console.error('Error loading keybinds:', error); + } + } + + connectedCallback() { + super.connectedCallback(); + // Resize window for this view + resizeLayout(); + } + + getDefaultKeybinds() { + const isMac = cheatingDaddy.isMacOS || navigator.platform.includes('Mac'); + return { + moveUp: isMac ? 'Alt+Up' : 'Ctrl+Up', + moveDown: isMac ? 'Alt+Down' : 'Ctrl+Down', + moveLeft: isMac ? 'Alt+Left' : 'Ctrl+Left', + moveRight: isMac ? 'Alt+Right' : 'Ctrl+Right', + toggleVisibility: isMac ? 'Cmd+\\' : 'Ctrl+\\', + toggleClickThrough: isMac ? 'Cmd+M' : 'Ctrl+M', + nextStep: isMac ? 'Cmd+Enter' : 'Ctrl+Enter', + previousResponse: isMac ? 'Cmd+[' : 'Ctrl+[', + nextResponse: isMac ? 'Cmd+]' : 'Ctrl+]', + scrollUp: isMac ? 'Cmd+Shift+Up' : 'Ctrl+Shift+Up', + scrollDown: isMac ? 'Cmd+Shift+Down' : 'Ctrl+Shift+Down', + }; + } + + formatKeybind(keybind) { + return keybind.split('+').map(key => html`${key}`); + } + + handleExternalLinkClick(url) { + this.onExternalLinkClick(url); + } + + render() { + const isMacOS = cheatingDaddy.isMacOS || false; + const isLinux = cheatingDaddy.isLinux || false; + + return html` +
    +
    +
    + Community & Support +
    + +
    + +
    +
    + Keyboard Shortcuts +
    +
    +
    +
    Window Movement
    +
    + Move window up +
    ${this.formatKeybind(this.keybinds.moveUp)}
    +
    +
    + Move window down +
    ${this.formatKeybind(this.keybinds.moveDown)}
    +
    +
    + Move window left +
    ${this.formatKeybind(this.keybinds.moveLeft)}
    +
    +
    + Move window right +
    ${this.formatKeybind(this.keybinds.moveRight)}
    +
    +
    + +
    +
    Window Control
    +
    + Toggle click-through mode +
    ${this.formatKeybind(this.keybinds.toggleClickThrough)}
    +
    +
    + Toggle window visibility +
    ${this.formatKeybind(this.keybinds.toggleVisibility)}
    +
    +
    + +
    +
    AI Actions
    +
    + Take screenshot and ask for next step +
    ${this.formatKeybind(this.keybinds.nextStep)}
    +
    +
    + +
    +
    Response Navigation
    +
    + Previous response +
    ${this.formatKeybind(this.keybinds.previousResponse)}
    +
    +
    + Next response +
    ${this.formatKeybind(this.keybinds.nextResponse)}
    +
    +
    + Scroll response up +
    ${this.formatKeybind(this.keybinds.scrollUp)}
    +
    +
    + Scroll response down +
    ${this.formatKeybind(this.keybinds.scrollDown)}
    +
    +
    + +
    +
    Text Input
    +
    + Send message to AI +
    Enter
    +
    +
    + New line in text input +
    ShiftEnter
    +
    +
    +
    +
    + You can customize these shortcuts in Settings. +
    +
    + +
    +
    + How to Use +
    +
    +
    Start a Session: Enter your Gemini API key and click "Start Session"
    +
    Customize: Choose your profile and language in the settings
    +
    + Position Window: Use keyboard shortcuts to move the window to your desired location +
    +
    + Click-through Mode: Use ${this.formatKeybind(this.keybinds.toggleClickThrough)} to make the window + click-through +
    +
    Get AI Help: The AI will analyze your screen and audio to provide assistance
    +
    Text Messages: Type questions or requests to the AI using the text input
    +
    + Navigate Responses: Use ${this.formatKeybind(this.keybinds.previousResponse)} and + ${this.formatKeybind(this.keybinds.nextResponse)} to browse through AI responses +
    +
    +
    + +
    +
    + Supported Profiles +
    +
    +
    +
    Job Interview
    +
    Get help with interview questions and responses
    +
    +
    +
    Sales Call
    +
    Assistance with sales conversations and objection handling
    +
    +
    +
    Business Meeting
    +
    Support for professional meetings and discussions
    +
    +
    +
    Presentation
    +
    Help with presentations and public speaking
    +
    +
    +
    Negotiation
    +
    Guidance for business negotiations and deals
    +
    +
    +
    Exam Assistant
    +
    Academic assistance for test-taking and exam questions
    +
    +
    +
    + +
    +
    + Audio Input +
    +
    The AI listens to conversations and provides contextual assistance based on what it hears.
    +
    +
    + `; + } +} + +customElements.define('help-view', HelpView); diff --git a/src/components/views/HistoryView.js b/src/components/views/HistoryView.js new file mode 100644 index 0000000..382d70a --- /dev/null +++ b/src/components/views/HistoryView.js @@ -0,0 +1,649 @@ +import { html, css, LitElement } from '../../assets/lit-core-2.7.4.min.js'; +import { resizeLayout } from '../../utils/windowResize.js'; + +export class HistoryView extends LitElement { + static styles = css` + * { + font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; + cursor: default; + user-select: none; + } + + :host { + height: 100%; + display: flex; + flex-direction: column; + width: 100%; + } + + .history-container { + height: 100%; + display: flex; + flex-direction: column; + } + + .sessions-list { + flex: 1; + overflow-y: auto; + } + + .session-item { + padding: 12px; + border-bottom: 1px solid var(--border-color); + cursor: pointer; + transition: background 0.1s ease; + } + + .session-item:hover { + background: var(--hover-background); + } + + .session-item.selected { + background: var(--bg-secondary); + } + + .session-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 4px; + } + + .session-date { + font-size: 12px; + font-weight: 500; + color: var(--text-color); + } + + .session-time { + font-size: 11px; + color: var(--text-muted); + font-family: 'SF Mono', Monaco, monospace; + } + + .session-preview { + font-size: 11px; + color: var(--text-muted); + line-height: 1.3; + } + + .conversation-view { + flex: 1; + overflow-y: auto; + background: var(--bg-primary); + padding: 12px 0; + user-select: text; + cursor: text; + } + + .message { + margin-bottom: 8px; + padding: 8px 12px; + border-left: 2px solid transparent; + font-size: 12px; + line-height: 1.4; + background: var(--bg-secondary); + user-select: text; + cursor: text; + white-space: pre-wrap; + word-wrap: break-word; + } + + .message.user { + border-left-color: #3b82f6; + } + + .message.ai { + border-left-color: #ef4444; + } + + .back-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 12px; + padding: 12px 12px 12px 12px; + border-bottom: 1px solid var(--border-color); + } + + .back-button { + background: transparent; + color: var(--text-color); + border: 1px solid var(--border-color); + padding: 6px 12px; + border-radius: 3px; + font-size: 11px; + font-weight: 500; + cursor: pointer; + display: flex; + align-items: center; + gap: 6px; + transition: background 0.1s ease; + } + + .back-button:hover { + background: var(--hover-background); + } + + .legend { + display: flex; + gap: 12px; + align-items: center; + } + + .legend-item { + display: flex; + align-items: center; + gap: 4px; + font-size: 10px; + color: var(--text-muted); + } + + .legend-dot { + width: 8px; + height: 2px; + } + + .legend-dot.user { + background-color: #3b82f6; + } + + .legend-dot.ai { + background-color: #ef4444; + } + + .legend-dot.screen { + background-color: #22c55e; + } + + .session-context { + padding: 8px 12px; + margin-bottom: 8px; + background: var(--bg-tertiary); + border-radius: 4px; + font-size: 11px; + } + + .session-context-row { + display: flex; + gap: 8px; + margin-bottom: 4px; + } + + .session-context-row:last-child { + margin-bottom: 0; + } + + .context-label { + color: var(--text-muted); + min-width: 80px; + } + + .context-value { + color: var(--text-color); + font-weight: 500; + } + + .custom-prompt-value { + color: var(--text-secondary); + font-style: italic; + word-break: break-word; + white-space: pre-wrap; + } + + .view-tabs { + display: flex; + gap: 0; + border-bottom: 1px solid var(--border-color); + margin-bottom: 8px; + } + + .view-tab { + background: transparent; + color: var(--text-muted); + border: none; + padding: 8px 16px; + font-size: 11px; + font-weight: 500; + cursor: pointer; + border-bottom: 2px solid transparent; + margin-bottom: -1px; + transition: color 0.1s ease; + } + + .view-tab:hover { + color: var(--text-color); + } + + .view-tab.active { + color: var(--text-color); + border-bottom-color: var(--text-color); + } + + .message.screen { + border-left-color: #22c55e; + } + + .analysis-meta { + font-size: 10px; + color: var(--text-muted); + margin-bottom: 4px; + font-family: 'SF Mono', Monaco, monospace; + } + + .empty-state { + text-align: center; + color: var(--text-muted); + font-size: 12px; + margin-top: 32px; + } + + .empty-state-title { + font-size: 14px; + font-weight: 500; + margin-bottom: 6px; + color: var(--text-secondary); + } + + .loading { + text-align: center; + color: var(--text-muted); + font-size: 12px; + margin-top: 32px; + } + + .sessions-list::-webkit-scrollbar, + .conversation-view::-webkit-scrollbar { + width: 8px; + } + + .sessions-list::-webkit-scrollbar-track, + .conversation-view::-webkit-scrollbar-track { + background: transparent; + } + + .sessions-list::-webkit-scrollbar-thumb, + .conversation-view::-webkit-scrollbar-thumb { + background: var(--scrollbar-thumb); + border-radius: 4px; + } + + .sessions-list::-webkit-scrollbar-thumb:hover, + .conversation-view::-webkit-scrollbar-thumb:hover { + background: var(--scrollbar-thumb-hover); + } + + .tabs-container { + display: flex; + gap: 0; + margin-bottom: 16px; + border-bottom: 1px solid var(--border-color); + } + + .tab { + background: transparent; + color: var(--text-muted); + border: none; + padding: 8px 16px; + font-size: 12px; + font-weight: 500; + cursor: pointer; + transition: color 0.1s ease; + border-bottom: 2px solid transparent; + margin-bottom: -1px; + } + + .tab:hover { + color: var(--text-color); + } + + .tab.active { + color: var(--text-color); + border-bottom-color: var(--text-color); + } + + .saved-response-item { + padding: 12px 0; + border-bottom: 1px solid var(--border-color); + } + + .saved-response-header { + display: flex; + justify-content: space-between; + align-items: flex-start; + margin-bottom: 6px; + } + + .saved-response-profile { + font-size: 11px; + font-weight: 500; + color: var(--text-secondary); + text-transform: capitalize; + } + + .saved-response-date { + font-size: 10px; + color: var(--text-muted); + font-family: 'SF Mono', Monaco, monospace; + } + + .saved-response-content { + font-size: 12px; + color: var(--text-color); + line-height: 1.4; + user-select: text; + cursor: text; + } + + .delete-button { + background: transparent; + color: var(--text-muted); + border: none; + padding: 4px; + border-radius: 3px; + cursor: pointer; + transition: all 0.1s ease; + } + + .delete-button:hover { + background: rgba(241, 76, 76, 0.1); + color: var(--error-color); + } + `; + + static properties = { + sessions: { type: Array }, + selectedSession: { type: Object }, + loading: { type: Boolean }, + activeTab: { type: String }, + }; + + constructor() { + super(); + this.sessions = []; + this.selectedSession = null; + this.loading = true; + this.activeTab = 'conversation'; // 'conversation' or 'screen' + this.loadSessions(); + } + + connectedCallback() { + super.connectedCallback(); + // Resize window for this view + resizeLayout(); + } + + async loadSessions() { + try { + this.loading = true; + this.sessions = await cheatingDaddy.storage.getAllSessions(); + } catch (error) { + console.error('Error loading conversation sessions:', error); + this.sessions = []; + } finally { + this.loading = false; + this.requestUpdate(); + } + } + + async loadSelectedSession(sessionId) { + try { + const session = await cheatingDaddy.storage.getSession(sessionId); + if (session) { + this.selectedSession = session; + this.requestUpdate(); + } + } catch (error) { + console.error('Error loading session:', error); + } + } + + formatDate(timestamp) { + const date = new Date(timestamp); + return date.toLocaleDateString('en-US', { + month: 'short', + day: 'numeric', + year: 'numeric', + }); + } + + formatTime(timestamp) { + const date = new Date(timestamp); + return date.toLocaleTimeString('en-US', { + hour: '2-digit', + minute: '2-digit', + }); + } + + formatTimestamp(timestamp) { + const date = new Date(timestamp); + return date.toLocaleString('en-US', { + month: 'short', + day: 'numeric', + hour: '2-digit', + minute: '2-digit', + }); + } + + getSessionPreview(session) { + const parts = []; + if (session.messageCount > 0) { + parts.push(`${session.messageCount} messages`); + } + if (session.screenAnalysisCount > 0) { + parts.push(`${session.screenAnalysisCount} screen analysis`); + } + if (session.profile) { + const profileNames = this.getProfileNames(); + parts.push(profileNames[session.profile] || session.profile); + } + return parts.length > 0 ? parts.join(' • ') : 'Empty session'; + } + + handleSessionClick(session) { + this.loadSelectedSession(session.sessionId); + } + + handleBackClick() { + this.selectedSession = null; + this.activeTab = 'conversation'; + } + + handleTabClick(tab) { + this.activeTab = tab; + } + + getProfileNames() { + return { + interview: 'Job Interview', + sales: 'Sales Call', + meeting: 'Business Meeting', + presentation: 'Presentation', + negotiation: 'Negotiation', + exam: 'Exam Assistant', + }; + } + + renderSessionsList() { + if (this.loading) { + return html`
    Loading conversation history...
    `; + } + + if (this.sessions.length === 0) { + return html` +
    +
    No conversations yet
    +
    Start a session to see your conversation history here
    +
    + `; + } + + return html` +
    + ${this.sessions.map( + session => html` +
    this.handleSessionClick(session)}> +
    +
    ${this.formatDate(session.createdAt)}
    +
    ${this.formatTime(session.createdAt)}
    +
    +
    ${this.getSessionPreview(session)}
    +
    + ` + )} +
    + `; + } + + renderContextContent() { + const { profile, customPrompt } = this.selectedSession; + const profileNames = this.getProfileNames(); + + if (!profile && !customPrompt) { + return html`
    No profile context available
    `; + } + + return html` +
    + ${profile ? html` +
    + Profile: + ${profileNames[profile] || profile} +
    + ` : ''} + ${customPrompt ? html` +
    + Custom Prompt: + ${customPrompt} +
    + ` : ''} +
    + `; + } + + renderConversationContent() { + const { conversationHistory } = this.selectedSession; + + // Flatten the conversation turns into individual messages + const messages = []; + if (conversationHistory) { + conversationHistory.forEach(turn => { + if (turn.transcription) { + messages.push({ + type: 'user', + content: turn.transcription, + timestamp: turn.timestamp, + }); + } + if (turn.ai_response) { + messages.push({ + type: 'ai', + content: turn.ai_response, + timestamp: turn.timestamp, + }); + } + }); + } + + if (messages.length === 0) { + return html`
    No conversation data available
    `; + } + + return messages.map(message => html`
    ${message.content}
    `); + } + + renderScreenAnalysisContent() { + const { screenAnalysisHistory } = this.selectedSession; + + if (!screenAnalysisHistory || screenAnalysisHistory.length === 0) { + return html`
    No screen analysis data available
    `; + } + + return screenAnalysisHistory.map(analysis => html` +
    ${this.formatTimestamp(analysis.timestamp)} • ${analysis.model || 'unknown model'}
    ${analysis.response}
    + `); + } + + renderConversationView() { + if (!this.selectedSession) return html``; + + const { conversationHistory, screenAnalysisHistory, profile, customPrompt } = this.selectedSession; + const hasConversation = conversationHistory && conversationHistory.length > 0; + const hasScreenAnalysis = screenAnalysisHistory && screenAnalysisHistory.length > 0; + const hasContext = profile || customPrompt; + + return html` +
    + +
    +
    +
    + Them +
    +
    +
    + Suggestion +
    +
    +
    + Screen +
    +
    +
    +
    + + + +
    +
    + ${this.activeTab === 'conversation' + ? this.renderConversationContent() + : this.activeTab === 'screen' + ? this.renderScreenAnalysisContent() + : this.renderContextContent()} +
    + `; + } + + render() { + if (this.selectedSession) { + return html`
    ${this.renderConversationView()}
    `; + } + + return html` +
    + ${this.renderSessionsList()} +
    + `; + } +} + +customElements.define('history-view', HistoryView); diff --git a/src/components/views/MainView.js b/src/components/views/MainView.js new file mode 100644 index 0000000..a089aa7 --- /dev/null +++ b/src/components/views/MainView.js @@ -0,0 +1,241 @@ +import { html, css, LitElement } from '../../assets/lit-core-2.7.4.min.js'; +import { resizeLayout } from '../../utils/windowResize.js'; + +export class MainView extends LitElement { + static styles = css` + * { + font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; + cursor: default; + user-select: none; + } + + .welcome { + font-size: 20px; + margin-bottom: 6px; + font-weight: 500; + color: var(--text-color); + margin-top: auto; + } + + .input-group { + display: flex; + gap: 10px; + margin-bottom: 16px; + } + + .input-group input { + flex: 1; + } + + input { + background: var(--input-background); + color: var(--text-color); + border: 1px solid var(--border-color); + padding: 10px 12px; + width: 100%; + border-radius: 3px; + font-size: 13px; + transition: border-color 0.1s ease; + } + + input:focus { + outline: none; + border-color: var(--border-default); + } + + input::placeholder { + color: var(--placeholder-color); + } + + /* Red blink animation for empty API key */ + input.api-key-error { + animation: blink-red 0.6s ease-in-out; + border-color: var(--error-color); + } + + @keyframes blink-red { + 0%, 100% { + border-color: var(--border-color); + } + 50% { + border-color: var(--error-color); + background: rgba(241, 76, 76, 0.1); + } + } + + .start-button { + background: var(--start-button-background); + color: var(--start-button-color); + border: none; + padding: 10px 16px; + border-radius: 3px; + font-size: 13px; + font-weight: 500; + white-space: nowrap; + display: flex; + align-items: center; + gap: 8px; + transition: background 0.1s ease; + } + + .start-button:hover { + background: var(--start-button-hover-background); + } + + .start-button.initializing { + opacity: 0.5; + cursor: not-allowed; + } + + .start-button.initializing:hover { + background: var(--start-button-background); + } + + .shortcut-hint { + font-size: 11px; + color: var(--text-muted); + font-family: 'SF Mono', Monaco, monospace; + } + + .description { + color: var(--text-secondary); + font-size: 13px; + margin-bottom: 20px; + line-height: 1.5; + } + + .link { + color: var(--text-color); + text-decoration: underline; + cursor: pointer; + text-underline-offset: 2px; + } + + .link:hover { + color: var(--text-color); + } + + :host { + height: 100%; + display: flex; + flex-direction: column; + width: 100%; + max-width: 480px; + } + `; + + static properties = { + onStart: { type: Function }, + onAPIKeyHelp: { type: Function }, + isInitializing: { type: Boolean }, + onLayoutModeChange: { type: Function }, + showApiKeyError: { type: Boolean }, + }; + + constructor() { + super(); + this.onStart = () => {}; + this.onAPIKeyHelp = () => {}; + this.isInitializing = false; + this.onLayoutModeChange = () => {}; + this.showApiKeyError = false; + this.boundKeydownHandler = this.handleKeydown.bind(this); + this.apiKey = ''; + this._loadApiKey(); + } + + async _loadApiKey() { + this.apiKey = await cheatingDaddy.storage.getApiKey(); + this.requestUpdate(); + } + + connectedCallback() { + super.connectedCallback(); + window.electron?.ipcRenderer?.on('session-initializing', (event, isInitializing) => { + this.isInitializing = isInitializing; + }); + + // Add keyboard event listener for Ctrl+Enter (or Cmd+Enter on Mac) + document.addEventListener('keydown', this.boundKeydownHandler); + + // Resize window for this view + resizeLayout(); + } + + disconnectedCallback() { + super.disconnectedCallback(); + window.electron?.ipcRenderer?.removeAllListeners('session-initializing'); + // Remove keyboard event listener + document.removeEventListener('keydown', this.boundKeydownHandler); + } + + handleKeydown(e) { + const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0; + const isStartShortcut = isMac ? e.metaKey && e.key === 'Enter' : e.ctrlKey && e.key === 'Enter'; + + if (isStartShortcut) { + e.preventDefault(); + this.handleStartClick(); + } + } + + async handleInput(e) { + this.apiKey = e.target.value; + await cheatingDaddy.storage.setApiKey(e.target.value); + // Clear error state when user starts typing + if (this.showApiKeyError) { + this.showApiKeyError = false; + } + } + + handleStartClick() { + if (this.isInitializing) { + return; + } + this.onStart(); + } + + handleAPIKeyHelpClick() { + this.onAPIKeyHelp(); + } + + // Method to trigger the red blink animation + triggerApiKeyError() { + this.showApiKeyError = true; + // Remove the error class after 1 second + setTimeout(() => { + this.showApiKeyError = false; + }, 1000); + } + + getStartButtonText() { + const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0; + const shortcut = isMac ? 'Cmd+Enter' : 'Ctrl+Enter'; + return html`Start ${shortcut}`; + } + + render() { + return html` +
    Welcome
    + +
    + + +
    +

    + dont have an api key? + get one here +

    + `; + } +} + +customElements.define('main-view', MainView); diff --git a/src/components/views/OnboardingView.js b/src/components/views/OnboardingView.js new file mode 100644 index 0000000..cca0a7e --- /dev/null +++ b/src/components/views/OnboardingView.js @@ -0,0 +1,592 @@ +import { html, css, LitElement } from '../../assets/lit-core-2.7.4.min.js'; + +export class OnboardingView extends LitElement { + static styles = css` + * { + font-family: + 'Inter', + -apple-system, + BlinkMacSystemFont, + 'Segoe UI', + Roboto, + sans-serif; + cursor: default; + user-select: none; + margin: 0; + padding: 0; + box-sizing: border-box; + } + + :host { + display: block; + height: 100%; + width: 100%; + position: fixed; + top: 0; + left: 0; + overflow: hidden; + } + + .onboarding-container { + position: relative; + width: 100%; + height: 100%; + background: #0a0a0a; + overflow: hidden; + } + + .close-button { + position: absolute; + top: 12px; + right: 12px; + z-index: 10; + background: rgba(255, 255, 255, 0.08); + border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: 6px; + width: 32px; + height: 32px; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + transition: all 0.2s ease; + color: rgba(255, 255, 255, 0.6); + } + + .close-button:hover { + background: rgba(255, 255, 255, 0.12); + border-color: rgba(255, 255, 255, 0.2); + color: rgba(255, 255, 255, 0.9); + } + + .close-button svg { + width: 16px; + height: 16px; + } + + .gradient-canvas { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 0; + } + + .content-wrapper { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 60px; + z-index: 1; + display: flex; + flex-direction: column; + justify-content: center; + padding: 32px 48px; + max-width: 500px; + color: #e5e5e5; + overflow: hidden; + } + + .slide-icon { + width: 48px; + height: 48px; + margin-bottom: 16px; + opacity: 0.9; + display: block; + } + + .slide-title { + font-size: 28px; + font-weight: 600; + margin-bottom: 12px; + color: #ffffff; + line-height: 1.3; + } + + .slide-content { + font-size: 16px; + line-height: 1.5; + margin-bottom: 24px; + color: #b8b8b8; + font-weight: 400; + } + + .context-textarea { + width: 100%; + height: 100px; + padding: 16px; + border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: 8px; + background: rgba(255, 255, 255, 0.05); + color: #e5e5e5; + font-size: 14px; + font-family: inherit; + resize: vertical; + transition: all 0.2s ease; + margin-bottom: 24px; + } + + .context-textarea::placeholder { + color: rgba(255, 255, 255, 0.4); + font-size: 14px; + } + + .context-textarea:focus { + outline: none; + border-color: rgba(255, 255, 255, 0.2); + background: rgba(255, 255, 255, 0.08); + } + + .feature-list { + max-width: 100%; + } + + .feature-item { + display: flex; + align-items: center; + margin-bottom: 12px; + font-size: 15px; + color: #b8b8b8; + } + + .feature-icon { + font-size: 16px; + margin-right: 12px; + opacity: 0.8; + } + + .navigation { + position: absolute; + bottom: 0; + left: 0; + right: 0; + z-index: 2; + display: flex; + align-items: center; + justify-content: space-between; + padding: 16px 24px; + background: rgba(0, 0, 0, 0.3); + backdrop-filter: blur(10px); + border-top: 1px solid rgba(255, 255, 255, 0.05); + height: 60px; + box-sizing: border-box; + } + + .nav-button { + background: rgba(255, 255, 255, 0.08); + border: 1px solid rgba(255, 255, 255, 0.1); + color: #e5e5e5; + padding: 8px 16px; + border-radius: 6px; + font-size: 13px; + font-weight: 500; + cursor: pointer; + transition: all 0.2s ease; + display: flex; + align-items: center; + justify-content: center; + min-width: 36px; + min-height: 36px; + } + + .nav-button:hover { + background: rgba(255, 255, 255, 0.12); + border-color: rgba(255, 255, 255, 0.2); + } + + .nav-button:active { + transform: scale(0.98); + } + + .nav-button:disabled { + opacity: 0.4; + cursor: not-allowed; + } + + .nav-button:disabled:hover { + background: rgba(255, 255, 255, 0.08); + border-color: rgba(255, 255, 255, 0.1); + transform: none; + } + + .progress-dots { + display: flex; + gap: 12px; + align-items: center; + } + + .dot { + width: 8px; + height: 8px; + border-radius: 50%; + background: rgba(255, 255, 255, 0.2); + transition: all 0.2s ease; + cursor: pointer; + } + + .dot:hover { + background: rgba(255, 255, 255, 0.4); + } + + .dot.active { + background: rgba(255, 255, 255, 0.8); + transform: scale(1.2); + } + `; + + static properties = { + currentSlide: { type: Number }, + contextText: { type: String }, + onComplete: { type: Function }, + onClose: { type: Function }, + }; + + constructor() { + super(); + this.currentSlide = 0; + this.contextText = ''; + this.onComplete = () => {}; + this.onClose = () => {}; + this.canvas = null; + this.ctx = null; + this.animationId = null; + + // Transition properties + this.isTransitioning = false; + this.transitionStartTime = 0; + this.transitionDuration = 800; // 800ms fade duration + this.previousColorScheme = null; + + // Subtle dark color schemes for each slide + this.colorSchemes = [ + // Slide 1 - Welcome (Very dark purple/gray) + [ + [25, 25, 35], // Dark gray-purple + [20, 20, 30], // Darker gray + [30, 25, 40], // Slightly purple + [15, 15, 25], // Very dark + [35, 30, 45], // Muted purple + [10, 10, 20], // Almost black + ], + // Slide 2 - Privacy (Dark blue-gray) + [ + [20, 25, 35], // Dark blue-gray + [15, 20, 30], // Darker blue-gray + [25, 30, 40], // Slightly blue + [10, 15, 25], // Very dark blue + [30, 35, 45], // Muted blue + [5, 10, 20], // Almost black + ], + // Slide 3 - Context (Dark neutral) + [ + [25, 25, 25], // Neutral dark + [20, 20, 20], // Darker neutral + [30, 30, 30], // Light dark + [15, 15, 15], // Very dark + [35, 35, 35], // Lighter dark + [10, 10, 10], // Almost black + ], + // Slide 4 - Features (Dark green-gray) + [ + [20, 30, 25], // Dark green-gray + [15, 25, 20], // Darker green-gray + [25, 35, 30], // Slightly green + [10, 20, 15], // Very dark green + [30, 40, 35], // Muted green + [5, 15, 10], // Almost black + ], + // Slide 5 - Complete (Dark warm gray) + [ + [30, 25, 20], // Dark warm gray + [25, 20, 15], // Darker warm + [35, 30, 25], // Slightly warm + [20, 15, 10], // Very dark warm + [40, 35, 30], // Muted warm + [15, 10, 5], // Almost black + ], + ]; + } + + firstUpdated() { + this.canvas = this.shadowRoot.querySelector('.gradient-canvas'); + this.ctx = this.canvas.getContext('2d'); + this.resizeCanvas(); + this.startGradientAnimation(); + + window.addEventListener('resize', () => this.resizeCanvas()); + } + + disconnectedCallback() { + super.disconnectedCallback(); + if (this.animationId) { + cancelAnimationFrame(this.animationId); + } + window.removeEventListener('resize', () => this.resizeCanvas()); + } + + resizeCanvas() { + if (!this.canvas) return; + + const rect = this.getBoundingClientRect(); + this.canvas.width = rect.width; + this.canvas.height = rect.height; + } + + startGradientAnimation() { + if (!this.ctx) return; + + const animate = timestamp => { + this.drawGradient(timestamp); + this.animationId = requestAnimationFrame(animate); + }; + + animate(0); + } + + drawGradient(timestamp) { + if (!this.ctx || !this.canvas) return; + + const { width, height } = this.canvas; + let colors = this.colorSchemes[this.currentSlide]; + + // Handle color scheme transitions + if (this.isTransitioning && this.previousColorScheme) { + const elapsed = timestamp - this.transitionStartTime; + const progress = Math.min(elapsed / this.transitionDuration, 1); + + // Use easing function for smoother transition + const easedProgress = this.easeInOutCubic(progress); + + colors = this.interpolateColorSchemes(this.previousColorScheme, this.colorSchemes[this.currentSlide], easedProgress); + + // End transition when complete + if (progress >= 1) { + this.isTransitioning = false; + this.previousColorScheme = null; + } + } + + const time = timestamp * 0.0005; // Much slower animation + + // Create moving gradient with subtle flow + const flowX = Math.sin(time * 0.7) * width * 0.3; + const flowY = Math.cos(time * 0.5) * height * 0.2; + + const gradient = this.ctx.createLinearGradient(flowX, flowY, width + flowX * 0.5, height + flowY * 0.5); + + // Very subtle color variations with movement + colors.forEach((color, index) => { + const offset = index / (colors.length - 1); + const wave = Math.sin(time + index * 0.3) * 0.05; // Very subtle wave + + const r = Math.max(0, Math.min(255, color[0] + wave * 5)); + const g = Math.max(0, Math.min(255, color[1] + wave * 5)); + const b = Math.max(0, Math.min(255, color[2] + wave * 5)); + + gradient.addColorStop(offset, `rgb(${r}, ${g}, ${b})`); + }); + + // Fill with moving gradient + this.ctx.fillStyle = gradient; + this.ctx.fillRect(0, 0, width, height); + + // Add a second layer with radial gradient for more depth + const centerX = width * 0.5 + Math.sin(time * 0.3) * width * 0.15; + const centerY = height * 0.5 + Math.cos(time * 0.4) * height * 0.1; + const radius = Math.max(width, height) * 0.8; + + const radialGradient = this.ctx.createRadialGradient(centerX, centerY, 0, centerX, centerY, radius); + + // Very subtle radial overlay + radialGradient.addColorStop(0, `rgba(${colors[0][0] + 10}, ${colors[0][1] + 10}, ${colors[0][2] + 10}, 0.1)`); + radialGradient.addColorStop(0.5, `rgba(${colors[2][0]}, ${colors[2][1]}, ${colors[2][2]}, 0.05)`); + radialGradient.addColorStop( + 1, + `rgba(${colors[colors.length - 1][0]}, ${colors[colors.length - 1][1]}, ${colors[colors.length - 1][2]}, 0.03)` + ); + + this.ctx.globalCompositeOperation = 'overlay'; + this.ctx.fillStyle = radialGradient; + this.ctx.fillRect(0, 0, width, height); + this.ctx.globalCompositeOperation = 'source-over'; + } + + nextSlide() { + if (this.currentSlide < 4) { + this.startColorTransition(this.currentSlide + 1); + } else { + this.completeOnboarding(); + } + } + + prevSlide() { + if (this.currentSlide > 0) { + this.startColorTransition(this.currentSlide - 1); + } + } + + startColorTransition(newSlide) { + this.previousColorScheme = [...this.colorSchemes[this.currentSlide]]; + this.currentSlide = newSlide; + this.isTransitioning = true; + this.transitionStartTime = performance.now(); + } + + // Interpolate between two color schemes + interpolateColorSchemes(scheme1, scheme2, progress) { + return scheme1.map((color1, index) => { + const color2 = scheme2[index]; + return [ + color1[0] + (color2[0] - color1[0]) * progress, + color1[1] + (color2[1] - color1[1]) * progress, + color1[2] + (color2[2] - color1[2]) * progress, + ]; + }); + } + + // Easing function for smooth transitions + easeInOutCubic(t) { + return t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2; + } + + handleContextInput(e) { + this.contextText = e.target.value; + } + + async handleClose() { + if (window.require) { + const { ipcRenderer } = window.require('electron'); + await ipcRenderer.invoke('quit-application'); + } + } + + async completeOnboarding() { + if (this.contextText.trim()) { + await cheatingDaddy.storage.updatePreference('customPrompt', this.contextText.trim()); + } + await cheatingDaddy.storage.updateConfig('onboarded', true); + this.onComplete(); + } + + getSlideContent() { + const slides = [ + { + icon: 'assets/onboarding/welcome.svg', + title: 'Welcome to Cheating Daddy', + content: + 'Your AI assistant that listens and watches, then provides intelligent suggestions automatically during interviews and meetings.', + }, + { + icon: 'assets/onboarding/security.svg', + title: 'Completely Private', + content: 'Invisible to screen sharing apps and recording software. Your secret advantage stays completely hidden from others.', + }, + { + icon: 'assets/onboarding/context.svg', + title: 'Add Your Context', + content: 'Share relevant information to help the AI provide better, more personalized assistance.', + showTextarea: true, + }, + { + icon: 'assets/onboarding/customize.svg', + title: 'Additional Features', + content: '', + showFeatures: true, + }, + { + icon: 'assets/onboarding/ready.svg', + title: 'Ready to Go', + content: 'Add your Gemini API key in settings and start getting AI-powered assistance in real-time.', + }, + ]; + + return slides[this.currentSlide]; + } + + render() { + const slide = this.getSlideContent(); + + return html` +
    + + + +
    + ${slide.title} icon +
    ${slide.title}
    +
    ${slide.content}
    + + ${slide.showTextarea + ? html` + + ` + : ''} + ${slide.showFeatures + ? html` +
    +
    + - + Customize AI behavior and responses +
    +
    + - + Review conversation history +
    +
    + - + Adjust capture settings and intervals +
    +
    + ` + : ''} +
    + + +
    + `; + } +} + +customElements.define('onboarding-view', OnboardingView); diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..5279509 --- /dev/null +++ b/src/index.html @@ -0,0 +1,143 @@ + + + + + Screen and Audio Capture + + + + + + + + + + + + + diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..fbf3152 --- /dev/null +++ b/src/index.js @@ -0,0 +1,320 @@ +if (require('electron-squirrel-startup')) { + process.exit(0); +} + +const { app, BrowserWindow, shell, ipcMain } = require('electron'); +const { createWindow, updateGlobalShortcuts } = require('./utils/window'); +const { setupAIProviderIpcHandlers } = require('./utils/ai-provider-manager'); +const { stopMacOSAudioCapture } = require('./utils/gemini'); +const storage = require('./storage'); + +const geminiSessionRef = { current: null }; +let mainWindow = null; + +function sendToRenderer(channel, data) { + const windows = BrowserWindow.getAllWindows(); + if (windows.length > 0) { + windows[0].webContents.send(channel, data); + } +} + +function createMainWindow() { + mainWindow = createWindow(sendToRenderer, geminiSessionRef); + return mainWindow; +} + +app.whenReady().then(async () => { + // Initialize storage (checks version, resets if needed) + storage.initializeStorage(); + + createMainWindow(); + setupAIProviderIpcHandlers(geminiSessionRef); + setupStorageIpcHandlers(); + setupGeneralIpcHandlers(); +}); + +app.on('window-all-closed', () => { + stopMacOSAudioCapture(); + if (process.platform !== 'darwin') { + app.quit(); + } +}); + +app.on('before-quit', () => { + stopMacOSAudioCapture(); +}); + +app.on('activate', () => { + if (BrowserWindow.getAllWindows().length === 0) { + createMainWindow(); + } +}); + +function setupStorageIpcHandlers() { + // ============ CONFIG ============ + ipcMain.handle('storage:get-config', async () => { + try { + return { success: true, data: storage.getConfig() }; + } catch (error) { + console.error('Error getting config:', error); + return { success: false, error: error.message }; + } + }); + + ipcMain.handle('storage:set-config', async (event, config) => { + try { + storage.setConfig(config); + return { success: true }; + } catch (error) { + console.error('Error setting config:', error); + return { success: false, error: error.message }; + } + }); + + ipcMain.handle('storage:update-config', async (event, key, value) => { + try { + storage.updateConfig(key, value); + return { success: true }; + } catch (error) { + console.error('Error updating config:', error); + return { success: false, error: error.message }; + } + }); + + // ============ CREDENTIALS ============ + ipcMain.handle('storage:get-credentials', async () => { + try { + return { success: true, data: storage.getCredentials() }; + } catch (error) { + console.error('Error getting credentials:', error); + return { success: false, error: error.message }; + } + }); + + ipcMain.handle('storage:set-credentials', async (event, credentials) => { + try { + storage.setCredentials(credentials); + return { success: true }; + } catch (error) { + console.error('Error setting credentials:', error); + return { success: false, error: error.message }; + } + }); + + ipcMain.handle('storage:get-api-key', async () => { + try { + return { success: true, data: storage.getApiKey() }; + } catch (error) { + console.error('Error getting API key:', error); + return { success: false, error: error.message }; + } + }); + + ipcMain.handle('storage:set-api-key', async (event, apiKey) => { + try { + storage.setApiKey(apiKey); + return { success: true }; + } catch (error) { + console.error('Error setting API key:', error); + return { success: false, error: error.message }; + } + }); + + ipcMain.handle('storage:get-openai-credentials', async () => { + try { + return { success: true, data: storage.getOpenAICredentials() }; + } catch (error) { + console.error('Error getting OpenAI credentials:', error); + return { success: false, error: error.message }; + } + }); + + ipcMain.handle('storage:set-openai-credentials', async (event, config) => { + try { + storage.setOpenAICredentials(config); + return { success: true }; + } catch (error) { + console.error('Error setting OpenAI credentials:', error); + return { success: false, error: error.message }; + } + }); + + ipcMain.handle('storage:get-openai-sdk-credentials', async () => { + try { + return { success: true, data: storage.getOpenAISDKCredentials() }; + } catch (error) { + console.error('Error getting OpenAI SDK credentials:', error); + return { success: false, error: error.message }; + } + }); + + ipcMain.handle('storage:set-openai-sdk-credentials', async (event, config) => { + try { + storage.setOpenAISDKCredentials(config); + return { success: true }; + } catch (error) { + console.error('Error setting OpenAI SDK credentials:', error); + return { success: false, error: error.message }; + } + }); + + // ============ PREFERENCES ============ + ipcMain.handle('storage:get-preferences', async () => { + try { + return { success: true, data: storage.getPreferences() }; + } catch (error) { + console.error('Error getting preferences:', error); + return { success: false, error: error.message }; + } + }); + + ipcMain.handle('storage:set-preferences', async (event, preferences) => { + try { + storage.setPreferences(preferences); + return { success: true }; + } catch (error) { + console.error('Error setting preferences:', error); + return { success: false, error: error.message }; + } + }); + + ipcMain.handle('storage:update-preference', async (event, key, value) => { + try { + storage.updatePreference(key, value); + return { success: true }; + } catch (error) { + console.error('Error updating preference:', error); + return { success: false, error: error.message }; + } + }); + + // ============ KEYBINDS ============ + ipcMain.handle('storage:get-keybinds', async () => { + try { + return { success: true, data: storage.getKeybinds() }; + } catch (error) { + console.error('Error getting keybinds:', error); + return { success: false, error: error.message }; + } + }); + + ipcMain.handle('storage:set-keybinds', async (event, keybinds) => { + try { + storage.setKeybinds(keybinds); + return { success: true }; + } catch (error) { + console.error('Error setting keybinds:', error); + return { success: false, error: error.message }; + } + }); + + // ============ HISTORY ============ + ipcMain.handle('storage:get-all-sessions', async () => { + try { + return { success: true, data: storage.getAllSessions() }; + } catch (error) { + console.error('Error getting sessions:', error); + return { success: false, error: error.message }; + } + }); + + ipcMain.handle('storage:get-session', async (event, sessionId) => { + try { + return { success: true, data: storage.getSession(sessionId) }; + } catch (error) { + console.error('Error getting session:', error); + return { success: false, error: error.message }; + } + }); + + ipcMain.handle('storage:save-session', async (event, sessionId, data) => { + try { + storage.saveSession(sessionId, data); + return { success: true }; + } catch (error) { + console.error('Error saving session:', error); + return { success: false, error: error.message }; + } + }); + + ipcMain.handle('storage:delete-session', async (event, sessionId) => { + try { + storage.deleteSession(sessionId); + return { success: true }; + } catch (error) { + console.error('Error deleting session:', error); + return { success: false, error: error.message }; + } + }); + + ipcMain.handle('storage:delete-all-sessions', async () => { + try { + storage.deleteAllSessions(); + return { success: true }; + } catch (error) { + console.error('Error deleting all sessions:', error); + return { success: false, error: error.message }; + } + }); + + // ============ LIMITS ============ + ipcMain.handle('storage:get-today-limits', async () => { + try { + return { success: true, data: storage.getTodayLimits() }; + } catch (error) { + console.error('Error getting today limits:', error); + return { success: false, error: error.message }; + } + }); + + // ============ CLEAR ALL ============ + ipcMain.handle('storage:clear-all', async () => { + try { + storage.clearAllData(); + return { success: true }; + } catch (error) { + console.error('Error clearing all data:', error); + return { success: false, error: error.message }; + } + }); +} + +function setupGeneralIpcHandlers() { + ipcMain.handle('get-app-version', async () => { + return app.getVersion(); + }); + + ipcMain.handle('quit-application', async event => { + try { + stopMacOSAudioCapture(); + app.quit(); + return { success: true }; + } catch (error) { + console.error('Error quitting application:', error); + return { success: false, error: error.message }; + } + }); + + ipcMain.handle('open-external', async (event, url) => { + try { + await shell.openExternal(url); + return { success: true }; + } catch (error) { + console.error('Error opening external URL:', error); + return { success: false, error: error.message }; + } + }); + + ipcMain.on('update-keybinds', (event, newKeybinds) => { + if (mainWindow) { + // Also save to storage + storage.setKeybinds(newKeybinds); + updateGlobalShortcuts(newKeybinds, mainWindow, sendToRenderer, geminiSessionRef); + } + }); + + // Debug logging from renderer + ipcMain.on('log-message', (event, msg) => { + console.log(msg); + }); +} diff --git a/src/preload.js b/src/preload.js new file mode 100644 index 0000000..5e9d369 --- /dev/null +++ b/src/preload.js @@ -0,0 +1,2 @@ +// See the Electron documentation for details on how to use preload scripts: +// https://www.electronjs.org/docs/latest/tutorial/process-model#preload-scripts diff --git a/src/storage.js b/src/storage.js new file mode 100644 index 0000000..c190fc4 --- /dev/null +++ b/src/storage.js @@ -0,0 +1,508 @@ +const fs = require('fs'); +const path = require('path'); +const os = require('os'); + +const CONFIG_VERSION = 1; + +// Default values +const DEFAULT_CONFIG = { + configVersion: CONFIG_VERSION, + onboarded: false, + layout: 'normal' +}; + +const DEFAULT_CREDENTIALS = { + apiKey: '', + // OpenAI Realtime API settings + openaiApiKey: '', + openaiBaseUrl: '', + openaiModel: 'gpt-4o-realtime-preview-2024-12-17', + // OpenAI SDK settings (for BotHub and other providers) + openaiSdkApiKey: '', + openaiSdkBaseUrl: '', + openaiSdkModel: 'gpt-4o', + openaiSdkVisionModel: 'gpt-4o', + openaiSdkWhisperModel: 'whisper-1' +}; + +const DEFAULT_PREFERENCES = { + customPrompt: '', + selectedProfile: 'interview', + selectedLanguage: 'en-US', + selectedScreenshotInterval: '5', + selectedImageQuality: 'medium', + advancedMode: false, + audioMode: 'speaker_only', + fontSize: 'medium', + backgroundTransparency: 0.8, + googleSearchEnabled: false, + aiProvider: 'gemini' +}; + +const DEFAULT_KEYBINDS = null; // null means use system defaults + +const DEFAULT_LIMITS = { + data: [] // Array of { date: 'YYYY-MM-DD', flash: { count: 0 }, flashLite: { count: 0 } } +}; + +// Get the config directory path based on OS +function getConfigDir() { + const platform = os.platform(); + let configDir; + + if (platform === 'win32') { + configDir = path.join(os.homedir(), 'AppData', 'Roaming', 'cheating-daddy-config'); + } else if (platform === 'darwin') { + configDir = path.join(os.homedir(), 'Library', 'Application Support', 'cheating-daddy-config'); + } else { + configDir = path.join(os.homedir(), '.config', 'cheating-daddy-config'); + } + + return configDir; +} + +// File paths +function getConfigPath() { + return path.join(getConfigDir(), 'config.json'); +} + +function getCredentialsPath() { + return path.join(getConfigDir(), 'credentials.json'); +} + +function getPreferencesPath() { + return path.join(getConfigDir(), 'preferences.json'); +} + +function getKeybindsPath() { + return path.join(getConfigDir(), 'keybinds.json'); +} + +function getLimitsPath() { + return path.join(getConfigDir(), 'limits.json'); +} + +function getHistoryDir() { + return path.join(getConfigDir(), 'history'); +} + +// Helper to read JSON file safely +function readJsonFile(filePath, defaultValue) { + try { + if (fs.existsSync(filePath)) { + const data = fs.readFileSync(filePath, 'utf8'); + return JSON.parse(data); + } + } catch (error) { + console.warn(`Error reading ${filePath}:`, error.message); + } + return defaultValue; +} + +// Helper to write JSON file safely +function writeJsonFile(filePath, data) { + try { + const dir = path.dirname(filePath); + if (!fs.existsSync(dir)) { + fs.mkdirSync(dir, { recursive: true }); + } + fs.writeFileSync(filePath, JSON.stringify(data, null, 2), 'utf8'); + return true; + } catch (error) { + console.error(`Error writing ${filePath}:`, error.message); + return false; + } +} + +// Check if we need to reset (no configVersion or wrong version) +function needsReset() { + const configPath = getConfigPath(); + if (!fs.existsSync(configPath)) { + return true; + } + + try { + const config = JSON.parse(fs.readFileSync(configPath, 'utf8')); + return !config.configVersion || config.configVersion !== CONFIG_VERSION; + } catch { + return true; + } +} + +// Wipe and reinitialize the config directory +function resetConfigDir() { + const configDir = getConfigDir(); + + console.log('Resetting config directory...'); + + // Remove existing directory if it exists + if (fs.existsSync(configDir)) { + fs.rmSync(configDir, { recursive: true, force: true }); + } + + // Create fresh directory structure + fs.mkdirSync(configDir, { recursive: true }); + fs.mkdirSync(getHistoryDir(), { recursive: true }); + + // Initialize with defaults + writeJsonFile(getConfigPath(), DEFAULT_CONFIG); + writeJsonFile(getCredentialsPath(), DEFAULT_CREDENTIALS); + writeJsonFile(getPreferencesPath(), DEFAULT_PREFERENCES); + + console.log('Config directory initialized with defaults'); +} + +// Initialize storage - call this on app startup +function initializeStorage() { + if (needsReset()) { + resetConfigDir(); + } else { + // Ensure history directory exists + const historyDir = getHistoryDir(); + if (!fs.existsSync(historyDir)) { + fs.mkdirSync(historyDir, { recursive: true }); + } + } +} + +// ============ CONFIG ============ + +function getConfig() { + return readJsonFile(getConfigPath(), DEFAULT_CONFIG); +} + +function setConfig(config) { + const current = getConfig(); + const updated = { ...current, ...config, configVersion: CONFIG_VERSION }; + return writeJsonFile(getConfigPath(), updated); +} + +function updateConfig(key, value) { + const config = getConfig(); + config[key] = value; + return writeJsonFile(getConfigPath(), config); +} + +// ============ CREDENTIALS ============ + +function getCredentials() { + return readJsonFile(getCredentialsPath(), DEFAULT_CREDENTIALS); +} + +function setCredentials(credentials) { + const current = getCredentials(); + const updated = { ...current, ...credentials }; + return writeJsonFile(getCredentialsPath(), updated); +} + +function getApiKey() { + return getCredentials().apiKey || ''; +} + +function setApiKey(apiKey) { + return setCredentials({ apiKey }); +} + +function getOpenAICredentials() { + const creds = getCredentials(); + return { + apiKey: creds.openaiApiKey || '', + baseUrl: creds.openaiBaseUrl || '', + model: creds.openaiModel || 'gpt-4o-realtime-preview-2024-12-17' + }; +} + +function setOpenAICredentials(config) { + const updates = {}; + if (config.apiKey !== undefined) updates.openaiApiKey = config.apiKey; + if (config.baseUrl !== undefined) updates.openaiBaseUrl = config.baseUrl; + if (config.model !== undefined) updates.openaiModel = config.model; + return setCredentials(updates); +} + +function getOpenAISDKCredentials() { + const creds = getCredentials(); + return { + apiKey: creds.openaiSdkApiKey || '', + baseUrl: creds.openaiSdkBaseUrl || '', + model: creds.openaiSdkModel || 'gpt-4o', + visionModel: creds.openaiSdkVisionModel || 'gpt-4o', + whisperModel: creds.openaiSdkWhisperModel || 'whisper-1' + }; +} + +function setOpenAISDKCredentials(config) { + const updates = {}; + if (config.apiKey !== undefined) updates.openaiSdkApiKey = config.apiKey; + if (config.baseUrl !== undefined) updates.openaiSdkBaseUrl = config.baseUrl; + if (config.model !== undefined) updates.openaiSdkModel = config.model; + if (config.visionModel !== undefined) updates.openaiSdkVisionModel = config.visionModel; + if (config.whisperModel !== undefined) updates.openaiSdkWhisperModel = config.whisperModel; + return setCredentials(updates); +} + +// ============ PREFERENCES ============ + +function getPreferences() { + const saved = readJsonFile(getPreferencesPath(), {}); + return { ...DEFAULT_PREFERENCES, ...saved }; +} + +function setPreferences(preferences) { + const current = getPreferences(); + const updated = { ...current, ...preferences }; + return writeJsonFile(getPreferencesPath(), updated); +} + +function updatePreference(key, value) { + const preferences = getPreferences(); + preferences[key] = value; + return writeJsonFile(getPreferencesPath(), preferences); +} + +// ============ KEYBINDS ============ + +function getKeybinds() { + return readJsonFile(getKeybindsPath(), DEFAULT_KEYBINDS); +} + +function setKeybinds(keybinds) { + return writeJsonFile(getKeybindsPath(), keybinds); +} + +// ============ LIMITS (Rate Limiting) ============ + +function getLimits() { + return readJsonFile(getLimitsPath(), DEFAULT_LIMITS); +} + +function setLimits(limits) { + return writeJsonFile(getLimitsPath(), limits); +} + +function getTodayDateString() { + const now = new Date(); + return now.toISOString().split('T')[0]; // YYYY-MM-DD +} + +function getTodayLimits() { + const limits = getLimits(); + const today = getTodayDateString(); + + // Find today's entry + const todayEntry = limits.data.find(entry => entry.date === today); + + if (todayEntry) { + return todayEntry; + } + + // No entry for today - clean old entries and create new one + limits.data = limits.data.filter(entry => entry.date === today); + const newEntry = { + date: today, + flash: { count: 0 }, + flashLite: { count: 0 } + }; + limits.data.push(newEntry); + setLimits(limits); + + return newEntry; +} + +function incrementLimitCount(model) { + const limits = getLimits(); + const today = getTodayDateString(); + + // Find or create today's entry + let todayEntry = limits.data.find(entry => entry.date === today); + + if (!todayEntry) { + // Clean old entries and create new one + limits.data = []; + todayEntry = { + date: today, + flash: { count: 0 }, + flashLite: { count: 0 } + }; + limits.data.push(todayEntry); + } else { + // Clean old entries, keep only today + limits.data = limits.data.filter(entry => entry.date === today); + } + + // Increment the appropriate model count + if (model === 'gemini-2.5-flash') { + todayEntry.flash.count++; + } else if (model === 'gemini-2.5-flash-lite') { + todayEntry.flashLite.count++; + } + + setLimits(limits); + return todayEntry; +} + +function getAvailableModel() { + const todayLimits = getTodayLimits(); + + // RPD limits: flash = 20, flash-lite = 20 + // After both exhausted, fall back to flash (for paid API users) + if (todayLimits.flash.count < 20) { + return 'gemini-2.5-flash'; + } else if (todayLimits.flashLite.count < 20) { + return 'gemini-2.5-flash-lite'; + } + + return 'gemini-2.5-flash'; // Default to flash for paid API users +} + +// ============ HISTORY ============ + +function getSessionPath(sessionId) { + return path.join(getHistoryDir(), `${sessionId}.json`); +} + +function saveSession(sessionId, data) { + const sessionPath = getSessionPath(sessionId); + + // Load existing session to preserve metadata + const existingSession = readJsonFile(sessionPath, null); + + const sessionData = { + sessionId, + createdAt: existingSession?.createdAt || parseInt(sessionId), + lastUpdated: Date.now(), + // Profile context - set once when session starts + profile: data.profile || existingSession?.profile || null, + customPrompt: data.customPrompt || existingSession?.customPrompt || null, + // Conversation data + conversationHistory: data.conversationHistory || existingSession?.conversationHistory || [], + screenAnalysisHistory: data.screenAnalysisHistory || existingSession?.screenAnalysisHistory || [] + }; + return writeJsonFile(sessionPath, sessionData); +} + +function getSession(sessionId) { + return readJsonFile(getSessionPath(sessionId), null); +} + +function getAllSessions() { + const historyDir = getHistoryDir(); + + try { + if (!fs.existsSync(historyDir)) { + return []; + } + + const files = fs.readdirSync(historyDir) + .filter(f => f.endsWith('.json')) + .sort((a, b) => { + // Sort by timestamp descending (newest first) + const tsA = parseInt(a.replace('.json', '')); + const tsB = parseInt(b.replace('.json', '')); + return tsB - tsA; + }); + + return files.map(file => { + const sessionId = file.replace('.json', ''); + const data = readJsonFile(path.join(historyDir, file), null); + if (data) { + return { + sessionId, + createdAt: data.createdAt, + lastUpdated: data.lastUpdated, + messageCount: data.conversationHistory?.length || 0, + screenAnalysisCount: data.screenAnalysisHistory?.length || 0, + profile: data.profile || null, + customPrompt: data.customPrompt || null + }; + } + return null; + }).filter(Boolean); + } catch (error) { + console.error('Error reading sessions:', error.message); + return []; + } +} + +function deleteSession(sessionId) { + const sessionPath = getSessionPath(sessionId); + try { + if (fs.existsSync(sessionPath)) { + fs.unlinkSync(sessionPath); + return true; + } + } catch (error) { + console.error('Error deleting session:', error.message); + } + return false; +} + +function deleteAllSessions() { + const historyDir = getHistoryDir(); + try { + if (fs.existsSync(historyDir)) { + const files = fs.readdirSync(historyDir).filter(f => f.endsWith('.json')); + files.forEach(file => { + fs.unlinkSync(path.join(historyDir, file)); + }); + } + return true; + } catch (error) { + console.error('Error deleting all sessions:', error.message); + return false; + } +} + +// ============ CLEAR ALL DATA ============ + +function clearAllData() { + resetConfigDir(); + return true; +} + +module.exports = { + // Initialization + initializeStorage, + getConfigDir, + + // Config + getConfig, + setConfig, + updateConfig, + + // Credentials + getCredentials, + setCredentials, + getApiKey, + setApiKey, + getOpenAICredentials, + setOpenAICredentials, + getOpenAISDKCredentials, + setOpenAISDKCredentials, + + // Preferences + getPreferences, + setPreferences, + updatePreference, + + // Keybinds + getKeybinds, + setKeybinds, + + // Limits (Rate Limiting) + getLimits, + setLimits, + getTodayLimits, + incrementLimitCount, + getAvailableModel, + + // History + saveSession, + getSession, + getAllSessions, + deleteSession, + deleteAllSessions, + + // Clear all + clearAllData +}; diff --git a/src/utils/ai-provider-manager.js b/src/utils/ai-provider-manager.js new file mode 100644 index 0000000..904de5e --- /dev/null +++ b/src/utils/ai-provider-manager.js @@ -0,0 +1,453 @@ +const { BrowserWindow, ipcMain } = require('electron'); +const { getSystemPrompt } = require('./prompts'); +const { getAvailableModel, incrementLimitCount, getApiKey, getOpenAICredentials, getOpenAISDKCredentials, getPreferences } = require('../storage'); + +// Import provider implementations +const geminiProvider = require('./gemini'); +const openaiRealtimeProvider = require('./openai-realtime'); +const openaiSdkProvider = require('./openai-sdk'); + +// Conversation tracking (shared across providers) +let currentSessionId = null; +let conversationHistory = []; +let screenAnalysisHistory = []; +let currentProfile = null; +let currentCustomPrompt = null; +let currentProvider = 'gemini'; // 'gemini', 'openai-realtime', or 'openai-sdk' +let providerConfig = {}; + +function sendToRenderer(channel, data) { + const windows = BrowserWindow.getAllWindows(); + if (windows.length > 0) { + windows[0].webContents.send(channel, data); + } +} + +function initializeNewSession(profile = null, customPrompt = null) { + currentSessionId = Date.now().toString(); + conversationHistory = []; + screenAnalysisHistory = []; + currentProfile = profile; + currentCustomPrompt = customPrompt; + console.log('New conversation session started:', currentSessionId, 'profile:', profile, 'provider:', currentProvider); + + if (profile) { + sendToRenderer('save-session-context', { + sessionId: currentSessionId, + profile: profile, + customPrompt: customPrompt || '', + provider: currentProvider, + }); + } +} + +function saveConversationTurn(transcription, aiResponse) { + if (!currentSessionId) { + initializeNewSession(); + } + + const conversationTurn = { + timestamp: Date.now(), + transcription: transcription.trim(), + ai_response: aiResponse.trim(), + }; + + conversationHistory.push(conversationTurn); + console.log('Saved conversation turn:', conversationTurn); + + sendToRenderer('save-conversation-turn', { + sessionId: currentSessionId, + turn: conversationTurn, + fullHistory: conversationHistory, + }); +} + +function saveScreenAnalysis(prompt, response, model) { + if (!currentSessionId) { + initializeNewSession(); + } + + const analysisEntry = { + timestamp: Date.now(), + prompt: prompt, + response: response.trim(), + model: model, + provider: currentProvider, + }; + + screenAnalysisHistory.push(analysisEntry); + console.log('Saved screen analysis:', analysisEntry); + + sendToRenderer('save-screen-analysis', { + sessionId: currentSessionId, + analysis: analysisEntry, + fullHistory: screenAnalysisHistory, + profile: currentProfile, + customPrompt: currentCustomPrompt, + }); +} + +function getCurrentSessionData() { + return { + sessionId: currentSessionId, + history: conversationHistory, + provider: currentProvider, + }; +} + +// Get provider configuration from storage +async function getStoredSetting(key, defaultValue) { + try { + const windows = BrowserWindow.getAllWindows(); + if (windows.length > 0) { + await new Promise(resolve => setTimeout(resolve, 100)); + + const value = await windows[0].webContents.executeJavaScript(` + (function() { + try { + if (typeof localStorage === 'undefined') { + return '${defaultValue}'; + } + const stored = localStorage.getItem('${key}'); + return stored || '${defaultValue}'; + } catch (e) { + return '${defaultValue}'; + } + })() + `); + return value; + } + } catch (error) { + console.error('Error getting stored setting for', key, ':', error.message); + } + return defaultValue; +} + +// Initialize AI session based on selected provider +async function initializeAISession(customPrompt = '', profile = 'interview', language = 'en-US') { + // Read provider from file-based storage (preferences.json) + const prefs = getPreferences(); + const provider = prefs.aiProvider || 'gemini'; + currentProvider = provider; + + console.log('Initializing AI session with provider:', provider); + + // Check if Google Search is enabled for system prompt + const googleSearchEnabled = prefs.googleSearchEnabled ?? true; + const systemPrompt = getSystemPrompt(profile, customPrompt, googleSearchEnabled); + + if (provider === 'openai-realtime') { + // Get OpenAI Realtime configuration + const creds = getOpenAICredentials(); + + if (!creds.apiKey) { + sendToRenderer('update-status', 'OpenAI API key not configured'); + return false; + } + + providerConfig = { + apiKey: creds.apiKey, + baseUrl: creds.baseUrl || null, + model: creds.model, + systemPrompt, + language, + isReconnect: false, + }; + + initializeNewSession(profile, customPrompt); + + try { + await openaiRealtimeProvider.initializeOpenAISession(providerConfig, conversationHistory); + return true; + } catch (error) { + console.error('Failed to initialize OpenAI Realtime session:', error); + sendToRenderer('update-status', 'Failed to connect to OpenAI Realtime'); + return false; + } + } else if (provider === 'openai-sdk') { + // Get OpenAI SDK configuration (for BotHub, etc.) + const creds = getOpenAISDKCredentials(); + + if (!creds.apiKey) { + sendToRenderer('update-status', 'OpenAI SDK API key not configured'); + return false; + } + + providerConfig = { + apiKey: creds.apiKey, + baseUrl: creds.baseUrl || null, + model: creds.model, + visionModel: creds.visionModel, + whisperModel: creds.whisperModel, + }; + + initializeNewSession(profile, customPrompt); + + try { + await openaiSdkProvider.initializeOpenAISDK(providerConfig); + openaiSdkProvider.setSystemPrompt(systemPrompt); + sendToRenderer('update-status', 'Ready (OpenAI SDK)'); + return true; + } catch (error) { + console.error('Failed to initialize OpenAI SDK:', error); + sendToRenderer('update-status', 'Failed to initialize OpenAI SDK: ' + error.message); + return false; + } + } else { + // Use Gemini (default) + const apiKey = getApiKey(); + if (!apiKey) { + sendToRenderer('update-status', 'Gemini API key not configured'); + return false; + } + + const session = await geminiProvider.initializeGeminiSession(apiKey, customPrompt, profile, language); + if (session && global.geminiSessionRef) { + global.geminiSessionRef.current = session; + return true; + } + return false; + } +} + +// Send audio to appropriate provider +async function sendAudioContent(data, mimeType, isSystemAudio = true) { + if (currentProvider === 'openai-realtime') { + return await openaiRealtimeProvider.sendAudioToOpenAI(data); + } else if (currentProvider === 'openai-sdk') { + // OpenAI SDK buffers audio and transcribes on flush + return await openaiSdkProvider.processAudioChunk(data, mimeType); + } else { + // Gemini + if (!global.geminiSessionRef?.current) { + return { success: false, error: 'No active Gemini session' }; + } + try { + const marker = isSystemAudio ? '.' : ','; + process.stdout.write(marker); + await global.geminiSessionRef.current.sendRealtimeInput({ + audio: { data, mimeType }, + }); + return { success: true }; + } catch (error) { + console.error('Error sending audio to Gemini:', error); + return { success: false, error: error.message }; + } + } +} + +// Send image to appropriate provider +async function sendImageContent(data, prompt) { + if (currentProvider === 'openai-realtime') { + const creds = getOpenAICredentials(); + const result = await openaiRealtimeProvider.sendImageToOpenAI(data, prompt, { + apiKey: creds.apiKey, + baseUrl: creds.baseUrl, + model: creds.model, + }); + + if (result.success) { + saveScreenAnalysis(prompt, result.text, result.model); + } + + return result; + } else if (currentProvider === 'openai-sdk') { + const result = await openaiSdkProvider.sendImageMessage(data, prompt); + + if (result.success) { + saveScreenAnalysis(prompt, result.text, result.model); + } + + return result; + } else { + // Use Gemini HTTP API + const result = await geminiProvider.sendImageToGeminiHttp(data, prompt); + + // Screen analysis is saved inside sendImageToGeminiHttp for Gemini + return result; + } +} + +// Send text message to appropriate provider +async function sendTextMessage(text) { + if (currentProvider === 'openai-realtime') { + return await openaiRealtimeProvider.sendTextToOpenAI(text); + } else if (currentProvider === 'openai-sdk') { + const result = await openaiSdkProvider.sendTextMessage(text); + if (result.success && result.text) { + saveConversationTurn(text, result.text); + } + return result; + } else { + // Gemini + if (!global.geminiSessionRef?.current) { + return { success: false, error: 'No active Gemini session' }; + } + try { + console.log('Sending text message to Gemini:', text); + await global.geminiSessionRef.current.sendRealtimeInput({ text: text.trim() }); + return { success: true }; + } catch (error) { + console.error('Error sending text to Gemini:', error); + return { success: false, error: error.message }; + } + } +} + +// Close session for appropriate provider +async function closeSession() { + try { + if (currentProvider === 'openai-realtime') { + openaiRealtimeProvider.closeOpenAISession(); + } else if (currentProvider === 'openai-sdk') { + openaiSdkProvider.closeOpenAISDK(); + } else { + geminiProvider.stopMacOSAudioCapture(); + if (global.geminiSessionRef?.current) { + await global.geminiSessionRef.current.close(); + global.geminiSessionRef.current = null; + } + } + return { success: true }; + } catch (error) { + console.error('Error closing session:', error); + return { success: false, error: error.message }; + } +} + +// Setup IPC handlers +function setupAIProviderIpcHandlers(geminiSessionRef) { + // Store reference for Gemini + global.geminiSessionRef = geminiSessionRef; + + // Listen for conversation turn save requests from providers + ipcMain.on('save-conversation-turn-data', (event, { transcription, response }) => { + saveConversationTurn(transcription, response); + }); + + ipcMain.handle('initialize-ai-session', async (event, customPrompt, profile, language) => { + return await initializeAISession(customPrompt, profile, language); + }); + + ipcMain.handle('send-audio-content', async (event, { data, mimeType }) => { + return await sendAudioContent(data, mimeType, true); + }); + + ipcMain.handle('send-mic-audio-content', async (event, { data, mimeType }) => { + return await sendAudioContent(data, mimeType, false); + }); + + ipcMain.handle('send-image-content', async (event, { data, prompt }) => { + return await sendImageContent(data, prompt); + }); + + ipcMain.handle('send-text-message', async (event, text) => { + return await sendTextMessage(text); + }); + + ipcMain.handle('close-session', async event => { + return await closeSession(); + }); + + // macOS system audio + ipcMain.handle('start-macos-audio', async event => { + if (process.platform !== 'darwin') { + return { + success: false, + error: 'macOS audio capture only available on macOS', + }; + } + + try { + if (currentProvider === 'gemini') { + const success = await geminiProvider.startMacOSAudioCapture(global.geminiSessionRef); + return { success }; + } else if (currentProvider === 'openai-sdk') { + const success = await openaiSdkProvider.startMacOSAudioCapture(); + return { success }; + } else if (currentProvider === 'openai-realtime') { + // OpenAI Realtime uses WebSocket, handle differently if needed + return { + success: false, + error: 'OpenAI Realtime uses WebSocket for audio', + }; + } + + return { + success: false, + error: 'Unknown provider: ' + currentProvider, + }; + } catch (error) { + console.error('Error starting macOS audio capture:', error); + return { success: false, error: error.message }; + } + }); + + ipcMain.handle('stop-macos-audio', async event => { + try { + if (currentProvider === 'gemini') { + geminiProvider.stopMacOSAudioCapture(); + } else if (currentProvider === 'openai-sdk') { + openaiSdkProvider.stopMacOSAudioCapture(); + } + return { success: true }; + } catch (error) { + console.error('Error stopping macOS audio capture:', error); + return { success: false, error: error.message }; + } + }); + + // Session management + ipcMain.handle('get-current-session', async event => { + try { + return { success: true, data: getCurrentSessionData() }; + } catch (error) { + console.error('Error getting current session:', error); + return { success: false, error: error.message }; + } + }); + + ipcMain.handle('start-new-session', async event => { + try { + initializeNewSession(); + return { success: true, sessionId: currentSessionId }; + } catch (error) { + console.error('Error starting new session:', error); + return { success: false, error: error.message }; + } + }); + + ipcMain.handle('update-google-search-setting', async (event, enabled) => { + try { + console.log('Google Search setting updated to:', enabled); + return { success: true }; + } catch (error) { + console.error('Error updating Google Search setting:', error); + return { success: false, error: error.message }; + } + }); + + // Provider switching + ipcMain.handle('switch-ai-provider', async (event, provider) => { + try { + console.log('Switching AI provider to:', provider); + currentProvider = provider; + return { success: true }; + } catch (error) { + console.error('Error switching provider:', error); + return { success: false, error: error.message }; + } + }); +} + +module.exports = { + setupAIProviderIpcHandlers, + initializeAISession, + sendAudioContent, + sendImageContent, + sendTextMessage, + closeSession, + getCurrentSessionData, + initializeNewSession, + saveConversationTurn, +}; diff --git a/src/utils/gemini.js b/src/utils/gemini.js new file mode 100644 index 0000000..4f6186c --- /dev/null +++ b/src/utils/gemini.js @@ -0,0 +1,605 @@ +const { GoogleGenAI, Modality } = require('@google/genai'); +const { BrowserWindow, ipcMain } = require('electron'); +const { spawn } = require('child_process'); +const { saveDebugAudio } = require('../audioUtils'); +const { getSystemPrompt } = require('./prompts'); +const { getAvailableModel, incrementLimitCount, getApiKey } = require('../storage'); + +// Conversation tracking variables +let currentSessionId = null; +let currentTranscription = ''; +let conversationHistory = []; +let screenAnalysisHistory = []; +let currentProfile = null; +let currentCustomPrompt = null; +let isInitializingSession = false; + +function formatSpeakerResults(results) { + let text = ''; + for (const result of results) { + if (result.transcript && result.speakerId) { + const speakerLabel = result.speakerId === 1 ? 'Interviewer' : 'Candidate'; + text += `[${speakerLabel}]: ${result.transcript}\n`; + } + } + return text; +} + +module.exports.formatSpeakerResults = formatSpeakerResults; + +// Audio capture variables +let systemAudioProc = null; +let messageBuffer = ''; + +// Reconnection variables +let isUserClosing = false; +let sessionParams = null; +let reconnectAttempts = 0; +const MAX_RECONNECT_ATTEMPTS = 3; +const RECONNECT_DELAY = 2000; + +function sendToRenderer(channel, data) { + const windows = BrowserWindow.getAllWindows(); + if (windows.length > 0) { + windows[0].webContents.send(channel, data); + } +} + +// Build context message for session restoration +function buildContextMessage() { + const lastTurns = conversationHistory.slice(-20); + const validTurns = lastTurns.filter(turn => turn.transcription?.trim() && turn.ai_response?.trim()); + + if (validTurns.length === 0) return null; + + const contextLines = validTurns.map(turn => + `[Interviewer]: ${turn.transcription.trim()}\n[Your answer]: ${turn.ai_response.trim()}` + ); + + return `Session reconnected. Here's the conversation so far:\n\n${contextLines.join('\n\n')}\n\nContinue from here.`; +} + +// Conversation management functions +function initializeNewSession(profile = null, customPrompt = null) { + currentSessionId = Date.now().toString(); + currentTranscription = ''; + conversationHistory = []; + screenAnalysisHistory = []; + currentProfile = profile; + currentCustomPrompt = customPrompt; + console.log('New conversation session started:', currentSessionId, 'profile:', profile); + + // Save initial session with profile context + if (profile) { + sendToRenderer('save-session-context', { + sessionId: currentSessionId, + profile: profile, + customPrompt: customPrompt || '' + }); + } +} + +function saveConversationTurn(transcription, aiResponse) { + if (!currentSessionId) { + initializeNewSession(); + } + + const conversationTurn = { + timestamp: Date.now(), + transcription: transcription.trim(), + ai_response: aiResponse.trim(), + }; + + conversationHistory.push(conversationTurn); + console.log('Saved conversation turn:', conversationTurn); + + // Send to renderer to save in IndexedDB + sendToRenderer('save-conversation-turn', { + sessionId: currentSessionId, + turn: conversationTurn, + fullHistory: conversationHistory, + }); +} + +function saveScreenAnalysis(prompt, response, model) { + if (!currentSessionId) { + initializeNewSession(); + } + + const analysisEntry = { + timestamp: Date.now(), + prompt: prompt, + response: response.trim(), + model: model + }; + + screenAnalysisHistory.push(analysisEntry); + console.log('Saved screen analysis:', analysisEntry); + + // Send to renderer to save + sendToRenderer('save-screen-analysis', { + sessionId: currentSessionId, + analysis: analysisEntry, + fullHistory: screenAnalysisHistory, + profile: currentProfile, + customPrompt: currentCustomPrompt + }); +} + +function getCurrentSessionData() { + return { + sessionId: currentSessionId, + history: conversationHistory, + }; +} + +async function getEnabledTools() { + const tools = []; + + // Check if Google Search is enabled (default: true) + const googleSearchEnabled = await getStoredSetting('googleSearchEnabled', 'true'); + console.log('Google Search enabled:', googleSearchEnabled); + + if (googleSearchEnabled === 'true') { + tools.push({ googleSearch: {} }); + console.log('Added Google Search tool'); + } else { + console.log('Google Search tool disabled'); + } + + return tools; +} + +async function getStoredSetting(key, defaultValue) { + try { + const windows = BrowserWindow.getAllWindows(); + if (windows.length > 0) { + // Wait a bit for the renderer to be ready + await new Promise(resolve => setTimeout(resolve, 100)); + + // Try to get setting from renderer process localStorage + const value = await windows[0].webContents.executeJavaScript(` + (function() { + try { + if (typeof localStorage === 'undefined') { + console.log('localStorage not available yet for ${key}'); + return '${defaultValue}'; + } + const stored = localStorage.getItem('${key}'); + console.log('Retrieved setting ${key}:', stored); + return stored || '${defaultValue}'; + } catch (e) { + console.error('Error accessing localStorage for ${key}:', e); + return '${defaultValue}'; + } + })() + `); + return value; + } + } catch (error) { + console.error('Error getting stored setting for', key, ':', error.message); + } + console.log('Using default value for', key, ':', defaultValue); + return defaultValue; +} + +async function initializeGeminiSession(apiKey, customPrompt = '', profile = 'interview', language = 'en-US', isReconnect = false) { + if (isInitializingSession) { + console.log('Session initialization already in progress'); + return false; + } + + isInitializingSession = true; + if (!isReconnect) { + sendToRenderer('session-initializing', true); + } + + // Store params for reconnection + if (!isReconnect) { + sessionParams = { apiKey, customPrompt, profile, language }; + reconnectAttempts = 0; + } + + const client = new GoogleGenAI({ + vertexai: false, + apiKey: apiKey, + httpOptions: { apiVersion: 'v1alpha' }, + }); + + // Get enabled tools first to determine Google Search status + const enabledTools = await getEnabledTools(); + const googleSearchEnabled = enabledTools.some(tool => tool.googleSearch); + + const systemPrompt = getSystemPrompt(profile, customPrompt, googleSearchEnabled); + + // Initialize new conversation session only on first connect + if (!isReconnect) { + initializeNewSession(profile, customPrompt); + } + + try { + const session = await client.live.connect({ + model: 'gemini-2.5-flash-native-audio-preview-09-2025', + callbacks: { + onopen: function () { + sendToRenderer('update-status', 'Live session connected'); + }, + onmessage: function (message) { + console.log('----------------', message); + + // Handle input transcription (what was spoken) + if (message.serverContent?.inputTranscription?.results) { + currentTranscription += formatSpeakerResults(message.serverContent.inputTranscription.results); + } else if (message.serverContent?.inputTranscription?.text) { + const text = message.serverContent.inputTranscription.text; + if (text.trim() !== '') { + currentTranscription += text; + } + } + + // Handle AI model response via output transcription (native audio model) + if (message.serverContent?.outputTranscription?.text) { + const text = message.serverContent.outputTranscription.text; + if (text.trim() === '') return; // Ignore empty transcriptions + const isNewResponse = messageBuffer === ''; + messageBuffer += text; + sendToRenderer(isNewResponse ? 'new-response' : 'update-response', messageBuffer); + } + + if (message.serverContent?.generationComplete) { + // Only send/save if there's actual content + if (messageBuffer.trim() !== '') { + sendToRenderer('update-response', messageBuffer); + + // Save conversation turn when we have both transcription and AI response + if (currentTranscription) { + saveConversationTurn(currentTranscription, messageBuffer); + currentTranscription = ''; // Reset for next turn + } + } + messageBuffer = ''; + } + + if (message.serverContent?.turnComplete) { + sendToRenderer('update-status', 'Listening...'); + } + }, + onerror: function (e) { + console.log('Session error:', e.message); + sendToRenderer('update-status', 'Error: ' + e.message); + }, + onclose: function (e) { + console.log('Session closed:', e.reason); + + // Don't reconnect if user intentionally closed + if (isUserClosing) { + isUserClosing = false; + sendToRenderer('update-status', 'Session closed'); + return; + } + + // Attempt reconnection + if (sessionParams && reconnectAttempts < MAX_RECONNECT_ATTEMPTS) { + attemptReconnect(); + } else { + sendToRenderer('update-status', 'Session closed'); + } + }, + }, + config: { + responseModalities: [Modality.AUDIO], + proactivity: { proactiveAudio: true }, + outputAudioTranscription: {}, + tools: enabledTools, + // Enable speaker diarization + inputAudioTranscription: { + enableSpeakerDiarization: true, + minSpeakerCount: 2, + maxSpeakerCount: 2, + }, + contextWindowCompression: { slidingWindow: {} }, + speechConfig: { languageCode: language }, + systemInstruction: { + parts: [{ text: systemPrompt }], + }, + }, + }); + + isInitializingSession = false; + if (!isReconnect) { + sendToRenderer('session-initializing', false); + } + return session; + } catch (error) { + console.error('Failed to initialize Gemini session:', error); + isInitializingSession = false; + if (!isReconnect) { + sendToRenderer('session-initializing', false); + } + return null; + } +} + +async function attemptReconnect() { + reconnectAttempts++; + console.log(`Reconnection attempt ${reconnectAttempts}/${MAX_RECONNECT_ATTEMPTS}`); + + // Clear stale buffers + messageBuffer = ''; + currentTranscription = ''; + + sendToRenderer('update-status', `Reconnecting... (${reconnectAttempts}/${MAX_RECONNECT_ATTEMPTS})`); + + // Wait before attempting + await new Promise(resolve => setTimeout(resolve, RECONNECT_DELAY)); + + try { + const session = await initializeGeminiSession( + sessionParams.apiKey, + sessionParams.customPrompt, + sessionParams.profile, + sessionParams.language, + true // isReconnect + ); + + if (session && global.geminiSessionRef) { + global.geminiSessionRef.current = session; + + // Restore context from conversation history via text message + const contextMessage = buildContextMessage(); + if (contextMessage) { + try { + console.log('Restoring conversation context...'); + await session.sendRealtimeInput({ text: contextMessage }); + } catch (contextError) { + console.error('Failed to restore context:', contextError); + // Continue without context - better than failing + } + } + + // Don't reset reconnectAttempts here - let it reset on next fresh session + sendToRenderer('update-status', 'Reconnected! Listening...'); + console.log('Session reconnected successfully'); + return true; + } + } catch (error) { + console.error(`Reconnection attempt ${reconnectAttempts} failed:`, error); + } + + // If we still have attempts left, try again + if (reconnectAttempts < MAX_RECONNECT_ATTEMPTS) { + return attemptReconnect(); + } + + // Max attempts reached - notify frontend + console.log('Max reconnection attempts reached'); + sendToRenderer('reconnect-failed', { + message: 'Tried 3 times to reconnect. Must be upstream/network issues. Try restarting or download updated app from site.', + }); + sessionParams = null; + return false; +} + +function killExistingSystemAudioDump() { + return new Promise(resolve => { + console.log('Checking for existing SystemAudioDump processes...'); + + // Kill any existing SystemAudioDump processes + const killProc = spawn('pkill', ['-f', 'SystemAudioDump'], { + stdio: 'ignore', + }); + + killProc.on('close', code => { + if (code === 0) { + console.log('Killed existing SystemAudioDump processes'); + } else { + console.log('No existing SystemAudioDump processes found'); + } + resolve(); + }); + + killProc.on('error', err => { + console.log('Error checking for existing processes (this is normal):', err.message); + resolve(); + }); + + // Timeout after 2 seconds + setTimeout(() => { + killProc.kill(); + resolve(); + }, 2000); + }); +} + +async function startMacOSAudioCapture(geminiSessionRef) { + if (process.platform !== 'darwin') return false; + + // Kill any existing SystemAudioDump processes first + await killExistingSystemAudioDump(); + + console.log('Starting macOS audio capture with SystemAudioDump...'); + + const { app } = require('electron'); + const path = require('path'); + + let systemAudioPath; + if (app.isPackaged) { + systemAudioPath = path.join(process.resourcesPath, 'SystemAudioDump'); + } else { + systemAudioPath = path.join(__dirname, '../assets', 'SystemAudioDump'); + } + + console.log('SystemAudioDump path:', systemAudioPath); + + const spawnOptions = { + stdio: ['ignore', 'pipe', 'pipe'], + env: { + ...process.env, + }, + }; + + systemAudioProc = spawn(systemAudioPath, [], spawnOptions); + + if (!systemAudioProc.pid) { + console.error('Failed to start SystemAudioDump'); + return false; + } + + console.log('SystemAudioDump started with PID:', systemAudioProc.pid); + + const CHUNK_DURATION = 0.1; + const SAMPLE_RATE = 24000; + const BYTES_PER_SAMPLE = 2; + const CHANNELS = 2; + const CHUNK_SIZE = SAMPLE_RATE * BYTES_PER_SAMPLE * CHANNELS * CHUNK_DURATION; + + let audioBuffer = Buffer.alloc(0); + + systemAudioProc.stdout.on('data', data => { + audioBuffer = Buffer.concat([audioBuffer, data]); + + while (audioBuffer.length >= CHUNK_SIZE) { + const chunk = audioBuffer.slice(0, CHUNK_SIZE); + audioBuffer = audioBuffer.slice(CHUNK_SIZE); + + const monoChunk = CHANNELS === 2 ? convertStereoToMono(chunk) : chunk; + const base64Data = monoChunk.toString('base64'); + sendAudioToGemini(base64Data, geminiSessionRef); + + if (process.env.DEBUG_AUDIO) { + console.log(`Processed audio chunk: ${chunk.length} bytes`); + saveDebugAudio(monoChunk, 'system_audio'); + } + } + + const maxBufferSize = SAMPLE_RATE * BYTES_PER_SAMPLE * 1; + if (audioBuffer.length > maxBufferSize) { + audioBuffer = audioBuffer.slice(-maxBufferSize); + } + }); + + systemAudioProc.stderr.on('data', data => { + console.error('SystemAudioDump stderr:', data.toString()); + }); + + systemAudioProc.on('close', code => { + console.log('SystemAudioDump process closed with code:', code); + systemAudioProc = null; + }); + + systemAudioProc.on('error', err => { + console.error('SystemAudioDump process error:', err); + systemAudioProc = null; + }); + + return true; +} + +function convertStereoToMono(stereoBuffer) { + const samples = stereoBuffer.length / 4; + const monoBuffer = Buffer.alloc(samples * 2); + + for (let i = 0; i < samples; i++) { + const leftSample = stereoBuffer.readInt16LE(i * 4); + monoBuffer.writeInt16LE(leftSample, i * 2); + } + + return monoBuffer; +} + +function stopMacOSAudioCapture() { + if (systemAudioProc) { + console.log('Stopping SystemAudioDump...'); + systemAudioProc.kill('SIGTERM'); + systemAudioProc = null; + } +} + +async function sendAudioToGemini(base64Data, geminiSessionRef) { + if (!geminiSessionRef.current) return; + + try { + process.stdout.write('.'); + await geminiSessionRef.current.sendRealtimeInput({ + audio: { + data: base64Data, + mimeType: 'audio/pcm;rate=24000', + }, + }); + } catch (error) { + console.error('Error sending audio to Gemini:', error); + } +} + +async function sendImageToGeminiHttp(base64Data, prompt) { + // Get available model based on rate limits + const model = getAvailableModel(); + + const apiKey = getApiKey(); + if (!apiKey) { + return { success: false, error: 'No API key configured' }; + } + + try { + const ai = new GoogleGenAI({ apiKey: apiKey }); + + const contents = [ + { + inlineData: { + mimeType: 'image/jpeg', + data: base64Data, + }, + }, + { text: prompt }, + ]; + + console.log(`Sending image to ${model} (streaming)...`); + const response = await ai.models.generateContentStream({ + model: model, + contents: contents, + }); + + // Increment count after successful call + incrementLimitCount(model); + + // Stream the response + let fullText = ''; + let isFirst = true; + for await (const chunk of response) { + const chunkText = chunk.text; + if (chunkText) { + fullText += chunkText; + // Send to renderer - new response for first chunk, update for subsequent + sendToRenderer(isFirst ? 'new-response' : 'update-response', fullText); + isFirst = false; + } + } + + console.log(`Image response completed from ${model}`); + + // Save screen analysis to history + saveScreenAnalysis(prompt, fullText, model); + + return { success: true, text: fullText, model: model }; + } catch (error) { + console.error('Error sending image to Gemini HTTP:', error); + return { success: false, error: error.message }; + } +} + +module.exports = { + initializeGeminiSession, + getEnabledTools, + getStoredSetting, + sendToRenderer, + initializeNewSession, + saveConversationTurn, + getCurrentSessionData, + killExistingSystemAudioDump, + startMacOSAudioCapture, + convertStereoToMono, + stopMacOSAudioCapture, + sendAudioToGemini, + sendImageToGeminiHttp, + formatSpeakerResults, +}; diff --git a/src/utils/openai-realtime.js b/src/utils/openai-realtime.js new file mode 100644 index 0000000..4550c66 --- /dev/null +++ b/src/utils/openai-realtime.js @@ -0,0 +1,402 @@ +const { BrowserWindow } = require('electron'); +const WebSocket = require('ws'); + +// OpenAI Realtime API implementation +// Documentation: https://platform.openai.com/docs/api-reference/realtime + +let ws = null; +let isUserClosing = false; +let sessionParams = null; +let reconnectAttempts = 0; +const MAX_RECONNECT_ATTEMPTS = 3; +const RECONNECT_DELAY = 2000; + +// Message buffer for accumulating responses +let messageBuffer = ''; +let currentTranscription = ''; + +function sendToRenderer(channel, data) { + const windows = BrowserWindow.getAllWindows(); + if (windows.length > 0) { + windows[0].webContents.send(channel, data); + } +} + +function buildContextMessage(conversationHistory) { + const lastTurns = conversationHistory.slice(-20); + const validTurns = lastTurns.filter(turn => turn.transcription?.trim() && turn.ai_response?.trim()); + + if (validTurns.length === 0) return null; + + const contextLines = validTurns.map(turn => `User: ${turn.transcription.trim()}\nAssistant: ${turn.ai_response.trim()}`); + + return `Session reconnected. Here's the conversation so far:\n\n${contextLines.join('\n\n')}\n\nContinue from here.`; +} + +async function initializeOpenAISession(config, conversationHistory = []) { + const { apiKey, baseUrl, systemPrompt, model, language, isReconnect } = config; + + if (!isReconnect) { + sessionParams = config; + reconnectAttempts = 0; + sendToRenderer('session-initializing', true); + } + + // Use custom baseURL or default OpenAI endpoint + const wsUrl = baseUrl || 'wss://api.openai.com/v1/realtime'; + const fullUrl = `${wsUrl}?model=${model || 'gpt-4o-realtime-preview-2024-12-17'}`; + + return new Promise((resolve, reject) => { + try { + ws = new WebSocket(fullUrl, { + headers: { + Authorization: `Bearer ${apiKey}`, + 'OpenAI-Beta': 'realtime=v1', + }, + }); + + ws.on('open', () => { + console.log('OpenAI Realtime connection established'); + + // Configure session + const sessionConfig = { + type: 'session.update', + session: { + modalities: ['text', 'audio'], + instructions: systemPrompt, + voice: 'alloy', + input_audio_format: 'pcm16', + output_audio_format: 'pcm16', + input_audio_transcription: { + model: 'whisper-1', + }, + turn_detection: { + type: 'server_vad', + threshold: 0.5, + prefix_padding_ms: 300, + silence_duration_ms: 500, + }, + temperature: 0.8, + max_response_output_tokens: 4096, + }, + }; + + ws.send(JSON.stringify(sessionConfig)); + + // Restore context if reconnecting + if (isReconnect && conversationHistory.length > 0) { + const contextMessage = buildContextMessage(conversationHistory); + if (contextMessage) { + ws.send( + JSON.stringify({ + type: 'conversation.item.create', + item: { + type: 'message', + role: 'user', + content: [{ type: 'input_text', text: contextMessage }], + }, + }) + ); + ws.send(JSON.stringify({ type: 'response.create' })); + } + } + + sendToRenderer('update-status', 'Connected to OpenAI'); + if (!isReconnect) { + sendToRenderer('session-initializing', false); + } + resolve(ws); + }); + + ws.on('message', data => { + try { + const event = JSON.parse(data.toString()); + handleOpenAIEvent(event); + } catch (error) { + console.error('Error parsing OpenAI message:', error); + } + }); + + ws.on('error', error => { + console.error('OpenAI WebSocket error:', error); + sendToRenderer('update-status', 'Error: ' + error.message); + reject(error); + }); + + ws.on('close', (code, reason) => { + console.log(`OpenAI WebSocket closed: ${code} - ${reason}`); + + if (isUserClosing) { + isUserClosing = false; + sendToRenderer('update-status', 'Session closed'); + return; + } + + // Attempt reconnection + if (sessionParams && reconnectAttempts < MAX_RECONNECT_ATTEMPTS) { + attemptReconnect(conversationHistory); + } else { + sendToRenderer('update-status', 'Session closed'); + } + }); + } catch (error) { + console.error('Failed to initialize OpenAI session:', error); + if (!isReconnect) { + sendToRenderer('session-initializing', false); + } + reject(error); + } + }); +} + +function handleOpenAIEvent(event) { + console.log('OpenAI event:', event.type); + + switch (event.type) { + case 'session.created': + console.log('Session created:', event.session.id); + break; + + case 'session.updated': + console.log('Session updated'); + sendToRenderer('update-status', 'Listening...'); + break; + + case 'input_audio_buffer.speech_started': + console.log('Speech started'); + break; + + case 'input_audio_buffer.speech_stopped': + console.log('Speech stopped'); + break; + + case 'conversation.item.input_audio_transcription.completed': + if (event.transcript) { + currentTranscription += event.transcript; + console.log('Transcription:', event.transcript); + } + break; + + case 'response.audio_transcript.delta': + if (event.delta) { + const isNewResponse = messageBuffer === ''; + messageBuffer += event.delta; + sendToRenderer(isNewResponse ? 'new-response' : 'update-response', messageBuffer); + } + break; + + case 'response.audio_transcript.done': + console.log('Audio transcript complete'); + break; + + case 'response.text.delta': + if (event.delta) { + const isNewResponse = messageBuffer === ''; + messageBuffer += event.delta; + sendToRenderer(isNewResponse ? 'new-response' : 'update-response', messageBuffer); + } + break; + + case 'response.done': + if (messageBuffer.trim() !== '') { + sendToRenderer('update-response', messageBuffer); + + // Send conversation turn to be saved + if (currentTranscription) { + sendToRenderer('save-conversation-turn-data', { + transcription: currentTranscription, + response: messageBuffer, + }); + currentTranscription = ''; + } + } + messageBuffer = ''; + sendToRenderer('update-status', 'Listening...'); + break; + + case 'error': + console.error('OpenAI error:', event.error); + sendToRenderer('update-status', 'Error: ' + event.error.message); + break; + + default: + // console.log('Unhandled event type:', event.type); + break; + } +} + +async function attemptReconnect(conversationHistory) { + reconnectAttempts++; + console.log(`Reconnection attempt ${reconnectAttempts}/${MAX_RECONNECT_ATTEMPTS}`); + + messageBuffer = ''; + currentTranscription = ''; + + sendToRenderer('update-status', `Reconnecting... (${reconnectAttempts}/${MAX_RECONNECT_ATTEMPTS})`); + + await new Promise(resolve => setTimeout(resolve, RECONNECT_DELAY)); + + try { + const newConfig = { ...sessionParams, isReconnect: true }; + ws = await initializeOpenAISession(newConfig, conversationHistory); + sendToRenderer('update-status', 'Reconnected! Listening...'); + console.log('OpenAI session reconnected successfully'); + return true; + } catch (error) { + console.error(`Reconnection attempt ${reconnectAttempts} failed:`, error); + + if (reconnectAttempts < MAX_RECONNECT_ATTEMPTS) { + return attemptReconnect(conversationHistory); + } + + console.log('Max reconnection attempts reached'); + sendToRenderer('reconnect-failed', { + message: 'Tried 3 times to reconnect to OpenAI. Check your connection and API key.', + }); + sessionParams = null; + return false; + } +} + +async function sendAudioToOpenAI(base64Data) { + if (!ws || ws.readyState !== WebSocket.OPEN) { + console.error('WebSocket not connected'); + return { success: false, error: 'No active connection' }; + } + + try { + ws.send( + JSON.stringify({ + type: 'input_audio_buffer.append', + audio: base64Data, + }) + ); + return { success: true }; + } catch (error) { + console.error('Error sending audio to OpenAI:', error); + return { success: false, error: error.message }; + } +} + +async function sendTextToOpenAI(text) { + if (!ws || ws.readyState !== WebSocket.OPEN) { + console.error('WebSocket not connected'); + return { success: false, error: 'No active connection' }; + } + + try { + // Create a conversation item with user text + ws.send( + JSON.stringify({ + type: 'conversation.item.create', + item: { + type: 'message', + role: 'user', + content: [{ type: 'input_text', text: text }], + }, + }) + ); + + // Trigger response generation + ws.send(JSON.stringify({ type: 'response.create' })); + + return { success: true }; + } catch (error) { + console.error('Error sending text to OpenAI:', error); + return { success: false, error: error.message }; + } +} + +async function sendImageToOpenAI(base64Data, prompt, config) { + const { apiKey, baseUrl, model } = config; + + // OpenAI doesn't support images in Realtime API yet, use standard Chat Completions + const apiEndpoint = baseUrl ? `${baseUrl.replace('wss://', 'https://').replace('/v1/realtime', '')}/v1/chat/completions` : 'https://api.openai.com/v1/chat/completions'; + + try { + const response = await fetch(apiEndpoint, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${apiKey}`, + }, + body: JSON.stringify({ + model: model || 'gpt-4o', + messages: [ + { + role: 'user', + content: [ + { type: 'text', text: prompt }, + { + type: 'image_url', + image_url: { + url: `data:image/jpeg;base64,${base64Data}`, + }, + }, + ], + }, + ], + max_tokens: 4096, + stream: true, + }), + }); + + if (!response.ok) { + const error = await response.text(); + throw new Error(`OpenAI API error: ${response.status} - ${error}`); + } + + const reader = response.body.getReader(); + const decoder = new TextDecoder(); + let fullText = ''; + let isFirst = true; + + while (true) { + const { done, value } = await reader.read(); + if (done) break; + + const chunk = decoder.decode(value); + const lines = chunk.split('\n').filter(line => line.trim().startsWith('data: ')); + + for (const line of lines) { + const data = line.replace('data: ', ''); + if (data === '[DONE]') continue; + + try { + const json = JSON.parse(data); + const content = json.choices[0]?.delta?.content; + if (content) { + fullText += content; + sendToRenderer(isFirst ? 'new-response' : 'update-response', fullText); + isFirst = false; + } + } catch (e) { + // Skip invalid JSON + } + } + } + + return { success: true, text: fullText, model: model || 'gpt-4o' }; + } catch (error) { + console.error('Error sending image to OpenAI:', error); + return { success: false, error: error.message }; + } +} + +function closeOpenAISession() { + isUserClosing = true; + sessionParams = null; + + if (ws) { + ws.close(); + ws = null; + } +} + +module.exports = { + initializeOpenAISession, + sendAudioToOpenAI, + sendTextToOpenAI, + sendImageToOpenAI, + closeOpenAISession, +}; diff --git a/src/utils/openai-sdk.js b/src/utils/openai-sdk.js new file mode 100644 index 0000000..8ca6164 --- /dev/null +++ b/src/utils/openai-sdk.js @@ -0,0 +1,561 @@ +const { BrowserWindow } = require('electron'); +const fs = require('fs'); +const path = require('path'); +const os = require('os'); +const { spawn } = require('child_process'); + +// OpenAI SDK will be loaded dynamically +let OpenAI = null; + +// OpenAI SDK-based provider (for BotHub, Azure, and other OpenAI-compatible APIs) +// This uses the standard Chat Completions API with Whisper for transcription + +let openaiClient = null; +let currentConfig = null; +let conversationMessages = []; +let isProcessing = false; + +// macOS audio capture +let systemAudioProc = null; +let audioBuffer = Buffer.alloc(0); +let transcriptionTimer = null; +const TRANSCRIPTION_INTERVAL_MS = 3000; // Transcribe every 3 seconds +const MIN_AUDIO_DURATION_MS = 500; // Minimum audio duration to transcribe +const SAMPLE_RATE = 24000; + +function sendToRenderer(channel, data) { + const windows = BrowserWindow.getAllWindows(); + if (windows.length > 0) { + windows[0].webContents.send(channel, data); + } +} + +async function initializeOpenAISDK(config) { + const { apiKey, baseUrl, model } = config; + + if (!apiKey) { + throw new Error('OpenAI API key is required'); + } + + // Dynamic import for ES module + if (!OpenAI) { + const openaiModule = await import('openai'); + OpenAI = openaiModule.default; + } + + const clientConfig = { + apiKey: apiKey, + }; + + // Use custom baseURL if provided + if (baseUrl && baseUrl.trim() !== '') { + clientConfig.baseURL = baseUrl; + } + + openaiClient = new OpenAI(clientConfig); + currentConfig = config; + conversationMessages = []; + + console.log('OpenAI SDK initialized with baseURL:', clientConfig.baseURL || 'default'); + sendToRenderer('update-status', 'Ready (OpenAI SDK)'); + + return true; +} + +function setSystemPrompt(systemPrompt) { + // Clear conversation and set system prompt + conversationMessages = []; + if (systemPrompt) { + conversationMessages.push({ + role: 'system', + content: systemPrompt, + }); + } +} + +// Create WAV file from raw PCM data +function createWavBuffer(pcmBuffer, sampleRate = 24000, numChannels = 1, bitsPerSample = 16) { + const byteRate = sampleRate * numChannels * (bitsPerSample / 8); + const blockAlign = numChannels * (bitsPerSample / 8); + const dataSize = pcmBuffer.length; + const headerSize = 44; + const fileSize = headerSize + dataSize - 8; + + const wavBuffer = Buffer.alloc(headerSize + dataSize); + + // RIFF header + wavBuffer.write('RIFF', 0); + wavBuffer.writeUInt32LE(fileSize, 4); + wavBuffer.write('WAVE', 8); + + // fmt chunk + wavBuffer.write('fmt ', 12); + wavBuffer.writeUInt32LE(16, 16); // fmt chunk size + wavBuffer.writeUInt16LE(1, 20); // audio format (1 = PCM) + wavBuffer.writeUInt16LE(numChannels, 22); + wavBuffer.writeUInt32LE(sampleRate, 24); + wavBuffer.writeUInt32LE(byteRate, 28); + wavBuffer.writeUInt16LE(blockAlign, 32); + wavBuffer.writeUInt16LE(bitsPerSample, 34); + + // data chunk + wavBuffer.write('data', 36); + wavBuffer.writeUInt32LE(dataSize, 40); + + // Copy PCM data + pcmBuffer.copy(wavBuffer, 44); + + return wavBuffer; +} + +async function transcribeAudio(audioBuffer, mimeType = 'audio/wav') { + if (!openaiClient) { + throw new Error('OpenAI client not initialized'); + } + + try { + // Save audio buffer to temp file (OpenAI SDK requires file path) + const tempDir = os.tmpdir(); + const tempFile = path.join(tempDir, `audio_${Date.now()}.wav`); + + // Convert base64 to buffer if needed + let buffer = audioBuffer; + if (typeof audioBuffer === 'string') { + buffer = Buffer.from(audioBuffer, 'base64'); + } + + // Create proper WAV file with header + const wavBuffer = createWavBuffer(buffer, SAMPLE_RATE, 1, 16); + fs.writeFileSync(tempFile, wavBuffer); + + const transcription = await openaiClient.audio.transcriptions.create({ + file: fs.createReadStream(tempFile), + model: currentConfig.whisperModel || 'whisper-1', + response_format: 'text', + }); + + // Clean up temp file + try { + fs.unlinkSync(tempFile); + } catch (e) { + // Ignore cleanup errors + } + + return transcription; + } catch (error) { + console.error('Transcription error:', error); + throw error; + } +} + +async function sendTextMessage(text) { + if (!openaiClient) { + return { success: false, error: 'OpenAI client not initialized' }; + } + + if (isProcessing) { + return { success: false, error: 'Already processing a request' }; + } + + isProcessing = true; + + try { + // Add user message to conversation + conversationMessages.push({ + role: 'user', + content: text, + }); + + sendToRenderer('update-status', 'Thinking...'); + + const stream = await openaiClient.chat.completions.create({ + model: currentConfig.model || 'gpt-4o', + messages: conversationMessages, + stream: true, + max_tokens: 4096, + }); + + let fullResponse = ''; + let isFirst = true; + + for await (const chunk of stream) { + const content = chunk.choices[0]?.delta?.content; + if (content) { + fullResponse += content; + sendToRenderer(isFirst ? 'new-response' : 'update-response', fullResponse); + isFirst = false; + } + } + + // Add assistant response to conversation + conversationMessages.push({ + role: 'assistant', + content: fullResponse, + }); + + sendToRenderer('update-status', 'Ready'); + isProcessing = false; + + return { success: true, text: fullResponse }; + } catch (error) { + console.error('Chat completion error:', error); + sendToRenderer('update-status', 'Error: ' + error.message); + isProcessing = false; + return { success: false, error: error.message }; + } +} + +async function sendImageMessage(base64Image, prompt) { + if (!openaiClient) { + return { success: false, error: 'OpenAI client not initialized' }; + } + + if (isProcessing) { + return { success: false, error: 'Already processing a request' }; + } + + isProcessing = true; + + try { + sendToRenderer('update-status', 'Analyzing image...'); + + const messages = [ + ...conversationMessages, + { + role: 'user', + content: [ + { type: 'text', text: prompt }, + { + type: 'image_url', + image_url: { + url: `data:image/jpeg;base64,${base64Image}`, + }, + }, + ], + }, + ]; + + const stream = await openaiClient.chat.completions.create({ + model: currentConfig.visionModel || currentConfig.model || 'gpt-4o', + messages: messages, + stream: true, + max_tokens: 4096, + }); + + let fullResponse = ''; + let isFirst = true; + + for await (const chunk of stream) { + const content = chunk.choices[0]?.delta?.content; + if (content) { + fullResponse += content; + sendToRenderer(isFirst ? 'new-response' : 'update-response', fullResponse); + isFirst = false; + } + } + + // Add to conversation history (text only for follow-ups) + conversationMessages.push({ + role: 'user', + content: prompt, + }); + conversationMessages.push({ + role: 'assistant', + content: fullResponse, + }); + + sendToRenderer('update-status', 'Ready'); + isProcessing = false; + + return { success: true, text: fullResponse, model: currentConfig.visionModel || currentConfig.model }; + } catch (error) { + console.error('Vision error:', error); + sendToRenderer('update-status', 'Error: ' + error.message); + isProcessing = false; + return { success: false, error: error.message }; + } +} + +// Process audio chunk and get response +// This accumulates audio and transcribes when silence is detected +let audioChunks = []; +let lastAudioTime = 0; +const SILENCE_THRESHOLD_MS = 1500; // 1.5 seconds of silence + +async function processAudioChunk(base64Audio, mimeType) { + if (!openaiClient) { + return { success: false, error: 'OpenAI client not initialized' }; + } + + const now = Date.now(); + const buffer = Buffer.from(base64Audio, 'base64'); + + // Add to audio buffer + audioChunks.push(buffer); + lastAudioTime = now; + + // Check for silence (no new audio for SILENCE_THRESHOLD_MS) + // This is a simple approach - in production you'd want proper VAD + return { success: true, buffering: true }; +} + +async function flushAudioAndTranscribe() { + if (audioChunks.length === 0) { + return { success: true, text: '' }; + } + + try { + // Combine all audio chunks + const combinedBuffer = Buffer.concat(audioChunks); + audioChunks = []; + + // Transcribe + const transcription = await transcribeAudio(combinedBuffer); + + if (transcription && transcription.trim()) { + // Send to chat + const response = await sendTextMessage(transcription); + + return { + success: true, + transcription: transcription, + response: response.text, + }; + } + + return { success: true, text: '' }; + } catch (error) { + console.error('Flush audio error:', error); + return { success: false, error: error.message }; + } +} + +function clearConversation() { + const systemMessage = conversationMessages.find(m => m.role === 'system'); + conversationMessages = systemMessage ? [systemMessage] : []; + audioChunks = []; +} + +function closeOpenAISDK() { + stopMacOSAudioCapture(); + openaiClient = null; + currentConfig = null; + conversationMessages = []; + audioChunks = []; + isProcessing = false; + sendToRenderer('update-status', 'Disconnected'); +} + +// ============ macOS Audio Capture ============ + +async function killExistingSystemAudioDump() { + return new Promise(resolve => { + const { exec } = require('child_process'); + exec('pkill -f SystemAudioDump', error => { + // Ignore errors (process might not exist) + setTimeout(resolve, 100); + }); + }); +} + +function convertStereoToMono(stereoBuffer) { + const samples = stereoBuffer.length / 4; + const monoBuffer = Buffer.alloc(samples * 2); + + for (let i = 0; i < samples; i++) { + const leftSample = stereoBuffer.readInt16LE(i * 4); + monoBuffer.writeInt16LE(leftSample, i * 2); + } + + return monoBuffer; +} + +// Calculate RMS (Root Mean Square) volume level of audio buffer +function calculateRMS(buffer) { + const samples = buffer.length / 2; + if (samples === 0) return 0; + + let sumSquares = 0; + for (let i = 0; i < samples; i++) { + const sample = buffer.readInt16LE(i * 2); + sumSquares += sample * sample; + } + + return Math.sqrt(sumSquares / samples); +} + +// Check if audio contains speech (simple VAD based on volume threshold) +function hasSpeech(buffer, threshold = 500) { + const rms = calculateRMS(buffer); + return rms > threshold; +} + +async function transcribeBufferedAudio() { + if (audioBuffer.length === 0 || isProcessing) { + return; + } + + // Calculate audio duration + const bytesPerSample = 2; + const audioDurationMs = (audioBuffer.length / bytesPerSample / SAMPLE_RATE) * 1000; + + if (audioDurationMs < MIN_AUDIO_DURATION_MS) { + return; // Not enough audio + } + + // Check if there's actual speech in the audio (Voice Activity Detection) + if (!hasSpeech(audioBuffer)) { + // Clear buffer if it's just silence/noise + audioBuffer = Buffer.alloc(0); + return; + } + + // Take current buffer and reset + const currentBuffer = audioBuffer; + audioBuffer = Buffer.alloc(0); + + try { + console.log(`Transcribing ${audioDurationMs.toFixed(0)}ms of audio...`); + sendToRenderer('update-status', 'Transcribing...'); + + const transcription = await transcribeAudio(currentBuffer, 'audio/wav'); + + if (transcription && transcription.trim() && transcription.trim().length > 2) { + console.log('Transcription:', transcription); + sendToRenderer('update-status', 'Processing...'); + + // Send to chat + await sendTextMessage(transcription); + } + + sendToRenderer('update-status', 'Listening...'); + } catch (error) { + console.error('Transcription error:', error); + sendToRenderer('update-status', 'Listening...'); + } +} + +async function startMacOSAudioCapture() { + if (process.platform !== 'darwin') return false; + + // Kill any existing SystemAudioDump processes first + await killExistingSystemAudioDump(); + + console.log('Starting macOS audio capture with SystemAudioDump for OpenAI SDK...'); + + const { app } = require('electron'); + + let systemAudioPath; + if (app.isPackaged) { + systemAudioPath = path.join(process.resourcesPath, 'SystemAudioDump'); + } else { + systemAudioPath = path.join(__dirname, '../assets', 'SystemAudioDump'); + } + + console.log('SystemAudioDump path:', systemAudioPath); + + const spawnOptions = { + stdio: ['ignore', 'pipe', 'pipe'], + env: { + ...process.env, + }, + }; + + systemAudioProc = spawn(systemAudioPath, [], spawnOptions); + + if (!systemAudioProc.pid) { + console.error('Failed to start SystemAudioDump'); + return false; + } + + console.log('SystemAudioDump started with PID:', systemAudioProc.pid); + + const CHUNK_DURATION = 0.1; + const BYTES_PER_SAMPLE = 2; + const CHANNELS = 2; + const CHUNK_SIZE = SAMPLE_RATE * BYTES_PER_SAMPLE * CHANNELS * CHUNK_DURATION; + + let tempBuffer = Buffer.alloc(0); + + systemAudioProc.stdout.on('data', data => { + tempBuffer = Buffer.concat([tempBuffer, data]); + + while (tempBuffer.length >= CHUNK_SIZE) { + const chunk = tempBuffer.slice(0, CHUNK_SIZE); + tempBuffer = tempBuffer.slice(CHUNK_SIZE); + + // Convert stereo to mono + const monoChunk = CHANNELS === 2 ? convertStereoToMono(chunk) : chunk; + + // Add to audio buffer for transcription + audioBuffer = Buffer.concat([audioBuffer, monoChunk]); + } + + // Limit buffer size (max 30 seconds of audio) + const maxBufferSize = SAMPLE_RATE * BYTES_PER_SAMPLE * 30; + if (audioBuffer.length > maxBufferSize) { + audioBuffer = audioBuffer.slice(-maxBufferSize); + } + }); + + systemAudioProc.stderr.on('data', data => { + console.error('SystemAudioDump stderr:', data.toString()); + }); + + systemAudioProc.on('close', code => { + console.log('SystemAudioDump process closed with code:', code); + systemAudioProc = null; + stopTranscriptionTimer(); + }); + + systemAudioProc.on('error', err => { + console.error('SystemAudioDump process error:', err); + systemAudioProc = null; + stopTranscriptionTimer(); + }); + + // Start periodic transcription + startTranscriptionTimer(); + + sendToRenderer('update-status', 'Listening...'); + + return true; +} + +function startTranscriptionTimer() { + stopTranscriptionTimer(); + transcriptionTimer = setInterval(transcribeBufferedAudio, TRANSCRIPTION_INTERVAL_MS); +} + +function stopTranscriptionTimer() { + if (transcriptionTimer) { + clearInterval(transcriptionTimer); + transcriptionTimer = null; + } +} + +function stopMacOSAudioCapture() { + stopTranscriptionTimer(); + + if (systemAudioProc) { + console.log('Stopping SystemAudioDump for OpenAI SDK...'); + systemAudioProc.kill('SIGTERM'); + systemAudioProc = null; + } + + audioBuffer = Buffer.alloc(0); +} + +module.exports = { + initializeOpenAISDK, + setSystemPrompt, + transcribeAudio, + sendTextMessage, + sendImageMessage, + processAudioChunk, + flushAudioAndTranscribe, + clearConversation, + closeOpenAISDK, + startMacOSAudioCapture, + stopMacOSAudioCapture, +}; diff --git a/src/utils/prompts.js b/src/utils/prompts.js new file mode 100644 index 0000000..b7160b4 --- /dev/null +++ b/src/utils/prompts.js @@ -0,0 +1,225 @@ +const profilePrompts = { + interview: { + intro: `You are an AI-powered interview assistant, designed to act as a discreet on-screen teleprompter. Your mission is to help the user excel in their job interview by providing concise, impactful, and ready-to-speak answers or key talking points. Analyze the ongoing interview dialogue and, crucially, the 'User-provided context' below.`, + + formatRequirements: `**RESPONSE FORMAT REQUIREMENTS:** +- Keep responses SHORT and CONCISE (1-3 sentences max) +- Use **markdown formatting** for better readability +- Use **bold** for key points and emphasis +- Use bullet points (-) for lists when appropriate +- Focus on the most essential information only`, + + searchUsage: `**SEARCH TOOL USAGE:** +- If the interviewer mentions **recent events, news, or current trends** (anything from the last 6 months), **ALWAYS use Google search** to get up-to-date information +- If they ask about **company-specific information, recent acquisitions, funding, or leadership changes**, use Google search first +- If they mention **new technologies, frameworks, or industry developments**, search for the latest information +- After searching, provide a **concise, informed response** based on the real-time data`, + + content: `Focus on delivering the most essential information the user needs. Your suggestions should be direct and immediately usable. + +To help the user 'crack' the interview in their specific field: +1. Heavily rely on the 'User-provided context' (e.g., details about their industry, the job description, their resume, key skills, and achievements). +2. Tailor your responses to be highly relevant to their field and the specific role they are interviewing for. + +Examples (these illustrate the desired direct, ready-to-speak style; your generated content should be tailored using the user's context): + +Interviewer: "Tell me about yourself" +You: "I'm a software engineer with 5 years of experience building scalable web applications. I specialize in React and Node.js, and I've led development teams at two different startups. I'm passionate about clean code and solving complex technical challenges." + +Interviewer: "What's your experience with React?" +You: "I've been working with React for 4 years, building everything from simple landing pages to complex dashboards with thousands of users. I'm experienced with React hooks, context API, and performance optimization. I've also worked with Next.js for server-side rendering and have built custom component libraries." + +Interviewer: "Why do you want to work here?" +You: "I'm excited about this role because your company is solving real problems in the fintech space, which aligns with my interest in building products that impact people's daily lives. I've researched your tech stack and I'm particularly interested in contributing to your microservices architecture. Your focus on innovation and the opportunity to work with a talented team really appeals to me."`, + + outputInstructions: `**OUTPUT INSTRUCTIONS:** +Provide only the exact words to say in **markdown format**. No coaching, no "you should" statements, no explanations - just the direct response the candidate can speak immediately. Keep it **short and impactful**.`, + }, + + sales: { + intro: `You are a sales call assistant. Your job is to provide the exact words the salesperson should say to prospects during sales calls. Give direct, ready-to-speak responses that are persuasive and professional.`, + + formatRequirements: `**RESPONSE FORMAT REQUIREMENTS:** +- Keep responses SHORT and CONCISE (1-3 sentences max) +- Use **markdown formatting** for better readability +- Use **bold** for key points and emphasis +- Use bullet points (-) for lists when appropriate +- Focus on the most essential information only`, + + searchUsage: `**SEARCH TOOL USAGE:** +- If the prospect mentions **recent industry trends, market changes, or current events**, **ALWAYS use Google search** to get up-to-date information +- If they reference **competitor information, recent funding news, or market data**, search for the latest information first +- If they ask about **new regulations, industry reports, or recent developments**, use search to provide accurate data +- After searching, provide a **concise, informed response** that demonstrates current market knowledge`, + + content: `Examples: + +Prospect: "Tell me about your product" +You: "Our platform helps companies like yours reduce operational costs by 30% while improving efficiency. We've worked with over 500 businesses in your industry, and they typically see ROI within the first 90 days. What specific operational challenges are you facing right now?" + +Prospect: "What makes you different from competitors?" +You: "Three key differentiators set us apart: First, our implementation takes just 2 weeks versus the industry average of 2 months. Second, we provide dedicated support with response times under 4 hours. Third, our pricing scales with your usage, so you only pay for what you need. Which of these resonates most with your current situation?" + +Prospect: "I need to think about it" +You: "I completely understand this is an important decision. What specific concerns can I address for you today? Is it about implementation timeline, cost, or integration with your existing systems? I'd rather help you make an informed decision now than leave you with unanswered questions."`, + + outputInstructions: `**OUTPUT INSTRUCTIONS:** +Provide only the exact words to say in **markdown format**. Be persuasive but not pushy. Focus on value and addressing objections directly. Keep responses **short and impactful**.`, + }, + + meeting: { + intro: `You are a meeting assistant. Your job is to provide the exact words to say during professional meetings, presentations, and discussions. Give direct, ready-to-speak responses that are clear and professional.`, + + formatRequirements: `**RESPONSE FORMAT REQUIREMENTS:** +- Keep responses SHORT and CONCISE (1-3 sentences max) +- Use **markdown formatting** for better readability +- Use **bold** for key points and emphasis +- Use bullet points (-) for lists when appropriate +- Focus on the most essential information only`, + + searchUsage: `**SEARCH TOOL USAGE:** +- If participants mention **recent industry news, regulatory changes, or market updates**, **ALWAYS use Google search** for current information +- If they reference **competitor activities, recent reports, or current statistics**, search for the latest data first +- If they discuss **new technologies, tools, or industry developments**, use search to provide accurate insights +- After searching, provide a **concise, informed response** that adds value to the discussion`, + + content: `Examples: + +Participant: "What's the status on the project?" +You: "We're currently on track to meet our deadline. We've completed 75% of the deliverables, with the remaining items scheduled for completion by Friday. The main challenge we're facing is the integration testing, but we have a plan in place to address it." + +Participant: "Can you walk us through the budget?" +You: "Absolutely. We're currently at 80% of our allocated budget with 20% of the timeline remaining. The largest expense has been development resources at $50K, followed by infrastructure costs at $15K. We have contingency funds available if needed for the final phase." + +Participant: "What are the next steps?" +You: "Moving forward, I'll need approval on the revised timeline by end of day today. Sarah will handle the client communication, and Mike will coordinate with the technical team. We'll have our next checkpoint on Thursday to ensure everything stays on track."`, + + outputInstructions: `**OUTPUT INSTRUCTIONS:** +Provide only the exact words to say in **markdown format**. Be clear, concise, and action-oriented in your responses. Keep it **short and impactful**.`, + }, + + presentation: { + intro: `You are a presentation coach. Your job is to provide the exact words the presenter should say during presentations, pitches, and public speaking events. Give direct, ready-to-speak responses that are engaging and confident.`, + + formatRequirements: `**RESPONSE FORMAT REQUIREMENTS:** +- Keep responses SHORT and CONCISE (1-3 sentences max) +- Use **markdown formatting** for better readability +- Use **bold** for key points and emphasis +- Use bullet points (-) for lists when appropriate +- Focus on the most essential information only`, + + searchUsage: `**SEARCH TOOL USAGE:** +- If the audience asks about **recent market trends, current statistics, or latest industry data**, **ALWAYS use Google search** for up-to-date information +- If they reference **recent events, new competitors, or current market conditions**, search for the latest information first +- If they inquire about **recent studies, reports, or breaking news** in your field, use search to provide accurate data +- After searching, provide a **concise, credible response** with current facts and figures`, + + content: `Examples: + +Audience: "Can you explain that slide again?" +You: "Of course. This slide shows our three-year growth trajectory. The blue line represents revenue, which has grown 150% year over year. The orange bars show our customer acquisition, doubling each year. The key insight here is that our customer lifetime value has increased by 40% while acquisition costs have remained flat." + +Audience: "What's your competitive advantage?" +You: "Great question. Our competitive advantage comes down to three core strengths: speed, reliability, and cost-effectiveness. We deliver results 3x faster than traditional solutions, with 99.9% uptime, at 50% lower cost. This combination is what has allowed us to capture 25% market share in just two years." + +Audience: "How do you plan to scale?" +You: "Our scaling strategy focuses on three pillars. First, we're expanding our engineering team by 200% to accelerate product development. Second, we're entering three new markets next quarter. Third, we're building strategic partnerships that will give us access to 10 million additional potential customers."`, + + outputInstructions: `**OUTPUT INSTRUCTIONS:** +Provide only the exact words to say in **markdown format**. Be confident, engaging, and back up claims with specific numbers or facts when possible. Keep responses **short and impactful**.`, + }, + + negotiation: { + intro: `You are a negotiation assistant. Your job is to provide the exact words to say during business negotiations, contract discussions, and deal-making conversations. Give direct, ready-to-speak responses that are strategic and professional.`, + + formatRequirements: `**RESPONSE FORMAT REQUIREMENTS:** +- Keep responses SHORT and CONCISE (1-3 sentences max) +- Use **markdown formatting** for better readability +- Use **bold** for key points and emphasis +- Use bullet points (-) for lists when appropriate +- Focus on the most essential information only`, + + searchUsage: `**SEARCH TOOL USAGE:** +- If they mention **recent market pricing, current industry standards, or competitor offers**, **ALWAYS use Google search** for current benchmarks +- If they reference **recent legal changes, new regulations, or market conditions**, search for the latest information first +- If they discuss **recent company news, financial performance, or industry developments**, use search to provide informed responses +- After searching, provide a **strategic, well-informed response** that leverages current market intelligence`, + + content: `Examples: + +Other party: "That price is too high" +You: "I understand your concern about the investment. Let's look at the value you're getting: this solution will save you $200K annually in operational costs, which means you'll break even in just 6 months. Would it help if we structured the payment terms differently, perhaps spreading it over 12 months instead of upfront?" + +Other party: "We need a better deal" +You: "I appreciate your directness. We want this to work for both parties. Our current offer is already at a 15% discount from our standard pricing. If budget is the main concern, we could consider reducing the scope initially and adding features as you see results. What specific budget range were you hoping to achieve?" + +Other party: "We're considering other options" +You: "That's smart business practice. While you're evaluating alternatives, I want to ensure you have all the information. Our solution offers three unique benefits that others don't: 24/7 dedicated support, guaranteed 48-hour implementation, and a money-back guarantee if you don't see results in 90 days. How important are these factors in your decision?"`, + + outputInstructions: `**OUTPUT INSTRUCTIONS:** +Provide only the exact words to say in **markdown format**. Focus on finding win-win solutions and addressing underlying concerns. Keep responses **short and impactful**.`, + }, + + exam: { + intro: `You are an exam assistant designed to help students pass tests efficiently. Your role is to provide direct, accurate answers to exam questions with minimal explanation - just enough to confirm the answer is correct.`, + + formatRequirements: `**RESPONSE FORMAT REQUIREMENTS:** +- Keep responses SHORT and CONCISE (1-2 sentences max) +- Use **markdown formatting** for better readability +- Use **bold** for the answer choice/result +- Focus on the most essential information only +- Provide only brief justification for correctness`, + + searchUsage: `**SEARCH TOOL USAGE:** +- If the question involves **recent information, current events, or updated facts**, **ALWAYS use Google search** for the latest data +- If they reference **specific dates, statistics, or factual information** that might be outdated, search for current information +- If they ask about **recent research, new theories, or updated methodologies**, search for the latest information +- After searching, provide **direct, accurate answers** with minimal explanation`, + + content: `Focus on providing efficient exam assistance that helps students pass tests quickly. + +**Key Principles:** +1. **Answer the question directly** - no unnecessary explanations +2. **Include the question text** to verify you've read it properly +3. **Provide the correct answer choice** clearly marked +4. **Give brief justification** for why it's correct +5. **Be concise and to the point** - efficiency is key + +Examples (these illustrate the desired direct, efficient style): + +Question: "What is the capital of France?" +You: "**Question**: What is the capital of France? **Answer**: Paris. **Why**: Paris has been the capital of France since 987 CE and is the country's largest city and political center." + +Question: "Which of the following is a primary color? A) Green B) Red C) Purple D) Orange" +You: "**Question**: Which of the following is a primary color? A) Green B) Red C) Purple D) Orange **Answer**: B) Red **Why**: Red is one of the three primary colors (red, blue, yellow) that cannot be created by mixing other colors." + +Question: "Solve for x: 2x + 5 = 13" +You: "**Question**: Solve for x: 2x + 5 = 13 **Answer**: x = 4 **Why**: Subtract 5 from both sides: 2x = 8, then divide by 2: x = 4."`, + + outputInstructions: `**OUTPUT INSTRUCTIONS:** +Provide direct exam answers in **markdown format**. Include the question text, the correct answer choice, and a brief justification. Focus on efficiency and accuracy. Keep responses **short and to the point**.`, + }, +}; + +function buildSystemPrompt(promptParts, customPrompt = '', googleSearchEnabled = true) { + const sections = [promptParts.intro, '\n\n', promptParts.formatRequirements]; + + // Only add search usage section if Google Search is enabled + if (googleSearchEnabled) { + sections.push('\n\n', promptParts.searchUsage); + } + + sections.push('\n\n', promptParts.content, '\n\nUser-provided context\n-----\n', customPrompt, '\n-----\n\n', promptParts.outputInstructions); + + return sections.join(''); +} + +function getSystemPrompt(profile, customPrompt = '', googleSearchEnabled = true) { + const promptParts = profilePrompts[profile] || profilePrompts.interview; + return buildSystemPrompt(promptParts, customPrompt, googleSearchEnabled); +} + +module.exports = { + profilePrompts, + getSystemPrompt, +}; diff --git a/src/utils/renderer.js b/src/utils/renderer.js new file mode 100644 index 0000000..e1620cb --- /dev/null +++ b/src/utils/renderer.js @@ -0,0 +1,977 @@ +// renderer.js +const { ipcRenderer } = require('electron'); + +let mediaStream = null; +let screenshotInterval = null; +let audioContext = null; +let audioProcessor = null; +let micAudioProcessor = null; +let audioBuffer = []; +const SAMPLE_RATE = 24000; +const AUDIO_CHUNK_DURATION = 0.1; // seconds +const BUFFER_SIZE = 4096; // Increased buffer size for smoother audio + +let hiddenVideo = null; +let offscreenCanvas = null; +let offscreenContext = null; +let currentImageQuality = 'medium'; // Store current image quality for manual screenshots + +const isLinux = process.platform === 'linux'; +const isMacOS = process.platform === 'darwin'; + +// ============ STORAGE API ============ +// Wrapper for IPC-based storage access +const storage = { + // Config + async getConfig() { + const result = await ipcRenderer.invoke('storage:get-config'); + return result.success ? result.data : {}; + }, + async setConfig(config) { + return ipcRenderer.invoke('storage:set-config', config); + }, + async updateConfig(key, value) { + return ipcRenderer.invoke('storage:update-config', key, value); + }, + + // Credentials + async getCredentials() { + const result = await ipcRenderer.invoke('storage:get-credentials'); + return result.success ? result.data : {}; + }, + async setCredentials(credentials) { + return ipcRenderer.invoke('storage:set-credentials', credentials); + }, + async getApiKey() { + const result = await ipcRenderer.invoke('storage:get-api-key'); + return result.success ? result.data : ''; + }, + async setApiKey(apiKey) { + return ipcRenderer.invoke('storage:set-api-key', apiKey); + }, + async getOpenAICredentials() { + const result = await ipcRenderer.invoke('storage:get-openai-credentials'); + return result.success ? result.data : {}; + }, + async setOpenAICredentials(config) { + return ipcRenderer.invoke('storage:set-openai-credentials', config); + }, + async getOpenAISDKCredentials() { + const result = await ipcRenderer.invoke('storage:get-openai-sdk-credentials'); + return result.success ? result.data : {}; + }, + async setOpenAISDKCredentials(config) { + return ipcRenderer.invoke('storage:set-openai-sdk-credentials', config); + }, + + // Preferences + async getPreferences() { + const result = await ipcRenderer.invoke('storage:get-preferences'); + return result.success ? result.data : {}; + }, + async setPreferences(preferences) { + return ipcRenderer.invoke('storage:set-preferences', preferences); + }, + async updatePreference(key, value) { + return ipcRenderer.invoke('storage:update-preference', key, value); + }, + + // Keybinds + async getKeybinds() { + const result = await ipcRenderer.invoke('storage:get-keybinds'); + return result.success ? result.data : null; + }, + async setKeybinds(keybinds) { + return ipcRenderer.invoke('storage:set-keybinds', keybinds); + }, + + // Sessions (History) + async getAllSessions() { + const result = await ipcRenderer.invoke('storage:get-all-sessions'); + return result.success ? result.data : []; + }, + async getSession(sessionId) { + const result = await ipcRenderer.invoke('storage:get-session', sessionId); + return result.success ? result.data : null; + }, + async saveSession(sessionId, data) { + return ipcRenderer.invoke('storage:save-session', sessionId, data); + }, + async deleteSession(sessionId) { + return ipcRenderer.invoke('storage:delete-session', sessionId); + }, + async deleteAllSessions() { + return ipcRenderer.invoke('storage:delete-all-sessions'); + }, + + // Clear all + async clearAll() { + return ipcRenderer.invoke('storage:clear-all'); + }, + + // Limits + async getTodayLimits() { + const result = await ipcRenderer.invoke('storage:get-today-limits'); + return result.success ? result.data : { flash: { count: 0 }, flashLite: { count: 0 } }; + } +}; + +// Cache for preferences to avoid async calls in hot paths +let preferencesCache = null; + +async function loadPreferencesCache() { + preferencesCache = await storage.getPreferences(); + return preferencesCache; +} + +// Initialize preferences cache +loadPreferencesCache(); + +function convertFloat32ToInt16(float32Array) { + const int16Array = new Int16Array(float32Array.length); + for (let i = 0; i < float32Array.length; i++) { + // Improved scaling to prevent clipping + const s = Math.max(-1, Math.min(1, float32Array[i])); + int16Array[i] = s < 0 ? s * 0x8000 : s * 0x7fff; + } + return int16Array; +} + +function arrayBufferToBase64(buffer) { + let binary = ''; + const bytes = new Uint8Array(buffer); + const len = bytes.byteLength; + for (let i = 0; i < len; i++) { + binary += String.fromCharCode(bytes[i]); + } + return btoa(binary); +} + +async function initializeGemini(profile = 'interview', language = 'en-US') { + const prefs = await storage.getPreferences(); + const success = await ipcRenderer.invoke('initialize-ai-session', prefs.customPrompt || '', profile, language); + if (success) { + cheatingDaddy.setStatus('Live'); + } else { + cheatingDaddy.setStatus('error'); + } +} + +// Listen for status updates +ipcRenderer.on('update-status', (event, status) => { + console.log('Status update:', status); + cheatingDaddy.setStatus(status); +}); + +async function startCapture(screenshotIntervalSeconds = 5, imageQuality = 'medium') { + // Store the image quality for manual screenshots + currentImageQuality = imageQuality; + + // Refresh preferences cache + await loadPreferencesCache(); + const audioMode = preferencesCache.audioMode || 'speaker_only'; + + try { + if (isMacOS) { + // On macOS, use SystemAudioDump for audio and getDisplayMedia for screen + console.log('Starting macOS capture with SystemAudioDump...'); + + // Start macOS audio capture + const audioResult = await ipcRenderer.invoke('start-macos-audio'); + if (!audioResult.success) { + throw new Error('Failed to start macOS audio capture: ' + audioResult.error); + } + + // Get screen capture for screenshots + mediaStream = await navigator.mediaDevices.getDisplayMedia({ + video: { + frameRate: 1, + width: { ideal: 1920 }, + height: { ideal: 1080 }, + }, + audio: false, // Don't use browser audio on macOS + }); + + console.log('macOS screen capture started - audio handled by SystemAudioDump'); + + if (audioMode === 'mic_only' || audioMode === 'both') { + let micStream = null; + try { + micStream = await navigator.mediaDevices.getUserMedia({ + audio: { + sampleRate: SAMPLE_RATE, + channelCount: 1, + echoCancellation: true, + noiseSuppression: true, + autoGainControl: true, + }, + video: false, + }); + console.log('macOS microphone capture started'); + setupLinuxMicProcessing(micStream); + } catch (micError) { + console.warn('Failed to get microphone access on macOS:', micError); + } + } + } else if (isLinux) { + // Linux - use display media for screen capture and try to get system audio + try { + // First try to get system audio via getDisplayMedia (works on newer browsers) + mediaStream = await navigator.mediaDevices.getDisplayMedia({ + video: { + frameRate: 1, + width: { ideal: 1920 }, + height: { ideal: 1080 }, + }, + audio: { + sampleRate: SAMPLE_RATE, + channelCount: 1, + echoCancellation: false, // Don't cancel system audio + noiseSuppression: false, + autoGainControl: false, + }, + }); + + console.log('Linux system audio capture via getDisplayMedia succeeded'); + + // Setup audio processing for Linux system audio + setupLinuxSystemAudioProcessing(); + } catch (systemAudioError) { + console.warn('System audio via getDisplayMedia failed, trying screen-only capture:', systemAudioError); + + // Fallback to screen-only capture + mediaStream = await navigator.mediaDevices.getDisplayMedia({ + video: { + frameRate: 1, + width: { ideal: 1920 }, + height: { ideal: 1080 }, + }, + audio: false, + }); + } + + // Additionally get microphone input for Linux based on audio mode + if (audioMode === 'mic_only' || audioMode === 'both') { + let micStream = null; + try { + micStream = await navigator.mediaDevices.getUserMedia({ + audio: { + sampleRate: SAMPLE_RATE, + channelCount: 1, + echoCancellation: true, + noiseSuppression: true, + autoGainControl: true, + }, + video: false, + }); + + console.log('Linux microphone capture started'); + + // Setup audio processing for microphone on Linux + setupLinuxMicProcessing(micStream); + } catch (micError) { + console.warn('Failed to get microphone access on Linux:', micError); + // Continue without microphone if permission denied + } + } + + console.log('Linux capture started - system audio:', mediaStream.getAudioTracks().length > 0, 'microphone mode:', audioMode); + } else { + // Windows - use display media with loopback for system audio + mediaStream = await navigator.mediaDevices.getDisplayMedia({ + video: { + frameRate: 1, + width: { ideal: 1920 }, + height: { ideal: 1080 }, + }, + audio: { + sampleRate: SAMPLE_RATE, + channelCount: 1, + echoCancellation: true, + noiseSuppression: true, + autoGainControl: true, + }, + }); + + console.log('Windows capture started with loopback audio'); + + // Setup audio processing for Windows loopback audio only + setupWindowsLoopbackProcessing(); + + if (audioMode === 'mic_only' || audioMode === 'both') { + let micStream = null; + try { + micStream = await navigator.mediaDevices.getUserMedia({ + audio: { + sampleRate: SAMPLE_RATE, + channelCount: 1, + echoCancellation: true, + noiseSuppression: true, + autoGainControl: true, + }, + video: false, + }); + console.log('Windows microphone capture started'); + setupLinuxMicProcessing(micStream); + } catch (micError) { + console.warn('Failed to get microphone access on Windows:', micError); + } + } + } + + console.log('MediaStream obtained:', { + hasVideo: mediaStream.getVideoTracks().length > 0, + hasAudio: mediaStream.getAudioTracks().length > 0, + videoTrack: mediaStream.getVideoTracks()[0]?.getSettings(), + }); + + // Manual mode only - screenshots captured on demand via shortcut + console.log('Manual mode enabled - screenshots will be captured on demand only'); + } catch (err) { + console.error('Error starting capture:', err); + cheatingDaddy.setStatus('error'); + } +} + +function setupLinuxMicProcessing(micStream) { + // Setup microphone audio processing for Linux + const micAudioContext = new AudioContext({ sampleRate: SAMPLE_RATE }); + const micSource = micAudioContext.createMediaStreamSource(micStream); + const micProcessor = micAudioContext.createScriptProcessor(BUFFER_SIZE, 1, 1); + + let audioBuffer = []; + const samplesPerChunk = SAMPLE_RATE * AUDIO_CHUNK_DURATION; + + micProcessor.onaudioprocess = async e => { + const inputData = e.inputBuffer.getChannelData(0); + audioBuffer.push(...inputData); + + // Process audio in chunks + while (audioBuffer.length >= samplesPerChunk) { + const chunk = audioBuffer.splice(0, samplesPerChunk); + const pcmData16 = convertFloat32ToInt16(chunk); + const base64Data = arrayBufferToBase64(pcmData16.buffer); + + await ipcRenderer.invoke('send-mic-audio-content', { + data: base64Data, + mimeType: 'audio/pcm;rate=24000', + }); + } + }; + + micSource.connect(micProcessor); + micProcessor.connect(micAudioContext.destination); + + // Store processor reference for cleanup + micAudioProcessor = micProcessor; +} + +function setupLinuxSystemAudioProcessing() { + // Setup system audio processing for Linux (from getDisplayMedia) + audioContext = new AudioContext({ sampleRate: SAMPLE_RATE }); + const source = audioContext.createMediaStreamSource(mediaStream); + audioProcessor = audioContext.createScriptProcessor(BUFFER_SIZE, 1, 1); + + let audioBuffer = []; + const samplesPerChunk = SAMPLE_RATE * AUDIO_CHUNK_DURATION; + + audioProcessor.onaudioprocess = async e => { + const inputData = e.inputBuffer.getChannelData(0); + audioBuffer.push(...inputData); + + // Process audio in chunks + while (audioBuffer.length >= samplesPerChunk) { + const chunk = audioBuffer.splice(0, samplesPerChunk); + const pcmData16 = convertFloat32ToInt16(chunk); + const base64Data = arrayBufferToBase64(pcmData16.buffer); + + await ipcRenderer.invoke('send-audio-content', { + data: base64Data, + mimeType: 'audio/pcm;rate=24000', + }); + } + }; + + source.connect(audioProcessor); + audioProcessor.connect(audioContext.destination); +} + +function setupWindowsLoopbackProcessing() { + // Setup audio processing for Windows loopback audio only + audioContext = new AudioContext({ sampleRate: SAMPLE_RATE }); + const source = audioContext.createMediaStreamSource(mediaStream); + audioProcessor = audioContext.createScriptProcessor(BUFFER_SIZE, 1, 1); + + let audioBuffer = []; + const samplesPerChunk = SAMPLE_RATE * AUDIO_CHUNK_DURATION; + + audioProcessor.onaudioprocess = async e => { + const inputData = e.inputBuffer.getChannelData(0); + audioBuffer.push(...inputData); + + // Process audio in chunks + while (audioBuffer.length >= samplesPerChunk) { + const chunk = audioBuffer.splice(0, samplesPerChunk); + const pcmData16 = convertFloat32ToInt16(chunk); + const base64Data = arrayBufferToBase64(pcmData16.buffer); + + await ipcRenderer.invoke('send-audio-content', { + data: base64Data, + mimeType: 'audio/pcm;rate=24000', + }); + } + }; + + source.connect(audioProcessor); + audioProcessor.connect(audioContext.destination); +} + +async function captureScreenshot(imageQuality = 'medium', isManual = false) { + console.log(`Capturing ${isManual ? 'manual' : 'automated'} screenshot...`); + if (!mediaStream) return; + + // Lazy init of video element + if (!hiddenVideo) { + hiddenVideo = document.createElement('video'); + hiddenVideo.srcObject = mediaStream; + hiddenVideo.muted = true; + hiddenVideo.playsInline = true; + await hiddenVideo.play(); + + await new Promise(resolve => { + if (hiddenVideo.readyState >= 2) return resolve(); + hiddenVideo.onloadedmetadata = () => resolve(); + }); + + // Lazy init of canvas based on video dimensions + offscreenCanvas = document.createElement('canvas'); + offscreenCanvas.width = hiddenVideo.videoWidth; + offscreenCanvas.height = hiddenVideo.videoHeight; + offscreenContext = offscreenCanvas.getContext('2d'); + } + + // Check if video is ready + if (hiddenVideo.readyState < 2) { + console.warn('Video not ready yet, skipping screenshot'); + return; + } + + offscreenContext.drawImage(hiddenVideo, 0, 0, offscreenCanvas.width, offscreenCanvas.height); + + // Check if image was drawn properly by sampling a pixel + const imageData = offscreenContext.getImageData(0, 0, 1, 1); + const isBlank = imageData.data.every((value, index) => { + // Check if all pixels are black (0,0,0) or transparent + return index === 3 ? true : value === 0; + }); + + if (isBlank) { + console.warn('Screenshot appears to be blank/black'); + } + + let qualityValue; + switch (imageQuality) { + case 'high': + qualityValue = 0.9; + break; + case 'medium': + qualityValue = 0.7; + break; + case 'low': + qualityValue = 0.5; + break; + default: + qualityValue = 0.7; // Default to medium + } + + offscreenCanvas.toBlob( + async blob => { + if (!blob) { + console.error('Failed to create blob from canvas'); + return; + } + + const reader = new FileReader(); + reader.onloadend = async () => { + const base64data = reader.result.split(',')[1]; + + // Validate base64 data + if (!base64data || base64data.length < 100) { + console.error('Invalid base64 data generated'); + return; + } + + const result = await ipcRenderer.invoke('send-image-content', { + data: base64data, + }); + + if (result.success) { + console.log(`Image sent successfully (${offscreenCanvas.width}x${offscreenCanvas.height})`); + } else { + console.error('Failed to send image:', result.error); + } + }; + reader.readAsDataURL(blob); + }, + 'image/jpeg', + qualityValue + ); +} + +const MANUAL_SCREENSHOT_PROMPT = `Help me on this page, give me the answer no bs, complete answer. +So if its a code question, give me the approach in few bullet points, then the entire code. Also if theres anything else i need to know, tell me. +If its a question about the website, give me the answer no bs, complete answer. +If its a mcq question, give me the answer no bs, complete answer.`; + +async function captureManualScreenshot(imageQuality = null) { + console.log('Manual screenshot triggered'); + const quality = imageQuality || currentImageQuality; + + if (!mediaStream) { + console.error('No media stream available'); + return; + } + + // Lazy init of video element + if (!hiddenVideo) { + hiddenVideo = document.createElement('video'); + hiddenVideo.srcObject = mediaStream; + hiddenVideo.muted = true; + hiddenVideo.playsInline = true; + await hiddenVideo.play(); + + await new Promise(resolve => { + if (hiddenVideo.readyState >= 2) return resolve(); + hiddenVideo.onloadedmetadata = () => resolve(); + }); + + // Lazy init of canvas based on video dimensions + offscreenCanvas = document.createElement('canvas'); + offscreenCanvas.width = hiddenVideo.videoWidth; + offscreenCanvas.height = hiddenVideo.videoHeight; + offscreenContext = offscreenCanvas.getContext('2d'); + } + + // Check if video is ready + if (hiddenVideo.readyState < 2) { + console.warn('Video not ready yet, skipping screenshot'); + return; + } + + offscreenContext.drawImage(hiddenVideo, 0, 0, offscreenCanvas.width, offscreenCanvas.height); + + let qualityValue; + switch (quality) { + case 'high': + qualityValue = 0.9; + break; + case 'medium': + qualityValue = 0.7; + break; + case 'low': + qualityValue = 0.5; + break; + default: + qualityValue = 0.7; + } + + offscreenCanvas.toBlob( + async blob => { + if (!blob) { + console.error('Failed to create blob from canvas'); + return; + } + + const reader = new FileReader(); + reader.onloadend = async () => { + const base64data = reader.result.split(',')[1]; + + if (!base64data || base64data.length < 100) { + console.error('Invalid base64 data generated'); + return; + } + + // Send image with prompt to HTTP API (response streams via IPC events) + const result = await ipcRenderer.invoke('send-image-content', { + data: base64data, + prompt: MANUAL_SCREENSHOT_PROMPT, + }); + + if (result.success) { + console.log(`Image response completed from ${result.model}`); + // Response already displayed via streaming events (new-response/update-response) + } else { + console.error('Failed to get image response:', result.error); + cheatingDaddy.addNewResponse(`Error: ${result.error}`); + } + }; + reader.readAsDataURL(blob); + }, + 'image/jpeg', + qualityValue + ); +} + +// Expose functions to global scope for external access +window.captureManualScreenshot = captureManualScreenshot; + +function stopCapture() { + if (screenshotInterval) { + clearInterval(screenshotInterval); + screenshotInterval = null; + } + + if (audioProcessor) { + audioProcessor.disconnect(); + audioProcessor = null; + } + + // Clean up microphone audio processor (Linux only) + if (micAudioProcessor) { + micAudioProcessor.disconnect(); + micAudioProcessor = null; + } + + if (audioContext) { + audioContext.close(); + audioContext = null; + } + + if (mediaStream) { + mediaStream.getTracks().forEach(track => track.stop()); + mediaStream = null; + } + + // Stop macOS audio capture if running + if (isMacOS) { + ipcRenderer.invoke('stop-macos-audio').catch(err => { + console.error('Error stopping macOS audio:', err); + }); + } + + // Clean up hidden elements + if (hiddenVideo) { + hiddenVideo.pause(); + hiddenVideo.srcObject = null; + hiddenVideo = null; + } + offscreenCanvas = null; + offscreenContext = null; +} + +// Send text message to Gemini +async function sendTextMessage(text) { + if (!text || text.trim().length === 0) { + console.warn('Cannot send empty text message'); + return { success: false, error: 'Empty message' }; + } + + try { + const result = await ipcRenderer.invoke('send-text-message', text); + if (result.success) { + console.log('Text message sent successfully'); + } else { + console.error('Failed to send text message:', result.error); + } + return result; + } catch (error) { + console.error('Error sending text message:', error); + return { success: false, error: error.message }; + } +} + +// Listen for conversation data from main process and save to storage +ipcRenderer.on('save-conversation-turn', async (event, data) => { + try { + await storage.saveSession(data.sessionId, { conversationHistory: data.fullHistory }); + console.log('Conversation session saved:', data.sessionId); + } catch (error) { + console.error('Error saving conversation session:', error); + } +}); + +// Listen for session context (profile info) when session starts +ipcRenderer.on('save-session-context', async (event, data) => { + try { + await storage.saveSession(data.sessionId, { + profile: data.profile, + customPrompt: data.customPrompt + }); + console.log('Session context saved:', data.sessionId, 'profile:', data.profile); + } catch (error) { + console.error('Error saving session context:', error); + } +}); + +// Listen for screen analysis responses (from ctrl+enter) +ipcRenderer.on('save-screen-analysis', async (event, data) => { + try { + await storage.saveSession(data.sessionId, { + screenAnalysisHistory: data.fullHistory, + profile: data.profile, + customPrompt: data.customPrompt + }); + console.log('Screen analysis saved:', data.sessionId); + } catch (error) { + console.error('Error saving screen analysis:', error); + } +}); + +// Listen for emergency erase command from main process +ipcRenderer.on('clear-sensitive-data', async () => { + console.log('Clearing all data...'); + await storage.clearAll(); +}); + +// Handle shortcuts based on current view +function handleShortcut(shortcutKey) { + const currentView = cheatingDaddy.getCurrentView(); + + if (shortcutKey === 'ctrl+enter' || shortcutKey === 'cmd+enter') { + if (currentView === 'main') { + cheatingDaddy.element().handleStart(); + } else { + captureManualScreenshot(); + } + } +} + +// Create reference to the main app element +const cheatingDaddyApp = document.querySelector('cheating-daddy-app'); + +// ============ THEME SYSTEM ============ +const theme = { + themes: { + dark: { + background: '#1e1e1e', + text: '#e0e0e0', textSecondary: '#a0a0a0', textMuted: '#6b6b6b', + border: '#333333', accent: '#ffffff', + btnPrimaryBg: '#ffffff', btnPrimaryText: '#000000', btnPrimaryHover: '#e0e0e0', + tooltipBg: '#1a1a1a', tooltipText: '#ffffff', + keyBg: 'rgba(255,255,255,0.1)' + }, + light: { + background: '#ffffff', + text: '#1a1a1a', textSecondary: '#555555', textMuted: '#888888', + border: '#e0e0e0', accent: '#000000', + btnPrimaryBg: '#1a1a1a', btnPrimaryText: '#ffffff', btnPrimaryHover: '#333333', + tooltipBg: '#1a1a1a', tooltipText: '#ffffff', + keyBg: 'rgba(0,0,0,0.1)' + }, + midnight: { + background: '#0d1117', + text: '#c9d1d9', textSecondary: '#8b949e', textMuted: '#6e7681', + border: '#30363d', accent: '#58a6ff', + btnPrimaryBg: '#58a6ff', btnPrimaryText: '#0d1117', btnPrimaryHover: '#79b8ff', + tooltipBg: '#161b22', tooltipText: '#c9d1d9', + keyBg: 'rgba(88,166,255,0.15)' + }, + sepia: { + background: '#f4ecd8', + text: '#5c4b37', textSecondary: '#7a6a56', textMuted: '#998875', + border: '#d4c8b0', accent: '#8b4513', + btnPrimaryBg: '#5c4b37', btnPrimaryText: '#f4ecd8', btnPrimaryHover: '#7a6a56', + tooltipBg: '#5c4b37', tooltipText: '#f4ecd8', + keyBg: 'rgba(92,75,55,0.15)' + }, + nord: { + background: '#2e3440', + text: '#eceff4', textSecondary: '#d8dee9', textMuted: '#4c566a', + border: '#3b4252', accent: '#88c0d0', + btnPrimaryBg: '#88c0d0', btnPrimaryText: '#2e3440', btnPrimaryHover: '#8fbcbb', + tooltipBg: '#3b4252', tooltipText: '#eceff4', + keyBg: 'rgba(136,192,208,0.15)' + }, + dracula: { + background: '#282a36', + text: '#f8f8f2', textSecondary: '#bd93f9', textMuted: '#6272a4', + border: '#44475a', accent: '#ff79c6', + btnPrimaryBg: '#ff79c6', btnPrimaryText: '#282a36', btnPrimaryHover: '#ff92d0', + tooltipBg: '#44475a', tooltipText: '#f8f8f2', + keyBg: 'rgba(255,121,198,0.15)' + }, + abyss: { + background: '#0a0a0a', + text: '#d4d4d4', textSecondary: '#808080', textMuted: '#505050', + border: '#1a1a1a', accent: '#ffffff', + btnPrimaryBg: '#ffffff', btnPrimaryText: '#0a0a0a', btnPrimaryHover: '#d4d4d4', + tooltipBg: '#141414', tooltipText: '#d4d4d4', + keyBg: 'rgba(255,255,255,0.08)' + } + }, + + current: 'dark', + + get(name) { + return this.themes[name] || this.themes.dark; + }, + + getAll() { + const names = { + dark: 'Dark', + light: 'Light', + midnight: 'Midnight Blue', + sepia: 'Sepia', + nord: 'Nord', + dracula: 'Dracula', + abyss: 'Abyss' + }; + return Object.keys(this.themes).map(key => ({ + value: key, + name: names[key] || key, + colors: this.themes[key] + })); + }, + + hexToRgb(hex) { + const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); + return result ? { + r: parseInt(result[1], 16), + g: parseInt(result[2], 16), + b: parseInt(result[3], 16) + } : { r: 30, g: 30, b: 30 }; + }, + + lightenColor(rgb, amount) { + return { + r: Math.min(255, rgb.r + amount), + g: Math.min(255, rgb.g + amount), + b: Math.min(255, rgb.b + amount) + }; + }, + + darkenColor(rgb, amount) { + return { + r: Math.max(0, rgb.r - amount), + g: Math.max(0, rgb.g - amount), + b: Math.max(0, rgb.b - amount) + }; + }, + + applyBackgrounds(backgroundColor, alpha = 0.8) { + const root = document.documentElement; + const baseRgb = this.hexToRgb(backgroundColor); + + // For light themes, darken; for dark themes, lighten + const isLight = (baseRgb.r + baseRgb.g + baseRgb.b) / 3 > 128; + const adjust = isLight ? this.darkenColor.bind(this) : this.lightenColor.bind(this); + + const secondary = adjust(baseRgb, 7); + const tertiary = adjust(baseRgb, 15); + const hover = adjust(baseRgb, 20); + + root.style.setProperty('--header-background', `rgba(${baseRgb.r}, ${baseRgb.g}, ${baseRgb.b}, ${alpha})`); + root.style.setProperty('--main-content-background', `rgba(${baseRgb.r}, ${baseRgb.g}, ${baseRgb.b}, ${alpha})`); + root.style.setProperty('--bg-primary', `rgba(${baseRgb.r}, ${baseRgb.g}, ${baseRgb.b}, ${alpha})`); + root.style.setProperty('--bg-secondary', `rgba(${secondary.r}, ${secondary.g}, ${secondary.b}, ${alpha})`); + root.style.setProperty('--bg-tertiary', `rgba(${tertiary.r}, ${tertiary.g}, ${tertiary.b}, ${alpha})`); + root.style.setProperty('--bg-hover', `rgba(${hover.r}, ${hover.g}, ${hover.b}, ${alpha})`); + root.style.setProperty('--input-background', `rgba(${tertiary.r}, ${tertiary.g}, ${tertiary.b}, ${alpha})`); + root.style.setProperty('--input-focus-background', `rgba(${tertiary.r}, ${tertiary.g}, ${tertiary.b}, ${alpha})`); + root.style.setProperty('--hover-background', `rgba(${hover.r}, ${hover.g}, ${hover.b}, ${alpha})`); + root.style.setProperty('--scrollbar-background', `rgba(${baseRgb.r}, ${baseRgb.g}, ${baseRgb.b}, ${alpha})`); + }, + + apply(themeName, alpha = 0.8) { + const colors = this.get(themeName); + this.current = themeName; + const root = document.documentElement; + + // Text colors + root.style.setProperty('--text-color', colors.text); + root.style.setProperty('--text-secondary', colors.textSecondary); + root.style.setProperty('--text-muted', colors.textMuted); + // Border colors + root.style.setProperty('--border-color', colors.border); + root.style.setProperty('--border-default', colors.accent); + // Misc + root.style.setProperty('--placeholder-color', colors.textMuted); + root.style.setProperty('--scrollbar-thumb', colors.border); + root.style.setProperty('--scrollbar-thumb-hover', colors.textMuted); + root.style.setProperty('--key-background', colors.keyBg); + // Primary button + root.style.setProperty('--btn-primary-bg', colors.btnPrimaryBg); + root.style.setProperty('--btn-primary-text', colors.btnPrimaryText); + root.style.setProperty('--btn-primary-hover', colors.btnPrimaryHover); + // Start button (same as primary) + root.style.setProperty('--start-button-background', colors.btnPrimaryBg); + root.style.setProperty('--start-button-color', colors.btnPrimaryText); + root.style.setProperty('--start-button-hover-background', colors.btnPrimaryHover); + // Tooltip + root.style.setProperty('--tooltip-bg', colors.tooltipBg); + root.style.setProperty('--tooltip-text', colors.tooltipText); + // Error color (stays constant) + root.style.setProperty('--error-color', '#f14c4c'); + root.style.setProperty('--success-color', '#4caf50'); + + // Also apply background colors from theme + this.applyBackgrounds(colors.background, alpha); + }, + + async load() { + try { + const prefs = await storage.getPreferences(); + const themeName = prefs.theme || 'dark'; + const alpha = prefs.backgroundTransparency ?? 0.8; + this.apply(themeName, alpha); + return themeName; + } catch (err) { + this.apply('dark'); + return 'dark'; + } + }, + + async save(themeName) { + await storage.updatePreference('theme', themeName); + this.apply(themeName); + } +}; + +// Consolidated cheatingDaddy object - all functions in one place +const cheatingDaddy = { + // App version + getVersion: async () => ipcRenderer.invoke('get-app-version'), + + // Element access + element: () => cheatingDaddyApp, + e: () => cheatingDaddyApp, + + // App state functions - access properties directly from the app element + getCurrentView: () => cheatingDaddyApp.currentView, + getLayoutMode: () => cheatingDaddyApp.layoutMode, + + // Status and response functions + setStatus: text => cheatingDaddyApp.setStatus(text), + addNewResponse: response => cheatingDaddyApp.addNewResponse(response), + updateCurrentResponse: response => cheatingDaddyApp.updateCurrentResponse(response), + + // Core functionality + initializeGemini, + startCapture, + stopCapture, + sendTextMessage, + handleShortcut, + + // Storage API + storage, + + // Theme API + theme, + + // Refresh preferences cache (call after updating preferences) + refreshPreferencesCache: loadPreferencesCache, + + // Platform detection + isLinux: isLinux, + isMacOS: isMacOS, +}; + +// Make it globally available +window.cheatingDaddy = cheatingDaddy; + +// Load theme after DOM is ready +if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', () => theme.load()); +} else { + theme.load(); +} diff --git a/src/utils/window.js b/src/utils/window.js new file mode 100644 index 0000000..efe0e37 --- /dev/null +++ b/src/utils/window.js @@ -0,0 +1,503 @@ +const { BrowserWindow, globalShortcut, ipcMain, screen } = require('electron'); +const path = require('node:path'); +const fs = require('node:fs'); +const os = require('os'); +const storage = require('../storage'); + +let mouseEventsIgnored = false; +let windowResizing = false; +let resizeAnimation = null; +const RESIZE_ANIMATION_DURATION = 500; // milliseconds + +function createWindow(sendToRenderer, geminiSessionRef) { + // Get layout preference (default to 'normal') + let windowWidth = 1100; + let windowHeight = 800; + + const mainWindow = new BrowserWindow({ + width: windowWidth, + height: windowHeight, + frame: false, + transparent: true, + hasShadow: false, + alwaysOnTop: true, + webPreferences: { + nodeIntegration: true, + contextIsolation: false, // TODO: change to true + backgroundThrottling: false, + enableBlinkFeatures: 'GetDisplayMedia', + webSecurity: true, + allowRunningInsecureContent: false, + }, + backgroundColor: '#00000000', + }); + + const { session, desktopCapturer } = require('electron'); + session.defaultSession.setDisplayMediaRequestHandler( + (request, callback) => { + desktopCapturer.getSources({ types: ['screen'] }).then(sources => { + callback({ video: sources[0], audio: 'loopback' }); + }); + }, + { useSystemPicker: true } + ); + + mainWindow.setResizable(false); + mainWindow.setContentProtection(true); + mainWindow.setVisibleOnAllWorkspaces(true, { visibleOnFullScreen: true }); + + // Hide from Windows taskbar + if (process.platform === 'win32') { + try { + mainWindow.setSkipTaskbar(true); + console.log('Hidden from Windows taskbar'); + } catch (error) { + console.warn('Could not hide from taskbar:', error.message); + } + } + + // Hide from Mission Control on macOS + if (process.platform === 'darwin') { + try { + mainWindow.setHiddenInMissionControl(true); + console.log('Hidden from macOS Mission Control'); + } catch (error) { + console.warn('Could not hide from Mission Control:', error.message); + } + } + + // Center window at the top of the screen + const primaryDisplay = screen.getPrimaryDisplay(); + const { width: screenWidth } = primaryDisplay.workAreaSize; + const x = Math.floor((screenWidth - windowWidth) / 2); + const y = 0; + mainWindow.setPosition(x, y); + + if (process.platform === 'win32') { + mainWindow.setAlwaysOnTop(true, 'screen-saver', 1); + } + + mainWindow.loadFile(path.join(__dirname, '../index.html')); + + // After window is created, initialize keybinds + mainWindow.webContents.once('dom-ready', () => { + setTimeout(() => { + const defaultKeybinds = getDefaultKeybinds(); + let keybinds = defaultKeybinds; + + // Load keybinds from storage + const savedKeybinds = storage.getKeybinds(); + if (savedKeybinds) { + keybinds = { ...defaultKeybinds, ...savedKeybinds }; + } + + updateGlobalShortcuts(keybinds, mainWindow, sendToRenderer, geminiSessionRef); + }, 150); + }); + + setupWindowIpcHandlers(mainWindow, sendToRenderer, geminiSessionRef); + + return mainWindow; +} + +function getDefaultKeybinds() { + const isMac = process.platform === 'darwin'; + return { + moveUp: isMac ? 'Alt+Up' : 'Ctrl+Up', + moveDown: isMac ? 'Alt+Down' : 'Ctrl+Down', + moveLeft: isMac ? 'Alt+Left' : 'Ctrl+Left', + moveRight: isMac ? 'Alt+Right' : 'Ctrl+Right', + toggleVisibility: isMac ? 'Cmd+\\' : 'Ctrl+\\', + toggleClickThrough: isMac ? 'Cmd+M' : 'Ctrl+M', + nextStep: isMac ? 'Cmd+Enter' : 'Ctrl+Enter', + previousResponse: isMac ? 'Cmd+[' : 'Ctrl+[', + nextResponse: isMac ? 'Cmd+]' : 'Ctrl+]', + scrollUp: isMac ? 'Cmd+Shift+Up' : 'Ctrl+Shift+Up', + scrollDown: isMac ? 'Cmd+Shift+Down' : 'Ctrl+Shift+Down', + emergencyErase: isMac ? 'Cmd+Shift+E' : 'Ctrl+Shift+E', + }; +} + +function updateGlobalShortcuts(keybinds, mainWindow, sendToRenderer, geminiSessionRef) { + console.log('Updating global shortcuts with:', keybinds); + + // Unregister all existing shortcuts + globalShortcut.unregisterAll(); + + const primaryDisplay = screen.getPrimaryDisplay(); + const { width, height } = primaryDisplay.workAreaSize; + const moveIncrement = Math.floor(Math.min(width, height) * 0.1); + + // Register window movement shortcuts + const movementActions = { + moveUp: () => { + if (!mainWindow.isVisible()) return; + const [currentX, currentY] = mainWindow.getPosition(); + mainWindow.setPosition(currentX, currentY - moveIncrement); + }, + moveDown: () => { + if (!mainWindow.isVisible()) return; + const [currentX, currentY] = mainWindow.getPosition(); + mainWindow.setPosition(currentX, currentY + moveIncrement); + }, + moveLeft: () => { + if (!mainWindow.isVisible()) return; + const [currentX, currentY] = mainWindow.getPosition(); + mainWindow.setPosition(currentX - moveIncrement, currentY); + }, + moveRight: () => { + if (!mainWindow.isVisible()) return; + const [currentX, currentY] = mainWindow.getPosition(); + mainWindow.setPosition(currentX + moveIncrement, currentY); + }, + }; + + // Register each movement shortcut + Object.keys(movementActions).forEach(action => { + const keybind = keybinds[action]; + if (keybind) { + try { + globalShortcut.register(keybind, movementActions[action]); + console.log(`Registered ${action}: ${keybind}`); + } catch (error) { + console.error(`Failed to register ${action} (${keybind}):`, error); + } + } + }); + + // Register toggle visibility shortcut + if (keybinds.toggleVisibility) { + try { + globalShortcut.register(keybinds.toggleVisibility, () => { + if (mainWindow.isVisible()) { + mainWindow.hide(); + } else { + mainWindow.showInactive(); + } + }); + console.log(`Registered toggleVisibility: ${keybinds.toggleVisibility}`); + } catch (error) { + console.error(`Failed to register toggleVisibility (${keybinds.toggleVisibility}):`, error); + } + } + + // Register toggle click-through shortcut + if (keybinds.toggleClickThrough) { + try { + globalShortcut.register(keybinds.toggleClickThrough, () => { + mouseEventsIgnored = !mouseEventsIgnored; + if (mouseEventsIgnored) { + mainWindow.setIgnoreMouseEvents(true, { forward: true }); + console.log('Mouse events ignored'); + } else { + mainWindow.setIgnoreMouseEvents(false); + console.log('Mouse events enabled'); + } + mainWindow.webContents.send('click-through-toggled', mouseEventsIgnored); + }); + console.log(`Registered toggleClickThrough: ${keybinds.toggleClickThrough}`); + } catch (error) { + console.error(`Failed to register toggleClickThrough (${keybinds.toggleClickThrough}):`, error); + } + } + + // Register next step shortcut (either starts session or takes screenshot based on view) + if (keybinds.nextStep) { + try { + globalShortcut.register(keybinds.nextStep, async () => { + console.log('Next step shortcut triggered'); + try { + // Determine the shortcut key format + const isMac = process.platform === 'darwin'; + const shortcutKey = isMac ? 'cmd+enter' : 'ctrl+enter'; + + // Use the new handleShortcut function + mainWindow.webContents.executeJavaScript(` + cheatingDaddy.handleShortcut('${shortcutKey}'); + `); + } catch (error) { + console.error('Error handling next step shortcut:', error); + } + }); + console.log(`Registered nextStep: ${keybinds.nextStep}`); + } catch (error) { + console.error(`Failed to register nextStep (${keybinds.nextStep}):`, error); + } + } + + // Register previous response shortcut + if (keybinds.previousResponse) { + try { + globalShortcut.register(keybinds.previousResponse, () => { + console.log('Previous response shortcut triggered'); + sendToRenderer('navigate-previous-response'); + }); + console.log(`Registered previousResponse: ${keybinds.previousResponse}`); + } catch (error) { + console.error(`Failed to register previousResponse (${keybinds.previousResponse}):`, error); + } + } + + // Register next response shortcut + if (keybinds.nextResponse) { + try { + globalShortcut.register(keybinds.nextResponse, () => { + console.log('Next response shortcut triggered'); + sendToRenderer('navigate-next-response'); + }); + console.log(`Registered nextResponse: ${keybinds.nextResponse}`); + } catch (error) { + console.error(`Failed to register nextResponse (${keybinds.nextResponse}):`, error); + } + } + + // Register scroll up shortcut + if (keybinds.scrollUp) { + try { + globalShortcut.register(keybinds.scrollUp, () => { + console.log('Scroll up shortcut triggered'); + sendToRenderer('scroll-response-up'); + }); + console.log(`Registered scrollUp: ${keybinds.scrollUp}`); + } catch (error) { + console.error(`Failed to register scrollUp (${keybinds.scrollUp}):`, error); + } + } + + // Register scroll down shortcut + if (keybinds.scrollDown) { + try { + globalShortcut.register(keybinds.scrollDown, () => { + console.log('Scroll down shortcut triggered'); + sendToRenderer('scroll-response-down'); + }); + console.log(`Registered scrollDown: ${keybinds.scrollDown}`); + } catch (error) { + console.error(`Failed to register scrollDown (${keybinds.scrollDown}):`, error); + } + } + + // Register emergency erase shortcut + if (keybinds.emergencyErase) { + try { + globalShortcut.register(keybinds.emergencyErase, () => { + console.log('Emergency Erase triggered!'); + if (mainWindow && !mainWindow.isDestroyed()) { + mainWindow.hide(); + + if (geminiSessionRef.current) { + geminiSessionRef.current.close(); + geminiSessionRef.current = null; + } + + sendToRenderer('clear-sensitive-data'); + + setTimeout(() => { + const { app } = require('electron'); + app.quit(); + }, 300); + } + }); + console.log(`Registered emergencyErase: ${keybinds.emergencyErase}`); + } catch (error) { + console.error(`Failed to register emergencyErase (${keybinds.emergencyErase}):`, error); + } + } +} + +function setupWindowIpcHandlers(mainWindow, sendToRenderer, geminiSessionRef) { + ipcMain.on('view-changed', (event, view) => { + if (view !== 'assistant' && !mainWindow.isDestroyed()) { + mainWindow.setIgnoreMouseEvents(false); + } + }); + + ipcMain.handle('window-minimize', () => { + if (!mainWindow.isDestroyed()) { + mainWindow.minimize(); + } + }); + + ipcMain.on('update-keybinds', (event, newKeybinds) => { + if (!mainWindow.isDestroyed()) { + updateGlobalShortcuts(newKeybinds, mainWindow, sendToRenderer, geminiSessionRef); + } + }); + + ipcMain.handle('toggle-window-visibility', async event => { + try { + if (mainWindow.isDestroyed()) { + return { success: false, error: 'Window has been destroyed' }; + } + + if (mainWindow.isVisible()) { + mainWindow.hide(); + } else { + mainWindow.showInactive(); + } + return { success: true }; + } catch (error) { + console.error('Error toggling window visibility:', error); + return { success: false, error: error.message }; + } + }); + + function animateWindowResize(mainWindow, targetWidth, targetHeight, layoutMode) { + return new Promise(resolve => { + // Check if window is destroyed before starting animation + if (mainWindow.isDestroyed()) { + console.log('Cannot animate resize: window has been destroyed'); + resolve(); + return; + } + + // Clear any existing animation + if (resizeAnimation) { + clearInterval(resizeAnimation); + resizeAnimation = null; + } + + const [startWidth, startHeight] = mainWindow.getSize(); + + // If already at target size, no need to animate + if (startWidth === targetWidth && startHeight === targetHeight) { + console.log(`Window already at target size for ${layoutMode} mode`); + resolve(); + return; + } + + console.log(`Starting animated resize from ${startWidth}x${startHeight} to ${targetWidth}x${targetHeight}`); + + windowResizing = true; + mainWindow.setResizable(true); + + const frameRate = 60; // 60 FPS + const totalFrames = Math.floor(RESIZE_ANIMATION_DURATION / (1000 / frameRate)); + let currentFrame = 0; + + const widthDiff = targetWidth - startWidth; + const heightDiff = targetHeight - startHeight; + + resizeAnimation = setInterval(() => { + currentFrame++; + const progress = currentFrame / totalFrames; + + // Use easing function (ease-out) + const easedProgress = 1 - Math.pow(1 - progress, 3); + + const currentWidth = Math.round(startWidth + widthDiff * easedProgress); + const currentHeight = Math.round(startHeight + heightDiff * easedProgress); + + if (!mainWindow || mainWindow.isDestroyed()) { + clearInterval(resizeAnimation); + resizeAnimation = null; + windowResizing = false; + return; + } + mainWindow.setSize(currentWidth, currentHeight); + + // Re-center the window during animation + const primaryDisplay = screen.getPrimaryDisplay(); + const { width: screenWidth } = primaryDisplay.workAreaSize; + const x = Math.floor((screenWidth - currentWidth) / 2); + const y = 0; + mainWindow.setPosition(x, y); + + if (currentFrame >= totalFrames) { + clearInterval(resizeAnimation); + resizeAnimation = null; + windowResizing = false; + + // Check if window is still valid before final operations + if (!mainWindow.isDestroyed()) { + mainWindow.setResizable(false); + + // Ensure final size is exact + mainWindow.setSize(targetWidth, targetHeight); + const finalX = Math.floor((screenWidth - targetWidth) / 2); + mainWindow.setPosition(finalX, 0); + } + + console.log(`Animation complete: ${targetWidth}x${targetHeight}`); + resolve(); + } + }, 1000 / frameRate); + }); + } + + ipcMain.handle('update-sizes', async event => { + try { + if (mainWindow.isDestroyed()) { + return { success: false, error: 'Window has been destroyed' }; + } + + // Get current view and layout mode from renderer + let viewName, layoutMode; + try { + viewName = await event.sender.executeJavaScript('cheatingDaddy.getCurrentView()'); + layoutMode = await event.sender.executeJavaScript('cheatingDaddy.getLayoutMode()'); + } catch (error) { + console.warn('Failed to get view/layout from renderer, using defaults:', error); + viewName = 'main'; + layoutMode = 'normal'; + } + + console.log('Size update requested for view:', viewName, 'layout:', layoutMode); + + let targetWidth, targetHeight; + + // Determine base size from layout mode + const baseWidth = layoutMode === 'compact' ? 700 : 900; + const baseHeight = layoutMode === 'compact' ? 500 : 600; + + // Adjust height based on view + switch (viewName) { + case 'main': + targetWidth = baseWidth; + targetHeight = layoutMode === 'compact' ? 320 : 400; + break; + case 'customize': + case 'settings': + targetWidth = baseWidth; + targetHeight = layoutMode === 'compact' ? 700 : 800; + break; + case 'help': + targetWidth = baseWidth; + targetHeight = layoutMode === 'compact' ? 650 : 750; + break; + case 'history': + targetWidth = baseWidth; + targetHeight = layoutMode === 'compact' ? 650 : 750; + break; + case 'assistant': + case 'onboarding': + default: + targetWidth = baseWidth; + targetHeight = baseHeight; + break; + } + + const [currentWidth, currentHeight] = mainWindow.getSize(); + console.log('Current window size:', currentWidth, 'x', currentHeight); + + // If currently resizing, the animation will start from current position + if (windowResizing) { + console.log('Interrupting current resize animation'); + } + + await animateWindowResize(mainWindow, targetWidth, targetHeight, `${viewName} view (${layoutMode})`); + + return { success: true }; + } catch (error) { + console.error('Error updating sizes:', error); + return { success: false, error: error.message }; + } + }); +} + +module.exports = { + createWindow, + getDefaultKeybinds, + updateGlobalShortcuts, + setupWindowIpcHandlers, +}; diff --git a/src/utils/windowResize.js b/src/utils/windowResize.js new file mode 100644 index 0000000..bffea90 --- /dev/null +++ b/src/utils/windowResize.js @@ -0,0 +1,15 @@ +export async function resizeLayout() { + try { + if (window.require) { + const { ipcRenderer } = window.require('electron'); + const result = await ipcRenderer.invoke('update-sizes'); + if (result.success) { + console.log('Window resized for current view'); + } else { + console.error('Failed to resize window:', result.error); + } + } + } catch (error) { + console.error('Error resizing window:', error); + } +} \ No newline at end of file