├── README.md ├── Start.bat ├── config.json ├── cookies.json.ex ├── cookies └── cookie放这里.js ├── package-lock.json ├── package.json ├── server.js ├── start.sh └── 版本号.txt /README.md: -------------------------------------------------------------------------------- 1 | # Node.js中转站服务器 2 | 3 | 这是一个用于youcom代理的Node.js中转站服务器,专为Windows环境设计。在安装了桌面环境的linux 也能运行 4 | 5 | ## 快速开始 6 | 7 | 1. 确保您的系统已安装Node.js和npm。如果没有,请从[Node.js官网](https://nodejs.org)下载并安装。 8 | 9 | 2. 下载或克隆此仓库到您的本地机器。 10 | 11 | 3. 双击运行`Start.bat`文件。这将自动安装依赖并启动服务器。 12 | 13 | 服务器将在 http://localhost:3000 上运行。 14 | ## 配置 15 | 16 | 在 config.json文件中 设置端口 和 代理 和无头模式(不显示浏览器) 17 | 18 | ## cookie 获取 19 | 20 | 可以按 f12 在网页的控制台中 输入 console.log(document.cookie); 来获取 21 | 22 | ## 投喂咖啡 23 | 24 | https://afdian.com/a/cqgnyy 25 | -------------------------------------------------------------------------------- /Start.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/damoshen123/youcom/007d5c627c78617385d32b38b50ab17cc7bb2f31/Start.bat -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 3000, 3 | "pro":false, 4 | "proxy":true, 5 | "proxyUrl":"http://127.0.0.1:7890", 6 | "wutou":false, 7 | "tohuman":true 8 | } 9 | -------------------------------------------------------------------------------- /cookies.json.ex: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /cookies/cookie放这里.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ai-proxy-server", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "ai-proxy-server", 9 | "version": "1.0.0", 10 | "license": "MIT", 11 | "dependencies": { 12 | "@playwright/test": "^1.40.0", 13 | "axios": "^1.6.0", 14 | "cors": "^2.8.5", 15 | "eventsource": "^2.0.2", 16 | "express": "^4.17.1", 17 | "http": "0.0.1-security", 18 | "https-proxy-agent": "^5.0.0", 19 | "node-fetch": "^3.3.1", 20 | "playwright": "^1.40.0", 21 | "systeminformation": "^5.21.7", 22 | "winston": "^3.3.3" 23 | }, 24 | "devDependencies": { 25 | "nodemon": "^2.0.7" 26 | }, 27 | "engines": { 28 | "node": ">=14.0.0" 29 | } 30 | }, 31 | "node_modules/@colors/colors": { 32 | "version": "1.6.0", 33 | "resolved": "https://registry.npmmirror.com/@colors/colors/-/colors-1.6.0.tgz", 34 | "integrity": "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==", 35 | "license": "MIT", 36 | "engines": { 37 | "node": ">=0.1.90" 38 | } 39 | }, 40 | "node_modules/@dabh/diagnostics": { 41 | "version": "2.0.3", 42 | "resolved": "https://registry.npmmirror.com/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", 43 | "integrity": "sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==", 44 | "license": "MIT", 45 | "dependencies": { 46 | "colorspace": "1.1.x", 47 | "enabled": "2.0.x", 48 | "kuler": "^2.0.0" 49 | } 50 | }, 51 | "node_modules/@playwright/test": { 52 | "version": "1.48.2", 53 | "resolved": "https://registry.npmmirror.com/@playwright/test/-/test-1.48.2.tgz", 54 | "integrity": "sha512-54w1xCWfXuax7dz4W2M9uw0gDyh+ti/0K/MxcCUxChFh37kkdxPdfZDw5QBbuPUJHr1CiHJ1hXgSs+GgeQc5Zw==", 55 | "license": "Apache-2.0", 56 | "dependencies": { 57 | "playwright": "1.48.2" 58 | }, 59 | "bin": { 60 | "playwright": "cli.js" 61 | }, 62 | "engines": { 63 | "node": ">=18" 64 | } 65 | }, 66 | "node_modules/@types/triple-beam": { 67 | "version": "1.3.5", 68 | "resolved": "https://registry.npmmirror.com/@types/triple-beam/-/triple-beam-1.3.5.tgz", 69 | "integrity": "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==", 70 | "license": "MIT" 71 | }, 72 | "node_modules/abort-controller": { 73 | "version": "3.0.0", 74 | "resolved": "https://registry.npmmirror.com/abort-controller/-/abort-controller-3.0.0.tgz", 75 | "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", 76 | "license": "MIT", 77 | "dependencies": { 78 | "event-target-shim": "^5.0.0" 79 | }, 80 | "engines": { 81 | "node": ">=6.5" 82 | } 83 | }, 84 | "node_modules/accepts": { 85 | "version": "1.3.8", 86 | "resolved": "https://registry.npmmirror.com/accepts/-/accepts-1.3.8.tgz", 87 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", 88 | "license": "MIT", 89 | "dependencies": { 90 | "mime-types": "~2.1.34", 91 | "negotiator": "0.6.3" 92 | }, 93 | "engines": { 94 | "node": ">= 0.6" 95 | } 96 | }, 97 | "node_modules/anymatch": { 98 | "version": "3.1.3", 99 | "resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-3.1.3.tgz", 100 | "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", 101 | "dev": true, 102 | "license": "ISC", 103 | "dependencies": { 104 | "normalize-path": "^3.0.0", 105 | "picomatch": "^2.0.4" 106 | }, 107 | "engines": { 108 | "node": ">= 8" 109 | } 110 | }, 111 | "node_modules/array-flatten": { 112 | "version": "1.1.1", 113 | "resolved": "https://registry.npmmirror.com/array-flatten/-/array-flatten-1.1.1.tgz", 114 | "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", 115 | "license": "MIT" 116 | }, 117 | "node_modules/async": { 118 | "version": "3.2.6", 119 | "resolved": "https://registry.npmmirror.com/async/-/async-3.2.6.tgz", 120 | "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", 121 | "license": "MIT" 122 | }, 123 | "node_modules/asynckit": { 124 | "version": "0.4.0", 125 | "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz", 126 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", 127 | "license": "MIT" 128 | }, 129 | "node_modules/axios": { 130 | "version": "1.7.7", 131 | "resolved": "https://registry.npmmirror.com/axios/-/axios-1.7.7.tgz", 132 | "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", 133 | "license": "MIT", 134 | "dependencies": { 135 | "follow-redirects": "^1.15.6", 136 | "form-data": "^4.0.0", 137 | "proxy-from-env": "^1.1.0" 138 | } 139 | }, 140 | "node_modules/balanced-match": { 141 | "version": "1.0.2", 142 | "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz", 143 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 144 | "dev": true, 145 | "license": "MIT" 146 | }, 147 | "node_modules/base64-js": { 148 | "version": "1.5.1", 149 | "resolved": "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz", 150 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", 151 | "funding": [ 152 | { 153 | "type": "github", 154 | "url": "https://github.com/sponsors/feross" 155 | }, 156 | { 157 | "type": "patreon", 158 | "url": "https://www.patreon.com/feross" 159 | }, 160 | { 161 | "type": "consulting", 162 | "url": "https://feross.org/support" 163 | } 164 | ], 165 | "license": "MIT" 166 | }, 167 | "node_modules/binary-extensions": { 168 | "version": "2.3.0", 169 | "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.3.0.tgz", 170 | "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", 171 | "dev": true, 172 | "license": "MIT", 173 | "engines": { 174 | "node": ">=8" 175 | }, 176 | "funding": { 177 | "url": "https://github.com/sponsors/sindresorhus" 178 | } 179 | }, 180 | "node_modules/body-parser": { 181 | "version": "1.20.3", 182 | "resolved": "https://registry.npmmirror.com/body-parser/-/body-parser-1.20.3.tgz", 183 | "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", 184 | "license": "MIT", 185 | "dependencies": { 186 | "bytes": "3.1.2", 187 | "content-type": "~1.0.5", 188 | "debug": "2.6.9", 189 | "depd": "2.0.0", 190 | "destroy": "1.2.0", 191 | "http-errors": "2.0.0", 192 | "iconv-lite": "0.4.24", 193 | "on-finished": "2.4.1", 194 | "qs": "6.13.0", 195 | "raw-body": "2.5.2", 196 | "type-is": "~1.6.18", 197 | "unpipe": "1.0.0" 198 | }, 199 | "engines": { 200 | "node": ">= 0.8", 201 | "npm": "1.2.8000 || >= 1.4.16" 202 | } 203 | }, 204 | "node_modules/brace-expansion": { 205 | "version": "1.1.11", 206 | "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz", 207 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 208 | "dev": true, 209 | "license": "MIT", 210 | "dependencies": { 211 | "balanced-match": "^1.0.0", 212 | "concat-map": "0.0.1" 213 | } 214 | }, 215 | "node_modules/braces": { 216 | "version": "3.0.3", 217 | "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.3.tgz", 218 | "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", 219 | "dev": true, 220 | "license": "MIT", 221 | "dependencies": { 222 | "fill-range": "^7.1.1" 223 | }, 224 | "engines": { 225 | "node": ">=8" 226 | } 227 | }, 228 | "node_modules/buffer": { 229 | "version": "6.0.3", 230 | "resolved": "https://registry.npmmirror.com/buffer/-/buffer-6.0.3.tgz", 231 | "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", 232 | "funding": [ 233 | { 234 | "type": "github", 235 | "url": "https://github.com/sponsors/feross" 236 | }, 237 | { 238 | "type": "patreon", 239 | "url": "https://www.patreon.com/feross" 240 | }, 241 | { 242 | "type": "consulting", 243 | "url": "https://feross.org/support" 244 | } 245 | ], 246 | "license": "MIT", 247 | "dependencies": { 248 | "base64-js": "^1.3.1", 249 | "ieee754": "^1.2.1" 250 | } 251 | }, 252 | "node_modules/bytes": { 253 | "version": "3.1.2", 254 | "resolved": "https://registry.npmmirror.com/bytes/-/bytes-3.1.2.tgz", 255 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", 256 | "license": "MIT", 257 | "engines": { 258 | "node": ">= 0.8" 259 | } 260 | }, 261 | "node_modules/call-bind": { 262 | "version": "1.0.7", 263 | "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.7.tgz", 264 | "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", 265 | "license": "MIT", 266 | "dependencies": { 267 | "es-define-property": "^1.0.0", 268 | "es-errors": "^1.3.0", 269 | "function-bind": "^1.1.2", 270 | "get-intrinsic": "^1.2.4", 271 | "set-function-length": "^1.2.1" 272 | }, 273 | "engines": { 274 | "node": ">= 0.4" 275 | }, 276 | "funding": { 277 | "url": "https://github.com/sponsors/ljharb" 278 | } 279 | }, 280 | "node_modules/chokidar": { 281 | "version": "3.6.0", 282 | "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.6.0.tgz", 283 | "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", 284 | "dev": true, 285 | "license": "MIT", 286 | "dependencies": { 287 | "anymatch": "~3.1.2", 288 | "braces": "~3.0.2", 289 | "glob-parent": "~5.1.2", 290 | "is-binary-path": "~2.1.0", 291 | "is-glob": "~4.0.1", 292 | "normalize-path": "~3.0.0", 293 | "readdirp": "~3.6.0" 294 | }, 295 | "engines": { 296 | "node": ">= 8.10.0" 297 | }, 298 | "funding": { 299 | "url": "https://paulmillr.com/funding/" 300 | }, 301 | "optionalDependencies": { 302 | "fsevents": "~2.3.2" 303 | } 304 | }, 305 | "node_modules/color": { 306 | "version": "3.2.1", 307 | "resolved": "https://registry.npmmirror.com/color/-/color-3.2.1.tgz", 308 | "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", 309 | "license": "MIT", 310 | "dependencies": { 311 | "color-convert": "^1.9.3", 312 | "color-string": "^1.6.0" 313 | } 314 | }, 315 | "node_modules/color-convert": { 316 | "version": "1.9.3", 317 | "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-1.9.3.tgz", 318 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 319 | "license": "MIT", 320 | "dependencies": { 321 | "color-name": "1.1.3" 322 | } 323 | }, 324 | "node_modules/color-name": { 325 | "version": "1.1.3", 326 | "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.3.tgz", 327 | "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", 328 | "license": "MIT" 329 | }, 330 | "node_modules/color-string": { 331 | "version": "1.9.1", 332 | "resolved": "https://registry.npmmirror.com/color-string/-/color-string-1.9.1.tgz", 333 | "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", 334 | "license": "MIT", 335 | "dependencies": { 336 | "color-name": "^1.0.0", 337 | "simple-swizzle": "^0.2.2" 338 | } 339 | }, 340 | "node_modules/colorspace": { 341 | "version": "1.1.4", 342 | "resolved": "https://registry.npmmirror.com/colorspace/-/colorspace-1.1.4.tgz", 343 | "integrity": "sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==", 344 | "license": "MIT", 345 | "dependencies": { 346 | "color": "^3.1.3", 347 | "text-hex": "1.0.x" 348 | } 349 | }, 350 | "node_modules/combined-stream": { 351 | "version": "1.0.8", 352 | "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz", 353 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 354 | "license": "MIT", 355 | "dependencies": { 356 | "delayed-stream": "~1.0.0" 357 | }, 358 | "engines": { 359 | "node": ">= 0.8" 360 | } 361 | }, 362 | "node_modules/concat-map": { 363 | "version": "0.0.1", 364 | "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz", 365 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", 366 | "dev": true, 367 | "license": "MIT" 368 | }, 369 | "node_modules/content-disposition": { 370 | "version": "0.5.4", 371 | "resolved": "https://registry.npmmirror.com/content-disposition/-/content-disposition-0.5.4.tgz", 372 | "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", 373 | "license": "MIT", 374 | "dependencies": { 375 | "safe-buffer": "5.2.1" 376 | }, 377 | "engines": { 378 | "node": ">= 0.6" 379 | } 380 | }, 381 | "node_modules/content-type": { 382 | "version": "1.0.5", 383 | "resolved": "https://registry.npmmirror.com/content-type/-/content-type-1.0.5.tgz", 384 | "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", 385 | "license": "MIT", 386 | "engines": { 387 | "node": ">= 0.6" 388 | } 389 | }, 390 | "node_modules/cookie": { 391 | "version": "0.7.1", 392 | "resolved": "https://registry.npmmirror.com/cookie/-/cookie-0.7.1.tgz", 393 | "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", 394 | "license": "MIT", 395 | "engines": { 396 | "node": ">= 0.6" 397 | } 398 | }, 399 | "node_modules/cookie-signature": { 400 | "version": "1.0.6", 401 | "resolved": "https://registry.npmmirror.com/cookie-signature/-/cookie-signature-1.0.6.tgz", 402 | "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", 403 | "license": "MIT" 404 | }, 405 | "node_modules/cors": { 406 | "version": "2.8.5", 407 | "resolved": "https://registry.npmmirror.com/cors/-/cors-2.8.5.tgz", 408 | "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", 409 | "license": "MIT", 410 | "dependencies": { 411 | "object-assign": "^4", 412 | "vary": "^1" 413 | }, 414 | "engines": { 415 | "node": ">= 0.10" 416 | } 417 | }, 418 | "node_modules/debug": { 419 | "version": "2.6.9", 420 | "resolved": "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz", 421 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 422 | "license": "MIT", 423 | "dependencies": { 424 | "ms": "2.0.0" 425 | } 426 | }, 427 | "node_modules/define-data-property": { 428 | "version": "1.1.4", 429 | "resolved": "https://registry.npmmirror.com/define-data-property/-/define-data-property-1.1.4.tgz", 430 | "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", 431 | "license": "MIT", 432 | "dependencies": { 433 | "es-define-property": "^1.0.0", 434 | "es-errors": "^1.3.0", 435 | "gopd": "^1.0.1" 436 | }, 437 | "engines": { 438 | "node": ">= 0.4" 439 | }, 440 | "funding": { 441 | "url": "https://github.com/sponsors/ljharb" 442 | } 443 | }, 444 | "node_modules/delayed-stream": { 445 | "version": "1.0.0", 446 | "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz", 447 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", 448 | "license": "MIT", 449 | "engines": { 450 | "node": ">=0.4.0" 451 | } 452 | }, 453 | "node_modules/depd": { 454 | "version": "2.0.0", 455 | "resolved": "https://registry.npmmirror.com/depd/-/depd-2.0.0.tgz", 456 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", 457 | "license": "MIT", 458 | "engines": { 459 | "node": ">= 0.8" 460 | } 461 | }, 462 | "node_modules/destroy": { 463 | "version": "1.2.0", 464 | "resolved": "https://registry.npmmirror.com/destroy/-/destroy-1.2.0.tgz", 465 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", 466 | "license": "MIT", 467 | "engines": { 468 | "node": ">= 0.8", 469 | "npm": "1.2.8000 || >= 1.4.16" 470 | } 471 | }, 472 | "node_modules/ee-first": { 473 | "version": "1.1.1", 474 | "resolved": "https://registry.npmmirror.com/ee-first/-/ee-first-1.1.1.tgz", 475 | "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", 476 | "license": "MIT" 477 | }, 478 | "node_modules/enabled": { 479 | "version": "2.0.0", 480 | "resolved": "https://registry.npmmirror.com/enabled/-/enabled-2.0.0.tgz", 481 | "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==", 482 | "license": "MIT" 483 | }, 484 | "node_modules/encodeurl": { 485 | "version": "2.0.0", 486 | "resolved": "https://registry.npmmirror.com/encodeurl/-/encodeurl-2.0.0.tgz", 487 | "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", 488 | "license": "MIT", 489 | "engines": { 490 | "node": ">= 0.8" 491 | } 492 | }, 493 | "node_modules/es-define-property": { 494 | "version": "1.0.0", 495 | "resolved": "https://registry.npmmirror.com/es-define-property/-/es-define-property-1.0.0.tgz", 496 | "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", 497 | "license": "MIT", 498 | "dependencies": { 499 | "get-intrinsic": "^1.2.4" 500 | }, 501 | "engines": { 502 | "node": ">= 0.4" 503 | } 504 | }, 505 | "node_modules/es-errors": { 506 | "version": "1.3.0", 507 | "resolved": "https://registry.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz", 508 | "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", 509 | "license": "MIT", 510 | "engines": { 511 | "node": ">= 0.4" 512 | } 513 | }, 514 | "node_modules/escape-html": { 515 | "version": "1.0.3", 516 | "resolved": "https://registry.npmmirror.com/escape-html/-/escape-html-1.0.3.tgz", 517 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", 518 | "license": "MIT" 519 | }, 520 | "node_modules/etag": { 521 | "version": "1.8.1", 522 | "resolved": "https://registry.npmmirror.com/etag/-/etag-1.8.1.tgz", 523 | "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", 524 | "license": "MIT", 525 | "engines": { 526 | "node": ">= 0.6" 527 | } 528 | }, 529 | "node_modules/event-target-shim": { 530 | "version": "5.0.1", 531 | "resolved": "https://registry.npmmirror.com/event-target-shim/-/event-target-shim-5.0.1.tgz", 532 | "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", 533 | "license": "MIT", 534 | "engines": { 535 | "node": ">=6" 536 | } 537 | }, 538 | "node_modules/events": { 539 | "version": "3.3.0", 540 | "resolved": "https://registry.npmmirror.com/events/-/events-3.3.0.tgz", 541 | "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", 542 | "license": "MIT", 543 | "engines": { 544 | "node": ">=0.8.x" 545 | } 546 | }, 547 | "node_modules/eventsource": { 548 | "version": "2.0.2", 549 | "resolved": "https://registry.npmmirror.com/eventsource/-/eventsource-2.0.2.tgz", 550 | "integrity": "sha512-IzUmBGPR3+oUG9dUeXynyNmf91/3zUSJg1lCktzKw47OXuhco54U3r9B7O4XX+Rb1Itm9OZ2b0RkTs10bICOxA==", 551 | "license": "MIT", 552 | "engines": { 553 | "node": ">=12.0.0" 554 | } 555 | }, 556 | "node_modules/express": { 557 | "version": "4.21.1", 558 | "resolved": "https://registry.npmmirror.com/express/-/express-4.21.1.tgz", 559 | "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", 560 | "license": "MIT", 561 | "dependencies": { 562 | "accepts": "~1.3.8", 563 | "array-flatten": "1.1.1", 564 | "body-parser": "1.20.3", 565 | "content-disposition": "0.5.4", 566 | "content-type": "~1.0.4", 567 | "cookie": "0.7.1", 568 | "cookie-signature": "1.0.6", 569 | "debug": "2.6.9", 570 | "depd": "2.0.0", 571 | "encodeurl": "~2.0.0", 572 | "escape-html": "~1.0.3", 573 | "etag": "~1.8.1", 574 | "finalhandler": "1.3.1", 575 | "fresh": "0.5.2", 576 | "http-errors": "2.0.0", 577 | "merge-descriptors": "1.0.3", 578 | "methods": "~1.1.2", 579 | "on-finished": "2.4.1", 580 | "parseurl": "~1.3.3", 581 | "path-to-regexp": "0.1.10", 582 | "proxy-addr": "~2.0.7", 583 | "qs": "6.13.0", 584 | "range-parser": "~1.2.1", 585 | "safe-buffer": "5.2.1", 586 | "send": "0.19.0", 587 | "serve-static": "1.16.2", 588 | "setprototypeof": "1.2.0", 589 | "statuses": "2.0.1", 590 | "type-is": "~1.6.18", 591 | "utils-merge": "1.0.1", 592 | "vary": "~1.1.2" 593 | }, 594 | "engines": { 595 | "node": ">= 0.10.0" 596 | } 597 | }, 598 | "node_modules/fecha": { 599 | "version": "4.2.3", 600 | "resolved": "https://registry.npmmirror.com/fecha/-/fecha-4.2.3.tgz", 601 | "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==", 602 | "license": "MIT" 603 | }, 604 | "node_modules/fetch-blob": { 605 | "version": "3.2.0", 606 | "resolved": "https://registry.npmmirror.com/fetch-blob/-/fetch-blob-3.2.0.tgz", 607 | "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", 608 | "funding": [ 609 | { 610 | "type": "github", 611 | "url": "https://github.com/sponsors/jimmywarting" 612 | }, 613 | { 614 | "type": "paypal", 615 | "url": "https://paypal.me/jimmywarting" 616 | } 617 | ], 618 | "license": "MIT", 619 | "dependencies": { 620 | "node-domexception": "^1.0.0", 621 | "web-streams-polyfill": "^3.0.3" 622 | }, 623 | "engines": { 624 | "node": "^12.20 || >= 14.13" 625 | } 626 | }, 627 | "node_modules/fill-range": { 628 | "version": "7.1.1", 629 | "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.1.1.tgz", 630 | "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", 631 | "dev": true, 632 | "license": "MIT", 633 | "dependencies": { 634 | "to-regex-range": "^5.0.1" 635 | }, 636 | "engines": { 637 | "node": ">=8" 638 | } 639 | }, 640 | "node_modules/finalhandler": { 641 | "version": "1.3.1", 642 | "resolved": "https://registry.npmmirror.com/finalhandler/-/finalhandler-1.3.1.tgz", 643 | "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", 644 | "license": "MIT", 645 | "dependencies": { 646 | "debug": "2.6.9", 647 | "encodeurl": "~2.0.0", 648 | "escape-html": "~1.0.3", 649 | "on-finished": "2.4.1", 650 | "parseurl": "~1.3.3", 651 | "statuses": "2.0.1", 652 | "unpipe": "~1.0.0" 653 | }, 654 | "engines": { 655 | "node": ">= 0.8" 656 | } 657 | }, 658 | "node_modules/fn.name": { 659 | "version": "1.1.0", 660 | "resolved": "https://registry.npmmirror.com/fn.name/-/fn.name-1.1.0.tgz", 661 | "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==", 662 | "license": "MIT" 663 | }, 664 | "node_modules/follow-redirects": { 665 | "version": "1.15.9", 666 | "resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.9.tgz", 667 | "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", 668 | "funding": [ 669 | { 670 | "type": "individual", 671 | "url": "https://github.com/sponsors/RubenVerborgh" 672 | } 673 | ], 674 | "license": "MIT", 675 | "engines": { 676 | "node": ">=4.0" 677 | }, 678 | "peerDependenciesMeta": { 679 | "debug": { 680 | "optional": true 681 | } 682 | } 683 | }, 684 | "node_modules/form-data": { 685 | "version": "4.0.1", 686 | "resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.1.tgz", 687 | "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", 688 | "license": "MIT", 689 | "dependencies": { 690 | "asynckit": "^0.4.0", 691 | "combined-stream": "^1.0.8", 692 | "mime-types": "^2.1.12" 693 | }, 694 | "engines": { 695 | "node": ">= 6" 696 | } 697 | }, 698 | "node_modules/formdata-polyfill": { 699 | "version": "4.0.10", 700 | "resolved": "https://registry.npmmirror.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", 701 | "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", 702 | "license": "MIT", 703 | "dependencies": { 704 | "fetch-blob": "^3.1.2" 705 | }, 706 | "engines": { 707 | "node": ">=12.20.0" 708 | } 709 | }, 710 | "node_modules/forwarded": { 711 | "version": "0.2.0", 712 | "resolved": "https://registry.npmmirror.com/forwarded/-/forwarded-0.2.0.tgz", 713 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", 714 | "license": "MIT", 715 | "engines": { 716 | "node": ">= 0.6" 717 | } 718 | }, 719 | "node_modules/fresh": { 720 | "version": "0.5.2", 721 | "resolved": "https://registry.npmmirror.com/fresh/-/fresh-0.5.2.tgz", 722 | "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", 723 | "license": "MIT", 724 | "engines": { 725 | "node": ">= 0.6" 726 | } 727 | }, 728 | "node_modules/fsevents": { 729 | "version": "2.3.3", 730 | "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz", 731 | "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", 732 | "dev": true, 733 | "hasInstallScript": true, 734 | "license": "MIT", 735 | "optional": true, 736 | "os": [ 737 | "darwin" 738 | ], 739 | "engines": { 740 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 741 | } 742 | }, 743 | "node_modules/function-bind": { 744 | "version": "1.1.2", 745 | "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz", 746 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", 747 | "license": "MIT", 748 | "funding": { 749 | "url": "https://github.com/sponsors/ljharb" 750 | } 751 | }, 752 | "node_modules/get-intrinsic": { 753 | "version": "1.2.4", 754 | "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz", 755 | "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", 756 | "license": "MIT", 757 | "dependencies": { 758 | "es-errors": "^1.3.0", 759 | "function-bind": "^1.1.2", 760 | "has-proto": "^1.0.1", 761 | "has-symbols": "^1.0.3", 762 | "hasown": "^2.0.0" 763 | }, 764 | "engines": { 765 | "node": ">= 0.4" 766 | }, 767 | "funding": { 768 | "url": "https://github.com/sponsors/ljharb" 769 | } 770 | }, 771 | "node_modules/glob-parent": { 772 | "version": "5.1.2", 773 | "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz", 774 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 775 | "dev": true, 776 | "license": "ISC", 777 | "dependencies": { 778 | "is-glob": "^4.0.1" 779 | }, 780 | "engines": { 781 | "node": ">= 6" 782 | } 783 | }, 784 | "node_modules/gopd": { 785 | "version": "1.0.1", 786 | "resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.0.1.tgz", 787 | "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", 788 | "license": "MIT", 789 | "dependencies": { 790 | "get-intrinsic": "^1.1.3" 791 | }, 792 | "funding": { 793 | "url": "https://github.com/sponsors/ljharb" 794 | } 795 | }, 796 | "node_modules/has-flag": { 797 | "version": "3.0.0", 798 | "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-3.0.0.tgz", 799 | "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", 800 | "dev": true, 801 | "license": "MIT", 802 | "engines": { 803 | "node": ">=4" 804 | } 805 | }, 806 | "node_modules/has-property-descriptors": { 807 | "version": "1.0.2", 808 | "resolved": "https://registry.npmmirror.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", 809 | "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", 810 | "license": "MIT", 811 | "dependencies": { 812 | "es-define-property": "^1.0.0" 813 | }, 814 | "funding": { 815 | "url": "https://github.com/sponsors/ljharb" 816 | } 817 | }, 818 | "node_modules/has-proto": { 819 | "version": "1.0.3", 820 | "resolved": "https://registry.npmmirror.com/has-proto/-/has-proto-1.0.3.tgz", 821 | "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", 822 | "license": "MIT", 823 | "engines": { 824 | "node": ">= 0.4" 825 | }, 826 | "funding": { 827 | "url": "https://github.com/sponsors/ljharb" 828 | } 829 | }, 830 | "node_modules/has-symbols": { 831 | "version": "1.0.3", 832 | "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz", 833 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", 834 | "license": "MIT", 835 | "engines": { 836 | "node": ">= 0.4" 837 | }, 838 | "funding": { 839 | "url": "https://github.com/sponsors/ljharb" 840 | } 841 | }, 842 | "node_modules/hasown": { 843 | "version": "2.0.2", 844 | "resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.2.tgz", 845 | "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", 846 | "license": "MIT", 847 | "dependencies": { 848 | "function-bind": "^1.1.2" 849 | }, 850 | "engines": { 851 | "node": ">= 0.4" 852 | } 853 | }, 854 | "node_modules/http": { 855 | "version": "0.0.1-security", 856 | "resolved": "https://registry.npmmirror.com/http/-/http-0.0.1-security.tgz", 857 | "integrity": "sha512-RnDvP10Ty9FxqOtPZuxtebw1j4L/WiqNMDtuc1YMH1XQm5TgDRaR1G9u8upL6KD1bXHSp9eSXo/ED+8Q7FAr+g==" 858 | }, 859 | "node_modules/http-errors": { 860 | "version": "2.0.0", 861 | "resolved": "https://registry.npmmirror.com/http-errors/-/http-errors-2.0.0.tgz", 862 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", 863 | "license": "MIT", 864 | "dependencies": { 865 | "depd": "2.0.0", 866 | "inherits": "2.0.4", 867 | "setprototypeof": "1.2.0", 868 | "statuses": "2.0.1", 869 | "toidentifier": "1.0.1" 870 | }, 871 | "engines": { 872 | "node": ">= 0.8" 873 | } 874 | }, 875 | "node_modules/https-proxy-agent": { 876 | "version": "5.0.1", 877 | "resolved": "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", 878 | "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", 879 | "license": "MIT", 880 | "dependencies": { 881 | "agent-base": "6", 882 | "debug": "4" 883 | }, 884 | "engines": { 885 | "node": ">= 6" 886 | } 887 | }, 888 | "node_modules/https-proxy-agent/node_modules/agent-base": { 889 | "version": "6.0.2", 890 | "resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-6.0.2.tgz", 891 | "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", 892 | "license": "MIT", 893 | "dependencies": { 894 | "debug": "4" 895 | }, 896 | "engines": { 897 | "node": ">= 6.0.0" 898 | } 899 | }, 900 | "node_modules/https-proxy-agent/node_modules/debug": { 901 | "version": "4.3.7", 902 | "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.7.tgz", 903 | "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", 904 | "license": "MIT", 905 | "dependencies": { 906 | "ms": "^2.1.3" 907 | }, 908 | "engines": { 909 | "node": ">=6.0" 910 | }, 911 | "peerDependenciesMeta": { 912 | "supports-color": { 913 | "optional": true 914 | } 915 | } 916 | }, 917 | "node_modules/https-proxy-agent/node_modules/ms": { 918 | "version": "2.1.3", 919 | "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", 920 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 921 | "license": "MIT" 922 | }, 923 | "node_modules/iconv-lite": { 924 | "version": "0.4.24", 925 | "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.4.24.tgz", 926 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 927 | "license": "MIT", 928 | "dependencies": { 929 | "safer-buffer": ">= 2.1.2 < 3" 930 | }, 931 | "engines": { 932 | "node": ">=0.10.0" 933 | } 934 | }, 935 | "node_modules/ieee754": { 936 | "version": "1.2.1", 937 | "resolved": "https://registry.npmmirror.com/ieee754/-/ieee754-1.2.1.tgz", 938 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", 939 | "funding": [ 940 | { 941 | "type": "github", 942 | "url": "https://github.com/sponsors/feross" 943 | }, 944 | { 945 | "type": "patreon", 946 | "url": "https://www.patreon.com/feross" 947 | }, 948 | { 949 | "type": "consulting", 950 | "url": "https://feross.org/support" 951 | } 952 | ], 953 | "license": "BSD-3-Clause" 954 | }, 955 | "node_modules/ignore-by-default": { 956 | "version": "1.0.1", 957 | "resolved": "https://registry.npmmirror.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz", 958 | "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", 959 | "dev": true, 960 | "license": "ISC" 961 | }, 962 | "node_modules/inherits": { 963 | "version": "2.0.4", 964 | "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz", 965 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 966 | "license": "ISC" 967 | }, 968 | "node_modules/ipaddr.js": { 969 | "version": "1.9.1", 970 | "resolved": "https://registry.npmmirror.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 971 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", 972 | "license": "MIT", 973 | "engines": { 974 | "node": ">= 0.10" 975 | } 976 | }, 977 | "node_modules/is-arrayish": { 978 | "version": "0.3.2", 979 | "resolved": "https://registry.npmmirror.com/is-arrayish/-/is-arrayish-0.3.2.tgz", 980 | "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", 981 | "license": "MIT" 982 | }, 983 | "node_modules/is-binary-path": { 984 | "version": "2.1.0", 985 | "resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz", 986 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 987 | "dev": true, 988 | "license": "MIT", 989 | "dependencies": { 990 | "binary-extensions": "^2.0.0" 991 | }, 992 | "engines": { 993 | "node": ">=8" 994 | } 995 | }, 996 | "node_modules/is-extglob": { 997 | "version": "2.1.1", 998 | "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz", 999 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", 1000 | "dev": true, 1001 | "license": "MIT", 1002 | "engines": { 1003 | "node": ">=0.10.0" 1004 | } 1005 | }, 1006 | "node_modules/is-glob": { 1007 | "version": "4.0.3", 1008 | "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz", 1009 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 1010 | "dev": true, 1011 | "license": "MIT", 1012 | "dependencies": { 1013 | "is-extglob": "^2.1.1" 1014 | }, 1015 | "engines": { 1016 | "node": ">=0.10.0" 1017 | } 1018 | }, 1019 | "node_modules/is-number": { 1020 | "version": "7.0.0", 1021 | "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz", 1022 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 1023 | "dev": true, 1024 | "license": "MIT", 1025 | "engines": { 1026 | "node": ">=0.12.0" 1027 | } 1028 | }, 1029 | "node_modules/is-stream": { 1030 | "version": "2.0.1", 1031 | "resolved": "https://registry.npmmirror.com/is-stream/-/is-stream-2.0.1.tgz", 1032 | "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", 1033 | "license": "MIT", 1034 | "engines": { 1035 | "node": ">=8" 1036 | }, 1037 | "funding": { 1038 | "url": "https://github.com/sponsors/sindresorhus" 1039 | } 1040 | }, 1041 | "node_modules/kuler": { 1042 | "version": "2.0.0", 1043 | "resolved": "https://registry.npmmirror.com/kuler/-/kuler-2.0.0.tgz", 1044 | "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==", 1045 | "license": "MIT" 1046 | }, 1047 | "node_modules/logform": { 1048 | "version": "2.6.1", 1049 | "resolved": "https://registry.npmmirror.com/logform/-/logform-2.6.1.tgz", 1050 | "integrity": "sha512-CdaO738xRapbKIMVn2m4F6KTj4j7ooJ8POVnebSgKo3KBz5axNXRAL7ZdRjIV6NOr2Uf4vjtRkxrFETOioCqSA==", 1051 | "license": "MIT", 1052 | "dependencies": { 1053 | "@colors/colors": "1.6.0", 1054 | "@types/triple-beam": "^1.3.2", 1055 | "fecha": "^4.2.0", 1056 | "ms": "^2.1.1", 1057 | "safe-stable-stringify": "^2.3.1", 1058 | "triple-beam": "^1.3.0" 1059 | }, 1060 | "engines": { 1061 | "node": ">= 12.0.0" 1062 | } 1063 | }, 1064 | "node_modules/logform/node_modules/ms": { 1065 | "version": "2.1.3", 1066 | "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", 1067 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 1068 | "license": "MIT" 1069 | }, 1070 | "node_modules/media-typer": { 1071 | "version": "0.3.0", 1072 | "resolved": "https://registry.npmmirror.com/media-typer/-/media-typer-0.3.0.tgz", 1073 | "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", 1074 | "license": "MIT", 1075 | "engines": { 1076 | "node": ">= 0.6" 1077 | } 1078 | }, 1079 | "node_modules/merge-descriptors": { 1080 | "version": "1.0.3", 1081 | "resolved": "https://registry.npmmirror.com/merge-descriptors/-/merge-descriptors-1.0.3.tgz", 1082 | "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", 1083 | "license": "MIT", 1084 | "funding": { 1085 | "url": "https://github.com/sponsors/sindresorhus" 1086 | } 1087 | }, 1088 | "node_modules/methods": { 1089 | "version": "1.1.2", 1090 | "resolved": "https://registry.npmmirror.com/methods/-/methods-1.1.2.tgz", 1091 | "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", 1092 | "license": "MIT", 1093 | "engines": { 1094 | "node": ">= 0.6" 1095 | } 1096 | }, 1097 | "node_modules/mime": { 1098 | "version": "1.6.0", 1099 | "resolved": "https://registry.npmmirror.com/mime/-/mime-1.6.0.tgz", 1100 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", 1101 | "license": "MIT", 1102 | "bin": { 1103 | "mime": "cli.js" 1104 | }, 1105 | "engines": { 1106 | "node": ">=4" 1107 | } 1108 | }, 1109 | "node_modules/mime-db": { 1110 | "version": "1.52.0", 1111 | "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", 1112 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 1113 | "license": "MIT", 1114 | "engines": { 1115 | "node": ">= 0.6" 1116 | } 1117 | }, 1118 | "node_modules/mime-types": { 1119 | "version": "2.1.35", 1120 | "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz", 1121 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 1122 | "license": "MIT", 1123 | "dependencies": { 1124 | "mime-db": "1.52.0" 1125 | }, 1126 | "engines": { 1127 | "node": ">= 0.6" 1128 | } 1129 | }, 1130 | "node_modules/minimatch": { 1131 | "version": "3.1.2", 1132 | "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz", 1133 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 1134 | "dev": true, 1135 | "license": "ISC", 1136 | "dependencies": { 1137 | "brace-expansion": "^1.1.7" 1138 | }, 1139 | "engines": { 1140 | "node": "*" 1141 | } 1142 | }, 1143 | "node_modules/ms": { 1144 | "version": "2.0.0", 1145 | "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz", 1146 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", 1147 | "license": "MIT" 1148 | }, 1149 | "node_modules/negotiator": { 1150 | "version": "0.6.3", 1151 | "resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-0.6.3.tgz", 1152 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", 1153 | "license": "MIT", 1154 | "engines": { 1155 | "node": ">= 0.6" 1156 | } 1157 | }, 1158 | "node_modules/node-domexception": { 1159 | "version": "1.0.0", 1160 | "resolved": "https://registry.npmmirror.com/node-domexception/-/node-domexception-1.0.0.tgz", 1161 | "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", 1162 | "funding": [ 1163 | { 1164 | "type": "github", 1165 | "url": "https://github.com/sponsors/jimmywarting" 1166 | }, 1167 | { 1168 | "type": "github", 1169 | "url": "https://paypal.me/jimmywarting" 1170 | } 1171 | ], 1172 | "license": "MIT", 1173 | "engines": { 1174 | "node": ">=10.5.0" 1175 | } 1176 | }, 1177 | "node_modules/node-fetch": { 1178 | "version": "3.3.2", 1179 | "resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-3.3.2.tgz", 1180 | "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", 1181 | "license": "MIT", 1182 | "dependencies": { 1183 | "data-uri-to-buffer": "^4.0.0", 1184 | "fetch-blob": "^3.1.4", 1185 | "formdata-polyfill": "^4.0.10" 1186 | }, 1187 | "engines": { 1188 | "node": "^12.20.0 || ^14.13.1 || >=16.0.0" 1189 | }, 1190 | "funding": { 1191 | "type": "opencollective", 1192 | "url": "https://opencollective.com/node-fetch" 1193 | } 1194 | }, 1195 | "node_modules/node-fetch/node_modules/data-uri-to-buffer": { 1196 | "version": "4.0.1", 1197 | "resolved": "https://registry.npmmirror.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", 1198 | "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", 1199 | "license": "MIT", 1200 | "engines": { 1201 | "node": ">= 12" 1202 | } 1203 | }, 1204 | "node_modules/nodemon": { 1205 | "version": "2.0.22", 1206 | "resolved": "https://registry.npmmirror.com/nodemon/-/nodemon-2.0.22.tgz", 1207 | "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==", 1208 | "dev": true, 1209 | "license": "MIT", 1210 | "dependencies": { 1211 | "chokidar": "^3.5.2", 1212 | "debug": "^3.2.7", 1213 | "ignore-by-default": "^1.0.1", 1214 | "minimatch": "^3.1.2", 1215 | "pstree.remy": "^1.1.8", 1216 | "semver": "^5.7.1", 1217 | "simple-update-notifier": "^1.0.7", 1218 | "supports-color": "^5.5.0", 1219 | "touch": "^3.1.0", 1220 | "undefsafe": "^2.0.5" 1221 | }, 1222 | "bin": { 1223 | "nodemon": "bin/nodemon.js" 1224 | }, 1225 | "engines": { 1226 | "node": ">=8.10.0" 1227 | }, 1228 | "funding": { 1229 | "type": "opencollective", 1230 | "url": "https://opencollective.com/nodemon" 1231 | } 1232 | }, 1233 | "node_modules/nodemon/node_modules/debug": { 1234 | "version": "3.2.7", 1235 | "resolved": "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz", 1236 | "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", 1237 | "dev": true, 1238 | "license": "MIT", 1239 | "dependencies": { 1240 | "ms": "^2.1.1" 1241 | } 1242 | }, 1243 | "node_modules/nodemon/node_modules/ms": { 1244 | "version": "2.1.3", 1245 | "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", 1246 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 1247 | "dev": true, 1248 | "license": "MIT" 1249 | }, 1250 | "node_modules/normalize-path": { 1251 | "version": "3.0.0", 1252 | "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", 1253 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 1254 | "dev": true, 1255 | "license": "MIT", 1256 | "engines": { 1257 | "node": ">=0.10.0" 1258 | } 1259 | }, 1260 | "node_modules/object-assign": { 1261 | "version": "4.1.1", 1262 | "resolved": "https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz", 1263 | "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", 1264 | "license": "MIT", 1265 | "engines": { 1266 | "node": ">=0.10.0" 1267 | } 1268 | }, 1269 | "node_modules/object-inspect": { 1270 | "version": "1.13.2", 1271 | "resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.13.2.tgz", 1272 | "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", 1273 | "license": "MIT", 1274 | "engines": { 1275 | "node": ">= 0.4" 1276 | }, 1277 | "funding": { 1278 | "url": "https://github.com/sponsors/ljharb" 1279 | } 1280 | }, 1281 | "node_modules/on-finished": { 1282 | "version": "2.4.1", 1283 | "resolved": "https://registry.npmmirror.com/on-finished/-/on-finished-2.4.1.tgz", 1284 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", 1285 | "license": "MIT", 1286 | "dependencies": { 1287 | "ee-first": "1.1.1" 1288 | }, 1289 | "engines": { 1290 | "node": ">= 0.8" 1291 | } 1292 | }, 1293 | "node_modules/one-time": { 1294 | "version": "1.0.0", 1295 | "resolved": "https://registry.npmmirror.com/one-time/-/one-time-1.0.0.tgz", 1296 | "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", 1297 | "license": "MIT", 1298 | "dependencies": { 1299 | "fn.name": "1.x.x" 1300 | } 1301 | }, 1302 | "node_modules/parseurl": { 1303 | "version": "1.3.3", 1304 | "resolved": "https://registry.npmmirror.com/parseurl/-/parseurl-1.3.3.tgz", 1305 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", 1306 | "license": "MIT", 1307 | "engines": { 1308 | "node": ">= 0.8" 1309 | } 1310 | }, 1311 | "node_modules/path-to-regexp": { 1312 | "version": "0.1.10", 1313 | "resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-0.1.10.tgz", 1314 | "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", 1315 | "license": "MIT" 1316 | }, 1317 | "node_modules/picomatch": { 1318 | "version": "2.3.1", 1319 | "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz", 1320 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 1321 | "dev": true, 1322 | "license": "MIT", 1323 | "engines": { 1324 | "node": ">=8.6" 1325 | }, 1326 | "funding": { 1327 | "url": "https://github.com/sponsors/jonschlinkert" 1328 | } 1329 | }, 1330 | "node_modules/playwright": { 1331 | "version": "1.48.2", 1332 | "resolved": "https://registry.npmmirror.com/playwright/-/playwright-1.48.2.tgz", 1333 | "integrity": "sha512-NjYvYgp4BPmiwfe31j4gHLa3J7bD2WiBz8Lk2RoSsmX38SVIARZ18VYjxLjAcDsAhA+F4iSEXTSGgjua0rrlgQ==", 1334 | "license": "Apache-2.0", 1335 | "dependencies": { 1336 | "playwright-core": "1.48.2" 1337 | }, 1338 | "bin": { 1339 | "playwright": "cli.js" 1340 | }, 1341 | "engines": { 1342 | "node": ">=18" 1343 | }, 1344 | "optionalDependencies": { 1345 | "fsevents": "2.3.2" 1346 | } 1347 | }, 1348 | "node_modules/playwright-core": { 1349 | "version": "1.48.2", 1350 | "resolved": "https://registry.npmmirror.com/playwright-core/-/playwright-core-1.48.2.tgz", 1351 | "integrity": "sha512-sjjw+qrLFlriJo64du+EK0kJgZzoQPsabGF4lBvsid+3CNIZIYLgnMj9V6JY5VhM2Peh20DJWIVpVljLLnlawA==", 1352 | "license": "Apache-2.0", 1353 | "bin": { 1354 | "playwright-core": "cli.js" 1355 | }, 1356 | "engines": { 1357 | "node": ">=18" 1358 | } 1359 | }, 1360 | "node_modules/playwright/node_modules/fsevents": { 1361 | "version": "2.3.2", 1362 | "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz", 1363 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 1364 | "hasInstallScript": true, 1365 | "license": "MIT", 1366 | "optional": true, 1367 | "os": [ 1368 | "darwin" 1369 | ], 1370 | "engines": { 1371 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 1372 | } 1373 | }, 1374 | "node_modules/process": { 1375 | "version": "0.11.10", 1376 | "resolved": "https://registry.npmmirror.com/process/-/process-0.11.10.tgz", 1377 | "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", 1378 | "license": "MIT", 1379 | "engines": { 1380 | "node": ">= 0.6.0" 1381 | } 1382 | }, 1383 | "node_modules/proxy-addr": { 1384 | "version": "2.0.7", 1385 | "resolved": "https://registry.npmmirror.com/proxy-addr/-/proxy-addr-2.0.7.tgz", 1386 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", 1387 | "license": "MIT", 1388 | "dependencies": { 1389 | "forwarded": "0.2.0", 1390 | "ipaddr.js": "1.9.1" 1391 | }, 1392 | "engines": { 1393 | "node": ">= 0.10" 1394 | } 1395 | }, 1396 | "node_modules/proxy-from-env": { 1397 | "version": "1.1.0", 1398 | "resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz", 1399 | "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", 1400 | "license": "MIT" 1401 | }, 1402 | "node_modules/pstree.remy": { 1403 | "version": "1.1.8", 1404 | "resolved": "https://registry.npmmirror.com/pstree.remy/-/pstree.remy-1.1.8.tgz", 1405 | "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", 1406 | "dev": true, 1407 | "license": "MIT" 1408 | }, 1409 | "node_modules/qs": { 1410 | "version": "6.13.0", 1411 | "resolved": "https://registry.npmmirror.com/qs/-/qs-6.13.0.tgz", 1412 | "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", 1413 | "license": "BSD-3-Clause", 1414 | "dependencies": { 1415 | "side-channel": "^1.0.6" 1416 | }, 1417 | "engines": { 1418 | "node": ">=0.6" 1419 | }, 1420 | "funding": { 1421 | "url": "https://github.com/sponsors/ljharb" 1422 | } 1423 | }, 1424 | "node_modules/range-parser": { 1425 | "version": "1.2.1", 1426 | "resolved": "https://registry.npmmirror.com/range-parser/-/range-parser-1.2.1.tgz", 1427 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", 1428 | "license": "MIT", 1429 | "engines": { 1430 | "node": ">= 0.6" 1431 | } 1432 | }, 1433 | "node_modules/raw-body": { 1434 | "version": "2.5.2", 1435 | "resolved": "https://registry.npmmirror.com/raw-body/-/raw-body-2.5.2.tgz", 1436 | "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", 1437 | "license": "MIT", 1438 | "dependencies": { 1439 | "bytes": "3.1.2", 1440 | "http-errors": "2.0.0", 1441 | "iconv-lite": "0.4.24", 1442 | "unpipe": "1.0.0" 1443 | }, 1444 | "engines": { 1445 | "node": ">= 0.8" 1446 | } 1447 | }, 1448 | "node_modules/readable-stream": { 1449 | "version": "3.6.2", 1450 | "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz", 1451 | "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", 1452 | "license": "MIT", 1453 | "dependencies": { 1454 | "inherits": "^2.0.3", 1455 | "string_decoder": "^1.1.1", 1456 | "util-deprecate": "^1.0.1" 1457 | }, 1458 | "engines": { 1459 | "node": ">= 6" 1460 | } 1461 | }, 1462 | "node_modules/readdirp": { 1463 | "version": "3.6.0", 1464 | "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz", 1465 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 1466 | "dev": true, 1467 | "license": "MIT", 1468 | "dependencies": { 1469 | "picomatch": "^2.2.1" 1470 | }, 1471 | "engines": { 1472 | "node": ">=8.10.0" 1473 | } 1474 | }, 1475 | "node_modules/safe-buffer": { 1476 | "version": "5.2.1", 1477 | "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz", 1478 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 1479 | "funding": [ 1480 | { 1481 | "type": "github", 1482 | "url": "https://github.com/sponsors/feross" 1483 | }, 1484 | { 1485 | "type": "patreon", 1486 | "url": "https://www.patreon.com/feross" 1487 | }, 1488 | { 1489 | "type": "consulting", 1490 | "url": "https://feross.org/support" 1491 | } 1492 | ], 1493 | "license": "MIT" 1494 | }, 1495 | "node_modules/safe-stable-stringify": { 1496 | "version": "2.5.0", 1497 | "resolved": "https://registry.npmmirror.com/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", 1498 | "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==", 1499 | "license": "MIT", 1500 | "engines": { 1501 | "node": ">=10" 1502 | } 1503 | }, 1504 | "node_modules/safer-buffer": { 1505 | "version": "2.1.2", 1506 | "resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz", 1507 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", 1508 | "license": "MIT" 1509 | }, 1510 | "node_modules/semver": { 1511 | "version": "5.7.2", 1512 | "resolved": "https://registry.npmmirror.com/semver/-/semver-5.7.2.tgz", 1513 | "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", 1514 | "dev": true, 1515 | "license": "ISC", 1516 | "bin": { 1517 | "semver": "bin/semver" 1518 | } 1519 | }, 1520 | "node_modules/send": { 1521 | "version": "0.19.0", 1522 | "resolved": "https://registry.npmmirror.com/send/-/send-0.19.0.tgz", 1523 | "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", 1524 | "license": "MIT", 1525 | "dependencies": { 1526 | "debug": "2.6.9", 1527 | "depd": "2.0.0", 1528 | "destroy": "1.2.0", 1529 | "encodeurl": "~1.0.2", 1530 | "escape-html": "~1.0.3", 1531 | "etag": "~1.8.1", 1532 | "fresh": "0.5.2", 1533 | "http-errors": "2.0.0", 1534 | "mime": "1.6.0", 1535 | "ms": "2.1.3", 1536 | "on-finished": "2.4.1", 1537 | "range-parser": "~1.2.1", 1538 | "statuses": "2.0.1" 1539 | }, 1540 | "engines": { 1541 | "node": ">= 0.8.0" 1542 | } 1543 | }, 1544 | "node_modules/send/node_modules/encodeurl": { 1545 | "version": "1.0.2", 1546 | "resolved": "https://registry.npmmirror.com/encodeurl/-/encodeurl-1.0.2.tgz", 1547 | "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", 1548 | "license": "MIT", 1549 | "engines": { 1550 | "node": ">= 0.8" 1551 | } 1552 | }, 1553 | "node_modules/send/node_modules/ms": { 1554 | "version": "2.1.3", 1555 | "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", 1556 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 1557 | "license": "MIT" 1558 | }, 1559 | "node_modules/serve-static": { 1560 | "version": "1.16.2", 1561 | "resolved": "https://registry.npmmirror.com/serve-static/-/serve-static-1.16.2.tgz", 1562 | "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", 1563 | "license": "MIT", 1564 | "dependencies": { 1565 | "encodeurl": "~2.0.0", 1566 | "escape-html": "~1.0.3", 1567 | "parseurl": "~1.3.3", 1568 | "send": "0.19.0" 1569 | }, 1570 | "engines": { 1571 | "node": ">= 0.8.0" 1572 | } 1573 | }, 1574 | "node_modules/set-function-length": { 1575 | "version": "1.2.2", 1576 | "resolved": "https://registry.npmmirror.com/set-function-length/-/set-function-length-1.2.2.tgz", 1577 | "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", 1578 | "license": "MIT", 1579 | "dependencies": { 1580 | "define-data-property": "^1.1.4", 1581 | "es-errors": "^1.3.0", 1582 | "function-bind": "^1.1.2", 1583 | "get-intrinsic": "^1.2.4", 1584 | "gopd": "^1.0.1", 1585 | "has-property-descriptors": "^1.0.2" 1586 | }, 1587 | "engines": { 1588 | "node": ">= 0.4" 1589 | } 1590 | }, 1591 | "node_modules/setprototypeof": { 1592 | "version": "1.2.0", 1593 | "resolved": "https://registry.npmmirror.com/setprototypeof/-/setprototypeof-1.2.0.tgz", 1594 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", 1595 | "license": "ISC" 1596 | }, 1597 | "node_modules/side-channel": { 1598 | "version": "1.0.6", 1599 | "resolved": "https://registry.npmmirror.com/side-channel/-/side-channel-1.0.6.tgz", 1600 | "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", 1601 | "license": "MIT", 1602 | "dependencies": { 1603 | "call-bind": "^1.0.7", 1604 | "es-errors": "^1.3.0", 1605 | "get-intrinsic": "^1.2.4", 1606 | "object-inspect": "^1.13.1" 1607 | }, 1608 | "engines": { 1609 | "node": ">= 0.4" 1610 | }, 1611 | "funding": { 1612 | "url": "https://github.com/sponsors/ljharb" 1613 | } 1614 | }, 1615 | "node_modules/simple-swizzle": { 1616 | "version": "0.2.2", 1617 | "resolved": "https://registry.npmmirror.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz", 1618 | "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", 1619 | "license": "MIT", 1620 | "dependencies": { 1621 | "is-arrayish": "^0.3.1" 1622 | } 1623 | }, 1624 | "node_modules/simple-update-notifier": { 1625 | "version": "1.1.0", 1626 | "resolved": "https://registry.npmmirror.com/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz", 1627 | "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==", 1628 | "dev": true, 1629 | "license": "MIT", 1630 | "dependencies": { 1631 | "semver": "~7.0.0" 1632 | }, 1633 | "engines": { 1634 | "node": ">=8.10.0" 1635 | } 1636 | }, 1637 | "node_modules/simple-update-notifier/node_modules/semver": { 1638 | "version": "7.0.0", 1639 | "resolved": "https://registry.npmmirror.com/semver/-/semver-7.0.0.tgz", 1640 | "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", 1641 | "dev": true, 1642 | "license": "ISC", 1643 | "bin": { 1644 | "semver": "bin/semver.js" 1645 | } 1646 | }, 1647 | "node_modules/stack-trace": { 1648 | "version": "0.0.10", 1649 | "resolved": "https://registry.npmmirror.com/stack-trace/-/stack-trace-0.0.10.tgz", 1650 | "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", 1651 | "license": "MIT", 1652 | "engines": { 1653 | "node": "*" 1654 | } 1655 | }, 1656 | "node_modules/statuses": { 1657 | "version": "2.0.1", 1658 | "resolved": "https://registry.npmmirror.com/statuses/-/statuses-2.0.1.tgz", 1659 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", 1660 | "license": "MIT", 1661 | "engines": { 1662 | "node": ">= 0.8" 1663 | } 1664 | }, 1665 | "node_modules/string_decoder": { 1666 | "version": "1.3.0", 1667 | "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.3.0.tgz", 1668 | "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", 1669 | "license": "MIT", 1670 | "dependencies": { 1671 | "safe-buffer": "~5.2.0" 1672 | } 1673 | }, 1674 | "node_modules/supports-color": { 1675 | "version": "5.5.0", 1676 | "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-5.5.0.tgz", 1677 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 1678 | "dev": true, 1679 | "license": "MIT", 1680 | "dependencies": { 1681 | "has-flag": "^3.0.0" 1682 | }, 1683 | "engines": { 1684 | "node": ">=4" 1685 | } 1686 | }, 1687 | "node_modules/systeminformation": { 1688 | "version": "5.23.5", 1689 | "resolved": "https://registry.npmmirror.com/systeminformation/-/systeminformation-5.23.5.tgz", 1690 | "integrity": "sha512-PEpJwhRYxZgBCAlWZhWIgfMTjXLqfcaZ1pJsJn9snWNfBW/Z1YQg1mbIUSWrEV3ErAHF7l/OoVLQeaZDlPzkpA==", 1691 | "license": "MIT", 1692 | "os": [ 1693 | "darwin", 1694 | "linux", 1695 | "win32", 1696 | "freebsd", 1697 | "openbsd", 1698 | "netbsd", 1699 | "sunos", 1700 | "android" 1701 | ], 1702 | "bin": { 1703 | "systeminformation": "lib/cli.js" 1704 | }, 1705 | "engines": { 1706 | "node": ">=8.0.0" 1707 | }, 1708 | "funding": { 1709 | "type": "Buy me a coffee", 1710 | "url": "https://www.buymeacoffee.com/systeminfo" 1711 | } 1712 | }, 1713 | "node_modules/text-hex": { 1714 | "version": "1.0.0", 1715 | "resolved": "https://registry.npmmirror.com/text-hex/-/text-hex-1.0.0.tgz", 1716 | "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==", 1717 | "license": "MIT" 1718 | }, 1719 | "node_modules/to-regex-range": { 1720 | "version": "5.0.1", 1721 | "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz", 1722 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1723 | "dev": true, 1724 | "license": "MIT", 1725 | "dependencies": { 1726 | "is-number": "^7.0.0" 1727 | }, 1728 | "engines": { 1729 | "node": ">=8.0" 1730 | } 1731 | }, 1732 | "node_modules/toidentifier": { 1733 | "version": "1.0.1", 1734 | "resolved": "https://registry.npmmirror.com/toidentifier/-/toidentifier-1.0.1.tgz", 1735 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", 1736 | "license": "MIT", 1737 | "engines": { 1738 | "node": ">=0.6" 1739 | } 1740 | }, 1741 | "node_modules/touch": { 1742 | "version": "3.1.1", 1743 | "resolved": "https://registry.npmmirror.com/touch/-/touch-3.1.1.tgz", 1744 | "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", 1745 | "dev": true, 1746 | "license": "ISC", 1747 | "bin": { 1748 | "nodetouch": "bin/nodetouch.js" 1749 | } 1750 | }, 1751 | "node_modules/triple-beam": { 1752 | "version": "1.4.1", 1753 | "resolved": "https://registry.npmmirror.com/triple-beam/-/triple-beam-1.4.1.tgz", 1754 | "integrity": "sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==", 1755 | "license": "MIT", 1756 | "engines": { 1757 | "node": ">= 14.0.0" 1758 | } 1759 | }, 1760 | "node_modules/type-is": { 1761 | "version": "1.6.18", 1762 | "resolved": "https://registry.npmmirror.com/type-is/-/type-is-1.6.18.tgz", 1763 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 1764 | "license": "MIT", 1765 | "dependencies": { 1766 | "media-typer": "0.3.0", 1767 | "mime-types": "~2.1.24" 1768 | }, 1769 | "engines": { 1770 | "node": ">= 0.6" 1771 | } 1772 | }, 1773 | "node_modules/undefsafe": { 1774 | "version": "2.0.5", 1775 | "resolved": "https://registry.npmmirror.com/undefsafe/-/undefsafe-2.0.5.tgz", 1776 | "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", 1777 | "dev": true, 1778 | "license": "MIT" 1779 | }, 1780 | "node_modules/unpipe": { 1781 | "version": "1.0.0", 1782 | "resolved": "https://registry.npmmirror.com/unpipe/-/unpipe-1.0.0.tgz", 1783 | "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", 1784 | "license": "MIT", 1785 | "engines": { 1786 | "node": ">= 0.8" 1787 | } 1788 | }, 1789 | "node_modules/util-deprecate": { 1790 | "version": "1.0.2", 1791 | "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz", 1792 | "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", 1793 | "license": "MIT" 1794 | }, 1795 | "node_modules/utils-merge": { 1796 | "version": "1.0.1", 1797 | "resolved": "https://registry.npmmirror.com/utils-merge/-/utils-merge-1.0.1.tgz", 1798 | "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", 1799 | "license": "MIT", 1800 | "engines": { 1801 | "node": ">= 0.4.0" 1802 | } 1803 | }, 1804 | "node_modules/vary": { 1805 | "version": "1.1.2", 1806 | "resolved": "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz", 1807 | "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", 1808 | "license": "MIT", 1809 | "engines": { 1810 | "node": ">= 0.8" 1811 | } 1812 | }, 1813 | "node_modules/web-streams-polyfill": { 1814 | "version": "3.3.3", 1815 | "resolved": "https://registry.npmmirror.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", 1816 | "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", 1817 | "license": "MIT", 1818 | "engines": { 1819 | "node": ">= 8" 1820 | } 1821 | }, 1822 | "node_modules/winston": { 1823 | "version": "3.15.0", 1824 | "resolved": "https://registry.npmmirror.com/winston/-/winston-3.15.0.tgz", 1825 | "integrity": "sha512-RhruH2Cj0bV0WgNL+lOfoUBI4DVfdUNjVnJGVovWZmrcKtrFTTRzgXYK2O9cymSGjrERCtaAeHwMNnUWXlwZow==", 1826 | "license": "MIT", 1827 | "dependencies": { 1828 | "@colors/colors": "^1.6.0", 1829 | "@dabh/diagnostics": "^2.0.2", 1830 | "async": "^3.2.3", 1831 | "is-stream": "^2.0.0", 1832 | "logform": "^2.6.0", 1833 | "one-time": "^1.0.0", 1834 | "readable-stream": "^3.4.0", 1835 | "safe-stable-stringify": "^2.3.1", 1836 | "stack-trace": "0.0.x", 1837 | "triple-beam": "^1.3.0", 1838 | "winston-transport": "^4.7.0" 1839 | }, 1840 | "engines": { 1841 | "node": ">= 12.0.0" 1842 | } 1843 | }, 1844 | "node_modules/winston-transport": { 1845 | "version": "4.8.0", 1846 | "resolved": "https://registry.npmmirror.com/winston-transport/-/winston-transport-4.8.0.tgz", 1847 | "integrity": "sha512-qxSTKswC6llEMZKgCQdaWgDuMJQnhuvF5f2Nk3SNXc4byfQ+voo2mX1Px9dkNOuR8p0KAjfPG29PuYUSIb+vSA==", 1848 | "license": "MIT", 1849 | "dependencies": { 1850 | "logform": "^2.6.1", 1851 | "readable-stream": "^4.5.2", 1852 | "triple-beam": "^1.3.0" 1853 | }, 1854 | "engines": { 1855 | "node": ">= 12.0.0" 1856 | } 1857 | }, 1858 | "node_modules/winston-transport/node_modules/readable-stream": { 1859 | "version": "4.5.2", 1860 | "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-4.5.2.tgz", 1861 | "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", 1862 | "license": "MIT", 1863 | "dependencies": { 1864 | "abort-controller": "^3.0.0", 1865 | "buffer": "^6.0.3", 1866 | "events": "^3.3.0", 1867 | "process": "^0.11.10", 1868 | "string_decoder": "^1.3.0" 1869 | }, 1870 | "engines": { 1871 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0" 1872 | } 1873 | } 1874 | } 1875 | } 1876 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ai-proxy-server", 3 | "version": "1.0.0", 4 | "description": "AI服务代理服务器", 5 | "main": "server.js", 6 | "scripts": { 7 | "start": "node server.js", 8 | "dev": "nodemon server.js", 9 | "install-browsers": "playwright install chromium", 10 | "prepare": "playwright install chromium" 11 | }, 12 | "dependencies": { 13 | "cors": "^2.8.5", 14 | "express": "^4.17.1", 15 | "http": "0.0.1-security", 16 | "winston": "^3.3.3", 17 | "node-fetch": "^3.3.1", 18 | "eventsource": "^2.0.2", 19 | "https-proxy-agent": "^5.0.0", 20 | "axios": "^1.6.0", 21 | "systeminformation": "^5.21.7", 22 | "playwright": "^1.40.0", 23 | "@playwright/test": "^1.40.0" 24 | }, 25 | "devDependencies": { 26 | "nodemon": "^2.0.7" 27 | }, 28 | "engines": { 29 | "node": ">=14.0.0" 30 | }, 31 | "author": "Your Name", 32 | "license": "MIT", 33 | "type": "module" 34 | } 35 | -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | import express from 'express'; 2 | import http, { get } from 'http'; 3 | import https from 'https'; 4 | import path from "path"; 5 | import { fileURLToPath } from "url"; 6 | import cors from 'cors'; 7 | import fs from 'fs'; 8 | import fsPromises from 'fs/promises'; 9 | import os from 'os'; 10 | import { createRequire } from 'module'; 11 | import EventSource from'eventsource'; 12 | import HttpsProxyAgent from 'https-proxy-agent'; 13 | import axios from 'axios'; 14 | import si from 'systeminformation'; 15 | import crypto from 'crypto'; 16 | import { chromium } from '@playwright/test'; 17 | import { Readable } from 'stream'; 18 | //版本号 19 | const banbenhao = "1.4"; 20 | 21 | class MemoryMonitor { 22 | constructor(page) { 23 | this.page = page; 24 | this.warningThreshold = 200 * 1024 * 1024; // 400MB 警告阈值 25 | this.criticalThreshold = 400 * 1024 * 1024; // 500MB 临界阈值 26 | } 27 | 28 | async checkMemory() { 29 | try { 30 | const metrics = await this.page.evaluate(() => { 31 | if (!performance.memory) return null; 32 | return { 33 | usedJSHeapSize: performance.memory.usedJSHeapSize, 34 | totalJSHeapSize: performance.memory.totalJSHeapSize, 35 | jsHeapSizeLimit: performance.memory.jsHeapSizeLimit 36 | }; 37 | }); 38 | 39 | if (!metrics) { 40 | console.log('Memory metrics not available'); 41 | return null; 42 | } 43 | 44 | // 转换为MB便于阅读 45 | const usedMB = Math.round(metrics.usedJSHeapSize / (1024 * 1024)); 46 | const totalMB = Math.round(metrics.totalJSHeapSize / (1024 * 1024)); 47 | const limitMB = Math.round(metrics.jsHeapSizeLimit / (1024 * 1024)); 48 | 49 | console.log(`Memory Usage: ${usedMB}MB / ${totalMB}MB (Limit: ${limitMB}MB)`); 50 | 51 | // 内存使用超过警告阈值 52 | if (metrics.usedJSHeapSize > this.warningThreshold) { 53 | console.warn('High memory usage detected!'); 54 | await this.optimizeMemory(); 55 | } 56 | 57 | // 内存使用超过临界值 58 | if (metrics.usedJSHeapSize > this.criticalThreshold) { 59 | console.error('Critical memory usage! Forcing garbage collection...'); 60 | await this.forceGC(); 61 | } 62 | 63 | return metrics; 64 | } catch (error) { 65 | console.error('Error checking memory:', error); 66 | return null; 67 | } 68 | } 69 | 70 | async optimizeMemory() { 71 | try { 72 | await this.page.evaluate(() => { 73 | // 清除控制台 74 | console.clear(); 75 | 76 | // 清除未使用的图片 77 | const images = document.getElementsByTagName('img'); 78 | for (let img of images) { 79 | if (!img.isConnected) { 80 | img.src = ''; 81 | } 82 | } 83 | 84 | // 清除未使用的变量 85 | if (window.gc) { 86 | window.gc(); 87 | } 88 | }); 89 | } catch (error) { 90 | console.error('Error optimizing memory:', error); 91 | } 92 | } 93 | 94 | async forceGC() { 95 | try { 96 | await this.page.evaluate(() => { 97 | if (window.gc) { 98 | window.gc(); 99 | } 100 | }); 101 | } catch (error) { 102 | console.error('Error forcing GC:', error); 103 | } 104 | } 105 | } 106 | 107 | async function setupMemoryMonitoring(page) { 108 | const monitor = new MemoryMonitor(page); 109 | 110 | // 定期检查内存(每5分钟) 111 | setInterval(async () => { 112 | await monitor.checkMemory(); 113 | }, 1 * 60 * 1000); 114 | 115 | // 返回monitor实例以便手动调用 116 | return monitor; 117 | } 118 | 119 | // 初始化监控 120 | let memoryMonitor; 121 | // 初始化监控 122 | let memoryMonitor2; 123 | // 使用 createRequire 来导入 JSON 文件 124 | 125 | const require = createRequire(import.meta.url); 126 | const cookiesjson = require('./cookies.json'); 127 | 128 | const config = require('./config.json'); 129 | const app = express(); 130 | const server = http.createServer(app); 131 | let requestId = null; 132 | let resssss = null; 133 | let Aborted=false; 134 | let Message; 135 | let userId; 136 | // 设置本地代理 137 | const proxyUrl = config.proxyUrl; 138 | const proxyAgent = config.proxy ? new HttpsProxyAgent(proxyUrl) : null; 139 | const EventEmitter = require('events'); 140 | const URL = require('url').URL; 141 | const __filename = fileURLToPath(import.meta.url); 142 | const __dirname = path.dirname(__filename); 143 | 144 | app.use(cors()); 145 | app.use(express.json({ limit: '50mb' })); 146 | app.use(express.urlencoded({ limit: '50mb', extended: true })); 147 | 148 | let browser = null; 149 | let page = null; 150 | let customEventSource; 151 | let isRestarting; 152 | let rrreeeqqq; 153 | let reqmessage=""; 154 | let isstream=false; 155 | let nowcookie=""; 156 | let nowcount=0; 157 | let nowfilename=""; 158 | let One=true; 159 | // Worker 的基础 URL 160 | const baseUrl = 'https://tongji2.damoshen2.workers.dev'; 161 | 162 | const baseUrl2 = 'https://you.com'; 163 | // 创建 axios 实例 164 | const axiosInstance = axios.create({ 165 | baseURL: baseUrl, 166 | httpsAgent: proxyAgent 167 | }); 168 | // 全局捕获未处理的 Promise 异常 169 | process.on('unhandledRejection', (reason, promise) => { 170 | console.error('Unhandled Rejection at:', promise, 'reason:', reason); 171 | // 可以选择不退出程序 172 | // process.exit(1); 173 | }); 174 | 175 | // 全局捕获未处理的同步异常 176 | process.on('uncaughtException', (error) => { 177 | console.error('Uncaught Exception:', error); 178 | // 可以选择优雅地处理错误 179 | // process.exit(1); 180 | }); 181 | function updateCookiesJson(key, value) { 182 | // 修改内存中的对象 183 | console.log(key,cookiesjson[key]); 184 | cookiesjson[key].count= value; 185 | 186 | // 写入文件 187 | fs.writeFileSync( 188 | path.join(__dirname, 'cookies.json'), 189 | JSON.stringify(cookiesjson, null, 2) 190 | ); 191 | } 192 | 193 | function processFileContents(fileContents, cookiesjson) { 194 | // 获取当前时间戳(秒) 195 | const currentTimestamp = Math.floor(Date.now() / 1000); 196 | 197 | // 遍历 fileContents 中的文件 198 | for (const [fileName, content] of Object.entries(fileContents)) { 199 | // 检查 cookiesjson 中是否存在该文件的记录 200 | if (!cookiesjson[content.fileName]) { 201 | console.log(`filename`,content.fileName); 202 | console.log(`content`,content); 203 | // 如果不存在,创建新记录 204 | cookiesjson[content.fileName] = { 205 | timestamp: currentTimestamp, 206 | count: 0 207 | }; 208 | 209 | // 写入 cookiesjson 文件 210 | fs.writeFileSync( 211 | path.join(__dirname, 'cookies.json'), 212 | JSON.stringify(cookiesjson, null, 2) 213 | ); 214 | 215 | // 返回文件内容 216 | nowfilename=content.fileName; 217 | nowcount=0; 218 | return content; 219 | } else { 220 | // 如果存在记录,检查使用次数和时间 221 | const fileRecord = cookiesjson[content.fileName]; 222 | console.log(`fileRecord`,fileRecord); 223 | const timeDiff = currentTimestamp - fileRecord.timestamp; 224 | 225 | // 如果使用次数小于3,直接返回内容 226 | if (fileRecord.count < 3||config.pro) { 227 | fileRecord.timestamp = currentTimestamp; 228 | nowcount=fileRecord.count; 229 | // 写入 cookiesjson 文件 230 | // fs.writeFileSync( 231 | // path.join(__dirname, 'cookiesjson.json'), 232 | // JSON.stringify(cookiesjson, null, 2) 233 | // ); 234 | nowfilename=content.fileName; 235 | return content; 236 | } 237 | // 如果使用次数大于等于3,检查时间 238 | else { 239 | // 如果时间小于24小时(86400秒) 240 | if (timeDiff > 86400) { 241 | // 重置次数为0 242 | fileRecord.count = 0; 243 | fileRecord.timestamp = currentTimestamp; 244 | 245 | // 写入 cookiesjson 文件 246 | fs.writeFileSync( 247 | path.join(__dirname, 'cookies.json'), 248 | JSON.stringify(cookiesjson, null, 2) 249 | ); 250 | nowcount=fileRecord.count; 251 | nowfilename=content.fileName; 252 | return content; 253 | } 254 | } 255 | } 256 | } 257 | 258 | // 如果没有找到可用的文件,返回 null 259 | return null; 260 | } 261 | 262 | const axiosInstance2 = axios.create({ 263 | baseURL: baseUrl2, 264 | httpsAgent: proxyAgent 265 | }); 266 | 267 | 268 | // 获取版本号 269 | async function getVersion() { 270 | try { 271 | const response = await axiosInstance.get('/api/version'); 272 | console.log('Version:', response.data.version); 273 | return response.data.version; 274 | } catch (error) { 275 | console.error('Error fetching version:', error.message); 276 | } 277 | } 278 | 279 | // 记录用户请求 280 | async function recordUserRequest(userId) { 281 | try { 282 | const response = await axiosInstance.post('/api/record', 283 | { userId: userId }, 284 | { 285 | headers: { 'Content-Type': 'application/json' } 286 | } 287 | ); 288 | console.log('Record response:', response.data); 289 | } catch (error) { 290 | console.error('Error recording user request:', error.message); 291 | } 292 | } 293 | 294 | // 生成唯一的电脑用户ID 295 | async function generateUniqueUserId() { 296 | try { 297 | const [cpu, system, osInfo, uuid] = await Promise.all([ 298 | si.cpu(), 299 | si.system(), 300 | si.osInfo(), 301 | si.uuid() 302 | ]); 303 | 304 | const hardwareInfo = { 305 | cpuId: cpu.processor_id || '', 306 | systemUuid: system.uuid || '', 307 | systemModel: system.model || '', 308 | osUuid: osInfo.uuid || '', 309 | machineUuid: uuid.hardware || '' 310 | }; 311 | 312 | const combinedInfo = Object.values(hardwareInfo).join('-'); 313 | const hash = crypto.createHash('sha256'); 314 | hash.update(combinedInfo); 315 | return hash.digest('hex'); 316 | } catch (error) { 317 | console.error('Error generating unique user ID:', error); 318 | return 'unknown-' + Date.now(); 319 | } 320 | } 321 | 322 | 323 | 324 | function getCookiesFiles() { 325 | // 获取当前目录下的 cookies 文件夹路径 326 | const cookiesPath = path.join(__dirname, 'cookies'); 327 | 328 | try { 329 | // 读取 cookies 文件夹下的所有文件 330 | const files = fs.readdirSync(cookiesPath); 331 | 332 | // 过滤出 txt 文件 333 | const txtFiles = files.filter(file => path.extname(file).toLowerCase() === '.txt'); 334 | 335 | // 存储文件信息的数组 336 | const fileContents = []; 337 | 338 | // 遍历 txt 文件 339 | txtFiles.forEach(file => { 340 | const filePath = path.join(cookiesPath, file); 341 | 342 | // 读取文件内容 343 | const content = fs.readFileSync(filePath, 'utf-8'); 344 | 345 | fileContents.push({ 346 | fileName: file, 347 | content: content 348 | }); 349 | }); 350 | return fileContents; 351 | } catch (error) { 352 | console.error('读取 cookies 文件夹失败:', error); 353 | return []; 354 | } 355 | } 356 | 357 | 358 | 359 | function getSessionCookie(cookieString) { 360 | var sessionCookie = cookieString.split('; ').map(pair => { 361 | const [name, value] = pair.split('='); 362 | return { name, value, domain: '.you.com', path: '/' }; 363 | }); 364 | return sessionCookie; 365 | } 366 | 367 | 368 | let fileContents=getCookiesFiles(); 369 | 370 | fileContents.forEach(file => { 371 | try { 372 | getSessionCookie(file.content) 373 | } catch (error) { 374 | 375 | console.error('Error parsing cookies:', "cookies文件出错"+file.fileName); 376 | return; 377 | } 378 | 379 | }) 380 | 381 | 382 | 383 | let context=""; 384 | async function initializeBrowser() { 385 | try { 386 | let viewportSize = { width: 900, height: 700 }; // 可以根据需要调整这些值 387 | browser = await chromium.launch({ 388 | deviceScaleFactor: 1, 389 | isMobile: false, 390 | userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36', 391 | headless: config.wutou }); 392 | 393 | // 创建上下文 394 | context = await browser.newContext( 395 | {viewport: viewportSize, 396 | userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36', 397 | extraHTTPHeaders: { 398 | 'sec-ch-ua': '"Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99"', 399 | 'sec-ch-ua-mobile': '?0', 400 | 'sec-ch-ua-platform': '"Windows"' 401 | }, 402 | bypassCSP: true 403 | } 404 | ); 405 | page = await context.newPage(); 406 | // 初始化脚本 407 | await context.addInitScript(() => { 408 | // 部分伪装,不完全移除 409 | Object.defineProperty(navigator, 'webdriver', { 410 | get: () => undefined // 不返回 false,而是 undefined 411 | }); 412 | 413 | // 模拟真实浏览器特征 414 | Object.defineProperty(navigator, 'plugins', { 415 | get: () => [ 416 | { name: 'Chrome PDF Plugin' }, 417 | { name: 'Chrome PDF Viewer' } 418 | ] 419 | }); 420 | }); 421 | 422 | memoryMonitor = await setupMemoryMonitoring(page); 423 | 424 | // 设置cookie 425 | 426 | 427 | nowcookie=await processFileContents(fileContents,cookiesjson); 428 | if(!nowcookie){ 429 | 430 | console.log("无cookie使用"); 431 | return; 432 | } 433 | const sessionCookie=getSessionCookie(nowcookie.content) 434 | 435 | 436 | await context.addCookies(sessionCookie); 437 | 438 | 439 | let version =await getVersion(); 440 | console.log(version); 441 | 442 | if(banbenhao == version){ 443 | 444 | console.log("最新版本无需更新"); 445 | 446 | }else{ 447 | 448 | console.log(`当前版本:${banbenhao},拥有新版本${version},请进行更新!`); 449 | } 450 | 451 | userId=await generateUniqueUserId(); 452 | try { 453 | // 捕获网络错误 454 | page.on('requestfailed', (request) => { 455 | console.error('Failed Request:', request.url(), request.failure().errorText); 456 | }); 457 | page.goto('https://you.com/'); 458 | console.log('Successfully opened https://you.com/'); 459 | 460 | // 检查是否成功登录 461 | // 检查是否成功登录 462 | // 463 | // await page.waitForSelector('.sc-19bbc80a-2', { timeout: 20000 }); 464 | // const isLoggedIn = await page.locator('.sc-19bbc80a-2').count() > 0; 465 | // console.log('Login status:', isLoggedIn); 466 | 467 | 468 | try { 469 | 470 | await page.waitForSelector('.sc-f38cb8e6-3', { timeout: 20000 }); 471 | const login = page.locator('.sc-f38cb8e6-3'); 472 | if (await login.count() > 0) { 473 | console.log(`Successfully clicked the element with class '.modal-close"`); 474 | console.log('欢迎使用Monica反代,成功启动!By从前跟你一样'); 475 | } else { 476 | console.log(`Element with class "'.modal-close'" not found`); 477 | console.log('欢迎使用Monica反代,成功启动!By从前跟你一样'); 478 | } 479 | } catch (error) { 480 | console.log(error); 481 | } 482 | try { 483 | 484 | await page.waitForSelector('.modal-close', { timeout: 3000 }); 485 | const button = page.locator('.modal-close'); 486 | if (await button.count() > 0) { 487 | await button.click(); 488 | console.log(`Successfully clicked the element with class '.modal-close"`); 489 | console.log('欢迎使用Monica反代,成功启动!By从前跟你一样'); 490 | } else { 491 | console.log(`Element with class "'.modal-close'" not found`); 492 | console.log('欢迎使用Monica反代,成功启动!By从前跟你一样'); 493 | } 494 | } catch (error) { 495 | console.log(error); 496 | } 497 | 498 | // 获取 __NEXT_DATA__ 元素 499 | const nextDataElement = await page.$('#__NEXT_DATA__'); 500 | 501 | // 提取并解析 JSON 内容 502 | const nextDataContent = await nextDataElement.textContent(); 503 | const parsedData = JSON.parse(nextDataContent); 504 | 505 | // 提取 used_calls 506 | const usedCalls = parsedData.props.pageProps.youProState.freemium.used_calls; 507 | 508 | console.log('Used Calls:', usedCalls); 509 | console.log('Version:', response.data); 510 | 511 | } catch (error) { 512 | console.log('Login check failed:', error.message); 513 | } 514 | 515 | // await page.waitForTimeout(5000); 516 | // await context.addCookies(getSessionCookie(config.cookie2)); 517 | } catch (error) { 518 | console.error('An error occurred during browser initialization:', error); 519 | } 520 | } 521 | async function restartBrowser() { 522 | console.log('Restarting browser...'); 523 | isRestarting = true; 524 | if (browser) { 525 | await browser.close(); 526 | } 527 | await initializeBrowser(); 528 | isRestarting = false; 529 | console.log('Browser restarted successfully'); 530 | } 531 | // 初始化浏览器 532 | initializeBrowser(); 533 | 534 | // 在服务器关闭时关闭浏览器 535 | process.on('SIGINT', async () => { 536 | if (browser) { 537 | await browser.close(); 538 | } 539 | process.exit(); 540 | }); 541 | 542 | const availableModels = [ 543 | { id: "claude-v1", name: "Claude v1" }, 544 | { id: "claude-instant-v1", name: "Claude Instant v1" }, 545 | { id: "claude-2", name: "Claude 2" }, 546 | { id: "claude-3-op", name: "Claude 3 op" }, 547 | { id: "claude-3.5-sont", name: "Claude 3.5 sont" }, 548 | { id: "claude-3.5-op", name: "Claude 3.5 op" }, 549 | { id: "claude-4.0-op", name: "Claude 4.0 op" }, 550 | { id: "claude-4.0-sont", name: "Claude 4.0 sont"} 551 | ]; 552 | 553 | app.post('/v1/chat/completions', async (req, res) => { 554 | console.log('Received chat request'); 555 | reqmessage=""; 556 | One=true; 557 | resssss = res; 558 | 559 | Aborted = false; 560 | 561 | res.on('close', async () => { 562 | console.log('Client disconnected'); 563 | Aborted = true; 564 | if(rrreeeqqq){ 565 | customEventSource.close(); 566 | resssss=null; 567 | } 568 | }); 569 | 570 | let body=req.body 571 | 572 | if(!body.hasOwnProperty('stream')||!body["stream"]){ 573 | isstream=false; 574 | }else{ 575 | isstream=true; 576 | } 577 | res.setHeader("Content-Type", "text/event-stream;charset=utf-8"); 578 | res.setHeader("Access-Control-Allow-Origin", "*"); 579 | req.setEncoding("utf8"); 580 | 581 | console.log("isstream",isstream) 582 | 583 | console.log('Received chat request:', req.body); 584 | await sendMessage(res, req.body); 585 | }); 586 | 587 | app.get('/v1/models', (req, res) => { 588 | Aborted = false; 589 | res.json({ 590 | object: "list", 591 | data: availableModels.map(model => ({ 592 | id: model.id, 593 | object: "model", 594 | created: 1623168000, 595 | owned_by: "openai", 596 | permission: [], 597 | root: model.id, 598 | parent: null 599 | })), 600 | }); 601 | res.on('close', () => { 602 | console.log('Client disconnected'); 603 | 604 | }); 605 | 606 | }); 607 | 608 | class CustomEventSource extends EventEmitter { 609 | constructor(url, options = {}) { 610 | super(); 611 | this.url = new URL(url); 612 | this.options = options; 613 | console.log("options",options); 614 | this.reconnectInterval = 1000; 615 | this.shouldReconnect = true; 616 | this.req = null; // 添加 req 属性 617 | this.connect(); 618 | } 619 | 620 | connect() { 621 | 622 | 623 | if(One){ 624 | One=false; 625 | console.log('第一次'); 626 | }else{ 627 | console.log('第二次'); 628 | return null; 629 | } 630 | // 如果已经有活跃的请求,先关闭它 631 | if (this.req) { 632 | this.req.destroy(); 633 | } 634 | 635 | const requestOptions = { 636 | method: this.options.method || 'GET', 637 | headers: { 638 | ...this.options.headers 639 | }, 640 | agent: this.options.agent, 641 | timeout: 3000 642 | }; 643 | 644 | const client = this.url.protocol === 'https:' ? https : http; 645 | 646 | // 将 req 赋值给 this.req 647 | this.req = client.request(this.url, requestOptions, (res2) => { 648 | let buffer = ''; 649 | 650 | res2.on('data', (chunk) => { 651 | buffer += chunk; 652 | 653 | const lines = buffer.split('\n'); 654 | buffer = lines.pop(); 655 | 656 | lines.forEach(line => { 657 | if (line.startsWith('data: ')) { 658 | const data = line.slice(6); 659 | this.emit('message', { data }); 660 | } 661 | }); 662 | }); 663 | 664 | res2.on('end', () => { 665 | if (this.shouldReconnect) { 666 | this.emit('end', 'Stream ended'); 667 | setTimeout(() => this.connect(), this.reconnectInterval); 668 | } else { 669 | this.emit('close', 'Connection closed'); 670 | } 671 | }); 672 | }); 673 | 674 | this.req.on('error', (error) => { 675 | this.emit('error', error); 676 | if (this.shouldReconnect) { 677 | setTimeout(() => this.connect(), this.reconnectInterval); 678 | } 679 | }); 680 | 681 | if (this.options.body) { 682 | this.req.write(this.options.body); 683 | } 684 | 685 | this.req.end(); 686 | } 687 | 688 | close() { 689 | this.shouldReconnect = false; // 阻止重连 690 | 691 | // 立即销毁当前请求 692 | if (this.req) { 693 | this.req.destroy(); // 使用 destroy 方法更彻底地关闭连接 694 | this.req = null; // 清空请求引用 695 | } 696 | } 697 | } 698 | 699 | 700 | let viptanchuan=false; 701 | 702 | let newuse=true; 703 | 704 | async function sendMessage(res3, message) { 705 | 706 | 707 | try { //关闭干扰窗口 708 | // 等待按钮可见且 aria-hidden 为 false 709 | const modalclose = await page.waitForSelector( 710 | '.modal-close', 711 | { 712 | state: 'visible', 713 | timeout: 500 714 | } 715 | ); 716 | 717 | if(modalclose){ 718 | modalclose.click(); 719 | } 720 | } catch (error) { 721 | console.log('modal-close:', "无"); 722 | } 723 | 724 | try { //关闭干扰窗口 725 | // 等待按钮可见且 aria-hidden 为 false 726 | const cancel_sources_modal = await page.waitForSelector( 727 | 'button[data-eventactionname="cancel_sources_modal"]:not([disabled])', 728 | { 729 | state: 'visible', 730 | timeout: 500 731 | } 732 | ); 733 | 734 | if(cancel_sources_modal){ 735 | cancel_sources_modal.click(); 736 | } 737 | 738 | 739 | } catch (error) { 740 | console.error('cancel_sources_modal:', error); 741 | } 742 | 743 | 744 | let isResponseEnded = false; 745 | if(nowcount<3||config.pro){ 746 | 747 | }else{ 748 | fileContents=getCookiesFiles(); 749 | nowcookie=processFileContents(fileContents,cookiesjson); 750 | if(!nowcookie){ 751 | const text = "没有cookie用了"; 752 | const response = { 753 | id: "chatcmpl-" + Math.random().toString(36).substr(2, 9), 754 | object: "chat.completion", 755 | created: Date.now(), 756 | model: "gpt-3.5-turbo-0613", 757 | usage: { 758 | prompt_tokens: 9, 759 | completion_tokens: text.length, 760 | total_tokens: 9 + text.length 761 | }, 762 | choices: [{ 763 | delta: { 764 | role: 'assistant', 765 | content: text || null 766 | }, 767 | finish_reason: null, 768 | index: 0 769 | }] 770 | }; 771 | resssss.write(`data: ${JSON.stringify(response).replace("\\n", "\\n ")}\n\n`); 772 | resssss.end(); 773 | return; 774 | } 775 | } 776 | 777 | const sessionCookie=getSessionCookie(nowcookie.content) 778 | console.log("sessionCookie",sessionCookie); 779 | 780 | await context.addCookies(sessionCookie); 781 | 782 | 783 | //选择模型 784 | if(newuse||viptanchuan){ 785 | if(viptanchuan){ 786 | await page.goto('https://you.com'); 787 | viptanchuan=false; 788 | } 789 | 790 | try { 791 | // 等待按钮可见且 aria-hidden 为 false 792 | const more = await page.waitForSelector( 793 | 'button[data-testid="mode-switcher-chips-more"]', 794 | { 795 | state: 'visible', 796 | timeout: 20000 797 | } 798 | ); 799 | if(more){ 800 | await page.evaluate(() => { 801 | const more = document.querySelector( 802 | 'button[data-testid="mode-switcher-chips-more"]' 803 | ); 804 | if (more) more.click(); 805 | }); 806 | await new Promise((resolve) => setTimeout(resolve, 1000)); 807 | await page.keyboard.press('PageDown'); 808 | } 809 | newuse=false; 810 | 811 | } catch (error) { 812 | console.error('more:没找到'); 813 | } 814 | 815 | try { 816 | // 等待按钮可见且 aria-hidden 为 false 817 | const sont = await page.waitForSelector( 818 | '[data-testid="overview-menu-option-claude_3_5_sonnet"]', 819 | { 820 | state: 'visible', 821 | timeout: 20000 822 | } 823 | ); 824 | if(sont){ 825 | await page.evaluate(() => { 826 | const sont = document.querySelector( 827 | '[data-testid="overview-menu-option-claude_3_5_sonnet"]' 828 | ); 829 | if (sont) sont.click(); 830 | }); 831 | await new Promise((resolve) => setTimeout(resolve, 1000)); 832 | } 833 | 834 | } catch (error) { 835 | console.error('sont:没找到'); 836 | } 837 | } 838 | 839 | 840 | 841 | 842 | 843 | try { 844 | // 等待按钮可见且 aria-hidden 为 false 845 | const newchat = await page.waitForSelector( 846 | 'a[data-testid="chat-layout-new-chat-button"]', 847 | { 848 | state: 'visible', 849 | timeout: 500 850 | } 851 | ); 852 | newchat.click(); 853 | if(newchat){ 854 | await page.evaluate(() => { 855 | const newchat = document.querySelector( 856 | 'a[data-testid="chat-layout-new-chat-button"]' 857 | ); 858 | if (newchat){ 859 | newchat.click(); 860 | } 861 | }); 862 | } 863 | 864 | } catch (error) { 865 | console.error('newchat:没找到'); 866 | } 867 | await new Promise(resolve => setTimeout(resolve, 1000)); 868 | 869 | try { 870 | //page.goto('https://you.com/?chatMode=user_mode_42a442b3-b21c-4db0-bcdc-ce5370733c64'); 871 | message = message.messages; 872 | message = simplifyJsonString(message) 873 | function simplifyJsonString(message) { 874 | try { 875 | 876 | // 将每个消息转换为简化的文本格式 877 | let simplifiedMessages = message.map(msg => { 878 | 879 | if(config.tohuman){ 880 | 881 | return `${msg.role.replace("user","Human").replace("assistant","Assistant")}: ${msg.content}`; 882 | 883 | }else{ 884 | return `${msg.role}: ${msg.content}`; 885 | } 886 | }); 887 | 888 | // 将所有简化的消息用换行符连接 889 | return simplifiedMessages.join('\n\n'); 890 | } catch (error) { 891 | console.error("Error parsing JSON:", error); 892 | return "Error: Invalid JSON string"; 893 | } 894 | } 895 | 896 | console.log('Formatted messages:', message); 897 | const txtname= Math.random().toString(36).substring(3); 898 | const localCopyPath = path.join(__dirname, `${txtname+".txt"}`); 899 | fs.writeFileSync(localCopyPath, message); 900 | Message = message; 901 | // console.log(`Local copy of formatted messages saved to: ${localCopyPath}`); 902 | 903 | // 重置页面状态(可选,视情况而定) 904 | // await page.reload({ waitUntil: 'networkidle0' }); 905 | 906 | // 在适当的地方检查是否已中止 907 | 908 | 909 | // 打开上传界面 910 | const newMsgButton= await page.waitForSelector('._1ct82yn1', { timeout: 10000 }); 911 | if (Aborted) { 912 | console.log('guanbi!!!!'); 913 | customEventSource.close(); 914 | fs.unlink(localCopyPath, (err) => { 915 | if (err) { 916 | console.error('删除文件时出错:', err); 917 | return; 918 | } 919 | console.log('文件已成功删除'); 920 | }); 921 | return false; 922 | } 923 | // const newMsgButton = await page.locator('._1ct82yn1')//.nth(5); 924 | console.log('Successfully clicked the element with class "chat-toolbar-item--at7NB"'); 925 | await newMsgButton.click(); 926 | 927 | // await clickElement('.chat-toolbar-item--at7NB', page); 928 | await new Promise(resolve => setTimeout(resolve, 1000)); 929 | if (Aborted) { 930 | console.log('guanbi!!!!'); 931 | customEventSource.close(); 932 | fs.unlink(localCopyPath, (err) => { 933 | if (err) { 934 | console.error('删除文件时出错:', err); 935 | return; 936 | } 937 | console.log('文件已成功删除'); 938 | }); 939 | return false; 940 | } 941 | 942 | try { 943 | // 等待按钮可见且 aria-hidden 为 false 944 | const ProPlan = await page.waitForSelector( 945 | '.sc-81c44635-4', 946 | { 947 | timeout: 500 948 | } 949 | ); 950 | 951 | if(ProPlan){ 952 | fs.unlink(localCopyPath, (err) => { 953 | if (err) { 954 | console.error('删除文件时出错:', err); 955 | return; 956 | } 957 | console.log('文件已成功删除'); 958 | }); 959 | nowcount=3 960 | updateCookiesJson(nowfilename,3); 961 | const text = "弹vip了"; 962 | viptanchuan=true; 963 | const response = { 964 | id: "chatcmpl-" + Math.random().toString(36).substr(2, 9), 965 | object: "chat.completion", 966 | created: Date.now(), 967 | model: "gpt-3.5-turbo-0613", 968 | usage: { 969 | prompt_tokens: 9, 970 | completion_tokens: text.length, 971 | total_tokens: 9 + text.length 972 | }, 973 | choices: [{ 974 | delta: { 975 | role: 'assistant', 976 | content: text || null 977 | }, 978 | finish_reason: null, 979 | index: 0 980 | }] 981 | }; 982 | resssss.write(`data: ${JSON.stringify(response).replace("\\n", "\\n ")}\n\n`); 983 | resssss.end(); 984 | return; 985 | } 986 | 987 | 988 | } catch (error) { 989 | console.error('Save & close:', error); 990 | } 991 | 992 | // const manageSourcesButton = page.locator('button', { 993 | // has: page.locator('[aria-label="Open manage sources modal"][role="button"]') 994 | // }); 995 | 996 | 997 | try { 998 | // 等待按钮可见且 aria-hidden 为 false 999 | const manageSourcesButton = await page.waitForSelector( 1000 | 'button[aria-label="Open manage sources modal"][role="button"]', 1001 | { 1002 | state: 'visible', 1003 | timeout: 1000 1004 | } 1005 | ); 1006 | if(manageSourcesButton){ 1007 | await page.evaluate(() => { 1008 | const button = document.querySelector( 1009 | 'button[aria-label="Open manage sources modal"][role="button"]' 1010 | ); 1011 | if (button) button.click(); 1012 | }); 1013 | } 1014 | 1015 | } catch (error) { 1016 | console.error('Save & close:', error); 1017 | } 1018 | 1019 | // // 检查是否可点击 1020 | // const isEnabled = manageSourcesButton.isEnabled(); 1021 | 1022 | // if (manageSourcesButton) { 1023 | // manageSourcesButton.click(); 1024 | // await new Promise(resolve => setTimeout(resolve, 500)); 1025 | // } 1026 | // const RemoveSourcesButton = page.locator('button', { 1027 | // has: page.locator('[aria-label="Remove context source"]') 1028 | // }); 1029 | 1030 | // // // 检查是否可点击 1031 | // // const isEnabled2 = RemoveSourcesButton.isEnabled(); 1032 | 1033 | // if (RemoveSourcesButton) { 1034 | // RemoveSourcesButton.click(); 1035 | // await new Promise(resolve => setTimeout(resolve, 500)); 1036 | // } 1037 | await new Promise(resolve => setTimeout(resolve, 1000)); 1038 | try { 1039 | // 等待按钮可见且 aria-hidden 为 false 1040 | const RemoveSourcesButton = await page.waitForSelector( 1041 | 'button[aria-label="Remove context source"]', 1042 | { 1043 | state: 'visible', 1044 | timeout: 1000 1045 | } 1046 | ); 1047 | 1048 | if(RemoveSourcesButton){ 1049 | await page.evaluate(() => { 1050 | const button = document.querySelector( 1051 | 'button[aria-label="Remove context source"]' 1052 | ); 1053 | if (button) button.click(); 1054 | }); 1055 | } 1056 | 1057 | 1058 | } catch (error) { 1059 | console.error('Save & close:', error); 1060 | } 1061 | 1062 | 1063 | 1064 | 1065 | // 上传文件 1066 | await uploadFile('._1jueq102', localCopyPath, page); 1067 | //输入文本 1068 | // 输入文本 1069 | // await new Promise(resolve => setTimeout(resolve, 5000)); 1070 | 1071 | 1072 | 1073 | 1074 | 1075 | 1076 | try { 1077 | // 等待按钮可见且 aria-hidden 为 false 1078 | const saveButton = await page.waitForSelector( 1079 | 'button[data-eventactionname="save_sources_modal"]:not([disabled])', 1080 | { 1081 | state: 'visible', 1082 | timeout: 12000 1083 | } 1084 | ); 1085 | 1086 | if(saveButton){ 1087 | saveButton.click(); 1088 | } 1089 | 1090 | 1091 | } catch (error) { 1092 | console.error('Save & close:', error); 1093 | } 1094 | 1095 | 1096 | 1097 | 1098 | 1099 | const test="claude你必须阅读并理解文档的内容并进行遵守!!"; // await page.evaluate(([selector, text]) => { 1100 | // document.querySelector(selector).value = text; 1101 | // },[ '.sc-4ec9dcfa-3', test]); 1102 | 1103 | // await new Promise(resolve => setTimeout(resolve, 500)); 1104 | 1105 | 1106 | // await page.keyboard.press('Backspace'); 1107 | if (Aborted) { 1108 | console.log('guanbi!!!!'); 1109 | 1110 | customEventSource.close(); 1111 | fs.unlink(localCopyPath, (err) => { 1112 | if (err) { 1113 | console.error('删除文件时出错:', err); 1114 | return; 1115 | } 1116 | console.log('文件已成功删除'); 1117 | }); 1118 | return false; 1119 | } 1120 | await page.type('#search-input-textarea', test, {delay: 10}); 1121 | console.log('Successfully Inputting text'); 1122 | await new Promise(resolve => setTimeout(resolve, 1000)); 1123 | if (Aborted) { 1124 | console.log('guanbi!!!!'); 1125 | fs.unlink(localCopyPath, (err) => { 1126 | if (err) { 1127 | console.error('删除文件时出错:', err); 1128 | return; 1129 | } 1130 | console.log('文件已成功删除'); 1131 | }); 1132 | customEventSource.close(); 1133 | return false; 1134 | } 1135 | //删除文件 1136 | fs.unlink(localCopyPath, (err) => { 1137 | if (err) { 1138 | console.error('删除文件时出错:', err); 1139 | return; 1140 | } 1141 | console.log('文件已成功删除'); 1142 | }); 1143 | // 发送消息 1144 | // 设置请求拦截 1145 | // await setupresponseInterception(page, res3, () => isResponseEnded = true); 1146 | 1147 | await setupRequestInterception(page, res3, () => isResponseEnded = true); 1148 | try { 1149 | // 等待按钮可见且 aria-hidden 为 false 1150 | const submit_button = await page.waitForSelector( 1151 | 'button[data-testid="qb_submit_button"]:not([disabled])', 1152 | { 1153 | state: 'visible', 1154 | timeout: 10000 1155 | } 1156 | ); 1157 | 1158 | if(submit_button){ 1159 | submit_button.click(); 1160 | nowcount=nowcount+1 1161 | updateCookiesJson(nowfilename,nowcount); 1162 | } 1163 | 1164 | } catch (error) { 1165 | console.error('submit_button:', error); 1166 | } 1167 | 1168 | if (Aborted) { 1169 | console.log('guanbi!!!!'); 1170 | 1171 | customEventSource.close(); 1172 | return false; 1173 | } 1174 | recordUserRequest(userId); 1175 | 1176 | } catch (error) { 1177 | console.error('Error in sendMessage:', error); 1178 | if (!isResponseEnded) { 1179 | res3.write(`data: [ERROR]\n\n`); 1180 | res3.end(); 1181 | } 1182 | } 1183 | } 1184 | 1185 | async function clickElement(selector, page) { 1186 | await page.waitForSelector(selector, { timeout: 10000 }); 1187 | const element = await page.$(selector); 1188 | if (element) { 1189 | await element.click(); 1190 | console.log(`Successfully clicked the element with class "${selector}"`); 1191 | } else { 1192 | console.log(`Element with class "${selector}" not found`); 1193 | } 1194 | } 1195 | 1196 | async function uploadFile(selector, filePath, page) { 1197 | // const element = await page.$(selector); 1198 | // if (element) { 1199 | // console.log(`Successfully found the element with class "${selector}"`); 1200 | // const [fileChooser] = await Promise.all([ 1201 | // page.waitForFileChooser(), 1202 | // page.click(selector), 1203 | // ]); 1204 | // await fileChooser.accept([filePath]); 1205 | // } else { 1206 | // console.log(`Element with class "${selector}" not found`); 1207 | // } 1208 | try { 1209 | // 读取文件内容 1210 | const fileContent = await fsPromises.readFile(filePath); 1211 | const fileName = path.basename(filePath); 1212 | 1213 | console.log(`File size: ${fileContent.length} bytes`); 1214 | 1215 | // 获取文件类型 1216 | const fileType = getFileType(fileName); 1217 | 1218 | // 在浏览器中执行文件上传模拟 1219 | await page.evaluate(async ({ fileName, fileContent, fileType }) => { 1220 | // 将 ArrayBuffer 转换为 Uint8Array 1221 | const uint8Array = new Uint8Array(fileContent); 1222 | 1223 | // 将 Uint8Array 转换为 Blob 1224 | const blob = new Blob([uint8Array], { type: fileType }); 1225 | 1226 | console.log(`Blob size: ${blob.size} bytes`); 1227 | 1228 | // 创建 File 对象 1229 | const file = new File([blob], fileName, { type: fileType }); 1230 | 1231 | console.log(`File size: ${file.size} bytes`); 1232 | 1233 | // 创建 DataTransfer 对象 1234 | const dataTransfer = new DataTransfer(); 1235 | dataTransfer.items.add(file); 1236 | 1237 | // 创建拖拽事件 1238 | const createDragEvent = (type) => { 1239 | return new DragEvent(type, { 1240 | bubbles: true, 1241 | cancelable: true, 1242 | dataTransfer: dataTransfer 1243 | }); 1244 | }; 1245 | 1246 | // 模拟拖拽过程 1247 | const dropZone = document.querySelector('._1jueq102') || document.body; 1248 | 1249 | dropZone.dispatchEvent(createDragEvent('dragenter')); 1250 | dropZone.dispatchEvent(createDragEvent('dragover')); 1251 | dropZone.dispatchEvent(createDragEvent('drop')); 1252 | 1253 | console.log('File upload simulation completed for:', fileName); 1254 | }, { fileName, fileContent: Array.from(fileContent), fileType }); 1255 | 1256 | console.log('File upload process completed successfully.'); 1257 | } catch (error) { 1258 | console.error('Error during file upload:', error); 1259 | throw error; 1260 | } 1261 | 1262 | function getFileType(fileName) { 1263 | const extension = path.extname(fileName).toLowerCase(); 1264 | switch (extension) { 1265 | case '.jpg': 1266 | case '.jpeg': 1267 | return 'image/jpeg'; 1268 | case '.png': 1269 | return 'image/png'; 1270 | case '.gif': 1271 | return 'image/gif'; 1272 | case '.pdf': 1273 | return 'application/pdf'; 1274 | default: 1275 | return 'application/octet-stream'; 1276 | } 1277 | } 1278 | } 1279 | 1280 | 1281 | 1282 | 1283 | 1284 | function getFileType(fileName) { 1285 | const extension = path.extname(fileName).toLowerCase(); 1286 | switch (extension) { 1287 | case '.jpg': 1288 | case '.jpeg': 1289 | return 'image/jpeg'; 1290 | case '.png': 1291 | return 'image/png'; 1292 | case '.gif': 1293 | return 'image/gif'; 1294 | case '.pdf': 1295 | return 'application/pdf'; 1296 | default: 1297 | return 'application/octet-stream'; 1298 | } 1299 | } 1300 | 1301 | async function setupresponseInterception(page, res4, setResponseEnded) { 1302 | 1303 | 1304 | page.on('response', async (response) => { 1305 | if (response.url().includes('/api/streamingSearch')) { 1306 | const reader = response.body().getReader(); // 获取流的读取器 1307 | 1308 | let done, value; 1309 | const decoder = new TextDecoder('utf-8'); // 创建解码器 1310 | 1311 | while (true) { 1312 | // 逐块读取数据 1313 | ({ done, value } = await reader.read()); 1314 | 1315 | if (done) { 1316 | console.log('流结束'); 1317 | break; 1318 | } 1319 | 1320 | // 解码并处理数据块 1321 | const chunkString = decoder.decode(value, { stream: true }); 1322 | console.log('接收到的数据块:', chunkString); 1323 | 1324 | // 尝试解析 JSON 1325 | try { 1326 | const jsonData = JSON.parse(chunkString); 1327 | console.log('解析的 JSON 数据:', jsonData); 1328 | } catch (error) { 1329 | console.error('JSON 解析错误:', error); 1330 | } 1331 | } 1332 | } 1333 | }); 1334 | 1335 | 1336 | 1337 | 1338 | 1339 | 1340 | 1341 | 1342 | 1343 | 1344 | } 1345 | 1346 | 1347 | 1348 | 1349 | 1350 | async function setupRequestInterception(page, res4, setResponseEnded) { 1351 | // Playwright 使用 route 而不是 setRequestInterception 1352 | 1353 | await page.unroute('**/*'); 1354 | await page.route('**/*', async (route) => { 1355 | const request = route.request(); 1356 | let url = request.url(); 1357 | 1358 | 1359 | if (url.includes('/api/streamingSearch')) { 1360 | console.log('request url:', url); 1361 | let urlse = new URL(url); 1362 | 1363 | if (urlse.searchParams.has('enable_worklow_generation_ux')) { 1364 | urlse.searchParams.set('enable_worklow_generation_ux', 'false'); 1365 | console.log("设置enable_worklow_generation_ux") 1366 | } 1367 | 1368 | if (urlse.searchParams.has('use_personalization_extraction')) { 1369 | urlse.searchParams.set('use_personalization_extraction', 'false'); 1370 | console.log("设置use_personalization_extraction") 1371 | } 1372 | if (urlse.searchParams.has('safeSearch')) { 1373 | urlse.searchParams.set('safeSearch', 'off'); 1374 | console.log("设置safeSearch") 1375 | } 1376 | if (urlse.searchParams.has('use_nested_youchat_updates')) { 1377 | urlse.searchParams.set('use_nested_youchat_updates', 'false'); 1378 | console.log("设置use_nested_youchat_updates") 1379 | } 1380 | 1381 | 1382 | 1383 | 1384 | url=urlse.toString(); 1385 | 1386 | 1387 | await route.abort(); 1388 | 1389 | // 处理 OPTIONS 预检请求 1390 | // if (request.method() === 'OPTIONS') { 1391 | // await route.fulfill({ 1392 | // status: 200, 1393 | // headers: { 1394 | // 'Access-Control-Allow-Origin': 'https://you.com/', 1395 | // 'Access-Control-Allow-Methods': 'POST, GET, OPTIONS', 1396 | // 'Access-Control-Allow-Headers': 'content-type,x-client-id,x-client-locale,x-client-type,x-client-version,x-from-channel,x-product-name,x-time-zone', 1397 | // 'Access-Control-Max-Age': '86400', 1398 | // 'Access-Control-Allow-Credentials': 'true' 1399 | // } 1400 | // }); 1401 | // return; 1402 | // } 1403 | 1404 | 1405 | try { 1406 | 1407 | 1408 | console.log('method:', request.method()); 1409 | 1410 | // 创建 EventSource 实例 1411 | const eventSourceOptions = { 1412 | method: request.method(), 1413 | headers: await request.allHeaders(), 1414 | body: request.postData(), 1415 | timeout: 30000 1416 | }; 1417 | 1418 | 1419 | 1420 | if (config.proxy) { 1421 | eventSourceOptions.agent = proxyAgent; 1422 | } 1423 | 1424 | customEventSource = new CustomEventSource(url, eventSourceOptions); 1425 | 1426 | customEventSource.on('message', (event) => { 1427 | if (Aborted) { 1428 | console.log('关闭连接!'); 1429 | 1430 | customEventSource.close(); 1431 | return false; 1432 | } 1433 | 1434 | console.log('Received event:', event); 1435 | console.log('Received data:', event.data); 1436 | processStreamData(event.data); 1437 | }); 1438 | 1439 | customEventSource.on('error', (error) => { 1440 | console.error('EventSource error:', error); 1441 | cleanupAndEnd('Error occurred'); 1442 | }); 1443 | 1444 | customEventSource.on('end', (message) => { 1445 | console.log('Stream ended:', message); 1446 | 1447 | cleanupAndEnd('Stream ended'); 1448 | }); 1449 | 1450 | customEventSource.on('close', (message) => { 1451 | console.log('Connection closed:', message); 1452 | 1453 | cleanupAndEnd('Connection closed'); 1454 | }); 1455 | 1456 | // 继续请求 1457 | // await route.continue(); 1458 | 1459 | } catch (error) { 1460 | console.error('Error intercepting request:', error); 1461 | console.log('Client disconnected'); 1462 | Aborted = true; 1463 | if (rrreeeqqq) { 1464 | 1465 | resssss = null; 1466 | } 1467 | // await route.continue(); 1468 | } 1469 | } else { 1470 | // 对于其他请求,直接继续 1471 | await route.continue(); 1472 | } 1473 | }); 1474 | 1475 | function processStreamData(message) { 1476 | if (Aborted) { 1477 | console.log('Request aborted, stopping data processing'); 1478 | 1479 | return; 1480 | } 1481 | 1482 | console.log('数据', message); 1483 | if (message === `{"i": 1, "msg": "Responding", "done": true, "defaultExpanded": true}`) { 1484 | cleanupAndEnd('Finished'); 1485 | customEventSource.close(); 1486 | return; 1487 | } 1488 | 1489 | if (message.includes("youChatToken") ){ 1490 | try { 1491 | const parsedMessage = JSON.parse(message); 1492 | const text = parsedMessage.youChatToken; 1493 | const response = { 1494 | id: "chatcmpl-" + Math.random().toString(36).substr(2, 9), 1495 | object: "chat.completion", 1496 | created: Date.now(), 1497 | model: "gpt-3.5-turbo-0613", 1498 | usage: { 1499 | prompt_tokens: 9, 1500 | completion_tokens: text.length, 1501 | total_tokens: 9 + text.length 1502 | }, 1503 | choices: [{ 1504 | delta: { 1505 | role: 'assistant', 1506 | content: text || null 1507 | }, 1508 | finish_reason: null, 1509 | index: 0 1510 | }] 1511 | }; 1512 | 1513 | if (resssss) { 1514 | console.log('Sending response:', JSON.stringify(response)); 1515 | if (isstream) { 1516 | console.log(isstream) 1517 | reqmessage += text; 1518 | resssss.flushHeaders(); 1519 | resssss.write(`data: ${JSON.stringify(response).replace("\\n", "\\n ")}\n\n`); 1520 | resssss.flushHeaders(); 1521 | } else { 1522 | reqmessage += text; 1523 | } 1524 | } 1525 | } catch (error) { 1526 | console.error('Error processing message:', error); 1527 | console.log('Client disconnected'); 1528 | Aborted = true; 1529 | if (rrreeeqqq) { 1530 | customEventSource.close(); 1531 | resssss = null; 1532 | } 1533 | } 1534 | } 1535 | } 1536 | 1537 | function cleanupAndEnd(reason) { 1538 | console.log(`Ending response: ${reason}`); 1539 | if (customEventSource) { 1540 | customEventSource.removeAllListeners(); 1541 | customEventSource.close(); 1542 | } 1543 | 1544 | if (resssss) { 1545 | if (isstream) { 1546 | if (reqmessage !== "") { 1547 | resssss.write(`data: [DONE]\n\n`); 1548 | resssss.end(); 1549 | } else { 1550 | resssss.write('{"error":{"message":"网络错误","type":"invalid_request_error","param":null,"code":null}}'); 1551 | resssss.end(); 1552 | } 1553 | } else { 1554 | if (reqmessage !== "") { 1555 | const response = createChatCompletion(reqmessage); 1556 | resssss.write(JSON.stringify(response)); 1557 | resssss.end(); 1558 | } else { 1559 | resssss.write('{"error":{"message":"网络错误","type":"invalid_request_error","param":null,"code":null}}'); 1560 | resssss.end(); 1561 | } 1562 | } 1563 | } 1564 | console.log('Response ended and resources cleaned up'); 1565 | } 1566 | } 1567 | 1568 | server.listen(config.port, () => { 1569 | console.log(`服务器运行在 http://localhost:${config.port}`); 1570 | }); 1571 | function createChatCompletion(content){ 1572 | const completionTokens = content.length; 1573 | 1574 | return { 1575 | id: generateId(), 1576 | object: "chat.completion", 1577 | created: Math.floor(Date.now() / 1000), 1578 | model: "gpt-3.5-turbo", 1579 | system_fingerprint: "fp_44709d6fcb", 1580 | choices: [ 1581 | { 1582 | index: 0, 1583 | message: { 1584 | role: "assistant", 1585 | content: content 1586 | }, 1587 | logprobs: null, 1588 | finish_reason: "stop" 1589 | } 1590 | ], 1591 | usage: { 1592 | prompt_tokens: completionTokens, 1593 | completion_tokens: completionTokens, 1594 | total_tokens: completionTokens 1595 | } 1596 | }; 1597 | }; 1598 | const generateId = () => 'chatcmpl-' + Math.random().toString(36).substring(2, 15); -------------------------------------------------------------------------------- /start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 安装依赖包 4 | npm install 5 | 6 | # 运行 Node.js 应用程序 7 | node server.js 8 | 9 | echo "按 Enter 键退出..." 10 | read -------------------------------------------------------------------------------- /版本号.txt: -------------------------------------------------------------------------------- 1 | 1.4 2 | --------------------------------------------------------------------------------