From 55345281a969867587aa18b6cb1b0c63dbdea0a7 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 2 Sep 2024 01:27:51 +0200 Subject: [PATCH 1/6] Removed `package-lock.json` --- package-lock.json | 1050 --------------------------------------------- 1 file changed, 1050 deletions(-) delete mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index ac511dd..0000000 --- a/package-lock.json +++ /dev/null @@ -1,1050 +0,0 @@ -{ - "name": "@DurtyFree/altv-nativeui", - "version": "1.4.4", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "@DurtyFree/altv-nativeui", - "version": "1.4.4", - "license": "Apache-2.0", - "devDependencies": { - "@altv/types-client": "^1.7.5", - "@altv/types-natives": "^1.4.2", - "@altv/types-shared": "^1.0.1", - "@types/node": "^14.17.5", - "rollup": "^2.53.2", - "rollup-plugin-terser": "^6.1.0", - "rollup-plugin-typescript2": "^0.27.3", - "typescript": "^3.9.10" - } - }, - "node_modules/@altv/types-client": { - "version": "1.9.9", - "resolved": "https://registry.npmjs.org/@altv/types-client/-/types-client-1.9.9.tgz", - "integrity": "sha512-9cTBQnvcMzIi5+jX7heHruu85R7gru1nmQj75aorJt5sTVR4bH3zwXH688F+EOf0hE9EuuYVV2uwR23rqjg/fQ==", - "dev": true, - "peerDependencies": { - "@altv/types-shared": "1.1.x", - "@altv/types-worker": "1.0.x" - } - }, - "node_modules/@altv/types-natives": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/@altv/types-natives/-/types-natives-1.4.8.tgz", - "integrity": "sha512-WkyKCd1QLW94cNkq/KMbl+pZyXGxFDkRlnDhpwWmPlZwwQrGZkgHvj35vVa0QMfN8L53lCiaLPNJolX030oeuA==", - "dev": true, - "peerDependencies": { - "@altv/types-client": ">=1.7.0" - } - }, - "node_modules/@altv/types-shared": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@altv/types-shared/-/types-shared-1.1.9.tgz", - "integrity": "sha512-j1xVqKzMcK5UJd7BtY9TfjNX5laAzRrlswAMij7gWmBYu356y6Wsn/8NwYmtXWXZHS7+4EpevQA0ChtkQZx8bQ==", - "dev": true - }, - "node_modules/@altv/types-worker": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@altv/types-worker/-/types-worker-1.0.7.tgz", - "integrity": "sha512-mImzn79l5w1/T16sZU0F7pI/hehY84tUe0PNu5Q/1S0B2OsINntAFU/RxLIe5XhSepVg0zlF2ZaISZfLcdQlLA==", - "dev": true, - "peer": true, - "peerDependencies": { - "@altv/types-client": "latest" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@rollup/pluginutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", - "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", - "dev": true, - "dependencies": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" - }, - "engines": { - "node": ">= 8.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0" - } - }, - "node_modules/@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", - "dev": true - }, - "node_modules/@types/node": { - "version": "14.18.34", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.34.tgz", - "integrity": "sha512-hcU9AIQVHmPnmjRK+XUUYlILlr9pQrsqSrwov/JK1pnf3GTQowVBhx54FbvM0AU/VXGH4i3+vgXS5EguR7fysA==", - "dev": true - }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", - "dev": true - }, - "node_modules/find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", - "dev": true, - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true - }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/jest-worker": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", - "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", - "dev": true, - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/jest-worker/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", - "dev": true, - "dependencies": { - "path-parse": "^1.0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/rollup": { - "version": "2.79.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", - "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", - "dev": true, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=10.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/rollup-plugin-terser": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-6.1.0.tgz", - "integrity": "sha512-4fB3M9nuoWxrwm39habpd4hvrbrde2W2GG4zEGPQg1YITNkM3Tqur5jSuXlWNzbv/2aMLJ+dZJaySc3GCD8oDw==", - "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.8.3", - "jest-worker": "^26.0.0", - "serialize-javascript": "^3.0.0", - "terser": "^4.7.0" - }, - "peerDependencies": { - "rollup": "^2.0.0" - } - }, - "node_modules/rollup-plugin-typescript2": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.27.3.tgz", - "integrity": "sha512-gmYPIFmALj9D3Ga1ZbTZAKTXq1JKlTQBtj299DXhqYz9cL3g/AQfUvbb2UhH+Nf++cCq941W2Mv7UcrcgLzJJg==", - "dev": true, - "dependencies": { - "@rollup/pluginutils": "^3.1.0", - "find-cache-dir": "^3.3.1", - "fs-extra": "8.1.0", - "resolve": "1.17.0", - "tslib": "2.0.1" - }, - "peerDependencies": { - "rollup": ">=1.26.3", - "typescript": ">=2.4.0" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/serialize-javascript": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.1.0.tgz", - "integrity": "sha512-JIJT1DGiWmIKhzRsG91aS6Ze4sFUrYbltlkg2onR5OrnNM02Kl/hnY/T4FN2omvyeBbQmMJv+K4cPOpGzOTFBg==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/terser": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.1.tgz", - "integrity": "sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw==", - "dev": true, - "dependencies": { - "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==", - "dev": true - }, - "node_modules/typescript": { - "version": "3.9.10", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", - "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - } - }, - "dependencies": { - "@altv/types-client": { - "version": "1.9.9", - "resolved": "https://registry.npmjs.org/@altv/types-client/-/types-client-1.9.9.tgz", - "integrity": "sha512-9cTBQnvcMzIi5+jX7heHruu85R7gru1nmQj75aorJt5sTVR4bH3zwXH688F+EOf0hE9EuuYVV2uwR23rqjg/fQ==", - "dev": true, - "requires": {} - }, - "@altv/types-natives": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/@altv/types-natives/-/types-natives-1.4.8.tgz", - "integrity": "sha512-WkyKCd1QLW94cNkq/KMbl+pZyXGxFDkRlnDhpwWmPlZwwQrGZkgHvj35vVa0QMfN8L53lCiaLPNJolX030oeuA==", - "dev": true, - "requires": {} - }, - "@altv/types-shared": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@altv/types-shared/-/types-shared-1.1.9.tgz", - "integrity": "sha512-j1xVqKzMcK5UJd7BtY9TfjNX5laAzRrlswAMij7gWmBYu356y6Wsn/8NwYmtXWXZHS7+4EpevQA0ChtkQZx8bQ==", - "dev": true - }, - "@altv/types-worker": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@altv/types-worker/-/types-worker-1.0.7.tgz", - "integrity": "sha512-mImzn79l5w1/T16sZU0F7pI/hehY84tUe0PNu5Q/1S0B2OsINntAFU/RxLIe5XhSepVg0zlF2ZaISZfLcdQlLA==", - "dev": true, - "peer": true, - "requires": {} - }, - "@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", - "dev": true, - "requires": { - "@babel/highlight": "^7.18.6" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", - "dev": true - }, - "@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "@rollup/pluginutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", - "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", - "dev": true, - "requires": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" - } - }, - "@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", - "dev": true - }, - "@types/node": { - "version": "14.18.34", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.34.tgz", - "integrity": "sha512-hcU9AIQVHmPnmjRK+XUUYlILlr9pQrsqSrwov/JK1pnf3GTQowVBhx54FbvM0AU/VXGH4i3+vgXS5EguR7fysA==", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", - "dev": true - }, - "find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, - "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "jest-worker": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", - "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", - "dev": true, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^7.0.0" - }, - "dependencies": { - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "rollup": { - "version": "2.79.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", - "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", - "dev": true, - "requires": { - "fsevents": "~2.3.2" - } - }, - "rollup-plugin-terser": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-6.1.0.tgz", - "integrity": "sha512-4fB3M9nuoWxrwm39habpd4hvrbrde2W2GG4zEGPQg1YITNkM3Tqur5jSuXlWNzbv/2aMLJ+dZJaySc3GCD8oDw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.8.3", - "jest-worker": "^26.0.0", - "serialize-javascript": "^3.0.0", - "terser": "^4.7.0" - } - }, - "rollup-plugin-typescript2": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.27.3.tgz", - "integrity": "sha512-gmYPIFmALj9D3Ga1ZbTZAKTXq1JKlTQBtj299DXhqYz9cL3g/AQfUvbb2UhH+Nf++cCq941W2Mv7UcrcgLzJJg==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^3.1.0", - "find-cache-dir": "^3.3.1", - "fs-extra": "8.1.0", - "resolve": "1.17.0", - "tslib": "2.0.1" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "serialize-javascript": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.1.0.tgz", - "integrity": "sha512-JIJT1DGiWmIKhzRsG91aS6Ze4sFUrYbltlkg2onR5OrnNM02Kl/hnY/T4FN2omvyeBbQmMJv+K4cPOpGzOTFBg==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "terser": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.1.tgz", - "integrity": "sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw==", - "dev": true, - "requires": { - "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" - } - }, - "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==", - "dev": true - }, - "typescript": { - "version": "3.9.10", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", - "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", - "dev": true - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true - } - } -} From 6ac9ff2ba85be2c26e5e48b9e47b86d61a01f20f Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 2 Sep 2024 01:28:02 +0200 Subject: [PATCH 2/6] Updated dependencies --- package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index ee22196..888b647 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@DurtyFree/altv-nativeui", - "version": "1.4.5", + "version": "1.4.6", "description": "NativeUI for GTA V alt:V Multiplayer mod written in Javascript / TypeScript", "main": "dist/nativeui/nativeui.min.js", "types": "dist/nativeui/types/NativeUi.d.ts", @@ -35,14 +35,14 @@ }, "homepage": "https://github.com/DurtyFree/alt-V-NativeUI#readme", "devDependencies": { - "@altv/types-client": "^1.7.5", - "@altv/types-natives": "^1.4.2", - "@altv/types-shared": "^1.0.1", - "@types/node": "^14.17.5", + "@altv/types-client": "latest", + "@altv/types-natives": "latest", + "@altv/types-shared": "latest", + "@types/node": "^22.5.2", "rollup": "^2.53.2", "rollup-plugin-terser": "^6.1.0", "rollup-plugin-typescript2": "^0.27.3", - "typescript": "^3.9.10" + "typescript": "^5.5.4" }, "publishConfig": { "@DurtyFree:registry": "https://npm.pkg.github.com" From 994f720a05a8371034780f453358775dc7f5f054 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 2 Sep 2024 01:28:14 +0200 Subject: [PATCH 3/6] Cleaned up .gitignore --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 310c88e..10fd1a3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ index.js node_modules/ .npmrc +.idea/ +.vs/ +package-lock.json +yarn.lock \ No newline at end of file From 4ba959ad746f3cf13a6fb55316a525f455a0498d Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 2 Sep 2024 01:28:38 +0200 Subject: [PATCH 4/6] Migrate example config to toml format --- examples/nativeUI-example/resource.cfg | 9 --------- examples/nativeUI-example/resource.toml | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 examples/nativeUI-example/resource.cfg create mode 100644 examples/nativeUI-example/resource.toml diff --git a/examples/nativeUI-example/resource.cfg b/examples/nativeUI-example/resource.cfg deleted file mode 100644 index 6ca42e0..0000000 --- a/examples/nativeUI-example/resource.cfg +++ /dev/null @@ -1,9 +0,0 @@ -type: js - -main: _keep.mjs -client-main: client.js - -client-files: [ - client.js, - includes/*, -] diff --git a/examples/nativeUI-example/resource.toml b/examples/nativeUI-example/resource.toml new file mode 100644 index 0000000..5a7e87e --- /dev/null +++ b/examples/nativeUI-example/resource.toml @@ -0,0 +1,9 @@ +type = 'js' + +main = '_keep.mjs' +client-main = 'client.js' + +client-files = [ + 'client.js', + 'includes/*', +] From 16ba83c86e6a00361d2e8057ed135d9e617f6af2 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 2 Sep 2024 01:29:14 +0200 Subject: [PATCH 5/6] Updated dist --- dist/nativeui/nativeui.js | 460 ++++++++++++++++++++-------------- dist/nativeui/nativeui.min.js | 2 +- 2 files changed, 272 insertions(+), 190 deletions(-) diff --git a/dist/nativeui/nativeui.js b/dist/nativeui/nativeui.js index 176508f..55d7281 100644 --- a/dist/nativeui/nativeui.js +++ b/dist/nativeui/nativeui.js @@ -601,6 +601,15 @@ var ChangeDirection; var ChangeDirection$1 = ChangeDirection; class Color { + static Empty = new Color(0, 0, 0, 0); + static Transparent = new Color(0, 0, 0, 0); + static Black = new Color(0, 0, 0, 255); + static White = new Color(255, 255, 255, 255); + static WhiteSmoke = new Color(245, 245, 245, 255); + R; + G; + B; + A; constructor(r, g, b, a = 255) { this.R = r; this.G = g; @@ -608,13 +617,10 @@ class Color { this.A = a; } } -Color.Empty = new Color(0, 0, 0, 0); -Color.Transparent = new Color(0, 0, 0, 0); -Color.Black = new Color(0, 0, 0, 255); -Color.White = new Color(255, 255, 255, 255); -Color.WhiteSmoke = new Color(245, 245, 245, 255); class Size { + Width; + Height; constructor(w = 0, h = 0) { this.Width = w; this.Height = h; @@ -622,9 +628,9 @@ class Size { } class Point { + X = 0; + Y = 0; constructor(x, y) { - this.X = 0; - this.Y = 0; this.X = x; this.Y = y; } @@ -648,12 +654,19 @@ class Point { } class IElement { + Enabled; constructor() { this.Enabled = true; } } class Text extends IElement { + Caption; + Pos; + Scale; + Color; + Font; + Centered; constructor(caption, pos, scale, color, font, centered) { super(); this.Caption = caption; @@ -702,6 +715,8 @@ class Text extends IElement { const gameScreen = game__default.getActualScreenResolution(0, 0); class Screen { + static Width = gameScreen[1]; + static Height = gameScreen[2]; static get ResolutionMaintainRatio() { const ratio = Screen.Width / Screen.Height; const width = 1080.0 * ratio; @@ -750,10 +765,15 @@ class Screen { return lineCount; } } -Screen.Width = gameScreen[1]; -Screen.Height = gameScreen[2]; class Sprite { + TextureName; + Pos; + Size; + Heading; + Color; + Visible; + _textureDict; constructor(textureDict, textureName, pos, size, heading = 0, color = new Color(255, 255, 255)) { this.TextureDict = textureDict; this.TextureName = textureName; @@ -814,6 +834,9 @@ class Sprite { } class Rectangle extends IElement { + Pos; + Size; + Color; constructor(pos, size, color) { super(); this.Enabled = true; @@ -863,19 +886,21 @@ class ResRectangle extends Rectangle { } class ResText extends Text { - constructor(caption, pos, scale, color, font, centered) { - super(caption, pos, scale, color || new Color(255, 255, 255), font || 0, false); - this.TextAlignment = Alignment$1.Left; - this.Wrap = 0; - if (centered) - this.TextAlignment = centered; - } + TextAlignment = Alignment$1.Left; + DropShadow; + Outline; + Wrap = 0; get WordWrap() { return new Size(this.Wrap, 0); } set WordWrap(value) { this.Wrap = value.Width; } + constructor(caption, pos, scale, color, font, centered) { + super(caption, pos, scale, color || new Color(255, 255, 255), font || 0, false); + if (centered) + this.TextAlignment = centered; + } Draw(arg1, pos, scale, color, font, arg2, dropShadow, outline, wordWrap) { let caption = arg1; let centered = arg2; @@ -963,25 +988,29 @@ function UUIDV4() { } class UIMenuItem { - constructor(text, description = "", data = null) { - this.Id = UUIDV4(); - this.BackColor = UIMenuItem.DefaultBackColor; - this.HighlightedBackColor = UIMenuItem.DefaultHighlightedBackColor; - this.ForeColor = UIMenuItem.DefaultForeColor; - this.HighlightedForeColor = UIMenuItem.DefaultHighlightedForeColor; - this.RightLabel = ""; - this.LeftBadge = BadgeStyle$1.None; - this.RightBadge = BadgeStyle$1.None; - this.Enabled = true; - this.Data = data; - this._rectangle = new ResRectangle(new Point(0, 0), new Size(431, 38), new Color(150, 0, 0, 0)); - this._text = new ResText(text, new Point(8, 0), 0.33, Color.WhiteSmoke, Font$1.ChaletLondon, Alignment$1.Left); - this.Description = description; - this._selectedSprite = new Sprite("commonmenu", "gradient_nav", new Point(0, 0), new Size(431, 38)); - this._badgeLeft = new Sprite("commonmenu", "", new Point(0, 0), new Size(40, 40)); - this._badgeRight = new Sprite("commonmenu", "", new Point(0, 0), new Size(40, 40)); - this._labelText = new ResText("", new Point(0, 0), 0.35, Color.White, 0, Alignment$1.Right); - } + Id = UUIDV4(); + static DefaultBackColor = Color.Empty; + static DefaultHighlightedBackColor = Color.White; + static DefaultForeColor = Color.WhiteSmoke; + static DefaultHighlightedForeColor = Color.Black; + _event; + _rectangle; + _text; + _description; + _selectedSprite; + _badgeLeft; + _badgeRight; + _labelText; + BackColor = UIMenuItem.DefaultBackColor; + HighlightedBackColor = UIMenuItem.DefaultHighlightedBackColor; + ForeColor = UIMenuItem.DefaultForeColor; + HighlightedForeColor = UIMenuItem.DefaultHighlightedForeColor; + Enabled; + Selected; + Hovered; + Data; + Offset; + Parent; get Text() { return this._text.Caption; } @@ -997,6 +1026,20 @@ class UIMenuItem { this.Parent.UpdateDescriptionCaption(); } } + RightLabel = ""; + LeftBadge = BadgeStyle$1.None; + RightBadge = BadgeStyle$1.None; + constructor(text, description = "", data = null) { + this.Enabled = true; + this.Data = data; + this._rectangle = new ResRectangle(new Point(0, 0), new Size(431, 38), new Color(150, 0, 0, 0)); + this._text = new ResText(text, new Point(8, 0), 0.33, Color.WhiteSmoke, Font$1.ChaletLondon, Alignment$1.Left); + this.Description = description; + this._selectedSprite = new Sprite("commonmenu", "gradient_nav", new Point(0, 0), new Size(431, 38)); + this._badgeLeft = new Sprite("commonmenu", "", new Point(0, 0), new Size(40, 40)); + this._badgeRight = new Sprite("commonmenu", "", new Point(0, 0), new Size(40, 40)); + this._labelText = new ResText("", new Point(0, 0), 0.35, Color.White, 0, Alignment$1.Right); + } SetVerticalPosition(y) { this._rectangle.Pos = new Point(this.Offset.X, y + 144 + this.Offset.Y); this._selectedSprite.Pos = new Point(0 + this.Offset.X, y + 144 + this.Offset.Y); @@ -1184,15 +1227,12 @@ class UIMenuItem { } } } -UIMenuItem.DefaultBackColor = Color.Empty; -UIMenuItem.DefaultHighlightedBackColor = Color.White; -UIMenuItem.DefaultForeColor = Color.WhiteSmoke; -UIMenuItem.DefaultHighlightedForeColor = Color.Black; class UIMenuCheckboxItem extends UIMenuItem { + _checkedSprite; + Checked = false; constructor(text, check = false, description = "") { super(text, description); - this.Checked = false; const y = 0; this._checkedSprite = new Sprite("commonmenu", "shop_box_blank", new Point(410, y + 95), new Size(50, 50)); this.Checked = check; @@ -1231,14 +1271,17 @@ class UIMenuCheckboxItem extends UIMenuItem { } class ListItem { + Id = UUIDV4(); + DisplayText; + Data; constructor(text = "", data = null) { - this.Id = UUIDV4(); this.DisplayText = text; this.Data = data; } } class ItemsCollection { + items; constructor(items) { if (items.length === 0) throw new Error("ItemsCollection cannot be empty"); @@ -1265,20 +1308,13 @@ class ItemsCollection { } class UIMenuListItem extends UIMenuItem { - constructor(text, description = "", collection = new ItemsCollection(([])), startIndex = 0, data = null) { - super(text, description, data); - this.ScrollingEnabled = true; - this.HoldTimeBeforeScroll = 200; - this._currentOffset = 0; - this._itemsCollection = []; - this._index = 0; - let y = 0; - this.Collection = collection.getListItems(); - this.Index = startIndex; - this._arrowLeft = new Sprite("commonmenu", "arrowleft", new Point(110, 105 + y), new Size(30, 30)); - this._arrowRight = new Sprite("commonmenu", "arrowright", new Point(280, 105 + y), new Size(30, 30)); - this._itemText = new ResText("", new Point(290, y + 104), 0.35, Color.White, Font$1.ChaletLondon, Alignment$1.Right); - } + ScrollingEnabled = true; + HoldTimeBeforeScroll = 200; + _itemText; + _arrowLeft; + _arrowRight; + _currentOffset = 0; + _itemsCollection = []; get Collection() { return this._itemsCollection; } @@ -1304,6 +1340,7 @@ class UIMenuListItem extends UIMenuItem { ? this.SelectedItem.DisplayText : this.SelectedItem.Data; } + _index = 0; get Index() { if (this.Collection == null) return -1; @@ -1322,6 +1359,15 @@ class UIMenuListItem extends UIMenuItem { : " "; this._currentOffset = Screen.GetTextWidth(caption, this._itemText && this._itemText.Font ? this._itemText.Font : 0, 0.35); } + constructor(text, description = "", collection = new ItemsCollection(([])), startIndex = 0, data = null) { + super(text, description, data); + let y = 0; + this.Collection = collection.getListItems(); + this.Index = startIndex; + this._arrowLeft = new Sprite("commonmenu", "arrowleft", new Point(110, 105 + y), new Size(30, 30)); + this._arrowRight = new Sprite("commonmenu", "arrowright", new Point(280, 105 + y), new Size(30, 30)); + this._itemText = new ResText("", new Point(290, y + 104), 0.35, Color.White, Font$1.ChaletLondon, Alignment$1.Right); + } setCollection(collection) { this.Collection = collection.getListItems(); } @@ -1391,23 +1437,17 @@ const fixFloat = (n) => { }; class UIMenuAutoListItem extends UIMenuItem { - constructor(text, description = "", lowerThreshold = 0, upperThreshold = 10, startValue = 0, data = null) { - super(text, description, data); - this._currentOffset = 0; - this._leftMoveThreshold = 1; - this._rightMoveThreshold = 1; - this._lowerThreshold = 0; - this._upperThreshold = 10; - this._preCaptionText = ''; - this._postCaptionText = ''; - let y = 0; - this.LowerThreshold = lowerThreshold; - this.UpperThreshold = lowerThreshold > upperThreshold ? lowerThreshold : upperThreshold; - this.SelectedValue = (startValue < lowerThreshold || startValue > upperThreshold) ? lowerThreshold : startValue; - this._arrowLeft = new Sprite("commonmenu", "arrowleft", new Point(110, 105 + y), new Size(30, 30)); - this._arrowRight = new Sprite("commonmenu", "arrowright", new Point(280, 105 + y), new Size(30, 30)); - this._itemText = new ResText("", new Point(290, y + 104), 0.35, Color.White, Font$1.ChaletLondon, Alignment$1.Right); - } + _itemText; + _arrowLeft; + _arrowRight; + _currentOffset = 0; + _leftMoveThreshold = 1; + _rightMoveThreshold = 1; + _lowerThreshold = 0; + _upperThreshold = 10; + _preCaptionText = ''; + _postCaptionText = ''; + _selectedValue; get PreCaptionText() { return this._preCaptionText; } @@ -1477,6 +1517,16 @@ class UIMenuAutoListItem extends UIMenuItem { this._selectedValue = fixFloat(value); this._currentOffset = Screen.GetTextWidth(this.PreCaptionText + this._selectedValue.toString() + this.PostCaptionText, this._itemText && this._itemText.Font ? this._itemText.Font : 0, this._itemText && this._itemText.Scale ? this._itemText.Scale : 0.35); } + constructor(text, description = "", lowerThreshold = 0, upperThreshold = 10, startValue = 0, data = null) { + super(text, description, data); + let y = 0; + this.LowerThreshold = lowerThreshold; + this.UpperThreshold = lowerThreshold > upperThreshold ? lowerThreshold : upperThreshold; + this.SelectedValue = (startValue < lowerThreshold || startValue > upperThreshold) ? lowerThreshold : startValue; + this._arrowLeft = new Sprite("commonmenu", "arrowleft", new Point(110, 105 + y), new Size(30, 30)); + this._arrowRight = new Sprite("commonmenu", "arrowright", new Point(280, 105 + y), new Size(30, 30)); + this._itemText = new ResText("", new Point(290, y + 104), 0.35, Color.White, Font$1.ChaletLondon, Alignment$1.Right); + } SetVerticalPosition(y) { this._arrowLeft.Pos = new Point(300 + this.Offset.X + this.Parent.WidthOffset, 147 + y + this.Offset.Y); this._arrowRight.Pos = new Point(400 + this.Offset.X + this.Parent.WidthOffset, 147 + y + this.Offset.Y); @@ -1522,6 +1572,19 @@ class UIMenuAutoListItem extends UIMenuItem { } class UIMenuSliderItem extends UIMenuItem { + _arrowLeft; + _arrowRight; + _rectangleBackground; + _rectangleSlider; + _rectangleDivider; + _items; + _index; + get Index() { + return this._index % this._items.length; + } + set Index(value) { + this._index = 100000000 - (100000000 % this._items.length) + value; + } constructor(text, items, index, description = "", divider = false, data = null) { super(text, description, data); const y = 0; @@ -1538,12 +1601,6 @@ class UIMenuSliderItem extends UIMenuItem { } this.Index = index; } - get Index() { - return this._index % this._items.length; - } - set Index(value) { - this._index = 100000000 - (100000000 % this._items.length) + value; - } SetVerticalPosition(y) { this._rectangleBackground.Pos = new Point(250 + this.Offset.X + this.Parent.WidthOffset, y + 158.5 + this.Offset.Y); this._rectangleSlider.Pos = new Point(250 + this.Offset.X + this.Parent.WidthOffset, y + 158.5 + this.Offset.Y); @@ -1582,6 +1639,7 @@ class UIMenuSliderItem extends UIMenuItem { } class Container extends Rectangle { + Items; constructor(pos, size, color) { super(pos, size, color); this.Items = []; @@ -1615,9 +1673,7 @@ class Common { } class LiteEvent { - constructor() { - this.handlers = []; - } + handlers = []; on(handler) { this.handlers.push(handler); } @@ -1636,14 +1692,18 @@ class LiteEvent { } class InstructionalButton { + Text; + get ItemBind() { return this._itemBind; } + _itemBind = null; + _buttonString; + _buttonControl; + _usingControls; constructor(text, control, buttonString = null) { - this._itemBind = null; this.Text = text; this._buttonControl = control; this._usingControls = buttonString == null; this._buttonString = buttonString; } - get ItemBind() { return this._itemBind; } BindToItem(item) { this._itemBind = item; } @@ -1653,8 +1713,9 @@ class InstructionalButton { } class Scaleform { + _handle = 0; + scaleForm; constructor(scaleForm) { - this._handle = 0; this.scaleForm = scaleForm; this._handle = game.requestScaleformMovie(this.scaleForm); } @@ -1727,6 +1788,13 @@ class Scaleform { } class Message { + static _messageVisible = false; + static _transitionOutTimeout = null; + static _transitionOutFinishedTimeout = null; + static _delayedTransitionInTimeout = null; + static _scaleform = null; + static _transitionOutTimeMs = 500; + static _transitionOutAnimName = null; static Initialize(scaleForm, transitionOutAnimName) { this._transitionOutAnimName = transitionOutAnimName; this._scaleform = new Scaleform(scaleForm); @@ -1798,13 +1866,6 @@ class Message { } } } -Message._messageVisible = false; -Message._transitionOutTimeout = null; -Message._transitionOutFinishedTimeout = null; -Message._delayedTransitionInTimeout = null; -Message._scaleform = null; -Message._transitionOutTimeMs = 500; -Message._transitionOutAnimName = null; class BigMessage extends Message { static Initialize(scaleForm, transitionOutAnimName) { @@ -1865,25 +1926,14 @@ class MidsizedMessage extends Message { MidsizedMessage.Initialize("MIDSIZED_MESSAGE", "SHARD_ANIM_OUT"); class UIMenuDynamicListItem extends UIMenuItem { - constructor(text, selectionChangeHandler, description = "", selectedStartValueHandler = null, data = null) { - super(text, description, data); - this._currentOffset = 0; - this._precaptionText = ''; - this._selectedStartValueHandler = null; - this.SelectionChangeHandler = null; - if (!this.isVariableFunction(selectionChangeHandler)) { - alt.logError(`[UIMenuDynamicListItem] ${text} is not created with a valid selectionChangeHandler, needs to be function. Please see docs.`); - } - if (!this.isVariableFunction(selectedStartValueHandler)) { - alt.logError(`[UIMenuDynamicListItem] ${text} is not created with a valid selectedStartValueHandler, needs to be function. Please see docs.`); - } - this.SelectionChangeHandler = selectionChangeHandler; - this._selectedStartValueHandler = selectedStartValueHandler; - let y = 0; - this._arrowLeft = new Sprite("commonmenu", "arrowleft", new Point(110, 105 + y), new Size(30, 30)); - this._arrowRight = new Sprite("commonmenu", "arrowright", new Point(280, 105 + y), new Size(30, 30)); - this._itemText = new ResText("", new Point(290, y + 104), 0.35, Color.White, Font$1.ChaletLondon, Alignment$1.Right); - } + _itemText; + _arrowLeft; + _arrowRight; + _currentOffset = 0; + _precaptionText = ''; + _selectedValue; + _selectedStartValueHandler = null; + SelectionChangeHandler = null; SelectionChangeHandlerPromise(item, selectedValue, changeDirection) { return new Promise((resolve, reject) => { let newSelectedValue = this.SelectionChangeHandler(item, selectedValue, changeDirection); @@ -1910,6 +1960,21 @@ class UIMenuDynamicListItem extends UIMenuItem { return; this._currentOffset = Screen.GetTextWidth(this.PreCaptionText + this._selectedValue, this._itemText && this._itemText.Font ? this._itemText.Font : 0, this._itemText && this._itemText.Scale ? this._itemText.Scale : 0.35); } + constructor(text, selectionChangeHandler, description = "", selectedStartValueHandler = null, data = null) { + super(text, description, data); + if (!this.isVariableFunction(selectionChangeHandler)) { + alt.logError(`[UIMenuDynamicListItem] ${text} is not created with a valid selectionChangeHandler, needs to be function. Please see docs.`); + } + if (!this.isVariableFunction(selectedStartValueHandler)) { + alt.logError(`[UIMenuDynamicListItem] ${text} is not created with a valid selectedStartValueHandler, needs to be function. Please see docs.`); + } + this.SelectionChangeHandler = selectionChangeHandler; + this._selectedStartValueHandler = selectedStartValueHandler; + let y = 0; + this._arrowLeft = new Sprite("commonmenu", "arrowleft", new Point(110, 105 + y), new Size(30, 30)); + this._arrowRight = new Sprite("commonmenu", "arrowright", new Point(280, 105 + y), new Size(30, 30)); + this._itemText = new ResText("", new Point(290, y + 104), 0.35, Color.White, Font$1.ChaletLondon, Alignment$1.Right); + } SetVerticalPosition(y) { this._arrowLeft.Pos = new Point(300 + this.Offset.X + this.Parent.WidthOffset, 147 + y + this.Offset.Y); this._arrowRight.Pos = new Point(400 + this.Offset.X + this.Parent.WidthOffset, 147 + y + this.Offset.Y); @@ -1967,85 +2032,70 @@ class UIMenuDynamicListItem extends UIMenuItem { let menuPool = []; class NativeUI { - constructor(title, subtitle, offset, spriteLibrary, spriteName) { - this._visible = true; - this._counterPretext = ""; - this._counterOverride = undefined; - this._lastUpDownNavigation = 0; - this._lastLeftRightNavigation = 0; - this._extraOffset = 0; - this._buttonsEnabled = true; - this._justOpened = true; - this._justOpenedFromPool = false; - this._justClosedFromPool = false; - this._poolOpening = null; - this._safezoneOffset = new Point(0, 0); - this._activeItem = 1000; - this._maxItemsOnScreen = 9; - this._maxItem = this._maxItemsOnScreen; - this._mouseEdgeEnabled = true; - this._bannerSprite = null; - this._bannerRectangle = null; - this._recalculateDescriptionNextFrame = 1; - this._instructionalButtons = []; - this._defaultTitleScale = 1.15; - this._maxMenuItems = 1000; - this.Id = UUIDV4(); - this.SelectTextLocalized = alt.getGxtText("HUD_INPUT2"); - this.BackTextLocalized = alt.getGxtText("HUD_INPUT3"); - this.WidthOffset = 0; - this.ParentMenu = null; - this.ParentItem = null; - this.MouseControlsEnabled = false; - this.CloseableByUser = true; - this.AUDIO_LIBRARY = "HUD_FRONTEND_DEFAULT_SOUNDSET"; - this.AUDIO_UPDOWN = "NAV_UP_DOWN"; - this.AUDIO_LEFTRIGHT = "NAV_LEFT_RIGHT"; - this.AUDIO_SELECT = "SELECT"; - this.AUDIO_BACK = "BACK"; - this.AUDIO_ERROR = "ERROR"; - this.MenuItems = []; - this.IndexChange = new LiteEvent(); - this.ListChange = new LiteEvent(); - this.AutoListChange = new LiteEvent(); - this.DynamicListChange = new LiteEvent(); - this.SliderChange = new LiteEvent(); - this.CheckboxChange = new LiteEvent(); - this.ItemSelect = new LiteEvent(); - this.MenuOpen = new LiteEvent(); - this.MenuClose = new LiteEvent(); - this.MenuChange = new LiteEvent(); - if (!(offset instanceof Point)) - offset = Point.Parse(offset); - this._spriteLibrary = spriteLibrary || "commonmenu"; - this._spriteName = spriteName || "interaction_bgd"; - this._offset = new Point(offset.X, offset.Y); - this.Children = new Map(); - this._instructionalButtonsScaleform = new Scaleform("instructional_buttons"); - this.UpdateScaleform(); - this._mainMenu = new Container(new Point(0, 0), new Size(700, 500), new Color(0, 0, 0, 0)); - this._bannerSprite = new Sprite(this._spriteLibrary, this._spriteName, new Point(0 + this._offset.X, 0 + this._offset.Y), new Size(431, 107)); - this._mainMenu.addItem((this._titleResText = new ResText(title, new Point(215 + this._offset.X, 20 + this._offset.Y), this._defaultTitleScale, new Color(255, 255, 255), 1, Alignment$1.Centered))); - if (subtitle !== "") { - this._mainMenu.addItem(new ResRectangle(new Point(0 + this._offset.X, 107 + this._offset.Y), new Size(431, 37), new Color(0, 0, 0, 255))); - this._mainMenu.addItem((this._subtitleResText = new ResText(subtitle, new Point(8 + this._offset.X, 110 + this._offset.Y), 0.35, new Color(255, 255, 255), 0, Alignment$1.Left))); - if (subtitle.startsWith("~")) { - this._counterPretext = subtitle.substr(0, 3); - } - this._counterText = new ResText("", new Point(425 + this._offset.X, 110 + this._offset.Y), 0.35, new Color(255, 255, 255), 0, Alignment$1.Right); - this._extraOffset += 37; - } - this._upAndDownSprite = new Sprite("commonmenu", "shop_arrows_upanddown", new Point(190 + this._offset.X, 147 + 37 * (this._maxItemsOnScreen + 1) + this._offset.Y - 37 + this._extraOffset), new Size(50, 50)); - this._extraRectangleUp = new ResRectangle(new Point(0 + this._offset.X, 144 + 38 * (this._maxItemsOnScreen + 1) + this._offset.Y - 37 + this._extraOffset), new Size(431, 18), new Color(0, 0, 0, 200)); - this._extraRectangleDown = new ResRectangle(new Point(0 + this._offset.X, 144 + 18 + 38 * (this._maxItemsOnScreen + 1) + this._offset.Y - 37 + this._extraOffset), new Size(431, 18), new Color(0, 0, 0, 200)); - this._descriptionBar = new ResRectangle(new Point(this._offset.X, 123), new Size(431, 4), Color.Black); - this._descriptionRectangle = new Sprite("commonmenu", "gradient_bgd", new Point(this._offset.X, 127), new Size(431, 30)); - this._descriptionText = new ResText("", new Point(this._offset.X + 5, 125), 0.35, new Color(255, 255, 255, 255), Font$1.ChaletLondon, Alignment$1.Left); - this._descriptionText.Wrap = 400; - this._background = new Sprite("commonmenu", "gradient_bgd", new Point(this._offset.X, 144 + this._offset.Y - 37 + this._extraOffset), new Size(290, 25)); - this._visible = false; - alt.everyTick(this.render.bind(this)); - } + _visible = true; + _counterPretext = ""; + _counterOverride = undefined; + _spriteLibrary; + _spriteName; + _offset; + _lastUpDownNavigation = 0; + _lastLeftRightNavigation = 0; + _extraOffset = 0; + _buttonsEnabled = true; + _justOpened = true; + _justOpenedFromPool = false; + _justClosedFromPool = false; + _poolOpening = null; + _safezoneOffset = new Point(0, 0); + _activeItem = 1000; + _maxItemsOnScreen = 9; + _minItem; + _maxItem = this._maxItemsOnScreen; + _mouseEdgeEnabled = true; + _bannerSprite = null; + _bannerRectangle = null; + _recalculateDescriptionNextFrame = 1; + _instructionalButtons = []; + _instructionalButtonsScaleform; + _defaultTitleScale = 1.15; + _maxMenuItems = 1000; + _mainMenu; + _upAndDownSprite; + _titleResText; + _subtitleResText; + _extraRectangleUp; + _extraRectangleDown; + _descriptionBar; + _descriptionRectangle; + _descriptionText; + _counterText; + _background; + Id = UUIDV4(); + SelectTextLocalized = alt.getGxtText("HUD_INPUT2"); + BackTextLocalized = alt.getGxtText("HUD_INPUT3"); + WidthOffset = 0; + ParentMenu = null; + ParentItem = null; + Children; + MouseControlsEnabled = false; + CloseableByUser = true; + AUDIO_LIBRARY = "HUD_FRONTEND_DEFAULT_SOUNDSET"; + AUDIO_UPDOWN = "NAV_UP_DOWN"; + AUDIO_LEFTRIGHT = "NAV_LEFT_RIGHT"; + AUDIO_SELECT = "SELECT"; + AUDIO_BACK = "BACK"; + AUDIO_ERROR = "ERROR"; + MenuItems = []; + IndexChange = new LiteEvent(); + ListChange = new LiteEvent(); + AutoListChange = new LiteEvent(); + DynamicListChange = new LiteEvent(); + SliderChange = new LiteEvent(); + CheckboxChange = new LiteEvent(); + ItemSelect = new LiteEvent(); + MenuOpen = new LiteEvent(); + MenuClose = new LiteEvent(); + MenuChange = new LiteEvent(); GetSpriteBanner() { return this._bannerSprite; } @@ -2145,6 +2195,38 @@ class NativeUI { this.IndexChange.emit(this.CurrentSelection, this.MenuItems[this._activeItem % this.MenuItems.length]); this.UpdateDescriptionCaption(); } + constructor(title, subtitle, offset, spriteLibrary, spriteName) { + if (!(offset instanceof Point)) + offset = Point.Parse(offset); + this._spriteLibrary = spriteLibrary || "commonmenu"; + this._spriteName = spriteName || "interaction_bgd"; + this._offset = new Point(offset.X, offset.Y); + this.Children = new Map(); + this._instructionalButtonsScaleform = new Scaleform("instructional_buttons"); + this.UpdateScaleform(); + this._mainMenu = new Container(new Point(0, 0), new Size(700, 500), new Color(0, 0, 0, 0)); + this._bannerSprite = new Sprite(this._spriteLibrary, this._spriteName, new Point(0 + this._offset.X, 0 + this._offset.Y), new Size(431, 107)); + this._mainMenu.addItem((this._titleResText = new ResText(title, new Point(215 + this._offset.X, 20 + this._offset.Y), this._defaultTitleScale, new Color(255, 255, 255), 1, Alignment$1.Centered))); + if (subtitle !== "") { + this._mainMenu.addItem(new ResRectangle(new Point(0 + this._offset.X, 107 + this._offset.Y), new Size(431, 37), new Color(0, 0, 0, 255))); + this._mainMenu.addItem((this._subtitleResText = new ResText(subtitle, new Point(8 + this._offset.X, 110 + this._offset.Y), 0.35, new Color(255, 255, 255), 0, Alignment$1.Left))); + if (subtitle.startsWith("~")) { + this._counterPretext = subtitle.substr(0, 3); + } + this._counterText = new ResText("", new Point(425 + this._offset.X, 110 + this._offset.Y), 0.35, new Color(255, 255, 255), 0, Alignment$1.Right); + this._extraOffset += 37; + } + this._upAndDownSprite = new Sprite("commonmenu", "shop_arrows_upanddown", new Point(190 + this._offset.X, 147 + 37 * (this._maxItemsOnScreen + 1) + this._offset.Y - 37 + this._extraOffset), new Size(50, 50)); + this._extraRectangleUp = new ResRectangle(new Point(0 + this._offset.X, 144 + 38 * (this._maxItemsOnScreen + 1) + this._offset.Y - 37 + this._extraOffset), new Size(431, 18), new Color(0, 0, 0, 200)); + this._extraRectangleDown = new ResRectangle(new Point(0 + this._offset.X, 144 + 18 + 38 * (this._maxItemsOnScreen + 1) + this._offset.Y - 37 + this._extraOffset), new Size(431, 18), new Color(0, 0, 0, 200)); + this._descriptionBar = new ResRectangle(new Point(this._offset.X, 123), new Size(431, 4), Color.Black); + this._descriptionRectangle = new Sprite("commonmenu", "gradient_bgd", new Point(this._offset.X, 127), new Size(431, 30)); + this._descriptionText = new ResText("", new Point(this._offset.X + 5, 125), 0.35, new Color(255, 255, 255, 255), Font$1.ChaletLondon, Alignment$1.Left); + this._descriptionText.Wrap = 400; + this._background = new Sprite("commonmenu", "gradient_bgd", new Point(this._offset.X, 144 + this._offset.Y - 37 + this._extraOffset), new Size(290, 25)); + this._visible = false; + alt.everyTick(this.render.bind(this)); + } DisableInstructionalButtons(disable) { this._buttonsEnabled = !disable; } diff --git a/dist/nativeui/nativeui.min.js b/dist/nativeui/nativeui.min.js index e1cbc2d..507a2c8 100644 --- a/dist/nativeui/nativeui.min.js +++ b/dist/nativeui/nativeui.min.js @@ -1 +1 @@ -import*as e from"alt-client";import*as t from"natives";import i from"natives";var s;!function(e){e[e.None=0]="None",e[e.BronzeMedal=1]="BronzeMedal",e[e.GoldMedal=2]="GoldMedal",e[e.SilverMedal=3]="SilverMedal",e[e.Alert=4]="Alert",e[e.Crown=5]="Crown",e[e.Ammo=6]="Ammo",e[e.Armour=7]="Armour",e[e.Barber=8]="Barber",e[e.Clothes=9]="Clothes",e[e.Franklin=10]="Franklin",e[e.Bike=11]="Bike",e[e.Car=12]="Car",e[e.Gun=13]="Gun",e[e.Heart=14]="Heart",e[e.Makeup=15]="Makeup",e[e.Mask=16]="Mask",e[e.Michael=17]="Michael",e[e.Star=18]="Star",e[e.Tattoo=19]="Tattoo",e[e.Trevor=20]="Trevor",e[e.Lock=21]="Lock",e[e.Tick=22]="Tick",e[e.Sale=23]="Sale",e[e.ArrowLeft=24]="ArrowLeft",e[e.ArrowRight=25]="ArrowRight",e[e.Audio1=26]="Audio1",e[e.Audio2=27]="Audio2",e[e.Audio3=28]="Audio3",e[e.AudioInactive=29]="AudioInactive",e[e.AudioMute=30]="AudioMute"}(s||(s={}));var n,h=s;!function(e){e[e.ChaletLondon=0]="ChaletLondon",e[e.HouseScript=1]="HouseScript",e[e.Monospace=2]="Monospace",e[e.CharletComprimeColonge=4]="CharletComprimeColonge",e[e.ChaletLondonFixedWidthNumbers=5]="ChaletLondonFixedWidthNumbers",e[e.Pricedown=7]="Pricedown"}(n||(n={}));var o,r=n;!function(e){e[e.Left=0]="Left",e[e.Centered=1]="Centered",e[e.Right=2]="Right"}(o||(o={}));var a,l=o;!function(e){e[e.NextCamera=0]="NextCamera",e[e.LookLeftRight=1]="LookLeftRight",e[e.LookUpDown=2]="LookUpDown",e[e.LookUpOnly=3]="LookUpOnly",e[e.LookDownOnly=4]="LookDownOnly",e[e.LookLeftOnly=5]="LookLeftOnly",e[e.LookRightOnly=6]="LookRightOnly",e[e.CinematicSlowMo=7]="CinematicSlowMo",e[e.FlyUpDown=8]="FlyUpDown",e[e.FlyLeftRight=9]="FlyLeftRight",e[e.ScriptedFlyZUp=10]="ScriptedFlyZUp",e[e.ScriptedFlyZDown=11]="ScriptedFlyZDown",e[e.WeaponWheelUpDown=12]="WeaponWheelUpDown",e[e.WeaponWheelLeftRight=13]="WeaponWheelLeftRight",e[e.WeaponWheelNext=14]="WeaponWheelNext",e[e.WeaponWheelPrev=15]="WeaponWheelPrev",e[e.SelectNextWeapon=16]="SelectNextWeapon",e[e.SelectPrevWeapon=17]="SelectPrevWeapon",e[e.SkipCutscene=18]="SkipCutscene",e[e.CharacterWheel=19]="CharacterWheel",e[e.MultiplayerInfo=20]="MultiplayerInfo",e[e.Sprint=21]="Sprint",e[e.Jump=22]="Jump",e[e.Enter=23]="Enter",e[e.Attack=24]="Attack",e[e.Aim=25]="Aim",e[e.LookBehind=26]="LookBehind",e[e.Phone=27]="Phone",e[e.SpecialAbility=28]="SpecialAbility",e[e.SpecialAbilitySecondary=29]="SpecialAbilitySecondary",e[e.MoveLeftRight=30]="MoveLeftRight",e[e.MoveUpDown=31]="MoveUpDown",e[e.MoveUpOnly=32]="MoveUpOnly",e[e.MoveDownOnly=33]="MoveDownOnly",e[e.MoveLeftOnly=34]="MoveLeftOnly",e[e.MoveRightOnly=35]="MoveRightOnly",e[e.Duck=36]="Duck",e[e.SelectWeapon=37]="SelectWeapon",e[e.Pickup=38]="Pickup",e[e.SniperZoom=39]="SniperZoom",e[e.SniperZoomInOnly=40]="SniperZoomInOnly",e[e.SniperZoomOutOnly=41]="SniperZoomOutOnly",e[e.SniperZoomInSecondary=42]="SniperZoomInSecondary",e[e.SniperZoomOutSecondary=43]="SniperZoomOutSecondary",e[e.Cover=44]="Cover",e[e.Reload=45]="Reload",e[e.Talk=46]="Talk",e[e.Detonate=47]="Detonate",e[e.HUDSpecial=48]="HUDSpecial",e[e.Arrest=49]="Arrest",e[e.AccurateAim=50]="AccurateAim",e[e.Context=51]="Context",e[e.ContextSecondary=52]="ContextSecondary",e[e.WeaponSpecial=53]="WeaponSpecial",e[e.WeaponSpecial2=54]="WeaponSpecial2",e[e.Dive=55]="Dive",e[e.DropWeapon=56]="DropWeapon",e[e.DropAmmo=57]="DropAmmo",e[e.ThrowGrenade=58]="ThrowGrenade",e[e.VehicleMoveLeftRight=59]="VehicleMoveLeftRight",e[e.VehicleMoveUpDown=60]="VehicleMoveUpDown",e[e.VehicleMoveUpOnly=61]="VehicleMoveUpOnly",e[e.VehicleMoveDownOnly=62]="VehicleMoveDownOnly",e[e.VehicleMoveLeftOnly=63]="VehicleMoveLeftOnly",e[e.VehicleMoveRightOnly=64]="VehicleMoveRightOnly",e[e.VehicleSpecial=65]="VehicleSpecial",e[e.VehicleGunLeftRight=66]="VehicleGunLeftRight",e[e.VehicleGunUpDown=67]="VehicleGunUpDown",e[e.VehicleAim=68]="VehicleAim",e[e.VehicleAttack=69]="VehicleAttack",e[e.VehicleAttack2=70]="VehicleAttack2",e[e.VehicleAccelerate=71]="VehicleAccelerate",e[e.VehicleBrake=72]="VehicleBrake",e[e.VehicleDuck=73]="VehicleDuck",e[e.VehicleHeadlight=74]="VehicleHeadlight",e[e.VehicleExit=75]="VehicleExit",e[e.VehicleHandbrake=76]="VehicleHandbrake",e[e.VehicleHotwireLeft=77]="VehicleHotwireLeft",e[e.VehicleHotwireRight=78]="VehicleHotwireRight",e[e.VehicleLookBehind=79]="VehicleLookBehind",e[e.VehicleCinCam=80]="VehicleCinCam",e[e.VehicleNextRadio=81]="VehicleNextRadio",e[e.VehiclePrevRadio=82]="VehiclePrevRadio",e[e.VehicleNextRadioTrack=83]="VehicleNextRadioTrack",e[e.VehiclePrevRadioTrack=84]="VehiclePrevRadioTrack",e[e.VehicleRadioWheel=85]="VehicleRadioWheel",e[e.VehicleHorn=86]="VehicleHorn",e[e.VehicleFlyThrottleUp=87]="VehicleFlyThrottleUp",e[e.VehicleFlyThrottleDown=88]="VehicleFlyThrottleDown",e[e.VehicleFlyYawLeft=89]="VehicleFlyYawLeft",e[e.VehicleFlyYawRight=90]="VehicleFlyYawRight",e[e.VehiclePassengerAim=91]="VehiclePassengerAim",e[e.VehiclePassengerAttack=92]="VehiclePassengerAttack",e[e.VehicleSpecialAbilityFranklin=93]="VehicleSpecialAbilityFranklin",e[e.VehicleStuntUpDown=94]="VehicleStuntUpDown",e[e.VehicleCinematicUpDown=95]="VehicleCinematicUpDown",e[e.VehicleCinematicUpOnly=96]="VehicleCinematicUpOnly",e[e.VehicleCinematicDownOnly=97]="VehicleCinematicDownOnly",e[e.VehicleCinematicLeftRight=98]="VehicleCinematicLeftRight",e[e.VehicleSelectNextWeapon=99]="VehicleSelectNextWeapon",e[e.VehicleSelectPrevWeapon=100]="VehicleSelectPrevWeapon",e[e.VehicleRoof=101]="VehicleRoof",e[e.VehicleJump=102]="VehicleJump",e[e.VehicleGrapplingHook=103]="VehicleGrapplingHook",e[e.VehicleShuffle=104]="VehicleShuffle",e[e.VehicleDropProjectile=105]="VehicleDropProjectile",e[e.VehicleMouseControlOverride=106]="VehicleMouseControlOverride",e[e.VehicleFlyRollLeftRight=107]="VehicleFlyRollLeftRight",e[e.VehicleFlyRollLeftOnly=108]="VehicleFlyRollLeftOnly",e[e.VehicleFlyRollRightOnly=109]="VehicleFlyRollRightOnly",e[e.VehicleFlyPitchUpDown=110]="VehicleFlyPitchUpDown",e[e.VehicleFlyPitchUpOnly=111]="VehicleFlyPitchUpOnly",e[e.VehicleFlyPitchDownOnly=112]="VehicleFlyPitchDownOnly",e[e.VehicleFlyUnderCarriage=113]="VehicleFlyUnderCarriage",e[e.VehicleFlyAttack=114]="VehicleFlyAttack",e[e.VehicleFlySelectNextWeapon=115]="VehicleFlySelectNextWeapon",e[e.VehicleFlySelectPrevWeapon=116]="VehicleFlySelectPrevWeapon",e[e.VehicleFlySelectTargetLeft=117]="VehicleFlySelectTargetLeft",e[e.VehicleFlySelectTargetRight=118]="VehicleFlySelectTargetRight",e[e.VehicleFlyVerticalFlightMode=119]="VehicleFlyVerticalFlightMode",e[e.VehicleFlyDuck=120]="VehicleFlyDuck",e[e.VehicleFlyAttackCamera=121]="VehicleFlyAttackCamera",e[e.VehicleFlyMouseControlOverride=122]="VehicleFlyMouseControlOverride",e[e.VehicleSubTurnLeftRight=123]="VehicleSubTurnLeftRight",e[e.VehicleSubTurnLeftOnly=124]="VehicleSubTurnLeftOnly",e[e.VehicleSubTurnRightOnly=125]="VehicleSubTurnRightOnly",e[e.VehicleSubPitchUpDown=126]="VehicleSubPitchUpDown",e[e.VehicleSubPitchUpOnly=127]="VehicleSubPitchUpOnly",e[e.VehicleSubPitchDownOnly=128]="VehicleSubPitchDownOnly",e[e.VehicleSubThrottleUp=129]="VehicleSubThrottleUp",e[e.VehicleSubThrottleDown=130]="VehicleSubThrottleDown",e[e.VehicleSubAscend=131]="VehicleSubAscend",e[e.VehicleSubDescend=132]="VehicleSubDescend",e[e.VehicleSubTurnHardLeft=133]="VehicleSubTurnHardLeft",e[e.VehicleSubTurnHardRight=134]="VehicleSubTurnHardRight",e[e.VehicleSubMouseControlOverride=135]="VehicleSubMouseControlOverride",e[e.VehiclePushbikePedal=136]="VehiclePushbikePedal",e[e.VehiclePushbikeSprint=137]="VehiclePushbikeSprint",e[e.VehiclePushbikeFrontBrake=138]="VehiclePushbikeFrontBrake",e[e.VehiclePushbikeRearBrake=139]="VehiclePushbikeRearBrake",e[e.MeleeAttackLight=140]="MeleeAttackLight",e[e.MeleeAttackHeavy=141]="MeleeAttackHeavy",e[e.MeleeAttackAlternate=142]="MeleeAttackAlternate",e[e.MeleeBlock=143]="MeleeBlock",e[e.ParachuteDeploy=144]="ParachuteDeploy",e[e.ParachuteDetach=145]="ParachuteDetach",e[e.ParachuteTurnLeftRight=146]="ParachuteTurnLeftRight",e[e.ParachuteTurnLeftOnly=147]="ParachuteTurnLeftOnly",e[e.ParachuteTurnRightOnly=148]="ParachuteTurnRightOnly",e[e.ParachutePitchUpDown=149]="ParachutePitchUpDown",e[e.ParachutePitchUpOnly=150]="ParachutePitchUpOnly",e[e.ParachutePitchDownOnly=151]="ParachutePitchDownOnly",e[e.ParachuteBrakeLeft=152]="ParachuteBrakeLeft",e[e.ParachuteBrakeRight=153]="ParachuteBrakeRight",e[e.ParachuteSmoke=154]="ParachuteSmoke",e[e.ParachutePrecisionLanding=155]="ParachutePrecisionLanding",e[e.Map=156]="Map",e[e.SelectWeaponUnarmed=157]="SelectWeaponUnarmed",e[e.SelectWeaponMelee=158]="SelectWeaponMelee",e[e.SelectWeaponHandgun=159]="SelectWeaponHandgun",e[e.SelectWeaponShotgun=160]="SelectWeaponShotgun",e[e.SelectWeaponSmg=161]="SelectWeaponSmg",e[e.SelectWeaponAutoRifle=162]="SelectWeaponAutoRifle",e[e.SelectWeaponSniper=163]="SelectWeaponSniper",e[e.SelectWeaponHeavy=164]="SelectWeaponHeavy",e[e.SelectWeaponSpecial=165]="SelectWeaponSpecial",e[e.SelectCharacterMichael=166]="SelectCharacterMichael",e[e.SelectCharacterFranklin=167]="SelectCharacterFranklin",e[e.SelectCharacterTrevor=168]="SelectCharacterTrevor",e[e.SelectCharacterMultiplayer=169]="SelectCharacterMultiplayer",e[e.SaveReplayClip=170]="SaveReplayClip",e[e.SpecialAbilityPC=171]="SpecialAbilityPC",e[e.PhoneUp=172]="PhoneUp",e[e.PhoneDown=173]="PhoneDown",e[e.PhoneLeft=174]="PhoneLeft",e[e.PhoneRight=175]="PhoneRight",e[e.PhoneSelect=176]="PhoneSelect",e[e.PhoneCancel=177]="PhoneCancel",e[e.PhoneOption=178]="PhoneOption",e[e.PhoneExtraOption=179]="PhoneExtraOption",e[e.PhoneScrollForward=180]="PhoneScrollForward",e[e.PhoneScrollBackward=181]="PhoneScrollBackward",e[e.PhoneCameraFocusLock=182]="PhoneCameraFocusLock",e[e.PhoneCameraGrid=183]="PhoneCameraGrid",e[e.PhoneCameraSelfie=184]="PhoneCameraSelfie",e[e.PhoneCameraDOF=185]="PhoneCameraDOF",e[e.PhoneCameraExpression=186]="PhoneCameraExpression",e[e.FrontendDown=187]="FrontendDown",e[e.FrontendUp=188]="FrontendUp",e[e.FrontendLeft=189]="FrontendLeft",e[e.FrontendRight=190]="FrontendRight",e[e.FrontendRdown=191]="FrontendRdown",e[e.FrontendRup=192]="FrontendRup",e[e.FrontendRleft=193]="FrontendRleft",e[e.FrontendRright=194]="FrontendRright",e[e.FrontendAxisX=195]="FrontendAxisX",e[e.FrontendAxisY=196]="FrontendAxisY",e[e.FrontendRightAxisX=197]="FrontendRightAxisX",e[e.FrontendRightAxisY=198]="FrontendRightAxisY",e[e.FrontendPause=199]="FrontendPause",e[e.FrontendPauseAlternate=200]="FrontendPauseAlternate",e[e.FrontendAccept=201]="FrontendAccept",e[e.FrontendCancel=202]="FrontendCancel",e[e.FrontendX=203]="FrontendX",e[e.FrontendY=204]="FrontendY",e[e.FrontendLb=205]="FrontendLb",e[e.FrontendRb=206]="FrontendRb",e[e.FrontendLt=207]="FrontendLt",e[e.FrontendRt=208]="FrontendRt",e[e.FrontendLs=209]="FrontendLs",e[e.FrontendRs=210]="FrontendRs",e[e.FrontendLeaderboard=211]="FrontendLeaderboard",e[e.FrontendSocialClub=212]="FrontendSocialClub",e[e.FrontendSocialClubSecondary=213]="FrontendSocialClubSecondary",e[e.FrontendDelete=214]="FrontendDelete",e[e.FrontendEndscreenAccept=215]="FrontendEndscreenAccept",e[e.FrontendEndscreenExpand=216]="FrontendEndscreenExpand",e[e.FrontendSelect=217]="FrontendSelect",e[e.ScriptLeftAxisX=218]="ScriptLeftAxisX",e[e.ScriptLeftAxisY=219]="ScriptLeftAxisY",e[e.ScriptRightAxisX=220]="ScriptRightAxisX",e[e.ScriptRightAxisY=221]="ScriptRightAxisY",e[e.ScriptRUp=222]="ScriptRUp",e[e.ScriptRDown=223]="ScriptRDown",e[e.ScriptRLeft=224]="ScriptRLeft",e[e.ScriptRRight=225]="ScriptRRight",e[e.ScriptLB=226]="ScriptLB",e[e.ScriptRB=227]="ScriptRB",e[e.ScriptLT=228]="ScriptLT",e[e.ScriptRT=229]="ScriptRT",e[e.ScriptLS=230]="ScriptLS",e[e.ScriptRS=231]="ScriptRS",e[e.ScriptPadUp=232]="ScriptPadUp",e[e.ScriptPadDown=233]="ScriptPadDown",e[e.ScriptPadLeft=234]="ScriptPadLeft",e[e.ScriptPadRight=235]="ScriptPadRight",e[e.ScriptSelect=236]="ScriptSelect",e[e.CursorAccept=237]="CursorAccept",e[e.CursorCancel=238]="CursorCancel",e[e.CursorX=239]="CursorX",e[e.CursorY=240]="CursorY",e[e.CursorScrollUp=241]="CursorScrollUp",e[e.CursorScrollDown=242]="CursorScrollDown",e[e.EnterCheatCode=243]="EnterCheatCode",e[e.InteractionMenu=244]="InteractionMenu",e[e.MpTextChatAll=245]="MpTextChatAll",e[e.MpTextChatTeam=246]="MpTextChatTeam",e[e.MpTextChatFriends=247]="MpTextChatFriends",e[e.MpTextChatCrew=248]="MpTextChatCrew",e[e.PushToTalk=249]="PushToTalk",e[e.CreatorLS=250]="CreatorLS",e[e.CreatorRS=251]="CreatorRS",e[e.CreatorLT=252]="CreatorLT",e[e.CreatorRT=253]="CreatorRT",e[e.CreatorMenuToggle=254]="CreatorMenuToggle",e[e.CreatorAccept=255]="CreatorAccept",e[e.CreatorDelete=256]="CreatorDelete",e[e.Attack2=257]="Attack2",e[e.RappelJump=258]="RappelJump",e[e.RappelLongJump=259]="RappelLongJump",e[e.RappelSmashWindow=260]="RappelSmashWindow",e[e.PrevWeapon=261]="PrevWeapon",e[e.NextWeapon=262]="NextWeapon",e[e.MeleeAttack1=263]="MeleeAttack1",e[e.MeleeAttack2=264]="MeleeAttack2",e[e.Whistle=265]="Whistle",e[e.MoveLeft=266]="MoveLeft",e[e.MoveRight=267]="MoveRight",e[e.MoveUp=268]="MoveUp",e[e.MoveDown=269]="MoveDown",e[e.LookLeft=270]="LookLeft",e[e.LookRight=271]="LookRight",e[e.LookUp=272]="LookUp",e[e.LookDown=273]="LookDown",e[e.SniperZoomIn=274]="SniperZoomIn",e[e.SniperZoomOut=275]="SniperZoomOut",e[e.SniperZoomInAlternate=276]="SniperZoomInAlternate",e[e.SniperZoomOutAlternate=277]="SniperZoomOutAlternate",e[e.VehicleMoveLeft=278]="VehicleMoveLeft",e[e.VehicleMoveRight=279]="VehicleMoveRight",e[e.VehicleMoveUp=280]="VehicleMoveUp",e[e.VehicleMoveDown=281]="VehicleMoveDown",e[e.VehicleGunLeft=282]="VehicleGunLeft",e[e.VehicleGunRight=283]="VehicleGunRight",e[e.VehicleGunUp=284]="VehicleGunUp",e[e.VehicleGunDown=285]="VehicleGunDown",e[e.VehicleLookLeft=286]="VehicleLookLeft",e[e.VehicleLookRight=287]="VehicleLookRight",e[e.ReplayStartStopRecording=288]="ReplayStartStopRecording",e[e.ReplayStartStopRecordingSecondary=289]="ReplayStartStopRecordingSecondary",e[e.ScaledLookLeftRight=290]="ScaledLookLeftRight",e[e.ScaledLookUpDown=291]="ScaledLookUpDown",e[e.ScaledLookUpOnly=292]="ScaledLookUpOnly",e[e.ScaledLookDownOnly=293]="ScaledLookDownOnly",e[e.ScaledLookLeftOnly=294]="ScaledLookLeftOnly",e[e.ScaledLookRightOnly=295]="ScaledLookRightOnly",e[e.ReplayMarkerDelete=296]="ReplayMarkerDelete",e[e.ReplayClipDelete=297]="ReplayClipDelete",e[e.ReplayPause=298]="ReplayPause",e[e.ReplayRewind=299]="ReplayRewind",e[e.ReplayFfwd=300]="ReplayFfwd",e[e.ReplayNewmarker=301]="ReplayNewmarker",e[e.ReplayRecord=302]="ReplayRecord",e[e.ReplayScreenshot=303]="ReplayScreenshot",e[e.ReplayHidehud=304]="ReplayHidehud",e[e.ReplayStartpoint=305]="ReplayStartpoint",e[e.ReplayEndpoint=306]="ReplayEndpoint",e[e.ReplayAdvance=307]="ReplayAdvance",e[e.ReplayBack=308]="ReplayBack",e[e.ReplayTools=309]="ReplayTools",e[e.ReplayRestart=310]="ReplayRestart",e[e.ReplayShowhotkey=311]="ReplayShowhotkey",e[e.ReplayCycleMarkerLeft=312]="ReplayCycleMarkerLeft",e[e.ReplayCycleMarkerRight=313]="ReplayCycleMarkerRight",e[e.ReplayFOVIncrease=314]="ReplayFOVIncrease",e[e.ReplayFOVDecrease=315]="ReplayFOVDecrease",e[e.ReplayCameraUp=316]="ReplayCameraUp",e[e.ReplayCameraDown=317]="ReplayCameraDown",e[e.ReplaySave=318]="ReplaySave",e[e.ReplayToggletime=319]="ReplayToggletime",e[e.ReplayToggletips=320]="ReplayToggletips",e[e.ReplayPreview=321]="ReplayPreview",e[e.ReplayToggleTimeline=322]="ReplayToggleTimeline",e[e.ReplayTimelinePickupClip=323]="ReplayTimelinePickupClip",e[e.ReplayTimelineDuplicateClip=324]="ReplayTimelineDuplicateClip",e[e.ReplayTimelinePlaceClip=325]="ReplayTimelinePlaceClip",e[e.ReplayCtrl=326]="ReplayCtrl",e[e.ReplayTimelineSave=327]="ReplayTimelineSave",e[e.ReplayPreviewAudio=328]="ReplayPreviewAudio",e[e.VehicleDriveLook=329]="VehicleDriveLook",e[e.VehicleDriveLook2=330]="VehicleDriveLook2",e[e.VehicleFlyAttack2=331]="VehicleFlyAttack2",e[e.RadioWheelUpDown=332]="RadioWheelUpDown",e[e.RadioWheelLeftRight=333]="RadioWheelLeftRight",e[e.VehicleSlowMoUpDown=334]="VehicleSlowMoUpDown",e[e.VehicleSlowMoUpOnly=335]="VehicleSlowMoUpOnly",e[e.VehicleSlowMoDownOnly=336]="VehicleSlowMoDownOnly",e[e.MapPointOfInterest=337]="MapPointOfInterest",e[e.ReplaySnapmaticPhoto=338]="ReplaySnapmaticPhoto",e[e.VehicleCarJump=339]="VehicleCarJump",e[e.VehicleRocketBoost=340]="VehicleRocketBoost",e[e.VehicleParachute=341]="VehicleParachute",e[e.VehicleBikeWings=342]="VehicleBikeWings",e[e.VehicleFlyBombBay=343]="VehicleFlyBombBay",e[e.VehicleFlyCounter=344]="VehicleFlyCounter",e[e.VehicleFlyTransform=345]="VehicleFlyTransform"}(a||(a={}));var _,c=a;!function(e){e[e.HUD_COLOUR_PURE_WHITE=0]="HUD_COLOUR_PURE_WHITE",e[e.HUD_COLOUR_WHITE=1]="HUD_COLOUR_WHITE",e[e.HUD_COLOUR_BLACK=2]="HUD_COLOUR_BLACK",e[e.HUD_COLOUR_GREY=3]="HUD_COLOUR_GREY",e[e.HUD_COLOUR_GREYLIGHT=4]="HUD_COLOUR_GREYLIGHT",e[e.HUD_COLOUR_GREYDARK=5]="HUD_COLOUR_GREYDARK",e[e.HUD_COLOUR_RED=6]="HUD_COLOUR_RED",e[e.HUD_COLOUR_REDLIGHT=7]="HUD_COLOUR_REDLIGHT",e[e.HUD_COLOUR_REDDARK=8]="HUD_COLOUR_REDDARK",e[e.HUD_COLOUR_BLUE=9]="HUD_COLOUR_BLUE",e[e.HUD_COLOUR_BLUELIGHT=10]="HUD_COLOUR_BLUELIGHT",e[e.HUD_COLOUR_BLUEDARK=11]="HUD_COLOUR_BLUEDARK",e[e.HUD_COLOUR_YELLOW=12]="HUD_COLOUR_YELLOW",e[e.HUD_COLOUR_YELLOWLIGHT=13]="HUD_COLOUR_YELLOWLIGHT",e[e.HUD_COLOUR_YELLOWDARK=14]="HUD_COLOUR_YELLOWDARK",e[e.HUD_COLOUR_ORANGE=15]="HUD_COLOUR_ORANGE",e[e.HUD_COLOUR_ORANGELIGHT=16]="HUD_COLOUR_ORANGELIGHT",e[e.HUD_COLOUR_ORANGEDARK=17]="HUD_COLOUR_ORANGEDARK",e[e.HUD_COLOUR_GREEN=18]="HUD_COLOUR_GREEN",e[e.HUD_COLOUR_GREENLIGHT=19]="HUD_COLOUR_GREENLIGHT",e[e.HUD_COLOUR_GREENDARK=20]="HUD_COLOUR_GREENDARK",e[e.HUD_COLOUR_PURPLE=21]="HUD_COLOUR_PURPLE",e[e.HUD_COLOUR_PURPLELIGHT=22]="HUD_COLOUR_PURPLELIGHT",e[e.HUD_COLOUR_PURPLEDARK=23]="HUD_COLOUR_PURPLEDARK",e[e.HUD_COLOUR_PINK=24]="HUD_COLOUR_PINK",e[e.HUD_COLOUR_RADAR_HEALTH=25]="HUD_COLOUR_RADAR_HEALTH",e[e.HUD_COLOUR_RADAR_ARMOUR=26]="HUD_COLOUR_RADAR_ARMOUR",e[e.HUD_COLOUR_RADAR_DAMAGE=27]="HUD_COLOUR_RADAR_DAMAGE",e[e.HUD_COLOUR_NET_PLAYER1=28]="HUD_COLOUR_NET_PLAYER1",e[e.HUD_COLOUR_NET_PLAYER2=29]="HUD_COLOUR_NET_PLAYER2",e[e.HUD_COLOUR_NET_PLAYER3=30]="HUD_COLOUR_NET_PLAYER3",e[e.HUD_COLOUR_NET_PLAYER4=31]="HUD_COLOUR_NET_PLAYER4",e[e.HUD_COLOUR_NET_PLAYER5=32]="HUD_COLOUR_NET_PLAYER5",e[e.HUD_COLOUR_NET_PLAYER6=33]="HUD_COLOUR_NET_PLAYER6",e[e.HUD_COLOUR_NET_PLAYER7=34]="HUD_COLOUR_NET_PLAYER7",e[e.HUD_COLOUR_NET_PLAYER8=35]="HUD_COLOUR_NET_PLAYER8",e[e.HUD_COLOUR_NET_PLAYER9=36]="HUD_COLOUR_NET_PLAYER9",e[e.HUD_COLOUR_NET_PLAYER10=37]="HUD_COLOUR_NET_PLAYER10",e[e.HUD_COLOUR_NET_PLAYER11=38]="HUD_COLOUR_NET_PLAYER11",e[e.HUD_COLOUR_NET_PLAYER12=39]="HUD_COLOUR_NET_PLAYER12",e[e.HUD_COLOUR_NET_PLAYER13=40]="HUD_COLOUR_NET_PLAYER13",e[e.HUD_COLOUR_NET_PLAYER14=41]="HUD_COLOUR_NET_PLAYER14",e[e.HUD_COLOUR_NET_PLAYER15=42]="HUD_COLOUR_NET_PLAYER15",e[e.HUD_COLOUR_NET_PLAYER16=43]="HUD_COLOUR_NET_PLAYER16",e[e.HUD_COLOUR_NET_PLAYER17=44]="HUD_COLOUR_NET_PLAYER17",e[e.HUD_COLOUR_NET_PLAYER18=45]="HUD_COLOUR_NET_PLAYER18",e[e.HUD_COLOUR_NET_PLAYER19=46]="HUD_COLOUR_NET_PLAYER19",e[e.HUD_COLOUR_NET_PLAYER20=47]="HUD_COLOUR_NET_PLAYER20",e[e.HUD_COLOUR_NET_PLAYER21=48]="HUD_COLOUR_NET_PLAYER21",e[e.HUD_COLOUR_NET_PLAYER22=49]="HUD_COLOUR_NET_PLAYER22",e[e.HUD_COLOUR_NET_PLAYER23=50]="HUD_COLOUR_NET_PLAYER23",e[e.HUD_COLOUR_NET_PLAYER24=51]="HUD_COLOUR_NET_PLAYER24",e[e.HUD_COLOUR_NET_PLAYER25=52]="HUD_COLOUR_NET_PLAYER25",e[e.HUD_COLOUR_NET_PLAYER26=53]="HUD_COLOUR_NET_PLAYER26",e[e.HUD_COLOUR_NET_PLAYER27=54]="HUD_COLOUR_NET_PLAYER27",e[e.HUD_COLOUR_NET_PLAYER28=55]="HUD_COLOUR_NET_PLAYER28",e[e.HUD_COLOUR_NET_PLAYER29=56]="HUD_COLOUR_NET_PLAYER29",e[e.HUD_COLOUR_NET_PLAYER30=57]="HUD_COLOUR_NET_PLAYER30",e[e.HUD_COLOUR_NET_PLAYER31=58]="HUD_COLOUR_NET_PLAYER31",e[e.HUD_COLOUR_NET_PLAYER32=59]="HUD_COLOUR_NET_PLAYER32",e[e.HUD_COLOUR_SIMPLEBLIP_DEFAULT=60]="HUD_COLOUR_SIMPLEBLIP_DEFAULT",e[e.HUD_COLOUR_MENU_BLUE=61]="HUD_COLOUR_MENU_BLUE",e[e.HUD_COLOUR_MENU_GREY_LIGHT=62]="HUD_COLOUR_MENU_GREY_LIGHT",e[e.HUD_COLOUR_MENU_BLUE_EXTRA_DARK=63]="HUD_COLOUR_MENU_BLUE_EXTRA_DARK",e[e.HUD_COLOUR_MENU_YELLOW=64]="HUD_COLOUR_MENU_YELLOW",e[e.HUD_COLOUR_MENU_YELLOW_DARK=65]="HUD_COLOUR_MENU_YELLOW_DARK",e[e.HUD_COLOUR_MENU_GREEN=66]="HUD_COLOUR_MENU_GREEN",e[e.HUD_COLOUR_MENU_GREY=67]="HUD_COLOUR_MENU_GREY",e[e.HUD_COLOUR_MENU_GREY_DARK=68]="HUD_COLOUR_MENU_GREY_DARK",e[e.HUD_COLOUR_MENU_HIGHLIGHT=69]="HUD_COLOUR_MENU_HIGHLIGHT",e[e.HUD_COLOUR_MENU_STANDARD=70]="HUD_COLOUR_MENU_STANDARD",e[e.HUD_COLOUR_MENU_DIMMED=71]="HUD_COLOUR_MENU_DIMMED",e[e.HUD_COLOUR_MENU_EXTRA_DIMMED=72]="HUD_COLOUR_MENU_EXTRA_DIMMED",e[e.HUD_COLOUR_BRIEF_TITLE=73]="HUD_COLOUR_BRIEF_TITLE",e[e.HUD_COLOUR_MID_GREY_MP=74]="HUD_COLOUR_MID_GREY_MP",e[e.HUD_COLOUR_NET_PLAYER1_DARK=75]="HUD_COLOUR_NET_PLAYER1_DARK",e[e.HUD_COLOUR_NET_PLAYER2_DARK=76]="HUD_COLOUR_NET_PLAYER2_DARK",e[e.HUD_COLOUR_NET_PLAYER3_DARK=77]="HUD_COLOUR_NET_PLAYER3_DARK",e[e.HUD_COLOUR_NET_PLAYER4_DARK=78]="HUD_COLOUR_NET_PLAYER4_DARK",e[e.HUD_COLOUR_NET_PLAYER5_DARK=79]="HUD_COLOUR_NET_PLAYER5_DARK",e[e.HUD_COLOUR_NET_PLAYER6_DARK=80]="HUD_COLOUR_NET_PLAYER6_DARK",e[e.HUD_COLOUR_NET_PLAYER7_DARK=81]="HUD_COLOUR_NET_PLAYER7_DARK",e[e.HUD_COLOUR_NET_PLAYER8_DARK=82]="HUD_COLOUR_NET_PLAYER8_DARK",e[e.HUD_COLOUR_NET_PLAYER9_DARK=83]="HUD_COLOUR_NET_PLAYER9_DARK",e[e.HUD_COLOUR_NET_PLAYER10_DARK=84]="HUD_COLOUR_NET_PLAYER10_DARK",e[e.HUD_COLOUR_NET_PLAYER11_DARK=85]="HUD_COLOUR_NET_PLAYER11_DARK",e[e.HUD_COLOUR_NET_PLAYER12_DARK=86]="HUD_COLOUR_NET_PLAYER12_DARK",e[e.HUD_COLOUR_NET_PLAYER13_DARK=87]="HUD_COLOUR_NET_PLAYER13_DARK",e[e.HUD_COLOUR_NET_PLAYER14_DARK=88]="HUD_COLOUR_NET_PLAYER14_DARK",e[e.HUD_COLOUR_NET_PLAYER15_DARK=89]="HUD_COLOUR_NET_PLAYER15_DARK",e[e.HUD_COLOUR_NET_PLAYER16_DARK=90]="HUD_COLOUR_NET_PLAYER16_DARK",e[e.HUD_COLOUR_NET_PLAYER17_DARK=91]="HUD_COLOUR_NET_PLAYER17_DARK",e[e.HUD_COLOUR_NET_PLAYER18_DARK=92]="HUD_COLOUR_NET_PLAYER18_DARK",e[e.HUD_COLOUR_NET_PLAYER19_DARK=93]="HUD_COLOUR_NET_PLAYER19_DARK",e[e.HUD_COLOUR_NET_PLAYER20_DARK=94]="HUD_COLOUR_NET_PLAYER20_DARK",e[e.HUD_COLOUR_NET_PLAYER21_DARK=95]="HUD_COLOUR_NET_PLAYER21_DARK",e[e.HUD_COLOUR_NET_PLAYER22_DARK=96]="HUD_COLOUR_NET_PLAYER22_DARK",e[e.HUD_COLOUR_NET_PLAYER23_DARK=97]="HUD_COLOUR_NET_PLAYER23_DARK",e[e.HUD_COLOUR_NET_PLAYER24_DARK=98]="HUD_COLOUR_NET_PLAYER24_DARK",e[e.HUD_COLOUR_NET_PLAYER25_DARK=99]="HUD_COLOUR_NET_PLAYER25_DARK",e[e.HUD_COLOUR_NET_PLAYER26_DARK=100]="HUD_COLOUR_NET_PLAYER26_DARK",e[e.HUD_COLOUR_NET_PLAYER27_DARK=101]="HUD_COLOUR_NET_PLAYER27_DARK",e[e.HUD_COLOUR_NET_PLAYER28_DARK=102]="HUD_COLOUR_NET_PLAYER28_DARK",e[e.HUD_COLOUR_NET_PLAYER29_DARK=103]="HUD_COLOUR_NET_PLAYER29_DARK",e[e.HUD_COLOUR_NET_PLAYER30_DARK=104]="HUD_COLOUR_NET_PLAYER30_DARK",e[e.HUD_COLOUR_NET_PLAYER31_DARK=105]="HUD_COLOUR_NET_PLAYER31_DARK",e[e.HUD_COLOUR_NET_PLAYER32_DARK=106]="HUD_COLOUR_NET_PLAYER32_DARK",e[e.HUD_COLOUR_BRONZE=107]="HUD_COLOUR_BRONZE",e[e.HUD_COLOUR_SILVER=108]="HUD_COLOUR_SILVER",e[e.HUD_COLOUR_GOLD=109]="HUD_COLOUR_GOLD",e[e.HUD_COLOUR_PLATINUM=110]="HUD_COLOUR_PLATINUM",e[e.HUD_COLOUR_GANG1=111]="HUD_COLOUR_GANG1",e[e.HUD_COLOUR_GANG2=112]="HUD_COLOUR_GANG2",e[e.HUD_COLOUR_GANG3=113]="HUD_COLOUR_GANG3",e[e.HUD_COLOUR_GANG4=114]="HUD_COLOUR_GANG4",e[e.HUD_COLOUR_SAME_CREW=115]="HUD_COLOUR_SAME_CREW",e[e.HUD_COLOUR_FREEMODE=116]="HUD_COLOUR_FREEMODE",e[e.HUD_COLOUR_PAUSE_BG=117]="HUD_COLOUR_PAUSE_BG",e[e.HUD_COLOUR_FRIENDLY=118]="HUD_COLOUR_FRIENDLY",e[e.HUD_COLOUR_ENEMY=119]="HUD_COLOUR_ENEMY",e[e.HUD_COLOUR_LOCATION=120]="HUD_COLOUR_LOCATION",e[e.HUD_COLOUR_PICKUP=121]="HUD_COLOUR_PICKUP",e[e.HUD_COLOUR_PAUSE_SINGLEPLAYER=122]="HUD_COLOUR_PAUSE_SINGLEPLAYER",e[e.HUD_COLOUR_FREEMODE_DARK=123]="HUD_COLOUR_FREEMODE_DARK",e[e.HUD_COLOUR_INACTIVE_MISSION=124]="HUD_COLOUR_INACTIVE_MISSION",e[e.HUD_COLOUR_DAMAGE=125]="HUD_COLOUR_DAMAGE",e[e.HUD_COLOUR_PINKLIGHT=126]="HUD_COLOUR_PINKLIGHT",e[e.HUD_COLOUR_PM_MITEM_HIGHLIGHT=127]="HUD_COLOUR_PM_MITEM_HIGHLIGHT",e[e.HUD_COLOUR_SCRIPT_VARIABLE=128]="HUD_COLOUR_SCRIPT_VARIABLE",e[e.HUD_COLOUR_YOGA=129]="HUD_COLOUR_YOGA",e[e.HUD_COLOUR_TENNIS=130]="HUD_COLOUR_TENNIS",e[e.HUD_COLOUR_GOLF=131]="HUD_COLOUR_GOLF",e[e.HUD_COLOUR_SHOOTING_RANGE=132]="HUD_COLOUR_SHOOTING_RANGE",e[e.HUD_COLOUR_FLIGHT_SCHOOL=133]="HUD_COLOUR_FLIGHT_SCHOOL",e[e.HUD_COLOUR_NORTH_BLUE=134]="HUD_COLOUR_NORTH_BLUE",e[e.HUD_COLOUR_SOCIAL_CLUB=135]="HUD_COLOUR_SOCIAL_CLUB",e[e.HUD_COLOUR_PLATFORM_BLUE=136]="HUD_COLOUR_PLATFORM_BLUE",e[e.HUD_COLOUR_PLATFORM_GREEN=137]="HUD_COLOUR_PLATFORM_GREEN",e[e.HUD_COLOUR_PLATFORM_GREY=138]="HUD_COLOUR_PLATFORM_GREY",e[e.HUD_COLOUR_FACEBOOK_BLUE=139]="HUD_COLOUR_FACEBOOK_BLUE",e[e.HUD_COLOUR_INGAME_BG=140]="HUD_COLOUR_INGAME_BG",e[e.HUD_COLOUR_DARTS=141]="HUD_COLOUR_DARTS",e[e.HUD_COLOUR_WAYPOINT=142]="HUD_COLOUR_WAYPOINT",e[e.HUD_COLOUR_MICHAEL=143]="HUD_COLOUR_MICHAEL",e[e.HUD_COLOUR_FRANKLIN=144]="HUD_COLOUR_FRANKLIN",e[e.HUD_COLOUR_TREVOR=145]="HUD_COLOUR_TREVOR",e[e.HUD_COLOUR_GOLF_P1=146]="HUD_COLOUR_GOLF_P1",e[e.HUD_COLOUR_GOLF_P2=147]="HUD_COLOUR_GOLF_P2",e[e.HUD_COLOUR_GOLF_P3=148]="HUD_COLOUR_GOLF_P3",e[e.HUD_COLOUR_GOLF_P4=149]="HUD_COLOUR_GOLF_P4",e[e.HUD_COLOUR_WAYPOINTLIGHT=150]="HUD_COLOUR_WAYPOINTLIGHT",e[e.HUD_COLOUR_WAYPOINTDARK=151]="HUD_COLOUR_WAYPOINTDARK",e[e.HUD_COLOUR_PANEL_LIGHT=152]="HUD_COLOUR_PANEL_LIGHT",e[e.HUD_COLOUR_MICHAEL_DARK=153]="HUD_COLOUR_MICHAEL_DARK",e[e.HUD_COLOUR_FRANKLIN_DARK=154]="HUD_COLOUR_FRANKLIN_DARK",e[e.HUD_COLOUR_TREVOR_DARK=155]="HUD_COLOUR_TREVOR_DARK",e[e.HUD_COLOUR_OBJECTIVE_ROUTE=156]="HUD_COLOUR_OBJECTIVE_ROUTE",e[e.HUD_COLOUR_PAUSEMAP_TINT=157]="HUD_COLOUR_PAUSEMAP_TINT",e[e.HUD_COLOUR_PAUSE_DESELECT=158]="HUD_COLOUR_PAUSE_DESELECT",e[e.HUD_COLOUR_PM_WEAPONS_PURCHASABLE=159]="HUD_COLOUR_PM_WEAPONS_PURCHASABLE",e[e.HUD_COLOUR_PM_WEAPONS_LOCKED=160]="HUD_COLOUR_PM_WEAPONS_LOCKED",e[e.HUD_COLOUR_END_SCREEN_BG=161]="HUD_COLOUR_END_SCREEN_BG",e[e.HUD_COLOUR_CHOP=162]="HUD_COLOUR_CHOP",e[e.HUD_COLOUR_PAUSEMAP_TINT_HALF=163]="HUD_COLOUR_PAUSEMAP_TINT_HALF",e[e.HUD_COLOUR_NORTH_BLUE_OFFICIAL=164]="HUD_COLOUR_NORTH_BLUE_OFFICIAL",e[e.HUD_COLOUR_SCRIPT_VARIABLE_2=165]="HUD_COLOUR_SCRIPT_VARIABLE_2",e[e.HUD_COLOUR_H=166]="HUD_COLOUR_H",e[e.HUD_COLOUR_HDARK=167]="HUD_COLOUR_HDARK",e[e.HUD_COLOUR_T=168]="HUD_COLOUR_T",e[e.HUD_COLOUR_TDARK=169]="HUD_COLOUR_TDARK",e[e.HUD_COLOUR_HSHARD=170]="HUD_COLOUR_HSHARD",e[e.HUD_COLOUR_CONTROLLER_MICHAEL=171]="HUD_COLOUR_CONTROLLER_MICHAEL",e[e.HUD_COLOUR_CONTROLLER_FRANKLIN=172]="HUD_COLOUR_CONTROLLER_FRANKLIN",e[e.HUD_COLOUR_CONTROLLER_TREVOR=173]="HUD_COLOUR_CONTROLLER_TREVOR",e[e.HUD_COLOUR_CONTROLLER_CHOP=174]="HUD_COLOUR_CONTROLLER_CHOP",e[e.HUD_COLOUR_VIDEO_EDITOR_VIDEO=175]="HUD_COLOUR_VIDEO_EDITOR_VIDEO",e[e.HUD_COLOUR_VIDEO_EDITOR_AUDIO=176]="HUD_COLOUR_VIDEO_EDITOR_AUDIO",e[e.HUD_COLOUR_VIDEO_EDITOR_TEXT=177]="HUD_COLOUR_VIDEO_EDITOR_TEXT",e[e.HUD_COLOUR_HB_BLUE=178]="HUD_COLOUR_HB_BLUE",e[e.HUD_COLOUR_HB_YELLOW=179]="HUD_COLOUR_HB_YELLOW"}(_||(_={}));var O,R=_;!function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(O||(O={}));var u=O;class d{constructor(e,t,i,s=255){this.R=e,this.G=t,this.B=i,this.A=s}}d.Empty=new d(0,0,0,0),d.Transparent=new d(0,0,0,0),d.Black=new d(0,0,0,255),d.White=new d(255,255,255,255),d.WhiteSmoke=new d(245,245,245,255);class L{constructor(e=0,t=0){this.Width=e,this.Height=t}}class U{constructor(e,t){this.X=0,this.Y=0,this.X=e,this.Y=t}static Parse(e){if("object"==typeof e){if(e.length)return new U(e[0],e[1]);if(e.X&&e.Y)return new U(e.X,e.Y)}else if("string"==typeof e&&-1!==e.indexOf(",")){const t=e.split(",");return new U(parseFloat(t[0]),parseFloat(t[1]))}return new U(0,0)}}class C{constructor(){this.Enabled=!0}}class D extends C{constructor(e,t,i,s,n,h){super(),this.Caption=e,this.Pos=t,this.Scale=i,this.Color=s||new d(255,255,255,255),this.Font=n||0,this.Centered=h||!1}Draw(e,t,s,n,h,o){!e||t||s||n||h||o||(t=new U(this.Pos.X+e.Width,this.Pos.Y+e.Height),s=this.Scale,n=this.Color,h=this.Font,o=this.Centered);const r=t.X/1280,a=t.Y/720;i.setTextFont(parseInt(h)),i.setTextScale(s,s),i.setTextColour(n.R,n.G,n.B,n.A),i.setTextCentre(o),i.beginTextCommandDisplayText("STRING"),D.AddLongString(e),i.endTextCommandDisplayText(r,a,0)}static AddLongString(e){if(!e.length)return;for(let t,s=0;s=e.X&&i.X<=e.X+t.Width&&i.Y>e.Y&&i.Y0){const e=t.X/o.Width+h/o.Width;i.setTextWrap(r,e)}return i.endTextCommandGetNumberOfLinesForString(r,a)}}S.Width=m[1],S.Height=m[2];class p{constructor(e,t,i,s,n=0,h=new d(255,255,255)){this.TextureDict=e,this.TextureName=t,this.Pos=i,this.Size=s,this.Heading=n,this.Color=h,this.Visible=!0}LoadTextureDictionary(){this.requestTextureDictPromise(this._textureDict).then(e=>{})}requestTextureDictPromise(t){return new Promise((s,n)=>{i.requestStreamedTextureDict(t,!0);let h=e.setInterval(()=>{if(i.hasStreamedTextureDictLoaded(t))return e.clearInterval(h),s(!0)},10)})}set TextureDict(e){this._textureDict=e,this.IsTextureDictionaryLoaded||this.LoadTextureDictionary()}get TextureDict(){return this._textureDict}get IsTextureDictionaryLoaded(){return i.hasStreamedTextureDictLoaded(this._textureDict)}Draw(e,t,s,n,h,o,r){e=e||this.TextureDict,t=t||this.TextureName,s=s||this.Pos,n=n||this.Size,h=h||this.Heading,o=o||this.Color,(r=r||!0)&&(i.hasStreamedTextureDictLoaded(e)||i.requestStreamedTextureDict(e,!0));const a=1080*(S.Width/S.Height),l=this.Size.Width/a,_=this.Size.Height/1080,c=this.Pos.X/a+.5*l,O=this.Pos.Y/1080+.5*_;i.drawSprite(e,t,c,O,l,_,h,o.R,o.G,o.B,o.A,!0,0)}}class f extends C{constructor(e,t,i){super(),this.Enabled=!0,this.Pos=e,this.Size=t,this.Color=i}Draw(e,t,s){e||(e=new L(0,0)),t||s||(e=new U(this.Pos.X+e.Width,this.Pos.Y+e.Height),t=this.Size,s=this.Color);const n=t.Width/1280,h=t.Height/720,o=e.X/1280+.5*n,r=e.Y/720+.5*h;i.drawRect(o,r,n,h,s.R,s.G,s.B,s.A,!1)}}class T extends f{constructor(e,t,i){super(e,t,i)}Draw(e,t,s){e||(e=new L),!e||t||s||(e=new U(this.Pos.X+e.Width,this.Pos.Y+e.Height),t=this.Size,s=this.Color);const n=1080*(S.Width/S.Height),h=t.Width/n,o=t.Height/1080,r=e.X/n+.5*h,a=e.Y/1080+.5*o;i.drawRect(r,a,h,o,s.R,s.G,s.B,s.A,!1)}}class g extends D{constructor(e,t,i,s,n,h){super(e,t,i,s||new d(255,255,255),n||0,!1),this.TextAlignment=l.Left,this.Wrap=0,h&&(this.TextAlignment=h)}get WordWrap(){return new L(this.Wrap,0)}set WordWrap(e){this.Wrap=e.Width}Draw(t,s,n,h,o,r,a,_,c){let O=t,R=r,u=r;t||(t=new L(0,0)),t&&!s&&(u=this.TextAlignment,O=this.Caption,s=new U(this.Pos.X+t.Width,this.Pos.Y+t.Height),n=this.Scale,h=this.Color,o=this.Font,1==R||0==R?R=this.Centered:(R=void 0,a=this.DropShadow,_=this.Outline,this.WordWrap));const d=1080*(S.Width/S.Height),C=this.Pos.X/d,m=this.Pos.Y/1080;if(i.setTextFont(parseInt(o)),i.setTextScale(1,n),i.setTextColour(h.R,h.G,h.B,h.A),void 0!==R)i.setTextCentre(R);else{switch(a&&i.setTextDropshadow(2,0,0,0,0),_&&e.logWarning("[NativeUI] ResText outline not working!"),u){case l.Centered:i.setTextCentre(!0);break;case l.Right:i.setTextRightJustify(!0),i.setTextWrap(0,C)}if(this.Wrap){const e=(this.Pos.X+this.Wrap)/d;i.setTextWrap(C,e)}}i.beginTextCommandDisplayText("CELL_EMAIL_BCON"),D.AddLongString(O),i.endTextCommandDisplayText(C,m,0)}}function I(){let e,t="";for(e=0;e<32;e+=1)switch(e){case 8:case 20:t+="-",t+=(16*Math.random()|0).toString(16);break;case 12:t+="-",t+="4";break;case 16:t+="-",t+=(4*Math.random()|8).toString(16);break;default:t+=(16*Math.random()|0).toString(16)}return t}class E{constructor(e,t="",i=null){this.Id=I(),this.BackColor=E.DefaultBackColor,this.HighlightedBackColor=E.DefaultHighlightedBackColor,this.ForeColor=E.DefaultForeColor,this.HighlightedForeColor=E.DefaultHighlightedForeColor,this.RightLabel="",this.LeftBadge=h.None,this.RightBadge=h.None,this.Enabled=!0,this.Data=i,this._rectangle=new T(new U(0,0),new L(431,38),new d(150,0,0,0)),this._text=new g(e,new U(8,0),.33,d.WhiteSmoke,r.ChaletLondon,l.Left),this.Description=t,this._selectedSprite=new p("commonmenu","gradient_nav",new U(0,0),new L(431,38)),this._badgeLeft=new p("commonmenu","",new U(0,0),new L(40,40)),this._badgeRight=new p("commonmenu","",new U(0,0),new L(40,40)),this._labelText=new g("",new U(0,0),.35,d.White,0,l.Right)}get Text(){return this._text.Caption}set Text(e){this._text.Caption=e}get Description(){return this._description}set Description(e){this._description=e,null!=this&&null!=this.Parent&&this.Parent.UpdateDescriptionCaption()}SetVerticalPosition(e){this._rectangle.Pos=new U(this.Offset.X,e+144+this.Offset.Y),this._selectedSprite.Pos=new U(0+this.Offset.X,e+144+this.Offset.Y),this._text.Pos=new U(8+this.Offset.X,e+147+this.Offset.Y),this._badgeLeft.Pos=new U(0+this.Offset.X,e+142+this.Offset.Y),this._badgeRight.Pos=new U(385+this.Offset.X,e+142+this.Offset.Y),this._labelText.Pos=new U(420+this.Offset.X,e+148+this.Offset.Y)}addEvent(e,...t){this._event={event:e,args:t}}fireEvent(){this._event&&e.emit(this._event.event,...this._event.args)}Draw(){this._rectangle.Size=new L(431+this.Parent.WidthOffset,38),this._selectedSprite.Size=new L(431+this.Parent.WidthOffset,38),this.Hovered&&!this.Selected&&(this._rectangle.Color=new d(255,255,255,20),this._rectangle.Draw()),this._selectedSprite.Color=this.Selected?this.HighlightedBackColor:this.BackColor,this._selectedSprite.Draw(),this._text.Color=this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this.LeftBadge!=h.None?(this._text.Pos=new U(35+this.Offset.X,this._text.Pos.Y),this._badgeLeft.TextureDict=this.BadgeToSpriteLib(this.LeftBadge),this._badgeLeft.TextureName=this.BadgeToSpriteName(this.LeftBadge,this.Selected),this._badgeLeft.Color=this.IsBagdeWhiteSprite(this.LeftBadge)?this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148):d.White,this._badgeLeft.Draw()):this._text.Pos=new U(8+this.Offset.X,this._text.Pos.Y),this.RightBadge!=h.None&&(this._badgeRight.Pos=new U(385+this.Offset.X+this.Parent.WidthOffset,this._badgeRight.Pos.Y),this._badgeRight.TextureDict=this.BadgeToSpriteLib(this.RightBadge),this._badgeRight.TextureName=this.BadgeToSpriteName(this.RightBadge,this.Selected),this._badgeRight.Color=this.IsBagdeWhiteSprite(this.RightBadge)?this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148):d.White,this._badgeRight.Draw()),this.RightLabel&&""!==this.RightLabel&&(this._labelText.Pos=new U(420+this.Offset.X+this.Parent.WidthOffset,this._labelText.Pos.Y),this._labelText.Caption=this.RightLabel,this._labelText.Color=this._text.Color=this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this._labelText.Draw()),this._text.Draw()}SetLeftBadge(e){this.LeftBadge=e}SetRightBadge(e){this.RightBadge=e}SetRightLabel(e){this.RightLabel=e}BadgeToSpriteLib(e){switch(e){case h.Sale:return"mpshopsale";case h.Audio1:case h.Audio2:case h.Audio3:case h.AudioInactive:case h.AudioMute:return"mpleaderboard";default:return"commonmenu"}}BadgeToSpriteName(e,t){switch(e){case h.None:return"";case h.BronzeMedal:return"mp_medal_bronze";case h.GoldMedal:return"mp_medal_gold";case h.SilverMedal:return"medal_silver";case h.Alert:return"mp_alerttriangle";case h.Crown:return"mp_hostcrown";case h.Ammo:return t?"shop_ammo_icon_b":"shop_ammo_icon_a";case h.Armour:return t?"shop_armour_icon_b":"shop_armour_icon_a";case h.Barber:return t?"shop_barber_icon_b":"shop_barber_icon_a";case h.Clothes:return t?"shop_clothing_icon_b":"shop_clothing_icon_a";case h.Franklin:return t?"shop_franklin_icon_b":"shop_franklin_icon_a";case h.Bike:return t?"shop_garage_bike_icon_b":"shop_garage_bike_icon_a";case h.Car:return t?"shop_garage_icon_b":"shop_garage_icon_a";case h.Gun:return t?"shop_gunclub_icon_b":"shop_gunclub_icon_a";case h.Heart:return t?"shop_health_icon_b":"shop_health_icon_a";case h.Lock:return"shop_lock";case h.Makeup:return t?"shop_makeup_icon_b":"shop_makeup_icon_a";case h.Mask:return t?"shop_mask_icon_b":"shop_mask_icon_a";case h.Michael:return t?"shop_michael_icon_b":"shop_michael_icon_a";case h.Star:return"shop_new_star";case h.Tattoo:return t?"shop_tattoos_icon_b":"shop_tattoos_icon_a";case h.Tick:return"shop_tick_icon";case h.Trevor:return t?"shop_trevor_icon_b":"shop_trevor_icon_a";case h.Sale:return"saleicon";case h.ArrowLeft:return"arrowleft";case h.ArrowRight:return"arrowright";case h.Audio1:return"leaderboard_audio_1";case h.Audio2:return"leaderboard_audio_2";case h.Audio3:return"leaderboard_audio_3";case h.AudioInactive:return"leaderboard_audio_inactive";case h.AudioMute:return"leaderboard_audio_mute";default:return""}}IsBagdeWhiteSprite(e){switch(e){case h.Lock:case h.Tick:case h.Crown:return!0;default:return!1}}BadgeToColor(e,t){switch(e){case h.Lock:case h.Tick:case h.Crown:return t?new d(255,0,0,0):new d(255,255,255,255);default:return new d(255,255,255,255)}}}E.DefaultBackColor=d.Empty,E.DefaultHighlightedBackColor=d.White,E.DefaultForeColor=d.WhiteSmoke,E.DefaultHighlightedForeColor=d.Black;class A extends E{constructor(e,t=!1,i=""){super(e,i),this.Checked=!1;this._checkedSprite=new p("commonmenu","shop_box_blank",new U(410,95),new L(50,50)),this.Checked=t}SetVerticalPosition(e){super.SetVerticalPosition(e),this._checkedSprite.Pos=new U(380+this.Offset.X+this.Parent.WidthOffset,e+138+this.Offset.Y)}Draw(){super.Draw(),this._checkedSprite.Pos=this._checkedSprite.Pos=new U(380+this.Offset.X+this.Parent.WidthOffset,this._checkedSprite.Pos.Y);const e=this.HighlightedForeColor==E.DefaultHighlightedForeColor;this.Selected&&e?this._checkedSprite.TextureName=this.Checked?"shop_box_tickb":"shop_box_blankb":this._checkedSprite.TextureName=this.Checked?"shop_box_tick":"shop_box_blank",this._checkedSprite.Color=this.Enabled?this.Selected&&!e?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this._checkedSprite.Draw()}SetRightBadge(e){return this}SetRightLabel(e){return this}}class P{constructor(e="",t=null){this.Id=I(),this.DisplayText=e,this.Data=t}}class w{constructor(e){if(0===e.length)throw new Error("ItemsCollection cannot be empty");this.items=e}length(){return this.items.length}getListItems(){const e=[];for(const t of this.items)t instanceof P?e.push(t):"string"==typeof t?e.push(new P(t)):"number"==typeof t&&e.push(new P(t.toString()));return e}}class H extends E{constructor(e,t="",i=new w([]),s=0,n=null){super(e,t,n),this.ScrollingEnabled=!0,this.HoldTimeBeforeScroll=200,this._currentOffset=0,this._itemsCollection=[],this._index=0;this.Collection=i.getListItems(),this.Index=s,this._arrowLeft=new p("commonmenu","arrowleft",new U(110,105),new L(30,30)),this._arrowRight=new p("commonmenu","arrowright",new U(280,105),new L(30,30)),this._itemText=new g("",new U(290,104),.35,d.White,r.ChaletLondon,l.Right)}get Collection(){return this._itemsCollection}set Collection(e){if(!e)throw new Error("The collection can't be null");this._itemsCollection=e}set SelectedItem(e){const t=this.Collection.findIndex(t=>t.Id===e.Id);this.Index=t>0?t:0}get SelectedItem(){return this.Collection.length>0?this.Collection[this.Index]:null}get SelectedValue(){return null==this.SelectedItem?null:null==this.SelectedItem.Data?this.SelectedItem.DisplayText:this.SelectedItem.Data}get Index(){return null==this.Collection||null!=this.Collection&&0==this.Collection.length?-1:this._index%this.Collection.length}set Index(e){if(null==this.Collection)return;if(null!=this.Collection&&0==this.Collection.length)return;this._index=1e8-1e8%this.Collection.length+e;const t=this.Collection.length>=this.Index?this.Collection[this.Index].DisplayText:" ";this._currentOffset=S.GetTextWidth(t,this._itemText&&this._itemText.Font?this._itemText.Font:0,.35)}setCollection(e){this.Collection=e.getListItems()}setCollectionItem(e,t,i=!0){if(e>this.Collection.length)throw new Error("Index out of bounds");"string"==typeof t&&(t=new P(t)),this.Collection.splice(e,1,t),i&&(this.Index=0)}SetVerticalPosition(e){this._arrowLeft.Pos=new U(300+this.Offset.X+this.Parent.WidthOffset,147+e+this.Offset.Y),this._arrowRight.Pos=new U(400+this.Offset.X+this.Parent.WidthOffset,147+e+this.Offset.Y),this._itemText.Pos=new U(300+this.Offset.X+this.Parent.WidthOffset,e+147+this.Offset.Y),super.SetVerticalPosition(e)}SetRightLabel(e){return this}SetRightBadge(e){return this}Draw(){super.Draw();const e=this.Collection.length>=this.Index?this.Collection[this.Index].DisplayText:" ",t=this._currentOffset;this._itemText.Color=this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this._itemText.Caption=e,this._arrowLeft.Color=this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this._arrowRight.Color=this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this._arrowLeft.Pos=new U(380-t+this.Offset.X+this.Parent.WidthOffset,this._arrowLeft.Pos.Y),this.Selected?(this._arrowLeft.Draw(),this._arrowRight.Draw(),this._itemText.Pos=new U(405+this.Offset.X+this.Parent.WidthOffset,this._itemText.Pos.Y)):this._itemText.Pos=new U(420+this.Offset.X+this.Parent.WidthOffset,this._itemText.Pos.Y),this._itemText.Draw()}}Number.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};class M extends E{constructor(e,t="",i=0,s=10,n=0,h=null){super(e,t,h),this._currentOffset=0,this._leftMoveThreshold=1,this._rightMoveThreshold=1,this._lowerThreshold=0,this._upperThreshold=10,this._preCaptionText="",this._postCaptionText="";this.LowerThreshold=i,this.UpperThreshold=i>s?i:s,this.SelectedValue=ns?i:n,this._arrowLeft=new p("commonmenu","arrowleft",new U(110,105),new L(30,30)),this._arrowRight=new p("commonmenu","arrowright",new U(280,105),new L(30,30)),this._itemText=new g("",new U(290,104),.35,d.White,r.ChaletLondon,l.Right)}get PreCaptionText(){return this._preCaptionText}set PreCaptionText(e){if(!e)throw new Error("The pre caption text can't be null");if("string"!=typeof e)throw new Error("The pre caption text must be a string");this._preCaptionText=e,this._currentOffset=S.GetTextWidth(this.PreCaptionText+this._selectedValue.toString()+this.PostCaptionText,this._itemText&&this._itemText.Font?this._itemText.Font:0,.35)}get PostCaptionText(){return this._postCaptionText}set PostCaptionText(e){if(!e)throw new Error("The post caption text can't be null");if("string"!=typeof e)throw new Error("The post caption text must be a string");this._postCaptionText=e,this._currentOffset=S.GetTextWidth(this.PreCaptionText+this._selectedValue.toString()+this.PostCaptionText,this._itemText&&this._itemText.Font?this._itemText.Font:0,.35)}get LeftMoveThreshold(){return this._leftMoveThreshold}set LeftMoveThreshold(e){if(!e)throw new Error("The left threshold can't be null");this._leftMoveThreshold=e}get RightMoveThreshold(){return this._rightMoveThreshold}set RightMoveThreshold(e){if(!e)throw new Error("The right threshold can't be null");this._rightMoveThreshold=e}get LowerThreshold(){return this._lowerThreshold}set LowerThreshold(e){if("number"!=typeof e&&!e)throw new Error("The lower threshold can't be null");this._lowerThreshold=e,this.SelectedValuee&&(this.SelectedValue=e)}get SelectedValue(){return this._selectedValue}set SelectedValue(e){if(ethis._upperThreshold)throw new Error("The value can not be outside the lower or upper limits");var t;this._selectedValue=(t=e,Number.isInteger(t)?t:parseFloat(t.toFixed(10))),this._currentOffset=S.GetTextWidth(this.PreCaptionText+this._selectedValue.toString()+this.PostCaptionText,this._itemText&&this._itemText.Font?this._itemText.Font:0,this._itemText&&this._itemText.Scale?this._itemText.Scale:.35)}SetVerticalPosition(e){this._arrowLeft.Pos=new U(300+this.Offset.X+this.Parent.WidthOffset,147+e+this.Offset.Y),this._arrowRight.Pos=new U(400+this.Offset.X+this.Parent.WidthOffset,147+e+this.Offset.Y),this._itemText.Pos=new U(300+this.Offset.X+this.Parent.WidthOffset,e+147+this.Offset.Y),super.SetVerticalPosition(e)}SetRightLabel(e){return this}SetRightBadge(e){return this}Draw(){super.Draw();const e=this._currentOffset;this._itemText.Color=this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this._itemText.Caption=this.PreCaptionText+this._selectedValue+this.PostCaptionText,this._arrowLeft.Color=this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this._arrowRight.Color=this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this._arrowLeft.Pos=new U(380-e+this.Offset.X+this.Parent.WidthOffset,this._arrowLeft.Pos.Y),this.Selected?(this._arrowLeft.Draw(),this._arrowRight.Draw(),this._itemText.Pos=new U(405+this.Offset.X+this.Parent.WidthOffset,this._itemText.Pos.Y)):this._itemText.Pos=new U(420+this.Offset.X+this.Parent.WidthOffset,this._itemText.Pos.Y),this._itemText.Draw()}}class x extends E{constructor(e,t,i,s="",n=!1,h=null){super(e,s,h);this._items=t,this._arrowLeft=new p("commonmenutu","arrowleft",new U(0,105),new L(15,15)),this._arrowRight=new p("commonmenutu","arrowright",new U(0,105),new L(15,15)),this._rectangleBackground=new T(new U(0,0),new L(150,9),new d(4,32,57,255)),this._rectangleSlider=new T(new U(0,0),new L(75,9),new d(57,116,200,255)),this._rectangleDivider=new T(new U(0,0),new L(2.5,20),n?d.WhiteSmoke:d.Transparent),this.Index=i}get Index(){return this._index%this._items.length}set Index(e){this._index=1e8-1e8%this._items.length+e}SetVerticalPosition(e){this._rectangleBackground.Pos=new U(250+this.Offset.X+this.Parent.WidthOffset,e+158.5+this.Offset.Y),this._rectangleSlider.Pos=new U(250+this.Offset.X+this.Parent.WidthOffset,e+158.5+this.Offset.Y),this._rectangleDivider.Pos=new U(323.5+this.Offset.X+this.Parent.WidthOffset,e+153+this.Offset.Y),this._arrowLeft.Pos=new U(235+this.Offset.X+this.Parent.WidthOffset,155.5+e+this.Offset.Y),this._arrowRight.Pos=new U(400+this.Offset.X+this.Parent.WidthOffset,155.5+e+this.Offset.Y),super.SetVerticalPosition(e)}IndexToItem(e){return this._items[e]}Draw(){super.Draw(),this._arrowLeft.Color=this.Enabled?this.Selected?d.Black:d.WhiteSmoke:new d(163,159,148),this._arrowRight.Color=this.Enabled?this.Selected?d.Black:d.WhiteSmoke:new d(163,159,148);let e=(this._rectangleBackground.Size.Width-this._rectangleSlider.Size.Width)/(this._items.length-1)*this.Index;this._rectangleSlider.Pos=new U(250+this.Offset.X+e+ +this.Parent.WidthOffset,this._rectangleSlider.Pos.Y),this.Selected&&(this._arrowLeft.Draw(),this._arrowRight.Draw()),this._rectangleBackground.Draw(),this._rectangleSlider.Draw(),this._rectangleDivider.Draw()}SetRightBadge(e){}SetRightLabel(e){}}class N extends f{constructor(e,t,i){super(e,t,i),this.Items=[]}addItem(e){this.Items.push(e)}Draw(e){if(!this.Enabled)return;e=e||new L;const t=1080*(S.Width/S.Height),s=this.Size.Width/t,n=this.Size.Height/1080,h=(this.Pos.X+e.Width)/t+.5*s,o=(this.Pos.Y+e.Height)/1080+.5*n;for(var r of(i.drawRect(h,o,s,n,this.Color.R,this.Color.G,this.Color.B,this.Color.A,!1),this.Items))r.Draw(new L(this.Pos.X+e.Width,this.Pos.Y+e.Height))}}class y{static PlaySound(e,t){i.playSound(-1,e,t,!1,0,!0)}}class V{constructor(){this.handlers=[]}on(e){this.handlers.push(e)}off(e){this.handlers=this.handlers.filter(t=>t!==e)}emit(...e){this.handlers.slice(0).forEach(t=>t(...e))}expose(){return this}count(){return this.handlers.length}}class b{constructor(e,t,i=null){this._itemBind=null,this.Text=e,this._buttonControl=t,this._usingControls=null==i,this._buttonString=i}get ItemBind(){return this._itemBind}BindToItem(e){this._itemBind=e}GetButtonId(){return this._usingControls?i.getControlInstructionalButtonsString(2,this._buttonControl,!1):"t_"+this._buttonString}}class F{constructor(e){this._handle=0,this.scaleForm=e,this._handle=t.requestScaleformMovie(this.scaleForm)}get handle(){return this._handle}get isValid(){return 0!=this._handle}get isLoaded(){return t.hasScaleformMovieLoaded(this._handle)}callFunctionHead(i,...s){this.isValid&&this.isLoaded&&(t.beginScaleformMovieMethod(this._handle,i),s.forEach(i=>{switch(typeof i){case"number":Number(i)===i&&i%1!=0?t.scaleformMovieMethodAddParamFloat(i):t.scaleformMovieMethodAddParamInt(i);case"string":t.scaleformMovieMethodAddParamPlayerNameString(i);break;case"boolean":t.scaleformMovieMethodAddParamBool(i);break;default:e.logError(`Unknown argument type ${typeof i} = ${i.toString()} passed to scaleform with handle ${this._handle}`)}}))}callFunction(e,...i){this.callFunctionHead(e,...i),t.endScaleformMovieMethod()}callFunctionReturn(e,...i){return this.callFunctionHead(e,...i),t.endScaleformMovieMethodReturnValue()}render2D(){this.isValid&&this.isLoaded&&t.drawScaleformMovieFullscreen(this._handle,255,255,255,255,0)}recreate(){this.isValid&&this.isLoaded&&(t.setScaleformMovieAsNoLongerNeeded(this._handle),this._handle=t.requestScaleformMovie(this.scaleForm))}destroy(){this.isValid&&(t.setScaleformMovieAsNoLongerNeeded(this._handle),this._handle=0)}}class Y{static Initialize(e,t){this._transitionOutAnimName=t,this._scaleform=new F(e)}static get IsVisible(){return this._messageVisible}static get Scaleform(){return this._scaleform}static Load(){null!=this._delayedTransitionInTimeout&&(e.clearTimeout(this._delayedTransitionInTimeout),this._delayedTransitionInTimeout=null)}static SetDelayedTransition(t,i){this._delayedTransitionInTimeout=e.setTimeout(()=>{this._delayedTransitionInTimeout=null,this.TransitionIn(t,i)},this._transitionOutTimeMs)}static ShowCustomShard(e,t=5e3,...i){this.ShowComplexCustomShard(()=>{this._scaleform.callFunction(e,...i)},t)}static ShowComplexCustomShard(e,t=5e3){this.Load(),this._messageVisible?(this.TransitionOut(),this.SetDelayedTransition(()=>e(),t)):this.TransitionIn(e,t)}static TransitionOut(){this._messageVisible&&(null!=this._transitionOutTimeout&&(e.clearTimeout(this._transitionOutTimeout),this._transitionOutTimeout=null),null!=this._transitionOutFinishedTimeout&&(e.clearTimeout(this._transitionOutFinishedTimeout),this._transitionOutFinishedTimeout=null),this._scaleform.callFunction(this._transitionOutAnimName),this._transitionOutFinishedTimeout=e.setTimeout(()=>{this._messageVisible=!1,this._scaleform.recreate()},this._transitionOutTimeMs))}static TransitionIn(e,t=500){this._messageVisible=!0,e(),this.SetTransitionOutTimer(t)}static SetTransitionOutTimer(t){this._transitionOutTimeout=e.setTimeout(()=>{this._transitionOutTimeout=null,this.TransitionOut()},t)}static Render(){this._messageVisible&&this._scaleform.render2D()}}Y._messageVisible=!1,Y._transitionOutTimeout=null,Y._transitionOutFinishedTimeout=null,Y._delayedTransitionInTimeout=null,Y._scaleform=null,Y._transitionOutTimeMs=500,Y._transitionOutAnimName=null;class v extends Y{static Initialize(t,i){super.Initialize(t,i),e.everyTick(()=>this.Render())}static ShowMissionPassedMessage(e,t="",i=5e3){this.ShowCustomShard("SHOW_MISSION_PASSED_MESSAGE",i,e,t,100,!0,0,!0)}static ShowColoredShard(e,t,i,s,n=5e3){this.ShowCustomShard("SHOW_SHARD_CENTERED_MP_MESSAGE",n,e,t,s,i)}static ShowOldMessage(e,t=5e3){this.ShowCustomShard("SHOW_MISSION_PASSED_MESSAGE",t,e)}static ShowSimpleShard(e,t="",i=5e3){this.ShowCustomShard("SHOW_SHARD_CREW_RANKUP_MP_MESSAGE",i,e,t)}static ShowRankupMessage(e,t,i,s=5e3){this.ShowCustomShard("SHOW_BIG_MP_MESSAGE",s,e,t,i,"","")}static ShowPlaneMessage(e,t,i,s=5e3){this.ShowCustomShard("SHOW_PLANE_MESSAGE",s,e,t,i,"","")}static ShowWeaponPurchasedMessage(e,t,i,s=5e3){this.ShowCustomShard("SHOW_WEAPON_PURCHASED",s,e,t,i,"",100)}static ShowWastedMessage(e,t,i,s,n=5e3){this.ShowCustomShard("SHOW_SHARD_WASTED_MP_MESSAGE",n,e,t,i,s)}static ShowMpMessageLarge(e,t="",i=5e3){this.ShowComplexCustomShard(()=>{this.Scaleform.callFunction("SHOW_CENTERED_MP_MESSAGE_LARGE",e,t,100,!0,100),this.Scaleform.callFunction("TRANSITION_IN")},i)}}v.Initialize("MP_BIG_MESSAGE_FREEMODE","TRANSITION_OUT");class W extends Y{static Initialize(t,i){super.Initialize(t,i),e.everyTick(()=>this.Render())}static ShowMidsizedMessage(e,t="",i=5e3){this.ShowCustomShard("SHOW_MIDSIZED_MESSAGE",i,e,t)}static ShowBridgesKnivesProgress(e,t,i,s,n,h=5e3){this.ShowCustomShard("SHOW_BRIDGES_KNIVES_PROGRESS",h,e,t,i,s,n)}static ShowCondensedShardMessage(e,t,i,s,n=5e3){this.ShowCustomShard("SHOW_COND_SHARD_MESSAGE",n,e,t,i,s)}static ShowMidsizedShardMessage(e,t,i,s,n,h=5e3){this.ShowCustomShard("SHOW_SHARD_MIDSIZED_MESSAGE",h,e,t,i,s,n)}}W.Initialize("MIDSIZED_MESSAGE","SHARD_ANIM_OUT");class k extends E{constructor(t,i,s="",n=null,h=null){super(t,s,h),this._currentOffset=0,this._precaptionText="",this._selectedStartValueHandler=null,this.SelectionChangeHandler=null,this.isVariableFunction(i)||e.logError(`[UIMenuDynamicListItem] ${t} is not created with a valid selectionChangeHandler, needs to be function. Please see docs.`),this.isVariableFunction(n)||e.logError(`[UIMenuDynamicListItem] ${t} is not created with a valid selectedStartValueHandler, needs to be function. Please see docs.`),this.SelectionChangeHandler=i,this._selectedStartValueHandler=n;this._arrowLeft=new p("commonmenu","arrowleft",new U(110,105),new L(30,30)),this._arrowRight=new p("commonmenu","arrowright",new U(280,105),new L(30,30)),this._itemText=new g("",new U(290,104),.35,d.White,r.ChaletLondon,l.Right)}SelectionChangeHandlerPromise(e,t,i){return new Promise((s,n)=>{s(this.SelectionChangeHandler(e,t,i))})}get PreCaptionText(){return this._precaptionText}set PreCaptionText(e){if(!e)throw new Error("The pre caption text can't be null");if("string"!=typeof e)throw new Error("The pre caption text must be a string");this._precaptionText=e,this._currentOffset=S.GetTextWidth(this.PreCaptionText+this._selectedValue,this._itemText&&this._itemText.Font?this._itemText.Font:0,.35)}get SelectedValue(){return this._selectedValue}set SelectedValue(e){this._selectedValue=e,null!=e&&(this._currentOffset=S.GetTextWidth(this.PreCaptionText+this._selectedValue,this._itemText&&this._itemText.Font?this._itemText.Font:0,this._itemText&&this._itemText.Scale?this._itemText.Scale:.35))}SetVerticalPosition(e){this._arrowLeft.Pos=new U(300+this.Offset.X+this.Parent.WidthOffset,147+e+this.Offset.Y),this._arrowRight.Pos=new U(400+this.Offset.X+this.Parent.WidthOffset,147+e+this.Offset.Y),this._itemText.Pos=new U(300+this.Offset.X+this.Parent.WidthOffset,e+147+this.Offset.Y),super.SetVerticalPosition(e)}SetRightLabel(e){return this}SetRightBadge(e){return this}Draw(){super.Draw(),null==this._selectedValue&&(null!=this._selectedStartValueHandler?this.SelectedValue=this._selectedStartValueHandler():this._selectedValue="");const e=this._currentOffset;this._itemText.Color=this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this._itemText.Caption=this.PreCaptionText+this._selectedValue,this._arrowLeft.Color=this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this._arrowRight.Color=this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this._arrowLeft.Pos=new U(380-e+this.Offset.X+this.Parent.WidthOffset,this._arrowLeft.Pos.Y),this.Selected?(this._arrowLeft.Draw(),this._arrowRight.Draw(),this._itemText.Pos=new U(405+this.Offset.X+this.Parent.WidthOffset,this._itemText.Pos.Y)):this._itemText.Pos=new U(420+this.Offset.X+this.Parent.WidthOffset,this._itemText.Pos.Y),this._itemText.Draw()}isVariableFunction(e){return e&&"[object Function]"==={}.toString.call(e)}}let B=[];class G{constructor(t,i,s,n,h){this._visible=!0,this._counterPretext="",this._counterOverride=void 0,this._lastUpDownNavigation=0,this._lastLeftRightNavigation=0,this._extraOffset=0,this._buttonsEnabled=!0,this._justOpened=!0,this._justOpenedFromPool=!1,this._justClosedFromPool=!1,this._poolOpening=null,this._safezoneOffset=new U(0,0),this._activeItem=1e3,this._maxItemsOnScreen=9,this._maxItem=this._maxItemsOnScreen,this._mouseEdgeEnabled=!0,this._bannerSprite=null,this._bannerRectangle=null,this._recalculateDescriptionNextFrame=1,this._instructionalButtons=[],this._defaultTitleScale=1.15,this._maxMenuItems=1e3,this.Id=I(),this.SelectTextLocalized=e.getGxtText("HUD_INPUT2"),this.BackTextLocalized=e.getGxtText("HUD_INPUT3"),this.WidthOffset=0,this.ParentMenu=null,this.ParentItem=null,this.MouseControlsEnabled=!1,this.CloseableByUser=!0,this.AUDIO_LIBRARY="HUD_FRONTEND_DEFAULT_SOUNDSET",this.AUDIO_UPDOWN="NAV_UP_DOWN",this.AUDIO_LEFTRIGHT="NAV_LEFT_RIGHT",this.AUDIO_SELECT="SELECT",this.AUDIO_BACK="BACK",this.AUDIO_ERROR="ERROR",this.MenuItems=[],this.IndexChange=new V,this.ListChange=new V,this.AutoListChange=new V,this.DynamicListChange=new V,this.SliderChange=new V,this.CheckboxChange=new V,this.ItemSelect=new V,this.MenuOpen=new V,this.MenuClose=new V,this.MenuChange=new V,s instanceof U||(s=U.Parse(s)),this._spriteLibrary=n||"commonmenu",this._spriteName=h||"interaction_bgd",this._offset=new U(s.X,s.Y),this.Children=new Map,this._instructionalButtonsScaleform=new F("instructional_buttons"),this.UpdateScaleform(),this._mainMenu=new N(new U(0,0),new L(700,500),new d(0,0,0,0)),this._bannerSprite=new p(this._spriteLibrary,this._spriteName,new U(0+this._offset.X,0+this._offset.Y),new L(431,107)),this._mainMenu.addItem(this._titleResText=new g(t,new U(215+this._offset.X,20+this._offset.Y),this._defaultTitleScale,new d(255,255,255),1,l.Centered)),""!==i&&(this._mainMenu.addItem(new T(new U(0+this._offset.X,107+this._offset.Y),new L(431,37),new d(0,0,0,255))),this._mainMenu.addItem(this._subtitleResText=new g(i,new U(8+this._offset.X,110+this._offset.Y),.35,new d(255,255,255),0,l.Left)),i.startsWith("~")&&(this._counterPretext=i.substr(0,3)),this._counterText=new g("",new U(425+this._offset.X,110+this._offset.Y),.35,new d(255,255,255),0,l.Right),this._extraOffset+=37),this._upAndDownSprite=new p("commonmenu","shop_arrows_upanddown",new U(190+this._offset.X,147+37*(this._maxItemsOnScreen+1)+this._offset.Y-37+this._extraOffset),new L(50,50)),this._extraRectangleUp=new T(new U(0+this._offset.X,144+38*(this._maxItemsOnScreen+1)+this._offset.Y-37+this._extraOffset),new L(431,18),new d(0,0,0,200)),this._extraRectangleDown=new T(new U(0+this._offset.X,162+38*(this._maxItemsOnScreen+1)+this._offset.Y-37+this._extraOffset),new L(431,18),new d(0,0,0,200)),this._descriptionBar=new T(new U(this._offset.X,123),new L(431,4),d.Black),this._descriptionRectangle=new p("commonmenu","gradient_bgd",new U(this._offset.X,127),new L(431,30)),this._descriptionText=new g("",new U(this._offset.X+5,125),.35,new d(255,255,255,255),r.ChaletLondon,l.Left),this._descriptionText.Wrap=400,this._background=new p("commonmenu","gradient_bgd",new U(this._offset.X,144+this._offset.Y-37+this._extraOffset),new L(290,25)),this._visible=!1,e.everyTick(this.render.bind(this))}GetSpriteBanner(){return this._bannerSprite}GetRectangleBanner(){return this._bannerRectangle}GetTitle(){return this._titleResText}get MaxItemsVisible(){return this._maxItemsOnScreen}set MaxItemsVisible(e){this._maxItemsOnScreen=e,this._maxItem=e}get Title(){return this._titleResText.Caption}set Title(e){this._titleResText.Caption=e}get GetSubTitle(){return this._subtitleResText}get SubTitle(){return this._subtitleResText.Caption}set SubTitle(e){this._subtitleResText.Caption=e}get Visible(){return this._visible}set Visible(e){if(this._visible=e,y.PlaySound(this.AUDIO_BACK,this.AUDIO_LIBRARY),this.UpdateScaleform(),e&&this.UpdateDescriptionCaption(),!0!==this._justOpenedFromPool)if(e){if(this._justOpened=!0,this.MenuOpen.emit(),null===this.ParentMenu&&!B.includes(this)&&this!==this._poolOpening){const e=B.length?B[B.length-1]:null;B.push(this),e!==this._poolOpening&&null!==e&&(e._justClosedFromPool=!0,e.Visible=!1)}}else{if(!0===this._justClosedFromPool)return void(this._justClosedFromPool=!1);null===this.ParentMenu&&B.includes(this)&&B.length&&(B[B.length-1]===this&&(B.pop(),this._justOpenedFromPool=!0,B.length||(this._poolOpening=null)),B.length&&(this._poolOpening=B[B.length-1],B[B.length-1].Visible=!0)),0===B.length&&i.setMouseCursorStyle(1)}else this._justOpenedFromPool=!1}get CurrentSelection(){return this._activeItem%this.MenuItems.length}set CurrentSelection(e){this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!1,this._activeItem=this._maxMenuItems-this._maxMenuItems%this.MenuItems.length+e,this.CurrentSelection>this._maxItem?(this._maxItem=this.CurrentSelection,this._minItem=this.CurrentSelection-this._maxItemsOnScreen):this.CurrentSelectionthis._maxItemsOnScreen+1?this._maxItemsOnScreen+2:this.MenuItems.length;this._descriptionBar.Size=new L(431+this.WidthOffset,4),this._descriptionRectangle.Size=new L(431+this.WidthOffset,30),this._descriptionBar.Pos=new U(this._offset.X,112+this._extraOffset+this._offset.Y),this._descriptionRectangle.Pos=new U(this._offset.X,112+this._extraOffset+this._offset.Y),this._descriptionText.Pos=new U(this._offset.X+8,118+this._extraOffset+this._offset.Y),this._descriptionBar.Pos=new U(this._offset.X,38*e+this._descriptionBar.Pos.Y),this._descriptionRectangle.Pos=new U(this._offset.X,38*e+this._descriptionRectangle.Pos.Y),this._descriptionText.Pos=new U(this._offset.X+8,38*e+this._descriptionText.Pos.Y)}SetMenuWidthOffset(e){if(this.WidthOffset=e,null!=this._bannerSprite&&(this._bannerSprite.Size=new L(431+this.WidthOffset,107)),this._mainMenu.Items[0].pos=new U(215+this._offset.X+this.WidthOffset/2,20+this._offset.Y),this._counterText&&(this._counterText.Pos=new U(425+this._offset.X+e,110+this._offset.Y)),this._mainMenu.Items.length>=2){this._mainMenu.Items[1].size=new L(431+this.WidthOffset,37)}null!=this._bannerRectangle&&(this._bannerRectangle.Size=new L(431+this.WidthOffset,107))}AddItem(e){this._justOpened&&(this._justOpened=!1),e.Offset=this._offset,e.Parent=this,e.SetVerticalPosition(25*this.MenuItems.length-37+this._extraOffset),this.MenuItems.push(e),this.RefreshIndex()}RemoveItem(e){for(let t=0;t{e.Close(!0)}),this.MenuItems.filter(e=>e instanceof k).forEach(e=>{e.SelectedValue=void 0}),this.RefreshIndex()}Close(e=!1){this.Visible=!1,this.CleanUp(e),this.MenuClose.emit(!0)}GoLeft(){if((this.MenuItems[this.CurrentSelection]instanceof H||this.MenuItems[this.CurrentSelection]instanceof M||this.MenuItems[this.CurrentSelection]instanceof k||this.MenuItems[this.CurrentSelection]instanceof x)&&this.MenuItems[this.CurrentSelection].Enabled)if(this.MenuItems[this.CurrentSelection]instanceof H){const e=this.MenuItems[this.CurrentSelection];if(0==e.Collection.length)return;e.Index--,y.PlaySound(this.AUDIO_LEFTRIGHT,this.AUDIO_LIBRARY),this.ListChange.emit(e,e.Index),this.UpdateDescriptionCaption()}else if(this.MenuItems[this.CurrentSelection]instanceof M){const e=this.MenuItems[this.CurrentSelection];e.SelectedValue<=e.LowerThreshold?e.SelectedValue=e.UpperThreshold:e.SelectedValue-=e.LeftMoveThreshold,y.PlaySound(this.AUDIO_LEFTRIGHT,this.AUDIO_LIBRARY),this.AutoListChange.emit(e,e.SelectedValue,u.Left),this.UpdateDescriptionCaption()}else if(this.MenuItems[this.CurrentSelection]instanceof k){const e=this.MenuItems[this.CurrentSelection];e.SelectionChangeHandlerPromise(e,e.SelectedValue,u.Left).then(t=>{e.SelectedValue=t,this.DynamicListChange.emit(e,e.SelectedValue,u.Left)}),y.PlaySound(this.AUDIO_LEFTRIGHT,this.AUDIO_LIBRARY),this.UpdateDescriptionCaption()}else if(this.MenuItems[this.CurrentSelection]instanceof x){const e=this.MenuItems[this.CurrentSelection];e.Index=e.Index-1,y.PlaySound(this.AUDIO_LEFTRIGHT,this.AUDIO_LIBRARY),this.SliderChange.emit(e,e.Index,e.IndexToItem(e.Index)),this.UpdateDescriptionCaption()}}GoRight(){if((this.MenuItems[this.CurrentSelection]instanceof H||this.MenuItems[this.CurrentSelection]instanceof M||this.MenuItems[this.CurrentSelection]instanceof k||this.MenuItems[this.CurrentSelection]instanceof x)&&this.MenuItems[this.CurrentSelection].Enabled)if(this.MenuItems[this.CurrentSelection]instanceof H){const e=this.MenuItems[this.CurrentSelection];if(0==e.Collection.length)return;e.Index++,y.PlaySound(this.AUDIO_LEFTRIGHT,this.AUDIO_LIBRARY),this.ListChange.emit(e,e.Index),this.UpdateDescriptionCaption()}else if(this.MenuItems[this.CurrentSelection]instanceof M){const e=this.MenuItems[this.CurrentSelection];e.SelectedValue>=e.UpperThreshold?e.SelectedValue=e.LowerThreshold:e.SelectedValue+=e.RightMoveThreshold,y.PlaySound(this.AUDIO_LEFTRIGHT,this.AUDIO_LIBRARY),this.AutoListChange.emit(e,e.SelectedValue,u.Right),this.UpdateDescriptionCaption()}else if(this.MenuItems[this.CurrentSelection]instanceof k){const e=this.MenuItems[this.CurrentSelection];e.SelectionChangeHandlerPromise(e,e.SelectedValue,u.Right).then(t=>{e.SelectedValue=t,this.DynamicListChange.emit(e,e.SelectedValue,u.Right)}),y.PlaySound(this.AUDIO_LEFTRIGHT,this.AUDIO_LIBRARY),this.UpdateDescriptionCaption()}else if(this.MenuItems[this.CurrentSelection]instanceof x){const e=this.MenuItems[this.CurrentSelection];e.Index++,y.PlaySound(this.AUDIO_LEFTRIGHT,this.AUDIO_LIBRARY),this.SliderChange.emit(e,e.Index,e.IndexToItem(e.Index)),this.UpdateDescriptionCaption()}}SelectItem(){if(!this.MenuItems[this.CurrentSelection].Enabled)return void y.PlaySound(this.AUDIO_ERROR,this.AUDIO_LIBRARY);const e=this.MenuItems[this.CurrentSelection];if(y.PlaySound(this.AUDIO_SELECT,this.AUDIO_LIBRARY),this.ItemSelect.emit(e,this.CurrentSelection),this.MenuItems[this.CurrentSelection]instanceof A)e.Checked=!e.Checked,this.CheckboxChange.emit(e,e.Checked);else if(this.Children.has(e.Id)){const t=this.Children.get(e.Id);this.Visible=!1,t.Visible=!0,this.MenuChange.emit(t,!0)}e.fireEvent()}HasCurrentSelectionChildren(){const e=this.MenuItems[this.CurrentSelection];return!!(this.MenuItems[this.CurrentSelection]instanceof E&&this.Children.has(e.Id))}IsMouseInListItemArrows(e,t,s){i.beginTextCommandGetScreenWidthOfDisplayText("jamyfafi"),i.addTextComponentSubstringPlayerName(e.Text);let n=S.ResolutionMaintainRatio;let h=1080*(n.Width/n.Height);const o=5+i.endTextCommandGetScreenWidthOfDisplayText(!1)*h*.35+10,r=431-o;return S.IsMouseInBounds(t,new L(o,38))?1:S.IsMouseInBounds(new U(t.X+o,t.Y),new L(r,38))?2:0}ProcessMouse(){if(!this.Visible||this._justOpened||0==this.MenuItems.length||!this.MouseControlsEnabled)return void this.MenuItems.filter(e=>e.Hovered).forEach(e=>e.Hovered=!1);e.showCursor(!0);let t=this.MenuItems.length-1,s=0;this.MenuItems.length>this._maxItemsOnScreen+1&&(t=this._maxItem),S.IsMouseInBounds(new U(0,0),new L(30,1080))&&this._mouseEdgeEnabled?(i.setGameplayCamRelativeHeading(i.getGameplayCamRelativeHeading()+5),i.setMouseCursorStyle(6)):S.IsMouseInBounds(new U(S.ResolutionMaintainRatio.Width-30,0),new L(30,1080))&&this._mouseEdgeEnabled?(i.setGameplayCamRelativeHeading(i.getGameplayCamRelativeHeading()-5),i.setMouseCursorStyle(7)):this._mouseEdgeEnabled&&i.setMouseCursorStyle(1);for(let e=this._minItem;e<=t;e++){let t=this._offset.X,n=this._offset.Y+144-37+this._extraOffset+38*s,h=431+this.WidthOffset;const o=38,r=this.MenuItems[e];if(S.IsMouseInBounds(new U(t,n),new L(h,o))){r.Hovered=!0;const s=this.IsMouseInListItemArrows(this.MenuItems[e],new U(t,n),0);if(r.Hovered&&1==s&&(this.MenuItems[e]instanceof H||this.MenuItems[e]instanceof M||this.MenuItems[e]instanceof k)&&i.setMouseCursorStyle(5),i.isControlJustReleased(0,24)||i.isDisabledControlJustReleased(0,24))if(r.Selected&&r.Enabled)if((this.MenuItems[e]instanceof H||this.MenuItems[e]instanceof M||this.MenuItems[e]instanceof k)&&this.IsMouseInListItemArrows(this.MenuItems[e],new U(t,n),0)>0)switch(s){case 1:y.PlaySound(this.AUDIO_SELECT,this.AUDIO_LIBRARY),this.MenuItems[e].fireEvent(),this.ItemSelect.emit(this.MenuItems[e],e);break;case 2:let t=this.MenuItems[e];(null==t.Collection?t.Items.Count:t.Collection.Count)>0&&(t.Index++,y.PlaySound(this.AUDIO_LEFTRIGHT,this.AUDIO_LIBRARY),this.ListChange.emit(t,t.Index))}else this.SelectItem();else r.Selected?!r.Enabled&&r.Selected&&y.PlaySound(this.AUDIO_ERROR,this.AUDIO_LIBRARY):(this.CurrentSelection=e,y.PlaySound(this.AUDIO_UPDOWN,this.AUDIO_LIBRARY),this.IndexChange.emit(this.CurrentSelection,this.MenuItems[this._activeItem%this.MenuItems.length]),this.SelectItem(),this.UpdateDescriptionCaption(),this.UpdateScaleform())}else r.Hovered=!1;s++}const n=144+38*(this._maxItemsOnScreen+1)+this._offset.Y-37+this._extraOffset+this._safezoneOffset.Y,h=this._safezoneOffset.X+this._offset.X;this.MenuItems.length<=this._maxItemsOnScreen+1||(S.IsMouseInBounds(new U(h,n),new L(431+this.WidthOffset,18))?(this._extraRectangleUp.Color=new d(30,30,30,255),(i.isControlJustPressed(0,24)||i.isDisabledControlJustPressed(0,24))&&(this.MenuItems.length>this._maxItemsOnScreen+1?this.GoUpOverflow():this.GoUp())):this._extraRectangleUp.Color=new d(0,0,0,200),S.IsMouseInBounds(new U(h,n+18),new L(431+this.WidthOffset,18))?(this._extraRectangleDown.Color=new d(30,30,30,255),(i.isControlJustPressed(0,24)||i.isDisabledControlJustPressed(0,24))&&(this.MenuItems.length>this._maxItemsOnScreen+1?this.GoDownOverflow():this.GoDown())):this._extraRectangleDown.Color=new d(0,0,0,200))}ProcessControl(){this.Visible&&(this._justOpened?this._justOpened=!1:(i.isControlJustReleased(0,177)&&this.GoBack(),0!=this.MenuItems.length&&(i.isControlPressed(0,172)&&this._lastUpDownNavigation+120this._maxItemsOnScreen+1?this.GoUpOverflow():this.GoUp(),this.UpdateScaleform()):i.isControlJustReleased(0,172)?this._lastUpDownNavigation=0:i.isControlPressed(0,173)&&this._lastUpDownNavigation+120this._maxItemsOnScreen+1?this.GoDownOverflow():this.GoDown(),this.UpdateScaleform()):i.isControlJustReleased(0,173)?this._lastUpDownNavigation=0:i.isControlPressed(0,174)&&this._lastLeftRightNavigation+100this._maxItemsOnScreen+1||(this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!1,this._activeItem--,this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!0,y.PlaySound(this.AUDIO_UPDOWN,this.AUDIO_LIBRARY),this.IndexChange.emit(this.CurrentSelection,this.MenuItems[this._activeItem%this.MenuItems.length]),this.UpdateDescriptionCaption())}GoDownOverflow(){this.MenuItems.length<=this._maxItemsOnScreen+1||(this._activeItem%this.MenuItems.length>=this._maxItem?this._activeItem%this.MenuItems.length==this.MenuItems.length-1?(this._minItem=0,this._maxItem=this._maxItemsOnScreen,this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!1,this._activeItem=this._maxMenuItems-this._maxMenuItems%this.MenuItems.length,this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!0):(this._minItem++,this._maxItem++,this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!1,this._activeItem++,this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!0):(this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!1,this._activeItem++,this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!0),y.PlaySound(this.AUDIO_UPDOWN,this.AUDIO_LIBRARY),this.IndexChange.emit(this.CurrentSelection,this.MenuItems[this._activeItem%this.MenuItems.length]),this.UpdateDescriptionCaption())}GoDown(){this.MenuItems.length>this._maxItemsOnScreen+1||(this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!1,this._activeItem++,this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!0,y.PlaySound(this.AUDIO_UPDOWN,this.AUDIO_LIBRARY),this.IndexChange.emit(this.CurrentSelection,this.MenuItems[this._activeItem%this.MenuItems.length]),this.UpdateDescriptionCaption())}GoBack(){null!=this.ParentMenu?(this.Visible=!1,this.ParentMenu.Visible=!0,this.MenuChange.emit(this.ParentMenu,!1),this.MenuClose.emit(!1)):this.CloseableByUser&&(this.Visible=!1,this.CleanUp(!0),this.MenuClose.emit(!1))}BindMenuToItem(e,t){this.MenuItems.includes(t)||this.AddItem(t),e.ParentMenu=this,e.ParentItem=t,this.Children.set(t.Id,e)}AddSubMenu(e,t){this.BindMenuToItem(e,t)}ReleaseMenuFromItem(e){if(!this.Children.has(e.Id))return!1;const t=this.Children.get(e.Id);return t.ParentItem=null,t.ParentMenu=null,this.Children.delete(e.Id),!0}UpdateDescriptionCaption(){this.MenuItems.length&&(this._descriptionText.Caption=this.MenuItems[this._activeItem%this.MenuItems.length].Description,this._descriptionText.Wrap=400,this._recalculateDescriptionNextFrame++)}CalculateDescription(){if(!(this.MenuItems.length<=0)&&(this._recalculateDescriptionNextFrame>0&&this._recalculateDescriptionNextFrame--,this.RecalculateDescriptionPosition(),this.MenuItems.length>0&&this._descriptionText.Caption&&""!==this.MenuItems[this._activeItem%this.MenuItems.length].Description.trim())){const e=S.GetLineCount(this._descriptionText.Caption,this._descriptionText.Pos,this._descriptionText.Font,this._descriptionText.Scale,this._descriptionText.Wrap);this._descriptionRectangle.Size=new L(431+this.WidthOffset,25*e+15),0===e&&this._recalculateDescriptionNextFrame++}}UpdateScaleform(){if(!this.Visible||!this._buttonsEnabled)return;this._instructionalButtonsScaleform.callFunction("CLEAR_ALL"),this._instructionalButtonsScaleform.callFunction("TOGGLE_MOUSE_BUTTONS",0),this._instructionalButtonsScaleform.callFunction("CREATE_CONTAINER"),this._instructionalButtonsScaleform.callFunction("SET_DATA_SLOT",0,i.getControlInstructionalButtonsString(2,c.PhoneSelect,!1),this.SelectTextLocalized),this._instructionalButtonsScaleform.callFunction("SET_DATA_SLOT",1,i.getControlInstructionalButtonsString(2,c.PhoneCancel,!1),this.BackTextLocalized);let e=2;this._instructionalButtons.filter(e=>null==e.ItemBind||this.MenuItems[this.CurrentSelection]==e.ItemBind).forEach(t=>{this._instructionalButtonsScaleform.callFunction("SET_DATA_SLOT",e,t.GetButtonId(),t.Text),e++}),this._instructionalButtonsScaleform.callFunction("DRAW_INSTRUCTIONAL_BUTTONS",-1)}render(){if(!this.Visible)return;this._buttonsEnabled&&(i.drawScaleformMovieFullscreen(this._instructionalButtonsScaleform.handle,255,255,255,255,0),i.hideHudComponentThisFrame(6),i.hideHudComponentThisFrame(7),i.hideHudComponentThisFrame(9)),this._justOpened&&(null==this._bannerSprite||this._bannerSprite.IsTextureDictionaryLoaded||this._bannerSprite.LoadTextureDictionary(),this._background.IsTextureDictionaryLoaded||this._background.LoadTextureDictionary(),this._descriptionRectangle.IsTextureDictionaryLoaded||this._descriptionRectangle.LoadTextureDictionary(),this._upAndDownSprite.IsTextureDictionaryLoaded||this._upAndDownSprite.LoadTextureDictionary(),this._recalculateDescriptionNextFrame||this._recalculateDescriptionNextFrame++),this._mainMenu.Draw(),this.ProcessMouse(),this.ProcessControl(),this._background.Size=this.MenuItems.length>this._maxItemsOnScreen+1?new L(431+this.WidthOffset,38*(this._maxItemsOnScreen+1)):new L(431+this.WidthOffset,38*this.MenuItems.length),this._background.Draw(),this._recalculateDescriptionNextFrame&&this.CalculateDescription(),this.MenuItems.length>0&&(this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!0,""!==this.MenuItems[this._activeItem%this.MenuItems.length].Description.trim()&&(this._descriptionBar.Draw(),this._descriptionRectangle.Draw(),this._descriptionText.Draw()));let e=0;if(this.MenuItems.length<=this._maxItemsOnScreen+1){for(const t of this.MenuItems)t.SetVerticalPosition(38*e-37+this._extraOffset),t.Draw(),e++;this._counterText&&this._counterOverride&&(this._counterText.Caption=this._counterPretext+this._counterOverride,this._counterText.Draw())}else{for(let t=this._minItem;t<=this._maxItem;t++){let i=this.MenuItems[t];i.SetVerticalPosition(38*e-37+this._extraOffset),i.Draw(),e++}if(this._extraRectangleUp.Size=new L(431+this.WidthOffset,18),this._extraRectangleDown.Size=new L(431+this.WidthOffset,18),this._upAndDownSprite.Pos=new U(190+this._offset.X+this.WidthOffset/2,147+37*(this._maxItemsOnScreen+1)+this._offset.Y-37+this._extraOffset),this._extraRectangleUp.Draw(),this._extraRectangleDown.Draw(),this._upAndDownSprite.Draw(),this._counterText){if(this._counterOverride)this._counterText.Caption=this._counterPretext+this._counterOverride;else{const e=this.CurrentSelection+1+" / "+this.MenuItems.length;this._counterText.Caption=this._counterPretext+e}this._counterText.Draw()}}null!=this._bannerRectangle&&this._bannerRectangle.Draw(),null!=this._bannerSprite&&this._bannerSprite.Draw()}}export{l as Alignment,h as BadgeStyle,v as BigMessage,u as ChangeDirection,d as Color,c as Control,r as Font,R as HudColor,b as InstructionalButton,w as ItemsCollection,P as ListItem,G as Menu,W as MidsizedMessage,U as Point,T as ResRectangle,L as Size,p as Sprite,M as UIMenuAutoListItem,A as UIMenuCheckboxItem,k as UIMenuDynamicListItem,E as UIMenuItem,H as UIMenuListItem,x as UIMenuSliderItem,G as default}; +import*as e from"alt-client";import*as t from"natives";import i from"natives";var s;!function(e){e[e.None=0]="None",e[e.BronzeMedal=1]="BronzeMedal",e[e.GoldMedal=2]="GoldMedal",e[e.SilverMedal=3]="SilverMedal",e[e.Alert=4]="Alert",e[e.Crown=5]="Crown",e[e.Ammo=6]="Ammo",e[e.Armour=7]="Armour",e[e.Barber=8]="Barber",e[e.Clothes=9]="Clothes",e[e.Franklin=10]="Franklin",e[e.Bike=11]="Bike",e[e.Car=12]="Car",e[e.Gun=13]="Gun",e[e.Heart=14]="Heart",e[e.Makeup=15]="Makeup",e[e.Mask=16]="Mask",e[e.Michael=17]="Michael",e[e.Star=18]="Star",e[e.Tattoo=19]="Tattoo",e[e.Trevor=20]="Trevor",e[e.Lock=21]="Lock",e[e.Tick=22]="Tick",e[e.Sale=23]="Sale",e[e.ArrowLeft=24]="ArrowLeft",e[e.ArrowRight=25]="ArrowRight",e[e.Audio1=26]="Audio1",e[e.Audio2=27]="Audio2",e[e.Audio3=28]="Audio3",e[e.AudioInactive=29]="AudioInactive",e[e.AudioMute=30]="AudioMute"}(s||(s={}));var n,o=s;!function(e){e[e.ChaletLondon=0]="ChaletLondon",e[e.HouseScript=1]="HouseScript",e[e.Monospace=2]="Monospace",e[e.CharletComprimeColonge=4]="CharletComprimeColonge",e[e.ChaletLondonFixedWidthNumbers=5]="ChaletLondonFixedWidthNumbers",e[e.Pricedown=7]="Pricedown"}(n||(n={}));var h,r=n;!function(e){e[e.Left=0]="Left",e[e.Centered=1]="Centered",e[e.Right=2]="Right"}(h||(h={}));var a,l=h;!function(e){e[e.NextCamera=0]="NextCamera",e[e.LookLeftRight=1]="LookLeftRight",e[e.LookUpDown=2]="LookUpDown",e[e.LookUpOnly=3]="LookUpOnly",e[e.LookDownOnly=4]="LookDownOnly",e[e.LookLeftOnly=5]="LookLeftOnly",e[e.LookRightOnly=6]="LookRightOnly",e[e.CinematicSlowMo=7]="CinematicSlowMo",e[e.FlyUpDown=8]="FlyUpDown",e[e.FlyLeftRight=9]="FlyLeftRight",e[e.ScriptedFlyZUp=10]="ScriptedFlyZUp",e[e.ScriptedFlyZDown=11]="ScriptedFlyZDown",e[e.WeaponWheelUpDown=12]="WeaponWheelUpDown",e[e.WeaponWheelLeftRight=13]="WeaponWheelLeftRight",e[e.WeaponWheelNext=14]="WeaponWheelNext",e[e.WeaponWheelPrev=15]="WeaponWheelPrev",e[e.SelectNextWeapon=16]="SelectNextWeapon",e[e.SelectPrevWeapon=17]="SelectPrevWeapon",e[e.SkipCutscene=18]="SkipCutscene",e[e.CharacterWheel=19]="CharacterWheel",e[e.MultiplayerInfo=20]="MultiplayerInfo",e[e.Sprint=21]="Sprint",e[e.Jump=22]="Jump",e[e.Enter=23]="Enter",e[e.Attack=24]="Attack",e[e.Aim=25]="Aim",e[e.LookBehind=26]="LookBehind",e[e.Phone=27]="Phone",e[e.SpecialAbility=28]="SpecialAbility",e[e.SpecialAbilitySecondary=29]="SpecialAbilitySecondary",e[e.MoveLeftRight=30]="MoveLeftRight",e[e.MoveUpDown=31]="MoveUpDown",e[e.MoveUpOnly=32]="MoveUpOnly",e[e.MoveDownOnly=33]="MoveDownOnly",e[e.MoveLeftOnly=34]="MoveLeftOnly",e[e.MoveRightOnly=35]="MoveRightOnly",e[e.Duck=36]="Duck",e[e.SelectWeapon=37]="SelectWeapon",e[e.Pickup=38]="Pickup",e[e.SniperZoom=39]="SniperZoom",e[e.SniperZoomInOnly=40]="SniperZoomInOnly",e[e.SniperZoomOutOnly=41]="SniperZoomOutOnly",e[e.SniperZoomInSecondary=42]="SniperZoomInSecondary",e[e.SniperZoomOutSecondary=43]="SniperZoomOutSecondary",e[e.Cover=44]="Cover",e[e.Reload=45]="Reload",e[e.Talk=46]="Talk",e[e.Detonate=47]="Detonate",e[e.HUDSpecial=48]="HUDSpecial",e[e.Arrest=49]="Arrest",e[e.AccurateAim=50]="AccurateAim",e[e.Context=51]="Context",e[e.ContextSecondary=52]="ContextSecondary",e[e.WeaponSpecial=53]="WeaponSpecial",e[e.WeaponSpecial2=54]="WeaponSpecial2",e[e.Dive=55]="Dive",e[e.DropWeapon=56]="DropWeapon",e[e.DropAmmo=57]="DropAmmo",e[e.ThrowGrenade=58]="ThrowGrenade",e[e.VehicleMoveLeftRight=59]="VehicleMoveLeftRight",e[e.VehicleMoveUpDown=60]="VehicleMoveUpDown",e[e.VehicleMoveUpOnly=61]="VehicleMoveUpOnly",e[e.VehicleMoveDownOnly=62]="VehicleMoveDownOnly",e[e.VehicleMoveLeftOnly=63]="VehicleMoveLeftOnly",e[e.VehicleMoveRightOnly=64]="VehicleMoveRightOnly",e[e.VehicleSpecial=65]="VehicleSpecial",e[e.VehicleGunLeftRight=66]="VehicleGunLeftRight",e[e.VehicleGunUpDown=67]="VehicleGunUpDown",e[e.VehicleAim=68]="VehicleAim",e[e.VehicleAttack=69]="VehicleAttack",e[e.VehicleAttack2=70]="VehicleAttack2",e[e.VehicleAccelerate=71]="VehicleAccelerate",e[e.VehicleBrake=72]="VehicleBrake",e[e.VehicleDuck=73]="VehicleDuck",e[e.VehicleHeadlight=74]="VehicleHeadlight",e[e.VehicleExit=75]="VehicleExit",e[e.VehicleHandbrake=76]="VehicleHandbrake",e[e.VehicleHotwireLeft=77]="VehicleHotwireLeft",e[e.VehicleHotwireRight=78]="VehicleHotwireRight",e[e.VehicleLookBehind=79]="VehicleLookBehind",e[e.VehicleCinCam=80]="VehicleCinCam",e[e.VehicleNextRadio=81]="VehicleNextRadio",e[e.VehiclePrevRadio=82]="VehiclePrevRadio",e[e.VehicleNextRadioTrack=83]="VehicleNextRadioTrack",e[e.VehiclePrevRadioTrack=84]="VehiclePrevRadioTrack",e[e.VehicleRadioWheel=85]="VehicleRadioWheel",e[e.VehicleHorn=86]="VehicleHorn",e[e.VehicleFlyThrottleUp=87]="VehicleFlyThrottleUp",e[e.VehicleFlyThrottleDown=88]="VehicleFlyThrottleDown",e[e.VehicleFlyYawLeft=89]="VehicleFlyYawLeft",e[e.VehicleFlyYawRight=90]="VehicleFlyYawRight",e[e.VehiclePassengerAim=91]="VehiclePassengerAim",e[e.VehiclePassengerAttack=92]="VehiclePassengerAttack",e[e.VehicleSpecialAbilityFranklin=93]="VehicleSpecialAbilityFranklin",e[e.VehicleStuntUpDown=94]="VehicleStuntUpDown",e[e.VehicleCinematicUpDown=95]="VehicleCinematicUpDown",e[e.VehicleCinematicUpOnly=96]="VehicleCinematicUpOnly",e[e.VehicleCinematicDownOnly=97]="VehicleCinematicDownOnly",e[e.VehicleCinematicLeftRight=98]="VehicleCinematicLeftRight",e[e.VehicleSelectNextWeapon=99]="VehicleSelectNextWeapon",e[e.VehicleSelectPrevWeapon=100]="VehicleSelectPrevWeapon",e[e.VehicleRoof=101]="VehicleRoof",e[e.VehicleJump=102]="VehicleJump",e[e.VehicleGrapplingHook=103]="VehicleGrapplingHook",e[e.VehicleShuffle=104]="VehicleShuffle",e[e.VehicleDropProjectile=105]="VehicleDropProjectile",e[e.VehicleMouseControlOverride=106]="VehicleMouseControlOverride",e[e.VehicleFlyRollLeftRight=107]="VehicleFlyRollLeftRight",e[e.VehicleFlyRollLeftOnly=108]="VehicleFlyRollLeftOnly",e[e.VehicleFlyRollRightOnly=109]="VehicleFlyRollRightOnly",e[e.VehicleFlyPitchUpDown=110]="VehicleFlyPitchUpDown",e[e.VehicleFlyPitchUpOnly=111]="VehicleFlyPitchUpOnly",e[e.VehicleFlyPitchDownOnly=112]="VehicleFlyPitchDownOnly",e[e.VehicleFlyUnderCarriage=113]="VehicleFlyUnderCarriage",e[e.VehicleFlyAttack=114]="VehicleFlyAttack",e[e.VehicleFlySelectNextWeapon=115]="VehicleFlySelectNextWeapon",e[e.VehicleFlySelectPrevWeapon=116]="VehicleFlySelectPrevWeapon",e[e.VehicleFlySelectTargetLeft=117]="VehicleFlySelectTargetLeft",e[e.VehicleFlySelectTargetRight=118]="VehicleFlySelectTargetRight",e[e.VehicleFlyVerticalFlightMode=119]="VehicleFlyVerticalFlightMode",e[e.VehicleFlyDuck=120]="VehicleFlyDuck",e[e.VehicleFlyAttackCamera=121]="VehicleFlyAttackCamera",e[e.VehicleFlyMouseControlOverride=122]="VehicleFlyMouseControlOverride",e[e.VehicleSubTurnLeftRight=123]="VehicleSubTurnLeftRight",e[e.VehicleSubTurnLeftOnly=124]="VehicleSubTurnLeftOnly",e[e.VehicleSubTurnRightOnly=125]="VehicleSubTurnRightOnly",e[e.VehicleSubPitchUpDown=126]="VehicleSubPitchUpDown",e[e.VehicleSubPitchUpOnly=127]="VehicleSubPitchUpOnly",e[e.VehicleSubPitchDownOnly=128]="VehicleSubPitchDownOnly",e[e.VehicleSubThrottleUp=129]="VehicleSubThrottleUp",e[e.VehicleSubThrottleDown=130]="VehicleSubThrottleDown",e[e.VehicleSubAscend=131]="VehicleSubAscend",e[e.VehicleSubDescend=132]="VehicleSubDescend",e[e.VehicleSubTurnHardLeft=133]="VehicleSubTurnHardLeft",e[e.VehicleSubTurnHardRight=134]="VehicleSubTurnHardRight",e[e.VehicleSubMouseControlOverride=135]="VehicleSubMouseControlOverride",e[e.VehiclePushbikePedal=136]="VehiclePushbikePedal",e[e.VehiclePushbikeSprint=137]="VehiclePushbikeSprint",e[e.VehiclePushbikeFrontBrake=138]="VehiclePushbikeFrontBrake",e[e.VehiclePushbikeRearBrake=139]="VehiclePushbikeRearBrake",e[e.MeleeAttackLight=140]="MeleeAttackLight",e[e.MeleeAttackHeavy=141]="MeleeAttackHeavy",e[e.MeleeAttackAlternate=142]="MeleeAttackAlternate",e[e.MeleeBlock=143]="MeleeBlock",e[e.ParachuteDeploy=144]="ParachuteDeploy",e[e.ParachuteDetach=145]="ParachuteDetach",e[e.ParachuteTurnLeftRight=146]="ParachuteTurnLeftRight",e[e.ParachuteTurnLeftOnly=147]="ParachuteTurnLeftOnly",e[e.ParachuteTurnRightOnly=148]="ParachuteTurnRightOnly",e[e.ParachutePitchUpDown=149]="ParachutePitchUpDown",e[e.ParachutePitchUpOnly=150]="ParachutePitchUpOnly",e[e.ParachutePitchDownOnly=151]="ParachutePitchDownOnly",e[e.ParachuteBrakeLeft=152]="ParachuteBrakeLeft",e[e.ParachuteBrakeRight=153]="ParachuteBrakeRight",e[e.ParachuteSmoke=154]="ParachuteSmoke",e[e.ParachutePrecisionLanding=155]="ParachutePrecisionLanding",e[e.Map=156]="Map",e[e.SelectWeaponUnarmed=157]="SelectWeaponUnarmed",e[e.SelectWeaponMelee=158]="SelectWeaponMelee",e[e.SelectWeaponHandgun=159]="SelectWeaponHandgun",e[e.SelectWeaponShotgun=160]="SelectWeaponShotgun",e[e.SelectWeaponSmg=161]="SelectWeaponSmg",e[e.SelectWeaponAutoRifle=162]="SelectWeaponAutoRifle",e[e.SelectWeaponSniper=163]="SelectWeaponSniper",e[e.SelectWeaponHeavy=164]="SelectWeaponHeavy",e[e.SelectWeaponSpecial=165]="SelectWeaponSpecial",e[e.SelectCharacterMichael=166]="SelectCharacterMichael",e[e.SelectCharacterFranklin=167]="SelectCharacterFranklin",e[e.SelectCharacterTrevor=168]="SelectCharacterTrevor",e[e.SelectCharacterMultiplayer=169]="SelectCharacterMultiplayer",e[e.SaveReplayClip=170]="SaveReplayClip",e[e.SpecialAbilityPC=171]="SpecialAbilityPC",e[e.PhoneUp=172]="PhoneUp",e[e.PhoneDown=173]="PhoneDown",e[e.PhoneLeft=174]="PhoneLeft",e[e.PhoneRight=175]="PhoneRight",e[e.PhoneSelect=176]="PhoneSelect",e[e.PhoneCancel=177]="PhoneCancel",e[e.PhoneOption=178]="PhoneOption",e[e.PhoneExtraOption=179]="PhoneExtraOption",e[e.PhoneScrollForward=180]="PhoneScrollForward",e[e.PhoneScrollBackward=181]="PhoneScrollBackward",e[e.PhoneCameraFocusLock=182]="PhoneCameraFocusLock",e[e.PhoneCameraGrid=183]="PhoneCameraGrid",e[e.PhoneCameraSelfie=184]="PhoneCameraSelfie",e[e.PhoneCameraDOF=185]="PhoneCameraDOF",e[e.PhoneCameraExpression=186]="PhoneCameraExpression",e[e.FrontendDown=187]="FrontendDown",e[e.FrontendUp=188]="FrontendUp",e[e.FrontendLeft=189]="FrontendLeft",e[e.FrontendRight=190]="FrontendRight",e[e.FrontendRdown=191]="FrontendRdown",e[e.FrontendRup=192]="FrontendRup",e[e.FrontendRleft=193]="FrontendRleft",e[e.FrontendRright=194]="FrontendRright",e[e.FrontendAxisX=195]="FrontendAxisX",e[e.FrontendAxisY=196]="FrontendAxisY",e[e.FrontendRightAxisX=197]="FrontendRightAxisX",e[e.FrontendRightAxisY=198]="FrontendRightAxisY",e[e.FrontendPause=199]="FrontendPause",e[e.FrontendPauseAlternate=200]="FrontendPauseAlternate",e[e.FrontendAccept=201]="FrontendAccept",e[e.FrontendCancel=202]="FrontendCancel",e[e.FrontendX=203]="FrontendX",e[e.FrontendY=204]="FrontendY",e[e.FrontendLb=205]="FrontendLb",e[e.FrontendRb=206]="FrontendRb",e[e.FrontendLt=207]="FrontendLt",e[e.FrontendRt=208]="FrontendRt",e[e.FrontendLs=209]="FrontendLs",e[e.FrontendRs=210]="FrontendRs",e[e.FrontendLeaderboard=211]="FrontendLeaderboard",e[e.FrontendSocialClub=212]="FrontendSocialClub",e[e.FrontendSocialClubSecondary=213]="FrontendSocialClubSecondary",e[e.FrontendDelete=214]="FrontendDelete",e[e.FrontendEndscreenAccept=215]="FrontendEndscreenAccept",e[e.FrontendEndscreenExpand=216]="FrontendEndscreenExpand",e[e.FrontendSelect=217]="FrontendSelect",e[e.ScriptLeftAxisX=218]="ScriptLeftAxisX",e[e.ScriptLeftAxisY=219]="ScriptLeftAxisY",e[e.ScriptRightAxisX=220]="ScriptRightAxisX",e[e.ScriptRightAxisY=221]="ScriptRightAxisY",e[e.ScriptRUp=222]="ScriptRUp",e[e.ScriptRDown=223]="ScriptRDown",e[e.ScriptRLeft=224]="ScriptRLeft",e[e.ScriptRRight=225]="ScriptRRight",e[e.ScriptLB=226]="ScriptLB",e[e.ScriptRB=227]="ScriptRB",e[e.ScriptLT=228]="ScriptLT",e[e.ScriptRT=229]="ScriptRT",e[e.ScriptLS=230]="ScriptLS",e[e.ScriptRS=231]="ScriptRS",e[e.ScriptPadUp=232]="ScriptPadUp",e[e.ScriptPadDown=233]="ScriptPadDown",e[e.ScriptPadLeft=234]="ScriptPadLeft",e[e.ScriptPadRight=235]="ScriptPadRight",e[e.ScriptSelect=236]="ScriptSelect",e[e.CursorAccept=237]="CursorAccept",e[e.CursorCancel=238]="CursorCancel",e[e.CursorX=239]="CursorX",e[e.CursorY=240]="CursorY",e[e.CursorScrollUp=241]="CursorScrollUp",e[e.CursorScrollDown=242]="CursorScrollDown",e[e.EnterCheatCode=243]="EnterCheatCode",e[e.InteractionMenu=244]="InteractionMenu",e[e.MpTextChatAll=245]="MpTextChatAll",e[e.MpTextChatTeam=246]="MpTextChatTeam",e[e.MpTextChatFriends=247]="MpTextChatFriends",e[e.MpTextChatCrew=248]="MpTextChatCrew",e[e.PushToTalk=249]="PushToTalk",e[e.CreatorLS=250]="CreatorLS",e[e.CreatorRS=251]="CreatorRS",e[e.CreatorLT=252]="CreatorLT",e[e.CreatorRT=253]="CreatorRT",e[e.CreatorMenuToggle=254]="CreatorMenuToggle",e[e.CreatorAccept=255]="CreatorAccept",e[e.CreatorDelete=256]="CreatorDelete",e[e.Attack2=257]="Attack2",e[e.RappelJump=258]="RappelJump",e[e.RappelLongJump=259]="RappelLongJump",e[e.RappelSmashWindow=260]="RappelSmashWindow",e[e.PrevWeapon=261]="PrevWeapon",e[e.NextWeapon=262]="NextWeapon",e[e.MeleeAttack1=263]="MeleeAttack1",e[e.MeleeAttack2=264]="MeleeAttack2",e[e.Whistle=265]="Whistle",e[e.MoveLeft=266]="MoveLeft",e[e.MoveRight=267]="MoveRight",e[e.MoveUp=268]="MoveUp",e[e.MoveDown=269]="MoveDown",e[e.LookLeft=270]="LookLeft",e[e.LookRight=271]="LookRight",e[e.LookUp=272]="LookUp",e[e.LookDown=273]="LookDown",e[e.SniperZoomIn=274]="SniperZoomIn",e[e.SniperZoomOut=275]="SniperZoomOut",e[e.SniperZoomInAlternate=276]="SniperZoomInAlternate",e[e.SniperZoomOutAlternate=277]="SniperZoomOutAlternate",e[e.VehicleMoveLeft=278]="VehicleMoveLeft",e[e.VehicleMoveRight=279]="VehicleMoveRight",e[e.VehicleMoveUp=280]="VehicleMoveUp",e[e.VehicleMoveDown=281]="VehicleMoveDown",e[e.VehicleGunLeft=282]="VehicleGunLeft",e[e.VehicleGunRight=283]="VehicleGunRight",e[e.VehicleGunUp=284]="VehicleGunUp",e[e.VehicleGunDown=285]="VehicleGunDown",e[e.VehicleLookLeft=286]="VehicleLookLeft",e[e.VehicleLookRight=287]="VehicleLookRight",e[e.ReplayStartStopRecording=288]="ReplayStartStopRecording",e[e.ReplayStartStopRecordingSecondary=289]="ReplayStartStopRecordingSecondary",e[e.ScaledLookLeftRight=290]="ScaledLookLeftRight",e[e.ScaledLookUpDown=291]="ScaledLookUpDown",e[e.ScaledLookUpOnly=292]="ScaledLookUpOnly",e[e.ScaledLookDownOnly=293]="ScaledLookDownOnly",e[e.ScaledLookLeftOnly=294]="ScaledLookLeftOnly",e[e.ScaledLookRightOnly=295]="ScaledLookRightOnly",e[e.ReplayMarkerDelete=296]="ReplayMarkerDelete",e[e.ReplayClipDelete=297]="ReplayClipDelete",e[e.ReplayPause=298]="ReplayPause",e[e.ReplayRewind=299]="ReplayRewind",e[e.ReplayFfwd=300]="ReplayFfwd",e[e.ReplayNewmarker=301]="ReplayNewmarker",e[e.ReplayRecord=302]="ReplayRecord",e[e.ReplayScreenshot=303]="ReplayScreenshot",e[e.ReplayHidehud=304]="ReplayHidehud",e[e.ReplayStartpoint=305]="ReplayStartpoint",e[e.ReplayEndpoint=306]="ReplayEndpoint",e[e.ReplayAdvance=307]="ReplayAdvance",e[e.ReplayBack=308]="ReplayBack",e[e.ReplayTools=309]="ReplayTools",e[e.ReplayRestart=310]="ReplayRestart",e[e.ReplayShowhotkey=311]="ReplayShowhotkey",e[e.ReplayCycleMarkerLeft=312]="ReplayCycleMarkerLeft",e[e.ReplayCycleMarkerRight=313]="ReplayCycleMarkerRight",e[e.ReplayFOVIncrease=314]="ReplayFOVIncrease",e[e.ReplayFOVDecrease=315]="ReplayFOVDecrease",e[e.ReplayCameraUp=316]="ReplayCameraUp",e[e.ReplayCameraDown=317]="ReplayCameraDown",e[e.ReplaySave=318]="ReplaySave",e[e.ReplayToggletime=319]="ReplayToggletime",e[e.ReplayToggletips=320]="ReplayToggletips",e[e.ReplayPreview=321]="ReplayPreview",e[e.ReplayToggleTimeline=322]="ReplayToggleTimeline",e[e.ReplayTimelinePickupClip=323]="ReplayTimelinePickupClip",e[e.ReplayTimelineDuplicateClip=324]="ReplayTimelineDuplicateClip",e[e.ReplayTimelinePlaceClip=325]="ReplayTimelinePlaceClip",e[e.ReplayCtrl=326]="ReplayCtrl",e[e.ReplayTimelineSave=327]="ReplayTimelineSave",e[e.ReplayPreviewAudio=328]="ReplayPreviewAudio",e[e.VehicleDriveLook=329]="VehicleDriveLook",e[e.VehicleDriveLook2=330]="VehicleDriveLook2",e[e.VehicleFlyAttack2=331]="VehicleFlyAttack2",e[e.RadioWheelUpDown=332]="RadioWheelUpDown",e[e.RadioWheelLeftRight=333]="RadioWheelLeftRight",e[e.VehicleSlowMoUpDown=334]="VehicleSlowMoUpDown",e[e.VehicleSlowMoUpOnly=335]="VehicleSlowMoUpOnly",e[e.VehicleSlowMoDownOnly=336]="VehicleSlowMoDownOnly",e[e.MapPointOfInterest=337]="MapPointOfInterest",e[e.ReplaySnapmaticPhoto=338]="ReplaySnapmaticPhoto",e[e.VehicleCarJump=339]="VehicleCarJump",e[e.VehicleRocketBoost=340]="VehicleRocketBoost",e[e.VehicleParachute=341]="VehicleParachute",e[e.VehicleBikeWings=342]="VehicleBikeWings",e[e.VehicleFlyBombBay=343]="VehicleFlyBombBay",e[e.VehicleFlyCounter=344]="VehicleFlyCounter",e[e.VehicleFlyTransform=345]="VehicleFlyTransform"}(a||(a={}));var _,c=a;!function(e){e[e.HUD_COLOUR_PURE_WHITE=0]="HUD_COLOUR_PURE_WHITE",e[e.HUD_COLOUR_WHITE=1]="HUD_COLOUR_WHITE",e[e.HUD_COLOUR_BLACK=2]="HUD_COLOUR_BLACK",e[e.HUD_COLOUR_GREY=3]="HUD_COLOUR_GREY",e[e.HUD_COLOUR_GREYLIGHT=4]="HUD_COLOUR_GREYLIGHT",e[e.HUD_COLOUR_GREYDARK=5]="HUD_COLOUR_GREYDARK",e[e.HUD_COLOUR_RED=6]="HUD_COLOUR_RED",e[e.HUD_COLOUR_REDLIGHT=7]="HUD_COLOUR_REDLIGHT",e[e.HUD_COLOUR_REDDARK=8]="HUD_COLOUR_REDDARK",e[e.HUD_COLOUR_BLUE=9]="HUD_COLOUR_BLUE",e[e.HUD_COLOUR_BLUELIGHT=10]="HUD_COLOUR_BLUELIGHT",e[e.HUD_COLOUR_BLUEDARK=11]="HUD_COLOUR_BLUEDARK",e[e.HUD_COLOUR_YELLOW=12]="HUD_COLOUR_YELLOW",e[e.HUD_COLOUR_YELLOWLIGHT=13]="HUD_COLOUR_YELLOWLIGHT",e[e.HUD_COLOUR_YELLOWDARK=14]="HUD_COLOUR_YELLOWDARK",e[e.HUD_COLOUR_ORANGE=15]="HUD_COLOUR_ORANGE",e[e.HUD_COLOUR_ORANGELIGHT=16]="HUD_COLOUR_ORANGELIGHT",e[e.HUD_COLOUR_ORANGEDARK=17]="HUD_COLOUR_ORANGEDARK",e[e.HUD_COLOUR_GREEN=18]="HUD_COLOUR_GREEN",e[e.HUD_COLOUR_GREENLIGHT=19]="HUD_COLOUR_GREENLIGHT",e[e.HUD_COLOUR_GREENDARK=20]="HUD_COLOUR_GREENDARK",e[e.HUD_COLOUR_PURPLE=21]="HUD_COLOUR_PURPLE",e[e.HUD_COLOUR_PURPLELIGHT=22]="HUD_COLOUR_PURPLELIGHT",e[e.HUD_COLOUR_PURPLEDARK=23]="HUD_COLOUR_PURPLEDARK",e[e.HUD_COLOUR_PINK=24]="HUD_COLOUR_PINK",e[e.HUD_COLOUR_RADAR_HEALTH=25]="HUD_COLOUR_RADAR_HEALTH",e[e.HUD_COLOUR_RADAR_ARMOUR=26]="HUD_COLOUR_RADAR_ARMOUR",e[e.HUD_COLOUR_RADAR_DAMAGE=27]="HUD_COLOUR_RADAR_DAMAGE",e[e.HUD_COLOUR_NET_PLAYER1=28]="HUD_COLOUR_NET_PLAYER1",e[e.HUD_COLOUR_NET_PLAYER2=29]="HUD_COLOUR_NET_PLAYER2",e[e.HUD_COLOUR_NET_PLAYER3=30]="HUD_COLOUR_NET_PLAYER3",e[e.HUD_COLOUR_NET_PLAYER4=31]="HUD_COLOUR_NET_PLAYER4",e[e.HUD_COLOUR_NET_PLAYER5=32]="HUD_COLOUR_NET_PLAYER5",e[e.HUD_COLOUR_NET_PLAYER6=33]="HUD_COLOUR_NET_PLAYER6",e[e.HUD_COLOUR_NET_PLAYER7=34]="HUD_COLOUR_NET_PLAYER7",e[e.HUD_COLOUR_NET_PLAYER8=35]="HUD_COLOUR_NET_PLAYER8",e[e.HUD_COLOUR_NET_PLAYER9=36]="HUD_COLOUR_NET_PLAYER9",e[e.HUD_COLOUR_NET_PLAYER10=37]="HUD_COLOUR_NET_PLAYER10",e[e.HUD_COLOUR_NET_PLAYER11=38]="HUD_COLOUR_NET_PLAYER11",e[e.HUD_COLOUR_NET_PLAYER12=39]="HUD_COLOUR_NET_PLAYER12",e[e.HUD_COLOUR_NET_PLAYER13=40]="HUD_COLOUR_NET_PLAYER13",e[e.HUD_COLOUR_NET_PLAYER14=41]="HUD_COLOUR_NET_PLAYER14",e[e.HUD_COLOUR_NET_PLAYER15=42]="HUD_COLOUR_NET_PLAYER15",e[e.HUD_COLOUR_NET_PLAYER16=43]="HUD_COLOUR_NET_PLAYER16",e[e.HUD_COLOUR_NET_PLAYER17=44]="HUD_COLOUR_NET_PLAYER17",e[e.HUD_COLOUR_NET_PLAYER18=45]="HUD_COLOUR_NET_PLAYER18",e[e.HUD_COLOUR_NET_PLAYER19=46]="HUD_COLOUR_NET_PLAYER19",e[e.HUD_COLOUR_NET_PLAYER20=47]="HUD_COLOUR_NET_PLAYER20",e[e.HUD_COLOUR_NET_PLAYER21=48]="HUD_COLOUR_NET_PLAYER21",e[e.HUD_COLOUR_NET_PLAYER22=49]="HUD_COLOUR_NET_PLAYER22",e[e.HUD_COLOUR_NET_PLAYER23=50]="HUD_COLOUR_NET_PLAYER23",e[e.HUD_COLOUR_NET_PLAYER24=51]="HUD_COLOUR_NET_PLAYER24",e[e.HUD_COLOUR_NET_PLAYER25=52]="HUD_COLOUR_NET_PLAYER25",e[e.HUD_COLOUR_NET_PLAYER26=53]="HUD_COLOUR_NET_PLAYER26",e[e.HUD_COLOUR_NET_PLAYER27=54]="HUD_COLOUR_NET_PLAYER27",e[e.HUD_COLOUR_NET_PLAYER28=55]="HUD_COLOUR_NET_PLAYER28",e[e.HUD_COLOUR_NET_PLAYER29=56]="HUD_COLOUR_NET_PLAYER29",e[e.HUD_COLOUR_NET_PLAYER30=57]="HUD_COLOUR_NET_PLAYER30",e[e.HUD_COLOUR_NET_PLAYER31=58]="HUD_COLOUR_NET_PLAYER31",e[e.HUD_COLOUR_NET_PLAYER32=59]="HUD_COLOUR_NET_PLAYER32",e[e.HUD_COLOUR_SIMPLEBLIP_DEFAULT=60]="HUD_COLOUR_SIMPLEBLIP_DEFAULT",e[e.HUD_COLOUR_MENU_BLUE=61]="HUD_COLOUR_MENU_BLUE",e[e.HUD_COLOUR_MENU_GREY_LIGHT=62]="HUD_COLOUR_MENU_GREY_LIGHT",e[e.HUD_COLOUR_MENU_BLUE_EXTRA_DARK=63]="HUD_COLOUR_MENU_BLUE_EXTRA_DARK",e[e.HUD_COLOUR_MENU_YELLOW=64]="HUD_COLOUR_MENU_YELLOW",e[e.HUD_COLOUR_MENU_YELLOW_DARK=65]="HUD_COLOUR_MENU_YELLOW_DARK",e[e.HUD_COLOUR_MENU_GREEN=66]="HUD_COLOUR_MENU_GREEN",e[e.HUD_COLOUR_MENU_GREY=67]="HUD_COLOUR_MENU_GREY",e[e.HUD_COLOUR_MENU_GREY_DARK=68]="HUD_COLOUR_MENU_GREY_DARK",e[e.HUD_COLOUR_MENU_HIGHLIGHT=69]="HUD_COLOUR_MENU_HIGHLIGHT",e[e.HUD_COLOUR_MENU_STANDARD=70]="HUD_COLOUR_MENU_STANDARD",e[e.HUD_COLOUR_MENU_DIMMED=71]="HUD_COLOUR_MENU_DIMMED",e[e.HUD_COLOUR_MENU_EXTRA_DIMMED=72]="HUD_COLOUR_MENU_EXTRA_DIMMED",e[e.HUD_COLOUR_BRIEF_TITLE=73]="HUD_COLOUR_BRIEF_TITLE",e[e.HUD_COLOUR_MID_GREY_MP=74]="HUD_COLOUR_MID_GREY_MP",e[e.HUD_COLOUR_NET_PLAYER1_DARK=75]="HUD_COLOUR_NET_PLAYER1_DARK",e[e.HUD_COLOUR_NET_PLAYER2_DARK=76]="HUD_COLOUR_NET_PLAYER2_DARK",e[e.HUD_COLOUR_NET_PLAYER3_DARK=77]="HUD_COLOUR_NET_PLAYER3_DARK",e[e.HUD_COLOUR_NET_PLAYER4_DARK=78]="HUD_COLOUR_NET_PLAYER4_DARK",e[e.HUD_COLOUR_NET_PLAYER5_DARK=79]="HUD_COLOUR_NET_PLAYER5_DARK",e[e.HUD_COLOUR_NET_PLAYER6_DARK=80]="HUD_COLOUR_NET_PLAYER6_DARK",e[e.HUD_COLOUR_NET_PLAYER7_DARK=81]="HUD_COLOUR_NET_PLAYER7_DARK",e[e.HUD_COLOUR_NET_PLAYER8_DARK=82]="HUD_COLOUR_NET_PLAYER8_DARK",e[e.HUD_COLOUR_NET_PLAYER9_DARK=83]="HUD_COLOUR_NET_PLAYER9_DARK",e[e.HUD_COLOUR_NET_PLAYER10_DARK=84]="HUD_COLOUR_NET_PLAYER10_DARK",e[e.HUD_COLOUR_NET_PLAYER11_DARK=85]="HUD_COLOUR_NET_PLAYER11_DARK",e[e.HUD_COLOUR_NET_PLAYER12_DARK=86]="HUD_COLOUR_NET_PLAYER12_DARK",e[e.HUD_COLOUR_NET_PLAYER13_DARK=87]="HUD_COLOUR_NET_PLAYER13_DARK",e[e.HUD_COLOUR_NET_PLAYER14_DARK=88]="HUD_COLOUR_NET_PLAYER14_DARK",e[e.HUD_COLOUR_NET_PLAYER15_DARK=89]="HUD_COLOUR_NET_PLAYER15_DARK",e[e.HUD_COLOUR_NET_PLAYER16_DARK=90]="HUD_COLOUR_NET_PLAYER16_DARK",e[e.HUD_COLOUR_NET_PLAYER17_DARK=91]="HUD_COLOUR_NET_PLAYER17_DARK",e[e.HUD_COLOUR_NET_PLAYER18_DARK=92]="HUD_COLOUR_NET_PLAYER18_DARK",e[e.HUD_COLOUR_NET_PLAYER19_DARK=93]="HUD_COLOUR_NET_PLAYER19_DARK",e[e.HUD_COLOUR_NET_PLAYER20_DARK=94]="HUD_COLOUR_NET_PLAYER20_DARK",e[e.HUD_COLOUR_NET_PLAYER21_DARK=95]="HUD_COLOUR_NET_PLAYER21_DARK",e[e.HUD_COLOUR_NET_PLAYER22_DARK=96]="HUD_COLOUR_NET_PLAYER22_DARK",e[e.HUD_COLOUR_NET_PLAYER23_DARK=97]="HUD_COLOUR_NET_PLAYER23_DARK",e[e.HUD_COLOUR_NET_PLAYER24_DARK=98]="HUD_COLOUR_NET_PLAYER24_DARK",e[e.HUD_COLOUR_NET_PLAYER25_DARK=99]="HUD_COLOUR_NET_PLAYER25_DARK",e[e.HUD_COLOUR_NET_PLAYER26_DARK=100]="HUD_COLOUR_NET_PLAYER26_DARK",e[e.HUD_COLOUR_NET_PLAYER27_DARK=101]="HUD_COLOUR_NET_PLAYER27_DARK",e[e.HUD_COLOUR_NET_PLAYER28_DARK=102]="HUD_COLOUR_NET_PLAYER28_DARK",e[e.HUD_COLOUR_NET_PLAYER29_DARK=103]="HUD_COLOUR_NET_PLAYER29_DARK",e[e.HUD_COLOUR_NET_PLAYER30_DARK=104]="HUD_COLOUR_NET_PLAYER30_DARK",e[e.HUD_COLOUR_NET_PLAYER31_DARK=105]="HUD_COLOUR_NET_PLAYER31_DARK",e[e.HUD_COLOUR_NET_PLAYER32_DARK=106]="HUD_COLOUR_NET_PLAYER32_DARK",e[e.HUD_COLOUR_BRONZE=107]="HUD_COLOUR_BRONZE",e[e.HUD_COLOUR_SILVER=108]="HUD_COLOUR_SILVER",e[e.HUD_COLOUR_GOLD=109]="HUD_COLOUR_GOLD",e[e.HUD_COLOUR_PLATINUM=110]="HUD_COLOUR_PLATINUM",e[e.HUD_COLOUR_GANG1=111]="HUD_COLOUR_GANG1",e[e.HUD_COLOUR_GANG2=112]="HUD_COLOUR_GANG2",e[e.HUD_COLOUR_GANG3=113]="HUD_COLOUR_GANG3",e[e.HUD_COLOUR_GANG4=114]="HUD_COLOUR_GANG4",e[e.HUD_COLOUR_SAME_CREW=115]="HUD_COLOUR_SAME_CREW",e[e.HUD_COLOUR_FREEMODE=116]="HUD_COLOUR_FREEMODE",e[e.HUD_COLOUR_PAUSE_BG=117]="HUD_COLOUR_PAUSE_BG",e[e.HUD_COLOUR_FRIENDLY=118]="HUD_COLOUR_FRIENDLY",e[e.HUD_COLOUR_ENEMY=119]="HUD_COLOUR_ENEMY",e[e.HUD_COLOUR_LOCATION=120]="HUD_COLOUR_LOCATION",e[e.HUD_COLOUR_PICKUP=121]="HUD_COLOUR_PICKUP",e[e.HUD_COLOUR_PAUSE_SINGLEPLAYER=122]="HUD_COLOUR_PAUSE_SINGLEPLAYER",e[e.HUD_COLOUR_FREEMODE_DARK=123]="HUD_COLOUR_FREEMODE_DARK",e[e.HUD_COLOUR_INACTIVE_MISSION=124]="HUD_COLOUR_INACTIVE_MISSION",e[e.HUD_COLOUR_DAMAGE=125]="HUD_COLOUR_DAMAGE",e[e.HUD_COLOUR_PINKLIGHT=126]="HUD_COLOUR_PINKLIGHT",e[e.HUD_COLOUR_PM_MITEM_HIGHLIGHT=127]="HUD_COLOUR_PM_MITEM_HIGHLIGHT",e[e.HUD_COLOUR_SCRIPT_VARIABLE=128]="HUD_COLOUR_SCRIPT_VARIABLE",e[e.HUD_COLOUR_YOGA=129]="HUD_COLOUR_YOGA",e[e.HUD_COLOUR_TENNIS=130]="HUD_COLOUR_TENNIS",e[e.HUD_COLOUR_GOLF=131]="HUD_COLOUR_GOLF",e[e.HUD_COLOUR_SHOOTING_RANGE=132]="HUD_COLOUR_SHOOTING_RANGE",e[e.HUD_COLOUR_FLIGHT_SCHOOL=133]="HUD_COLOUR_FLIGHT_SCHOOL",e[e.HUD_COLOUR_NORTH_BLUE=134]="HUD_COLOUR_NORTH_BLUE",e[e.HUD_COLOUR_SOCIAL_CLUB=135]="HUD_COLOUR_SOCIAL_CLUB",e[e.HUD_COLOUR_PLATFORM_BLUE=136]="HUD_COLOUR_PLATFORM_BLUE",e[e.HUD_COLOUR_PLATFORM_GREEN=137]="HUD_COLOUR_PLATFORM_GREEN",e[e.HUD_COLOUR_PLATFORM_GREY=138]="HUD_COLOUR_PLATFORM_GREY",e[e.HUD_COLOUR_FACEBOOK_BLUE=139]="HUD_COLOUR_FACEBOOK_BLUE",e[e.HUD_COLOUR_INGAME_BG=140]="HUD_COLOUR_INGAME_BG",e[e.HUD_COLOUR_DARTS=141]="HUD_COLOUR_DARTS",e[e.HUD_COLOUR_WAYPOINT=142]="HUD_COLOUR_WAYPOINT",e[e.HUD_COLOUR_MICHAEL=143]="HUD_COLOUR_MICHAEL",e[e.HUD_COLOUR_FRANKLIN=144]="HUD_COLOUR_FRANKLIN",e[e.HUD_COLOUR_TREVOR=145]="HUD_COLOUR_TREVOR",e[e.HUD_COLOUR_GOLF_P1=146]="HUD_COLOUR_GOLF_P1",e[e.HUD_COLOUR_GOLF_P2=147]="HUD_COLOUR_GOLF_P2",e[e.HUD_COLOUR_GOLF_P3=148]="HUD_COLOUR_GOLF_P3",e[e.HUD_COLOUR_GOLF_P4=149]="HUD_COLOUR_GOLF_P4",e[e.HUD_COLOUR_WAYPOINTLIGHT=150]="HUD_COLOUR_WAYPOINTLIGHT",e[e.HUD_COLOUR_WAYPOINTDARK=151]="HUD_COLOUR_WAYPOINTDARK",e[e.HUD_COLOUR_PANEL_LIGHT=152]="HUD_COLOUR_PANEL_LIGHT",e[e.HUD_COLOUR_MICHAEL_DARK=153]="HUD_COLOUR_MICHAEL_DARK",e[e.HUD_COLOUR_FRANKLIN_DARK=154]="HUD_COLOUR_FRANKLIN_DARK",e[e.HUD_COLOUR_TREVOR_DARK=155]="HUD_COLOUR_TREVOR_DARK",e[e.HUD_COLOUR_OBJECTIVE_ROUTE=156]="HUD_COLOUR_OBJECTIVE_ROUTE",e[e.HUD_COLOUR_PAUSEMAP_TINT=157]="HUD_COLOUR_PAUSEMAP_TINT",e[e.HUD_COLOUR_PAUSE_DESELECT=158]="HUD_COLOUR_PAUSE_DESELECT",e[e.HUD_COLOUR_PM_WEAPONS_PURCHASABLE=159]="HUD_COLOUR_PM_WEAPONS_PURCHASABLE",e[e.HUD_COLOUR_PM_WEAPONS_LOCKED=160]="HUD_COLOUR_PM_WEAPONS_LOCKED",e[e.HUD_COLOUR_END_SCREEN_BG=161]="HUD_COLOUR_END_SCREEN_BG",e[e.HUD_COLOUR_CHOP=162]="HUD_COLOUR_CHOP",e[e.HUD_COLOUR_PAUSEMAP_TINT_HALF=163]="HUD_COLOUR_PAUSEMAP_TINT_HALF",e[e.HUD_COLOUR_NORTH_BLUE_OFFICIAL=164]="HUD_COLOUR_NORTH_BLUE_OFFICIAL",e[e.HUD_COLOUR_SCRIPT_VARIABLE_2=165]="HUD_COLOUR_SCRIPT_VARIABLE_2",e[e.HUD_COLOUR_H=166]="HUD_COLOUR_H",e[e.HUD_COLOUR_HDARK=167]="HUD_COLOUR_HDARK",e[e.HUD_COLOUR_T=168]="HUD_COLOUR_T",e[e.HUD_COLOUR_TDARK=169]="HUD_COLOUR_TDARK",e[e.HUD_COLOUR_HSHARD=170]="HUD_COLOUR_HSHARD",e[e.HUD_COLOUR_CONTROLLER_MICHAEL=171]="HUD_COLOUR_CONTROLLER_MICHAEL",e[e.HUD_COLOUR_CONTROLLER_FRANKLIN=172]="HUD_COLOUR_CONTROLLER_FRANKLIN",e[e.HUD_COLOUR_CONTROLLER_TREVOR=173]="HUD_COLOUR_CONTROLLER_TREVOR",e[e.HUD_COLOUR_CONTROLLER_CHOP=174]="HUD_COLOUR_CONTROLLER_CHOP",e[e.HUD_COLOUR_VIDEO_EDITOR_VIDEO=175]="HUD_COLOUR_VIDEO_EDITOR_VIDEO",e[e.HUD_COLOUR_VIDEO_EDITOR_AUDIO=176]="HUD_COLOUR_VIDEO_EDITOR_AUDIO",e[e.HUD_COLOUR_VIDEO_EDITOR_TEXT=177]="HUD_COLOUR_VIDEO_EDITOR_TEXT",e[e.HUD_COLOUR_HB_BLUE=178]="HUD_COLOUR_HB_BLUE",e[e.HUD_COLOUR_HB_YELLOW=179]="HUD_COLOUR_HB_YELLOW"}(_||(_={}));var O,R=_;!function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(O||(O={}));var u=O;class d{static Empty=new d(0,0,0,0);static Transparent=new d(0,0,0,0);static Black=new d(0,0,0,255);static White=new d(255,255,255,255);static WhiteSmoke=new d(245,245,245,255);R;G;B;A;constructor(e,t,i,s=255){this.R=e,this.G=t,this.B=i,this.A=s}}class L{Width;Height;constructor(e=0,t=0){this.Width=e,this.Height=t}}class U{X=0;Y=0;constructor(e,t){this.X=e,this.Y=t}static Parse(e){if("object"==typeof e){if(e.length)return new U(e[0],e[1]);if(e.X&&e.Y)return new U(e.X,e.Y)}else if("string"==typeof e&&-1!==e.indexOf(",")){const t=e.split(",");return new U(parseFloat(t[0]),parseFloat(t[1]))}return new U(0,0)}}class C{Enabled;constructor(){this.Enabled=!0}}class D extends C{Caption;Pos;Scale;Color;Font;Centered;constructor(e,t,i,s,n,o){super(),this.Caption=e,this.Pos=t,this.Scale=i,this.Color=s||new d(255,255,255,255),this.Font=n||0,this.Centered=o||!1}Draw(e,t,s,n,o,h){!e||t||s||n||o||h||(t=new U(this.Pos.X+e.Width,this.Pos.Y+e.Height),s=this.Scale,n=this.Color,o=this.Font,h=this.Centered);const r=t.X/1280,a=t.Y/720;i.setTextFont(parseInt(o)),i.setTextScale(s,s),i.setTextColour(n.R,n.G,n.B,n.A),i.setTextCentre(h),i.beginTextCommandDisplayText("STRING"),D.AddLongString(e),i.endTextCommandDisplayText(r,a,0)}static AddLongString(e){if(!e.length)return;for(let t,s=0;s=e.X&&i.X<=e.X+t.Width&&i.Y>e.Y&&i.Y0){const e=t.X/h.Width+o/h.Width;i.setTextWrap(r,e)}return i.endTextCommandGetNumberOfLinesForString(r,a)}}class S{TextureName;Pos;Size;Heading;Color;Visible;_textureDict;constructor(e,t,i,s,n=0,o=new d(255,255,255)){this.TextureDict=e,this.TextureName=t,this.Pos=i,this.Size=s,this.Heading=n,this.Color=o,this.Visible=!0}LoadTextureDictionary(){this.requestTextureDictPromise(this._textureDict).then(e=>{})}requestTextureDictPromise(t){return new Promise((s,n)=>{i.requestStreamedTextureDict(t,!0);let o=e.setInterval(()=>{if(i.hasStreamedTextureDictLoaded(t))return e.clearInterval(o),s(!0)},10)})}set TextureDict(e){this._textureDict=e,this.IsTextureDictionaryLoaded||this.LoadTextureDictionary()}get TextureDict(){return this._textureDict}get IsTextureDictionaryLoaded(){return i.hasStreamedTextureDictLoaded(this._textureDict)}Draw(e,t,s,n,o,h,r){e=e||this.TextureDict,t=t||this.TextureName,s=s||this.Pos,n=n||this.Size,o=o||this.Heading,h=h||this.Color,(r=r||!0)&&(i.hasStreamedTextureDictLoaded(e)||i.requestStreamedTextureDict(e,!0));const a=1080*(p.Width/p.Height),l=this.Size.Width/a,_=this.Size.Height/1080,c=this.Pos.X/a+.5*l,O=this.Pos.Y/1080+.5*_;i.drawSprite(e,t,c,O,l,_,o,h.R,h.G,h.B,h.A,!0,0)}}class f extends C{Pos;Size;Color;constructor(e,t,i){super(),this.Enabled=!0,this.Pos=e,this.Size=t,this.Color=i}Draw(e,t,s){e||(e=new L(0,0)),t||s||(e=new U(this.Pos.X+e.Width,this.Pos.Y+e.Height),t=this.Size,s=this.Color);const n=t.Width/1280,o=t.Height/720,h=e.X/1280+.5*n,r=e.Y/720+.5*o;i.drawRect(h,r,n,o,s.R,s.G,s.B,s.A,!1)}}class T extends f{constructor(e,t,i){super(e,t,i)}Draw(e,t,s){e||(e=new L),!e||t||s||(e=new U(this.Pos.X+e.Width,this.Pos.Y+e.Height),t=this.Size,s=this.Color);const n=1080*(p.Width/p.Height),o=t.Width/n,h=t.Height/1080,r=e.X/n+.5*o,a=e.Y/1080+.5*h;i.drawRect(r,a,o,h,s.R,s.G,s.B,s.A,!1)}}class g extends D{TextAlignment=l.Left;DropShadow;Outline;Wrap=0;get WordWrap(){return new L(this.Wrap,0)}set WordWrap(e){this.Wrap=e.Width}constructor(e,t,i,s,n,o){super(e,t,i,s||new d(255,255,255),n||0,!1),o&&(this.TextAlignment=o)}Draw(t,s,n,o,h,r,a,_,c){let O=t,R=r,u=r;t||(t=new L(0,0)),t&&!s&&(u=this.TextAlignment,O=this.Caption,s=new U(this.Pos.X+t.Width,this.Pos.Y+t.Height),n=this.Scale,o=this.Color,h=this.Font,1==R||0==R?R=this.Centered:(R=void 0,a=this.DropShadow,_=this.Outline,this.WordWrap));const d=1080*(p.Width/p.Height),C=this.Pos.X/d,m=this.Pos.Y/1080;if(i.setTextFont(parseInt(h)),i.setTextScale(1,n),i.setTextColour(o.R,o.G,o.B,o.A),void 0!==R)i.setTextCentre(R);else{switch(a&&i.setTextDropshadow(2,0,0,0,0),_&&e.logWarning("[NativeUI] ResText outline not working!"),u){case l.Centered:i.setTextCentre(!0);break;case l.Right:i.setTextRightJustify(!0),i.setTextWrap(0,C)}if(this.Wrap){const e=(this.Pos.X+this.Wrap)/d;i.setTextWrap(C,e)}}i.beginTextCommandDisplayText("CELL_EMAIL_BCON"),D.AddLongString(O),i.endTextCommandDisplayText(C,m,0)}}function I(){let e,t="";for(e=0;e<32;e+=1)switch(e){case 8:case 20:t+="-",t+=(16*Math.random()|0).toString(16);break;case 12:t+="-",t+="4";break;case 16:t+="-",t+=(4*Math.random()|8).toString(16);break;default:t+=(16*Math.random()|0).toString(16)}return t}class E{Id=I();static DefaultBackColor=d.Empty;static DefaultHighlightedBackColor=d.White;static DefaultForeColor=d.WhiteSmoke;static DefaultHighlightedForeColor=d.Black;_event;_rectangle;_text;_description;_selectedSprite;_badgeLeft;_badgeRight;_labelText;BackColor=E.DefaultBackColor;HighlightedBackColor=E.DefaultHighlightedBackColor;ForeColor=E.DefaultForeColor;HighlightedForeColor=E.DefaultHighlightedForeColor;Enabled;Selected;Hovered;Data;Offset;Parent;get Text(){return this._text.Caption}set Text(e){this._text.Caption=e}get Description(){return this._description}set Description(e){this._description=e,null!=this&&null!=this.Parent&&this.Parent.UpdateDescriptionCaption()}RightLabel="";LeftBadge=o.None;RightBadge=o.None;constructor(e,t="",i=null){this.Enabled=!0,this.Data=i,this._rectangle=new T(new U(0,0),new L(431,38),new d(150,0,0,0)),this._text=new g(e,new U(8,0),.33,d.WhiteSmoke,r.ChaletLondon,l.Left),this.Description=t,this._selectedSprite=new S("commonmenu","gradient_nav",new U(0,0),new L(431,38)),this._badgeLeft=new S("commonmenu","",new U(0,0),new L(40,40)),this._badgeRight=new S("commonmenu","",new U(0,0),new L(40,40)),this._labelText=new g("",new U(0,0),.35,d.White,0,l.Right)}SetVerticalPosition(e){this._rectangle.Pos=new U(this.Offset.X,e+144+this.Offset.Y),this._selectedSprite.Pos=new U(0+this.Offset.X,e+144+this.Offset.Y),this._text.Pos=new U(8+this.Offset.X,e+147+this.Offset.Y),this._badgeLeft.Pos=new U(0+this.Offset.X,e+142+this.Offset.Y),this._badgeRight.Pos=new U(385+this.Offset.X,e+142+this.Offset.Y),this._labelText.Pos=new U(420+this.Offset.X,e+148+this.Offset.Y)}addEvent(e,...t){this._event={event:e,args:t}}fireEvent(){this._event&&e.emit(this._event.event,...this._event.args)}Draw(){this._rectangle.Size=new L(431+this.Parent.WidthOffset,38),this._selectedSprite.Size=new L(431+this.Parent.WidthOffset,38),this.Hovered&&!this.Selected&&(this._rectangle.Color=new d(255,255,255,20),this._rectangle.Draw()),this._selectedSprite.Color=this.Selected?this.HighlightedBackColor:this.BackColor,this._selectedSprite.Draw(),this._text.Color=this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this.LeftBadge!=o.None?(this._text.Pos=new U(35+this.Offset.X,this._text.Pos.Y),this._badgeLeft.TextureDict=this.BadgeToSpriteLib(this.LeftBadge),this._badgeLeft.TextureName=this.BadgeToSpriteName(this.LeftBadge,this.Selected),this._badgeLeft.Color=this.IsBagdeWhiteSprite(this.LeftBadge)?this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148):d.White,this._badgeLeft.Draw()):this._text.Pos=new U(8+this.Offset.X,this._text.Pos.Y),this.RightBadge!=o.None&&(this._badgeRight.Pos=new U(385+this.Offset.X+this.Parent.WidthOffset,this._badgeRight.Pos.Y),this._badgeRight.TextureDict=this.BadgeToSpriteLib(this.RightBadge),this._badgeRight.TextureName=this.BadgeToSpriteName(this.RightBadge,this.Selected),this._badgeRight.Color=this.IsBagdeWhiteSprite(this.RightBadge)?this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148):d.White,this._badgeRight.Draw()),this.RightLabel&&""!==this.RightLabel&&(this._labelText.Pos=new U(420+this.Offset.X+this.Parent.WidthOffset,this._labelText.Pos.Y),this._labelText.Caption=this.RightLabel,this._labelText.Color=this._text.Color=this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this._labelText.Draw()),this._text.Draw()}SetLeftBadge(e){this.LeftBadge=e}SetRightBadge(e){this.RightBadge=e}SetRightLabel(e){this.RightLabel=e}BadgeToSpriteLib(e){switch(e){case o.Sale:return"mpshopsale";case o.Audio1:case o.Audio2:case o.Audio3:case o.AudioInactive:case o.AudioMute:return"mpleaderboard";default:return"commonmenu"}}BadgeToSpriteName(e,t){switch(e){case o.None:return"";case o.BronzeMedal:return"mp_medal_bronze";case o.GoldMedal:return"mp_medal_gold";case o.SilverMedal:return"medal_silver";case o.Alert:return"mp_alerttriangle";case o.Crown:return"mp_hostcrown";case o.Ammo:return t?"shop_ammo_icon_b":"shop_ammo_icon_a";case o.Armour:return t?"shop_armour_icon_b":"shop_armour_icon_a";case o.Barber:return t?"shop_barber_icon_b":"shop_barber_icon_a";case o.Clothes:return t?"shop_clothing_icon_b":"shop_clothing_icon_a";case o.Franklin:return t?"shop_franklin_icon_b":"shop_franklin_icon_a";case o.Bike:return t?"shop_garage_bike_icon_b":"shop_garage_bike_icon_a";case o.Car:return t?"shop_garage_icon_b":"shop_garage_icon_a";case o.Gun:return t?"shop_gunclub_icon_b":"shop_gunclub_icon_a";case o.Heart:return t?"shop_health_icon_b":"shop_health_icon_a";case o.Lock:return"shop_lock";case o.Makeup:return t?"shop_makeup_icon_b":"shop_makeup_icon_a";case o.Mask:return t?"shop_mask_icon_b":"shop_mask_icon_a";case o.Michael:return t?"shop_michael_icon_b":"shop_michael_icon_a";case o.Star:return"shop_new_star";case o.Tattoo:return t?"shop_tattoos_icon_b":"shop_tattoos_icon_a";case o.Tick:return"shop_tick_icon";case o.Trevor:return t?"shop_trevor_icon_b":"shop_trevor_icon_a";case o.Sale:return"saleicon";case o.ArrowLeft:return"arrowleft";case o.ArrowRight:return"arrowright";case o.Audio1:return"leaderboard_audio_1";case o.Audio2:return"leaderboard_audio_2";case o.Audio3:return"leaderboard_audio_3";case o.AudioInactive:return"leaderboard_audio_inactive";case o.AudioMute:return"leaderboard_audio_mute";default:return""}}IsBagdeWhiteSprite(e){switch(e){case o.Lock:case o.Tick:case o.Crown:return!0;default:return!1}}BadgeToColor(e,t){switch(e){case o.Lock:case o.Tick:case o.Crown:return t?new d(255,0,0,0):new d(255,255,255,255);default:return new d(255,255,255,255)}}}class A extends E{_checkedSprite;Checked=!1;constructor(e,t=!1,i=""){super(e,i);this._checkedSprite=new S("commonmenu","shop_box_blank",new U(410,95),new L(50,50)),this.Checked=t}SetVerticalPosition(e){super.SetVerticalPosition(e),this._checkedSprite.Pos=new U(380+this.Offset.X+this.Parent.WidthOffset,e+138+this.Offset.Y)}Draw(){super.Draw(),this._checkedSprite.Pos=this._checkedSprite.Pos=new U(380+this.Offset.X+this.Parent.WidthOffset,this._checkedSprite.Pos.Y);const e=this.HighlightedForeColor==E.DefaultHighlightedForeColor;this.Selected&&e?this._checkedSprite.TextureName=this.Checked?"shop_box_tickb":"shop_box_blankb":this._checkedSprite.TextureName=this.Checked?"shop_box_tick":"shop_box_blank",this._checkedSprite.Color=this.Enabled?this.Selected&&!e?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this._checkedSprite.Draw()}SetRightBadge(e){return this}SetRightLabel(e){return this}}class w{Id=I();DisplayText;Data;constructor(e="",t=null){this.DisplayText=e,this.Data=t}}class P{items;constructor(e){if(0===e.length)throw new Error("ItemsCollection cannot be empty");this.items=e}length(){return this.items.length}getListItems(){const e=[];for(const t of this.items)t instanceof w?e.push(t):"string"==typeof t?e.push(new w(t)):"number"==typeof t&&e.push(new w(t.toString()));return e}}class H extends E{ScrollingEnabled=!0;HoldTimeBeforeScroll=200;_itemText;_arrowLeft;_arrowRight;_currentOffset=0;_itemsCollection=[];get Collection(){return this._itemsCollection}set Collection(e){if(!e)throw new Error("The collection can't be null");this._itemsCollection=e}set SelectedItem(e){const t=this.Collection.findIndex(t=>t.Id===e.Id);this.Index=t>0?t:0}get SelectedItem(){return this.Collection.length>0?this.Collection[this.Index]:null}get SelectedValue(){return null==this.SelectedItem?null:null==this.SelectedItem.Data?this.SelectedItem.DisplayText:this.SelectedItem.Data}_index=0;get Index(){return null==this.Collection||null!=this.Collection&&0==this.Collection.length?-1:this._index%this.Collection.length}set Index(e){if(null==this.Collection)return;if(null!=this.Collection&&0==this.Collection.length)return;this._index=1e8-1e8%this.Collection.length+e;const t=this.Collection.length>=this.Index?this.Collection[this.Index].DisplayText:" ";this._currentOffset=p.GetTextWidth(t,this._itemText&&this._itemText.Font?this._itemText.Font:0,.35)}constructor(e,t="",i=new P([]),s=0,n=null){super(e,t,n);this.Collection=i.getListItems(),this.Index=s,this._arrowLeft=new S("commonmenu","arrowleft",new U(110,105),new L(30,30)),this._arrowRight=new S("commonmenu","arrowright",new U(280,105),new L(30,30)),this._itemText=new g("",new U(290,104),.35,d.White,r.ChaletLondon,l.Right)}setCollection(e){this.Collection=e.getListItems()}setCollectionItem(e,t,i=!0){if(e>this.Collection.length)throw new Error("Index out of bounds");"string"==typeof t&&(t=new w(t)),this.Collection.splice(e,1,t),i&&(this.Index=0)}SetVerticalPosition(e){this._arrowLeft.Pos=new U(300+this.Offset.X+this.Parent.WidthOffset,147+e+this.Offset.Y),this._arrowRight.Pos=new U(400+this.Offset.X+this.Parent.WidthOffset,147+e+this.Offset.Y),this._itemText.Pos=new U(300+this.Offset.X+this.Parent.WidthOffset,e+147+this.Offset.Y),super.SetVerticalPosition(e)}SetRightLabel(e){return this}SetRightBadge(e){return this}Draw(){super.Draw();const e=this.Collection.length>=this.Index?this.Collection[this.Index].DisplayText:" ",t=this._currentOffset;this._itemText.Color=this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this._itemText.Caption=e,this._arrowLeft.Color=this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this._arrowRight.Color=this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this._arrowLeft.Pos=new U(380-t+this.Offset.X+this.Parent.WidthOffset,this._arrowLeft.Pos.Y),this.Selected?(this._arrowLeft.Draw(),this._arrowRight.Draw(),this._itemText.Pos=new U(405+this.Offset.X+this.Parent.WidthOffset,this._itemText.Pos.Y)):this._itemText.Pos=new U(420+this.Offset.X+this.Parent.WidthOffset,this._itemText.Pos.Y),this._itemText.Draw()}}Number.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};class M extends E{_itemText;_arrowLeft;_arrowRight;_currentOffset=0;_leftMoveThreshold=1;_rightMoveThreshold=1;_lowerThreshold=0;_upperThreshold=10;_preCaptionText="";_postCaptionText="";_selectedValue;get PreCaptionText(){return this._preCaptionText}set PreCaptionText(e){if(!e)throw new Error("The pre caption text can't be null");if("string"!=typeof e)throw new Error("The pre caption text must be a string");this._preCaptionText=e,this._currentOffset=p.GetTextWidth(this.PreCaptionText+this._selectedValue.toString()+this.PostCaptionText,this._itemText&&this._itemText.Font?this._itemText.Font:0,.35)}get PostCaptionText(){return this._postCaptionText}set PostCaptionText(e){if(!e)throw new Error("The post caption text can't be null");if("string"!=typeof e)throw new Error("The post caption text must be a string");this._postCaptionText=e,this._currentOffset=p.GetTextWidth(this.PreCaptionText+this._selectedValue.toString()+this.PostCaptionText,this._itemText&&this._itemText.Font?this._itemText.Font:0,.35)}get LeftMoveThreshold(){return this._leftMoveThreshold}set LeftMoveThreshold(e){if(!e)throw new Error("The left threshold can't be null");this._leftMoveThreshold=e}get RightMoveThreshold(){return this._rightMoveThreshold}set RightMoveThreshold(e){if(!e)throw new Error("The right threshold can't be null");this._rightMoveThreshold=e}get LowerThreshold(){return this._lowerThreshold}set LowerThreshold(e){if("number"!=typeof e&&!e)throw new Error("The lower threshold can't be null");this._lowerThreshold=e,this.SelectedValuee&&(this.SelectedValue=e)}get SelectedValue(){return this._selectedValue}set SelectedValue(e){if(ethis._upperThreshold)throw new Error("The value can not be outside the lower or upper limits");var t;this._selectedValue=(t=e,Number.isInteger(t)?t:parseFloat(t.toFixed(10))),this._currentOffset=p.GetTextWidth(this.PreCaptionText+this._selectedValue.toString()+this.PostCaptionText,this._itemText&&this._itemText.Font?this._itemText.Font:0,this._itemText&&this._itemText.Scale?this._itemText.Scale:.35)}constructor(e,t="",i=0,s=10,n=0,o=null){super(e,t,o);this.LowerThreshold=i,this.UpperThreshold=i>s?i:s,this.SelectedValue=ns?i:n,this._arrowLeft=new S("commonmenu","arrowleft",new U(110,105),new L(30,30)),this._arrowRight=new S("commonmenu","arrowright",new U(280,105),new L(30,30)),this._itemText=new g("",new U(290,104),.35,d.White,r.ChaletLondon,l.Right)}SetVerticalPosition(e){this._arrowLeft.Pos=new U(300+this.Offset.X+this.Parent.WidthOffset,147+e+this.Offset.Y),this._arrowRight.Pos=new U(400+this.Offset.X+this.Parent.WidthOffset,147+e+this.Offset.Y),this._itemText.Pos=new U(300+this.Offset.X+this.Parent.WidthOffset,e+147+this.Offset.Y),super.SetVerticalPosition(e)}SetRightLabel(e){return this}SetRightBadge(e){return this}Draw(){super.Draw();const e=this._currentOffset;this._itemText.Color=this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this._itemText.Caption=this.PreCaptionText+this._selectedValue+this.PostCaptionText,this._arrowLeft.Color=this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this._arrowRight.Color=this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this._arrowLeft.Pos=new U(380-e+this.Offset.X+this.Parent.WidthOffset,this._arrowLeft.Pos.Y),this.Selected?(this._arrowLeft.Draw(),this._arrowRight.Draw(),this._itemText.Pos=new U(405+this.Offset.X+this.Parent.WidthOffset,this._itemText.Pos.Y)):this._itemText.Pos=new U(420+this.Offset.X+this.Parent.WidthOffset,this._itemText.Pos.Y),this._itemText.Draw()}}class x extends E{_arrowLeft;_arrowRight;_rectangleBackground;_rectangleSlider;_rectangleDivider;_items;_index;get Index(){return this._index%this._items.length}set Index(e){this._index=1e8-1e8%this._items.length+e}constructor(e,t,i,s="",n=!1,o=null){super(e,s,o);this._items=t,this._arrowLeft=new S("commonmenutu","arrowleft",new U(0,105),new L(15,15)),this._arrowRight=new S("commonmenutu","arrowright",new U(0,105),new L(15,15)),this._rectangleBackground=new T(new U(0,0),new L(150,9),new d(4,32,57,255)),this._rectangleSlider=new T(new U(0,0),new L(75,9),new d(57,116,200,255)),this._rectangleDivider=new T(new U(0,0),new L(2.5,20),n?d.WhiteSmoke:d.Transparent),this.Index=i}SetVerticalPosition(e){this._rectangleBackground.Pos=new U(250+this.Offset.X+this.Parent.WidthOffset,e+158.5+this.Offset.Y),this._rectangleSlider.Pos=new U(250+this.Offset.X+this.Parent.WidthOffset,e+158.5+this.Offset.Y),this._rectangleDivider.Pos=new U(323.5+this.Offset.X+this.Parent.WidthOffset,e+153+this.Offset.Y),this._arrowLeft.Pos=new U(235+this.Offset.X+this.Parent.WidthOffset,155.5+e+this.Offset.Y),this._arrowRight.Pos=new U(400+this.Offset.X+this.Parent.WidthOffset,155.5+e+this.Offset.Y),super.SetVerticalPosition(e)}IndexToItem(e){return this._items[e]}Draw(){super.Draw(),this._arrowLeft.Color=this.Enabled?this.Selected?d.Black:d.WhiteSmoke:new d(163,159,148),this._arrowRight.Color=this.Enabled?this.Selected?d.Black:d.WhiteSmoke:new d(163,159,148);let e=(this._rectangleBackground.Size.Width-this._rectangleSlider.Size.Width)/(this._items.length-1)*this.Index;this._rectangleSlider.Pos=new U(250+this.Offset.X+e+ +this.Parent.WidthOffset,this._rectangleSlider.Pos.Y),this.Selected&&(this._arrowLeft.Draw(),this._arrowRight.Draw()),this._rectangleBackground.Draw(),this._rectangleSlider.Draw(),this._rectangleDivider.Draw()}SetRightBadge(e){}SetRightLabel(e){}}class N extends f{Items;constructor(e,t,i){super(e,t,i),this.Items=[]}addItem(e){this.Items.push(e)}Draw(e){if(!this.Enabled)return;e=e||new L;const t=1080*(p.Width/p.Height),s=this.Size.Width/t,n=this.Size.Height/1080,o=(this.Pos.X+e.Width)/t+.5*s,h=(this.Pos.Y+e.Height)/1080+.5*n;for(var r of(i.drawRect(o,h,s,n,this.Color.R,this.Color.G,this.Color.B,this.Color.A,!1),this.Items))r.Draw(new L(this.Pos.X+e.Width,this.Pos.Y+e.Height))}}class y{static PlaySound(e,t){i.playSound(-1,e,t,!1,0,!0)}}class V{handlers=[];on(e){this.handlers.push(e)}off(e){this.handlers=this.handlers.filter(t=>t!==e)}emit(...e){this.handlers.slice(0).forEach(t=>t(...e))}expose(){return this}count(){return this.handlers.length}}class b{Text;get ItemBind(){return this._itemBind}_itemBind=null;_buttonString;_buttonControl;_usingControls;constructor(e,t,i=null){this.Text=e,this._buttonControl=t,this._usingControls=null==i,this._buttonString=i}BindToItem(e){this._itemBind=e}GetButtonId(){return this._usingControls?i.getControlInstructionalButtonsString(2,this._buttonControl,!1):"t_"+this._buttonString}}class F{_handle=0;scaleForm;constructor(e){this.scaleForm=e,this._handle=t.requestScaleformMovie(this.scaleForm)}get handle(){return this._handle}get isValid(){return 0!=this._handle}get isLoaded(){return t.hasScaleformMovieLoaded(this._handle)}callFunctionHead(i,...s){this.isValid&&this.isLoaded&&(t.beginScaleformMovieMethod(this._handle,i),s.forEach(i=>{switch(typeof i){case"number":Number(i)===i&&i%1!=0?t.scaleformMovieMethodAddParamFloat(i):t.scaleformMovieMethodAddParamInt(i);case"string":t.scaleformMovieMethodAddParamPlayerNameString(i);break;case"boolean":t.scaleformMovieMethodAddParamBool(i);break;default:e.logError(`Unknown argument type ${typeof i} = ${i.toString()} passed to scaleform with handle ${this._handle}`)}}))}callFunction(e,...i){this.callFunctionHead(e,...i),t.endScaleformMovieMethod()}callFunctionReturn(e,...i){return this.callFunctionHead(e,...i),t.endScaleformMovieMethodReturnValue()}render2D(){this.isValid&&this.isLoaded&&t.drawScaleformMovieFullscreen(this._handle,255,255,255,255,0)}recreate(){this.isValid&&this.isLoaded&&(t.setScaleformMovieAsNoLongerNeeded(this._handle),this._handle=t.requestScaleformMovie(this.scaleForm))}destroy(){this.isValid&&(t.setScaleformMovieAsNoLongerNeeded(this._handle),this._handle=0)}}class Y{static _messageVisible=!1;static _transitionOutTimeout=null;static _transitionOutFinishedTimeout=null;static _delayedTransitionInTimeout=null;static _scaleform=null;static _transitionOutTimeMs=500;static _transitionOutAnimName=null;static Initialize(e,t){this._transitionOutAnimName=t,this._scaleform=new F(e)}static get IsVisible(){return this._messageVisible}static get Scaleform(){return this._scaleform}static Load(){null!=this._delayedTransitionInTimeout&&(e.clearTimeout(this._delayedTransitionInTimeout),this._delayedTransitionInTimeout=null)}static SetDelayedTransition(t,i){this._delayedTransitionInTimeout=e.setTimeout(()=>{this._delayedTransitionInTimeout=null,this.TransitionIn(t,i)},this._transitionOutTimeMs)}static ShowCustomShard(e,t=5e3,...i){this.ShowComplexCustomShard(()=>{this._scaleform.callFunction(e,...i)},t)}static ShowComplexCustomShard(e,t=5e3){this.Load(),this._messageVisible?(this.TransitionOut(),this.SetDelayedTransition(()=>e(),t)):this.TransitionIn(e,t)}static TransitionOut(){this._messageVisible&&(null!=this._transitionOutTimeout&&(e.clearTimeout(this._transitionOutTimeout),this._transitionOutTimeout=null),null!=this._transitionOutFinishedTimeout&&(e.clearTimeout(this._transitionOutFinishedTimeout),this._transitionOutFinishedTimeout=null),this._scaleform.callFunction(this._transitionOutAnimName),this._transitionOutFinishedTimeout=e.setTimeout(()=>{this._messageVisible=!1,this._scaleform.recreate()},this._transitionOutTimeMs))}static TransitionIn(e,t=500){this._messageVisible=!0,e(),this.SetTransitionOutTimer(t)}static SetTransitionOutTimer(t){this._transitionOutTimeout=e.setTimeout(()=>{this._transitionOutTimeout=null,this.TransitionOut()},t)}static Render(){this._messageVisible&&this._scaleform.render2D()}}class v extends Y{static Initialize(t,i){super.Initialize(t,i),e.everyTick(()=>this.Render())}static ShowMissionPassedMessage(e,t="",i=5e3){this.ShowCustomShard("SHOW_MISSION_PASSED_MESSAGE",i,e,t,100,!0,0,!0)}static ShowColoredShard(e,t,i,s,n=5e3){this.ShowCustomShard("SHOW_SHARD_CENTERED_MP_MESSAGE",n,e,t,s,i)}static ShowOldMessage(e,t=5e3){this.ShowCustomShard("SHOW_MISSION_PASSED_MESSAGE",t,e)}static ShowSimpleShard(e,t="",i=5e3){this.ShowCustomShard("SHOW_SHARD_CREW_RANKUP_MP_MESSAGE",i,e,t)}static ShowRankupMessage(e,t,i,s=5e3){this.ShowCustomShard("SHOW_BIG_MP_MESSAGE",s,e,t,i,"","")}static ShowPlaneMessage(e,t,i,s=5e3){this.ShowCustomShard("SHOW_PLANE_MESSAGE",s,e,t,i,"","")}static ShowWeaponPurchasedMessage(e,t,i,s=5e3){this.ShowCustomShard("SHOW_WEAPON_PURCHASED",s,e,t,i,"",100)}static ShowWastedMessage(e,t,i,s,n=5e3){this.ShowCustomShard("SHOW_SHARD_WASTED_MP_MESSAGE",n,e,t,i,s)}static ShowMpMessageLarge(e,t="",i=5e3){this.ShowComplexCustomShard(()=>{this.Scaleform.callFunction("SHOW_CENTERED_MP_MESSAGE_LARGE",e,t,100,!0,100),this.Scaleform.callFunction("TRANSITION_IN")},i)}}v.Initialize("MP_BIG_MESSAGE_FREEMODE","TRANSITION_OUT");class W extends Y{static Initialize(t,i){super.Initialize(t,i),e.everyTick(()=>this.Render())}static ShowMidsizedMessage(e,t="",i=5e3){this.ShowCustomShard("SHOW_MIDSIZED_MESSAGE",i,e,t)}static ShowBridgesKnivesProgress(e,t,i,s,n,o=5e3){this.ShowCustomShard("SHOW_BRIDGES_KNIVES_PROGRESS",o,e,t,i,s,n)}static ShowCondensedShardMessage(e,t,i,s,n=5e3){this.ShowCustomShard("SHOW_COND_SHARD_MESSAGE",n,e,t,i,s)}static ShowMidsizedShardMessage(e,t,i,s,n,o=5e3){this.ShowCustomShard("SHOW_SHARD_MIDSIZED_MESSAGE",o,e,t,i,s,n)}}W.Initialize("MIDSIZED_MESSAGE","SHARD_ANIM_OUT");class k extends E{_itemText;_arrowLeft;_arrowRight;_currentOffset=0;_precaptionText="";_selectedValue;_selectedStartValueHandler=null;SelectionChangeHandler=null;SelectionChangeHandlerPromise(e,t,i){return new Promise((s,n)=>{s(this.SelectionChangeHandler(e,t,i))})}get PreCaptionText(){return this._precaptionText}set PreCaptionText(e){if(!e)throw new Error("The pre caption text can't be null");if("string"!=typeof e)throw new Error("The pre caption text must be a string");this._precaptionText=e,this._currentOffset=p.GetTextWidth(this.PreCaptionText+this._selectedValue,this._itemText&&this._itemText.Font?this._itemText.Font:0,.35)}get SelectedValue(){return this._selectedValue}set SelectedValue(e){this._selectedValue=e,null!=e&&(this._currentOffset=p.GetTextWidth(this.PreCaptionText+this._selectedValue,this._itemText&&this._itemText.Font?this._itemText.Font:0,this._itemText&&this._itemText.Scale?this._itemText.Scale:.35))}constructor(t,i,s="",n=null,o=null){super(t,s,o),this.isVariableFunction(i)||e.logError(`[UIMenuDynamicListItem] ${t} is not created with a valid selectionChangeHandler, needs to be function. Please see docs.`),this.isVariableFunction(n)||e.logError(`[UIMenuDynamicListItem] ${t} is not created with a valid selectedStartValueHandler, needs to be function. Please see docs.`),this.SelectionChangeHandler=i,this._selectedStartValueHandler=n;this._arrowLeft=new S("commonmenu","arrowleft",new U(110,105),new L(30,30)),this._arrowRight=new S("commonmenu","arrowright",new U(280,105),new L(30,30)),this._itemText=new g("",new U(290,104),.35,d.White,r.ChaletLondon,l.Right)}SetVerticalPosition(e){this._arrowLeft.Pos=new U(300+this.Offset.X+this.Parent.WidthOffset,147+e+this.Offset.Y),this._arrowRight.Pos=new U(400+this.Offset.X+this.Parent.WidthOffset,147+e+this.Offset.Y),this._itemText.Pos=new U(300+this.Offset.X+this.Parent.WidthOffset,e+147+this.Offset.Y),super.SetVerticalPosition(e)}SetRightLabel(e){return this}SetRightBadge(e){return this}Draw(){super.Draw(),null==this._selectedValue&&(null!=this._selectedStartValueHandler?this.SelectedValue=this._selectedStartValueHandler():this._selectedValue="");const e=this._currentOffset;this._itemText.Color=this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this._itemText.Caption=this.PreCaptionText+this._selectedValue,this._arrowLeft.Color=this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this._arrowRight.Color=this.Enabled?this.Selected?this.HighlightedForeColor:this.ForeColor:new d(163,159,148),this._arrowLeft.Pos=new U(380-e+this.Offset.X+this.Parent.WidthOffset,this._arrowLeft.Pos.Y),this.Selected?(this._arrowLeft.Draw(),this._arrowRight.Draw(),this._itemText.Pos=new U(405+this.Offset.X+this.Parent.WidthOffset,this._itemText.Pos.Y)):this._itemText.Pos=new U(420+this.Offset.X+this.Parent.WidthOffset,this._itemText.Pos.Y),this._itemText.Draw()}isVariableFunction(e){return e&&"[object Function]"==={}.toString.call(e)}}let B=[];class G{_visible=!0;_counterPretext="";_counterOverride=void 0;_spriteLibrary;_spriteName;_offset;_lastUpDownNavigation=0;_lastLeftRightNavigation=0;_extraOffset=0;_buttonsEnabled=!0;_justOpened=!0;_justOpenedFromPool=!1;_justClosedFromPool=!1;_poolOpening=null;_safezoneOffset=new U(0,0);_activeItem=1e3;_maxItemsOnScreen=9;_minItem;_maxItem=this._maxItemsOnScreen;_mouseEdgeEnabled=!0;_bannerSprite=null;_bannerRectangle=null;_recalculateDescriptionNextFrame=1;_instructionalButtons=[];_instructionalButtonsScaleform;_defaultTitleScale=1.15;_maxMenuItems=1e3;_mainMenu;_upAndDownSprite;_titleResText;_subtitleResText;_extraRectangleUp;_extraRectangleDown;_descriptionBar;_descriptionRectangle;_descriptionText;_counterText;_background;Id=I();SelectTextLocalized=e.getGxtText("HUD_INPUT2");BackTextLocalized=e.getGxtText("HUD_INPUT3");WidthOffset=0;ParentMenu=null;ParentItem=null;Children;MouseControlsEnabled=!1;CloseableByUser=!0;AUDIO_LIBRARY="HUD_FRONTEND_DEFAULT_SOUNDSET";AUDIO_UPDOWN="NAV_UP_DOWN";AUDIO_LEFTRIGHT="NAV_LEFT_RIGHT";AUDIO_SELECT="SELECT";AUDIO_BACK="BACK";AUDIO_ERROR="ERROR";MenuItems=[];IndexChange=new V;ListChange=new V;AutoListChange=new V;DynamicListChange=new V;SliderChange=new V;CheckboxChange=new V;ItemSelect=new V;MenuOpen=new V;MenuClose=new V;MenuChange=new V;GetSpriteBanner(){return this._bannerSprite}GetRectangleBanner(){return this._bannerRectangle}GetTitle(){return this._titleResText}get MaxItemsVisible(){return this._maxItemsOnScreen}set MaxItemsVisible(e){this._maxItemsOnScreen=e,this._maxItem=e}get Title(){return this._titleResText.Caption}set Title(e){this._titleResText.Caption=e}get GetSubTitle(){return this._subtitleResText}get SubTitle(){return this._subtitleResText.Caption}set SubTitle(e){this._subtitleResText.Caption=e}get Visible(){return this._visible}set Visible(e){if(this._visible=e,y.PlaySound(this.AUDIO_BACK,this.AUDIO_LIBRARY),this.UpdateScaleform(),e&&this.UpdateDescriptionCaption(),!0!==this._justOpenedFromPool)if(e){if(this._justOpened=!0,this.MenuOpen.emit(),null===this.ParentMenu&&!B.includes(this)&&this!==this._poolOpening){const e=B.length?B[B.length-1]:null;B.push(this),e!==this._poolOpening&&null!==e&&(e._justClosedFromPool=!0,e.Visible=!1)}}else{if(!0===this._justClosedFromPool)return void(this._justClosedFromPool=!1);null===this.ParentMenu&&B.includes(this)&&B.length&&(B[B.length-1]===this&&(B.pop(),this._justOpenedFromPool=!0,B.length||(this._poolOpening=null)),B.length&&(this._poolOpening=B[B.length-1],B[B.length-1].Visible=!0)),0===B.length&&i.setMouseCursorStyle(1)}else this._justOpenedFromPool=!1}get CurrentSelection(){return this._activeItem%this.MenuItems.length}set CurrentSelection(e){this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!1,this._activeItem=this._maxMenuItems-this._maxMenuItems%this.MenuItems.length+e,this.CurrentSelection>this._maxItem?(this._maxItem=this.CurrentSelection,this._minItem=this.CurrentSelection-this._maxItemsOnScreen):this.CurrentSelectionthis._maxItemsOnScreen+1?this._maxItemsOnScreen+2:this.MenuItems.length;this._descriptionBar.Size=new L(431+this.WidthOffset,4),this._descriptionRectangle.Size=new L(431+this.WidthOffset,30),this._descriptionBar.Pos=new U(this._offset.X,112+this._extraOffset+this._offset.Y),this._descriptionRectangle.Pos=new U(this._offset.X,112+this._extraOffset+this._offset.Y),this._descriptionText.Pos=new U(this._offset.X+8,118+this._extraOffset+this._offset.Y),this._descriptionBar.Pos=new U(this._offset.X,38*e+this._descriptionBar.Pos.Y),this._descriptionRectangle.Pos=new U(this._offset.X,38*e+this._descriptionRectangle.Pos.Y),this._descriptionText.Pos=new U(this._offset.X+8,38*e+this._descriptionText.Pos.Y)}SetMenuWidthOffset(e){if(this.WidthOffset=e,null!=this._bannerSprite&&(this._bannerSprite.Size=new L(431+this.WidthOffset,107)),this._mainMenu.Items[0].pos=new U(215+this._offset.X+this.WidthOffset/2,20+this._offset.Y),this._counterText&&(this._counterText.Pos=new U(425+this._offset.X+e,110+this._offset.Y)),this._mainMenu.Items.length>=2){this._mainMenu.Items[1].size=new L(431+this.WidthOffset,37)}null!=this._bannerRectangle&&(this._bannerRectangle.Size=new L(431+this.WidthOffset,107))}AddItem(e){this._justOpened&&(this._justOpened=!1),e.Offset=this._offset,e.Parent=this,e.SetVerticalPosition(25*this.MenuItems.length-37+this._extraOffset),this.MenuItems.push(e),this.RefreshIndex()}RemoveItem(e){for(let t=0;t{e.Close(!0)}),this.MenuItems.filter(e=>e instanceof k).forEach(e=>{e.SelectedValue=void 0}),this.RefreshIndex()}Close(e=!1){this.Visible=!1,this.CleanUp(e),this.MenuClose.emit(!0)}GoLeft(){if((this.MenuItems[this.CurrentSelection]instanceof H||this.MenuItems[this.CurrentSelection]instanceof M||this.MenuItems[this.CurrentSelection]instanceof k||this.MenuItems[this.CurrentSelection]instanceof x)&&this.MenuItems[this.CurrentSelection].Enabled)if(this.MenuItems[this.CurrentSelection]instanceof H){const e=this.MenuItems[this.CurrentSelection];if(0==e.Collection.length)return;e.Index--,y.PlaySound(this.AUDIO_LEFTRIGHT,this.AUDIO_LIBRARY),this.ListChange.emit(e,e.Index),this.UpdateDescriptionCaption()}else if(this.MenuItems[this.CurrentSelection]instanceof M){const e=this.MenuItems[this.CurrentSelection];e.SelectedValue<=e.LowerThreshold?e.SelectedValue=e.UpperThreshold:e.SelectedValue-=e.LeftMoveThreshold,y.PlaySound(this.AUDIO_LEFTRIGHT,this.AUDIO_LIBRARY),this.AutoListChange.emit(e,e.SelectedValue,u.Left),this.UpdateDescriptionCaption()}else if(this.MenuItems[this.CurrentSelection]instanceof k){const e=this.MenuItems[this.CurrentSelection];e.SelectionChangeHandlerPromise(e,e.SelectedValue,u.Left).then(t=>{e.SelectedValue=t,this.DynamicListChange.emit(e,e.SelectedValue,u.Left)}),y.PlaySound(this.AUDIO_LEFTRIGHT,this.AUDIO_LIBRARY),this.UpdateDescriptionCaption()}else if(this.MenuItems[this.CurrentSelection]instanceof x){const e=this.MenuItems[this.CurrentSelection];e.Index=e.Index-1,y.PlaySound(this.AUDIO_LEFTRIGHT,this.AUDIO_LIBRARY),this.SliderChange.emit(e,e.Index,e.IndexToItem(e.Index)),this.UpdateDescriptionCaption()}}GoRight(){if((this.MenuItems[this.CurrentSelection]instanceof H||this.MenuItems[this.CurrentSelection]instanceof M||this.MenuItems[this.CurrentSelection]instanceof k||this.MenuItems[this.CurrentSelection]instanceof x)&&this.MenuItems[this.CurrentSelection].Enabled)if(this.MenuItems[this.CurrentSelection]instanceof H){const e=this.MenuItems[this.CurrentSelection];if(0==e.Collection.length)return;e.Index++,y.PlaySound(this.AUDIO_LEFTRIGHT,this.AUDIO_LIBRARY),this.ListChange.emit(e,e.Index),this.UpdateDescriptionCaption()}else if(this.MenuItems[this.CurrentSelection]instanceof M){const e=this.MenuItems[this.CurrentSelection];e.SelectedValue>=e.UpperThreshold?e.SelectedValue=e.LowerThreshold:e.SelectedValue+=e.RightMoveThreshold,y.PlaySound(this.AUDIO_LEFTRIGHT,this.AUDIO_LIBRARY),this.AutoListChange.emit(e,e.SelectedValue,u.Right),this.UpdateDescriptionCaption()}else if(this.MenuItems[this.CurrentSelection]instanceof k){const e=this.MenuItems[this.CurrentSelection];e.SelectionChangeHandlerPromise(e,e.SelectedValue,u.Right).then(t=>{e.SelectedValue=t,this.DynamicListChange.emit(e,e.SelectedValue,u.Right)}),y.PlaySound(this.AUDIO_LEFTRIGHT,this.AUDIO_LIBRARY),this.UpdateDescriptionCaption()}else if(this.MenuItems[this.CurrentSelection]instanceof x){const e=this.MenuItems[this.CurrentSelection];e.Index++,y.PlaySound(this.AUDIO_LEFTRIGHT,this.AUDIO_LIBRARY),this.SliderChange.emit(e,e.Index,e.IndexToItem(e.Index)),this.UpdateDescriptionCaption()}}SelectItem(){if(!this.MenuItems[this.CurrentSelection].Enabled)return void y.PlaySound(this.AUDIO_ERROR,this.AUDIO_LIBRARY);const e=this.MenuItems[this.CurrentSelection];if(y.PlaySound(this.AUDIO_SELECT,this.AUDIO_LIBRARY),this.ItemSelect.emit(e,this.CurrentSelection),this.MenuItems[this.CurrentSelection]instanceof A)e.Checked=!e.Checked,this.CheckboxChange.emit(e,e.Checked);else if(this.Children.has(e.Id)){const t=this.Children.get(e.Id);this.Visible=!1,t.Visible=!0,this.MenuChange.emit(t,!0)}e.fireEvent()}HasCurrentSelectionChildren(){const e=this.MenuItems[this.CurrentSelection];return!!(this.MenuItems[this.CurrentSelection]instanceof E&&this.Children.has(e.Id))}IsMouseInListItemArrows(e,t,s){i.beginTextCommandGetScreenWidthOfDisplayText("jamyfafi"),i.addTextComponentSubstringPlayerName(e.Text);let n=p.ResolutionMaintainRatio;let o=1080*(n.Width/n.Height);const h=5+i.endTextCommandGetScreenWidthOfDisplayText(!1)*o*.35+10,r=431-h;return p.IsMouseInBounds(t,new L(h,38))?1:p.IsMouseInBounds(new U(t.X+h,t.Y),new L(r,38))?2:0}ProcessMouse(){if(!this.Visible||this._justOpened||0==this.MenuItems.length||!this.MouseControlsEnabled)return void this.MenuItems.filter(e=>e.Hovered).forEach(e=>e.Hovered=!1);e.showCursor(!0);let t=this.MenuItems.length-1,s=0;this.MenuItems.length>this._maxItemsOnScreen+1&&(t=this._maxItem),p.IsMouseInBounds(new U(0,0),new L(30,1080))&&this._mouseEdgeEnabled?(i.setGameplayCamRelativeHeading(i.getGameplayCamRelativeHeading()+5),i.setMouseCursorStyle(6)):p.IsMouseInBounds(new U(p.ResolutionMaintainRatio.Width-30,0),new L(30,1080))&&this._mouseEdgeEnabled?(i.setGameplayCamRelativeHeading(i.getGameplayCamRelativeHeading()-5),i.setMouseCursorStyle(7)):this._mouseEdgeEnabled&&i.setMouseCursorStyle(1);for(let e=this._minItem;e<=t;e++){let t=this._offset.X,n=this._offset.Y+144-37+this._extraOffset+38*s,o=431+this.WidthOffset;const h=38,r=this.MenuItems[e];if(p.IsMouseInBounds(new U(t,n),new L(o,h))){r.Hovered=!0;const s=this.IsMouseInListItemArrows(this.MenuItems[e],new U(t,n),0);if(r.Hovered&&1==s&&(this.MenuItems[e]instanceof H||this.MenuItems[e]instanceof M||this.MenuItems[e]instanceof k)&&i.setMouseCursorStyle(5),i.isControlJustReleased(0,24)||i.isDisabledControlJustReleased(0,24))if(r.Selected&&r.Enabled)if((this.MenuItems[e]instanceof H||this.MenuItems[e]instanceof M||this.MenuItems[e]instanceof k)&&this.IsMouseInListItemArrows(this.MenuItems[e],new U(t,n),0)>0)switch(s){case 1:y.PlaySound(this.AUDIO_SELECT,this.AUDIO_LIBRARY),this.MenuItems[e].fireEvent(),this.ItemSelect.emit(this.MenuItems[e],e);break;case 2:let t=this.MenuItems[e];(null==t.Collection?t.Items.Count:t.Collection.Count)>0&&(t.Index++,y.PlaySound(this.AUDIO_LEFTRIGHT,this.AUDIO_LIBRARY),this.ListChange.emit(t,t.Index))}else this.SelectItem();else r.Selected?!r.Enabled&&r.Selected&&y.PlaySound(this.AUDIO_ERROR,this.AUDIO_LIBRARY):(this.CurrentSelection=e,y.PlaySound(this.AUDIO_UPDOWN,this.AUDIO_LIBRARY),this.IndexChange.emit(this.CurrentSelection,this.MenuItems[this._activeItem%this.MenuItems.length]),this.SelectItem(),this.UpdateDescriptionCaption(),this.UpdateScaleform())}else r.Hovered=!1;s++}const n=144+38*(this._maxItemsOnScreen+1)+this._offset.Y-37+this._extraOffset+this._safezoneOffset.Y,o=this._safezoneOffset.X+this._offset.X;this.MenuItems.length<=this._maxItemsOnScreen+1||(p.IsMouseInBounds(new U(o,n),new L(431+this.WidthOffset,18))?(this._extraRectangleUp.Color=new d(30,30,30,255),(i.isControlJustPressed(0,24)||i.isDisabledControlJustPressed(0,24))&&(this.MenuItems.length>this._maxItemsOnScreen+1?this.GoUpOverflow():this.GoUp())):this._extraRectangleUp.Color=new d(0,0,0,200),p.IsMouseInBounds(new U(o,n+18),new L(431+this.WidthOffset,18))?(this._extraRectangleDown.Color=new d(30,30,30,255),(i.isControlJustPressed(0,24)||i.isDisabledControlJustPressed(0,24))&&(this.MenuItems.length>this._maxItemsOnScreen+1?this.GoDownOverflow():this.GoDown())):this._extraRectangleDown.Color=new d(0,0,0,200))}ProcessControl(){this.Visible&&(this._justOpened?this._justOpened=!1:(i.isControlJustReleased(0,177)&&this.GoBack(),0!=this.MenuItems.length&&(i.isControlPressed(0,172)&&this._lastUpDownNavigation+120this._maxItemsOnScreen+1?this.GoUpOverflow():this.GoUp(),this.UpdateScaleform()):i.isControlJustReleased(0,172)?this._lastUpDownNavigation=0:i.isControlPressed(0,173)&&this._lastUpDownNavigation+120this._maxItemsOnScreen+1?this.GoDownOverflow():this.GoDown(),this.UpdateScaleform()):i.isControlJustReleased(0,173)?this._lastUpDownNavigation=0:i.isControlPressed(0,174)&&this._lastLeftRightNavigation+100this._maxItemsOnScreen+1||(this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!1,this._activeItem--,this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!0,y.PlaySound(this.AUDIO_UPDOWN,this.AUDIO_LIBRARY),this.IndexChange.emit(this.CurrentSelection,this.MenuItems[this._activeItem%this.MenuItems.length]),this.UpdateDescriptionCaption())}GoDownOverflow(){this.MenuItems.length<=this._maxItemsOnScreen+1||(this._activeItem%this.MenuItems.length>=this._maxItem?this._activeItem%this.MenuItems.length==this.MenuItems.length-1?(this._minItem=0,this._maxItem=this._maxItemsOnScreen,this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!1,this._activeItem=this._maxMenuItems-this._maxMenuItems%this.MenuItems.length,this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!0):(this._minItem++,this._maxItem++,this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!1,this._activeItem++,this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!0):(this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!1,this._activeItem++,this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!0),y.PlaySound(this.AUDIO_UPDOWN,this.AUDIO_LIBRARY),this.IndexChange.emit(this.CurrentSelection,this.MenuItems[this._activeItem%this.MenuItems.length]),this.UpdateDescriptionCaption())}GoDown(){this.MenuItems.length>this._maxItemsOnScreen+1||(this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!1,this._activeItem++,this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!0,y.PlaySound(this.AUDIO_UPDOWN,this.AUDIO_LIBRARY),this.IndexChange.emit(this.CurrentSelection,this.MenuItems[this._activeItem%this.MenuItems.length]),this.UpdateDescriptionCaption())}GoBack(){null!=this.ParentMenu?(this.Visible=!1,this.ParentMenu.Visible=!0,this.MenuChange.emit(this.ParentMenu,!1),this.MenuClose.emit(!1)):this.CloseableByUser&&(this.Visible=!1,this.CleanUp(!0),this.MenuClose.emit(!1))}BindMenuToItem(e,t){this.MenuItems.includes(t)||this.AddItem(t),e.ParentMenu=this,e.ParentItem=t,this.Children.set(t.Id,e)}AddSubMenu(e,t){this.BindMenuToItem(e,t)}ReleaseMenuFromItem(e){if(!this.Children.has(e.Id))return!1;const t=this.Children.get(e.Id);return t.ParentItem=null,t.ParentMenu=null,this.Children.delete(e.Id),!0}UpdateDescriptionCaption(){this.MenuItems.length&&(this._descriptionText.Caption=this.MenuItems[this._activeItem%this.MenuItems.length].Description,this._descriptionText.Wrap=400,this._recalculateDescriptionNextFrame++)}CalculateDescription(){if(!(this.MenuItems.length<=0)&&(this._recalculateDescriptionNextFrame>0&&this._recalculateDescriptionNextFrame--,this.RecalculateDescriptionPosition(),this.MenuItems.length>0&&this._descriptionText.Caption&&""!==this.MenuItems[this._activeItem%this.MenuItems.length].Description.trim())){const e=p.GetLineCount(this._descriptionText.Caption,this._descriptionText.Pos,this._descriptionText.Font,this._descriptionText.Scale,this._descriptionText.Wrap);this._descriptionRectangle.Size=new L(431+this.WidthOffset,25*e+15),0===e&&this._recalculateDescriptionNextFrame++}}UpdateScaleform(){if(!this.Visible||!this._buttonsEnabled)return;this._instructionalButtonsScaleform.callFunction("CLEAR_ALL"),this._instructionalButtonsScaleform.callFunction("TOGGLE_MOUSE_BUTTONS",0),this._instructionalButtonsScaleform.callFunction("CREATE_CONTAINER"),this._instructionalButtonsScaleform.callFunction("SET_DATA_SLOT",0,i.getControlInstructionalButtonsString(2,c.PhoneSelect,!1),this.SelectTextLocalized),this._instructionalButtonsScaleform.callFunction("SET_DATA_SLOT",1,i.getControlInstructionalButtonsString(2,c.PhoneCancel,!1),this.BackTextLocalized);let e=2;this._instructionalButtons.filter(e=>null==e.ItemBind||this.MenuItems[this.CurrentSelection]==e.ItemBind).forEach(t=>{this._instructionalButtonsScaleform.callFunction("SET_DATA_SLOT",e,t.GetButtonId(),t.Text),e++}),this._instructionalButtonsScaleform.callFunction("DRAW_INSTRUCTIONAL_BUTTONS",-1)}render(){if(!this.Visible)return;this._buttonsEnabled&&(i.drawScaleformMovieFullscreen(this._instructionalButtonsScaleform.handle,255,255,255,255,0),i.hideHudComponentThisFrame(6),i.hideHudComponentThisFrame(7),i.hideHudComponentThisFrame(9)),this._justOpened&&(null==this._bannerSprite||this._bannerSprite.IsTextureDictionaryLoaded||this._bannerSprite.LoadTextureDictionary(),this._background.IsTextureDictionaryLoaded||this._background.LoadTextureDictionary(),this._descriptionRectangle.IsTextureDictionaryLoaded||this._descriptionRectangle.LoadTextureDictionary(),this._upAndDownSprite.IsTextureDictionaryLoaded||this._upAndDownSprite.LoadTextureDictionary(),this._recalculateDescriptionNextFrame||this._recalculateDescriptionNextFrame++),this._mainMenu.Draw(),this.ProcessMouse(),this.ProcessControl(),this._background.Size=this.MenuItems.length>this._maxItemsOnScreen+1?new L(431+this.WidthOffset,38*(this._maxItemsOnScreen+1)):new L(431+this.WidthOffset,38*this.MenuItems.length),this._background.Draw(),this._recalculateDescriptionNextFrame&&this.CalculateDescription(),this.MenuItems.length>0&&(this.MenuItems[this._activeItem%this.MenuItems.length].Selected=!0,""!==this.MenuItems[this._activeItem%this.MenuItems.length].Description.trim()&&(this._descriptionBar.Draw(),this._descriptionRectangle.Draw(),this._descriptionText.Draw()));let e=0;if(this.MenuItems.length<=this._maxItemsOnScreen+1){for(const t of this.MenuItems)t.SetVerticalPosition(38*e-37+this._extraOffset),t.Draw(),e++;this._counterText&&this._counterOverride&&(this._counterText.Caption=this._counterPretext+this._counterOverride,this._counterText.Draw())}else{for(let t=this._minItem;t<=this._maxItem;t++){let i=this.MenuItems[t];i.SetVerticalPosition(38*e-37+this._extraOffset),i.Draw(),e++}if(this._extraRectangleUp.Size=new L(431+this.WidthOffset,18),this._extraRectangleDown.Size=new L(431+this.WidthOffset,18),this._upAndDownSprite.Pos=new U(190+this._offset.X+this.WidthOffset/2,147+37*(this._maxItemsOnScreen+1)+this._offset.Y-37+this._extraOffset),this._extraRectangleUp.Draw(),this._extraRectangleDown.Draw(),this._upAndDownSprite.Draw(),this._counterText){if(this._counterOverride)this._counterText.Caption=this._counterPretext+this._counterOverride;else{const e=this.CurrentSelection+1+" / "+this.MenuItems.length;this._counterText.Caption=this._counterPretext+e}this._counterText.Draw()}}null!=this._bannerRectangle&&this._bannerRectangle.Draw(),null!=this._bannerSprite&&this._bannerSprite.Draw()}}export{l as Alignment,o as BadgeStyle,v as BigMessage,u as ChangeDirection,d as Color,c as Control,r as Font,R as HudColor,b as InstructionalButton,P as ItemsCollection,w as ListItem,G as Menu,W as MidsizedMessage,U as Point,T as ResRectangle,L as Size,S as Sprite,M as UIMenuAutoListItem,A as UIMenuCheckboxItem,k as UIMenuDynamicListItem,E as UIMenuItem,H as UIMenuListItem,x as UIMenuSliderItem,G as default}; From 52e936a8206b8caf8ab130801d38636de2d90629 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 2 Sep 2024 01:30:46 +0200 Subject: [PATCH 6/6] Added package-lock.json again --- .gitignore | 1 - package-lock.json | 564 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 564 insertions(+), 1 deletion(-) create mode 100644 package-lock.json diff --git a/.gitignore b/.gitignore index 10fd1a3..6b6c78f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,4 @@ node_modules/ .npmrc .idea/ .vs/ -package-lock.json yarn.lock \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..a33dc24 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,564 @@ +{ + "name": "@DurtyFree/altv-nativeui", + "version": "1.4.6", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@DurtyFree/altv-nativeui", + "version": "1.4.6", + "license": "Apache-2.0", + "devDependencies": { + "@altv/types-client": "latest", + "@altv/types-natives": "latest", + "@altv/types-shared": "latest", + "@types/node": "^22.5.2", + "rollup": "^2.53.2", + "rollup-plugin-terser": "^6.1.0", + "rollup-plugin-typescript2": "^0.27.3", + "typescript": "^5.5.4" + } + }, + "node_modules/@altv/types-client": { + "version": "16.2.6", + "resolved": "https://registry.npmjs.org/@altv/types-client/-/types-client-16.2.6.tgz", + "integrity": "sha512-iOO7BuKSYo0vAr3lhtscgikN7Tc20kw6wyplTQispEQuCqbWtAU0BjHmdD81bUX1BEjkSL9DqEAYp3OnjJZA9A==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@altv/types-shared": "^16.2.0", + "@altv/types-worker": "^16.2.0" + } + }, + "node_modules/@altv/types-natives": { + "version": "16.2.1", + "resolved": "https://registry.npmjs.org/@altv/types-natives/-/types-natives-16.2.1.tgz", + "integrity": "sha512-V3VrJrB7HP+rG/SDPZHaR1enASGuWqXtcDQixa+CxwFeFH7GxeqH0qhdD1F8SH3NsiKg5CGvVsUulHEO5KkzBA==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@altv/types-client": "^16.2.0" + } + }, + "node_modules/@altv/types-shared": { + "version": "16.2.3", + "resolved": "https://registry.npmjs.org/@altv/types-shared/-/types-shared-16.2.3.tgz", + "integrity": "sha512-RcAc58S12SfqBV4WDD4kx2wupQYGbKlOOsnQikhq/A5x4yoUbrF8v3zvoKwaAdQVbZNAQynpcTxanv3y+v0nKg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@altv/types-worker": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/@altv/types-worker/-/types-worker-16.2.0.tgz", + "integrity": "sha512-l2cy7xFn4QE+XCHJyu1dJB8cziwAfi4x4S8JbpymRAAnXkMHvrZixjpyeUzNRnQGn4dNhQz6QLyUYx+LEXDtyA==", + "dev": true, + "license": "MIT", + "peer": true, + "peerDependencies": { + "@altv/types-client": "^16.2.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@rollup/pluginutils": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + }, + "engines": { + "node": ">= 8.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0" + } + }, + "node_modules/@types/estree": { + "version": "0.0.39", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.5.2", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk/node_modules/has-flag": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "5.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "dev": true, + "license": "MIT" + }, + "node_modules/commander": { + "version": "2.20.3", + "dev": true, + "license": "MIT" + }, + "node_modules/commondir": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/estree-walker": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/find-cache-dir": { + "version": "3.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs-extra": { + "version": "8.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "dev": true, + "license": "ISC" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-worker": { + "version": "26.6.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/jsonfile": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/make-dir": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/p-limit": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.0.1", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/resolve": { + "version": "1.17.0", + "dev": true, + "license": "MIT", + "dependencies": { + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/rollup": { + "version": "2.79.1", + "dev": true, + "license": "MIT", + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/rollup-plugin-terser": { + "version": "6.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.8.3", + "jest-worker": "^26.0.0", + "serialize-javascript": "^3.0.0", + "terser": "^4.7.0" + }, + "peerDependencies": { + "rollup": "^2.0.0" + } + }, + "node_modules/rollup-plugin-typescript2": { + "version": "0.27.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^3.1.0", + "find-cache-dir": "^3.3.1", + "fs-extra": "8.1.0", + "resolve": "1.17.0", + "tslib": "2.0.1" + }, + "peerDependencies": { + "rollup": ">=1.26.3", + "typescript": ">=2.4.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/semver": { + "version": "6.3.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/serialize-javascript": { + "version": "3.1.0", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/terser": { + "version": "4.8.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/tslib": { + "version": "2.0.1", + "dev": true, + "license": "0BSD" + }, + "node_modules/typescript": { + "version": "5.5.4", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.19.8", + "dev": true, + "license": "MIT" + }, + "node_modules/universalify": { + "version": "0.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + } + } +}