Update Jimp and add WASM plugins (#3784) * Update jimp, use WASM format plugins * Fix Jimp import path in thumbnails endpoint * Fix size variable * Add fetch patch to handle file URLs * Fix JPEG thumbnailing * Enhance fetch patch to validate file paths and support specific extensions * Add default msBmp format * Update jsconfig * Update JPEG color space in thumbnail generation to YCbCr * Install jimp plugins explicitly * Refactor fetch patch utility functions

058fef1146a96ffbe937699f3f29ca70e56815b7

Cohee <18619528+Cohee1207@users.noreply.github.com>

Signed
10 files changed, +1082 -345Showing whitespace changes
jsconfig.json+1 -1
@@ -2,7 +2,7 @@
22 "compilerOptions": {
33 "module": "ESNext",
44 "target": "ES2023",
55 "moduleResolution": "NodeBundler",
66 "strictNullChecks": true,
77 "strictFunctionTypes": true,
88 "checkJs": true,
package-lock.json+883 -326
@@ -14,6 +14,26 @@
1414 "@agnai/sentencepiece-js": "^1.1.1",
1515 "@agnai/web-tokenizers": "^0.1.3",
1616 "@iconfu/svg-inject": "^1.2.3",
17+ "@jimp/core": "^1.6.0",
18+ "@jimp/js-bmp": "^1.6.0",
19+ "@jimp/js-gif": "^1.6.0",
20+ "@jimp/js-tiff": "^1.6.0",
21+ "@jimp/plugin-circle": "^1.6.0",
22+ "@jimp/plugin-color": "^1.6.0",
23+ "@jimp/plugin-contain": "^1.6.0",
24+ "@jimp/plugin-cover": "^1.6.0",
25+ "@jimp/plugin-crop": "^1.6.0",
26+ "@jimp/plugin-displace": "^1.6.0",
27+ "@jimp/plugin-fisheye": "^1.6.0",
28+ "@jimp/plugin-flip": "^1.6.0",
29+ "@jimp/plugin-mask": "^1.6.0",
30+ "@jimp/plugin-quantize": "^1.6.0",
31+ "@jimp/plugin-rotate": "^1.6.0",
32+ "@jimp/plugin-threshold": "^1.6.0",
33+ "@jimp/wasm-avif": "^1.6.0",
34+ "@jimp/wasm-jpeg": "^1.6.0",
35+ "@jimp/wasm-png": "^1.6.0",
36+ "@jimp/wasm-webp": "^1.6.0",
1737 "@mozilla/readability": "^0.6.0",
1838 "@popperjs/core": "^2.11.8",
1939 "@zeldafan0225/ai_horde": "^5.2.0",
@@ -46,7 +66,6 @@
4666 "ip-regex": "^5.0.0",
4767 "ipaddr.js": "^2.2.0",
4868 "is-docker": "^3.0.0",
49- "jimp": "^0.22.10",
5069 "localforage": "^1.10.0",
5170 "lodash": "^4.17.21",
5271 "mime-types": "^2.1.35",
@@ -428,7 +447,55 @@
428447 "@jimp/custom": ">=0.3.5"
429448 }
430449 },
450+ "node_modules/@jimp/bmp/node_modules/@jimp/utils": {
451+ "version": "0.22.12",
452+ "resolved": "https://registry.npmjs.org/@jimp/utils/-/utils-0.22.12.tgz",
453+ "integrity": "sha512-yJ5cWUknGnilBq97ZXOyOS0HhsHOyAyjHwYfHxGbSyMTohgQI6sVyE8KPgDwH8HHW/nMKXk8TrSwAE71zt716Q==",
454+ "license": "MIT",
455+ "dependencies": {
456+ "regenerator-runtime": "^0.13.3"
457+ }
458+ },
431459 "node_modules/@jimp/core": {
460+ "version": "1.6.0",
461+ "resolved": "https://registry.npmjs.org/@jimp/core/-/core-1.6.0.tgz",
462+ "integrity": "sha512-EQQlKU3s9QfdJqiSrZWNTxBs3rKXgO2W+GxNXDtwchF3a4IqxDheFX1ti+Env9hdJXDiYLp2jTRjlxhPthsk8w==",
463+ "license": "MIT",
464+ "dependencies": {
465+ "@jimp/file-ops": "1.6.0",
466+ "@jimp/types": "1.6.0",
467+ "@jimp/utils": "1.6.0",
468+ "await-to-js": "^3.0.0",
469+ "exif-parser": "^0.1.12",
470+ "file-type": "^16.0.0",
471+ "mime": "3"
472+ },
473+ "engines": {
474+ "node": ">=18"
475+ }
476+ },
477+ "node_modules/@jimp/core/node_modules/mime": {
478+ "version": "3.0.0",
479+ "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz",
480+ "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==",
481+ "license": "MIT",
482+ "bin": {
483+ "mime": "cli.js"
484+ },
485+ "engines": {
486+ "node": ">=10.0.0"
487+ }
488+ },
489+ "node_modules/@jimp/custom": {
490+ "version": "0.22.12",
491+ "resolved": "https://registry.npmjs.org/@jimp/custom/-/custom-0.22.12.tgz",
492+ "integrity": "sha512-xcmww1O/JFP2MrlGUMd3Q78S3Qu6W3mYTXYuIqFq33EorgYHV/HqymHfXy9GjiCJ7OI+7lWx6nYFOzU7M4rd1Q==",
493+ "license": "MIT",
494+ "dependencies": {
495+ "@jimp/core": "^0.22.12"
496+ }
497+ },
498+ "node_modules/@jimp/custom/node_modules/@jimp/core": {
432499 "version": "0.22.12",
433500 "resolved": "https://registry.npmjs.org/@jimp/core/-/core-0.22.12.tgz",
434501 "integrity": "sha512-l0RR0dOPyzMKfjUW1uebzueFEDtCOj9fN6pyTYWWOM/VS4BciXQ1VVrJs8pO3kycGYZxncRKhCoygbNr8eEZQA==",
@@ -444,13 +511,67 @@
444511 "tinycolor2": "^1.6.0"
445512 }
446513 },
447514 "node_modules/@jimp/custom/node_modules/@jimp/utils": {
448515 "version": "0.22.12",
449516 "resolved": "https://registry.npmjs.org/@jimp/customutils/-/customutils-0.22.12.tgz",
450517 "integrity": "sha512-xcmww1O/JFP2MrlGUMd3Q78S3Qu6W3mYTXYuIqFq33EorgYHVyJ5cWUknGnilBq97ZXOyOS0HhsHOyAyjHwYfHxGbSyMTohgQI6sVyE8KPgDwH8HHW/HqymHfXy9GjiCJ7OI+7lWx6nYFOzU7M4rd1QnMKXk8TrSwAE71zt716Q==",
451518 "license": "MIT",
452519 "dependencies": {
453520 "@jimp/coreregenerator-runtime": "^0.2213.123"
521+ }
522+ },
523+ "node_modules/@jimp/custom/node_modules/buffer": {
524+ "version": "5.7.1",
525+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
526+ "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
527+ "funding": [
528+ {
529+ "type": "github",
530+ "url": "https://github.com/sponsors/feross"
531+ },
532+ {
533+ "type": "patreon",
534+ "url": "https://www.patreon.com/feross"
535+ },
536+ {
537+ "type": "consulting",
538+ "url": "https://feross.org/support"
539+ }
540+ ],
541+ "license": "MIT",
542+ "dependencies": {
543+ "base64-js": "^1.3.1",
544+ "ieee754": "^1.1.13"
545+ }
546+ },
547+ "node_modules/@jimp/custom/node_modules/pixelmatch": {
548+ "version": "4.0.2",
549+ "resolved": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-4.0.2.tgz",
550+ "integrity": "sha512-J8B6xqiO37sU/gkcMglv6h5Jbd9xNER7aHzpfRdNmV4IbQBzBpe4l9XmbG+xPF/znacgu2jfEw+wHffaq/YkXA==",
551+ "license": "ISC",
552+ "dependencies": {
553+ "pngjs": "^3.0.0"
554+ },
555+ "bin": {
556+ "pixelmatch": "bin/pixelmatch"
557+ }
558+ },
559+ "node_modules/@jimp/custom/node_modules/pngjs": {
560+ "version": "3.4.0",
561+ "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz",
562+ "integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==",
563+ "license": "MIT",
564+ "engines": {
565+ "node": ">=4.0.0"
566+ }
567+ },
568+ "node_modules/@jimp/file-ops": {
569+ "version": "1.6.0",
570+ "resolved": "https://registry.npmjs.org/@jimp/file-ops/-/file-ops-1.6.0.tgz",
571+ "integrity": "sha512-Dx/bVDmgnRe1AlniRpCKrGRm5YvGmUwbDzt+MAkgmLGf+jvBT75hmMEZ003n9HQI/aPnm/YKnXjg/hOpzNCpHQ==",
572+ "license": "MIT",
573+ "engines": {
574+ "node": ">=18"
454575 }
455576 },
456577 "node_modules/@jimp/gif": {
@@ -467,6 +588,15 @@
467588 "@jimp/custom": ">=0.3.5"
468589 }
469590 },
591+ "node_modules/@jimp/gif/node_modules/@jimp/utils": {
592+ "version": "0.22.12",
593+ "resolved": "https://registry.npmjs.org/@jimp/utils/-/utils-0.22.12.tgz",
594+ "integrity": "sha512-yJ5cWUknGnilBq97ZXOyOS0HhsHOyAyjHwYfHxGbSyMTohgQI6sVyE8KPgDwH8HHW/nMKXk8TrSwAE71zt716Q==",
595+ "license": "MIT",
596+ "dependencies": {
597+ "regenerator-runtime": "^0.13.3"
598+ }
599+ },
470600 "node_modules/@jimp/jpeg": {
471601 "version": "0.22.12",
472602 "resolved": "https://registry.npmjs.org/@jimp/jpeg/-/jpeg-0.22.12.tgz",
@@ -480,186 +610,237 @@
480610 "@jimp/custom": ">=0.3.5"
481611 }
482612 },
483613 "node_modules/@jimp/plugin-blitjpeg/node_modules/@jimp/utils": {
484614 "version": "0.22.12",
485615 "resolved": "https://registry.npmjs.org/@jimp/plugin-blitutils/-/plugin-blitutils-0.22.12.tgz",
486616 "integrity": "sha512-xslz2ZoFZOPLY8EZ4dC29m168BtDx95D6K80TzgUi8gqT7LY6CsajWO0FAxDwHz6h0eomHMfyGX0stspBrTKnQyJ5cWUknGnilBq97ZXOyOS0HhsHOyAyjHwYfHxGbSyMTohgQI6sVyE8KPgDwH8HHW/nMKXk8TrSwAE71zt716Q==",
487617 "license": "MIT",
488618 "dependencies": {
489619 "@jimp/utilsregenerator-runtime": "^0.2213.123"
490- },
491- "peerDependencies": {
492- "@jimp/custom": ">=0.3.5"
493620 }
494621 },
495622 "node_modules/@jimp/pluginjs-blurbmp": {
496623 "version": "01.226.120",
497624 "resolved": "https://registry.npmjs.org/@jimp/pluginjs-blurbmp/-/pluginjs-blurbmp-01.226.120.tgz",
498625 "integrity": "sha512-S0vJADTuh1Q9F+cXAwFPlrKWzDj2F9tFU6Q5PC/9JAbUvaaDuivpyWuImEKXVz5PUZw2NbpuSHjwssbTpOZ8F13iJX4uwe3yzLyBDXupR3SnL3htU7S3KEs4e6rjDP6gNEOXRFsWs6YD3hXuXd50jd8ummy+q2WSwuGkr8wi+Gw==",
499626 "license": "MIT",
500627 "dependencies": {
501628 "@jimp/utilscore": "^01.226.120",
629+ "@jimp/types": "1.6.0",
630+ "@jimp/utils": "1.6.0",
631+ "bmp-ts": "^1.0.9"
502632 },
503633 "peerDependenciesengines": {
504634 "@jimp/customnode": ">=0.3.518"
505635 }
506636 },
507637 "node_modules/@jimp/pluginjs-circlegif": {
508638 "version": "01.226.120",
509639 "resolved": "https://registry.npmjs.org/@jimp/pluginjs-circlegif/-/pluginjs-circlegif-01.226.120.tgz",
510640 "integrity": "sha512-SWVXx1yiuj5jZtMijqUfvVOJBwOifFn0918ou4ftoHgegc5aHWW5dZbYPjvC9fLpvz7oSlptNl2Sxr1zwofjTgN9CZPHOrJTsAUoWkWZstLPpwT5AwJ0wge+47+ix3++SdSL/H2QzyMqxbcDYNFe4MoI5MIhATfb0/dl/wmX221g==",
511641 "license": "MIT",
512642 "dependencies": {
513643 "@jimp/utilscore": "^01.226.120",
644+ "@jimp/types": "1.6.0",
645+ "gifwrap": "^0.10.1",
646+ "omggif": "^1.0.10"
514647 },
515648 "peerDependenciesengines": {
516649 "@jimp/customnode": ">=0.3.518"
517650 }
518651 },
519652 "node_modules/@jimp/pluginjs-colorjpeg": {
520653 "version": "01.226.120",
521654 "resolved": "https://registry.npmjs.org/@jimp/pluginjs-colorjpeg/-/pluginjs-colorjpeg-01.226.120.tgz",
522655 "integrity": "sha512-xImhTE5BpS8xa+mAN6j4sMRWaUgUDLoaGHhJhpC+r7SKKErYDR0WQV4yCE4gP6vgFDqeusblf5Pok6B2DUiMXplH8RhIKAryj1yn+N0gozD0F3Ka1LUSaMXrn7ZIA007SIAQ0khM1Uptxmpku/0MfbClx2r7pnJv9gWpAEJdMVA==",
523656 "license": "MIT",
524657 "dependencies": {
525658 "@jimp/utilscore": "^01.226.120",
526659 "tinycolor2@jimp/types": "^1.6.0",
660+ "jpeg-js": "^0.4.4"
527661 },
528662 "peerDependenciesengines": {
529663 "@jimp/customnode": ">=0.3.518"
530664 }
531665 },
532666 "node_modules/@jimp/pluginjs-containpng": {
533667 "version": "01.226.120",
534668 "resolved": "https://registry.npmjs.org/@jimp/pluginjs-containpng/-/pluginjs-containpng-01.226.120.tgz",
535669 "integrity": "sha512-Eo3DmfixJw3N79lWk8q/0SDYbqmKt1xSTJ69yy8XLYQj9svoBbyRpSnHR+n9hOw5pKXytHwUW6nU4u1wegHNoQAbQHScy3hDDgMRNfG0tPjL88AV6qKAILGReIa3ATpW5QFjBKpisvUaOqhzJ7Reic1oawx3Riyv152gaPfqsBVg==",
536670 "license": "MIT",
537671 "dependencies": {
538672 "@jimp/utilscore": "^01.226.120",
673+ "@jimp/types": "1.6.0",
674+ "pngjs": "^7.0.0"
539675 },
540676 "peerDependenciesengines": {
541677 "@jimp/customnode": ">=0.3.518",
542- "@jimp/plugin-blit": ">=0.3.5",
543- "@jimp/plugin-resize": ">=0.3.5",
544- "@jimp/plugin-scale": ">=0.3.5"
545678 }
546679 },
547680 "node_modules/@jimp/pluginjs-covertiff": {
548681 "version": "01.226.120",
549682 "resolved": "https://registry.npmjs.org/@jimp/pluginjs-covertiff/-/pluginjs-covertiff-01.226.120.tgz",
550683 "integrity": "sha512-z0w/1xH/vzhReR8/knZkpTNx7KO+E8a7fnasQ2wHG5ze6y5oL2dhH1UufNua8gLQXlv8/W56adijj3h0ZQUOiun3mXUv79zYEAKvE0O+4nJ1brhSd233HBJCo01BXArP7EhgtKvWJOZfRzdZSNv0Pu1rKtgM72qgtwe2tFvyw==",
551684 "license": "MIT",
552685 "dependencies": {
553686 "@jimp/utilscore": "^01.226.120",
687+ "@jimp/types": "1.6.0",
688+ "utif2": "^4.1.0"
554689 },
555690 "peerDependenciesengines": {
556691 "@jimp/customnode": ">=0.3.518",
557- "@jimp/plugin-crop": ">=0.3.5",
558- "@jimp/plugin-resize": ">=0.3.5",
559- "@jimp/plugin-scale": ">=0.3.5"
560692 }
561693 },
562694 "node_modules/@jimp/plugin-cropblit": {
563695 "version": "01.226.120",
564696 "resolved": "https://registry.npmjs.org/@jimp/plugin-cropblit/-/plugin-cropblit-01.226.120.tgz",
565697 "integrity": "sha512-FNuUN0OVzRCozx8XSgP9MyLGMxNHHJMFtM+LJuFjn1mu3k0VQxrzqbN06yIl46TVejhyAhcq5gLzqmSCHvlcBVwuRWl1csi7qilnSK8uxK4RJMSuVeBiO1AY0+7APnfUbQNZm6hCe0CCFv1Iyw1D/Dhb8ph8fQgm5mwM0eSxgVA==",
566698 "license": "MIT",
567699 "dependencies": {
568700 "@jimp/utilstypes": "^01.226.120",
701+ "@jimp/utils": "1.6.0",
702+ "zod": "^3.23.8"
569703 },
570704 "peerDependenciesengines": {
571705 "@jimp/customnode": ">=0.3.518"
572706 }
573707 },
574708 "node_modules/@jimp/plugin-displaceblur": {
575709 "version": "01.226.120",
576710 "resolved": "https://registry.npmjs.org/@jimp/plugin-displaceblur/-/plugin-displaceblur-01.226.120.tgz",
577711 "integrity": "sha512-qpRM8JRicxfK6aPPqKZA6+GzBwUIitiHaZw0QrJ64Ygd3zrM7iic1OTwUCb0g/rN5y+AsTc7BXrUnmdEsT3IfuCXCJJNs8SZzP0MkZ1eTvuwK9ZidCuMo4+37k2x7QcyCvmKXY4haUrSIsBug4S3CAJ3xkzCidRwYXB5CyGZTw==",
578712 "license": "MIT",
713+ "peer": true,
579714 "dependencies": {
580715 "@jimp/utilscore": "^01.226.120",
716+ "@jimp/utils": "1.6.0"
581717 },
582718 "peerDependenciesengines": {
583719 "@jimp/customnode": ">=0.3.518"
584720 }
585721 },
586722 "node_modules/@jimp/plugin-dithercircle": {
587723 "version": "01.226.120",
588724 "resolved": "https://registry.npmjs.org/@jimp/plugin-dithercircle/-/plugin-dithercircle-01.226.120.tgz",
589725 "integrity": "sha512-jYgGdSdSKl1UUEanX8A85v4+QUmxt1Gp+PE8vHFwlamaKk89sLtdMKAXfDp3HNaG30SPZW6AQ7dtAtTnoRKorRi+PXQe7eVE3eNeSZX4inCq63EHL7cX580dMqkoC3ZLw5yCJjKqXRgkewS5bvj8DEh87Ko1ydJfzqS3P2tdWw==",
590726 "license": "MIT",
591727 "dependencies": {
592728 "@jimp/utilstypes": "^01.226.120",
729+ "zod": "^3.23.8"
593730 },
594731 "peerDependenciesengines": {
595732 "@jimp/customnode": ">=0.3.518"
596733 }
597734 },
598735 "node_modules/@jimp/plugin-fisheyecolor": {
599736 "version": "01.226.120",
600737 "resolved": "https://registry.npmjs.org/@jimp/plugin-fisheyecolor/-/plugin-fisheyecolor-01.226.120.tgz",
601738 "integrity": "sha512-LGuUTsFgJ5q8IVCpkBsxIXM+fOp6KBKrmLkX4LfyCy8IIsROwoUvsUPKzutSqMJnsm3JGDW2eOmWIS/jJpPaeaishjlxvczjgII45XOXTrsyfblyMZg3a9eAo0P7VPH4+QCrvyNQwaYatbAIamSIN1YzxmO3DkIZXzRjFSz1SA==",
602739 "license": "MIT",
603740 "dependencies": {
604741 "@jimp/utilscore": "^01.226.120",
742+ "@jimp/types": "1.6.0",
743+ "@jimp/utils": "1.6.0",
744+ "tinycolor2": "^1.6.0",
745+ "zod": "^3.23.8"
605746 },
606747 "peerDependenciesengines": {
607748 "@jimp/customnode": ">=0.3.518"
608749 }
609750 },
610751 "node_modules/@jimp/plugin-flipcontain": {
611752 "version": "01.226.120",
612753 "resolved": "https://registry.npmjs.org/@jimp/plugin-flipcontain/-/plugin-flipcontain-01.226.120.tgz",
613754 "integrity": "sha512-m251Rop7GN8W0YooN/rF9LWk6kNclngyjIJsn+Vdq/VXHToGQ6EGveOSTSQaX2Isi9f9lCDLxtQg9bB4yOBOxtY9IPAtEfES8J1n9Ddx+inBIb7nlaLLxnvHX8QXhGBYT1/QTU/JYkGaAkIGoPnyYvmLEDqMz2SGihqlpqfzQ==",
614755 "license": "MIT",
615756 "dependencies": {
616757 "@jimp/utilscore": "^01.226.120",
758+ "@jimp/plugin-blit": "1.6.0",
759+ "@jimp/plugin-resize": "1.6.0",
760+ "@jimp/types": "1.6.0",
761+ "@jimp/utils": "1.6.0",
762+ "zod": "^3.23.8"
617763 },
618764 "peerDependenciesengines": {
619765 "@jimp/customnode": ">=0.3.518",
620- "@jimp/plugin-rotate": ">=0.3.5"
621766 }
622767 },
623768 "node_modules/@jimp/plugin-gaussiancover": {
624769 "version": "01.226.120",
625770 "resolved": "https://registry.npmjs.org/@jimp/plugin-gaussiancover/-/plugin-gaussiancover-01.226.120.tgz",
626771 "integrity": "sha512-sBfbzoOmJ6FczfG2PquiK84NtVGeScw97JsCC3rpQv1PHVWyW+uqWFF53+n3c8Y0P2HWlUjflEla2hIow0h6yqSC269YUJ8HC3Q/vWShvhgMpCi2V55sMlbkkTTx4zPvd8mWZlC0ykrNDeAy9IJegrQ7v5E99rJwmQu25lygKLA==",
627772 "license": "MIT",
628773 "dependencies": {
629774 "@jimp/utilscore": "^01.226.120",
775+ "@jimp/plugin-crop": "1.6.0",
776+ "@jimp/plugin-resize": "1.6.0",
777+ "@jimp/types": "1.6.0",
778+ "zod": "^3.23.8"
630779 },
631780 "peerDependenciesengines": {
632781 "@jimp/customnode": ">=0.3.518"
633782 }
634783 },
635784 "node_modules/@jimp/plugin-invertcrop": {
636785 "version": "01.226.120",
637786 "resolved": "https://registry.npmjs.org/@jimp/plugin-invertcrop/-/plugin-invertcrop-01.226.120.tgz",
638787 "integrity": "sha512-NKqZkEhvs+6rwxdB21USdySCUDI+7OCR6PYijaA/iizXXodpxOGvT/smd/lxeXsZ/empHmFFFJ/FaXcYh19Tm04dGDaXcNF/dN5nm6GFa393eDIzbi1smBqkUPTE+xQpRwSWMAf01D5OC3ZWB+xZsNla93BDS9iCkLHA8wang==",
639788 "license": "MIT",
640789 "dependencies": {
641790 "@jimp/utilscore": "^01.226.120",
791+ "@jimp/types": "1.6.0",
792+ "@jimp/utils": "1.6.0",
793+ "zod": "^3.23.8"
642794 },
643795 "peerDependenciesengines": {
644796 "@jimp/customnode": ">=0.3.518"
645797 }
646798 },
647799 "node_modules/@jimp/plugin-maskdisplace": {
648800 "version": "01.226.120",
649801 "resolved": "https://registry.npmjs.org/@jimp/plugin-maskdisplace/-/plugin-maskdisplace-01.226.120.tgz",
650802 "integrity": "sha512-4AWZg4Y10X9qwr5F+DomtpUA099jRV8IEZUfn1wLv6Bo5ME356XSACEF55485j5nGdiyJ9hYzjQP9nGgxNJaZ4SAOqpd+nem4NRJC7L/82vxzLCgXKTxvNvBcNmJjT9yS1LAAmiJGdWKXG63/NAk5sFaIeD7SQ0Occ26uIng5Q==",
651803 "license": "MIT",
652804 "dependencies": {
653805 "@jimp/utilstypes": "^01.226.120",
806+ "@jimp/utils": "1.6.0",
807+ "zod": "^3.23.8"
654808 },
655809 "peerDependenciesengines": {
656810 "@jimp/customnode": ">=0.3.518"
657811 }
658812 },
659813 "node_modules/@jimp/plugin-normalizefisheye": {
814+ "version": "1.6.0",
815+ "resolved": "https://registry.npmjs.org/@jimp/plugin-fisheye/-/plugin-fisheye-1.6.0.tgz",
816+ "integrity": "sha512-E5QHKWSCBFtpgZarlmN3Q6+rTQxjirFqo44ohoTjzYVrDI6B6beXNnPIThJgPr0Y9GwfzgyarKvQuQuqCnnfbA==",
817+ "license": "MIT",
818+ "dependencies": {
819+ "@jimp/types": "1.6.0",
820+ "@jimp/utils": "1.6.0",
821+ "zod": "^3.23.8"
822+ },
823+ "engines": {
824+ "node": ">=18"
825+ }
826+ },
827+ "node_modules/@jimp/plugin-flip": {
828+ "version": "1.6.0",
829+ "resolved": "https://registry.npmjs.org/@jimp/plugin-flip/-/plugin-flip-1.6.0.tgz",
830+ "integrity": "sha512-/+rJVDuBIVOgwoyVkBjUFHtP+wmW0r+r5OQ2GpatQofToPVbJw1DdYWXlwviSx7hvixTWLKVgRWQ5Dw862emDg==",
831+ "license": "MIT",
832+ "dependencies": {
833+ "@jimp/types": "1.6.0",
834+ "zod": "^3.23.8"
835+ },
836+ "engines": {
837+ "node": ">=18"
838+ }
839+ },
840+ "node_modules/@jimp/plugin-gaussian": {
660841 "version": "0.22.12",
661842 "resolved": "https://registry.npmjs.org/@jimp/plugin-normalizegaussian/-/plugin-normalizegaussian-0.22.12.tgz",
662843 "integrity": "sha512-0So0rexQivnWgnhacX4cfkM2223YdExnJTTy6d06WbkfZk5alHUx8MM3yEzwoCN0ErO7oyqEWRnEkGCsBfbzoOmJ6FczfG2PquiK84NtVGeScw97JsCC3rpQv1PHVWyW+As1FtAuqWFF53+n3c8Y0P2HWlUjflEla2h/vWShvhg==",
663844 "license": "MIT",
664845 "dependencies": {
665846 "@jimp/utils": "^0.22.12"
@@ -668,24 +849,40 @@
668849 "@jimp/custom": ">=0.3.5"
669850 }
670851 },
671852 "node_modules/@jimp/plugin-printgaussian/node_modules/@jimp/utils": {
672853 "version": "0.22.12",
673854 "resolved": "https://registry.npmjs.org/@jimp/plugin-printutils/-/plugin-printutils-0.22.12.tgz",
674855 "integrity": "sha512-c7TnhHlxm87DJeSnwr/XOLjJU/whoiKYY7r21SbuJ5nuH+7a78EW1teOaj5gEr2wYEd7QtkFqGlmyGXYyJ5cWUknGnilBq97ZXOyOS0HhsHOyAyjHwYfHxGbSyMTohgQI6sVyE8KPgDwH8HHW/YclyQnMKXk8TrSwAE71zt716Q==",
675856 "license": "MIT",
676857 "dependencies": {
677858 "@jimp/utilsregenerator-runtime": "^0.2213.123",
678- "load-bmfont": "^1.4.1"
859+ }
679860 },
680- "peerDependencies": {
861+ "node_modules/@jimp/plugin-hash": {
681862 "@jimp/customversion": ">=01.36.50",
682- "@jimp/plugin-blit": ">=0.3.5"
863+ "resolved": "https://registry.npmjs.org/@jimp/plugin-hash/-/plugin-hash-1.6.0.tgz",
864+ "integrity": "sha512-wWzl0kTpDJgYVbZdajTf+4NBSKvmI3bRI8q6EH9CVeIHps9VWVsUvEyb7rpbcwVLWYuzDtP2R0lTT6WeBNQH9Q==",
865+ "license": "MIT",
866+ "dependencies": {
867+ "@jimp/core": "1.6.0",
868+ "@jimp/js-bmp": "1.6.0",
869+ "@jimp/js-jpeg": "1.6.0",
870+ "@jimp/js-png": "1.6.0",
871+ "@jimp/js-tiff": "1.6.0",
872+ "@jimp/plugin-color": "1.6.0",
873+ "@jimp/plugin-resize": "1.6.0",
874+ "@jimp/types": "1.6.0",
875+ "@jimp/utils": "1.6.0",
876+ "any-base": "^1.1.0"
877+ },
878+ "engines": {
879+ "node": ">=18"
683880 }
684881 },
685882 "node_modules/@jimp/plugin-resizeinvert": {
686883 "version": "0.22.12",
687884 "resolved": "https://registry.npmjs.org/@jimp/plugin-resizeinvert/-/plugin-resizeinvert-0.22.12.tgz",
688885 "integrity": "sha512-3NyTPlPbTnGKDIbaBgQ3HbE6wXbAlFfxHVERmrbqAi8R3r6fQPxpCauA8UVDnieg5eo04D0T8nnnNIXN+6rwxdB+7OCR6PYijaA/iizXXodpxOGvT/ismd/sXglxeXsZ/empHmFFFJ/FaXcYh19Tm04dGDaXcNF/dN5nm6+xQ==",
689886 "license": "MIT",
690887 "dependencies": {
691888 "@jimp/utils": "^0.22.12"
@@ -694,19 +891,91 @@
694891 "@jimp/custom": ">=0.3.5"
695892 }
696893 },
697894 "node_modules/@jimp/plugin-rotateinvert/node_modules/@jimp/utils": {
698895 "version": "0.22.12",
699896 "resolved": "https://registry.npmjs.org/@jimp/plugin-rotateutils/-/plugin-rotateutils-0.22.12.tgz",
700897 "integrity": "sha512-9YNEt7BPAFfTls2FGfKBVgwwLUuKqy+E8bDGGEsOqHtbuhbshVGxN2WMZaD4gh5IDWvR+emmmPPWGgaYNYt1gAyJ5cWUknGnilBq97ZXOyOS0HhsHOyAyjHwYfHxGbSyMTohgQI6sVyE8KPgDwH8HHW/nMKXk8TrSwAE71zt716Q==",
898+ "license": "MIT",
899+ "dependencies": {
900+ "regenerator-runtime": "^0.13.3"
901+ }
902+ },
903+ "node_modules/@jimp/plugin-mask": {
904+ "version": "1.6.0",
905+ "resolved": "https://registry.npmjs.org/@jimp/plugin-mask/-/plugin-mask-1.6.0.tgz",
906+ "integrity": "sha512-Cwy7ExSJMZszvkad8NV8o/Z92X2kFUFM8mcDAhNVxU0Q6tA0op2UKRJY51eoK8r6eds/qak3FQkXakvNabdLnA==",
907+ "license": "MIT",
908+ "dependencies": {
909+ "@jimp/types": "1.6.0",
910+ "zod": "^3.23.8"
911+ },
912+ "engines": {
913+ "node": ">=18"
914+ }
915+ },
916+ "node_modules/@jimp/plugin-normalize": {
917+ "version": "0.22.12",
918+ "resolved": "https://registry.npmjs.org/@jimp/plugin-normalize/-/plugin-normalize-0.22.12.tgz",
919+ "integrity": "sha512-0So0rexQivnWgnhacX4cfkM2223YdExnJTTy6d06WbkfZk5alHUx8MM3yEzwoCN0ErO7oyqEWRnEkGC+As1FtA==",
701920 "license": "MIT",
702921 "dependencies": {
703922 "@jimp/utils": "^0.22.12"
704923 },
705924 "peerDependencies": {
706925 "@jimp/custom": ">=0.3.5",
707- "@jimp/plugin-blit": ">=0.3.5",
926+ }
708- "@jimp/plugin-crop": ">=0.3.5",
927+ },
709- "@jimp/plugin-resize": ">=0.3.5"
928+ "node_modules/@jimp/plugin-normalize/node_modules/@jimp/utils": {
929+ "version": "0.22.12",
930+ "resolved": "https://registry.npmjs.org/@jimp/utils/-/utils-0.22.12.tgz",
931+ "integrity": "sha512-yJ5cWUknGnilBq97ZXOyOS0HhsHOyAyjHwYfHxGbSyMTohgQI6sVyE8KPgDwH8HHW/nMKXk8TrSwAE71zt716Q==",
932+ "license": "MIT",
933+ "dependencies": {
934+ "regenerator-runtime": "^0.13.3"
935+ }
936+ },
937+ "node_modules/@jimp/plugin-quantize": {
938+ "version": "1.6.0",
939+ "resolved": "https://registry.npmjs.org/@jimp/plugin-quantize/-/plugin-quantize-1.6.0.tgz",
940+ "integrity": "sha512-EmzZ/s9StYQwbpG6rUGBCisc3f64JIhSH+ncTJd+iFGtGo0YvSeMdAd+zqgiHpfZoOL54dNavZNjF4otK+mvlg==",
941+ "license": "MIT",
942+ "dependencies": {
943+ "image-q": "^4.0.0",
944+ "zod": "^3.23.8"
945+ },
946+ "engines": {
947+ "node": ">=18"
948+ }
949+ },
950+ "node_modules/@jimp/plugin-resize": {
951+ "version": "1.6.0",
952+ "resolved": "https://registry.npmjs.org/@jimp/plugin-resize/-/plugin-resize-1.6.0.tgz",
953+ "integrity": "sha512-uSUD1mqXN9i1SGSz5ov3keRZ7S9L32/mAQG08wUwZiEi5FpbV0K8A8l1zkazAIZi9IJzLlTauRNU41Mi8IF9fA==",
954+ "license": "MIT",
955+ "dependencies": {
956+ "@jimp/core": "1.6.0",
957+ "@jimp/types": "1.6.0",
958+ "zod": "^3.23.8"
959+ },
960+ "engines": {
961+ "node": ">=18"
962+ }
963+ },
964+ "node_modules/@jimp/plugin-rotate": {
965+ "version": "1.6.0",
966+ "resolved": "https://registry.npmjs.org/@jimp/plugin-rotate/-/plugin-rotate-1.6.0.tgz",
967+ "integrity": "sha512-JagdjBLnUZGSG4xjCLkIpQOZZ3Mjbg8aGCCi4G69qR+OjNpOeGI7N2EQlfK/WE8BEHOW5vdjSyglNqcYbQBWRw==",
968+ "license": "MIT",
969+ "dependencies": {
970+ "@jimp/core": "1.6.0",
971+ "@jimp/plugin-crop": "1.6.0",
972+ "@jimp/plugin-resize": "1.6.0",
973+ "@jimp/types": "1.6.0",
974+ "@jimp/utils": "1.6.0",
975+ "zod": "^3.23.8"
976+ },
977+ "engines": {
978+ "node": ">=18"
710979 }
711980 },
712981 "node_modules/@jimp/plugin-scale": {
@@ -722,6 +991,15 @@
722991 "@jimp/plugin-resize": ">=0.3.5"
723992 }
724993 },
994+ "node_modules/@jimp/plugin-scale/node_modules/@jimp/utils": {
995+ "version": "0.22.12",
996+ "resolved": "https://registry.npmjs.org/@jimp/utils/-/utils-0.22.12.tgz",
997+ "integrity": "sha512-yJ5cWUknGnilBq97ZXOyOS0HhsHOyAyjHwYfHxGbSyMTohgQI6sVyE8KPgDwH8HHW/nMKXk8TrSwAE71zt716Q==",
998+ "license": "MIT",
999+ "dependencies": {
1000+ "regenerator-runtime": "^0.13.3"
1001+ }
1002+ },
7251003 "node_modules/@jimp/plugin-shadow": {
7261004 "version": "0.22.12",
7271005 "resolved": "https://registry.npmjs.org/@jimp/plugin-shadow/-/plugin-shadow-0.22.12.tgz",
@@ -736,18 +1014,30 @@
7361014 "@jimp/plugin-resize": ">=0.3.5"
7371015 }
7381016 },
7391017 "node_modules/@jimp/plugin-thresholdshadow/node_modules/@jimp/utils": {
7401018 "version": "0.22.12",
7411019 "resolved": "https://registry.npmjs.org/@jimp/plugin-thresholdutils/-/plugin-thresholdutils-0.22.12.tgz",
7421020 "integrity": "sha512-4x5GrQr1a/9L0paBC/MZZJjjgjxLYrqSmWd+e+QfAEPvmRxdRoQ5uKEuNgXnm9yJ5cWUknGnilBq97ZXOyOS0HhsHOyAyjHwYfHxGbSyMTohgQI6sVyE8KPgDwH8HHW/weHQBTnQBQsOY2iFja+XGAwnMKXk8TrSwAE71zt716Q==",
7431021 "license": "MIT",
7441022 "dependencies": {
7451023 "@jimp/utilsregenerator-runtime": "^0.2213.123"
1024+ }
7461025 },
747- "peerDependencies": {
1026+ "node_modules/@jimp/plugin-threshold": {
7481027 "@jimp/customversion": ">=01.36.50",
749- "@jimp/plugin-color": ">=0.8.0",
1028+ "resolved": "https://registry.npmjs.org/@jimp/plugin-threshold/-/plugin-threshold-1.6.0.tgz",
750- "@jimp/plugin-resize": ">=0.8.0"
1029+ "integrity": "sha512-M59m5dzLoHOVWdM41O8z9SyySzcDn43xHseOH0HavjsfQsT56GGCC4QzU1banJidbUrePhzoEdS42uFE8Fei8w==",
1030+ "license": "MIT",
1031+ "dependencies": {
1032+ "@jimp/core": "1.6.0",
1033+ "@jimp/plugin-color": "1.6.0",
1034+ "@jimp/plugin-hash": "1.6.0",
1035+ "@jimp/types": "1.6.0",
1036+ "@jimp/utils": "1.6.0",
1037+ "zod": "^3.23.8"
1038+ },
1039+ "engines": {
1040+ "node": ">=18"
7511041 }
7521042 },
7531043 "node_modules/@jimp/plugins": {
@@ -783,6 +1073,222 @@
7831073 "@jimp/custom": ">=0.3.5"
7841074 }
7851075 },
1076+ "node_modules/@jimp/plugins/node_modules/@jimp/plugin-blit": {
1077+ "version": "0.22.12",
1078+ "resolved": "https://registry.npmjs.org/@jimp/plugin-blit/-/plugin-blit-0.22.12.tgz",
1079+ "integrity": "sha512-xslz2ZoFZOPLY8EZ4dC29m168BtDx95D6K80TzgUi8gqT7LY6CsajWO0FAxDwHz6h0eomHMfyGX0stspBrTKnQ==",
1080+ "license": "MIT",
1081+ "dependencies": {
1082+ "@jimp/utils": "^0.22.12"
1083+ },
1084+ "peerDependencies": {
1085+ "@jimp/custom": ">=0.3.5"
1086+ }
1087+ },
1088+ "node_modules/@jimp/plugins/node_modules/@jimp/plugin-blur": {
1089+ "version": "0.22.12",
1090+ "resolved": "https://registry.npmjs.org/@jimp/plugin-blur/-/plugin-blur-0.22.12.tgz",
1091+ "integrity": "sha512-S0vJADTuh1Q9F+cXAwFPlrKWzDj2F9t/9JAbUvaaDuivpyWuImEKXVz5PUZw2NbpuSHjwssbTpOZ8F13iJX4uw==",
1092+ "license": "MIT",
1093+ "dependencies": {
1094+ "@jimp/utils": "^0.22.12"
1095+ },
1096+ "peerDependencies": {
1097+ "@jimp/custom": ">=0.3.5"
1098+ }
1099+ },
1100+ "node_modules/@jimp/plugins/node_modules/@jimp/plugin-circle": {
1101+ "version": "0.22.12",
1102+ "resolved": "https://registry.npmjs.org/@jimp/plugin-circle/-/plugin-circle-0.22.12.tgz",
1103+ "integrity": "sha512-SWVXx1yiuj5jZtMijqUfvVOJBwOifFn0918ou4ftoHgegc5aHWW5dZbYPjvC9fLpvz7oSlptNl2Sxr1zwofjTg==",
1104+ "license": "MIT",
1105+ "dependencies": {
1106+ "@jimp/utils": "^0.22.12"
1107+ },
1108+ "peerDependencies": {
1109+ "@jimp/custom": ">=0.3.5"
1110+ }
1111+ },
1112+ "node_modules/@jimp/plugins/node_modules/@jimp/plugin-color": {
1113+ "version": "0.22.12",
1114+ "resolved": "https://registry.npmjs.org/@jimp/plugin-color/-/plugin-color-0.22.12.tgz",
1115+ "integrity": "sha512-xImhTE5BpS8xa+mAN6j4sMRWaUgUDLoaGHhJhpC+r7SKKErYDR0WQV4yCE4gP+N0gozD0F3Ka1LUSaMXrn7ZIA==",
1116+ "license": "MIT",
1117+ "dependencies": {
1118+ "@jimp/utils": "^0.22.12",
1119+ "tinycolor2": "^1.6.0"
1120+ },
1121+ "peerDependencies": {
1122+ "@jimp/custom": ">=0.3.5"
1123+ }
1124+ },
1125+ "node_modules/@jimp/plugins/node_modules/@jimp/plugin-contain": {
1126+ "version": "0.22.12",
1127+ "resolved": "https://registry.npmjs.org/@jimp/plugin-contain/-/plugin-contain-0.22.12.tgz",
1128+ "integrity": "sha512-Eo3DmfixJw3N79lWk8q/0SDYbqmKt1xSTJ69yy8XLYQj9svoBbyRpSnHR+n9hOw5pKXytHwUW6nU4u1wegHNoQ==",
1129+ "license": "MIT",
1130+ "dependencies": {
1131+ "@jimp/utils": "^0.22.12"
1132+ },
1133+ "peerDependencies": {
1134+ "@jimp/custom": ">=0.3.5",
1135+ "@jimp/plugin-blit": ">=0.3.5",
1136+ "@jimp/plugin-resize": ">=0.3.5",
1137+ "@jimp/plugin-scale": ">=0.3.5"
1138+ }
1139+ },
1140+ "node_modules/@jimp/plugins/node_modules/@jimp/plugin-cover": {
1141+ "version": "0.22.12",
1142+ "resolved": "https://registry.npmjs.org/@jimp/plugin-cover/-/plugin-cover-0.22.12.tgz",
1143+ "integrity": "sha512-z0w/1xH/v/knZkpTNx+E8a7fnasQ2wHG5ze6y5oL2dhH1UufNua8gLQXlv8/W56+4nJ1brhSd233HBJCo01BXA==",
1144+ "license": "MIT",
1145+ "dependencies": {
1146+ "@jimp/utils": "^0.22.12"
1147+ },
1148+ "peerDependencies": {
1149+ "@jimp/custom": ">=0.3.5",
1150+ "@jimp/plugin-crop": ">=0.3.5",
1151+ "@jimp/plugin-resize": ">=0.3.5",
1152+ "@jimp/plugin-scale": ">=0.3.5"
1153+ }
1154+ },
1155+ "node_modules/@jimp/plugins/node_modules/@jimp/plugin-crop": {
1156+ "version": "0.22.12",
1157+ "resolved": "https://registry.npmjs.org/@jimp/plugin-crop/-/plugin-crop-0.22.12.tgz",
1158+ "integrity": "sha512-FNuUN0OVzRCozx8XSgP9MyLGMxNHHJMFt+LJuFjn1mu3k0VQxrzqbN06yIl46TVejhyAhcq5gLzqmSCHvlcBVw==",
1159+ "license": "MIT",
1160+ "dependencies": {
1161+ "@jimp/utils": "^0.22.12"
1162+ },
1163+ "peerDependencies": {
1164+ "@jimp/custom": ">=0.3.5"
1165+ }
1166+ },
1167+ "node_modules/@jimp/plugins/node_modules/@jimp/plugin-displace": {
1168+ "version": "0.22.12",
1169+ "resolved": "https://registry.npmjs.org/@jimp/plugin-displace/-/plugin-displace-0.22.12.tgz",
1170+ "integrity": "sha512-qpRM8JRicxfK6aPPqKZA6+GzBwUIitiHaZw0QrJ64Ygd3+AsTc7BXr+37k2x7QcyCvmKXY4haUrSIsBug4S3CA==",
1171+ "license": "MIT",
1172+ "dependencies": {
1173+ "@jimp/utils": "^0.22.12"
1174+ },
1175+ "peerDependencies": {
1176+ "@jimp/custom": ">=0.3.5"
1177+ }
1178+ },
1179+ "node_modules/@jimp/plugins/node_modules/@jimp/plugin-dither": {
1180+ "version": "0.22.12",
1181+ "resolved": "https://registry.npmjs.org/@jimp/plugin-dither/-/plugin-dither-0.22.12.tgz",
1182+ "integrity": "sha512-jYgGdSdSKl1UUEanX8A85v4+QUm+PE8vHFwlamaKk89s+PXQe7eVE3eNeSZX4inCq63EHL7cX580dMqkoC3ZLw==",
1183+ "license": "MIT",
1184+ "dependencies": {
1185+ "@jimp/utils": "^0.22.12"
1186+ },
1187+ "peerDependencies": {
1188+ "@jimp/custom": ">=0.3.5"
1189+ }
1190+ },
1191+ "node_modules/@jimp/plugins/node_modules/@jimp/plugin-fisheye": {
1192+ "version": "0.22.12",
1193+ "resolved": "https://registry.npmjs.org/@jimp/plugin-fisheye/-/plugin-fisheye-0.22.12.tgz",
1194+ "integrity": "sha512-LGuUTsFg+fOp6KBKrmLkX4LfyCy8IIsROwoUvsUPKzutSqMJnsm3JGDW2eOmWIS/jJpPaeaishjlxvczjgII+Q==",
1195+ "license": "MIT",
1196+ "dependencies": {
1197+ "@jimp/utils": "^0.22.12"
1198+ },
1199+ "peerDependencies": {
1200+ "@jimp/custom": ">=0.3.5"
1201+ }
1202+ },
1203+ "node_modules/@jimp/plugins/node_modules/@jimp/plugin-flip": {
1204+ "version": "0.22.12",
1205+ "resolved": "https://registry.npmjs.org/@jimp/plugin-flip/-/plugin-flip-0.22.12.tgz",
1206+ "integrity": "sha512-m251Rop7GN8W0Yo/rF9LWk6kNclngyjIJs/VXHToGQ6EGveOSTSQaX2Isi9f9lCDLxt+inBIb7nlaLLxnvHX8Q==",
1207+ "license": "MIT",
1208+ "dependencies": {
1209+ "@jimp/utils": "^0.22.12"
1210+ },
1211+ "peerDependencies": {
1212+ "@jimp/custom": ">=0.3.5",
1213+ "@jimp/plugin-rotate": ">=0.3.5"
1214+ }
1215+ },
1216+ "node_modules/@jimp/plugins/node_modules/@jimp/plugin-mask": {
1217+ "version": "0.22.12",
1218+ "resolved": "https://registry.npmjs.org/@jimp/plugin-mask/-/plugin-mask-0.22.12.tgz",
1219+ "integrity": "sha512-4AWZg+DomtpUA099jRV8IEZUfn1wLv6+nem4NRJC7L/82vxzLCgXKTxvNvBcNmJjT9yS1LAAmiJGdWKXG63/NA==",
1220+ "license": "MIT",
1221+ "dependencies": {
1222+ "@jimp/utils": "^0.22.12"
1223+ },
1224+ "peerDependencies": {
1225+ "@jimp/custom": ">=0.3.5"
1226+ }
1227+ },
1228+ "node_modules/@jimp/plugins/node_modules/@jimp/plugin-print": {
1229+ "version": "0.22.12",
1230+ "resolved": "https://registry.npmjs.org/@jimp/plugin-print/-/plugin-print-0.22.12.tgz",
1231+ "integrity": "sha512-c7TnhHlxm87DJeSnwr/XOLjJU/whoiKYY7r21SbuJ5nuH+7a78EW1teOaj5gEr2wYEd7QtkFqGlmyGXY/YclyQ==",
1232+ "license": "MIT",
1233+ "dependencies": {
1234+ "@jimp/utils": "^0.22.12",
1235+ "load-bmfont": "^1.4.1"
1236+ },
1237+ "peerDependencies": {
1238+ "@jimp/custom": ">=0.3.5",
1239+ "@jimp/plugin-blit": ">=0.3.5"
1240+ }
1241+ },
1242+ "node_modules/@jimp/plugins/node_modules/@jimp/plugin-resize": {
1243+ "version": "0.22.12",
1244+ "resolved": "https://registry.npmjs.org/@jimp/plugin-resize/-/plugin-resize-0.22.12.tgz",
1245+ "integrity": "sha512-3NyTPlPbTnGKDIbaBgQ3HbE6wXbAlFfxHVERmrbqAi8R3r6fQPxpCauA8UVDnieg5eo04D0T8nnnNIX//i/sXg==",
1246+ "license": "MIT",
1247+ "dependencies": {
1248+ "@jimp/utils": "^0.22.12"
1249+ },
1250+ "peerDependencies": {
1251+ "@jimp/custom": ">=0.3.5"
1252+ }
1253+ },
1254+ "node_modules/@jimp/plugins/node_modules/@jimp/plugin-rotate": {
1255+ "version": "0.22.12",
1256+ "resolved": "https://registry.npmjs.org/@jimp/plugin-rotate/-/plugin-rotate-0.22.12.tgz",
1257+ "integrity": "sha512-9YNEt7BPAFfTls2FGfKBVgwwLUuKqy+E8bDGGEsOqHtbuhbshVGxN2WMZaD4gh5IDWvR+emmmPPWGgaYNYt1gA==",
1258+ "license": "MIT",
1259+ "dependencies": {
1260+ "@jimp/utils": "^0.22.12"
1261+ },
1262+ "peerDependencies": {
1263+ "@jimp/custom": ">=0.3.5",
1264+ "@jimp/plugin-blit": ">=0.3.5",
1265+ "@jimp/plugin-crop": ">=0.3.5",
1266+ "@jimp/plugin-resize": ">=0.3.5"
1267+ }
1268+ },
1269+ "node_modules/@jimp/plugins/node_modules/@jimp/plugin-threshold": {
1270+ "version": "0.22.12",
1271+ "resolved": "https://registry.npmjs.org/@jimp/plugin-threshold/-/plugin-threshold-0.22.12.tgz",
1272+ "integrity": "sha512-4x5GrQr1a/9L0paBC/MZZJjjgjxLYrqSmWd+e+QfAEPvmRxdRoQ5uKEuNgXnm9/weHQBTnQBQsOY2iFja+XGAw==",
1273+ "license": "MIT",
1274+ "dependencies": {
1275+ "@jimp/utils": "^0.22.12"
1276+ },
1277+ "peerDependencies": {
1278+ "@jimp/custom": ">=0.3.5",
1279+ "@jimp/plugin-color": ">=0.8.0",
1280+ "@jimp/plugin-resize": ">=0.8.0"
1281+ }
1282+ },
1283+ "node_modules/@jimp/plugins/node_modules/@jimp/utils": {
1284+ "version": "0.22.12",
1285+ "resolved": "https://registry.npmjs.org/@jimp/utils/-/utils-0.22.12.tgz",
1286+ "integrity": "sha512-yJ5cWUknGnilBq97ZXOyOS0HhsHOyAyjHwYfHxGbSyMTohgQI6sVyE8KPgDwH8HHW/nMKXk8TrSwAE71zt716Q==",
1287+ "license": "MIT",
1288+ "dependencies": {
1289+ "regenerator-runtime": "^0.13.3"
1290+ }
1291+ },
7861292 "node_modules/@jimp/png": {
7871293 "version": "0.22.12",
7881294 "resolved": "https://registry.npmjs.org/@jimp/png/-/png-0.22.12.tgz",
@@ -796,6 +1302,24 @@
7961302 "@jimp/custom": ">=0.3.5"
7971303 }
7981304 },
1305+ "node_modules/@jimp/png/node_modules/@jimp/utils": {
1306+ "version": "0.22.12",
1307+ "resolved": "https://registry.npmjs.org/@jimp/utils/-/utils-0.22.12.tgz",
1308+ "integrity": "sha512-yJ5cWUknGnilBq97ZXOyOS0HhsHOyAyjHwYfHxGbSyMTohgQI6sVyE8KPgDwH8HHW/nMKXk8TrSwAE71zt716Q==",
1309+ "license": "MIT",
1310+ "dependencies": {
1311+ "regenerator-runtime": "^0.13.3"
1312+ }
1313+ },
1314+ "node_modules/@jimp/png/node_modules/pngjs": {
1315+ "version": "6.0.0",
1316+ "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-6.0.0.tgz",
1317+ "integrity": "sha512-TRzzuFRRmEoSW/p1KVAmiOgPco2Irlah+bGFCeNfJXxxYGwSw7YwAOAcd7X28K/m5bjBWKsC29KyoMfHbypayg==",
1318+ "license": "MIT",
1319+ "engines": {
1320+ "node": ">=12.13.0"
1321+ }
1322+ },
7991323 "node_modules/@jimp/tiff": {
8001324 "version": "0.22.12",
8011325 "resolved": "https://registry.npmjs.org/@jimp/tiff/-/tiff-0.22.12.tgz",
@@ -809,29 +1333,81 @@
8091333 }
8101334 },
8111335 "node_modules/@jimp/types": {
8121336 "version": "01.226.120",
8131337 "resolved": "https://registry.npmjs.org/@jimp/types/-/types-01.226.120.tgz",
8141338 "integrity": "sha512-wwKYzRdElE1MBXFREvCto5s699izFHNVvALUv79GXNbsOVqlwlOxlWJ8DuyOGIXoLP4JW/m30YyuTtfUJgMRMA7UfRsiKo5GZTAATxm2qQ7jqmUXP0DxTArztllTcYdyw6Xi5oT4RaoXynVtCD4UyLK5gJgkZJcwonoijrhYFKfg==",
8151339 "license": "MIT",
8161340 "dependencies": {
8171341 "@jimp/bmpzod": "^03.2223.128",
818- "@jimp/gif": "^0.22.12",
819- "@jimp/jpeg": "^0.22.12",
820- "@jimp/png": "^0.22.12",
821- "@jimp/tiff": "^0.22.12",
822- "timm": "^1.6.1"
8231342 },
8241343 "peerDependenciesengines": {
8251344 "@jimp/customnode": ">=0.3.518"
8261345 }
8271346 },
8281347 "node_modules/@jimp/utils": {
8291348 "version": "01.226.120",
8301349 "resolved": "https://registry.npmjs.org/@jimp/utils/-/utils-01.226.120.tgz",
8311350 "integrity": "sha512-yJ5cWUknGnilBq97ZXOyOS0HhsHOyAyjHwYfHxGbSyMTohgQI6sVyE8KPgDwH8HHWgqFTGEosKbOkYF/nMKXk8TrSwAE71zt716QWFj26jMHOI5OH2jeP1MmC/zbK6BF6VJBf8rIC5898dPfSzZEbSA0wbbV5slbntWVc5PKLFA==",
8321351 "license": "MIT",
8331352 "dependencies": {
8341353 "regenerator-runtime@jimp/types": "^01.136.30",
1354+ "tinycolor2": "^1.6.0"
1355+ },
1356+ "engines": {
1357+ "node": ">=18"
1358+ }
1359+ },
1360+ "node_modules/@jimp/wasm-avif": {
1361+ "version": "1.6.0",
1362+ "resolved": "https://registry.npmjs.org/@jimp/wasm-avif/-/wasm-avif-1.6.0.tgz",
1363+ "integrity": "sha512-OjiqqtD71MTLVQgB/oUOZ8PD+nxLQtl/Lyf/P/hhL56L6iCJbcciA3xO0Y9OJept7+R34ORY4f7RwWwt535DHg==",
1364+ "license": "MIT",
1365+ "dependencies": {
1366+ "@jsquash/avif": "^1.3.0",
1367+ "zod": "^3.23.8"
1368+ },
1369+ "engines": {
1370+ "node": ">=18"
1371+ }
1372+ },
1373+ "node_modules/@jimp/wasm-jpeg": {
1374+ "version": "1.6.0",
1375+ "resolved": "https://registry.npmjs.org/@jimp/wasm-jpeg/-/wasm-jpeg-1.6.0.tgz",
1376+ "integrity": "sha512-zURjiESa79XXpMHzvvLMD3RC+wzFevS8lcTgyoZq4/y7qE5WrrUTWUBhr1UMFDueQ4gmOUf6EZ8L3/jkS/6nKQ==",
1377+ "license": "MIT",
1378+ "dependencies": {
1379+ "@jsquash/jpeg": "^1.4.0",
1380+ "zod": "^3.23.8"
1381+ },
1382+ "engines": {
1383+ "node": ">=18"
1384+ }
1385+ },
1386+ "node_modules/@jimp/wasm-png": {
1387+ "version": "1.6.0",
1388+ "resolved": "https://registry.npmjs.org/@jimp/wasm-png/-/wasm-png-1.6.0.tgz",
1389+ "integrity": "sha512-D1xTVXpErApFH4YiOWZDoF8S8B6I3PgoCe38WsnTxDLfple8KGZMBdNjv3UO7vczsdlg5rATwWMBbNwxK03jNQ==",
1390+ "license": "MIT",
1391+ "dependencies": {
1392+ "@jsquash/oxipng": "^2.3.0",
1393+ "@jsquash/png": "^3.0.1",
1394+ "zod": "^3.23.8"
1395+ },
1396+ "engines": {
1397+ "node": ">=18"
1398+ }
1399+ },
1400+ "node_modules/@jimp/wasm-webp": {
1401+ "version": "1.6.0",
1402+ "resolved": "https://registry.npmjs.org/@jimp/wasm-webp/-/wasm-webp-1.6.0.tgz",
1403+ "integrity": "sha512-P0zUpK6n2XIAn8bt0F6rhSn1+FgteBTrL+TBb6Oqw8v5qEDJoNYkd6LlfZYN8YwtRBTBdZ8GFnWsg2Sar+qOkA==",
1404+ "license": "MIT",
1405+ "dependencies": {
1406+ "@jsquash/webp": "^1.4.0",
1407+ "zod": "^3.23.8"
1408+ },
1409+ "engines": {
1410+ "node": ">=18"
8351411 }
8361412 },
8371413 "node_modules/@jridgewell/gen-mapping": {
@@ -892,6 +1468,45 @@
8921468 "@jridgewell/sourcemap-codec": "^1.4.14"
8931469 }
8941470 },
1471+ "node_modules/@jsquash/avif": {
1472+ "version": "1.3.0",
1473+ "resolved": "https://registry.npmjs.org/@jsquash/avif/-/avif-1.3.0.tgz",
1474+ "integrity": "sha512-N6zH27O/AioCPNGxaf33PYnUEQZmAjUz0JwwAf9eMHRdYItn+CxwxlsHSSOkFmZKW+v9uVX6c7ZPQ4RTXArL7A==",
1475+ "license": "Apache-2.0",
1476+ "dependencies": {
1477+ "wasm-feature-detect": "^1.2.11"
1478+ }
1479+ },
1480+ "node_modules/@jsquash/jpeg": {
1481+ "version": "1.5.0",
1482+ "resolved": "https://registry.npmjs.org/@jsquash/jpeg/-/jpeg-1.5.0.tgz",
1483+ "integrity": "sha512-Jam3X9BhbP1f+d58TfYobV/ZpYhCnawBF7YMS0Vt5Gi1v5Rk+xUdqYiZarAn0PwAzy2Zm2pPU/VzXHsLhwT9QQ==",
1484+ "license": "Apache-2.0"
1485+ },
1486+ "node_modules/@jsquash/oxipng": {
1487+ "version": "2.3.0",
1488+ "resolved": "https://registry.npmjs.org/@jsquash/oxipng/-/oxipng-2.3.0.tgz",
1489+ "integrity": "sha512-aQ8wiEp6ztlTMXc+RMt/CG8crU3mEHDU+h+JYkIi6ctMhlh8+Ltj5XwQFfBuyzKYrp8NxaFW80Dp824bqjr+zA==",
1490+ "license": "Apache-2.0",
1491+ "dependencies": {
1492+ "wasm-feature-detect": "^1.2.11"
1493+ }
1494+ },
1495+ "node_modules/@jsquash/png": {
1496+ "version": "3.0.1",
1497+ "resolved": "https://registry.npmjs.org/@jsquash/png/-/png-3.0.1.tgz",
1498+ "integrity": "sha512-Bnvv93Y5LL92cuk2r2gpV+9JKuDo2/w7bOODw1iPxk8VARknky0sS1tSDgMosUdhNb4CdMlcCm3TMzTaqa3zZw==",
1499+ "license": "Apache-2.0"
1500+ },
1501+ "node_modules/@jsquash/webp": {
1502+ "version": "1.4.0",
1503+ "resolved": "https://registry.npmjs.org/@jsquash/webp/-/webp-1.4.0.tgz",
1504+ "integrity": "sha512-yKJb6Hilq+qV/4C4qTDEalBobNwJO09LeHHtilmWg5mYHFUDwMunfeAap/r3cL5KsHkGOoI0IjY2nKbTaHq9Bw==",
1505+ "license": "Apache-2.0",
1506+ "dependencies": {
1507+ "wasm-feature-detect": "^1.2.11"
1508+ }
1509+ },
8951510 "node_modules/@kwsites/file-exists": {
8961511 "version": "1.1.1",
8971512 "resolved": "https://registry.npmjs.org/@kwsites/file-exists/-/file-exists-1.1.1.tgz",
@@ -1955,29 +2570,6 @@
19552570 "balanced-match": "^1.0.0"
19562571 }
19572572 },
1958- "node_modules/archiver-utils/node_modules/buffer": {
1959- "version": "6.0.3",
1960- "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
1961- "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
1962- "funding": [
1963- {
1964- "type": "github",
1965- "url": "https://github.com/sponsors/feross"
1966- },
1967- {
1968- "type": "patreon",
1969- "url": "https://www.patreon.com/feross"
1970- },
1971- {
1972- "type": "consulting",
1973- "url": "https://feross.org/support"
1974- }
1975- ],
1976- "dependencies": {
1977- "base64-js": "^1.3.1",
1978- "ieee754": "^1.2.1"
1979- }
1980- },
19812573 "node_modules/archiver-utils/node_modules/glob": {
19822574 "version": "10.3.12",
19832575 "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.12.tgz",
@@ -2055,29 +2647,6 @@
20552647 "safe-buffer": "~5.2.0"
20562648 }
20572649 },
2058- "node_modules/archiver/node_modules/buffer": {
2059- "version": "6.0.3",
2060- "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
2061- "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
2062- "funding": [
2063- {
2064- "type": "github",
2065- "url": "https://github.com/sponsors/feross"
2066- },
2067- {
2068- "type": "patreon",
2069- "url": "https://www.patreon.com/feross"
2070- },
2071- {
2072- "type": "consulting",
2073- "url": "https://feross.org/support"
2074- }
2075- ],
2076- "dependencies": {
2077- "base64-js": "^1.3.1",
2078- "ieee754": "^1.2.1"
2079- }
2080- },
20812650 "node_modules/archiver/node_modules/buffer-crc32": {
20822651 "version": "1.0.0",
20832652 "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-1.0.0.tgz",
@@ -2174,6 +2743,15 @@
21742743 "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
21752744 "license": "MIT"
21762745 },
2746+ "node_modules/await-to-js": {
2747+ "version": "3.0.0",
2748+ "resolved": "https://registry.npmjs.org/await-to-js/-/await-to-js-3.0.0.tgz",
2749+ "integrity": "sha512-zJAaP9zxTcvTHRlejau3ZOY4V7SRpiByf3/dxx2uyKxxor19tpmpV2QRsTKikckwhaPmr2dVpxxMr7jOCYVp5g==",
2750+ "license": "MIT",
2751+ "engines": {
2752+ "node": ">=6.0.0"
2753+ }
2754+ },
21772755 "node_modules/axios": {
21782756 "version": "1.8.3",
21792757 "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.3.tgz",
@@ -2251,6 +2829,12 @@
22512829 "integrity": "sha512-vHdS19CnY3hwiNdkaqk93DvjVLfbEcI8mys4UjuWrlX1haDmroo8o4xCzh4wD6DGV6HxRCyauwhHRqMTfERtjw==",
22522830 "license": "MIT"
22532831 },
2832+ "node_modules/bmp-ts": {
2833+ "version": "1.0.9",
2834+ "resolved": "https://registry.npmjs.org/bmp-ts/-/bmp-ts-1.0.9.tgz",
2835+ "integrity": "sha512-cTEHk2jLrPyi+12M3dhpEbnnPOsaZuq7C45ylbbQIiWgDFZq4UVYPEY5mlqjvsj/6gJv9qX5sa+ebDzLXT28Vw==",
2836+ "license": "MIT"
2837+ },
22542838 "node_modules/body-parser": {
22552839 "version": "1.20.3",
22562840 "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz",
@@ -2343,9 +2927,9 @@
23432927 }
23442928 },
23452929 "node_modules/buffer": {
23462930 "version": "56.70.13",
23472931 "resolved": "https://registry.npmjs.org/buffer/-/buffer-56.70.13.tgz",
23482932 "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHYFTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQpDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
23492933 "funding": [
23502934 {
23512935 "type": "github",
@@ -2363,7 +2947,7 @@
23632947 "license": "MIT",
23642948 "dependencies": {
23652949 "base64-js": "^1.3.1",
23662950 "ieee754": "^1.12.131"
23672951 }
23682952 },
23692953 "node_modules/buffer-crc32": {
@@ -2678,29 +3262,6 @@
26783262 "node": ">= 14"
26793263 }
26803264 },
2681- "node_modules/compress-commons/node_modules/buffer": {
2682- "version": "6.0.3",
2683- "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
2684- "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
2685- "funding": [
2686- {
2687- "type": "github",
2688- "url": "https://github.com/sponsors/feross"
2689- },
2690- {
2691- "type": "patreon",
2692- "url": "https://www.patreon.com/feross"
2693- },
2694- {
2695- "type": "consulting",
2696- "url": "https://feross.org/support"
2697- }
2698- ],
2699- "dependencies": {
2700- "base64-js": "^1.3.1",
2701- "ieee754": "^1.2.1"
2702- }
2703- },
27043265 "node_modules/compress-commons/node_modules/crc-32": {
27053266 "version": "1.2.2",
27063267 "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz",
@@ -3002,29 +3563,6 @@
30023563 "node": ">= 14"
30033564 }
30043565 },
3005- "node_modules/crc32-stream/node_modules/buffer": {
3006- "version": "6.0.3",
3007- "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
3008- "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
3009- "funding": [
3010- {
3011- "type": "github",
3012- "url": "https://github.com/sponsors/feross"
3013- },
3014- {
3015- "type": "patreon",
3016- "url": "https://www.patreon.com/feross"
3017- },
3018- {
3019- "type": "consulting",
3020- "url": "https://feross.org/support"
3021- }
3022- ],
3023- "dependencies": {
3024- "base64-js": "^1.3.1",
3025- "ieee754": "^1.2.1"
3026- }
3027- },
30283566 "node_modules/crc32-stream/node_modules/crc-32": {
30293567 "version": "1.2.2",
30303568 "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz",
@@ -5090,18 +5628,6 @@
50905628 "url": "https://github.com/chalk/supports-color?sponsor=1"
50915629 }
50925630 },
5093- "node_modules/jimp": {
5094- "version": "0.22.12",
5095- "resolved": "https://registry.npmjs.org/jimp/-/jimp-0.22.12.tgz",
5096- "integrity": "sha512-R5jZaYDnfkxKJy1dwLpj/7cvyjxiclxU3F4TrI/J4j2rS0niq6YDUMoPn5hs8GDpO+OZGo7Ky057CRtWesyhfg==",
5097- "license": "MIT",
5098- "dependencies": {
5099- "@jimp/custom": "^0.22.12",
5100- "@jimp/plugins": "^0.22.12",
5101- "@jimp/types": "^0.22.12",
5102- "regenerator-runtime": "^0.13.3"
5103- }
5104- },
51055631 "node_modules/jpeg-js": {
51065632 "version": "0.4.4",
51075633 "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.4.tgz",
@@ -6008,9 +6534,9 @@
60086534 }
60096535 },
60106536 "node_modules/parse-headers": {
60116537 "version": "2.0.56",
60126538 "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.56.tgz",
60136539 "integrity": "sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1ZauTz11t3uKztEW5FEVZnj1ox8GKblWn+PvHY9TmJV5Mll2uHEwRdR/HwI75HA5Li1OlXoECjLYkApdhWy44ocONwXLiKO5A==",
60146540 "license": "MIT"
60156541 },
60166542 "node_modules/parse-imports": {
@@ -6148,27 +6674,6 @@
61486674 "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==",
61496675 "license": "ISC"
61506676 },
6151- "node_modules/pixelmatch": {
6152- "version": "4.0.2",
6153- "resolved": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-4.0.2.tgz",
6154- "integrity": "sha512-J8B6xqiO37sU/gkcMglv6h5Jbd9xNER7aHzpfRdNmV4IbQBzBpe4l9XmbG+xPF/znacgu2jfEw+wHffaq/YkXA==",
6155- "license": "ISC",
6156- "dependencies": {
6157- "pngjs": "^3.0.0"
6158- },
6159- "bin": {
6160- "pixelmatch": "bin/pixelmatch"
6161- }
6162- },
6163- "node_modules/pixelmatch/node_modules/pngjs": {
6164- "version": "3.4.0",
6165- "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz",
6166- "integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==",
6167- "license": "MIT",
6168- "engines": {
6169- "node": ">=4.0.0"
6170- }
6171- },
61726677 "node_modules/platform": {
61736678 "version": "1.3.6",
61746679 "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz",
@@ -6201,12 +6706,12 @@
62016706 }
62026707 },
62036708 "node_modules/pngjs": {
62046709 "version": "67.0.0",
62056710 "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-67.0.0.tgz",
62066711 "integrity": "sha512-TRzzuFRRmEoSW/p1KVAmiOgPco2Irlah+bGFCeNfJXxxYGwSw7YwAOAcd7X28KLKWqWJRhstyYo9pGvgor/m5bjBWKsC29KyoMfHbypaygivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow==",
62076712 "license": "MIT",
62086713 "engines": {
62096714 "node": ">=1214.1319.0"
62106715 }
62116716 },
62126717 "node_modules/prelude-ls": {
@@ -6478,12 +6983,12 @@
64786983 }
64796984 },
64806985 "node_modules/readable-web-to-node-stream": {
64816986 "version": "3.0.24",
64826987 "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.24.tgz",
64836988 "integrity": "sha512-ePeK6cc1EcKLEhJFt9nX56alTf5bwXQ3ZDipHJhusu9NTQJ/AebMCLL+GgSKhuygrZCVPtb/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGwXHAJCXihZeitfJvIRS4GqQ/mfIoOE3IelHMrpayVrosdHBuLw==",
64846989 "license": "MIT",
64856990 "dependencies": {
64866991 "readable-stream": "^34.67.0"
64876992 },
64886993 "engines": {
64896994 "node": ">=8"
@@ -6494,17 +6999,48 @@
64946999 }
64957000 },
64967001 "node_modules/readable-web-to-node-stream/node_modules/readable-stream": {
64977002 "version": "34.67.20",
64987003 "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-34.67.20.tgz",
64997004 "integrity": "sha512-9uoIGGmcpTLwPga8Bn6/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoAZ75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==",
65007005 "license": "MIT",
65017006 "dependencies": {
65027007 "inheritsabort-controller": "^23.0.30",
65037008 "string_decoderbuffer": "^16.10.13",
65047009 "util-deprecateevents": "^13.03.10",
7010+ "process": "^0.11.10",
7011+ "string_decoder": "^1.3.0"
65057012 },
65067013 "engines": {
6507- "node": ">= 6"
7014+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
7015+ }
7016+ },
7017+ "node_modules/readable-web-to-node-stream/node_modules/safe-buffer": {
7018+ "version": "5.2.1",
7019+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
7020+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
7021+ "funding": [
7022+ {
7023+ "type": "github",
7024+ "url": "https://github.com/sponsors/feross"
7025+ },
7026+ {
7027+ "type": "patreon",
7028+ "url": "https://www.patreon.com/feross"
7029+ },
7030+ {
7031+ "type": "consulting",
7032+ "url": "https://feross.org/support"
7033+ }
7034+ ],
7035+ "license": "MIT"
7036+ },
7037+ "node_modules/readable-web-to-node-stream/node_modules/string_decoder": {
7038+ "version": "1.3.0",
7039+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
7040+ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
7041+ "license": "MIT",
7042+ "dependencies": {
7043+ "safe-buffer": "~5.2.0"
65087044 }
65097045 },
65107046 "node_modules/readdir-glob": {
@@ -6922,6 +7458,35 @@
69227458 "onnxruntime-web": "1.14.0"
69237459 }
69247460 },
7461+ "node_modules/sillytavern-transformers/node_modules/@jimp/types": {
7462+ "version": "0.22.12",
7463+ "resolved": "https://registry.npmjs.org/@jimp/types/-/types-0.22.12.tgz",
7464+ "integrity": "sha512-wwKYzRdElE1MBXFREvCto5s699izFHNVvALUv79GXNbsOVqlwlOxlWJ8DuyOGIXoLP4JW/m30YyuTtfUJgMRMA==",
7465+ "license": "MIT",
7466+ "dependencies": {
7467+ "@jimp/bmp": "^0.22.12",
7468+ "@jimp/gif": "^0.22.12",
7469+ "@jimp/jpeg": "^0.22.12",
7470+ "@jimp/png": "^0.22.12",
7471+ "@jimp/tiff": "^0.22.12",
7472+ "timm": "^1.6.1"
7473+ },
7474+ "peerDependencies": {
7475+ "@jimp/custom": ">=0.3.5"
7476+ }
7477+ },
7478+ "node_modules/sillytavern-transformers/node_modules/jimp": {
7479+ "version": "0.22.12",
7480+ "resolved": "https://registry.npmjs.org/jimp/-/jimp-0.22.12.tgz",
7481+ "integrity": "sha512-R5jZaYDnfkxKJy1dwLpj/7cvyjxiclxU3F4TrI/J4j2rS0niq6YDUMoPn5hs8GDpO+OZGo7Ky057CRtWesyhfg==",
7482+ "license": "MIT",
7483+ "dependencies": {
7484+ "@jimp/custom": "^0.22.12",
7485+ "@jimp/plugins": "^0.22.12",
7486+ "@jimp/types": "^0.22.12",
7487+ "regenerator-runtime": "^0.13.3"
7488+ }
7489+ },
69257490 "node_modules/simple-git": {
69267491 "version": "3.27.0",
69277492 "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.27.0.tgz",
@@ -7589,6 +8154,12 @@
75898154 "vectra": "bin/vectra.js"
75908155 }
75918156 },
8157+ "node_modules/wasm-feature-detect": {
8158+ "version": "1.8.0",
8159+ "resolved": "https://registry.npmjs.org/wasm-feature-detect/-/wasm-feature-detect-1.8.0.tgz",
8160+ "integrity": "sha512-zksaLKM2fVlnB5jQQDqKXXwYHLQUVH9es+5TOOHwGOVJOCeRBCiPjwSg+3tN2AdTCzjgli4jijCH290kXb/zWQ==",
8161+ "license": "Apache-2.0"
8162+ },
75928163 "node_modules/watchpack": {
75938164 "version": "2.4.2",
75948165 "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz",
@@ -7955,29 +8526,6 @@
79558526 "node": ">= 14"
79568527 }
79578528 },
7958- "node_modules/zip-stream/node_modules/buffer": {
7959- "version": "6.0.3",
7960- "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
7961- "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
7962- "funding": [
7963- {
7964- "type": "github",
7965- "url": "https://github.com/sponsors/feross"
7966- },
7967- {
7968- "type": "patreon",
7969- "url": "https://www.patreon.com/feross"
7970- },
7971- {
7972- "type": "consulting",
7973- "url": "https://feross.org/support"
7974- }
7975- ],
7976- "dependencies": {
7977- "base64-js": "^1.3.1",
7978- "ieee754": "^1.2.1"
7979- }
7980- },
79818529 "node_modules/zip-stream/node_modules/readable-stream": {
79828530 "version": "4.5.2",
79838531 "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz",
@@ -8019,6 +8567,15 @@
80198567 "dependencies": {
80208568 "safe-buffer": "~5.2.0"
80218569 }
8570+ },
8571+ "node_modules/zod": {
8572+ "version": "3.24.2",
8573+ "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.2.tgz",
8574+ "integrity": "sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==",
8575+ "license": "MIT",
8576+ "funding": {
8577+ "url": "https://github.com/sponsors/colinhacks"
8578+ }
80228579 }
80238580 }
80248581}
package.json+20 -1
@@ -4,6 +4,26 @@
44 "@agnai/sentencepiece-js": "^1.1.1",
55 "@agnai/web-tokenizers": "^0.1.3",
66 "@iconfu/svg-inject": "^1.2.3",
7+ "@jimp/core": "^1.6.0",
8+ "@jimp/js-bmp": "^1.6.0",
9+ "@jimp/js-gif": "^1.6.0",
10+ "@jimp/js-tiff": "^1.6.0",
11+ "@jimp/plugin-circle": "^1.6.0",
12+ "@jimp/plugin-color": "^1.6.0",
13+ "@jimp/plugin-contain": "^1.6.0",
14+ "@jimp/plugin-cover": "^1.6.0",
15+ "@jimp/plugin-crop": "^1.6.0",
16+ "@jimp/plugin-displace": "^1.6.0",
17+ "@jimp/plugin-fisheye": "^1.6.0",
18+ "@jimp/plugin-flip": "^1.6.0",
19+ "@jimp/plugin-mask": "^1.6.0",
20+ "@jimp/plugin-quantize": "^1.6.0",
21+ "@jimp/plugin-rotate": "^1.6.0",
22+ "@jimp/plugin-threshold": "^1.6.0",
23+ "@jimp/wasm-avif": "^1.6.0",
24+ "@jimp/wasm-jpeg": "^1.6.0",
25+ "@jimp/wasm-png": "^1.6.0",
26+ "@jimp/wasm-webp": "^1.6.0",
727 "@mozilla/readability": "^0.6.0",
828 "@popperjs/core": "^2.11.8",
929 "@zeldafan0225/ai_horde": "^5.2.0",
@@ -36,7 +56,6 @@
3656 "ip-regex": "^5.0.0",
3757 "ipaddr.js": "^2.2.0",
3858 "is-docker": "^3.0.0",
39- "jimp": "^0.22.10",
4059 "localforage": "^1.10.0",
4160 "lodash": "^4.17.21",
4261 "mime-types": "^2.1.35",
public/scripts/utils.js+2 -0
@@ -1437,6 +1437,8 @@ export async function ensureImageFormatSupported(file) {
14371437 'image/tiff',
14381438 'image/gif',
14391439 'image/apng',
1440+ 'image/webp',
1441+ 'image/avif',
14401442 ];
14411443
14421444 if (supportedTypes.includes(file.type) || !file.type.startsWith('image/')) {
server.js+1 -0
@@ -20,6 +20,7 @@ import bodyParser from 'body-parser';
2020import open from 'open';
2121
2222// local library imports
23+import './src/fetch-patch.js';
2324import { serverEvents, EVENT_NAMES } from './src/server-events.js';
2425import { CommandLineParser } from './src/command-line.js';
2526import { loadPlugins } from './src/plugin-loader.js';
src/endpoints/avatars.js+5 -4
@@ -3,7 +3,7 @@ import fs from 'node:fs';
33
44import express from 'express';
55import sanitize from 'sanitize-filename';
66import jimp{ Jimp, JimpMime } from '../jimp.js';
77import { sync as writeFileAtomicSync } from 'write-file-atomic';
88
99import { AVATAR_WIDTH, AVATAR_HEIGHT } from '../constants.js';
@@ -41,13 +41,14 @@ router.post('/upload', async (request, response) => {
4141 try {
4242 const pathToUpload = path.join(request.file.destination, request.file.filename);
4343 const crop = tryParse(request.query.crop);
4444 letconst rawImg = await jimpJimp.read(pathToUpload);
4545
4646 if (typeof crop == 'object' && [crop.x, crop.y, crop.width, crop.height].every(x => typeof x === 'number')) {
4747 rawImg = rawImg.crop({ w: crop.xwidth, h: crop.yheight, x: crop.widthx, y: crop.heighty });
4848 }
4949
50- const image = await rawImg.cover(AVATAR_WIDTH, AVATAR_HEIGHT).getBufferAsync(jimp.MIME_PNG);
50+ rawImg.cover({ w: AVATAR_WIDTH, h: AVATAR_HEIGHT });
51+ const image = await rawImg.getBuffer(JimpMime.png);
5152
5253 const filename = request.body.overwrite_name || `${Date.now()}.png`;
5354 const pathToNewFile = path.join(request.user.directories.avatars, filename);
src/endpoints/characters.js+9 -8
@@ -10,7 +10,7 @@ import { sync as writeFileAtomicSync } from 'write-file-atomic';
1010import yaml from 'yaml';
1111import _ from 'lodash';
1212import mime from 'mime-types';
1313import jimp{ Jimp, JimpMime } from '../jimp.js';
1414import storage from 'node-persist';
1515
1616import { AVATAR_WIDTH, AVATAR_HEIGHT } from '../constants.js';
@@ -277,12 +277,12 @@ async function writeCharacterData(inputFile, data, outputFile, request, crop = u
277277 * @returns {Promise<Buffer>} Image buffer
278278 */
279279async function parseImageBuffer(buffer, crop) {
280280 const image = await jimpJimp.readfromBuffer(buffer);
281281 let finalWidth = image.bitmap.width, finalHeight = image.bitmap.height;
282282
283283 // Apply crop if defined
284284 if (typeof crop == 'object' && [crop.x, crop.y, crop.width, crop.height].every(x => typeof x === 'number')) {
285285 image.crop({ x: crop.x, y: crop.y, w: crop.width, h: crop.height });
286286 // Apply standard resize if requested
287287 if (crop.want_resize) {
288288 finalWidth = AVATAR_WIDTH;
@@ -293,7 +293,8 @@ async function parseImageBuffer(buffer, crop) {
293293 }
294294 }
295295
296296 return image.cover({ w: finalWidth, h: finalHeight).getBufferAsync(jimp.MIME_PNG });
297+ return await image.getBuffer(JimpMime.png);
297298}
298299
299300/**
@@ -304,12 +305,12 @@ async function parseImageBuffer(buffer, crop) {
304305 */
305306async function tryReadImage(imgPath, crop) {
306307 try {
307308 letconst rawImg = await jimpJimp.read(imgPath);
308309 let finalWidth = rawImg.bitmap.width, finalHeight = rawImg.bitmap.height;
309310
310311 // Apply crop if defined
311312 if (typeof crop == 'object' && [crop.x, crop.y, crop.width, crop.height].every(x => typeof x === 'number')) {
312313 rawImg = rawImg.crop({ x: crop.x, y: crop.y, w: crop.width, h: crop.height });
313314 // Apply standard resize if requested
314315 if (crop.want_resize) {
315316 finalWidth = AVATAR_WIDTH;
@@ -320,8 +321,8 @@ async function tryReadImage(imgPath, crop) {
320321 }
321322 }
322323
323- const image = await rawImg.cover(finalWidth, finalHeight).getBufferAsync(jimp.MIME_PNG);
324+ rawImg.cover({ w: finalWidth, h: finalHeight });
324- return image;
325+ return await rawImg.getBuffer(JimpMime.png);
325326 }
326327 // If it's an unsupported type of image (APNG) - just read the file as buffer
327328 catch (error) {
src/endpoints/thumbnails.js+7 -5
@@ -5,7 +5,7 @@ import path from 'node:path';
55import mime from 'mime-types';
66import express from 'express';
77import sanitize from 'sanitize-filename';
88import jimp{ Jimp, JimpMime } from '../jimp.js';
99import { sync as writeFileAtomicSync } from 'write-file-atomic';
1010
1111import { getConfigValue } from '../util.js';
@@ -122,14 +122,16 @@ async function generateThumbnail(directories, type, file) {
122122
123123 try {
124124 const size = dimensions[type];
125125 const image = await jimpJimp.read(pathToOriginalFile);
126- const imgType = type == 'avatar' && pngFormat ? 'image/png' : 'image/jpeg';
127126 const width = !isNaN(size?.[0]) && size?.[0] > 0 ? size[0] : image.bitmap.width;
128127 const height = !isNaN(size?.[1]) && size?.[1] > 0 ? size[1] : image.bitmap.height;
129- buffer = await image.cover(width, height).quality(quality).getBufferAsync(imgType);
128+ image.cover({ w: width, h: height });
129+ buffer = pngFormat
130+ ? await image.getBuffer(JimpMime.png)
131+ : await image.getBuffer(JimpMime.jpeg, { quality: quality, jpegColorSpace: 'ycbcr' });
130132 }
131133 catch (inner) {
132134 console.warn(`Thumbnailer can not process the image: ${pathToOriginalFile}. Using original size`, inner);
133135 buffer = fs.readFileSync(pathToOriginalFile);
134136 }
135137
src/fetch-patch.js+91 -0
@@ -0,0 +1,91 @@
1+import fs from 'node:fs';
2+import path from 'node:path';
3+import { fileURLToPath } from 'node:url';
4+import mime from 'mime-types';
5+
6+const originalFetch = globalThis.fetch;
7+
8+const ALLOWED_EXTENSIONS = [
9+ '.wasm',
10+];
11+
12+/**
13+ * Checks if a child path is under a parent path.
14+ * @param {string} parentPath Parent path
15+ * @param {string} childPath Child path
16+ * @returns {boolean} Returns true if the child path is under the parent path, false otherwise
17+ */
18+function isPathUnderParent(parentPath, childPath) {
19+ const normalizedParent = path.normalize(parentPath);
20+ const normalizedChild = path.normalize(childPath);
21+
22+ const relativePath = path.relative(normalizedParent, normalizedChild);
23+
24+ return !relativePath.startsWith('..') && !path.isAbsolute(relativePath);
25+}
26+
27+/**
28+ * Checks if the given request is a file URL.
29+ * @param {string | URL | Request} request The request to check
30+ * @return {boolean} Returns true if the request is a file URL, false otherwise
31+ */
32+function isFileURL(request) {
33+ if (typeof request === 'string') {
34+ return request.startsWith('file://');
35+ }
36+ if (request instanceof URL) {
37+ return request.protocol === 'file:';
38+ }
39+ if (request instanceof Request) {
40+ return request.url.startsWith('file://');
41+ }
42+ return false;
43+}
44+
45+/**
46+ * Gets the URL from the request.
47+ * @param {string | URL | Request} request The request to get the URL from
48+ * @return {string} The URL of the request
49+ */
50+function getRequestURL(request) {
51+ if (typeof request === 'string') {
52+ return request;
53+ }
54+ if (request instanceof URL) {
55+ return request.href;
56+ }
57+ if (request instanceof Request) {
58+ return request.url;
59+ }
60+ throw new TypeError('Invalid request type');
61+}
62+
63+// Patched fetch function that handles file URLs
64+globalThis.fetch = async (/** @type {string | URL | Request} */ request, /** @type {RequestInit | undefined} */ options) => {
65+ if (!isFileURL(request)) {
66+ return originalFetch(request, options);
67+ }
68+ const url = getRequestURL(request);
69+ const filePath = path.resolve(fileURLToPath(url));
70+ const cwd = path.resolve(process.cwd()) + path.sep;
71+ const isUnderCwd = isPathUnderParent(cwd, filePath);
72+ if (!isUnderCwd) {
73+ throw new Error('Requested file path is outside of the current working directory.');
74+ }
75+ const parsedPath = path.parse(filePath);
76+ if (!ALLOWED_EXTENSIONS.includes(parsedPath.ext)) {
77+ throw new Error('Unsupported file extension.');
78+ }
79+ const fileName = parsedPath.base;
80+ const buffer = await fs.promises.readFile(filePath);
81+ const blob = new Blob([buffer]);
82+ const response = new Response(blob, {
83+ status: 200,
84+ statusText: 'OK',
85+ headers: {
86+ 'Content-Type': mime.lookup(fileName) || 'application/octet-stream',
87+ 'Content-Length': buffer.length.toString(),
88+ },
89+ });
90+ return response;
91+};
src/jimp.js+63 -0
@@ -0,0 +1,63 @@
1+import { createJimp } from '@jimp/core';
2+
3+// Optimized image formats
4+import webp from '@jimp/wasm-webp';
5+import png from '@jimp/wasm-png';
6+import jpeg from '@jimp/wasm-jpeg';
7+import avif from '@jimp/wasm-avif';
8+
9+// Other image formats
10+import bmp, { msBmp } from '@jimp/js-bmp';
11+import gif from '@jimp/js-gif';
12+import tiff from '@jimp/js-tiff';
13+
14+// Plugins
15+import * as blit from '@jimp/plugin-blit';
16+import * as circle from '@jimp/plugin-circle';
17+import * as color from '@jimp/plugin-color';
18+import * as contain from '@jimp/plugin-contain';
19+import * as cover from '@jimp/plugin-cover';
20+import * as crop from '@jimp/plugin-crop';
21+import * as displace from '@jimp/plugin-displace';
22+import * as fisheye from '@jimp/plugin-fisheye';
23+import * as flip from '@jimp/plugin-flip';
24+import * as mask from '@jimp/plugin-mask';
25+import * as resize from '@jimp/plugin-resize';
26+import * as rotate from '@jimp/plugin-rotate';
27+import * as threshold from '@jimp/plugin-threshold';
28+import * as quantize from '@jimp/plugin-quantize';
29+
30+const defaultPlugins = [
31+ blit.methods,
32+ circle.methods,
33+ color.methods,
34+ contain.methods,
35+ cover.methods,
36+ crop.methods,
37+ displace.methods,
38+ fisheye.methods,
39+ flip.methods,
40+ mask.methods,
41+ resize.methods,
42+ rotate.methods,
43+ threshold.methods,
44+ quantize.methods,
45+];
46+
47+// A custom jimp that uses WASM for optimized formats and JS for the rest
48+const Jimp = createJimp({
49+ formats: [webp, png, jpeg, avif, bmp, msBmp, gif, tiff],
50+ plugins: [...defaultPlugins],
51+});
52+
53+const JimpMime = {
54+ bmp: bmp().mime,
55+ gif: gif().mime,
56+ jpeg: jpeg().mime,
57+ png: png().mime,
58+ tiff: tiff().mime,
59+};
60+
61+export default Jimp;
62+
63+export { Jimp, JimpMime };