diff --git a/components.d.ts b/components.d.ts index 8068969f..1ad1112c 100644 --- a/components.d.ts +++ b/components.d.ts @@ -183,6 +183,7 @@ declare module '@vue/runtime-core' { NTable: typeof import('naive-ui')['NTable'] NTag: typeof import('naive-ui')['NTag'] NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default'] + OcrImage: typeof import('./src/tools/ocr-image/ocr-image.vue')['default'] OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default'] PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default'] PdfSignatureChecker: typeof import('./src/tools/pdf-signature-checker/pdf-signature-checker.vue')['default'] diff --git a/package.json b/package.json index 705ffd8f..97629a40 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "@tiptap/vue-3": "2.0.3", "@types/figlet": "^1.5.8", "@types/markdown-it": "^13.0.7", + "@types/pdfjs-dist": "^2.10.378", "@vicons/material": "^0.12.0", "@vicons/tabler": "^0.12.0", "@vueuse/core": "^10.3.0", @@ -89,12 +90,15 @@ "netmask": "^2.0.2", "node-forge": "^1.3.1", "oui-data": "^1.0.10", + "path2d-polyfill": "^3.0.1", "pdf-signature-reader": "^1.4.2", + "pdfjs-dist": "^4.0.379", "pinia": "^2.0.34", "plausible-tracker": "^0.3.8", "qrcode": "^1.5.1", "randexp": "^0.5.3", "sql-formatter": "^13.0.0", + "tesseract.js": "^5.0.4", "ua-parser-js": "^1.0.35", "ulid": "^2.3.0", "unicode-emoji-json": "^0.4.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 65a02bc9..89fdaa38 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -38,6 +38,9 @@ importers: '@types/markdown-it': specifier: ^13.0.7 version: 13.0.9 + '@types/pdfjs-dist': + specifier: ^2.10.378 + version: 2.10.378 '@vicons/material': specifier: ^0.12.0 version: 0.12.0 @@ -167,9 +170,15 @@ importers: oui-data: specifier: ^1.0.10 version: 1.0.10 + path2d-polyfill: + specifier: ^3.0.1 + version: 3.1.2 pdf-signature-reader: specifier: ^1.4.2 version: 1.4.2 + pdfjs-dist: + specifier: ^4.0.379 + version: 4.7.76 pinia: specifier: ^2.0.34 version: 2.0.34(typescript@5.2.2)(vue@3.3.4) @@ -185,6 +194,9 @@ importers: sql-formatter: specifier: ^13.0.0 version: 13.0.0 + tesseract.js: + specifier: ^5.0.4 + version: 5.1.1 ua-parser-js: specifier: ^1.0.35 version: 1.0.35 @@ -320,7 +332,7 @@ importers: version: 6.2.11 jsdom: specifier: ^22.0.0 - version: 22.0.0 + version: 22.0.0(canvas@2.11.2) less: specifier: ^4.1.3 version: 4.1.3 @@ -356,7 +368,7 @@ importers: version: 4.0.0 vitest: specifier: ^0.34.0 - version: 0.34.0(jsdom@22.0.0)(less@4.1.3)(sass@1.80.4)(terser@5.24.0) + version: 0.34.0(jsdom@22.0.0(canvas@2.11.2))(less@4.1.3)(sass@1.80.4)(terser@5.24.0) workbox-window: specifier: ^7.0.0 version: 7.0.0 @@ -1492,6 +1504,10 @@ packages: resolution: {integrity: sha512-vt6WJG54n+KANaqxOfzIIU7aSfFHEWFbnGLsgxL7nASHqO0zezrNA2y2Rrp80zSeTW+wSpbmDM4uJyC9UW1qoA==} engines: {node: ^12.16.0 || >=13.7.0} + '@mapbox/node-pre-gyp@1.0.11': + resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==} + hasBin: true + '@mdit-vue/plugin-component@0.12.0': resolution: {integrity: sha512-LrwV3f0Y6H7b7m/w1Y3bkGuR3HOiBK4QiHHW3HuRMza6MZodDQbj8Baik5/V5GiSg1/ltijS1CymVcycd1EfTw==} @@ -1935,6 +1951,10 @@ packages: '@types/object.pick@1.3.2': resolution: {integrity: sha512-sn7L+qQ6RLPdXRoiaE7bZ/Ek+o4uICma/lBFPyJEKDTPTBP1W8u0c4baj3EiS4DiqLs+Hk+KUGvMVJtAw3ePJg==} + '@types/pdfjs-dist@2.10.378': + resolution: {integrity: sha512-TRdIPqdsvKmPla44kVy4jv5Nt5vjMfVjbIEke1CRULIrwKNRC4lIiZvNYDJvbUMNCFPNIUcOKhXTyMJrX18IMA==} + deprecated: This is a stub types definition. pdfjs-dist provides its own type definitions, so you do not need this installed. + '@types/ps-tree@1.1.2': resolution: {integrity: sha512-ZREFYlpUmPQJ0esjxoG1fMvB2HNaD3z+mjqdSosZvd3RalncI9NEur73P8ZJz4YQdL64CmV1w0RuqoRUlhQRBw==} @@ -2430,6 +2450,14 @@ packages: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} + aproba@2.0.0: + resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} + + are-we-there-yet@2.0.0: + resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==} + engines: {node: '>=10'} + deprecated: This package is no longer supported. + argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} @@ -2511,6 +2539,9 @@ packages: bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + bmp-js@0.1.0: + resolution: {integrity: sha512-vHdS19CnY3hwiNdkaqk93DvjVLfbEcI8mys4UjuWrlX1haDmroo8o4xCzh4wD6DGV6HxRCyauwhHRqMTfERtjw==} + boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} @@ -2581,6 +2612,10 @@ packages: caniuse-lite@1.0.30001559: resolution: {integrity: sha512-cPiMKZgqgkg5LY3/ntGeLFUpi6tzddBNS58A4tnTgQw1zON7u2sZMU7SzOeVH4tj20++9ggL+V6FDOFMTaFFYA==} + canvas@2.11.2: + resolution: {integrity: sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==} + engines: {node: '>=6'} + capital-case@1.0.4: resolution: {integrity: sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==} @@ -2630,6 +2665,10 @@ packages: resolution: {integrity: sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==} engines: {node: '>= 14.16.0'} + chownr@2.0.0: + resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} + engines: {node: '>=10'} + ci-info@3.8.0: resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} engines: {node: '>=8'} @@ -2676,6 +2715,10 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + color-support@1.1.3: + resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} + hasBin: true + colord@2.9.3: resolution: {integrity: sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==} @@ -2721,6 +2764,9 @@ packages: resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} engines: {node: ^14.18.0 || >=16.10.0} + console-control-strings@1.1.0: + resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} + constant-case@2.0.0: resolution: {integrity: sha512-eS0N9WwmjTqrOmR3o83F5vW8Z+9R1HnVz3xmzT2PMFug9ly+Au/fxRWlEBSb6LcZwspSsEn9Xs1uw9YgzAg1EQ==} @@ -2854,6 +2900,10 @@ packages: decimal.js@10.4.3: resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} + decompress-response@4.2.1: + resolution: {integrity: sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==} + engines: {node: '>=8'} + deep-eql@4.1.3: resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} engines: {node: '>=6'} @@ -2900,6 +2950,9 @@ packages: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} + delegates@1.0.0: + resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} + destr@2.0.1: resolution: {integrity: sha512-M1Ob1zPSIvlARiJUkKqvAZ3VAqQY6Jcuth/pBKQ2b1dX/Qx0OnJ8Vux6J2H5PTMQeRzWrrbTu70VxBfv/OPDJA==} @@ -2908,6 +2961,10 @@ packages: engines: {node: '>=0.10'} hasBin: true + detect-libc@2.0.3: + resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} + engines: {node: '>=8'} + diff-sequences@29.4.3: resolution: {integrity: sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -3350,6 +3407,10 @@ packages: resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==} engines: {node: '>=10'} + fs-minipass@2.1.0: + resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} + engines: {node: '>= 8'} + fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} @@ -3377,6 +3438,11 @@ packages: resolution: {integrity: sha512-cJaJkxCCxC8qIIcPBF9yGxY0W/tVZS3uEISDxhYIdtk8OL93pe+6Zj7LjCqVV4dzbqcriOZ+kQ/NE4RXZHsIGA==} engines: {node: '>=10'} + gauge@3.0.2: + resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==} + engines: {node: '>=10'} + deprecated: This package is no longer supported. + gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} @@ -3493,6 +3559,9 @@ packages: resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} engines: {node: '>= 0.4'} + has-unicode@2.0.1: + resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} + has@1.0.3: resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} engines: {node: '>= 0.4.0'} @@ -3570,6 +3639,9 @@ packages: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} + idb-keyval@6.2.1: + resolution: {integrity: sha512-8Sb3veuYCyrZL+VBt9LJfZjLUPWVvqn8tG28VqYNFCo43KHcKuq+b4EiXGeuaLAQWL2YmyDgMp2aSpH9JHsEQg==} + idb@7.1.1: resolution: {integrity: sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==} @@ -3684,6 +3756,9 @@ packages: engines: {node: '>=8'} hasBin: true + is-electron@2.2.2: + resolution: {integrity: sha512-FO/Rhvz5tuw4MCWkpMzHFKWD2LsfHzIb7i6MdPYZ/KW7AlxawyLkqdy+jPZP1WubqEADE3O4FUENlJHDfQASRg==} + is-extendable@0.1.1: resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==} engines: {node: '>=0.10.0'} @@ -3785,6 +3860,9 @@ packages: is-upper-case@1.1.2: resolution: {integrity: sha512-GQYSJMgfeAmVwh9ixyk888l7OIhNAGKtY6QA+IrWlu9MDTCaXmeozOZ2S9Knj7bQwBO/H6J2kb+pbyTUiMNbsw==} + is-url@1.2.4: + resolution: {integrity: sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==} + is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} @@ -4054,6 +4132,10 @@ packages: resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==} engines: {node: '>=6'} + make-dir@3.1.0: + resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} + engines: {node: '>=8'} + make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} @@ -4130,6 +4212,10 @@ packages: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} + mimic-response@2.1.0: + resolution: {integrity: sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==} + engines: {node: '>=8'} + min-indent@1.0.1: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} @@ -4148,6 +4234,23 @@ packages: minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + minipass@3.3.6: + resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} + engines: {node: '>=8'} + + minipass@5.0.0: + resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} + engines: {node: '>=8'} + + minizlib@2.1.2: + resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} + engines: {node: '>= 8'} + + mkdirp@1.0.4: + resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} + engines: {node: '>=10'} + hasBin: true + mlly@1.4.0: resolution: {integrity: sha512-ua8PAThnTwpprIaU47EPeZ/bPUVp2QYBbWMphUQpVdBI3Lgqzm5KZQ45Agm3YJedHXaIHl6pBGabaLSUPPSptg==} @@ -4178,6 +4281,9 @@ packages: peerDependencies: vue: ^3.0.0 + nan@2.22.0: + resolution: {integrity: sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw==} + nanoid@3.3.6: resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -4218,6 +4324,15 @@ packages: node-fetch-native@1.4.1: resolution: {integrity: sha512-NsXBU0UgBxo2rQLOeWNZqS3fvflWePMECr8CoSWoSTqCqGbVVsvl9vZu1HfQicYN0g5piV9Gh8RTEvo/uP752w==} + node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + node-fetch@3.2.10: resolution: {integrity: sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -4232,6 +4347,11 @@ packages: node-releases@2.0.13: resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} + nopt@5.0.0: + resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==} + engines: {node: '>=6'} + hasBin: true + nopt@6.0.0: resolution: {integrity: sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} @@ -4248,12 +4368,20 @@ packages: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} + npmlog@5.0.1: + resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==} + deprecated: This package is no longer supported. + nth-check@2.1.1: resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} nwsapi@2.2.7: resolution: {integrity: sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==} + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + object-inspect@1.13.1: resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} @@ -4287,6 +4415,10 @@ packages: resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} engines: {node: '>=12'} + opencollective-postinstall@2.0.3: + resolution: {integrity: sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==} + hasBin: true + optionator@0.9.3: resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} engines: {node: '>= 0.8.0'} @@ -4383,6 +4515,13 @@ packages: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} + path2d-polyfill@3.1.2: + resolution: {integrity: sha512-rmd/vZBtonqV3eOF+47cVEOyp6APiG7m4V0ue1+R79Fgqq2eNgScY/LCEAvTM86vTeMnrePpqrCIeZMLKJKAXw==} + + path2d@0.2.1: + resolution: {integrity: sha512-Fl2z/BHvkTNvkuBzYTpTuirHZg6wW9z8+4SND/3mDTEcYbbNKWAy21dz9D3ePNNwrrK8pqZO5vLPZ1hLF6T7XA==} + engines: {node: '>=6'} + pathe@1.1.1: resolution: {integrity: sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==} @@ -4395,6 +4534,10 @@ packages: pdf-signature-reader@1.4.2: resolution: {integrity: sha512-qQbmFv6nv4SQt2gmaalaREhHu3x2XyLG2+zL4Gl4D2TL2Zfii1EKxlFhJDsduP8s06t26snDoSwEAQtJOtprmQ==} + pdfjs-dist@4.7.76: + resolution: {integrity: sha512-8y6wUgC/Em35IumlGjaJOCm3wV4aY/6sqnIT3fVW/67mXsOZ9HWBn8GDKmJUK0GSzpbmX3gQqwfoFayp78Mtqw==} + engines: {node: '>=18'} + perfect-debounce@1.0.0: resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} @@ -4629,6 +4772,9 @@ packages: regenerate@1.4.2: resolution: {integrity: sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==} + regenerator-runtime@0.13.11: + resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} + regenerator-runtime@0.14.0: resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} @@ -4839,6 +4985,12 @@ packages: signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + simple-concat@1.0.1: + resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} + + simple-get@3.1.1: + resolution: {integrity: sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==} + sirv@2.0.3: resolution: {integrity: sha512-O9jm9BsID1P+0HOi81VpXPoDxYP374pkOLzACAoyUQ/3OUVndNpsz6wMnY2z+yOxzbllCKZrM+9QrWsv4THnyA==} engines: {node: '>= 10'} @@ -5006,6 +5158,10 @@ packages: resolution: {integrity: sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==} engines: {node: ^14.18.0 || >=16.0.0} + tar@6.2.1: + resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} + engines: {node: '>=10'} + temp-dir@2.0.0: resolution: {integrity: sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==} engines: {node: '>=8'} @@ -5019,6 +5175,12 @@ packages: engines: {node: '>=10'} hasBin: true + tesseract.js-core@5.1.1: + resolution: {integrity: sha512-KX3bYSU5iGcO1XJa+QGPbi+Zjo2qq6eBhNjSGR5E5q0JtzkoipJKOUQD7ph8kFyteCEfEQ0maWLu8MCXtvX5uQ==} + + tesseract.js@5.1.1: + resolution: {integrity: sha512-lzVl/Ar3P3zhpUT31NjqeCo1f+D5+YfpZ5J62eo2S14QNVOmHBTtbchHm/YAbOOOzCegFnKf4B3Qih9LuldcYQ==} + text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} @@ -5068,6 +5230,9 @@ packages: resolution: {integrity: sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==} engines: {node: '>=6'} + tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + tr46@1.0.1: resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==} @@ -5526,6 +5691,9 @@ packages: resolution: {integrity: sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==} engines: {node: '>=14'} + wasm-feature-detect@1.8.0: + resolution: {integrity: sha512-zksaLKM2fVlnB5jQQDqKXXwYHLQUVH9es+5TOOHwGOVJOCeRBCiPjwSg+3tN2AdTCzjgli4jijCH290kXb/zWQ==} + wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} @@ -5533,6 +5701,9 @@ packages: resolution: {integrity: sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==} engines: {node: '>= 8'} + webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + webidl-conversions@4.0.2: resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} @@ -5563,6 +5734,9 @@ packages: resolution: {integrity: sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==} engines: {node: '>=14'} + whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + whatwg-url@7.1.0: resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} @@ -5591,6 +5765,9 @@ packages: engines: {node: '>=8'} hasBin: true + wide-align@1.1.5: + resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} + workbox-background-sync@7.0.0: resolution: {integrity: sha512-S+m1+84gjdueM+jIKZ+I0Lx0BDHkk5Nu6a3kTVxP4fdj3gKouRNmhO8H290ybnJTOPfBDtTMXSQA/QLTvr7PeA==} @@ -5723,6 +5900,9 @@ packages: resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} engines: {node: '>=12.20'} + zlibjs@0.3.1: + resolution: {integrity: sha512-+J9RrgTKOmlxFSDHo0pI1xM6BLVUv+o0ZT9ANtCxGkjIVCCUdx9alUF8Gm+dGLKbkkkidWIHFDZHDMpfITt4+w==} + zx@7.2.1: resolution: {integrity: sha512-TgKwppaMLMNAXHhlhbBh7rMoOSx3/9qqnkv8frmhVlSomEuWkDijh/BCmYntkoS7ZQyemApAUyEi24jIrrS+hA==} engines: {node: '>= 16.0.0'} @@ -7108,6 +7288,22 @@ snapshots: transitivePeerDependencies: - supports-color + '@mapbox/node-pre-gyp@1.0.11': + dependencies: + detect-libc: 2.0.3 + https-proxy-agent: 5.0.1 + make-dir: 3.1.0 + node-fetch: 2.7.0 + nopt: 5.0.0 + npmlog: 5.0.1 + rimraf: 3.0.2 + semver: 7.5.4 + tar: 6.2.1 + transitivePeerDependencies: + - encoding + - supports-color + optional: true + '@mdit-vue/plugin-component@0.12.0': dependencies: '@types/markdown-it': 12.2.3 @@ -7573,6 +7769,13 @@ snapshots: '@types/object.pick@1.3.2': {} + '@types/pdfjs-dist@2.10.378': + dependencies: + pdfjs-dist: 4.7.76 + transitivePeerDependencies: + - encoding + - supports-color + '@types/ps-tree@1.1.2': {} '@types/qrcode@1.5.0': @@ -8241,7 +8444,7 @@ snapshots: '@vueuse/shared@10.3.0(vue@3.3.4)': dependencies: - vue-demi: 0.14.5(vue@3.3.4) + vue-demi: 0.14.10(vue@3.3.4) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -8310,6 +8513,15 @@ snapshots: normalize-path: 3.0.0 picomatch: 2.3.1 + aproba@2.0.0: + optional: true + + are-we-there-yet@2.0.0: + dependencies: + delegates: 1.0.0 + readable-stream: 3.6.2 + optional: true + argparse@1.0.10: dependencies: sprintf-js: 1.0.3 @@ -8393,6 +8605,8 @@ snapshots: inherits: 2.0.4 readable-stream: 3.6.2 + bmp-js@0.1.0: {} + boolbase@1.0.0: {} brace-expansion@1.1.11: @@ -8465,6 +8679,16 @@ snapshots: caniuse-lite@1.0.30001559: {} + canvas@2.11.2: + dependencies: + '@mapbox/node-pre-gyp': 1.0.11 + nan: 2.22.0 + simple-get: 3.1.1 + transitivePeerDependencies: + - encoding + - supports-color + optional: true + capital-case@1.0.4: dependencies: no-case: 3.0.4 @@ -8556,6 +8780,9 @@ snapshots: dependencies: readdirp: 4.0.2 + chownr@2.0.0: + optional: true + ci-info@3.8.0: {} clean-regexp@1.0.0: @@ -8602,6 +8829,9 @@ snapshots: color-name@1.1.4: {} + color-support@1.1.3: + optional: true + colord@2.9.3: {} colorette@2.0.20: {} @@ -8640,6 +8870,9 @@ snapshots: consola@3.2.3: {} + console-control-strings@1.1.0: + optional: true + constant-case@2.0.0: dependencies: snake-case: 2.1.0 @@ -8756,6 +8989,11 @@ snapshots: decimal.js@10.4.3: {} + decompress-response@4.2.1: + dependencies: + mimic-response: 2.1.0 + optional: true + deep-eql@4.1.3: dependencies: type-detect: 4.0.8 @@ -8792,10 +9030,16 @@ snapshots: delayed-stream@1.0.0: {} + delegates@1.0.0: + optional: true + destr@2.0.1: {} detect-libc@1.0.3: {} + detect-libc@2.0.3: + optional: true + diff-sequences@29.4.3: {} diff-sequences@29.6.3: {} @@ -9381,6 +9625,11 @@ snapshots: jsonfile: 6.1.0 universalify: 2.0.0 + fs-minipass@2.1.0: + dependencies: + minipass: 3.3.6 + optional: true + fs.realpath@1.0.0: {} fsevents@2.3.2: @@ -9402,6 +9651,19 @@ snapshots: fuse.js@6.6.2: {} + gauge@3.0.2: + dependencies: + aproba: 2.0.0 + color-support: 1.1.3 + console-control-strings: 1.1.0 + has-unicode: 2.0.1 + object-assign: 4.1.1 + signal-exit: 3.0.7 + string-width: 4.2.3 + strip-ansi: 6.0.1 + wide-align: 1.1.5 + optional: true + gensync@1.0.0-beta.2: {} get-caller-file@2.0.5: {} @@ -9523,6 +9785,9 @@ snapshots: dependencies: has-symbols: 1.0.3 + has-unicode@2.0.1: + optional: true + has@1.0.3: dependencies: function-bind: 1.1.2 @@ -9614,6 +9879,8 @@ snapshots: dependencies: safer-buffer: 2.1.2 + idb-keyval@6.2.1: {} + idb@7.1.1: {} ieee754@1.2.1: {} @@ -9719,6 +9986,8 @@ snapshots: is-docker@2.2.1: {} + is-electron@2.2.2: {} + is-extendable@0.1.1: {} is-extendable@1.0.1: @@ -9798,6 +10067,8 @@ snapshots: dependencies: upper-case: 1.1.3 + is-url@1.2.4: {} + is-weakref@1.0.2: dependencies: call-bind: 1.0.5 @@ -9859,7 +10130,7 @@ snapshots: jsbn@1.1.0: {} - jsdom@22.0.0: + jsdom@22.0.0(canvas@2.11.2): dependencies: abab: 2.0.6 cssstyle: 3.0.0 @@ -9884,6 +10155,8 @@ snapshots: whatwg-url: 12.0.1 ws: 8.13.0 xml-name-validator: 4.0.0 + optionalDependencies: + canvas: 2.11.2 transitivePeerDependencies: - bufferutil - supports-color @@ -10074,6 +10347,11 @@ snapshots: semver: 5.7.2 optional: true + make-dir@3.1.0: + dependencies: + semver: 6.3.1 + optional: true + make-error@1.3.6: {} map-stream@0.1.0: {} @@ -10158,6 +10436,9 @@ snapshots: mimic-fn@2.1.0: {} + mimic-response@2.1.0: + optional: true + min-indent@1.0.1: {} minimatch@3.1.2: @@ -10174,6 +10455,23 @@ snapshots: minimist@1.2.8: {} + minipass@3.3.6: + dependencies: + yallist: 4.0.0 + optional: true + + minipass@5.0.0: + optional: true + + minizlib@2.1.2: + dependencies: + minipass: 3.3.6 + yallist: 4.0.0 + optional: true + + mkdirp@1.0.4: + optional: true + mlly@1.4.0: dependencies: acorn: 8.11.2 @@ -10222,6 +10520,9 @@ snapshots: vue: 3.3.4 vueuc: 0.4.51(vue@3.3.4) + nan@2.22.0: + optional: true + nanoid@3.3.6: {} natural-compare-lite@1.4.0: {} @@ -10261,6 +10562,10 @@ snapshots: node-fetch-native@1.4.1: {} + node-fetch@2.7.0: + dependencies: + whatwg-url: 5.0.0 + node-fetch@3.2.10: dependencies: data-uri-to-buffer: 4.0.1 @@ -10273,6 +10578,11 @@ snapshots: node-releases@2.0.13: {} + nopt@5.0.0: + dependencies: + abbrev: 1.1.1 + optional: true + nopt@6.0.0: dependencies: abbrev: 1.1.1 @@ -10290,12 +10600,23 @@ snapshots: dependencies: path-key: 3.1.1 + npmlog@5.0.1: + dependencies: + are-we-there-yet: 2.0.0 + console-control-strings: 1.1.0 + gauge: 3.0.2 + set-blocking: 2.0.0 + optional: true + nth-check@2.1.1: dependencies: boolbase: 1.0.0 nwsapi@2.2.7: {} + object-assign@4.1.1: + optional: true + object-inspect@1.13.1: {} object-keys@1.1.1: {} @@ -10335,6 +10656,8 @@ snapshots: is-docker: 2.2.1 is-wsl: 2.2.0 + opencollective-postinstall@2.0.3: {} + optionator@0.9.3: dependencies: '@aashutoshrathi/word-wrap': 1.2.6 @@ -10448,6 +10771,12 @@ snapshots: path-type@4.0.0: {} + path2d-polyfill@3.1.2: + dependencies: + path2d: 0.2.1 + + path2d@0.2.1: {} + pathe@1.1.1: {} pathval@1.1.1: {} @@ -10462,6 +10791,14 @@ snapshots: ieee754: 1.2.1 node-forge: 1.3.1 + pdfjs-dist@4.7.76: + optionalDependencies: + canvas: 2.11.2 + path2d: 0.2.1 + transitivePeerDependencies: + - encoding + - supports-color + perfect-debounce@1.0.0: {} periscopic@3.1.0: @@ -10733,6 +11070,8 @@ snapshots: regenerate@1.4.2: {} + regenerator-runtime@0.13.11: {} + regenerator-runtime@0.14.0: {} regenerator-transform@0.15.2: @@ -10943,6 +11282,16 @@ snapshots: signal-exit@3.0.7: {} + simple-concat@1.0.1: + optional: true + + simple-get@3.1.1: + dependencies: + decompress-response: 4.2.1 + once: 1.4.0 + simple-concat: 1.0.1 + optional: true + sirv@2.0.3: dependencies: '@polka/url': 1.0.0-next.21 @@ -11141,6 +11490,16 @@ snapshots: '@pkgr/utils': 2.3.1 tslib: 2.5.0 + tar@6.2.1: + dependencies: + chownr: 2.0.0 + fs-minipass: 2.1.0 + minipass: 5.0.0 + minizlib: 2.1.2 + mkdirp: 1.0.4 + yallist: 4.0.0 + optional: true + temp-dir@2.0.0: {} tempy@0.6.0: @@ -11157,6 +11516,23 @@ snapshots: commander: 2.20.3 source-map-support: 0.5.21 + tesseract.js-core@5.1.1: {} + + tesseract.js@5.1.1: + dependencies: + bmp-js: 0.1.0 + idb-keyval: 6.2.1 + is-electron: 2.2.2 + is-url: 1.2.4 + node-fetch: 2.7.0 + opencollective-postinstall: 2.0.3 + regenerator-runtime: 0.13.11 + tesseract.js-core: 5.1.1 + wasm-feature-detect: 1.8.0 + zlibjs: 0.3.1 + transitivePeerDependencies: + - encoding + text-table@0.2.0: {} throttle-debounce@3.0.1: {} @@ -11200,6 +11576,8 @@ snapshots: universalify: 0.2.0 url-parse: 1.5.10 + tr46@0.0.3: {} + tr46@1.0.1: dependencies: punycode: 2.3.1 @@ -11627,7 +12005,7 @@ snapshots: sass: 1.80.4 terser: 5.24.0 - vitest@0.34.0(jsdom@22.0.0)(less@4.1.3)(sass@1.80.4)(terser@5.24.0): + vitest@0.34.0(jsdom@22.0.0(canvas@2.11.2))(less@4.1.3)(sass@1.80.4)(terser@5.24.0): dependencies: '@types/chai': 4.3.5 '@types/chai-subset': 1.3.3 @@ -11654,7 +12032,7 @@ snapshots: vite-node: 0.34.0(@types/node@18.15.11)(less@4.1.3)(sass@1.80.4)(terser@5.24.0) why-is-node-running: 2.2.2 optionalDependencies: - jsdom: 22.0.0 + jsdom: 22.0.0(canvas@2.11.2) transitivePeerDependencies: - less - lightningcss @@ -11750,12 +12128,16 @@ snapshots: dependencies: xml-name-validator: 4.0.0 + wasm-feature-detect@1.8.0: {} + wcwidth@1.0.1: dependencies: defaults: 1.0.4 web-streams-polyfill@3.2.1: {} + webidl-conversions@3.0.1: {} + webidl-conversions@4.0.2: {} webidl-conversions@7.0.0: {} @@ -11777,6 +12159,11 @@ snapshots: tr46: 4.1.1 webidl-conversions: 7.0.0 + whatwg-url@5.0.0: + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + whatwg-url@7.1.0: dependencies: lodash.sortby: 4.7.0 @@ -11814,6 +12201,11 @@ snapshots: siginfo: 2.0.0 stackback: 0.0.2 + wide-align@1.1.5: + dependencies: + string-width: 4.2.3 + optional: true + workbox-background-sync@7.0.0: dependencies: idb: 7.1.1 @@ -11997,6 +12389,8 @@ snapshots: yocto-queue@1.0.0: {} + zlibjs@0.3.1: {} + zx@7.2.1: dependencies: '@types/fs-extra': 11.0.1 diff --git a/src/tools/index.ts b/src/tools/index.ts index 9aac7622..b6a9637d 100644 --- a/src/tools/index.ts +++ b/src/tools/index.ts @@ -14,6 +14,7 @@ import { tool as peerShare } from './peer-share'; import { tool as asciiTextDrawer } from './ascii-text-drawer'; import { tool as textToUnicode } from './text-to-unicode'; import { tool as gzipConverter } from './gzip-converter'; +import { tool as ocrImage } from './ocr-image'; import { tool as safelinkDecoder } from './safelink-decoder'; import { tool as xmlToJson } from './xml-to-json'; import { tool as jsonToXml } from './json-to-xml'; @@ -165,13 +166,7 @@ export const toolsByCategory: ToolCategory[] = [ }, { name: 'Images and videos', - components: [ - qrCodeGenerator, - wifiQrCodeGenerator, - svgPlaceholderGenerator, - cameraRecorder, - imageResizer, - ], + components: [qrCodeGenerator, wifiQrCodeGenerator, svgPlaceholderGenerator, cameraRecorder, imageResizer, ocrImage], }, { name: 'Development', @@ -211,12 +206,7 @@ export const toolsByCategory: ToolCategory[] = [ }, { name: 'Measurement', - components: [ - chronometer, - temperatureConverter, - benchmarkBuilder, - energyComputer, - ], + components: [chronometer, temperatureConverter, benchmarkBuilder, energyComputer], }, { name: 'Text', @@ -233,11 +223,7 @@ export const toolsByCategory: ToolCategory[] = [ }, { name: 'Data', - components: [ - phoneParserAndFormatter, - ibanValidatorAndParser, - multiLinkDownloader, - ], + components: [phoneParserAndFormatter, ibanValidatorAndParser, multiLinkDownloader], }, ]; diff --git a/src/tools/ocr-image/index.ts b/src/tools/ocr-image/index.ts new file mode 100644 index 00000000..155c16d2 --- /dev/null +++ b/src/tools/ocr-image/index.ts @@ -0,0 +1,12 @@ +import { Scan } from '@vicons/tabler'; +import { defineTool } from '../tool'; + +export const tool = defineTool({ + name: 'OCRize image and PDF', + path: '/ocr-image', + description: 'Perform OCR (Tesseract) on an image or PDF', + keywords: ['ocr', 'image', 'tesseract', 'pdf'], + component: () => import('./ocr-image.vue'), + icon: Scan, + createdAt: new Date('2024-03-09'), +}); diff --git a/src/tools/ocr-image/ocr-image.vue b/src/tools/ocr-image/ocr-image.vue new file mode 100644 index 00000000..9609d7e2 --- /dev/null +++ b/src/tools/ocr-image/ocr-image.vue @@ -0,0 +1,251 @@ + + + + + + + + + + + + + + OCR + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/tools/text-statistics/text-statistics.service.test.ts b/src/tools/text-statistics/text-statistics.service.test.ts index 18ffc399..88d241bb 100644 --- a/src/tools/text-statistics/text-statistics.service.test.ts +++ b/src/tools/text-statistics/text-statistics.service.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest'; -import { getStringSizeInBytes } from './text-statistics.service'; +import { getStringSizeInBytes, textStatistics } from './text-statistics.service'; describe('text-statistics', () => { describe('getStringSizeInBytes', () => { @@ -11,4 +11,114 @@ describe('text-statistics', () => { expect(getStringSizeInBytes('aaaaaaaaaa')).toEqual(10); }); }); + + describe('textStatistics', () => { + it('should return text statistics', () => { + expect(textStatistics('a')).toEqual({ + chars: 1, + chars_digits: 0, + chars_lower: 1, + chars_no_spaces: 1, + chars_puncts: 0, + chars_spaces: 0, + chars_upper: 0, + lines: 1, + sentences: 1, + words: 1, + words_no_puncs: 1, + }); + expect(textStatistics('A')).toEqual({ + chars: 1, + chars_digits: 0, + chars_lower: 0, + chars_no_spaces: 1, + chars_puncts: 0, + chars_spaces: 0, + chars_upper: 1, + lines: 1, + sentences: 1, + words: 1, + words_no_puncs: 1, + }); + expect(textStatistics('a a')).toEqual({ + chars: 3, + chars_digits: 0, + chars_lower: 2, + chars_no_spaces: 2, + chars_puncts: 0, + chars_spaces: 1, + chars_upper: 0, + lines: 1, + sentences: 1, + words: 2, + words_no_puncs: 2, + }); + expect(textStatistics('A a ; 1')).toEqual({ + chars: 7, + chars_digits: 1, + chars_lower: 1, + chars_no_spaces: 4, + chars_puncts: 1, + chars_spaces: 3, + chars_upper: 1, + lines: 1, + sentences: 1, + words: 4, + words_no_puncs: 3, + }); + expect(textStatistics('Some sentence! Une autre phrase ? « et avec des chiffres 1234 ! »')).toEqual({ + chars: 65, + chars_digits: 4, + chars_lower: 41, + chars_no_spaces: 52, + chars_puncts: 5, + chars_spaces: 13, + chars_upper: 2, + lines: 1, + sentences: 3, + words: 14, + words_no_puncs: 10, + }); + expect(textStatistics(`Some sentence! Une autre phrase ? + « et avec des chiffres 1234 ! »`)).toEqual({ + chars: 72, + chars_digits: 4, + chars_lower: 41, + chars_no_spaces: 52, + chars_puncts: 5, + chars_spaces: 20, + chars_upper: 2, + lines: 2, + sentences: 3, + words: 14, + words_no_puncs: 10, + }); + expect(textStatistics('12 35')).toEqual({ + chars: 5, + chars_digits: 4, + chars_lower: 0, + chars_no_spaces: 4, + chars_puncts: 0, + chars_spaces: 1, + chars_upper: 0, + lines: 1, + sentences: 1, + words: 2, + words_no_puncs: 2, + }); + expect(textStatistics(' 1 2 3. Other ')).toEqual({ + chars: 14, + chars_digits: 3, + chars_lower: 4, + chars_no_spaces: 9, + chars_puncts: 1, + chars_spaces: 5, + chars_upper: 1, + lines: 1, + sentences: 2, + words: 4, + words_no_puncs: 4, + }); + }); + }); }); diff --git a/src/tools/text-statistics/text-statistics.service.ts b/src/tools/text-statistics/text-statistics.service.ts index a69443c0..49f90994 100644 --- a/src/tools/text-statistics/text-statistics.service.ts +++ b/src/tools/text-statistics/text-statistics.service.ts @@ -1,3 +1,19 @@ export function getStringSizeInBytes(text: string) { return new TextEncoder().encode(text).buffer.byteLength; } + +export function textStatistics(text: string) { + return { + chars: text.length, + chars_no_spaces: text.replace(/\s+/ug, '').length, + chars_upper: text.replace(/[^\p{Lu}]/ug, '').length, + chars_lower: text.replace(/[^\p{Ll}]/ug, '').length, + chars_digits: text.replace(/\D+/ug, '').length, + chars_puncts: text.replace(/[^\p{P}]/ug, '').length, + chars_spaces: text.replace(/\S/ug, '').length, + words: text.trim().split(/\s+/).length, + words_no_puncs: text.replace(/\p{P}/ug, '').trim().split(/\s+/).length, + sentences: (`${text} `).split(/\w\s*[\.!\?][\s\p{P}]*\s/u).filter(s => s && s?.length > 0).length, + lines: text.split(/\r\n|\r|\n/).length, + }; +} diff --git a/src/ui/c-file-upload/c-file-upload.vue b/src/ui/c-file-upload/c-file-upload.vue index b48d8c3b..ecb7f1e4 100644 --- a/src/ui/c-file-upload/c-file-upload.vue +++ b/src/ui/c-file-upload/c-file-upload.vue @@ -5,10 +5,12 @@ const props = withDefaults(defineProps<{ multiple?: boolean accept?: string title?: string + pasteImage?: boolean }>(), { multiple: false, accept: undefined, title: 'Drag and drop files here, or click to select files', + pasteImage: false, }); const emit = defineEmits<{ @@ -16,11 +18,31 @@ const emit = defineEmits<{ (event: 'fileUpload', file: File): void }>(); -const { multiple } = toRefs(props); +const { multiple, pasteImage } = toRefs(props); const isOverDropZone = ref(false); +function toBase64(file: File) { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.readAsDataURL(file); + reader.onload = () => resolve(reader.result?.toString() ?? ''); + reader.onerror = error => reject(error); + }); +} + const fileInput = ref(null); +const imgPreview = ref(null); +async function handlePreview(image: File) { + if (imgPreview.value) { + imgPreview.value.src = await toBase64(image); + } +} +function clearPreview() { + if (imgPreview.value) { + imgPreview.value.src = ''; + } +} function triggerFileInput() { fileInput.value?.click(); @@ -39,7 +61,30 @@ function handleDrop(event: DragEvent) { handleUpload(files); } -function handleUpload(files: FileList | null | undefined) { +async function onPasteImage(evt: ClipboardEvent) { + if (!pasteImage.value) { + return false; + } + + const items = evt.clipboardData?.items; + if (!items) { + return false; + } + for (let i = 0; i < items.length; i++) { + if (items[i].type.includes('image')) { + const imageFile = items[i].getAsFile(); + if (imageFile) { + await handlePreview(imageFile); + emit('fileUpload', imageFile); + } + } + } + return true; +} + +async function handleUpload(files: FileList | null | undefined) { + clearPreview(); + if (_.isNil(files) || _.isEmpty(files)) { return; } @@ -49,6 +94,7 @@ function handleUpload(files: FileList | null | undefined) { return; } + await handlePreview(files[0]); emit('fileUpload', files[0]); } @@ -60,6 +106,7 @@ function handleUpload(files: FileList | null | undefined) { 'border-primary border-opacity-100': isOverDropZone, }" @click="triggerFileInput" + @paste.prevent="onPasteImage" @drop.prevent="handleDrop" @dragover.prevent @dragenter="isOverDropZone = true" @@ -73,6 +120,7 @@ function handleUpload(files: FileList | null | undefined) { :accept="accept" @change="handleFileInput" > + {{ title }} @@ -90,6 +138,22 @@ function handleUpload(files: FileList | null | undefined) { Browse files + + + + + + + or + + + + + Paste an image from clipboard + + + + diff --git a/vite.config.ts b/vite.config.ts index f98f251c..845c5311 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -117,4 +117,12 @@ export default defineConfig({ build: { target: 'esnext', }, + optimizeDeps: { + include: ['pdfjs-dist'], // optionally specify dependency name + esbuildOptions: { + supported: { + 'top-level-await': true, + }, + }, + }, });
Paste an image from clipboard