diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f4b91a..f6a93a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # Release notes +## 5.14.0 + +### Improvements + +* We've improved the accuracy of barcode scanning on identity documents + +### Changes to MRTDRecognizer + +* We've added `MRTD_TYPE_BORDER_CROSSING_CARD` type to MRTD enum + +### Platform-related SDK changes + +* We've added a camera management UI module for the selection of connected cameras + * We've added `VideoRecognizer.changeCameraDevice` method that can be used to change the active camera device during the scanning session +* We've improved accessibility of the UI component by changing background contrasts and increasing default font sizes + +### Bug fixes + +* We've optimised memory usage of the SDK by fixing a problem where every refresh of the UI component would result in a new instance of web worker + ## 5.13.0 ### New additions to our supported document list diff --git a/README.md b/README.md index 80d23a2..ca42c61 100644 --- a/README.md +++ b/README.md @@ -237,7 +237,23 @@ For example, in `package.json` you should have something like `"@microblink/blin cameraFeed, recognizerRunner ); + + // There is more than one way to handle recognition + + // Using the recognize() method will provide you with the default behavior, + // such as built-in error handling, timeout and video feed pausing. const processResult = await videoRecognizer.recognize(); + + // Using the startRecognition() method allows you to pass your own onScanningDone callback, + // giving you the option to create custom behavior. + const processResult = await videoRecognizer.startRecognition( + async ( recognitionState ) => + { + videoRecognizer.pauseRecognition(); + return recognitionState; + } + ); + // To obtain recognition results see next step } catch ( error ) @@ -252,7 +268,7 @@ For example, in `package.json` you should have something like `"@microblink/blin } ``` -6. If `processResult` returned from `VideoRecognizer's` method `recognize` is not `BlinkIDImageCaptureSDK.RecognizerResultState.Empty`, then at least one recognizer given to the `RecognizerRunner` above contains a recognition result. You can extract the result from each recognizer using its `getResult` method: +6. If `processResult` returned from `VideoRecognizer's` method `recognize` or `startRecognition` is not `BlinkIDImageCaptureSDK.RecognizerResultState.Empty`, then at least one recognizer given to the `RecognizerRunner` above contains a recognition result. You can extract the result from each recognizer using its `getResult` method: ```typescript if ( processResult !== BlinkIDImageCaptureSDK.RecognizerResultState.Empty ) diff --git a/client-library/package-lock.json b/client-library/package-lock.json index d92cb88..b0b9428 100644 --- a/client-library/package-lock.json +++ b/client-library/package-lock.json @@ -18,20 +18,20 @@ "dev": true }, "@babel/core": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.15.0.tgz", - "integrity": "sha512-tXtmTminrze5HEUPn/a0JtOzzfp0nk+UEXQ/tqIJo3WDGypl/2OFQEMll/zSFU8f/lfmfLXvTaORHF3cfXIQMw==", + "version": "7.15.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.15.5.tgz", + "integrity": "sha512-pYgXxiwAgQpgM1bNkZsDEq85f0ggXMA5L7c+o3tskGMh2BunCI9QUwB9Z4jpvXUOuMdyGKiGKQiRe11VS6Jzvg==", "dev": true, "requires": { "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.15.0", - "@babel/helper-compilation-targets": "^7.15.0", - "@babel/helper-module-transforms": "^7.15.0", - "@babel/helpers": "^7.14.8", - "@babel/parser": "^7.15.0", - "@babel/template": "^7.14.5", - "@babel/traverse": "^7.15.0", - "@babel/types": "^7.15.0", + "@babel/generator": "^7.15.4", + "@babel/helper-compilation-targets": "^7.15.4", + "@babel/helper-module-transforms": "^7.15.4", + "@babel/helpers": "^7.15.4", + "@babel/parser": "^7.15.5", + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -41,20 +41,20 @@ } }, "@babel/generator": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.0.tgz", - "integrity": "sha512-eKl4XdMrbpYvuB505KTta4AV9g+wWzmVBW69tX0H2NwKVKd2YJbKgyK6M8j/rgLbmHOYJn6rUklV677nOyJrEQ==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.4.tgz", + "integrity": "sha512-d3itta0tu+UayjEORPNz6e1T3FtvWlP5N4V5M+lhp/CxT4oAA7/NcScnpRyspUMLK6tu9MNHmQHxRykuN2R7hw==", "dev": true, "requires": { - "@babel/types": "^7.15.0", + "@babel/types": "^7.15.4", "jsesc": "^2.5.1", "source-map": "^0.5.0" } }, "@babel/helper-compilation-targets": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.0.tgz", - "integrity": "sha512-h+/9t0ncd4jfZ8wsdAsoIxSa61qhBYlycXiHWqJaQBCXAhDCMbPRSMTGnZIkkmt1u4ag+UQmuqcILwqKzZ4N2A==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.4.tgz", + "integrity": "sha512-rMWPCirulnPSe4d+gwdWXLfAXTTBj8M3guAf5xFQJ0nvFY7tfNAFnWdqaHegHlgDZOCT4qvhF3BYlSJag8yhqQ==", "dev": true, "requires": { "@babel/compat-data": "^7.15.0", @@ -64,111 +64,111 @@ } }, "@babel/helper-function-name": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz", - "integrity": "sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.15.4.tgz", + "integrity": "sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.14.5", - "@babel/template": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/helper-get-function-arity": "^7.15.4", + "@babel/template": "^7.15.4", + "@babel/types": "^7.15.4" } }, "@babel/helper-get-function-arity": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz", - "integrity": "sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz", + "integrity": "sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.15.4" } }, "@babel/helper-hoist-variables": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.14.5.tgz", - "integrity": "sha512-R1PXiz31Uc0Vxy4OEOm07x0oSjKAdPPCh3tPivn/Eo8cvz6gveAeuyUUPB21Hoiif0uoPQSSdhIPS3352nvdyQ==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.15.4.tgz", + "integrity": "sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.15.4" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.0.tgz", - "integrity": "sha512-Jq8H8U2kYiafuj2xMTPQwkTBnEEdGKpT35lJEQsRRjnG0LW3neucsaMWLgKcwu3OHKNeYugfw+Z20BXBSEs2Lg==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.4.tgz", + "integrity": "sha512-cokOMkxC/BTyNP1AlY25HuBWM32iCEsLPI4BHDpJCHHm1FU2E7dKWWIXJgQgSFiu4lp8q3bL1BIKwqkSUviqtA==", "dev": true, "requires": { - "@babel/types": "^7.15.0" + "@babel/types": "^7.15.4" } }, "@babel/helper-module-imports": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.14.5.tgz", - "integrity": "sha512-SwrNHu5QWS84XlHwGYPDtCxcA0hrSlL2yhWYLgeOc0w7ccOl2qv4s/nARI0aYZW+bSwAL5CukeXA47B/1NKcnQ==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.15.4.tgz", + "integrity": "sha512-jeAHZbzUwdW/xHgHQ3QmWR4Jg6j15q4w/gCfwZvtqOxoo5DKtLHk8Bsf4c5RZRC7NmLEs+ohkdq8jFefuvIxAA==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.15.4" } }, "@babel/helper-module-transforms": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.0.tgz", - "integrity": "sha512-RkGiW5Rer7fpXv9m1B3iHIFDZdItnO2/BLfWVW/9q7+KqQSDY5kUfQEbzdXM1MVhJGcugKV7kRrNVzNxmk7NBg==", + "version": "7.15.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.7.tgz", + "integrity": "sha512-ZNqjjQG/AuFfekFTY+7nY4RgBSklgTu970c7Rj3m/JOhIu5KPBUuTA9AY6zaKcUvk4g6EbDXdBnhi35FAssdSw==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.14.5", - "@babel/helper-replace-supers": "^7.15.0", - "@babel/helper-simple-access": "^7.14.8", - "@babel/helper-split-export-declaration": "^7.14.5", - "@babel/helper-validator-identifier": "^7.14.9", - "@babel/template": "^7.14.5", - "@babel/traverse": "^7.15.0", - "@babel/types": "^7.15.0" + "@babel/helper-module-imports": "^7.15.4", + "@babel/helper-replace-supers": "^7.15.4", + "@babel/helper-simple-access": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4", + "@babel/helper-validator-identifier": "^7.15.7", + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.6" } }, "@babel/helper-optimise-call-expression": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.14.5.tgz", - "integrity": "sha512-IqiLIrODUOdnPU9/F8ib1Fx2ohlgDhxnIDU7OEVi+kAbEZcyiF7BLU8W6PfvPi9LzztjS7kcbzbmL7oG8kD6VA==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.15.4.tgz", + "integrity": "sha512-E/z9rfbAOt1vDW1DR7k4SzhzotVV5+qMciWV6LaG1g4jeFrkDlJedjtV4h0i4Q/ITnUu+Pk08M7fczsB9GXBDw==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.15.4" } }, "@babel/helper-replace-supers": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.0.tgz", - "integrity": "sha512-6O+eWrhx+HEra/uJnifCwhwMd6Bp5+ZfZeJwbqUTuqkhIT6YcRhiZCOOFChRypOIe0cV46kFrRBlm+t5vHCEaA==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.4.tgz", + "integrity": "sha512-/ztT6khaXF37MS47fufrKvIsiQkx1LBRvSJNzRqmbyeZnTwU9qBxXYLaaT/6KaxfKhjs2Wy8kG8ZdsFUuWBjzw==", "dev": true, "requires": { - "@babel/helper-member-expression-to-functions": "^7.15.0", - "@babel/helper-optimise-call-expression": "^7.14.5", - "@babel/traverse": "^7.15.0", - "@babel/types": "^7.15.0" + "@babel/helper-member-expression-to-functions": "^7.15.4", + "@babel/helper-optimise-call-expression": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4" } }, "@babel/helper-simple-access": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.14.8.tgz", - "integrity": "sha512-TrFN4RHh9gnWEU+s7JloIho2T76GPwRHhdzOWLqTrMnlas8T9O7ec+oEDNsRXndOmru9ymH9DFrEOxpzPoSbdg==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.15.4.tgz", + "integrity": "sha512-UzazrDoIVOZZcTeHHEPYrr1MvTR/K+wgLg6MY6e1CJyaRhbibftF6fR2KU2sFRtI/nERUZR9fBd6aKgBlIBaPg==", "dev": true, "requires": { - "@babel/types": "^7.14.8" + "@babel/types": "^7.15.4" } }, "@babel/helper-split-export-declaration": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.14.5.tgz", - "integrity": "sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.15.4.tgz", + "integrity": "sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.15.4" } }, "@babel/helper-validator-identifier": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", - "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==", + "version": "7.15.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", + "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", "dev": true }, "@babel/helper-validator-option": { @@ -178,14 +178,14 @@ "dev": true }, "@babel/helpers": { - "version": "7.15.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.3.tgz", - "integrity": "sha512-HwJiz52XaS96lX+28Tnbu31VeFSQJGOeKHJeaEPQlTl7PnlhFElWPj8tUXtqFIzeN86XxXoBr+WFAyK2PPVz6g==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.4.tgz", + "integrity": "sha512-V45u6dqEJ3w2rlryYYXf6i9rQ5YMNu4FLS6ngs8ikblhu2VdR1AqAd6aJjBzmf2Qzh6KOLqKHxEN9+TFbAkAVQ==", "dev": true, "requires": { - "@babel/template": "^7.14.5", - "@babel/traverse": "^7.15.0", - "@babel/types": "^7.15.0" + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4" } }, "@babel/highlight": { @@ -200,43 +200,43 @@ } }, "@babel/parser": { - "version": "7.15.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.3.tgz", - "integrity": "sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA==", + "version": "7.15.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.7.tgz", + "integrity": "sha512-rycZXvQ+xS9QyIcJ9HXeDWf1uxqlbVFAUq0Rq0dbc50Zb/+wUe/ehyfzGfm9KZZF0kBejYgxltBXocP+gKdL2g==", "dev": true }, "@babel/template": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.14.5.tgz", - "integrity": "sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.15.4.tgz", + "integrity": "sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg==", "dev": true, "requires": { "@babel/code-frame": "^7.14.5", - "@babel/parser": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/parser": "^7.15.4", + "@babel/types": "^7.15.4" } }, "@babel/traverse": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.0.tgz", - "integrity": "sha512-392d8BN0C9eVxVWd8H6x9WfipgVH5IaIoLp23334Sc1vbKKWINnvwRpb4us0xtPaCumlwbTtIYNA0Dv/32sVFw==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.4.tgz", + "integrity": "sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA==", "dev": true, "requires": { "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.15.0", - "@babel/helper-function-name": "^7.14.5", - "@babel/helper-hoist-variables": "^7.14.5", - "@babel/helper-split-export-declaration": "^7.14.5", - "@babel/parser": "^7.15.0", - "@babel/types": "^7.15.0", + "@babel/generator": "^7.15.4", + "@babel/helper-function-name": "^7.15.4", + "@babel/helper-hoist-variables": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4", + "@babel/parser": "^7.15.4", + "@babel/types": "^7.15.4", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.0.tgz", - "integrity": "sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ==", + "version": "7.15.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.6.tgz", + "integrity": "sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.14.9", @@ -285,9 +285,9 @@ "dev": true }, "@types/node": { - "version": "16.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.6.1.tgz", - "integrity": "sha512-Sr7BhXEAer9xyGuCN3Ek9eg9xPviCF2gfu9kTfuU2HkTVAMYSDeX40fvpmo72n5nansg3nsBjuQBrsS28r+NUw==", + "version": "16.10.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.2.tgz", + "integrity": "sha512-zCclL4/rx+W5SQTzFs9wyvvyCwoK9QtBpratqz2IYJ3O8Umrn0m3nsTv0wQBk9sRGpvUe9CwPDrQFB10f1FIjQ==", "dev": true }, "@types/resolve": { @@ -325,16 +325,16 @@ } }, "browserslist": { - "version": "4.16.7", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.7.tgz", - "integrity": "sha512-7I4qVwqZltJ7j37wObBe3SoTz+nS8APaNcrBOlgoirb6/HbEU2XxW/LpUDTCngM6iauwFqmRTuOMfyKnFGY5JA==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.2.tgz", + "integrity": "sha512-jSDZyqJmkKMEMi7SZAgX5UltFdR5NAO43vY0AwTpu4X3sGH7GLLQ83KiUomgrnvZRCeW0yPPnKqnxPqQOER9zQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001248", - "colorette": "^1.2.2", - "electron-to-chromium": "^1.3.793", + "caniuse-lite": "^1.0.30001261", + "electron-to-chromium": "^1.3.854", "escalade": "^3.1.1", - "node-releases": "^1.1.73" + "nanocolors": "^0.2.12", + "node-releases": "^1.1.76" } }, "buffer-from": { @@ -350,9 +350,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001251", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001251.tgz", - "integrity": "sha512-HOe1r+9VkU4TFmnU70z+r7OLmtR+/chB1rdcJUeQlAinjEeb0cKL20tlAtOagNZhbrtLnCvV19B4FmF1rgzl6A==", + "version": "1.0.30001264", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001264.tgz", + "integrity": "sha512-Ftfqqfcs/ePiUmyaySsQ4PUsdcYyXG2rfoBVsk3iY1ahHaJEw65vfb7Suzqm+cEkwwPIv/XWkg27iCpRavH4zA==", "dev": true }, "chalk": { @@ -381,12 +381,6 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, - "colorette": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.3.0.tgz", - "integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==", - "dev": true - }, "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -430,9 +424,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.805", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.805.tgz", - "integrity": "sha512-uUJF59M6pNSRHQaXwdkaNB4BhSQ9lldRdG1qCjlrAFkynPGDc5wPoUcYEQQeQGmKyAWJPvGkYAWmtVrxWmDAkg==", + "version": "1.3.857", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.857.tgz", + "integrity": "sha512-a5kIr2lajm4bJ5E4D3fp8Y/BRB0Dx2VOcCRE5Gtb679mXIME/OFhWler8Gy2ksrf8gFX+EFCSIGA33FB3gqYpg==", "dev": true }, "escalade": { @@ -454,9 +448,9 @@ "dev": true }, "find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", "dev": true, "requires": { "commondir": "^1.0.1", @@ -511,9 +505,9 @@ "dev": true }, "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -568,9 +562,9 @@ "dev": true }, "is-core-module": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz", - "integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.7.0.tgz", + "integrity": "sha512-ByY+tjCciCr+9nLryBYcSD50EOGWt95c7tIsKTG1J2ixKKXPvF7Ej3AVd+UfDydAJom3biBGDBALaO79ktwgEQ==", "dev": true, "requires": { "has": "^1.0.3" @@ -685,10 +679,16 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "nanocolors": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/nanocolors/-/nanocolors-0.2.12.tgz", + "integrity": "sha512-SFNdALvzW+rVlzqexid6epYdt8H9Zol7xDoQarioEFcFN0JHo4CYNztAxmtfgGTVRCmFlEOqqhBpoFGKqSAMug==", + "dev": true + }, "node-releases": { - "version": "1.1.74", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.74.tgz", - "integrity": "sha512-caJBVempXZPepZoZAPCWRTNxYQ+xtG/KAi4ozTA5A+nJ7IU+kLQCbqaUjb5Rwy14M9upBWiQ4NutcmW04LJSRw==", + "version": "1.1.77", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.77.tgz", + "integrity": "sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ==", "dev": true }, "once": { @@ -786,9 +786,9 @@ } }, "rollup": { - "version": "2.56.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.56.2.tgz", - "integrity": "sha512-s8H00ZsRi29M2/lGdm1u8DJpJ9ML8SUOpVVBd33XNeEeL3NVaTiUcSBHzBdF3eAyR0l7VSpsuoVUGrRHq7aPwQ==", + "version": "2.58.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.58.0.tgz", + "integrity": "sha512-NOXpusKnaRpbS7ZVSzcEXqxcLDOagN6iFS8p45RkoiMqPHDLwJm758UF05KlMoCRbLBTZsPOIa887gZJ1AiXvw==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -858,9 +858,9 @@ "dev": true }, "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "version": "0.5.20", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", + "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -885,14 +885,14 @@ } }, "terser": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.7.1.tgz", - "integrity": "sha512-b3e+d5JbHAe/JSjwsC3Zn55wsBIM7AsHLjKxT31kGCldgbpFePaFo+PiddtO6uwRZWRw7sPXmAN8dTW61xmnSg==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.9.0.tgz", + "integrity": "sha512-h5hxa23sCdpzcye/7b8YqbE5OwKca/ni0RQz1uRX3tGh8haaGHqcuSqbGRybuAKNdntZ0mDgFNXPJ48xQ2RXKQ==", "dev": true, "requires": { "commander": "^2.20.0", "source-map": "~0.7.2", - "source-map-support": "~0.5.19" + "source-map-support": "~0.5.20" }, "dependencies": { "source-map": { @@ -916,9 +916,9 @@ "dev": true }, "typescript": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", - "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.3.tgz", + "integrity": "sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==", "dev": true }, "universalify": { diff --git a/examples/blinkid-camera/javascript/app.js b/examples/blinkid-camera/javascript/app.js index 4bc1eeb..ca630de 100644 --- a/examples/blinkid-camera/javascript/app.js +++ b/examples/blinkid-camera/javascript/app.js @@ -35,11 +35,11 @@ function main() } // 1. It's possible to obtain a free trial license key on microblink.com - let licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPgo/w35CpGFWLwUXza1htObpRih8QOvGrTQkcxdS4jAQV5d17d4zNLUVZRwTIjjr0gaYz+v4H++9CE49zVdEv18K9TNNU8BEnCYW6bthX1CABGUpVVJLoR8PlRPBNDhFI2KlQj/zPXu955Wc+b+Cvm8IPJOLO0FuMmtn4RL7bSPDeJs62WRv6G00bgY0Ha8jKkoWOki/5+4KKP1g0Vp4YMOG7tc="; + let licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPgo/w35CpGFWKcUTzWfFms+1HtOJBLOa0Z9jQdHUQo1EWP1afmump3DAd/zRkoNODh6Y9FtA1eYVaya36wQmmWpLEliFyV9va44nCIrCRqyoUzeQolAjPINbKGqHklMsfYekNYLDA2i+7zfxUF8Ac3eQ3FiDhrN3d1l+36UjfUfU9e6omHNFxdqysdOxvgVw9bNH8fjbKRmI1CJHbJmb1AWmi2YGwk0="; if ( window.location.hostname === "blinkid.github.io" ) { - licenseKey = "sRwAAAYRYmxpbmtpZC5naXRodWIuaW+qBF9heYYlTvZbvmaACK9LsOPr2Dus6G8yiiYYl5VQwUApVeP999MMDDDO5rn2MaO8V+8T49z3hjPjRAjrZoTNaT0aQxP+eiYnG4hKWeWdhAO6eciw8G3RPZLibIy9qXZpSpmh7IkJaKtMeUkuWYTRIMc6c6LIdjFd/rfMeTrvF2WEIksMW1v5eD0XphdjoYGM8RLV/fGtftidb2+7RfIdhLEjOZfM9w=="; + licenseKey = "sRwAAAYRYmxpbmtpZC5naXRodWIuaW+qBF9heYYlTvZbvmaGyKtLQks1inX9LpYE8wI2jFaCiL8plqSE9Fb5+jgzGLhYWH53IlLSx6CvKy8gxG5w1R7BpZMaJdup3M6htIaa+wLELlTbr8FPWQNDQuKh7Qr+M9qkMAJFdzRatyvTz7CaS5rEE4gOSXLVk/DaIYt1WSHb9tzfyoo4h1g8hDh38ZiwpaW/vJyZi6pEDF1ESLjX5q+LZUU4qOuYUOTUUQ=="; } // 2. Create instance of SDK load settings with your license key diff --git a/examples/blinkid-camera/javascript/index.html b/examples/blinkid-camera/javascript/index.html index e283569..3876c7b 100644 --- a/examples/blinkid-camera/javascript/index.html +++ b/examples/blinkid-camera/javascript/index.html @@ -24,7 +24,7 @@

Loading...

- - + + diff --git a/examples/blinkid-camera/typescript/package.json b/examples/blinkid-camera/typescript/package.json index 58c1c6d..dc48c2a 100644 --- a/examples/blinkid-camera/typescript/package.json +++ b/examples/blinkid-camera/typescript/package.json @@ -19,6 +19,6 @@ "typescript": "^3.9.5" }, "dependencies": { - "@microblink/blinkid-imagecapture-in-browser-sdk": "~5.13.0" + "@microblink/blinkid-imagecapture-in-browser-sdk": "~5.14.0" } } \ No newline at end of file diff --git a/examples/blinkid-camera/typescript/src/app.ts b/examples/blinkid-camera/typescript/src/app.ts index da04479..31b3dd6 100644 --- a/examples/blinkid-camera/typescript/src/app.ts +++ b/examples/blinkid-camera/typescript/src/app.ts @@ -37,7 +37,7 @@ function main() } // 1. It's possible to obtain a free trial license key on microblink.com - const licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPgo/w35CpGFWLwUXza1htObpRih8QOvGrTQkcxdS4jAQV5d17d4zNLUVZRwTIjjr0gaYz+v4H++9CE49zVdEv18K9TNNU8BEnCYW6bthX1CABGUpVVJLoR8PlRPBNDhFI2KlQj/zPXu955Wc+b+Cvm8IPJOLO0FuMmtn4RL7bSPDeJs62WRv6G00bgY0Ha8jKkoWOki/5+4KKP1g0Vp4YMOG7tc="; + const licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPgo/w35CpGFWKcUTzWfFms+1HtOJBLOa0Z9jQdHUQo1EWP1afmump3DAd/zRkoNODh6Y9FtA1eYVaya36wQmmWpLEliFyV9va44nCIrCRqyoUzeQolAjPINbKGqHklMsfYekNYLDA2i+7zfxUF8Ac3eQ3FiDhrN3d1l+36UjfUfU9e6omHNFxdqysdOxvgVw9bNH8fjbKRmI1CJHbJmb1AWmi2YGwk0="; // 2. Create instance of SDK load settings with your license key const loadSettings = new BlinkIDImageCaptureSDK.WasmSDKLoadSettings( licenseKey ); diff --git a/examples/blinkid-file/javascript/app.js b/examples/blinkid-file/javascript/app.js index 084a866..cac388a 100644 --- a/examples/blinkid-file/javascript/app.js +++ b/examples/blinkid-file/javascript/app.js @@ -30,11 +30,11 @@ function main() } // 1. It's possible to obtain a free trial license key on microblink.com - let licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPgo/w35CpGFWLwUXza1htObpRih8QOvGrTQkcxdS4jAQV5d17d4zNLUVZRwTIjjr0gaYz+v4H++9CE49zVdEv18K9TNNU8BEnCYW6bthX1CABGUpVVJLoR8PlRPBNDhFI2KlQj/zPXu955Wc+b+Cvm8IPJOLO0FuMmtn4RL7bSPDeJs62WRv6G00bgY0Ha8jKkoWOki/5+4KKP1g0Vp4YMOG7tc="; + let licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPgo/w35CpGFWKcUTzWfFms+1HtOJBLOa0Z9jQdHUQo1EWP1afmump3DAd/zRkoNODh6Y9FtA1eYVaya36wQmmWpLEliFyV9va44nCIrCRqyoUzeQolAjPINbKGqHklMsfYekNYLDA2i+7zfxUF8Ac3eQ3FiDhrN3d1l+36UjfUfU9e6omHNFxdqysdOxvgVw9bNH8fjbKRmI1CJHbJmb1AWmi2YGwk0="; if ( window.location.hostname === "blinkid.github.io" ) { - licenseKey = "sRwAAAYRYmxpbmtpZC5naXRodWIuaW+qBF9heYYlTvZbvmaACK9LsOPr2Dus6G8yiiYYl5VQwUApVeP999MMDDDO5rn2MaO8V+8T49z3hjPjRAjrZoTNaT0aQxP+eiYnG4hKWeWdhAO6eciw8G3RPZLibIy9qXZpSpmh7IkJaKtMeUkuWYTRIMc6c6LIdjFd/rfMeTrvF2WEIksMW1v5eD0XphdjoYGM8RLV/fGtftidb2+7RfIdhLEjOZfM9w=="; + licenseKey = "sRwAAAYRYmxpbmtpZC5naXRodWIuaW+qBF9heYYlTvZbvmaGyKtLQks1inX9LpYE8wI2jFaCiL8plqSE9Fb5+jgzGLhYWH53IlLSx6CvKy8gxG5w1R7BpZMaJdup3M6htIaa+wLELlTbr8FPWQNDQuKh7Qr+M9qkMAJFdzRatyvTz7CaS5rEE4gOSXLVk/DaIYt1WSHb9tzfyoo4h1g8hDh38ZiwpaW/vJyZi6pEDF1ESLjX5q+LZUU4qOuYUOTUUQ=="; } // 2. Create instance of SDK load settings with your license key diff --git a/examples/blinkid-file/javascript/index.html b/examples/blinkid-file/javascript/index.html index fb48e36..e12bef5 100644 --- a/examples/blinkid-file/javascript/index.html +++ b/examples/blinkid-file/javascript/index.html @@ -23,7 +23,7 @@

Processing...

- - + + diff --git a/examples/blinkid-file/typescript/package.json b/examples/blinkid-file/typescript/package.json index 58c1c6d..dc48c2a 100644 --- a/examples/blinkid-file/typescript/package.json +++ b/examples/blinkid-file/typescript/package.json @@ -19,6 +19,6 @@ "typescript": "^3.9.5" }, "dependencies": { - "@microblink/blinkid-imagecapture-in-browser-sdk": "~5.13.0" + "@microblink/blinkid-imagecapture-in-browser-sdk": "~5.14.0" } } \ No newline at end of file diff --git a/examples/blinkid-file/typescript/src/app.ts b/examples/blinkid-file/typescript/src/app.ts index 1371c3d..223ecb6 100644 --- a/examples/blinkid-file/typescript/src/app.ts +++ b/examples/blinkid-file/typescript/src/app.ts @@ -33,7 +33,7 @@ function main() } // 1. It's possible to obtain a free trial license key on microblink.com - const licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPgo/w35CpGFWLwUXza1htObpRih8QOvGrTQkcxdS4jAQV5d17d4zNLUVZRwTIjjr0gaYz+v4H++9CE49zVdEv18K9TNNU8BEnCYW6bthX1CABGUpVVJLoR8PlRPBNDhFI2KlQj/zPXu955Wc+b+Cvm8IPJOLO0FuMmtn4RL7bSPDeJs62WRv6G00bgY0Ha8jKkoWOki/5+4KKP1g0Vp4YMOG7tc="; + const licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPgo/w35CpGFWKcUTzWfFms+1HtOJBLOa0Z9jQdHUQo1EWP1afmump3DAd/zRkoNODh6Y9FtA1eYVaya36wQmmWpLEliFyV9va44nCIrCRqyoUzeQolAjPINbKGqHklMsfYekNYLDA2i+7zfxUF8Ac3eQ3FiDhrN3d1l+36UjfUfU9e6omHNFxdqysdOxvgVw9bNH8fjbKRmI1CJHbJmb1AWmi2YGwk0="; // 2. Create instance of SDK load settings with your license key const loadSettings = new BlinkIDImageCaptureSDK.WasmSDKLoadSettings( licenseKey ); diff --git a/examples/combined-file/javascript/app.js b/examples/combined-file/javascript/app.js index 1f06995..1a448f5 100644 --- a/examples/combined-file/javascript/app.js +++ b/examples/combined-file/javascript/app.js @@ -30,11 +30,11 @@ function main() } // 1. It's possible to obtain a free trial license key on microblink.com - let licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPgo/w35CpGFWLwUXza1htObpRih8QOvGrTQkcxdS4jAQV5d17d4zNLUVZRwTIjjr0gaYz+v4H++9CE49zVdEv18K9TNNU8BEnCYW6bthX1CABGUpVVJLoR8PlRPBNDhFI2KlQj/zPXu955Wc+b+Cvm8IPJOLO0FuMmtn4RL7bSPDeJs62WRv6G00bgY0Ha8jKkoWOki/5+4KKP1g0Vp4YMOG7tc="; + let licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPgo/w35CpGFWKcUTzWfFms+1HtOJBLOa0Z9jQdHUQo1EWP1afmump3DAd/zRkoNODh6Y9FtA1eYVaya36wQmmWpLEliFyV9va44nCIrCRqyoUzeQolAjPINbKGqHklMsfYekNYLDA2i+7zfxUF8Ac3eQ3FiDhrN3d1l+36UjfUfU9e6omHNFxdqysdOxvgVw9bNH8fjbKRmI1CJHbJmb1AWmi2YGwk0="; if ( window.location.hostname === "blinkid.github.io" ) { - licenseKey = "sRwAAAYRYmxpbmtpZC5naXRodWIuaW+qBF9heYYlTvZbvmaACK9LsOPr2Dus6G8yiiYYl5VQwUApVeP999MMDDDO5rn2MaO8V+8T49z3hjPjRAjrZoTNaT0aQxP+eiYnG4hKWeWdhAO6eciw8G3RPZLibIy9qXZpSpmh7IkJaKtMeUkuWYTRIMc6c6LIdjFd/rfMeTrvF2WEIksMW1v5eD0XphdjoYGM8RLV/fGtftidb2+7RfIdhLEjOZfM9w=="; + licenseKey = "sRwAAAYRYmxpbmtpZC5naXRodWIuaW+qBF9heYYlTvZbvmaGyKtLQks1inX9LpYE8wI2jFaCiL8plqSE9Fb5+jgzGLhYWH53IlLSx6CvKy8gxG5w1R7BpZMaJdup3M6htIaa+wLELlTbr8FPWQNDQuKh7Qr+M9qkMAJFdzRatyvTz7CaS5rEE4gOSXLVk/DaIYt1WSHb9tzfyoo4h1g8hDh38ZiwpaW/vJyZi6pEDF1ESLjX5q+LZUU4qOuYUOTUUQ=="; } // 2. Create instance of SDK load settings with your license key diff --git a/examples/combined-file/javascript/index.html b/examples/combined-file/javascript/index.html index ddbbc12..bfc8867 100644 --- a/examples/combined-file/javascript/index.html +++ b/examples/combined-file/javascript/index.html @@ -30,7 +30,7 @@

Processing...

- - + + diff --git a/examples/combined-file/typescript/package.json b/examples/combined-file/typescript/package.json index 58c1c6d..dc48c2a 100644 --- a/examples/combined-file/typescript/package.json +++ b/examples/combined-file/typescript/package.json @@ -19,6 +19,6 @@ "typescript": "^3.9.5" }, "dependencies": { - "@microblink/blinkid-imagecapture-in-browser-sdk": "~5.13.0" + "@microblink/blinkid-imagecapture-in-browser-sdk": "~5.14.0" } } \ No newline at end of file diff --git a/examples/combined-file/typescript/src/app.ts b/examples/combined-file/typescript/src/app.ts index 328a9ce..0e9497c 100644 --- a/examples/combined-file/typescript/src/app.ts +++ b/examples/combined-file/typescript/src/app.ts @@ -33,7 +33,7 @@ function main() } // 1. It's possible to obtain a free trial license key on microblink.com - const licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPgo/w35CpGFWLwUXza1htObpRih8QOvGrTQkcxdS4jAQV5d17d4zNLUVZRwTIjjr0gaYz+v4H++9CE49zVdEv18K9TNNU8BEnCYW6bthX1CABGUpVVJLoR8PlRPBNDhFI2KlQj/zPXu955Wc+b+Cvm8IPJOLO0FuMmtn4RL7bSPDeJs62WRv6G00bgY0Ha8jKkoWOki/5+4KKP1g0Vp4YMOG7tc="; + const licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPgo/w35CpGFWKcUTzWfFms+1HtOJBLOa0Z9jQdHUQo1EWP1afmump3DAd/zRkoNODh6Y9FtA1eYVaya36wQmmWpLEliFyV9va44nCIrCRqyoUzeQolAjPINbKGqHklMsfYekNYLDA2i+7zfxUF8Ac3eQ3FiDhrN3d1l+36UjfUfU9e6omHNFxdqysdOxvgVw9bNH8fjbKRmI1CJHbJmb1AWmi2YGwk0="; // 2. Create instance of SDK load settings with your license key const loadSettings = new BlinkIDImageCaptureSDK.WasmSDKLoadSettings( licenseKey ); diff --git a/examples/combined/javascript/app.js b/examples/combined/javascript/app.js index 171d10c..7e8142e 100644 --- a/examples/combined/javascript/app.js +++ b/examples/combined/javascript/app.js @@ -35,11 +35,11 @@ function main() } // 1. It's possible to obtain a free trial license key on microblink.com - let licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPgo/w35CpGFWLwUXza1htObpRih8QOvGrTQkcxdS4jAQV5d17d4zNLUVZRwTIjjr0gaYz+v4H++9CE49zVdEv18K9TNNU8BEnCYW6bthX1CABGUpVVJLoR8PlRPBNDhFI2KlQj/zPXu955Wc+b+Cvm8IPJOLO0FuMmtn4RL7bSPDeJs62WRv6G00bgY0Ha8jKkoWOki/5+4KKP1g0Vp4YMOG7tc="; + let licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPgo/w35CpGFWKcUTzWfFms+1HtOJBLOa0Z9jQdHUQo1EWP1afmump3DAd/zRkoNODh6Y9FtA1eYVaya36wQmmWpLEliFyV9va44nCIrCRqyoUzeQolAjPINbKGqHklMsfYekNYLDA2i+7zfxUF8Ac3eQ3FiDhrN3d1l+36UjfUfU9e6omHNFxdqysdOxvgVw9bNH8fjbKRmI1CJHbJmb1AWmi2YGwk0="; if ( window.location.hostname === "blinkid.github.io" ) { - licenseKey = "sRwAAAYRYmxpbmtpZC5naXRodWIuaW+qBF9heYYlTvZbvmaACK9LsOPr2Dus6G8yiiYYl5VQwUApVeP999MMDDDO5rn2MaO8V+8T49z3hjPjRAjrZoTNaT0aQxP+eiYnG4hKWeWdhAO6eciw8G3RPZLibIy9qXZpSpmh7IkJaKtMeUkuWYTRIMc6c6LIdjFd/rfMeTrvF2WEIksMW1v5eD0XphdjoYGM8RLV/fGtftidb2+7RfIdhLEjOZfM9w=="; + licenseKey = "sRwAAAYRYmxpbmtpZC5naXRodWIuaW+qBF9heYYlTvZbvmaGyKtLQks1inX9LpYE8wI2jFaCiL8plqSE9Fb5+jgzGLhYWH53IlLSx6CvKy8gxG5w1R7BpZMaJdup3M6htIaa+wLELlTbr8FPWQNDQuKh7Qr+M9qkMAJFdzRatyvTz7CaS5rEE4gOSXLVk/DaIYt1WSHb9tzfyoo4h1g8hDh38ZiwpaW/vJyZi6pEDF1ESLjX5q+LZUU4qOuYUOTUUQ=="; } // 2. Create instance of SDK load settings with your license key diff --git a/examples/combined/javascript/index.html b/examples/combined/javascript/index.html index ca7fdc7..04707c0 100644 --- a/examples/combined/javascript/index.html +++ b/examples/combined/javascript/index.html @@ -24,7 +24,7 @@

Loading...

- - + + diff --git a/examples/combined/typescript/package.json b/examples/combined/typescript/package.json index 58c1c6d..dc48c2a 100644 --- a/examples/combined/typescript/package.json +++ b/examples/combined/typescript/package.json @@ -19,6 +19,6 @@ "typescript": "^3.9.5" }, "dependencies": { - "@microblink/blinkid-imagecapture-in-browser-sdk": "~5.13.0" + "@microblink/blinkid-imagecapture-in-browser-sdk": "~5.14.0" } } \ No newline at end of file diff --git a/examples/combined/typescript/src/app.ts b/examples/combined/typescript/src/app.ts index 097e14c..c74df0f 100644 --- a/examples/combined/typescript/src/app.ts +++ b/examples/combined/typescript/src/app.ts @@ -37,7 +37,7 @@ function main() } // 1. It's possible to obtain a free trial license key on microblink.com - const licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPgo/w35CpGFWLwUXza1htObpRih8QOvGrTQkcxdS4jAQV5d17d4zNLUVZRwTIjjr0gaYz+v4H++9CE49zVdEv18K9TNNU8BEnCYW6bthX1CABGUpVVJLoR8PlRPBNDhFI2KlQj/zPXu955Wc+b+Cvm8IPJOLO0FuMmtn4RL7bSPDeJs62WRv6G00bgY0Ha8jKkoWOki/5+4KKP1g0Vp4YMOG7tc="; + const licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPgo/w35CpGFWKcUTzWfFms+1HtOJBLOa0Z9jQdHUQo1EWP1afmump3DAd/zRkoNODh6Y9FtA1eYVaya36wQmmWpLEliFyV9va44nCIrCRqyoUzeQolAjPINbKGqHklMsfYekNYLDA2i+7zfxUF8Ac3eQ3FiDhrN3d1l+36UjfUfU9e6omHNFxdqysdOxvgVw9bNH8fjbKRmI1CJHbJmb1AWmi2YGwk0="; // 2. Create instance of SDK load settings with your license key const loadSettings = new BlinkIDImageCaptureSDK.WasmSDKLoadSettings( licenseKey ); diff --git a/oss-dependencies/c++-advanced.json b/oss-dependencies/c++-advanced.json index 2477928..13ec46a 100644 --- a/oss-dependencies/c++-advanced.json +++ b/oss-dependencies/c++-advanced.json @@ -6,7 +6,7 @@ "description": "Free peer-reviewed portable C++ source libraries." }, { - "package": "ConcurrentQueue/3.0.1@microblink/stable", + "package": "ConcurrentQueue/3.0.2@microblink/stable", "url": "https://github.com/microblink/concurrentqueue", "license": "Dual licensed under Simplified BSD License and Boost Software License - Version 1.0", "description": "A fast multi-producer, multi-consumer lock-free concurrent queue for C++11" @@ -24,13 +24,13 @@ "description": "Eigen is a C++ template library for linear algebra: vectors, matrices, and related algorithms. It is versatile, fast, elegant and works on many platforms (OS/Compilers)." }, { - "package": "Err/1.1.2@microblink/stable", + "package": "Err/1.1.4@microblink/stable", "url": "https://github.com/microblink/err", "license": "Boost Software License", "description": "err - yet another take on C++ error handling" }, { - "package": "Functionoid/3.0.4@microblink/stable", + "package": "Functionoid/3.0.5@microblink/stable", "url": "https://github.com/microblink/functionoid", "license": "Boost Software License, Version 1.0", "description": "a complete C++17 rewrite of boost/std::function" @@ -42,7 +42,7 @@ "description": "Portable C++ Hashing Library" }, { - "package": "MMap/0.2.0@microblink/stable", + "package": "MMap/0.2.1@microblink/stable", "url": "https://github.com/microblink/mmap", "license": "Boost Software License", "description": "portable, lightweight, powerful, near-zero-overhead memory mapping and virtual memory management" @@ -60,7 +60,7 @@ "description": "Obfuscation library based on C++11/14 and metaprogramming" }, { - "package": "OpenCV/4.5.2.3@microblink/stable", + "package": "OpenCV/4.5.3@microblink/stable", "url": "https://github.com/microblink/opencv", "license": "MIT", "description": "Microblink's fork of OpenCV" @@ -78,7 +78,7 @@ "description": "A fast JSON parser/generator for C++ with both SAX/DOM style API" }, { - "package": "Sweater/9.1.5@microblink/stable", + "package": "Sweater/10.1.0@microblink/stable", "url": "https://github.com/microblink/sweater", "license": "MIT", "description": "Humble Outer Dispatch" @@ -90,7 +90,7 @@ "description": "UTF-8 with C++ in a Portable Way" }, { - "package": "XNNPACK/20210616.0@microblink/stable", + "package": "XNNPACK/20210616.1@microblink/stable", "url": "https://github.com/microblink/XNNPACK", "license": "BSD", "description": "XNNPACK library" @@ -108,13 +108,13 @@ "description": "A massively spiffy yet delicately unobtrusive compression library." }, { - "package": "cpuinfo/3.0.3@microblink/stable", + "package": "cpuinfo/3.0.4@microblink/stable", "url": "https://github.com/microblink/cpuinfo", "license": "BSD 2-Clause \"Simplified\" License", "description": "cpuinfo is a library to detect essential for performance optimization information about host CPU" }, { - "package": "emsdk_installer/2.0.23@microblink/stable", + "package": "emsdk_installer/2.0.27@microblink/stable", "url": "https://github.com/microblink/conan-emsdk_installer", "license": "MIT", "description": "Emscripten is an Open Source LLVM to JavaScript compiler" @@ -126,7 +126,7 @@ "description": "A mature, widely used set of libraries providing Unicode and Globalization support" }, { - "package": "libjpeg-turbo/2.0.6.1@microblink/stable", + "package": "libjpeg-turbo/2.1.1@microblink/stable", "url": "https://github.com/microblink/libjpeg-turbo", "license": "BSD-3-Clause, Zlib", "description": "SIMD-accelerated libjpeg-compatible JPEG codec library" diff --git a/oss-dependencies/c++-basic.json b/oss-dependencies/c++-basic.json index 2477928..13ec46a 100644 --- a/oss-dependencies/c++-basic.json +++ b/oss-dependencies/c++-basic.json @@ -6,7 +6,7 @@ "description": "Free peer-reviewed portable C++ source libraries." }, { - "package": "ConcurrentQueue/3.0.1@microblink/stable", + "package": "ConcurrentQueue/3.0.2@microblink/stable", "url": "https://github.com/microblink/concurrentqueue", "license": "Dual licensed under Simplified BSD License and Boost Software License - Version 1.0", "description": "A fast multi-producer, multi-consumer lock-free concurrent queue for C++11" @@ -24,13 +24,13 @@ "description": "Eigen is a C++ template library for linear algebra: vectors, matrices, and related algorithms. It is versatile, fast, elegant and works on many platforms (OS/Compilers)." }, { - "package": "Err/1.1.2@microblink/stable", + "package": "Err/1.1.4@microblink/stable", "url": "https://github.com/microblink/err", "license": "Boost Software License", "description": "err - yet another take on C++ error handling" }, { - "package": "Functionoid/3.0.4@microblink/stable", + "package": "Functionoid/3.0.5@microblink/stable", "url": "https://github.com/microblink/functionoid", "license": "Boost Software License, Version 1.0", "description": "a complete C++17 rewrite of boost/std::function" @@ -42,7 +42,7 @@ "description": "Portable C++ Hashing Library" }, { - "package": "MMap/0.2.0@microblink/stable", + "package": "MMap/0.2.1@microblink/stable", "url": "https://github.com/microblink/mmap", "license": "Boost Software License", "description": "portable, lightweight, powerful, near-zero-overhead memory mapping and virtual memory management" @@ -60,7 +60,7 @@ "description": "Obfuscation library based on C++11/14 and metaprogramming" }, { - "package": "OpenCV/4.5.2.3@microblink/stable", + "package": "OpenCV/4.5.3@microblink/stable", "url": "https://github.com/microblink/opencv", "license": "MIT", "description": "Microblink's fork of OpenCV" @@ -78,7 +78,7 @@ "description": "A fast JSON parser/generator for C++ with both SAX/DOM style API" }, { - "package": "Sweater/9.1.5@microblink/stable", + "package": "Sweater/10.1.0@microblink/stable", "url": "https://github.com/microblink/sweater", "license": "MIT", "description": "Humble Outer Dispatch" @@ -90,7 +90,7 @@ "description": "UTF-8 with C++ in a Portable Way" }, { - "package": "XNNPACK/20210616.0@microblink/stable", + "package": "XNNPACK/20210616.1@microblink/stable", "url": "https://github.com/microblink/XNNPACK", "license": "BSD", "description": "XNNPACK library" @@ -108,13 +108,13 @@ "description": "A massively spiffy yet delicately unobtrusive compression library." }, { - "package": "cpuinfo/3.0.3@microblink/stable", + "package": "cpuinfo/3.0.4@microblink/stable", "url": "https://github.com/microblink/cpuinfo", "license": "BSD 2-Clause \"Simplified\" License", "description": "cpuinfo is a library to detect essential for performance optimization information about host CPU" }, { - "package": "emsdk_installer/2.0.23@microblink/stable", + "package": "emsdk_installer/2.0.27@microblink/stable", "url": "https://github.com/microblink/conan-emsdk_installer", "license": "MIT", "description": "Emscripten is an Open Source LLVM to JavaScript compiler" @@ -126,7 +126,7 @@ "description": "A mature, widely used set of libraries providing Unicode and Globalization support" }, { - "package": "libjpeg-turbo/2.0.6.1@microblink/stable", + "package": "libjpeg-turbo/2.1.1@microblink/stable", "url": "https://github.com/microblink/libjpeg-turbo", "license": "BSD-3-Clause, Zlib", "description": "SIMD-accelerated libjpeg-compatible JPEG codec library" diff --git a/oss-dependencies/npm.txt b/oss-dependencies/npm.txt index c1f3084..08d3266 100644 --- a/oss-dependencies/npm.txt +++ b/oss-dependencies/npm.txt @@ -1,10 +1,17 @@ -├─ @babel/cli@7.14.8 +├─ @babel/cli@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/cli │ └─ licenseFile: node_modules/@babel/cli/LICENSE +├─ @babel/code-frame@7.12.11 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/babel/babel +│ ├─ publisher: Sebastian McKenzie +│ ├─ email: sebmck@gmail.com +│ ├─ path: node_modules/eslint/node_modules/@babel/code-frame +│ └─ licenseFile: node_modules/eslint/node_modules/@babel/code-frame/LICENSE ├─ @babel/code-frame@7.14.5 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel @@ -19,42 +26,42 @@ │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/compat-data │ └─ licenseFile: node_modules/@babel/compat-data/LICENSE -├─ @babel/core@7.15.0 +├─ @babel/core@7.15.5 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/core │ └─ licenseFile: node_modules/@babel/core/LICENSE -├─ @babel/generator@7.15.0 +├─ @babel/generator@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/generator │ └─ licenseFile: node_modules/@babel/generator/LICENSE -├─ @babel/helper-annotate-as-pure@7.14.5 +├─ @babel/helper-annotate-as-pure@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/helper-annotate-as-pure │ └─ licenseFile: node_modules/@babel/helper-annotate-as-pure/LICENSE -├─ @babel/helper-builder-binary-assignment-operator-visitor@7.14.5 +├─ @babel/helper-builder-binary-assignment-operator-visitor@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/helper-builder-binary-assignment-operator-visitor │ └─ licenseFile: node_modules/@babel/helper-builder-binary-assignment-operator-visitor/LICENSE -├─ @babel/helper-compilation-targets@7.15.0 +├─ @babel/helper-compilation-targets@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/helper-compilation-targets │ └─ licenseFile: node_modules/@babel/helper-compilation-targets/LICENSE -├─ @babel/helper-create-class-features-plugin@7.15.0 +├─ @babel/helper-create-class-features-plugin@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team @@ -73,56 +80,56 @@ │ ├─ repository: https://github.com/babel/babel-polyfills │ ├─ path: node_modules/@babel/helper-define-polyfill-provider │ └─ licenseFile: node_modules/@babel/helper-define-polyfill-provider/LICENSE -├─ @babel/helper-explode-assignable-expression@7.14.5 +├─ @babel/helper-explode-assignable-expression@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/helper-explode-assignable-expression │ └─ licenseFile: node_modules/@babel/helper-explode-assignable-expression/LICENSE -├─ @babel/helper-function-name@7.14.5 +├─ @babel/helper-function-name@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/helper-function-name │ └─ licenseFile: node_modules/@babel/helper-function-name/LICENSE -├─ @babel/helper-get-function-arity@7.14.5 +├─ @babel/helper-get-function-arity@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/helper-get-function-arity │ └─ licenseFile: node_modules/@babel/helper-get-function-arity/LICENSE -├─ @babel/helper-hoist-variables@7.14.5 +├─ @babel/helper-hoist-variables@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/helper-hoist-variables │ └─ licenseFile: node_modules/@babel/helper-hoist-variables/LICENSE -├─ @babel/helper-member-expression-to-functions@7.15.0 +├─ @babel/helper-member-expression-to-functions@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/helper-member-expression-to-functions │ └─ licenseFile: node_modules/@babel/helper-member-expression-to-functions/LICENSE -├─ @babel/helper-module-imports@7.14.5 +├─ @babel/helper-module-imports@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/helper-module-imports │ └─ licenseFile: node_modules/@babel/helper-module-imports/LICENSE -├─ @babel/helper-module-transforms@7.15.0 +├─ @babel/helper-module-transforms@7.15.7 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/helper-module-transforms │ └─ licenseFile: node_modules/@babel/helper-module-transforms/LICENSE -├─ @babel/helper-optimise-call-expression@7.14.5 +├─ @babel/helper-optimise-call-expression@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team @@ -136,42 +143,42 @@ │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/helper-plugin-utils │ └─ licenseFile: node_modules/@babel/helper-plugin-utils/LICENSE -├─ @babel/helper-remap-async-to-generator@7.14.5 +├─ @babel/helper-remap-async-to-generator@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/helper-remap-async-to-generator │ └─ licenseFile: node_modules/@babel/helper-remap-async-to-generator/LICENSE -├─ @babel/helper-replace-supers@7.15.0 +├─ @babel/helper-replace-supers@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/helper-replace-supers │ └─ licenseFile: node_modules/@babel/helper-replace-supers/LICENSE -├─ @babel/helper-simple-access@7.14.8 +├─ @babel/helper-simple-access@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/helper-simple-access │ └─ licenseFile: node_modules/@babel/helper-simple-access/LICENSE -├─ @babel/helper-skip-transparent-expression-wrappers@7.14.5 +├─ @babel/helper-skip-transparent-expression-wrappers@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/helper-skip-transparent-expression-wrappers │ └─ licenseFile: node_modules/@babel/helper-skip-transparent-expression-wrappers/LICENSE -├─ @babel/helper-split-export-declaration@7.14.5 +├─ @babel/helper-split-export-declaration@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/helper-split-export-declaration │ └─ licenseFile: node_modules/@babel/helper-split-export-declaration/LICENSE -├─ @babel/helper-validator-identifier@7.14.9 +├─ @babel/helper-validator-identifier@7.15.7 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team @@ -185,14 +192,14 @@ │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/helper-validator-option │ └─ licenseFile: node_modules/@babel/helper-validator-option/LICENSE -├─ @babel/helper-wrap-function@7.14.5 +├─ @babel/helper-wrap-function@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/helper-wrap-function │ └─ licenseFile: node_modules/@babel/helper-wrap-function/LICENSE -├─ @babel/helpers@7.15.3 +├─ @babel/helpers@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team @@ -206,21 +213,21 @@ │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/highlight │ └─ licenseFile: node_modules/@babel/highlight/LICENSE -├─ @babel/parser@7.15.3 +├─ @babel/parser@7.15.7 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/parser │ └─ licenseFile: node_modules/@babel/parser/LICENSE -├─ @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.14.5 +├─ @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining │ └─ licenseFile: node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/LICENSE -├─ @babel/plugin-proposal-async-generator-functions@7.14.9 +├─ @babel/plugin-proposal-async-generator-functions@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team @@ -234,7 +241,7 @@ │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/plugin-proposal-class-properties │ └─ licenseFile: node_modules/@babel/plugin-proposal-class-properties/LICENSE -├─ @babel/plugin-proposal-class-static-block@7.14.5 +├─ @babel/plugin-proposal-class-static-block@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team @@ -283,7 +290,7 @@ │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/plugin-proposal-numeric-separator │ └─ licenseFile: node_modules/@babel/plugin-proposal-numeric-separator/LICENSE -├─ @babel/plugin-proposal-object-rest-spread@7.14.7 +├─ @babel/plugin-proposal-object-rest-spread@7.15.6 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team @@ -311,7 +318,7 @@ │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/plugin-proposal-private-methods │ └─ licenseFile: node_modules/@babel/plugin-proposal-private-methods/LICENSE -├─ @babel/plugin-proposal-private-property-in-object@7.14.5 +├─ @babel/plugin-proposal-private-property-in-object@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team @@ -429,7 +436,7 @@ │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/plugin-transform-block-scoping │ └─ licenseFile: node_modules/@babel/plugin-transform-block-scoping/LICENSE -├─ @babel/plugin-transform-classes@7.14.9 +├─ @babel/plugin-transform-classes@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team @@ -471,7 +478,7 @@ │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/plugin-transform-exponentiation-operator │ └─ licenseFile: node_modules/@babel/plugin-transform-exponentiation-operator/LICENSE -├─ @babel/plugin-transform-for-of@7.14.5 +├─ @babel/plugin-transform-for-of@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team @@ -506,14 +513,14 @@ │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/plugin-transform-modules-amd │ └─ licenseFile: node_modules/@babel/plugin-transform-modules-amd/LICENSE -├─ @babel/plugin-transform-modules-commonjs@7.15.0 +├─ @babel/plugin-transform-modules-commonjs@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/plugin-transform-modules-commonjs │ └─ licenseFile: node_modules/@babel/plugin-transform-modules-commonjs/LICENSE -├─ @babel/plugin-transform-modules-systemjs@7.14.5 +├─ @babel/plugin-transform-modules-systemjs@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team @@ -548,7 +555,7 @@ │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/plugin-transform-object-super │ └─ licenseFile: node_modules/@babel/plugin-transform-object-super/LICENSE -├─ @babel/plugin-transform-parameters@7.14.5 +├─ @babel/plugin-transform-parameters@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team @@ -625,7 +632,7 @@ │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/plugin-transform-unicode-regex │ └─ licenseFile: node_modules/@babel/plugin-transform-unicode-regex/LICENSE -├─ @babel/preset-env@7.15.0 +├─ @babel/preset-env@7.15.6 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team @@ -636,38 +643,56 @@ │ ├─ licenses: MIT │ ├─ path: node_modules/@babel/preset-modules │ └─ licenseFile: node_modules/@babel/preset-modules/LICENSE -├─ @babel/runtime@7.15.3 +├─ @babel/runtime@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/runtime │ └─ licenseFile: node_modules/@babel/runtime/LICENSE -├─ @babel/template@7.14.5 +├─ @babel/template@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/template │ └─ licenseFile: node_modules/@babel/template/LICENSE -├─ @babel/traverse@7.15.0 +├─ @babel/traverse@7.15.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/traverse │ └─ licenseFile: node_modules/@babel/traverse/LICENSE -├─ @babel/types@7.15.0 +├─ @babel/types@7.15.6 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel │ ├─ publisher: The Babel Team │ ├─ url: https://babel.dev/team │ ├─ path: node_modules/@babel/types │ └─ licenseFile: node_modules/@babel/types/LICENSE -├─ @microblink/blinkid-imagecapture-in-browser-sdk@5.13.0 +├─ @eslint/eslintrc@0.4.3 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/eslint/eslintrc +│ ├─ publisher: Nicholas C. Zakas +│ ├─ path: node_modules/@eslint/eslintrc +│ └─ licenseFile: node_modules/@eslint/eslintrc/LICENSE +├─ @humanwhocodes/config-array@0.5.0 +│ ├─ licenses: Apache-2.0 +│ ├─ repository: https://github.com/humanwhocodes/config-array +│ ├─ publisher: Nicholas C. Zakas +│ ├─ path: node_modules/@humanwhocodes/config-array +│ └─ licenseFile: node_modules/@humanwhocodes/config-array/LICENSE +├─ @humanwhocodes/object-schema@1.2.0 +│ ├─ licenses: BSD-3-Clause +│ ├─ repository: https://github.com/humanwhocodes/object-schema +│ ├─ publisher: Nicholas C. Zakas +│ ├─ path: node_modules/@humanwhocodes/object-schema +│ └─ licenseFile: node_modules/@humanwhocodes/object-schema/LICENSE +├─ @microblink/blinkid-imagecapture-in-browser-sdk@5.14.0 │ ├─ licenses: Custom: https://travis-ci.org/BlinkID/blinkid-imagecapture-in-browser.svg │ ├─ repository: https://github.com/BlinkID/blinkid-imagecapture-in-browser -│ ├─ path: /opt/jenkins/root/E0/core-webassembly-sdks/SDKs/BlinkIDImageCapture/blinkid-imagecapture-in-browser +│ ├─ path: /opt/jenkins/android-arm64-meizu-pro-6/root/E0/core-webassembly-sdks/SDKs/BlinkIDImageCapture/blinkid-imagecapture-in-browser │ └─ licenseFile: README.md ├─ @nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents.2 │ ├─ licenses: MIT @@ -676,13 +701,28 @@ │ ├─ email: nicolo.ribaudo@gmail.com │ ├─ path: node_modules/@nicolo-ribaudo/chokidar-2 │ └─ licenseFile: node_modules/@nicolo-ribaudo/chokidar-2/README.md -├─ @rollup/plugin-babel@5.3.0 +├─ @nodelib/fs.scandir@2.1.5 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.scandir +│ ├─ path: node_modules/@nodelib/fs.scandir +│ └─ licenseFile: node_modules/@nodelib/fs.scandir/LICENSE +├─ @nodelib/fs.stat@2.0.5 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.stat +│ ├─ path: node_modules/@nodelib/fs.stat +│ └─ licenseFile: node_modules/@nodelib/fs.stat/LICENSE +├─ @nodelib/fs.walk@1.2.8 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.walk +│ ├─ path: node_modules/@nodelib/fs.walk +│ └─ licenseFile: node_modules/@nodelib/fs.walk/LICENSE +├─ @rollup/plugin-babel@5.2.1 │ ├─ licenses: MIT │ ├─ repository: https://github.com/rollup/plugins │ ├─ publisher: Rich Harris │ ├─ path: node_modules/@rollup/plugin-babel │ └─ licenseFile: node_modules/@rollup/plugin-babel/LICENSE -├─ @rollup/plugin-node-resolve@8.4.0 +├─ @rollup/plugin-node-resolve@11.1.0 │ ├─ licenses: MIT │ ├─ repository: https://github.com/rollup/plugins │ ├─ publisher: Rich Harris @@ -696,11 +736,6 @@ │ ├─ email: richard.a.harris@gmail.com │ ├─ path: node_modules/@rollup/pluginutils │ └─ licenseFile: node_modules/@rollup/pluginutils/LICENSE -├─ @types/eslint-visitor-keys@1.0.0 -│ ├─ licenses: MIT -│ ├─ repository: https://github.com/DefinitelyTyped/DefinitelyTyped -│ ├─ path: node_modules/@types/eslint-visitor-keys -│ └─ licenseFile: node_modules/@types/eslint-visitor-keys/LICENSE ├─ @types/estree@0.0.39 │ ├─ licenses: MIT │ ├─ repository: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -711,7 +746,7 @@ │ ├─ repository: https://github.com/DefinitelyTyped/DefinitelyTyped │ ├─ path: node_modules/@types/json-schema │ └─ licenseFile: node_modules/@types/json-schema/LICENSE -├─ @types/node@16.6.1 +├─ @types/node@16.10.2 │ ├─ licenses: MIT │ ├─ repository: https://github.com/DefinitelyTyped/DefinitelyTyped │ ├─ path: node_modules/@types/node @@ -721,32 +756,37 @@ │ ├─ repository: https://github.com/DefinitelyTyped/DefinitelyTyped │ ├─ path: node_modules/@types/resolve │ └─ licenseFile: node_modules/@types/resolve/LICENSE -├─ @typescript-eslint/eslint-plugin@3.10.1 +├─ @typescript-eslint/eslint-plugin@4.31.1 │ ├─ licenses: MIT │ ├─ repository: https://github.com/typescript-eslint/typescript-eslint │ ├─ path: node_modules/@typescript-eslint/eslint-plugin │ └─ licenseFile: node_modules/@typescript-eslint/eslint-plugin/LICENSE -├─ @typescript-eslint/experimental-utils@3.10.1 +├─ @typescript-eslint/experimental-utils@4.31.1 │ ├─ licenses: MIT │ ├─ repository: https://github.com/typescript-eslint/typescript-eslint │ ├─ path: node_modules/@typescript-eslint/experimental-utils │ └─ licenseFile: node_modules/@typescript-eslint/experimental-utils/LICENSE -├─ @typescript-eslint/parser@3.10.1 +├─ @typescript-eslint/parser@4.31.1 │ ├─ licenses: BSD-2-Clause │ ├─ repository: https://github.com/typescript-eslint/typescript-eslint │ ├─ path: node_modules/@typescript-eslint/parser │ └─ licenseFile: node_modules/@typescript-eslint/parser/LICENSE -├─ @typescript-eslint/types@3.10.1 +├─ @typescript-eslint/scope-manager@4.31.1 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/typescript-eslint/typescript-eslint +│ ├─ path: node_modules/@typescript-eslint/scope-manager +│ └─ licenseFile: node_modules/@typescript-eslint/scope-manager/LICENSE +├─ @typescript-eslint/types@4.31.1 │ ├─ licenses: MIT │ ├─ repository: https://github.com/typescript-eslint/typescript-eslint │ ├─ path: node_modules/@typescript-eslint/types │ └─ licenseFile: node_modules/@typescript-eslint/types/LICENSE -├─ @typescript-eslint/typescript-estree@3.10.1 +├─ @typescript-eslint/typescript-estree@4.31.1 │ ├─ licenses: BSD-2-Clause │ ├─ repository: https://github.com/typescript-eslint/typescript-eslint │ ├─ path: node_modules/@typescript-eslint/typescript-estree │ └─ licenseFile: node_modules/@typescript-eslint/typescript-estree/LICENSE -├─ @typescript-eslint/visitor-keys@3.10.1 +├─ @typescript-eslint/visitor-keys@4.31.1 │ ├─ licenses: MIT │ ├─ repository: https://github.com/typescript-eslint/typescript-eslint │ ├─ path: node_modules/@typescript-eslint/visitor-keys @@ -767,6 +807,12 @@ │ ├─ publisher: Evgeny Poberezkin │ ├─ path: node_modules/ajv │ └─ licenseFile: node_modules/ajv/LICENSE +├─ ajv@8.6.3 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/ajv-validator/ajv +│ ├─ publisher: Evgeny Poberezkin +│ ├─ path: node_modules/table/node_modules/ajv +│ └─ licenseFile: node_modules/table/node_modules/ajv/LICENSE ├─ ansi-colors@4.1.1 │ ├─ licenses: MIT │ ├─ repository: https://github.com/doowb/ansi-colors @@ -774,15 +820,7 @@ │ ├─ url: https://github.com/doowb │ ├─ path: node_modules/ansi-colors │ └─ licenseFile: node_modules/ansi-colors/LICENSE -├─ ansi-regex@4.1.0 -│ ├─ licenses: MIT -│ ├─ repository: https://github.com/chalk/ansi-regex -│ ├─ publisher: Sindre Sorhus -│ ├─ email: sindresorhus@gmail.com -│ ├─ url: sindresorhus.com -│ ├─ path: node_modules/string-width/node_modules/ansi-regex -│ └─ licenseFile: node_modules/string-width/node_modules/ansi-regex/license -├─ ansi-regex@5.0.0 +├─ ansi-regex@5.0.1 │ ├─ licenses: MIT │ ├─ repository: https://github.com/chalk/ansi-regex │ ├─ publisher: Sindre Sorhus @@ -804,8 +842,8 @@ │ ├─ publisher: Sindre Sorhus │ ├─ email: sindresorhus@gmail.com │ ├─ url: sindresorhus.com -│ ├─ path: node_modules/wrap-ansi/node_modules/ansi-styles -│ └─ licenseFile: node_modules/wrap-ansi/node_modules/ansi-styles/license +│ ├─ path: node_modules/slice-ansi/node_modules/ansi-styles +│ └─ licenseFile: node_modules/slice-ansi/node_modules/ansi-styles/license ├─ anymatch@2.0.0 │ ├─ licenses: ISC │ ├─ repository: https://github.com/micromatch/anymatch @@ -846,6 +884,14 @@ │ ├─ url: https://github.com/jonschlinkert │ ├─ path: node_modules/arr-union │ └─ licenseFile: node_modules/arr-union/LICENSE +├─ array-union@2.1.0 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/sindresorhus/array-union +│ ├─ publisher: Sindre Sorhus +│ ├─ email: sindresorhus@gmail.com +│ ├─ url: sindresorhus.com +│ ├─ path: node_modules/array-union +│ └─ licenseFile: node_modules/array-union/license ├─ array-unique@0.3.2 │ ├─ licenses: MIT │ ├─ repository: https://github.com/jonschlinkert/array-unique @@ -860,7 +906,7 @@ │ ├─ url: https://github.com/jonschlinkert │ ├─ path: node_modules/assign-symbols │ └─ licenseFile: node_modules/assign-symbols/LICENSE -├─ astral-regex@1.0.0 +├─ astral-regex@2.0.0 │ ├─ licenses: MIT │ ├─ repository: https://github.com/kevva/astral-regex │ ├─ publisher: Kevin Mårtensson @@ -895,7 +941,7 @@ │ ├─ repository: https://github.com/babel/babel-polyfills │ ├─ path: node_modules/babel-plugin-polyfill-corejs2 │ └─ licenseFile: node_modules/babel-plugin-polyfill-corejs2/LICENSE -├─ babel-plugin-polyfill-corejs3@0.2.4 +├─ babel-plugin-polyfill-corejs3@0.2.5 │ ├─ licenses: MIT │ ├─ repository: https://github.com/babel/babel-polyfills │ ├─ path: node_modules/babel-plugin-polyfill-corejs3 @@ -956,9 +1002,9 @@ │ ├─ repository: https://github.com/micromatch/braces │ ├─ publisher: Jon Schlinkert │ ├─ url: https://github.com/jonschlinkert -│ ├─ path: node_modules/chokidar/node_modules/braces -│ └─ licenseFile: node_modules/chokidar/node_modules/braces/LICENSE -├─ browserslist@4.16.7 +│ ├─ path: node_modules/fast-glob/node_modules/braces +│ └─ licenseFile: node_modules/fast-glob/node_modules/braces/LICENSE +├─ browserslist@4.17.2 │ ├─ licenses: MIT │ ├─ repository: https://github.com/browserslist/browserslist │ ├─ publisher: Andrey Sitnik @@ -1000,7 +1046,7 @@ │ ├─ url: sindresorhus.com │ ├─ path: node_modules/callsites │ └─ licenseFile: node_modules/callsites/license -├─ caniuse-lite@1.0.30001251 +├─ caniuse-lite@1.0.30001264 │ ├─ licenses: CC-BY-4.0 │ ├─ repository: https://github.com/browserslist/caniuse-lite │ ├─ publisher: Ben Briggs @@ -1032,13 +1078,6 @@ │ ├─ url: https://github.com/jonschlinkert │ ├─ path: node_modules/class-utils │ └─ licenseFile: node_modules/class-utils/LICENSE -├─ cliui@7.0.4 -│ ├─ licenses: ISC -│ ├─ repository: https://github.com/yargs/cliui -│ ├─ publisher: Ben Coe -│ ├─ email: ben@npmjs.com -│ ├─ path: node_modules/cliui -│ └─ licenseFile: node_modules/cliui/LICENSE.txt ├─ collection-visit@1.0.0 │ ├─ licenses: MIT │ ├─ repository: https://github.com/jonschlinkert/collection-visit @@ -1058,8 +1097,8 @@ │ ├─ repository: https://github.com/Qix-/color-convert │ ├─ publisher: Heather Arthur │ ├─ email: fayearthur@gmail.com -│ ├─ path: node_modules/wrap-ansi/node_modules/color-convert -│ └─ licenseFile: node_modules/wrap-ansi/node_modules/color-convert/LICENSE +│ ├─ path: node_modules/slice-ansi/node_modules/color-convert +│ └─ licenseFile: node_modules/slice-ansi/node_modules/color-convert/LICENSE ├─ color-name@1.1.3 │ ├─ licenses: MIT │ ├─ repository: https://github.com/dfcreative/color-name @@ -1072,14 +1111,8 @@ │ ├─ repository: https://github.com/colorjs/color-name │ ├─ publisher: DY │ ├─ email: dfcreative@gmail.com -│ ├─ path: node_modules/wrap-ansi/node_modules/color-name -│ └─ licenseFile: node_modules/wrap-ansi/node_modules/color-name/LICENSE -├─ colorette@1.3.0 -│ ├─ licenses: MIT -│ ├─ repository: https://github.com/jorgebucaran/colorette -│ ├─ publisher: Jorge Bucaran -│ ├─ path: node_modules/colorette -│ └─ licenseFile: node_modules/colorette/LICENSE.md +│ ├─ path: node_modules/slice-ansi/node_modules/color-name +│ └─ licenseFile: node_modules/slice-ansi/node_modules/color-name/LICENSE ├─ commander@2.20.3 │ ├─ licenses: MIT │ ├─ repository: https://github.com/tj/commander.js @@ -1130,12 +1163,12 @@ │ ├─ url: https://github.com/jonschlinkert │ ├─ path: node_modules/copy-descriptor │ └─ licenseFile: node_modules/copy-descriptor/LICENSE -├─ core-js-compat@3.16.1 +├─ core-js-compat@3.18.1 │ ├─ licenses: MIT │ ├─ repository: https://github.com/zloirock/core-js │ ├─ path: node_modules/core-js-compat │ └─ licenseFile: node_modules/core-js-compat/LICENSE -├─ core-util-is@1.0.2 +├─ core-util-is@1.0.3 │ ├─ licenses: MIT │ ├─ repository: https://github.com/isaacs/core-util-is │ ├─ publisher: Isaac Z. Schlueter @@ -1172,15 +1205,7 @@ │ ├─ url: github.com/SamVerschueren │ ├─ path: node_modules/decode-uri-component │ └─ licenseFile: node_modules/decode-uri-component/license -├─ deep-freeze@0.0.1 -│ ├─ licenses: Public Domain -│ ├─ repository: https://github.com/substack/deep-freeze -│ ├─ publisher: James Halliday -│ ├─ email: mail@substack.net -│ ├─ url: http://substack.net -│ ├─ path: node_modules/deep-freeze -│ └─ licenseFile: node_modules/deep-freeze/LICENSE -├─ deep-is@0.1.3 +├─ deep-is@0.1.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/thlorenz/deep-is │ ├─ publisher: Thorsten Lorenz @@ -1220,31 +1245,32 @@ │ ├─ url: https://github.com/jonschlinkert │ ├─ path: node_modules/define-property │ └─ licenseFile: node_modules/define-property/LICENSE +├─ dir-glob@3.0.1 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/kevva/dir-glob +│ ├─ publisher: Kevin Mårtensson +│ ├─ email: kevinmartensson@gmail.com +│ ├─ url: github.com/kevva +│ ├─ path: node_modules/dir-glob +│ └─ licenseFile: node_modules/dir-glob/license ├─ doctrine@3.0.0 │ ├─ licenses: Apache-2.0 │ ├─ repository: https://github.com/eslint/doctrine │ ├─ path: node_modules/doctrine │ └─ licenseFile: node_modules/doctrine/LICENSE -├─ electron-to-chromium@1.3.805 +├─ electron-to-chromium@1.3.857 │ ├─ licenses: ISC │ ├─ repository: https://github.com/kilian/electron-to-chromium │ ├─ publisher: Kilian Valkhof │ ├─ path: node_modules/electron-to-chromium │ └─ licenseFile: node_modules/electron-to-chromium/LICENSE -├─ emoji-regex@7.0.3 +├─ emoji-regex@8.0.0 │ ├─ licenses: MIT │ ├─ repository: https://github.com/mathiasbynens/emoji-regex │ ├─ publisher: Mathias Bynens │ ├─ url: https://mathiasbynens.be/ │ ├─ path: node_modules/emoji-regex │ └─ licenseFile: node_modules/emoji-regex/LICENSE-MIT.txt -├─ emoji-regex@8.0.0 -│ ├─ licenses: MIT -│ ├─ repository: https://github.com/mathiasbynens/emoji-regex -│ ├─ publisher: Mathias Bynens -│ ├─ url: https://mathiasbynens.be/ -│ ├─ path: node_modules/cliui/node_modules/emoji-regex -│ └─ licenseFile: node_modules/cliui/node_modules/emoji-regex/LICENSE-MIT.txt ├─ enquirer@2.3.6 │ ├─ licenses: MIT │ ├─ repository: https://github.com/enquirer/enquirer @@ -1268,6 +1294,14 @@ │ ├─ url: sindresorhus.com │ ├─ path: node_modules/escape-string-regexp │ └─ licenseFile: node_modules/escape-string-regexp/license +├─ escape-string-regexp@4.0.0 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/sindresorhus/escape-string-regexp +│ ├─ publisher: Sindre Sorhus +│ ├─ email: sindresorhus@gmail.com +│ ├─ url: https://sindresorhus.com +│ ├─ path: node_modules/eslint/node_modules/escape-string-regexp +│ └─ licenseFile: node_modules/eslint/node_modules/escape-string-regexp/license ├─ eslint-scope@5.1.1 │ ├─ licenses: BSD-2-Clause │ ├─ repository: https://github.com/eslint/eslint-scope @@ -1277,6 +1311,12 @@ │ ├─ licenses: MIT │ ├─ repository: https://github.com/mysticatea/eslint-utils │ ├─ publisher: Toru Nagashima +│ ├─ path: node_modules/eslint/node_modules/eslint-utils +│ └─ licenseFile: node_modules/eslint/node_modules/eslint-utils/LICENSE +├─ eslint-utils@3.0.0 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/mysticatea/eslint-utils +│ ├─ publisher: Toru Nagashima │ ├─ path: node_modules/eslint-utils │ └─ licenseFile: node_modules/eslint-utils/LICENSE ├─ eslint-visitor-keys@1.3.0 @@ -1284,9 +1324,16 @@ │ ├─ repository: https://github.com/eslint/eslint-visitor-keys │ ├─ publisher: Toru Nagashima │ ├─ url: https://github.com/mysticatea +│ ├─ path: node_modules/espree/node_modules/eslint-visitor-keys +│ └─ licenseFile: node_modules/espree/node_modules/eslint-visitor-keys/LICENSE +├─ eslint-visitor-keys@2.1.0 +│ ├─ licenses: Apache-2.0 +│ ├─ repository: https://github.com/eslint/eslint-visitor-keys +│ ├─ publisher: Toru Nagashima +│ ├─ url: https://github.com/mysticatea │ ├─ path: node_modules/eslint-visitor-keys │ └─ licenseFile: node_modules/eslint-visitor-keys/LICENSE -├─ eslint@7.6.0 +├─ eslint@7.32.0 │ ├─ licenses: MIT │ ├─ repository: https://github.com/eslint/eslint │ ├─ publisher: Nicholas C. Zakas @@ -1374,6 +1421,13 @@ │ ├─ publisher: Evgeny Poberezkin │ ├─ path: node_modules/fast-deep-equal │ └─ licenseFile: node_modules/fast-deep-equal/LICENSE +├─ fast-glob@3.2.7 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/mrmlnc/fast-glob +│ ├─ publisher: Denis Malinochkin +│ ├─ url: https://mrmlnc.com +│ ├─ path: node_modules/fast-glob +│ └─ licenseFile: node_modules/fast-glob/LICENSE ├─ fast-json-stable-stringify@2.1.0 │ ├─ licenses: MIT │ ├─ repository: https://github.com/epoberezkin/fast-json-stable-stringify @@ -1390,7 +1444,14 @@ │ ├─ url: http://www.hiddentao.com/ │ ├─ path: node_modules/fast-levenshtein │ └─ licenseFile: node_modules/fast-levenshtein/LICENSE.md -├─ file-entry-cache@5.0.1 +├─ fastq@1.13.0 +│ ├─ licenses: ISC +│ ├─ repository: https://github.com/mcollina/fastq +│ ├─ publisher: Matteo Collina +│ ├─ email: hello@matteocollina.com +│ ├─ path: node_modules/fastq +│ └─ licenseFile: node_modules/fastq/LICENSE +├─ file-entry-cache@6.0.1 │ ├─ licenses: MIT │ ├─ repository: https://github.com/royriojas/file-entry-cache │ ├─ publisher: Roy Riojas @@ -1409,9 +1470,9 @@ │ ├─ repository: https://github.com/jonschlinkert/fill-range │ ├─ publisher: Jon Schlinkert │ ├─ url: https://github.com/jonschlinkert -│ ├─ path: node_modules/chokidar/node_modules/fill-range -│ └─ licenseFile: node_modules/chokidar/node_modules/fill-range/LICENSE -├─ find-cache-dir@3.3.1 +│ ├─ path: node_modules/fast-glob/node_modules/fill-range +│ └─ licenseFile: node_modules/fast-glob/node_modules/fill-range/LICENSE +├─ find-cache-dir@3.3.2 │ ├─ licenses: MIT │ ├─ repository: https://github.com/avajs/find-cache-dir │ ├─ path: node_modules/find-cache-dir @@ -1424,14 +1485,14 @@ │ ├─ url: sindresorhus.com │ ├─ path: node_modules/find-up │ └─ licenseFile: node_modules/find-up/license -├─ flat-cache@2.0.1 +├─ flat-cache@3.0.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/royriojas/flat-cache │ ├─ publisher: Roy Riojas │ ├─ url: http://royriojas.com │ ├─ path: node_modules/flat-cache │ └─ licenseFile: node_modules/flat-cache/LICENSE -├─ flatted@2.0.2 +├─ flatted@3.2.2 │ ├─ licenses: ISC │ ├─ repository: https://github.com/WebReflection/flatted │ ├─ publisher: Andrea Giammarchi @@ -1494,12 +1555,6 @@ │ ├─ email: loganfsmyth@gmail.com │ ├─ path: node_modules/gensync │ └─ licenseFile: node_modules/gensync/LICENSE -├─ get-caller-file@2.0.5 -│ ├─ licenses: ISC -│ ├─ repository: https://github.com/stefanpenner/get-caller-file -│ ├─ publisher: Stefan Penner -│ ├─ path: node_modules/get-caller-file -│ └─ licenseFile: node_modules/get-caller-file/LICENSE.md ├─ get-intrinsic@1.1.1 │ ├─ licenses: MIT │ ├─ repository: https://github.com/ljharb/get-intrinsic @@ -1522,7 +1577,7 @@ │ ├─ url: https://gulpjs.com/ │ ├─ path: node_modules/glob-parent │ └─ licenseFile: node_modules/glob-parent/LICENSE -├─ glob@7.1.7 +├─ glob@7.2.0 │ ├─ licenses: ISC │ ├─ repository: https://github.com/isaacs/node-glob │ ├─ publisher: Isaac Z. Schlueter @@ -1538,25 +1593,27 @@ │ ├─ url: sindresorhus.com │ ├─ path: node_modules/globals │ └─ licenseFile: node_modules/globals/license -├─ globals@12.4.0 +├─ globals@13.11.0 │ ├─ licenses: MIT │ ├─ repository: https://github.com/sindresorhus/globals │ ├─ publisher: Sindre Sorhus │ ├─ email: sindresorhus@gmail.com │ ├─ url: https://sindresorhus.com -│ ├─ path: node_modules/eslint/node_modules/globals -│ └─ licenseFile: node_modules/eslint/node_modules/globals/license +│ ├─ path: node_modules/@eslint/eslintrc/node_modules/globals +│ └─ licenseFile: node_modules/@eslint/eslintrc/node_modules/globals/license +├─ globby@11.0.4 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/sindresorhus/globby +│ ├─ publisher: Sindre Sorhus +│ ├─ email: sindresorhus@gmail.com +│ ├─ url: https://sindresorhus.com +│ ├─ path: node_modules/globby +│ └─ licenseFile: node_modules/globby/license ├─ graceful-fs@4.2.8 │ ├─ licenses: ISC │ ├─ repository: https://github.com/isaacs/node-graceful-fs │ ├─ path: node_modules/graceful-fs │ └─ licenseFile: node_modules/graceful-fs/LICENSE -├─ handlebars@4.7.7 -│ ├─ licenses: MIT -│ ├─ repository: https://github.com/wycats/handlebars.js -│ ├─ publisher: Yehuda Katz -│ ├─ path: node_modules/handlebars -│ └─ licenseFile: node_modules/handlebars/LICENSE ├─ has-flag@3.0.0 │ ├─ licenses: MIT │ ├─ repository: https://github.com/sindresorhus/has-flag @@ -1620,6 +1677,12 @@ │ ├─ licenses: MIT │ ├─ repository: https://github.com/kaelzhang/node-ignore │ ├─ publisher: kael +│ ├─ path: node_modules/@eslint/eslintrc/node_modules/ignore +│ └─ licenseFile: node_modules/@eslint/eslintrc/node_modules/ignore/LICENSE-MIT +├─ ignore@5.1.8 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/kaelzhang/node-ignore +│ ├─ publisher: kael │ ├─ path: node_modules/ignore │ └─ licenseFile: node_modules/ignore/LICENSE-MIT ├─ import-fresh@3.3.0 @@ -1689,7 +1752,7 @@ │ ├─ url: http://feross.org/ │ ├─ path: node_modules/is-buffer │ └─ licenseFile: node_modules/is-buffer/LICENSE -├─ is-core-module@2.5.0 +├─ is-core-module@2.7.0 │ ├─ licenses: MIT │ ├─ repository: https://github.com/inspect-js/is-core-module │ ├─ publisher: Jordan Harband @@ -1745,7 +1808,7 @@ │ ├─ url: https://github.com/jonschlinkert │ ├─ path: node_modules/is-extglob │ └─ licenseFile: node_modules/is-extglob/LICENSE -├─ is-fullwidth-code-point@2.0.0 +├─ is-fullwidth-code-point@3.0.0 │ ├─ licenses: MIT │ ├─ repository: https://github.com/sindresorhus/is-fullwidth-code-point │ ├─ publisher: Sindre Sorhus @@ -1753,15 +1816,7 @@ │ ├─ url: sindresorhus.com │ ├─ path: node_modules/is-fullwidth-code-point │ └─ licenseFile: node_modules/is-fullwidth-code-point/license -├─ is-fullwidth-code-point@3.0.0 -│ ├─ licenses: MIT -│ ├─ repository: https://github.com/sindresorhus/is-fullwidth-code-point -│ ├─ publisher: Sindre Sorhus -│ ├─ email: sindresorhus@gmail.com -│ ├─ url: sindresorhus.com -│ ├─ path: node_modules/cliui/node_modules/is-fullwidth-code-point -│ └─ licenseFile: node_modules/cliui/node_modules/is-fullwidth-code-point/license -├─ is-glob@4.0.1 +├─ is-glob@4.0.3 │ ├─ licenses: MIT │ ├─ repository: https://github.com/micromatch/is-glob │ ├─ publisher: Jon Schlinkert @@ -1788,8 +1843,8 @@ │ ├─ repository: https://github.com/jonschlinkert/is-number │ ├─ publisher: Jon Schlinkert │ ├─ url: https://github.com/jonschlinkert -│ ├─ path: node_modules/chokidar/node_modules/is-number -│ └─ licenseFile: node_modules/chokidar/node_modules/is-number/LICENSE +│ ├─ path: node_modules/fast-glob/node_modules/is-number +│ └─ licenseFile: node_modules/fast-glob/node_modules/is-number/LICENSE ├─ is-plain-object@2.0.4 │ ├─ licenses: MIT │ ├─ repository: https://github.com/jonschlinkert/is-plain-object @@ -1872,6 +1927,12 @@ │ ├─ publisher: Evgeny Poberezkin │ ├─ path: node_modules/json-schema-traverse │ └─ licenseFile: node_modules/json-schema-traverse/LICENSE +├─ json-schema-traverse@1.0.0 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/epoberezkin/json-schema-traverse +│ ├─ publisher: Evgeny Poberezkin +│ ├─ path: node_modules/table/node_modules/json-schema-traverse +│ └─ licenseFile: node_modules/table/node_modules/json-schema-traverse/LICENSE ├─ json-stable-stringify-without-jsonify@1.0.1 │ ├─ licenses: MIT │ ├─ repository: https://github.com/samn/json-stable-stringify @@ -1937,6 +1998,14 @@ │ ├─ url: sindresorhus.com │ ├─ path: node_modules/locate-path │ └─ licenseFile: node_modules/locate-path/license +├─ lodash.clonedeep@4.5.0 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/lodash/lodash +│ ├─ publisher: John-David Dalton +│ ├─ email: john.david.dalton@gmail.com +│ ├─ url: http://allyoucanleet.com/ +│ ├─ path: node_modules/lodash.clonedeep +│ └─ licenseFile: node_modules/lodash.clonedeep/LICENSE ├─ lodash.debounce@4.0.8 │ ├─ licenses: MIT │ ├─ repository: https://github.com/lodash/lodash @@ -1945,13 +2014,21 @@ │ ├─ url: http://allyoucanleet.com/ │ ├─ path: node_modules/lodash.debounce │ └─ licenseFile: node_modules/lodash.debounce/LICENSE -├─ lodash@4.17.21 +├─ lodash.merge@4.6.2 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/lodash/lodash +│ ├─ publisher: John-David Dalton +│ ├─ email: john.david.dalton@gmail.com +│ ├─ path: node_modules/lodash.merge +│ └─ licenseFile: node_modules/lodash.merge/LICENSE +├─ lodash.truncate@4.4.2 │ ├─ licenses: MIT │ ├─ repository: https://github.com/lodash/lodash │ ├─ publisher: John-David Dalton │ ├─ email: john.david.dalton@gmail.com -│ ├─ path: node_modules/lodash -│ └─ licenseFile: node_modules/lodash/LICENSE +│ ├─ url: http://allyoucanleet.com/ +│ ├─ path: node_modules/lodash.truncate +│ └─ licenseFile: node_modules/lodash.truncate/LICENSE ├─ lru-cache@6.0.0 │ ├─ licenses: ISC │ ├─ repository: https://github.com/isaacs/node-lru-cache @@ -1996,6 +2073,11 @@ │ ├─ email: me@stephensugden.com │ ├─ path: node_modules/merge-stream │ └─ licenseFile: node_modules/merge-stream/LICENSE +├─ merge2@1.4.1 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/teambition/merge2 +│ ├─ path: node_modules/merge2 +│ └─ licenseFile: node_modules/merge2/LICENSE ├─ micromatch@3.1.10 │ ├─ licenses: MIT │ ├─ repository: https://github.com/micromatch/micromatch @@ -2003,6 +2085,13 @@ │ ├─ url: https://github.com/jonschlinkert │ ├─ path: node_modules/micromatch │ └─ licenseFile: node_modules/micromatch/LICENSE +├─ micromatch@4.0.4 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/micromatch/micromatch +│ ├─ publisher: Jon Schlinkert +│ ├─ url: https://github.com/jonschlinkert +│ ├─ path: node_modules/fast-glob/node_modules/micromatch +│ └─ licenseFile: node_modules/fast-glob/node_modules/micromatch/LICENSE ├─ minimatch@3.0.4 │ ├─ licenses: ISC │ ├─ repository: https://github.com/isaacs/minimatch @@ -2026,14 +2115,6 @@ │ ├─ url: https://github.com/jonschlinkert │ ├─ path: node_modules/mixin-deep │ └─ licenseFile: node_modules/mixin-deep/LICENSE -├─ mkdirp@0.5.5 -│ ├─ licenses: MIT -│ ├─ repository: https://github.com/substack/node-mkdirp -│ ├─ publisher: James Halliday -│ ├─ email: mail@substack.net -│ ├─ url: http://substack.net -│ ├─ path: node_modules/mkdirp -│ └─ licenseFile: node_modules/mkdirp/LICENSE ├─ ms@2.0.0 │ ├─ licenses: MIT │ ├─ repository: https://github.com/zeit/ms @@ -2044,6 +2125,13 @@ │ ├─ repository: https://github.com/zeit/ms │ ├─ path: node_modules/@babel/traverse/node_modules/ms │ └─ licenseFile: node_modules/@babel/traverse/node_modules/ms/license.md +├─ nanocolors@0.2.12 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/ai/nanocolors +│ ├─ publisher: Andrey Sitnik +│ ├─ email: andrey@sitnik.ru +│ ├─ path: node_modules/nanocolors +│ └─ licenseFile: node_modules/nanocolors/LICENSE ├─ nanomatch@1.2.13 │ ├─ licenses: MIT │ ├─ repository: https://github.com/micromatch/nanomatch @@ -2058,12 +2146,7 @@ │ ├─ url: https://github.com/litejs/natural-compare-lite │ ├─ path: node_modules/natural-compare │ └─ licenseFile: node_modules/natural-compare/README.md -├─ neo-async@2.6.2 -│ ├─ licenses: MIT -│ ├─ repository: https://github.com/suguru03/neo-async -│ ├─ path: node_modules/neo-async -│ └─ licenseFile: node_modules/neo-async/LICENSE -├─ node-releases@1.1.74 +├─ node-releases@1.1.77 │ ├─ licenses: MIT │ ├─ repository: https://github.com/chicoxyzzy/node-releases │ ├─ publisher: Sergey Rubanov @@ -2204,6 +2287,14 @@ │ ├─ email: http://jbgutierrez.info │ ├─ path: node_modules/path-parse │ └─ licenseFile: node_modules/path-parse/LICENSE +├─ path-type@4.0.0 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/sindresorhus/path-type +│ ├─ publisher: Sindre Sorhus +│ ├─ email: sindresorhus@gmail.com +│ ├─ url: sindresorhus.com +│ ├─ path: node_modules/path-type +│ └─ licenseFile: node_modules/path-type/license ├─ picomatch@2.3.0 │ ├─ licenses: MIT │ ├─ repository: https://github.com/micromatch/picomatch @@ -2260,6 +2351,14 @@ │ ├─ url: https://mathiasbynens.be/ │ ├─ path: node_modules/punycode │ └─ licenseFile: node_modules/punycode/LICENSE-MIT.txt +├─ queue-microtask@1.2.3 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/feross/queue-microtask +│ ├─ publisher: Feross Aboukhadijeh +│ ├─ email: feross@feross.org +│ ├─ url: https://feross.org +│ ├─ path: node_modules/queue-microtask +│ └─ licenseFile: node_modules/queue-microtask/LICENSE ├─ randombytes@2.1.0 │ ├─ licenses: MIT │ ├─ repository: https://github.com/crypto-browserify/randombytes @@ -2286,7 +2385,7 @@ │ ├─ url: thlorenz.com │ ├─ path: node_modules/chokidar/node_modules/readdirp │ └─ licenseFile: node_modules/chokidar/node_modules/readdirp/LICENSE -├─ regenerate-unicode-properties@8.2.0 +├─ regenerate-unicode-properties@9.0.0 │ ├─ licenses: MIT │ ├─ repository: https://github.com/mathiasbynens/regenerate-unicode-properties │ ├─ publisher: Mathias Bynens @@ -2328,7 +2427,7 @@ │ ├─ url: https://github.com/mysticatea │ ├─ path: node_modules/regexpp │ └─ licenseFile: node_modules/regexpp/LICENSE -├─ regexpu-core@4.7.1 +├─ regexpu-core@4.8.0 │ ├─ licenses: MIT │ ├─ repository: https://github.com/mathiasbynens/regexpu-core │ ├─ publisher: Mathias Bynens @@ -2342,7 +2441,7 @@ │ ├─ url: https://ofcr.se/ │ ├─ path: node_modules/regjsgen │ └─ licenseFile: node_modules/regjsgen/LICENSE-MIT.txt -├─ regjsparser@0.6.9 +├─ regjsparser@0.7.0 │ ├─ licenses: BSD-2-Clause │ ├─ repository: https://github.com/jviereck/regjsparser │ ├─ publisher: 'Julian Viereck' @@ -2369,14 +2468,14 @@ │ ├─ url: http://github.com/jonschlinkert │ ├─ path: node_modules/repeat-string │ └─ licenseFile: node_modules/repeat-string/LICENSE -├─ require-directory@2.1.1 -│ ├─ licenses: MIT -│ ├─ repository: https://github.com/troygoode/node-require-directory -│ ├─ publisher: Troy Goode -│ ├─ email: troygoode@gmail.com -│ ├─ url: http://github.com/troygoode/ -│ ├─ path: node_modules/require-directory -│ └─ licenseFile: node_modules/require-directory/LICENSE +├─ require-from-string@2.0.2 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/floatdrop/require-from-string +│ ├─ publisher: Vsevolod Strukchinsky +│ ├─ email: floatdrop@gmail.com +│ ├─ url: github.com/floatdrop +│ ├─ path: node_modules/require-from-string +│ └─ licenseFile: node_modules/require-from-string/license ├─ resolve-from@4.0.0 │ ├─ licenses: MIT │ ├─ repository: https://github.com/sindresorhus/resolve-from @@ -2391,7 +2490,7 @@ │ ├─ publisher: Simon Lydell │ ├─ path: node_modules/resolve-url │ └─ licenseFile: node_modules/resolve-url/LICENSE -├─ resolve@1.17.0 +├─ resolve@1.15.1 │ ├─ licenses: MIT │ ├─ repository: https://github.com/browserify/resolve │ ├─ publisher: James Halliday @@ -2414,14 +2513,13 @@ │ ├─ url: https://github.com/fent │ ├─ path: node_modules/ret │ └─ licenseFile: node_modules/ret/LICENSE -├─ rimraf@2.6.3 -│ ├─ licenses: ISC -│ ├─ repository: https://github.com/isaacs/rimraf -│ ├─ publisher: Isaac Z. Schlueter -│ ├─ email: i@izs.me -│ ├─ url: http://blog.izs.me/ -│ ├─ path: node_modules/flat-cache/node_modules/rimraf -│ └─ licenseFile: node_modules/flat-cache/node_modules/rimraf/LICENSE +├─ reusify@1.0.4 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/mcollina/reusify +│ ├─ publisher: Matteo Collina +│ ├─ email: hello@matteocollina.com +│ ├─ path: node_modules/reusify +│ └─ licenseFile: node_modules/reusify/LICENSE ├─ rimraf@3.0.2 │ ├─ licenses: ISC │ ├─ repository: https://github.com/isaacs/rimraf @@ -2430,25 +2528,33 @@ │ ├─ url: http://blog.izs.me/ │ ├─ path: node_modules/rimraf │ └─ licenseFile: node_modules/rimraf/LICENSE -├─ rollup-plugin-terser@6.1.0 +├─ rollup-plugin-terser@7.0.2 │ ├─ licenses: MIT │ ├─ repository: https://github.com/TrySound/rollup-plugin-terser │ ├─ publisher: Bogdan Chadkin │ ├─ email: trysound@yandex.ru │ ├─ path: node_modules/rollup-plugin-terser │ └─ licenseFile: node_modules/rollup-plugin-terser/LICENSE -├─ rollup-plugin-typescript2@0.27.3 +├─ rollup-plugin-typescript2@0.27.1 │ ├─ licenses: MIT │ ├─ repository: https://github.com/ezolenko/rollup-plugin-typescript2 │ ├─ publisher: @ezolenko │ ├─ path: node_modules/rollup-plugin-typescript2 │ └─ licenseFile: node_modules/rollup-plugin-typescript2/LICENSE -├─ rollup@2.56.2 +├─ rollup@2.38.1 │ ├─ licenses: MIT │ ├─ repository: https://github.com/rollup/rollup │ ├─ publisher: Rich Harris │ ├─ path: node_modules/rollup │ └─ licenseFile: node_modules/rollup/LICENSE.md +├─ run-parallel@1.2.0 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/feross/run-parallel +│ ├─ publisher: Feross Aboukhadijeh +│ ├─ email: feross@feross.org +│ ├─ url: https://feross.org +│ ├─ path: node_modules/run-parallel +│ └─ licenseFile: node_modules/run-parallel/LICENSE ├─ safe-buffer@5.1.2 │ ├─ licenses: MIT │ ├─ repository: https://github.com/feross/safe-buffer @@ -2485,7 +2591,7 @@ │ ├─ repository: https://github.com/npm/node-semver │ ├─ path: node_modules/@typescript-eslint/typescript-estree/node_modules/semver │ └─ licenseFile: node_modules/@typescript-eslint/typescript-estree/node_modules/semver/LICENSE -├─ serialize-javascript@3.1.0 +├─ serialize-javascript@4.0.0 │ ├─ licenses: BSD-3-Clause │ ├─ repository: https://github.com/yahoo/serialize-javascript │ ├─ publisher: Eric Ferraiuolo @@ -2523,7 +2629,15 @@ │ ├─ url: sindresorhus.com │ ├─ path: node_modules/slash │ └─ licenseFile: node_modules/slash/license -├─ slice-ansi@2.1.0 +├─ slash@3.0.0 +│ ├─ licenses: MIT +│ ├─ repository: https://github.com/sindresorhus/slash +│ ├─ publisher: Sindre Sorhus +│ ├─ email: sindresorhus@gmail.com +│ ├─ url: sindresorhus.com +│ ├─ path: node_modules/globby/node_modules/slash +│ └─ licenseFile: node_modules/globby/node_modules/slash/license +├─ slice-ansi@4.0.0 │ ├─ licenses: MIT │ ├─ repository: https://github.com/chalk/slice-ansi │ ├─ path: node_modules/slice-ansi @@ -2555,7 +2669,7 @@ │ ├─ publisher: Simon Lydell │ ├─ path: node_modules/source-map-resolve │ └─ licenseFile: node_modules/source-map-resolve/LICENSE -├─ source-map-support@0.5.19 +├─ source-map-support@0.5.20 │ ├─ licenses: MIT │ ├─ repository: https://github.com/evanw/node-source-map-support │ ├─ path: node_modules/source-map-support @@ -2578,6 +2692,13 @@ │ ├─ repository: https://github.com/mozilla/source-map │ ├─ publisher: Nick Fitzgerald │ ├─ email: nfitzgerald@mozilla.com +│ ├─ path: node_modules/source-map-support/node_modules/source-map +│ └─ licenseFile: node_modules/source-map-support/node_modules/source-map/LICENSE +├─ source-map@0.7.3 +│ ├─ licenses: BSD-3-Clause +│ ├─ repository: https://github.com/mozilla/source-map +│ ├─ publisher: Nick Fitzgerald +│ ├─ email: nfitzgerald@mozilla.com │ ├─ path: node_modules/terser/node_modules/source-map │ └─ licenseFile: node_modules/terser/node_modules/source-map/LICENSE ├─ split-string@3.1.0 @@ -2602,7 +2723,7 @@ │ ├─ url: https://github.com/jonschlinkert │ ├─ path: node_modules/static-extend │ └─ licenseFile: node_modules/static-extend/LICENSE -├─ string-width@3.1.0 +├─ string-width@4.2.3 │ ├─ licenses: MIT │ ├─ repository: https://github.com/sindresorhus/string-width │ ├─ publisher: Sindre Sorhus @@ -2610,28 +2731,12 @@ │ ├─ url: sindresorhus.com │ ├─ path: node_modules/string-width │ └─ licenseFile: node_modules/string-width/license -├─ string-width@4.2.2 -│ ├─ licenses: MIT -│ ├─ repository: https://github.com/sindresorhus/string-width -│ ├─ publisher: Sindre Sorhus -│ ├─ email: sindresorhus@gmail.com -│ ├─ url: sindresorhus.com -│ ├─ path: node_modules/cliui/node_modules/string-width -│ └─ licenseFile: node_modules/cliui/node_modules/string-width/license ├─ string_decoder@1.1.1 │ ├─ licenses: MIT │ ├─ repository: https://github.com/nodejs/string_decoder │ ├─ path: node_modules/string_decoder │ └─ licenseFile: node_modules/string_decoder/LICENSE -├─ strip-ansi@5.2.0 -│ ├─ licenses: MIT -│ ├─ repository: https://github.com/chalk/strip-ansi -│ ├─ publisher: Sindre Sorhus -│ ├─ email: sindresorhus@gmail.com -│ ├─ url: sindresorhus.com -│ ├─ path: node_modules/string-width/node_modules/strip-ansi -│ └─ licenseFile: node_modules/string-width/node_modules/strip-ansi/license -├─ strip-ansi@6.0.0 +├─ strip-ansi@6.0.1 │ ├─ licenses: MIT │ ├─ repository: https://github.com/chalk/strip-ansi │ ├─ publisher: Sindre Sorhus @@ -2663,7 +2768,7 @@ │ ├─ url: sindresorhus.com │ ├─ path: node_modules/jest-worker/node_modules/supports-color │ └─ licenseFile: node_modules/jest-worker/node_modules/supports-color/license -├─ table@5.4.6 +├─ table@6.7.2 │ ├─ licenses: BSD-3-Clause │ ├─ repository: https://github.com/gajus/table │ ├─ publisher: Gajus Kuizinas @@ -2671,7 +2776,7 @@ │ ├─ url: http://gajus.com │ ├─ path: node_modules/table │ └─ licenseFile: node_modules/table/LICENSE -├─ terser@4.8.0 +├─ terser@5.9.0 │ ├─ licenses: BSD-2-Clause │ ├─ repository: https://github.com/terser/terser │ ├─ publisher: Mihai Bazon @@ -2714,8 +2819,8 @@ │ ├─ repository: https://github.com/micromatch/to-regex-range │ ├─ publisher: Jon Schlinkert │ ├─ url: https://github.com/jonschlinkert -│ ├─ path: node_modules/chokidar/node_modules/to-regex-range -│ └─ licenseFile: node_modules/chokidar/node_modules/to-regex-range/LICENSE +│ ├─ path: node_modules/fast-glob/node_modules/to-regex-range +│ └─ licenseFile: node_modules/fast-glob/node_modules/to-regex-range/LICENSE ├─ to-regex@3.0.2 │ ├─ licenses: MIT │ ├─ repository: https://github.com/jonschlinkert/to-regex @@ -2723,19 +2828,19 @@ │ ├─ url: https://github.com/jonschlinkert │ ├─ path: node_modules/to-regex │ └─ licenseFile: node_modules/to-regex/LICENSE -├─ tslib@1.14.1 +├─ tslib@1.11.2 │ ├─ licenses: 0BSD │ ├─ repository: https://github.com/Microsoft/tslib │ ├─ publisher: Microsoft Corp. -│ ├─ path: node_modules/tsutils/node_modules/tslib -│ └─ licenseFile: node_modules/tsutils/node_modules/tslib/LICENSE.txt -├─ tslib@2.0.1 +│ ├─ path: node_modules/rollup-plugin-typescript2/node_modules/tslib +│ └─ licenseFile: node_modules/rollup-plugin-typescript2/node_modules/tslib/LICENSE.txt +├─ tslib@1.14.1 │ ├─ licenses: 0BSD │ ├─ repository: https://github.com/Microsoft/tslib │ ├─ publisher: Microsoft Corp. -│ ├─ path: node_modules/rollup-plugin-typescript2/node_modules/tslib -│ └─ licenseFile: node_modules/rollup-plugin-typescript2/node_modules/tslib/LICENSE.txt -├─ tslib@2.3.1 +│ ├─ path: node_modules/tsutils/node_modules/tslib +│ └─ licenseFile: node_modules/tsutils/node_modules/tslib/LICENSE.txt +├─ tslib@2.0.0 │ ├─ licenses: 0BSD │ ├─ repository: https://github.com/Microsoft/tslib │ ├─ publisher: Microsoft Corp. @@ -2754,50 +2859,42 @@ │ ├─ email: z@georgezahariev.com │ ├─ path: node_modules/type-check │ └─ licenseFile: node_modules/type-check/LICENSE -├─ type-fest@0.8.1 +├─ type-fest@0.20.2 │ ├─ licenses: (MIT OR CC0-1.0) │ ├─ repository: https://github.com/sindresorhus/type-fest │ ├─ publisher: Sindre Sorhus │ ├─ email: sindresorhus@gmail.com -│ ├─ url: sindresorhus.com +│ ├─ url: https://sindresorhus.com │ ├─ path: node_modules/type-fest │ └─ licenseFile: node_modules/type-fest/license -├─ typescript@3.9.10 +├─ typescript@4.0.3 │ ├─ licenses: Apache-2.0 │ ├─ repository: https://github.com/Microsoft/TypeScript │ ├─ publisher: Microsoft Corp. │ ├─ path: node_modules/typescript │ └─ licenseFile: node_modules/typescript/LICENSE.txt -├─ uglify-js@3.14.1 -│ ├─ licenses: BSD-2-Clause -│ ├─ repository: https://github.com/mishoo/UglifyJS -│ ├─ publisher: Mihai Bazon -│ ├─ email: mihai.bazon@gmail.com -│ ├─ url: http://lisperator.net/ -│ ├─ path: node_modules/uglify-js -│ └─ licenseFile: node_modules/uglify-js/LICENSE -├─ unicode-canonical-property-names-ecmascript@1.0.4 +├─ unicode-canonical-property-names-ecmascript@2.0.0 │ ├─ licenses: MIT │ ├─ repository: https://github.com/mathiasbynens/unicode-canonical-property-names-ecmascript │ ├─ publisher: Mathias Bynens │ ├─ url: https://mathiasbynens.be/ │ ├─ path: node_modules/unicode-canonical-property-names-ecmascript │ └─ licenseFile: node_modules/unicode-canonical-property-names-ecmascript/LICENSE-MIT.txt -├─ unicode-match-property-ecmascript@1.0.4 +├─ unicode-match-property-ecmascript@2.0.0 │ ├─ licenses: MIT │ ├─ repository: https://github.com/mathiasbynens/unicode-match-property-ecmascript │ ├─ publisher: Mathias Bynens │ ├─ url: https://mathiasbynens.be/ │ ├─ path: node_modules/unicode-match-property-ecmascript │ └─ licenseFile: node_modules/unicode-match-property-ecmascript/LICENSE-MIT.txt -├─ unicode-match-property-value-ecmascript@1.2.0 +├─ unicode-match-property-value-ecmascript@2.0.0 │ ├─ licenses: MIT │ ├─ repository: https://github.com/mathiasbynens/unicode-match-property-value-ecmascript │ ├─ publisher: Mathias Bynens │ ├─ url: https://mathiasbynens.be/ │ ├─ path: node_modules/unicode-match-property-value-ecmascript │ └─ licenseFile: node_modules/unicode-match-property-value-ecmascript/LICENSE-MIT.txt -├─ unicode-property-aliases-ecmascript@1.1.0 +├─ unicode-property-aliases-ecmascript@2.0.0 │ ├─ licenses: MIT │ ├─ repository: https://github.com/mathiasbynens/unicode-property-aliases-ecmascript │ ├─ publisher: Mathias Bynens @@ -2889,22 +2986,6 @@ │ ├─ url: https://github.com/jonschlinkert │ ├─ path: node_modules/word-wrap │ └─ licenseFile: node_modules/word-wrap/LICENSE -├─ wordwrap@1.0.0 -│ ├─ licenses: MIT -│ ├─ repository: https://github.com/substack/node-wordwrap -│ ├─ publisher: James Halliday -│ ├─ email: mail@substack.net -│ ├─ url: http://substack.net -│ ├─ path: node_modules/wordwrap -│ └─ licenseFile: node_modules/wordwrap/LICENSE -├─ wrap-ansi@7.0.0 -│ ├─ licenses: MIT -│ ├─ repository: https://github.com/chalk/wrap-ansi -│ ├─ publisher: Sindre Sorhus -│ ├─ email: sindresorhus@gmail.com -│ ├─ url: https://sindresorhus.com -│ ├─ path: node_modules/wrap-ansi -│ └─ licenseFile: node_modules/wrap-ansi/license ├─ wrappy@1.0.2 │ ├─ licenses: ISC │ ├─ repository: https://github.com/npm/wrappy @@ -2913,38 +2994,12 @@ │ ├─ url: http://blog.izs.me/ │ ├─ path: node_modules/wrappy │ └─ licenseFile: node_modules/wrappy/LICENSE -├─ write@1.0.3 -│ ├─ licenses: MIT -│ ├─ repository: https://github.com/jonschlinkert/write -│ ├─ publisher: Jon Schlinkert -│ ├─ url: https://github.com/jonschlinkert -│ ├─ path: node_modules/write -│ └─ licenseFile: node_modules/write/LICENSE -├─ y18n@5.0.8 -│ ├─ licenses: ISC -│ ├─ repository: https://github.com/yargs/y18n -│ ├─ publisher: Ben Coe -│ ├─ email: bencoe@gmail.com -│ ├─ path: node_modules/y18n -│ └─ licenseFile: node_modules/y18n/LICENSE -├─ yallist@4.0.0 -│ ├─ licenses: ISC -│ ├─ repository: https://github.com/isaacs/yallist -│ ├─ publisher: Isaac Z. Schlueter -│ ├─ email: i@izs.me -│ ├─ url: http://blog.izs.me/ -│ ├─ path: node_modules/yallist -│ └─ licenseFile: node_modules/yallist/LICENSE -├─ yargs-parser@20.2.9 -│ ├─ licenses: ISC -│ ├─ repository: https://github.com/yargs/yargs-parser -│ ├─ publisher: Ben Coe -│ ├─ email: ben@npmjs.com -│ ├─ path: node_modules/yargs-parser -│ └─ licenseFile: node_modules/yargs-parser/LICENSE.txt -└─ yargs@16.2.0 - ├─ licenses: MIT - ├─ repository: https://github.com/yargs/yargs - ├─ path: node_modules/yargs - └─ licenseFile: node_modules/yargs/LICENSE +└─ yallist@4.0.0 + ├─ licenses: ISC + ├─ repository: https://github.com/isaacs/yallist + ├─ publisher: Isaac Z. Schlueter + ├─ email: i@izs.me + ├─ url: http://blog.izs.me/ + ├─ path: node_modules/yallist + └─ licenseFile: node_modules/yallist/LICENSE diff --git a/package-lock.json b/package-lock.json index 7ee3cda..1672242 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,13 @@ { "name": "@microblink/blinkid-imagecapture-in-browser-sdk", - "version": "5.13.0", + "version": "5.14.0", "lockfileVersion": 1, "requires": true, "dependencies": { "@babel/cli": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.14.8.tgz", - "integrity": "sha512-lcy6Lymft9Rpfqmrqdd4oTDdUx9ZwaAhAfywVrHG4771Pa6PPT0danJ1kDHBXYqh4HHSmIdA+nlmfxfxSDPtBg==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.15.4.tgz", + "integrity": "sha512-9RhhQ7tgKRcSO/jI3rNLxalLSk30cHqeM8bb+nGOJTyYBDpkoXw/A9QHZ2SYjlslAt4tr90pZQGIEobwWHSIDw==", "dev": true, "requires": { "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents.2", @@ -37,20 +37,20 @@ "dev": true }, "@babel/core": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.15.0.tgz", - "integrity": "sha512-tXtmTminrze5HEUPn/a0JtOzzfp0nk+UEXQ/tqIJo3WDGypl/2OFQEMll/zSFU8f/lfmfLXvTaORHF3cfXIQMw==", + "version": "7.15.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.15.5.tgz", + "integrity": "sha512-pYgXxiwAgQpgM1bNkZsDEq85f0ggXMA5L7c+o3tskGMh2BunCI9QUwB9Z4jpvXUOuMdyGKiGKQiRe11VS6Jzvg==", "dev": true, "requires": { "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.15.0", - "@babel/helper-compilation-targets": "^7.15.0", - "@babel/helper-module-transforms": "^7.15.0", - "@babel/helpers": "^7.14.8", - "@babel/parser": "^7.15.0", - "@babel/template": "^7.14.5", - "@babel/traverse": "^7.15.0", - "@babel/types": "^7.15.0", + "@babel/generator": "^7.15.4", + "@babel/helper-compilation-targets": "^7.15.4", + "@babel/helper-module-transforms": "^7.15.4", + "@babel/helpers": "^7.15.4", + "@babel/parser": "^7.15.5", + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -83,39 +83,39 @@ } }, "@babel/generator": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.0.tgz", - "integrity": "sha512-eKl4XdMrbpYvuB505KTta4AV9g+wWzmVBW69tX0H2NwKVKd2YJbKgyK6M8j/rgLbmHOYJn6rUklV677nOyJrEQ==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.4.tgz", + "integrity": "sha512-d3itta0tu+UayjEORPNz6e1T3FtvWlP5N4V5M+lhp/CxT4oAA7/NcScnpRyspUMLK6tu9MNHmQHxRykuN2R7hw==", "dev": true, "requires": { - "@babel/types": "^7.15.0", + "@babel/types": "^7.15.4", "jsesc": "^2.5.1", "source-map": "^0.5.0" } }, "@babel/helper-annotate-as-pure": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.14.5.tgz", - "integrity": "sha512-EivH9EgBIb+G8ij1B2jAwSH36WnGvkQSEC6CkX/6v6ZFlw5fVOHvsgGF4uiEHO2GzMvunZb6tDLQEQSdrdocrA==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.15.4.tgz", + "integrity": "sha512-QwrtdNvUNsPCj2lfNQacsGSQvGX8ee1ttrBrcozUP2Sv/jylewBP/8QFe6ZkBsC8T/GYWonNAWJV4aRR9AL2DA==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.15.4" } }, "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.14.5.tgz", - "integrity": "sha512-YTA/Twn0vBXDVGJuAX6PwW7x5zQei1luDDo2Pl6q1qZ7hVNl0RZrhHCQG/ArGpR29Vl7ETiB8eJyrvpuRp300w==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.15.4.tgz", + "integrity": "sha512-P8o7JP2Mzi0SdC6eWr1zF+AEYvrsZa7GSY1lTayjF5XJhVH0kjLYUZPvTMflP7tBgZoe9gIhTa60QwFpqh/E0Q==", "dev": true, "requires": { - "@babel/helper-explode-assignable-expression": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/helper-explode-assignable-expression": "^7.15.4", + "@babel/types": "^7.15.4" } }, "@babel/helper-compilation-targets": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.0.tgz", - "integrity": "sha512-h+/9t0ncd4jfZ8wsdAsoIxSa61qhBYlycXiHWqJaQBCXAhDCMbPRSMTGnZIkkmt1u4ag+UQmuqcILwqKzZ4N2A==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.4.tgz", + "integrity": "sha512-rMWPCirulnPSe4d+gwdWXLfAXTTBj8M3guAf5xFQJ0nvFY7tfNAFnWdqaHegHlgDZOCT4qvhF3BYlSJag8yhqQ==", "dev": true, "requires": { "@babel/compat-data": "^7.15.0", @@ -133,17 +133,17 @@ } }, "@babel/helper-create-class-features-plugin": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.0.tgz", - "integrity": "sha512-MdmDXgvTIi4heDVX/e9EFfeGpugqm9fobBVg/iioE8kueXrOHdRDe36FAY7SnE9xXLVeYCoJR/gdrBEIHRC83Q==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.4.tgz", + "integrity": "sha512-7ZmzFi+DwJx6A7mHRwbuucEYpyBwmh2Ca0RvI6z2+WLZYCqV0JOaLb+u0zbtmDicebgKBZgqbYfLaKNqSgv5Pw==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-function-name": "^7.14.5", - "@babel/helper-member-expression-to-functions": "^7.15.0", - "@babel/helper-optimise-call-expression": "^7.14.5", - "@babel/helper-replace-supers": "^7.15.0", - "@babel/helper-split-export-declaration": "^7.14.5" + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-function-name": "^7.15.4", + "@babel/helper-member-expression-to-functions": "^7.15.4", + "@babel/helper-optimise-call-expression": "^7.15.4", + "@babel/helper-replace-supers": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4" } }, "@babel/helper-create-regexp-features-plugin": { @@ -196,84 +196,84 @@ } }, "@babel/helper-explode-assignable-expression": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.14.5.tgz", - "integrity": "sha512-Htb24gnGJdIGT4vnRKMdoXiOIlqOLmdiUYpAQ0mYfgVT/GDm8GOYhgi4GL+hMKrkiPRohO4ts34ELFsGAPQLDQ==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.15.4.tgz", + "integrity": "sha512-J14f/vq8+hdC2KoWLIQSsGrC9EFBKE4NFts8pfMpymfApds+fPqR30AOUWc4tyr56h9l/GA1Sxv2q3dLZWbQ/g==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.15.4" } }, "@babel/helper-function-name": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz", - "integrity": "sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.15.4.tgz", + "integrity": "sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.14.5", - "@babel/template": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/helper-get-function-arity": "^7.15.4", + "@babel/template": "^7.15.4", + "@babel/types": "^7.15.4" } }, "@babel/helper-get-function-arity": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz", - "integrity": "sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz", + "integrity": "sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.15.4" } }, "@babel/helper-hoist-variables": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.14.5.tgz", - "integrity": "sha512-R1PXiz31Uc0Vxy4OEOm07x0oSjKAdPPCh3tPivn/Eo8cvz6gveAeuyUUPB21Hoiif0uoPQSSdhIPS3352nvdyQ==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.15.4.tgz", + "integrity": "sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.15.4" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.0.tgz", - "integrity": "sha512-Jq8H8U2kYiafuj2xMTPQwkTBnEEdGKpT35lJEQsRRjnG0LW3neucsaMWLgKcwu3OHKNeYugfw+Z20BXBSEs2Lg==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.4.tgz", + "integrity": "sha512-cokOMkxC/BTyNP1AlY25HuBWM32iCEsLPI4BHDpJCHHm1FU2E7dKWWIXJgQgSFiu4lp8q3bL1BIKwqkSUviqtA==", "dev": true, "requires": { - "@babel/types": "^7.15.0" + "@babel/types": "^7.15.4" } }, "@babel/helper-module-imports": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.14.5.tgz", - "integrity": "sha512-SwrNHu5QWS84XlHwGYPDtCxcA0hrSlL2yhWYLgeOc0w7ccOl2qv4s/nARI0aYZW+bSwAL5CukeXA47B/1NKcnQ==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.15.4.tgz", + "integrity": "sha512-jeAHZbzUwdW/xHgHQ3QmWR4Jg6j15q4w/gCfwZvtqOxoo5DKtLHk8Bsf4c5RZRC7NmLEs+ohkdq8jFefuvIxAA==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.15.4" } }, "@babel/helper-module-transforms": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.0.tgz", - "integrity": "sha512-RkGiW5Rer7fpXv9m1B3iHIFDZdItnO2/BLfWVW/9q7+KqQSDY5kUfQEbzdXM1MVhJGcugKV7kRrNVzNxmk7NBg==", + "version": "7.15.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.7.tgz", + "integrity": "sha512-ZNqjjQG/AuFfekFTY+7nY4RgBSklgTu970c7Rj3m/JOhIu5KPBUuTA9AY6zaKcUvk4g6EbDXdBnhi35FAssdSw==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.14.5", - "@babel/helper-replace-supers": "^7.15.0", - "@babel/helper-simple-access": "^7.14.8", - "@babel/helper-split-export-declaration": "^7.14.5", - "@babel/helper-validator-identifier": "^7.14.9", - "@babel/template": "^7.14.5", - "@babel/traverse": "^7.15.0", - "@babel/types": "^7.15.0" + "@babel/helper-module-imports": "^7.15.4", + "@babel/helper-replace-supers": "^7.15.4", + "@babel/helper-simple-access": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4", + "@babel/helper-validator-identifier": "^7.15.7", + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.6" } }, "@babel/helper-optimise-call-expression": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.14.5.tgz", - "integrity": "sha512-IqiLIrODUOdnPU9/F8ib1Fx2ohlgDhxnIDU7OEVi+kAbEZcyiF7BLU8W6PfvPi9LzztjS7kcbzbmL7oG8kD6VA==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.15.4.tgz", + "integrity": "sha512-E/z9rfbAOt1vDW1DR7k4SzhzotVV5+qMciWV6LaG1g4jeFrkDlJedjtV4h0i4Q/ITnUu+Pk08M7fczsB9GXBDw==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.15.4" } }, "@babel/helper-plugin-utils": { @@ -283,59 +283,59 @@ "dev": true }, "@babel/helper-remap-async-to-generator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.14.5.tgz", - "integrity": "sha512-rLQKdQU+HYlxBwQIj8dk4/0ENOUEhA/Z0l4hN8BexpvmSMN9oA9EagjnhnDpNsRdWCfjwa4mn/HyBXO9yhQP6A==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.15.4.tgz", + "integrity": "sha512-v53MxgvMK/HCwckJ1bZrq6dNKlmwlyRNYM6ypaRTdXWGOE2c1/SCa6dL/HimhPulGhZKw9W0QhREM583F/t0vQ==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-wrap-function": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-wrap-function": "^7.15.4", + "@babel/types": "^7.15.4" } }, "@babel/helper-replace-supers": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.0.tgz", - "integrity": "sha512-6O+eWrhx+HEra/uJnifCwhwMd6Bp5+ZfZeJwbqUTuqkhIT6YcRhiZCOOFChRypOIe0cV46kFrRBlm+t5vHCEaA==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.4.tgz", + "integrity": "sha512-/ztT6khaXF37MS47fufrKvIsiQkx1LBRvSJNzRqmbyeZnTwU9qBxXYLaaT/6KaxfKhjs2Wy8kG8ZdsFUuWBjzw==", "dev": true, "requires": { - "@babel/helper-member-expression-to-functions": "^7.15.0", - "@babel/helper-optimise-call-expression": "^7.14.5", - "@babel/traverse": "^7.15.0", - "@babel/types": "^7.15.0" + "@babel/helper-member-expression-to-functions": "^7.15.4", + "@babel/helper-optimise-call-expression": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4" } }, "@babel/helper-simple-access": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.14.8.tgz", - "integrity": "sha512-TrFN4RHh9gnWEU+s7JloIho2T76GPwRHhdzOWLqTrMnlas8T9O7ec+oEDNsRXndOmru9ymH9DFrEOxpzPoSbdg==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.15.4.tgz", + "integrity": "sha512-UzazrDoIVOZZcTeHHEPYrr1MvTR/K+wgLg6MY6e1CJyaRhbibftF6fR2KU2sFRtI/nERUZR9fBd6aKgBlIBaPg==", "dev": true, "requires": { - "@babel/types": "^7.14.8" + "@babel/types": "^7.15.4" } }, "@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.14.5.tgz", - "integrity": "sha512-dmqZB7mrb94PZSAOYtr+ZN5qt5owZIAgqtoTuqiFbHFtxgEcmQlRJVI+bO++fciBunXtB6MK7HrzrfcAzIz2NQ==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.15.4.tgz", + "integrity": "sha512-BMRLsdh+D1/aap19TycS4eD1qELGrCBJwzaY9IE8LrpJtJb+H7rQkPIdsfgnMtLBA6DJls7X9z93Z4U8h7xw0A==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.15.4" } }, "@babel/helper-split-export-declaration": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.14.5.tgz", - "integrity": "sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.15.4.tgz", + "integrity": "sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.15.4" } }, "@babel/helper-validator-identifier": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", - "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==", + "version": "7.15.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", + "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", "dev": true }, "@babel/helper-validator-option": { @@ -345,26 +345,26 @@ "dev": true }, "@babel/helper-wrap-function": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.14.5.tgz", - "integrity": "sha512-YEdjTCq+LNuNS1WfxsDCNpgXkJaIyqco6DAelTUjT4f2KIWC1nBcaCaSdHTBqQVLnTBexBcVcFhLSU1KnYuePQ==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.15.4.tgz", + "integrity": "sha512-Y2o+H/hRV5W8QhIfTpRIBwl57y8PrZt6JM3V8FOo5qarjshHItyH5lXlpMfBfmBefOqSCpKZs/6Dxqp0E/U+uw==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.14.5", - "@babel/template": "^7.14.5", - "@babel/traverse": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/helper-function-name": "^7.15.4", + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4" } }, "@babel/helpers": { - "version": "7.15.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.3.tgz", - "integrity": "sha512-HwJiz52XaS96lX+28Tnbu31VeFSQJGOeKHJeaEPQlTl7PnlhFElWPj8tUXtqFIzeN86XxXoBr+WFAyK2PPVz6g==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.4.tgz", + "integrity": "sha512-V45u6dqEJ3w2rlryYYXf6i9rQ5YMNu4FLS6ngs8ikblhu2VdR1AqAd6aJjBzmf2Qzh6KOLqKHxEN9+TFbAkAVQ==", "dev": true, "requires": { - "@babel/template": "^7.14.5", - "@babel/traverse": "^7.15.0", - "@babel/types": "^7.15.0" + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4" } }, "@babel/highlight": { @@ -379,30 +379,30 @@ } }, "@babel/parser": { - "version": "7.15.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.3.tgz", - "integrity": "sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA==", + "version": "7.15.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.7.tgz", + "integrity": "sha512-rycZXvQ+xS9QyIcJ9HXeDWf1uxqlbVFAUq0Rq0dbc50Zb/+wUe/ehyfzGfm9KZZF0kBejYgxltBXocP+gKdL2g==", "dev": true }, "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.14.5.tgz", - "integrity": "sha512-ZoJS2XCKPBfTmL122iP6NM9dOg+d4lc9fFk3zxc8iDjvt8Pk4+TlsHSKhIPf6X+L5ORCdBzqMZDjL/WHj7WknQ==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.15.4.tgz", + "integrity": "sha512-eBnpsl9tlhPhpI10kU06JHnrYXwg3+V6CaP2idsCXNef0aeslpqyITXQ74Vfk5uHgY7IG7XP0yIH8b42KSzHog==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.15.4", "@babel/plugin-proposal-optional-chaining": "^7.14.5" } }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.9.tgz", - "integrity": "sha512-d1lnh+ZnKrFKwtTYdw320+sQWCTwgkB9fmUhNXRADA4akR6wLjaruSGnIEUjpt9HCOwTr4ynFTKu19b7rFRpmw==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.15.4.tgz", + "integrity": "sha512-2zt2g5vTXpMC3OmK6uyjvdXptbhBXfA77XGrd3gh93zwG8lZYBLOBImiGBEG0RANu3JqKEACCz5CGk73OJROBw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-remap-async-to-generator": "^7.14.5", + "@babel/helper-remap-async-to-generator": "^7.15.4", "@babel/plugin-syntax-async-generators": "^7.8.4" } }, @@ -417,12 +417,12 @@ } }, "@babel/plugin-proposal-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.14.5.tgz", - "integrity": "sha512-KBAH5ksEnYHCegqseI5N9skTdxgJdmDoAOc0uXa+4QMYKeZD0w5IARh4FMlTNtaHhbB8v+KzMdTgxMMzsIy6Yg==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.15.4.tgz", + "integrity": "sha512-M682XWrrLNk3chXCjoPUQWOyYsB93B9z3mRyjtqqYJWDf2mfCdIYgDrA11cgNVhAQieaq6F2fn2f3wI0U4aTjA==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-create-class-features-plugin": "^7.15.4", "@babel/helper-plugin-utils": "^7.14.5", "@babel/plugin-syntax-class-static-block": "^7.14.5" } @@ -488,16 +488,16 @@ } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.14.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.14.7.tgz", - "integrity": "sha512-082hsZz+sVabfmDWo1Oct1u1AgbKbUAyVgmX4otIc7bdsRgHBXwTwb3DpDmD4Eyyx6DNiuz5UAATT655k+kL5g==", + "version": "7.15.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.15.6.tgz", + "integrity": "sha512-qtOHo7A1Vt+O23qEAX+GdBpqaIuD3i9VRrWgCJeq7WO6H2d14EK3q11urj5Te2MAeK97nMiIdRpwd/ST4JFbNg==", "dev": true, "requires": { - "@babel/compat-data": "^7.14.7", - "@babel/helper-compilation-targets": "^7.14.5", + "@babel/compat-data": "^7.15.0", + "@babel/helper-compilation-targets": "^7.15.4", "@babel/helper-plugin-utils": "^7.14.5", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.14.5" + "@babel/plugin-transform-parameters": "^7.15.4" } }, "@babel/plugin-proposal-optional-catch-binding": { @@ -532,13 +532,13 @@ } }, "@babel/plugin-proposal-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-62EyfyA3WA0mZiF2e2IV9mc9Ghwxcg8YTu8BS4Wss4Y3PY725OmS9M0qLORbJwLqFtGh+jiE4wAmocK2CTUK2Q==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.15.4.tgz", + "integrity": "sha512-X0UTixkLf0PCCffxgu5/1RQyGGbgZuKoI+vXP4iSbJSYwPb7hu06omsFGBvQ9lJEvwgrxHdS8B5nbfcd8GyUNA==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-create-class-features-plugin": "^7.15.4", "@babel/helper-plugin-utils": "^7.14.5", "@babel/plugin-syntax-private-property-in-object": "^7.14.5" } @@ -718,17 +718,17 @@ } }, "@babel/plugin-transform-classes": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.9.tgz", - "integrity": "sha512-NfZpTcxU3foGWbl4wxmZ35mTsYJy8oQocbeIMoDAGGFarAmSQlL+LWMkDx/tj6pNotpbX3rltIA4dprgAPOq5A==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.15.4.tgz", + "integrity": "sha512-Yjvhex8GzBmmPQUvpXRPWQ9WnxXgAFuZSrqOK/eJlOGIXwvv8H3UEdUigl1gb/bnjTrln+e8bkZUYCBt/xYlBg==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-function-name": "^7.14.5", - "@babel/helper-optimise-call-expression": "^7.14.5", + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-function-name": "^7.15.4", + "@babel/helper-optimise-call-expression": "^7.15.4", "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-replace-supers": "^7.14.5", - "@babel/helper-split-export-declaration": "^7.14.5", + "@babel/helper-replace-supers": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4", "globals": "^11.1.0" } }, @@ -780,9 +780,9 @@ } }, "@babel/plugin-transform-for-of": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.14.5.tgz", - "integrity": "sha512-CfmqxSUZzBl0rSjpoQSFoR9UEj3HzbGuGNL21/iFTmjb5gFggJp3ph0xR1YBhexmLoKRHzgxuFvty2xdSt6gTA==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.15.4.tgz", + "integrity": "sha512-DRTY9fA751AFBDh2oxydvVm4SYevs5ILTWLs6xKXps4Re/KG5nfUkr+TdHCrRWB8C69TlzVgA9b3RmGWmgN9LA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.14.5" @@ -828,27 +828,27 @@ } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.0.tgz", - "integrity": "sha512-3H/R9s8cXcOGE8kgMlmjYYC9nqr5ELiPkJn4q0mypBrjhYQoc+5/Maq69vV4xRPWnkzZuwJPf5rArxpB/35Cig==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.4.tgz", + "integrity": "sha512-qg4DPhwG8hKp4BbVDvX1s8cohM8a6Bvptu4l6Iingq5rW+yRUAhe/YRup/YcW2zCOlrysEWVhftIcKzrEZv3sA==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.15.0", + "@babel/helper-module-transforms": "^7.15.4", "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-simple-access": "^7.14.8", + "@babel/helper-simple-access": "^7.15.4", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.14.5.tgz", - "integrity": "sha512-mNMQdvBEE5DcMQaL5LbzXFMANrQjd2W7FPzg34Y4yEz7dBgdaC+9B84dSO+/1Wba98zoDbInctCDo4JGxz1VYA==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.15.4.tgz", + "integrity": "sha512-fJUnlQrl/mezMneR72CKCgtOoahqGJNVKpompKwzv3BrEXdlPspTcyxrZ1XmDTIr9PpULrgEQo3qNKp6dW7ssw==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.14.5", - "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-hoist-variables": "^7.15.4", + "@babel/helper-module-transforms": "^7.15.4", "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-validator-identifier": "^7.14.5", + "@babel/helper-validator-identifier": "^7.14.9", "babel-plugin-dynamic-import-node": "^2.3.3" } }, @@ -891,9 +891,9 @@ } }, "@babel/plugin-transform-parameters": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.14.5.tgz", - "integrity": "sha512-Tl7LWdr6HUxTmzQtzuU14SqbgrSKmaR77M0OKyq4njZLQTPfOvzblNKyNkGwOfEFCEx7KeYHQHDI0P3F02IVkA==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.15.4.tgz", + "integrity": "sha512-9WB/GUTO6lvJU3XQsSr6J/WKvBC2hcs4Pew8YxZagi6GkTdniyqp8On5kqdK8MN0LMeu0mGbhPN+O049NV/9FQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.14.5" @@ -992,30 +992,30 @@ } }, "@babel/preset-env": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.15.0.tgz", - "integrity": "sha512-FhEpCNFCcWW3iZLg0L2NPE9UerdtsCR6ZcsGHUX6Om6kbCQeL5QZDqFDmeNHC6/fy6UH3jEge7K4qG5uC9In0Q==", + "version": "7.15.6", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.15.6.tgz", + "integrity": "sha512-L+6jcGn7EWu7zqaO2uoTDjjMBW+88FXzV8KvrBl2z6MtRNxlsmUNRlZPaNNPUTgqhyC5DHNFk/2Jmra+ublZWw==", "dev": true, "requires": { "@babel/compat-data": "^7.15.0", - "@babel/helper-compilation-targets": "^7.15.0", + "@babel/helper-compilation-targets": "^7.15.4", "@babel/helper-plugin-utils": "^7.14.5", "@babel/helper-validator-option": "^7.14.5", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.14.5", - "@babel/plugin-proposal-async-generator-functions": "^7.14.9", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.15.4", + "@babel/plugin-proposal-async-generator-functions": "^7.15.4", "@babel/plugin-proposal-class-properties": "^7.14.5", - "@babel/plugin-proposal-class-static-block": "^7.14.5", + "@babel/plugin-proposal-class-static-block": "^7.15.4", "@babel/plugin-proposal-dynamic-import": "^7.14.5", "@babel/plugin-proposal-export-namespace-from": "^7.14.5", "@babel/plugin-proposal-json-strings": "^7.14.5", "@babel/plugin-proposal-logical-assignment-operators": "^7.14.5", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5", "@babel/plugin-proposal-numeric-separator": "^7.14.5", - "@babel/plugin-proposal-object-rest-spread": "^7.14.7", + "@babel/plugin-proposal-object-rest-spread": "^7.15.6", "@babel/plugin-proposal-optional-catch-binding": "^7.14.5", "@babel/plugin-proposal-optional-chaining": "^7.14.5", "@babel/plugin-proposal-private-methods": "^7.14.5", - "@babel/plugin-proposal-private-property-in-object": "^7.14.5", + "@babel/plugin-proposal-private-property-in-object": "^7.15.4", "@babel/plugin-proposal-unicode-property-regex": "^7.14.5", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", @@ -1034,25 +1034,25 @@ "@babel/plugin-transform-arrow-functions": "^7.14.5", "@babel/plugin-transform-async-to-generator": "^7.14.5", "@babel/plugin-transform-block-scoped-functions": "^7.14.5", - "@babel/plugin-transform-block-scoping": "^7.14.5", - "@babel/plugin-transform-classes": "^7.14.9", + "@babel/plugin-transform-block-scoping": "^7.15.3", + "@babel/plugin-transform-classes": "^7.15.4", "@babel/plugin-transform-computed-properties": "^7.14.5", "@babel/plugin-transform-destructuring": "^7.14.7", "@babel/plugin-transform-dotall-regex": "^7.14.5", "@babel/plugin-transform-duplicate-keys": "^7.14.5", "@babel/plugin-transform-exponentiation-operator": "^7.14.5", - "@babel/plugin-transform-for-of": "^7.14.5", + "@babel/plugin-transform-for-of": "^7.15.4", "@babel/plugin-transform-function-name": "^7.14.5", "@babel/plugin-transform-literals": "^7.14.5", "@babel/plugin-transform-member-expression-literals": "^7.14.5", "@babel/plugin-transform-modules-amd": "^7.14.5", - "@babel/plugin-transform-modules-commonjs": "^7.15.0", - "@babel/plugin-transform-modules-systemjs": "^7.14.5", + "@babel/plugin-transform-modules-commonjs": "^7.15.4", + "@babel/plugin-transform-modules-systemjs": "^7.15.4", "@babel/plugin-transform-modules-umd": "^7.14.5", "@babel/plugin-transform-named-capturing-groups-regex": "^7.14.9", "@babel/plugin-transform-new-target": "^7.14.5", "@babel/plugin-transform-object-super": "^7.14.5", - "@babel/plugin-transform-parameters": "^7.14.5", + "@babel/plugin-transform-parameters": "^7.15.4", "@babel/plugin-transform-property-literals": "^7.14.5", "@babel/plugin-transform-regenerator": "^7.14.5", "@babel/plugin-transform-reserved-words": "^7.14.5", @@ -1064,7 +1064,7 @@ "@babel/plugin-transform-unicode-escapes": "^7.14.5", "@babel/plugin-transform-unicode-regex": "^7.14.5", "@babel/preset-modules": "^0.1.4", - "@babel/types": "^7.15.0", + "@babel/types": "^7.15.6", "babel-plugin-polyfill-corejs2": "^0.2.2", "babel-plugin-polyfill-corejs3": "^0.2.2", "babel-plugin-polyfill-regenerator": "^0.2.2", @@ -1094,38 +1094,38 @@ } }, "@babel/runtime": { - "version": "7.15.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz", - "integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.4.tgz", + "integrity": "sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw==", "dev": true, "requires": { "regenerator-runtime": "^0.13.4" } }, "@babel/template": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.14.5.tgz", - "integrity": "sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.15.4.tgz", + "integrity": "sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg==", "dev": true, "requires": { "@babel/code-frame": "^7.14.5", - "@babel/parser": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/parser": "^7.15.4", + "@babel/types": "^7.15.4" } }, "@babel/traverse": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.0.tgz", - "integrity": "sha512-392d8BN0C9eVxVWd8H6x9WfipgVH5IaIoLp23334Sc1vbKKWINnvwRpb4us0xtPaCumlwbTtIYNA0Dv/32sVFw==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.4.tgz", + "integrity": "sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA==", "dev": true, "requires": { "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.15.0", - "@babel/helper-function-name": "^7.14.5", - "@babel/helper-hoist-variables": "^7.14.5", - "@babel/helper-split-export-declaration": "^7.14.5", - "@babel/parser": "^7.15.0", - "@babel/types": "^7.15.0", + "@babel/generator": "^7.15.4", + "@babel/helper-function-name": "^7.15.4", + "@babel/helper-hoist-variables": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4", + "@babel/parser": "^7.15.4", + "@babel/types": "^7.15.4", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1148,15 +1148,98 @@ } }, "@babel/types": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.0.tgz", - "integrity": "sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ==", + "version": "7.15.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.6.tgz", + "integrity": "sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.14.9", "to-fast-properties": "^2.0.0" } }, + "@eslint/eslintrc": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "globals": { + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", + "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "@humanwhocodes/config-array": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "dependencies": { + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", + "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", + "dev": true + }, "@nicolo-ribaudo/chokidar-2": { "version": "2.1.8-no-fsevents.2", "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.2.tgz", @@ -1177,10 +1260,36 @@ "upath": "^1.1.1" } }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, "@rollup/plugin-babel": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.0.tgz", - "integrity": "sha512-9uIC8HZOnVLrLHxayq/PTzw+uS25E14KPUBh5ktF+18Mjo5yK0ToMMx6epY0uEgkjwJw0aBW4x2horYXh8juWw==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.2.1.tgz", + "integrity": "sha512-Jd7oqFR2dzZJ3NWANDyBjwTtX/lYbZpVcmkHrfQcpvawHs9E4c0nYk5U2mfZ6I/DZcIvy506KZJi54XK/jxH7A==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.10.4", @@ -1188,18 +1297,17 @@ } }, "@rollup/plugin-node-resolve": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-8.4.0.tgz", - "integrity": "sha512-LFqKdRLn0ShtQyf6SBYO69bGE1upV6wUhBX0vFOUnLAyzx5cwp8svA0eHUnu8+YU57XOkrMtfG63QOpQx25pHQ==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.1.0.tgz", + "integrity": "sha512-ouBBppRdWJKCllDXGzJ7ZIkYbaq+5TmyP0smt1vdJCFfoZhLi31vhpmjLhyo8lreHf4RoeSNllaWrvSqHpHRog==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", "@types/resolve": "1.17.1", "builtin-modules": "^3.1.0", - "deep-freeze": "^0.0.1", "deepmerge": "^4.2.2", "is-module": "^1.0.0", - "resolve": "^1.17.0" + "resolve": "^1.19.0" } }, "@rollup/pluginutils": { @@ -1213,12 +1321,6 @@ "picomatch": "^2.2.2" } }, - "@types/eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", - "dev": true - }, "@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", @@ -1232,9 +1334,9 @@ "dev": true }, "@types/node": { - "version": "16.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.6.1.tgz", - "integrity": "sha512-Sr7BhXEAer9xyGuCN3Ek9eg9xPviCF2gfu9kTfuU2HkTVAMYSDeX40fvpmo72n5nansg3nsBjuQBrsS28r+NUw==", + "version": "16.10.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.2.tgz", + "integrity": "sha512-zCclL4/rx+W5SQTzFs9wyvvyCwoK9QtBpratqz2IYJ3O8Umrn0m3nsTv0wQBk9sRGpvUe9CwPDrQFB10f1FIjQ==", "dev": true }, "@types/resolve": { @@ -1247,17 +1349,18 @@ } }, "@typescript-eslint/eslint-plugin": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.10.1.tgz", - "integrity": "sha512-PQg0emRtzZFWq6PxBcdxRH3QIQiyFO3WCVpRL3fgj5oQS3CDs3AeAKfv4DxNhzn8ITdNJGJ4D3Qw8eAJf3lXeQ==", + "version": "4.31.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.31.1.tgz", + "integrity": "sha512-UDqhWmd5i0TvPLmbK5xY3UZB0zEGseF+DHPghZ37Sb83Qd3p8ujhvAtkU4OF46Ka5Pm5kWvFIx0cCTBFKo0alA==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "3.10.1", - "debug": "^4.1.1", + "@typescript-eslint/experimental-utils": "4.31.1", + "@typescript-eslint/scope-manager": "4.31.1", + "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", - "regexpp": "^3.0.0", - "semver": "^7.3.2", - "tsutils": "^3.17.1" + "regexpp": "^3.1.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" }, "dependencies": { "debug": { @@ -1287,51 +1390,77 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz", - "integrity": "sha512-DewqIgscDzmAfd5nOGe4zm6Bl7PKtMG2Ad0KG8CUZAHlXfAKTF9Ol5PXhiMh39yRL2ChRH1cuuUGOcVyyrhQIw==", + "version": "4.31.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.31.1.tgz", + "integrity": "sha512-NtoPsqmcSsWty0mcL5nTZXMf7Ei0Xr2MT8jWjXMVgRK0/1qeQ2jZzLFUh4QtyJ4+/lPUyMw5cSfeeME+Zrtp9Q==", "dev": true, "requires": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/typescript-estree": "3.10.1", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0" + "@types/json-schema": "^7.0.7", + "@typescript-eslint/scope-manager": "4.31.1", + "@typescript-eslint/types": "4.31.1", + "@typescript-eslint/typescript-estree": "4.31.1", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" } }, "@typescript-eslint/parser": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.10.1.tgz", - "integrity": "sha512-Ug1RcWcrJP02hmtaXVS3axPPTTPnZjupqhgj+NnZ6BCkwSImWk/283347+x9wN+lqOdK9Eo3vsyiyDHgsmiEJw==", + "version": "4.31.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.31.1.tgz", + "integrity": "sha512-dnVZDB6FhpIby6yVbHkwTKkn2ypjVIfAR9nh+kYsA/ZL0JlTsd22BiDjouotisY3Irmd3OW1qlk9EI5R8GrvRQ==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "4.31.1", + "@typescript-eslint/types": "4.31.1", + "@typescript-eslint/typescript-estree": "4.31.1", + "debug": "^4.3.1" + }, + "dependencies": { + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "@typescript-eslint/scope-manager": { + "version": "4.31.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.31.1.tgz", + "integrity": "sha512-N1Uhn6SqNtU2XpFSkD4oA+F0PfKdWHyr4bTX0xTj8NRx1314gBDRL1LUuZd5+L3oP+wo6hCbZpaa1in6SwMcVQ==", "dev": true, "requires": { - "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "3.10.1", - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/typescript-estree": "3.10.1", - "eslint-visitor-keys": "^1.1.0" + "@typescript-eslint/types": "4.31.1", + "@typescript-eslint/visitor-keys": "4.31.1" } }, "@typescript-eslint/types": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.10.1.tgz", - "integrity": "sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ==", + "version": "4.31.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.31.1.tgz", + "integrity": "sha512-kixltt51ZJGKENNW88IY5MYqTBA8FR0Md8QdGbJD2pKZ+D5IvxjTYDNtJPDxFBiXmka2aJsITdB1BtO1fsgmsQ==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz", - "integrity": "sha512-QbcXOuq6WYvnB3XPsZpIwztBoquEYLXh2MtwVU+kO8jgYCiv4G5xrSP/1wg4tkvrEE+esZVquIPX/dxPlePk1w==", + "version": "4.31.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.31.1.tgz", + "integrity": "sha512-EGHkbsUvjFrvRnusk6yFGqrqMBTue5E5ROnS5puj3laGQPasVUgwhrxfcgkdHNFECHAewpvELE1Gjv0XO3mdWg==", "dev": true, "requires": { - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/visitor-keys": "3.10.1", - "debug": "^4.1.1", - "glob": "^7.1.6", + "@typescript-eslint/types": "4.31.1", + "@typescript-eslint/visitor-keys": "4.31.1", + "debug": "^4.3.1", + "globby": "^11.0.3", "is-glob": "^4.0.1", - "lodash": "^4.17.15", - "semver": "^7.3.2", - "tsutils": "^3.17.1" + "semver": "^7.3.5", + "tsutils": "^3.21.0" }, "dependencies": { "debug": { @@ -1361,12 +1490,13 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz", - "integrity": "sha512-9JgC82AaQeglebjZMgYR5wgmfUdUc+EitGUUMW8u2nDckaeimzW+VsoLV6FoimPv2id3VQzfjwBxEMVz08ameQ==", + "version": "4.31.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.31.1.tgz", + "integrity": "sha512-PCncP8hEqKw6SOJY+3St4LVtoZpPPn+Zlpm7KW5xnviMhdqcsBty4Lsg4J/VECpJjw1CkROaZhH4B8M1OfnXTQ==", "dev": true, "requires": { - "eslint-visitor-keys": "^1.1.0" + "@typescript-eslint/types": "4.31.1", + "eslint-visitor-keys": "^2.0.0" } }, "acorn": { @@ -1400,9 +1530,9 @@ "dev": true }, "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { @@ -1467,6 +1597,12 @@ "dev": true, "optional": true }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, "array-unique": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", @@ -1482,9 +1618,9 @@ "optional": true }, "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true }, "async-each": { @@ -1530,13 +1666,13 @@ } }, "babel-plugin-polyfill-corejs3": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.4.tgz", - "integrity": "sha512-z3HnJE5TY/j4EFEa/qpQMSbcUJZ5JQi+3UFjXzn6pQCmIKc5Ug5j98SuYyH+m4xQnvKlMDIW4plLfgyVnd0IcQ==", + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.5.tgz", + "integrity": "sha512-ninF5MQNwAX9Z7c9ED+H2pGt1mXdP4TqzlHKyPIYmJIYz0N+++uwdM7RnJukklhzJ54Q84vA4ZJkgs7lu5vqcw==", "dev": true, "requires": { "@babel/helper-define-polyfill-provider": "^0.2.2", - "core-js-compat": "^3.14.0" + "core-js-compat": "^3.16.2" } }, "babel-plugin-polyfill-regenerator": { @@ -1663,16 +1799,16 @@ } }, "browserslist": { - "version": "4.16.7", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.7.tgz", - "integrity": "sha512-7I4qVwqZltJ7j37wObBe3SoTz+nS8APaNcrBOlgoirb6/HbEU2XxW/LpUDTCngM6iauwFqmRTuOMfyKnFGY5JA==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.2.tgz", + "integrity": "sha512-jSDZyqJmkKMEMi7SZAgX5UltFdR5NAO43vY0AwTpu4X3sGH7GLLQ83KiUomgrnvZRCeW0yPPnKqnxPqQOER9zQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001248", - "colorette": "^1.2.2", - "electron-to-chromium": "^1.3.793", + "caniuse-lite": "^1.0.30001261", + "electron-to-chromium": "^1.3.854", "escalade": "^3.1.1", - "node-releases": "^1.1.73" + "nanocolors": "^0.2.12", + "node-releases": "^1.1.76" } }, "buffer-from": { @@ -1722,9 +1858,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001251", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001251.tgz", - "integrity": "sha512-HOe1r+9VkU4TFmnU70z+r7OLmtR+/chB1rdcJUeQlAinjEeb0cKL20tlAtOagNZhbrtLnCvV19B4FmF1rgzl6A==", + "version": "1.0.30001264", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001264.tgz", + "integrity": "sha512-Ftfqqfcs/ePiUmyaySsQ4PUsdcYyXG2rfoBVsk3iY1ahHaJEw65vfb7Suzqm+cEkwwPIv/XWkg27iCpRavH4zA==", "dev": true }, "chalk": { @@ -1857,42 +1993,6 @@ } } }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - }, - "dependencies": { - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - } - } - }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -1919,12 +2019,6 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, - "colorette": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.3.0.tgz", - "integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==", - "dev": true - }, "commander": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", @@ -1967,12 +2061,12 @@ "optional": true }, "core-js-compat": { - "version": "3.16.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.16.1.tgz", - "integrity": "sha512-NHXQXvRbd4nxp9TEmooTJLUf94ySUG6+DSsscBpTftN1lQLQ4LjnWvc7AoIo4UjDsFF3hB8Uh5LLCRRdaiT5MQ==", + "version": "3.18.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.18.1.tgz", + "integrity": "sha512-XJMYx58zo4W0kLPmIingVZA10+7TuKrMLPt83+EzDmxFJQUMcTVVmQ+n5JP4r6Z14qSzhQBRi3NSWoeVyKKXUg==", "dev": true, "requires": { - "browserslist": "^4.16.7", + "browserslist": "^4.17.1", "semver": "7.0.0" }, "dependencies": { @@ -1985,9 +2079,9 @@ } }, "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "dev": true, "optional": true }, @@ -2019,16 +2113,10 @@ "dev": true, "optional": true }, - "deep-freeze": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/deep-freeze/-/deep-freeze-0.0.1.tgz", - "integrity": "sha1-OgsABd4YZygZ39OM0x+RF5yJPoQ=", - "dev": true - }, "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, "deepmerge": { @@ -2091,6 +2179,15 @@ } } }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -2101,15 +2198,15 @@ } }, "electron-to-chromium": { - "version": "1.3.805", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.805.tgz", - "integrity": "sha512-uUJF59M6pNSRHQaXwdkaNB4BhSQ9lldRdG1qCjlrAFkynPGDc5wPoUcYEQQeQGmKyAWJPvGkYAWmtVrxWmDAkg==", + "version": "1.3.857", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.857.tgz", + "integrity": "sha512-a5kIr2lajm4bJ5E4D3fp8Y/BRB0Dx2VOcCRE5Gtb679mXIME/OFhWler8Gy2ksrf8gFX+EFCSIGA33FB3gqYpg==", "dev": true }, "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, "enquirer": { @@ -2134,28 +2231,32 @@ "dev": true }, "eslint": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.6.0.tgz", - "integrity": "sha512-QlAManNtqr7sozWm5TF4wIH9gmUm2hE3vNRUvyoYAa4y1l5/jxD/PQStEjBMQtCqZmSep8UxrcecI60hOpe61w==", + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", + "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", "enquirer": "^2.3.5", - "eslint-scope": "^5.1.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^5.1.1", "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^1.3.0", - "espree": "^7.2.0", - "esquery": "^1.2.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", + "glob-parent": "^5.1.2", + "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", @@ -2163,7 +2264,7 @@ "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.19", + "lodash.merge": "^4.6.2", "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", @@ -2172,11 +2273,20 @@ "semver": "^7.2.1", "strip-ansi": "^6.0.0", "strip-json-comments": "^3.1.0", - "table": "^5.2.3", + "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, "dependencies": { + "@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -2220,13 +2330,36 @@ "ms": "2.1.2" } }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", + "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "type-fest": "^0.20.2" } }, "has-flag": { @@ -2235,6 +2368,12 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -2272,18 +2411,18 @@ } }, "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, "requires": { - "eslint-visitor-keys": "^1.1.0" + "eslint-visitor-keys": "^2.0.0" } }, "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true }, "espree": { @@ -2295,6 +2434,14 @@ "acorn": "^7.4.0", "acorn-jsx": "^5.3.1", "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } } }, "esprima": { @@ -2493,6 +2640,64 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, + "fast-glob": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", + "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "dependencies": { + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + } + } + }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -2505,13 +2710,22 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "requires": { - "flat-cache": "^2.0.1" + "flat-cache": "^3.0.4" } }, "fill-range": { @@ -2540,9 +2754,9 @@ } }, "find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", "dev": true, "requires": { "commondir": "^1.0.1", @@ -2578,31 +2792,19 @@ } }, "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" - }, - "dependencies": { - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - } + "flatted": "^3.1.0", + "rimraf": "^3.0.2" } }, "flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", + "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", "dev": true }, "for-in": { @@ -2670,12 +2872,6 @@ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, "get-intrinsic": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", @@ -2695,9 +2891,9 @@ "optional": true }, "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -2723,33 +2919,34 @@ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, - "graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", - "dev": true - }, - "handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "globby": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", + "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", "dev": true, "requires": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4", - "wordwrap": "^1.0.0" + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" }, "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true } } }, + "graceful-fs": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", + "dev": true + }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -2807,9 +3004,9 @@ } }, "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", "dev": true }, "import-fresh": { @@ -2884,9 +3081,9 @@ "optional": true }, "is-core-module": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz", - "integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.7.0.tgz", + "integrity": "sha512-ByY+tjCciCr+9nLryBYcSD50EOGWt95c7tIsKTG1J2ixKKXPvF7Ej3AVd+UfDydAJom3biBGDBALaO79ktwgEQ==", "dev": true, "requires": { "has": "^1.0.3" @@ -2949,15 +3146,15 @@ "dev": true }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "requires": { "is-extglob": "^2.1.1" @@ -3134,10 +3331,10 @@ "p-locate": "^4.1.0" } }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", "dev": true }, "lodash.debounce": { @@ -3146,6 +3343,18 @@ "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", "dev": true }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "dev": true + }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -3188,6 +3397,12 @@ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -3248,15 +3463,6 @@ } } }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -3264,6 +3470,12 @@ "dev": true, "optional": true }, + "nanocolors": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/nanocolors/-/nanocolors-0.2.12.tgz", + "integrity": "sha512-SFNdALvzW+rVlzqexid6epYdt8H9Zol7xDoQarioEFcFN0JHo4CYNztAxmtfgGTVRCmFlEOqqhBpoFGKqSAMug==", + "dev": true + }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -3290,16 +3502,10 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, "node-releases": { - "version": "1.1.74", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.74.tgz", - "integrity": "sha512-caJBVempXZPepZoZAPCWRTNxYQ+xtG/KAi4ozTA5A+nJ7IU+kLQCbqaUjb5Rwy14M9upBWiQ4NutcmW04LJSRw==", + "version": "1.1.77", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.77.tgz", + "integrity": "sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ==", "dev": true }, "normalize-path": { @@ -3468,6 +3674,12 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, "picomatch": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", @@ -3521,6 +3733,12 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -3565,12 +3783,12 @@ "dev": true }, "regenerate-unicode-properties": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", - "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz", + "integrity": "sha512-3E12UeNSPfjrgwjkR81m5J7Aw/T55Tu7nUyZVQYCKEOs+2dkxEY+DpPtZzO4YruuiPb7NkYLVcyJC4+zCbk5pA==", "dev": true, "requires": { - "regenerate": "^1.4.0" + "regenerate": "^1.4.2" } }, "regenerator-runtime": { @@ -3606,17 +3824,17 @@ "dev": true }, "regexpu-core": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", - "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.8.0.tgz", + "integrity": "sha512-1F6bYsoYiz6is+oz70NWur2Vlh9KWtswuRuzJOfeYUrfPX2o8n74AnUVaOGDbUqVGO9fNHu48/pjJO4sNVwsOg==", "dev": true, "requires": { - "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^8.2.0", - "regjsgen": "^0.5.1", - "regjsparser": "^0.6.4", - "unicode-match-property-ecmascript": "^1.0.4", - "unicode-match-property-value-ecmascript": "^1.2.0" + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^9.0.0", + "regjsgen": "^0.5.2", + "regjsparser": "^0.7.0", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.0.0" } }, "regjsgen": { @@ -3626,9 +3844,9 @@ "dev": true }, "regjsparser": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz", - "integrity": "sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.7.0.tgz", + "integrity": "sha512-A4pcaORqmNMDVwUjWoTzuhwMGpP+NykpfqAsEgI1FSH/EzC7lrN5TMd+kN8YCovX+jMpu8eaqXgXPCa0g8FQNQ==", "dev": true, "requires": { "jsesc": "~0.5.0" @@ -3663,10 +3881,10 @@ "dev": true, "optional": true }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true }, "resolve": { @@ -3699,6 +3917,12 @@ "dev": true, "optional": true }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -3709,56 +3933,74 @@ } }, "rollup": { - "version": "2.56.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.56.2.tgz", - "integrity": "sha512-s8H00ZsRi29M2/lGdm1u8DJpJ9ML8SUOpVVBd33XNeEeL3NVaTiUcSBHzBdF3eAyR0l7VSpsuoVUGrRHq7aPwQ==", + "version": "2.38.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.38.1.tgz", + "integrity": "sha512-q07T6vU/V1kqM8rGRRyCgEvIQcIAXoKIE5CpkYAlHhfiWM1Iuh4dIPWpIbqFngCK6lwAB2aYHiUVhIbSWHQWhw==", "dev": true, "requires": { - "fsevents": "~2.3.2" + "fsevents": "~2.1.2" + }, + "dependencies": { + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true + } } }, "rollup-plugin-terser": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-6.1.0.tgz", - "integrity": "sha512-4fB3M9nuoWxrwm39habpd4hvrbrde2W2GG4zEGPQg1YITNkM3Tqur5jSuXlWNzbv/2aMLJ+dZJaySc3GCD8oDw==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", + "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.8.3", - "jest-worker": "^26.0.0", - "serialize-javascript": "^3.0.0", - "terser": "^4.7.0" + "@babel/code-frame": "^7.10.4", + "jest-worker": "^26.2.1", + "serialize-javascript": "^4.0.0", + "terser": "^5.0.0" } }, "rollup-plugin-typescript2": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.27.3.tgz", - "integrity": "sha512-gmYPIFmALj9D3Ga1ZbTZAKTXq1JKlTQBtj299DXhqYz9cL3g/AQfUvbb2UhH+Nf++cCq941W2Mv7UcrcgLzJJg==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.27.1.tgz", + "integrity": "sha512-RJl77Bbj1EunAQDC3dK/O2HWuSUX3oJbRGzyLoS5o9W4Hs1Nix3Gavqj1Lzs5Y6Ff4H2xXfmZ1WWUQCYocSbzQ==", "dev": true, "requires": { - "@rollup/pluginutils": "^3.1.0", + "@rollup/pluginutils": "^3.0.8", "find-cache-dir": "^3.3.1", "fs-extra": "8.1.0", - "resolve": "1.17.0", - "tslib": "2.0.1" + "resolve": "1.15.1", + "tslib": "1.11.2" }, "dependencies": { "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", + "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", "dev": true, "requires": { "path-parse": "^1.0.6" } }, "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==", + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.2.tgz", + "integrity": "sha512-tTSkux6IGPnUGUd1XAZHcpu85MOkIl5zX49pO+jfsie3eP0B6pyhOlLXm3cAC6T7s+euSDDUUV+Acop5WmtkVg==", "dev": true } } }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -3782,9 +4024,9 @@ "dev": true }, "serialize-javascript": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.1.0.tgz", - "integrity": "sha512-JIJT1DGiWmIKhzRsG91aS6Ze4sFUrYbltlkg2onR5OrnNM02Kl/hnY/T4FN2omvyeBbQmMJv+K4cPOpGzOTFBg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", "dev": true, "requires": { "randombytes": "^2.1.0" @@ -3837,14 +4079,40 @@ "dev": true }, "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } } }, "snapdragon": { @@ -3985,9 +4253,9 @@ } }, "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "version": "0.5.20", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", + "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -4049,31 +4317,14 @@ } }, "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" } }, "string_decoder": { @@ -4087,12 +4338,12 @@ } }, "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^5.0.1" } }, "strip-json-comments": { @@ -4111,26 +4362,48 @@ } }, "table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/table/-/table-6.7.2.tgz", + "integrity": "sha512-UFZK67uvyNivLeQbVtkiUs8Uuuxv24aSL4/Vil2PJVtMgU8Lx0CYkP12uCGa3kjyQzOSgV1+z9Wkb82fCGsO0g==", "dev": true, "requires": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" + "ajv": "^8.0.1", + "lodash.clonedeep": "^4.5.0", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "dependencies": { + "ajv": { + "version": "8.6.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.3.tgz", + "integrity": "sha512-SMJOdDP6LqTkD0Uq8qLi+gMwSt0imXLSV080qFVwJCpH9U6Mb+SUGHAXM0KNbcBPguytWyvFxcHgMLe2D2XSpw==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + } } }, "terser": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", - "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.9.0.tgz", + "integrity": "sha512-h5hxa23sCdpzcye/7b8YqbE5OwKca/ni0RQz1uRX3tGh8haaGHqcuSqbGRybuAKNdntZ0mDgFNXPJ48xQ2RXKQ==", "dev": true, "requires": { "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" + "source-map": "~0.7.2", + "source-map-support": "~0.5.20" }, "dependencies": { "commander": { @@ -4140,9 +4413,9 @@ "dev": true }, "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", "dev": true } } @@ -4206,9 +4479,9 @@ } }, "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.0.tgz", + "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==", "dev": true }, "tsutils": { @@ -4238,50 +4511,43 @@ } }, "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, "typescript": { - "version": "3.9.10", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", - "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.3.tgz", + "integrity": "sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==", "dev": true }, - "uglify-js": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.1.tgz", - "integrity": "sha512-JhS3hmcVaXlp/xSo3PKY5R0JqKs5M3IV+exdLHW99qKvKivPO4Z8qbej6mte17SOPqAOVMjt/XGgWacnFSzM3g==", - "dev": true, - "optional": true - }, "unicode-canonical-property-names-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", - "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", "dev": true }, "unicode-match-property-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", - "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", "dev": true, "requires": { - "unicode-canonical-property-names-ecmascript": "^1.0.4", - "unicode-property-aliases-ecmascript": "^1.0.4" + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" } }, "unicode-match-property-value-ecmascript": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", - "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", + "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", "dev": true }, "unicode-property-aliases-ecmascript": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", - "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", + "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", "dev": true }, "union-value": { @@ -4411,144 +4677,17 @@ "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - } - } - }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, - "write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - } - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true - }, - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "dependencies": { - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - } - } - }, - "yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true } } } diff --git a/package.json b/package.json index b9918ff..f9b956e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@microblink/blinkid-imagecapture-in-browser-sdk", - "version": "5.13.0", + "version": "5.14.0", "description": "A smart image capturing library for WebAssembly-enabled browsers.", "homepage": "https://github.com/BlinkID/blinkid-imagecapture-in-browser", "repository": "github:BlinkID/blinkid-imagecapture-in-browser", @@ -43,22 +43,20 @@ "test": "echo \"Not implemented!\"" }, "devDependencies": { - "@babel/cli": "^7.10.3", - "@babel/core": "^7.10.3", - "@babel/preset-env": "^7.10.3", - "@rollup/plugin-babel": "^5.0.4", - "@rollup/plugin-node-resolve": "^8.0.1", - "@typescript-eslint/eslint-plugin": "^3.4.0", - "@typescript-eslint/parser": "^3.4.0", - "eslint": "7.6.0", - "handlebars": "^4.7.7", + "@babel/cli": "7.15.4", + "@babel/core": "7.15.5", + "@babel/preset-env": "7.15.6", + "@rollup/plugin-babel": "5.2.1", + "@rollup/plugin-node-resolve": "11.1.0", + "@typescript-eslint/eslint-plugin": "4.31.1", + "@typescript-eslint/parser": "4.31.1", + "eslint": "7.32.0", "rimraf": "^3.0.2", - "rollup": "^2.15.0", - "rollup-plugin-terser": "^6.1.0", - "rollup-plugin-typescript2": "^0.27.1", - "tslib": "^2.0.0", - "typescript": "^3.8.3", - "wasm-feature-detect": "^1.2.9", - "yargs": "^16.2.0" + "rollup": "2.38.1", + "rollup-plugin-terser": "7.0.2", + "rollup-plugin-typescript2": "0.27.1", + "tslib": "2.0.0", + "typescript": "4.0.3", + "wasm-feature-detect": "1.2.11" } } diff --git a/resources/BlinkIDImageCaptureSDK.worker.min.js b/resources/BlinkIDImageCaptureSDK.worker.min.js index f1c9dcf..96c32ab 100644 --- a/resources/BlinkIDImageCaptureSDK.worker.min.js +++ b/resources/BlinkIDImageCaptureSDK.worker.min.js @@ -12,4 +12,4 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */function e(e,t,s,r){return new(s||(s=Promise))((function(n,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))}let t=0;class s{constructor(e){this.action=e,this.messageID=function(){const e=t;return t+=1,e}()}}class r extends s{constructor(e,t){super(r.action),this.wasmModuleName=e.wasmModuleName,this.licenseKey=e.licenseKey,this.userId=t,this.registerLoadCallback=null!==e.loadProgressCallback,this.allowHelloMessage=e.allowHelloMessage,this.engineLocation=e.engineLocation,this.wasmType=e.wasmType,this.numberOfWorkers=e.numberOfWorkers}}var n,i;r.action="init",function(e){e[e.Any=0]="Any",e[e.Recognizer=1]="Recognizer",e[e.RecognizerSettings=2]="RecognizerSettings",e[e.Callback=3]="Callback"}(n||(n={}));class o extends s{constructor(e,t){super(o.action),this.funcName=e,this.params=t}}o.action="invokeFunction";class a extends s{constructor(e,t){super(a.action),this.className=e,this.params=t}}a.action="createNewNativeObject";class c extends s{constructor(e,t,s){super(c.action),this.recognizerHandles=e,this.allowMultipleResults=t,this.registeredMetadataCallbacks=s}}c.action="createRecognizerRunner";class l extends s{constructor(e,t){super(l.action),this.recognizerHandles=e,this.allowMultipleResults=t}}l.action="reconfigureRecognizerRunner";class u extends s{constructor(){super(u.action)}}u.action="deleteRecognizerRunner";class h extends s{constructor(e,t,s){super(h.action),this.objectHandle=e,this.methodName=t,this.params=s}}h.action="invokeObject";class d extends s{constructor(e){super(d.action),this.frame=e}getTransferrables(){return[this.frame.imageData.data.buffer]}}d.action="processImage";class g extends s{constructor(e){super(g.action),this.hardReset=e}}g.action="resetRecognizers";class m extends s{constructor(e){super(m.action),this.registeredMetadataCallbacks=e}}m.action="registerMetadataCallbacks";class f extends s{constructor(e){super(f.action),this.detectionOnlyMode=e}}f.action="setDetectionOnly";class y extends s{constructor(e){super(y.action),this.callbackNonEmpty=e}}y.action="setClearTimeoutCallback";class p extends s{constructor(e){super(p.action),this.cameraPreviewMirrored=e}}p.action="setCameraPreviewMirrored";class b{constructor(e,t,s){this.success=!0,this.error=null,this.messageID=e,this.success=t,this.error=s}}class R{constructor(e,t,s,r){this.success=!0,this.showOverlay=!0,this.messageID=e,this.showOverlay=s,this.wasmType=r}}class k extends b{constructor(e,t){super(e,!0,null),this.result=t}}class w extends b{constructor(e,t){super(e,!0,null),this.objectHandle=t}}class v extends b{constructor(e,t){super(e,!0,null),this.recognitionState=t}}class C{constructor(e){this.isLoadProgressMessage=!0,this.progress=e}}!function(e){e[e.onDebugText=0]="onDebugText",e[e.onDetectionFailed=1]="onDetectionFailed",e[e.onQuadDetection=2]="onQuadDetection",e[e.onPointsDetection=3]="onPointsDetection",e[e.onFirstSideResult=4]="onFirstSideResult",e[e.clearTimeoutCallback=5]="clearTimeoutCallback",e[e.onGlare=6]="onGlare",e[e.recognizerCallback=7]="recognizerCallback"}(i||(i={}));class E{constructor(e,t){this.isCallbackMessage=!0,this.callbackType=e,this.callbackParameters=t}}function z(e,t){return t=t||"",""===(e=e||"")?t:e.endsWith("/")?t.startsWith("/")?e+t.substring(1):e+t:t.startsWith("/")?e+t:e+"/"+t}var M,T,S;function I(t){return e(this,void 0,void 0,(function*(){const e=yield(async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])))(),s=yield(async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,12,1,10,0,67,0,0,0,0,252,0,26,11])))(),r=yield(async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,65,0,192,26,11])))(),n=yield(async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])))(),i=yield(async e=>{try{return"undefined"!=typeof MessageChannel&&(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(e)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]));if(!(e&&s&&r&&n))return M.Basic;if(!i)return M.Advanced;try{return new Worker(t+"/Worker.test.js").terminate(),M.AdvancedWithThreads}catch(e){return M.Advanced}}))}!function(e){e.Basic="BASIC",e.Advanced="ADVANCED",e.AdvancedWithThreads="ADVANCED_WITH_THREADS"}(M||(M={})),function(e){e[e.Invalid=0]="Invalid",e[e.RequiresServerPermission=1]="RequiresServerPermission",e[e.Valid=2]="Valid"}(T||(T={})),function(e){e.LicenseTokenStateInvalid="LICENSE_TOKEN_STATE_INVALID",e.NetworkError="NETWORK_ERROR",e.RemoteLock="REMOTE_LOCK",e.PermissionExpired="PERMISSION_EXPIRED",e.PayloadCorrupted="PAYLOAD_CORRUPTED",e.PayloadSignatureVerificationFailed="PAYLOAD_SIGNATURE_VERIFICATION_FAILED",e.IncorrectTokenState="INCORRECT_TOKEN_STATE"}(S||(S={}));class x{constructor(e,t){this.code="UNLOCK_LICENSE_ERROR",this.message=null,this.type=e,t&&(this.message=t)}}function D(e){return{licenseId:e.licenseId,licensee:e.licensee,packageName:e.packageName,platform:"Browser",sdkName:e.sdkName,sdkVersion:e.sdkVersion}}var P;function O(t,s){return e(this,void 0,void 0,(function*(){try{const e=yield fetch("https://baltazar.microblink.com/api/v1/status/check",{method:"POST",headers:{"Content-Type":"application/json"},cache:"no-cache",body:JSON.stringify(D(t))});if(e.ok){const t=""+(yield e.text());return s.submitServerPermission(t)}return{status:P.NetworkError,lease:0,networkErrorDescription:"Server responded with status "+e.status}}catch(e){return{status:P.NetworkError,lease:0,networkErrorDescription:"Unexpected error: "+JSON.stringify(e)}}}))}function N(e){return e===M.AdvancedWithThreads}!function(e){e[e.Ok=0]="Ok",e[e.NetworkError=1]="NetworkError",e[e.RemoteLock=2]="RemoteLock",e[e.PermissionExpired=3]="PermissionExpired",e[e.PayloadCorrupted=4]="PayloadCorrupted",e[e.PayloadSignatureVerificationFailed=5]="PayloadSignatureVerificationFailed",e[e.IncorrectTokenState=6]="IncorrectTokenState"}(P||(P={}));new class{constructor(){this.context=self,this.wasmModule=null,this.nativeRecognizerRunner=null,this.objects={},this.nextObjectHandle=0,this.metadataCallbacks={},this.clearTimeoutCallback=null,this.context.onmessage=e=>{const t=e.data;switch(t.action){case r.action:this.processInitMessage(t);break;case o.action:this.processInvokeFunction(t);break;case a.action:this.processCreateNewRecognizer(t);break;case h.action:this.processInvokeObject(t);break;case c.action:this.processCreateRecognizerRunner(t);break;case l.action:this.processReconfigureRecognizerRunner(t);break;case u.action:this.processDeleteRecognizerRunner(t);break;case d.action:this.processImage(t);break;case g.action:this.resetRecognizers(t);break;case f.action:this.setDetectionOnly(t);break;case p.action:this.setCameraPreviewMirrored(t);break;case m.action:this.registerMetadataCallbacks(t);break;case y.action:this.registerClearTimeoutCallback(t);break;default:throw Error("Unknown message action: "+JSON.stringify(t.action))}}}getNextObjectHandle(){const e=this.nextObjectHandle;return this.nextObjectHandle=this.nextObjectHandle+1,e}notifyError(e,t){this.context.postMessage(new b(e.messageID,!1,t))}notifySuccess(e){this.context.postMessage(new b(e.messageID,!0,null))}notifyInitSuccess(e,t,s){this.context.postMessage(new R(e.messageID,!0,t,s))}unwrapParameters(e){const t=[];for(const s of e.params){let r=s.parameter;s.type===n.Recognizer?(r=this.objects[r],void 0===r&&this.notifyError(e,"Cannot find object with handle: undefined")):s.type===n.RecognizerSettings&&(r=this.restoreFunctions(r)),t.push(r)}return t}restoreFunctions(e){const t=Object.keys(e);for(const s of t){const t=e[s];"object"==typeof t&&null!==t&&"parameter"in t&&"type"in t&&t.type===n.Callback&&(e[s]=(...e)=>{const s=new E(i.recognizerCallback,[t.parameter].concat(e));this.context.postMessage(s)})}return e}scanForTransferrables(e){if("object"==typeof e){const t=Object.keys(e),s=[];for(const r of t){const t=e[r];t instanceof ImageData?s.push(t.data.buffer):t instanceof Uint8Array?s.push(t.buffer):null!==t&&"object"==typeof t&&s.push(...this.scanForTransferrables(t))}return s}return[]}registerHeartBeat(e){this.unregisterHeartBeat(),this.lease=e;let t=e-Math.floor(Date.now()/1e3);t>120?t-=120:t/=2,this.inFlightHeartBeatTimeoutId=setTimeout(()=>{this.obtainNewServerPermission(!0)},1e3*t)}unregisterHeartBeat(){this.lease&&delete this.lease,this.inFlightHeartBeatTimeoutId&&(clearTimeout(this.inFlightHeartBeatTimeoutId),delete this.inFlightHeartBeatTimeoutId)}obtainNewServerPermission(t){return e(this,void 0,void 0,(function*(){if(this.wasmModule){const e=this.wasmModule.getActiveLicenseTokenInfo(),s=yield O(e,this.wasmModule);switch(s.status){case P.Ok:case P.RemoteLock:this.registerHeartBeat(s.lease);break;case P.NetworkError:case P.PayloadSignatureVerificationFailed:case P.PayloadCorrupted:t?(console.warn("Problem with obtaining server permission. Will attempt in 10 seconds "+P[s.status]),this.inFlightHeartBeatTimeoutId=setTimeout(()=>{this.obtainNewServerPermission(!1)},1e4)):console.error("Problem with obtaining server permission. "+P[s.status]);break;case P.IncorrectTokenState:case P.PermissionExpired:console.error("Internal error: "+P[s.status])}return s.status}return console.error("Internal inconsistency! Wasm module not initialized where it's expected to be!"),P.IncorrectTokenState}))}willSoonExpire(){if(this.lease){if(this.wasmModule.getActiveLicenseTokenInfo().unlockResult===T.Valid){const e=Math.floor(Date.now()/1e3);return 30>this.lease-e}return!0}return!1}calculateWasmType(t){return e(this,void 0,void 0,(function*(){return null!==t.wasmType?t.wasmType:yield I(t.engineLocation)}))}calculateEngineLocationPrefix(e,t){const s=z(""===e.engineLocation?self.location.origin:e.engineLocation,function(e){switch(e){case M.AdvancedWithThreads:return"advanced-threads";case M.Advanced:return"advanced";case M.Basic:return"basic"}}(t));return e.allowHelloMessage&&console.log("Engine location prefix is:",s),s}processInitMessage(t){return e(this,void 0,void 0,(function*(){const s=yield this.calculateWasmType(t),r=this.calculateEngineLocationPrefix(t,s);let n={locateFile:e=>z(r,e)};t.registerLoadCallback&&(n=Object.assign(n,{setStatus:e=>{const t=new C(function(e){if("Running..."===e)return 100;if(0===e.length)return 0;const t=/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/.exec(e);if(t){return 100*parseInt(t[2])/parseInt(t[4])}return NaN}(e));this.context.postMessage(t)}}));try{const i=z(r,t.wasmModuleName+".js");N(s)&&(n=function(e,t,s){return t&&t>0&&(e=Object.assign(e,{allowedThreads:t})),null!==s&&(e=Object.assign(e,{mainScriptUrlOrBlob:s})),e}(n,t.numberOfWorkers,i)),importScripts(i);(0,self[t.wasmModuleName])(n).then(r=>e(this,void 0,void 0,(function*(){N(s)&&(t.allowHelloMessage&&console.log("Waiting for thread workers to boot..."),yield function(t){return e(this,void 0,void 0,(function*(){t.threadWorkersReadyPromise&&(yield t.threadWorkersReadyPromise)}))}(r));const n=yield function(t,s,r,n){return e(this,void 0,void 0,(function*(){const e=n.initializeWithLicenseKey(t,r,s);switch(e.unlockResult){case T.Invalid:return{error:new x(S.LicenseTokenStateInvalid,e.licenseError)};case T.Valid:return{error:null,showOverlay:(i=e.isTrial,o=e.allowRemoveDemoOverlay,a=e.allowRemoveProductionOverlay,!(i&&o||!i&&a))};case T.RequiresServerPermission:{const t=yield O(e,n);switch(t.status){case P.Ok:return{error:null,lease:t.lease};case P.NetworkError:{let e="";return t.networkErrorDescription&&(e=" "+t.networkErrorDescription),{error:new x(S.NetworkError,"There has been a network error while obtaining the server permission!"+e)}}case P.RemoteLock:return{error:new x(S.RemoteLock,"Provided license key has been remotely locked.Please contact support for more information!"),lease:t.lease};case P.PermissionExpired:return{error:new x(S.PermissionExpired,"Internal error (server permission expired)"),lease:t.lease};case P.PayloadCorrupted:return{error:new x(S.PayloadCorrupted,"Server permission payload is corrupted!"),lease:t.lease};case P.PayloadSignatureVerificationFailed:return{error:new x(S.PayloadSignatureVerificationFailed,"Failed to verify server permission's digital signature!"),lease:t.lease};case P.IncorrectTokenState:return{error:new x(S.IncorrectTokenState,"Internal error (Incorrect token state)"),lease:t.lease}}}}var i,o,a}))}(t.licenseKey,t.allowHelloMessage,t.userId,r);null===n.error?(this.wasmModule=r,n.lease?this.registerHeartBeat(n.lease):this.unregisterHeartBeat(),this.notifyInitSuccess(t,!!n.showOverlay,s)):this.notifyError(t,n.error)})),e=>{this.notifyError(t,e)})}catch(e){this.notifyError(t,e)}}))}processInvokeFunction(e){if(null===this.wasmModule)return void this.notifyError(e,"WASM module is not initialized!");const t=e.funcName,s=this.unwrapParameters(e);try{const r=this.wasmModule[t](...s);this.context.postMessage(new k(e.messageID,r))}catch(t){this.notifyError(e,t)}}processCreateNewRecognizer(e){if(null===this.wasmModule)return void this.notifyError(e,"WASM module is not initialized!");const t=e.className,s=this.unwrapParameters(e);try{const r=new this.wasmModule[t](...s),n=this.getNextObjectHandle();this.objects[n]=r,this.context.postMessage(new w(e.messageID,n))}catch(t){this.notifyError(e,t)}}getRecognizers(e){const t=[];for(const s of e){t.push(this.objects[s])}return t}processCreateRecognizerRunner(t){return e(this,void 0,void 0,(function*(){if(null===this.wasmModule)this.notifyError(t,"WASM module is not initialized!");else if(null!==this.nativeRecognizerRunner)this.notifyError(t,"Recognizer runner is already created! Multiple instances are not allowed!");else{this.setupMetadataCallbacks(t.registeredMetadataCallbacks);try{if(this.willSoonExpire()){const e=yield this.obtainNewServerPermission(!1);if(e!==P.Ok){const s=P[e];return void this.notifyError(t,new x(S[s],"Cannot initialize recognizers because of invalid server permission: "+s))}}const e=this.getRecognizers(t.recognizerHandles);this.nativeRecognizerRunner=new this.wasmModule.RecognizerRunner(e,t.allowMultipleResults,this.metadataCallbacks),this.notifySuccess(t)}catch(e){this.notifyError(t,e)}}}))}processReconfigureRecognizerRunner(e){if(null===this.wasmModule)this.notifyError(e,"WASM module is not initialized!");else if(null===this.nativeRecognizerRunner)this.notifyError(e,"Recognizer runner is not created! There is nothing to reconfigure!");else try{const t=this.getRecognizers(e.recognizerHandles);this.nativeRecognizerRunner.reconfigureRecognizers(t,e.allowMultipleResults),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}}processDeleteRecognizerRunner(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.delete(),this.nativeRecognizerRunner=null,this.notifySuccess(e)}catch(t){this.notifyError(e,t)}else this.notifyError(e,"Recognizer runner is already deleted!")}processInvokeObject(e){try{const t=e.objectHandle,s=e.methodName,r=this.unwrapParameters(e),n=this.objects[t];if(void 0===n)this.notifyError(e,"Cannot find object with handle: "+t);else{const i=n[s](...r),o=this.scanForTransferrables(i);"delete"===s&&delete this.objects[t],this.context.postMessage(new k(e.messageID,i),o)}}catch(t){this.notifyError(e,t)}}processImage(e){if(null!==this.nativeRecognizerRunner)try{const t=this.nativeRecognizerRunner.processImage(e.frame);this.context.postMessage(new v(e.messageID,t))}catch(t){this.notifyError(e,t)}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}resetRecognizers(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.resetRecognizers(e.hardReset),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}setDetectionOnly(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setDetectionOnlyMode(e.detectionOnlyMode),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}setCameraPreviewMirrored(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setCameraPreviewMirrored(e.cameraPreviewMirrored),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}setupMetadataCallbacks(e){e.onDebugText?this.metadataCallbacks.onDebugText=e=>{const t=new E(i.onDebugText,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onDebugText,e.onDetectionFailed?this.metadataCallbacks.onDetectionFailed=()=>{const e=new E(i.onDetectionFailed,[]);this.context.postMessage(e)}:delete this.metadataCallbacks.onDetectionFailed,e.onPointsDetection?this.metadataCallbacks.onPointsDetection=e=>{const t=new E(i.onPointsDetection,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onPointsDetection,e.onQuadDetection?this.metadataCallbacks.onQuadDetection=e=>{const t=new E(i.onQuadDetection,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onQuadDetection,e.onFirstSideResult?this.metadataCallbacks.onFirstSideResult=()=>{const e=new E(i.onFirstSideResult,[]);this.context.postMessage(e)}:delete this.metadataCallbacks.onFirstSideResult,e.onGlare?this.metadataCallbacks.onGlare=e=>{const t=new E(i.onGlare,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onGlare}registerMetadataCallbacks(e){if(null!==this.nativeRecognizerRunner){this.setupMetadataCallbacks(e.registeredMetadataCallbacks);try{this.nativeRecognizerRunner.setJSDelegate(this.metadataCallbacks),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}registerClearTimeoutCallback(e){if(null!==this.nativeRecognizerRunner){this.clearTimeoutCallback=e.callbackNonEmpty?{onClearTimeout:()=>{const e=new E(i.clearTimeoutCallback,[]);this.context.postMessage(e)}}:null;try{this.nativeRecognizerRunner.setClearTimeoutCallback(this.clearTimeoutCallback),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}}}(); + ***************************************************************************** */function e(e,t,s,r){return new(s||(s=Promise))((function(n,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))}let t=0;class s{constructor(e){this.action=e,this.messageID=function(){const e=t;return t+=1,e}()}}class r extends s{constructor(e,t){super(r.action),this.wasmModuleName=e.wasmModuleName,this.licenseKey=e.licenseKey,this.userId=t,this.registerLoadCallback=null!==e.loadProgressCallback,this.allowHelloMessage=e.allowHelloMessage,this.engineLocation=e.engineLocation,this.wasmType=e.wasmType,this.numberOfWorkers=e.numberOfWorkers}}var n,i;r.action="init",function(e){e[e.Any=0]="Any",e[e.Recognizer=1]="Recognizer",e[e.RecognizerSettings=2]="RecognizerSettings",e[e.Callback=3]="Callback"}(n||(n={}));class o extends s{constructor(e,t){super(o.action),this.funcName=e,this.params=t}}o.action="invokeFunction";class a extends s{constructor(e,t){super(a.action),this.className=e,this.params=t}}a.action="createNewNativeObject";class c extends s{constructor(e,t,s){super(c.action),this.recognizerHandles=e,this.allowMultipleResults=t,this.registeredMetadataCallbacks=s}}c.action="createRecognizerRunner";class l extends s{constructor(e,t){super(l.action),this.recognizerHandles=e,this.allowMultipleResults=t}}l.action="reconfigureRecognizerRunner";class u extends s{constructor(){super(u.action)}}u.action="deleteRecognizerRunner";class h extends s{constructor(e,t,s){super(h.action),this.objectHandle=e,this.methodName=t,this.params=s}}h.action="invokeObject";class d extends s{constructor(e){super(d.action),this.frame=e}getTransferrables(){return[this.frame.imageData.data.buffer]}}d.action="processImage";class g extends s{constructor(e){super(g.action),this.hardReset=e}}g.action="resetRecognizers";class m extends s{constructor(e){super(m.action),this.registeredMetadataCallbacks=e}}m.action="registerMetadataCallbacks";class f extends s{constructor(e){super(f.action),this.detectionOnlyMode=e}}f.action="setDetectionOnly";class y extends s{constructor(e){super(y.action),this.callbackNonEmpty=e}}y.action="setClearTimeoutCallback";class p extends s{constructor(e){super(p.action),this.cameraPreviewMirrored=e}}p.action="setCameraPreviewMirrored";class b{constructor(e,t,s){this.success=!0,this.error=null,this.messageID=e,this.success=t,this.error=s}}class k{constructor(e,t,s,r){this.success=!0,this.showOverlay=!0,this.messageID=e,this.showOverlay=s,this.wasmType=r}}class R extends b{constructor(e,t){super(e,!0,null),this.result=t}}class w extends b{constructor(e,t){super(e,!0,null),this.objectHandle=t}}class v extends b{constructor(e,t){super(e,!0,null),this.recognitionState=t}}class C{constructor(e){this.isLoadProgressMessage=!0,this.progress=e}}!function(e){e[e.onDebugText=0]="onDebugText",e[e.onDetectionFailed=1]="onDetectionFailed",e[e.onQuadDetection=2]="onQuadDetection",e[e.onPointsDetection=3]="onPointsDetection",e[e.onFirstSideResult=4]="onFirstSideResult",e[e.clearTimeoutCallback=5]="clearTimeoutCallback",e[e.onGlare=6]="onGlare",e[e.recognizerCallback=7]="recognizerCallback"}(i||(i={}));class E{constructor(e,t){this.isCallbackMessage=!0,this.callbackType=e,this.callbackParameters=t}}function z(e,t){return t=t||"",""===(e=e||"")?t:e.endsWith("/")?t.startsWith("/")?e+t.substring(1):e+t:t.startsWith("/")?e+t:e+"/"+t}var M,T,S;function I(t){return e(this,void 0,void 0,(function*(){const e=yield(async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])))(),s=yield(async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,12,1,10,0,67,0,0,0,0,252,0,26,11])))(),r=yield(async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,65,0,192,26,11])))(),n=yield(async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])))(),i=yield(async e=>{try{return"undefined"!=typeof MessageChannel&&(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(e)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]));if(!(e&&s&&r&&n))return M.Basic;if(!i)return M.Advanced;try{return new Worker(t+"/Worker.test.js").terminate(),M.AdvancedWithThreads}catch(e){return M.Advanced}}))}!function(e){e.Basic="BASIC",e.Advanced="ADVANCED",e.AdvancedWithThreads="ADVANCED_WITH_THREADS"}(M||(M={})),function(e){e[e.Invalid=0]="Invalid",e[e.RequiresServerPermission=1]="RequiresServerPermission",e[e.Valid=2]="Valid"}(T||(T={})),function(e){e.LicenseTokenStateInvalid="LICENSE_TOKEN_STATE_INVALID",e.NetworkError="NETWORK_ERROR",e.RemoteLock="REMOTE_LOCK",e.PermissionExpired="PERMISSION_EXPIRED",e.PayloadCorrupted="PAYLOAD_CORRUPTED",e.PayloadSignatureVerificationFailed="PAYLOAD_SIGNATURE_VERIFICATION_FAILED",e.IncorrectTokenState="INCORRECT_TOKEN_STATE"}(S||(S={}));class x{constructor(e,t){this.code="UNLOCK_LICENSE_ERROR",this.message=null,this.type=e,t&&(this.message=t)}}function D(e){return{licenseId:e.licenseId,licensee:e.licensee,packageName:e.packageName,platform:"Browser",sdkName:e.sdkName,sdkVersion:e.sdkVersion}}var P;function O(t,s){return e(this,void 0,void 0,(function*(){try{const e=yield fetch("https://baltazar.microblink.com/api/v1/status/check",{method:"POST",headers:{"Content-Type":"application/json"},cache:"no-cache",body:JSON.stringify(D(t))});if(e.ok){const t=""+(yield e.text());return s.submitServerPermission(t)}return{status:P.NetworkError,lease:0,networkErrorDescription:"Server responded with status "+e.status}}catch(e){return{status:P.NetworkError,lease:0,networkErrorDescription:"Unexpected error: "+JSON.stringify(e)}}}))}function N(e){return e===M.AdvancedWithThreads}!function(e){e[e.Ok=0]="Ok",e[e.NetworkError=1]="NetworkError",e[e.RemoteLock=2]="RemoteLock",e[e.PermissionExpired=3]="PermissionExpired",e[e.PayloadCorrupted=4]="PayloadCorrupted",e[e.PayloadSignatureVerificationFailed=5]="PayloadSignatureVerificationFailed",e[e.IncorrectTokenState=6]="IncorrectTokenState"}(P||(P={}));new class{constructor(){this.context=self,this.wasmModule=null,this.nativeRecognizerRunner=null,this.objects={},this.nextObjectHandle=0,this.metadataCallbacks={},this.clearTimeoutCallback=null,this.context.onmessage=e=>{const t=e.data;switch(t.action){case r.action:this.processInitMessage(t);break;case o.action:this.processInvokeFunction(t);break;case a.action:this.processCreateNewRecognizer(t);break;case h.action:this.processInvokeObject(t);break;case c.action:this.processCreateRecognizerRunner(t);break;case l.action:this.processReconfigureRecognizerRunner(t);break;case u.action:this.processDeleteRecognizerRunner(t);break;case d.action:this.processImage(t);break;case g.action:this.resetRecognizers(t);break;case f.action:this.setDetectionOnly(t);break;case p.action:this.setCameraPreviewMirrored(t);break;case m.action:this.registerMetadataCallbacks(t);break;case y.action:this.registerClearTimeoutCallback(t);break;default:throw Error("Unknown message action: "+JSON.stringify(t.action))}}}getNextObjectHandle(){const e=this.nextObjectHandle;return this.nextObjectHandle=this.nextObjectHandle+1,e}notifyError(e,t){this.context.postMessage(new b(e.messageID,!1,t))}notifySuccess(e){this.context.postMessage(new b(e.messageID,!0,null))}notifyInitSuccess(e,t,s){this.context.postMessage(new k(e.messageID,!0,t,s))}unwrapParameters(e){const t=[];for(const s of e.params){let r=s.parameter;s.type===n.Recognizer?(r=this.objects[r],void 0===r&&this.notifyError(e,"Cannot find object with handle: undefined")):s.type===n.RecognizerSettings&&(r=this.restoreFunctions(r)),t.push(r)}return t}restoreFunctions(e){const t=Object.keys(e);for(const s of t){const t=e[s];"object"==typeof t&&null!==t&&"parameter"in t&&"type"in t&&t.type===n.Callback&&(e[s]=(...e)=>{const s=new E(i.recognizerCallback,[t.parameter].concat(e));this.context.postMessage(s)})}return e}scanForTransferrables(e){if("object"==typeof e){const t=Object.keys(e),s=[];for(const r of t){const t=e[r];t instanceof ImageData?s.push(t.data.buffer):t instanceof Uint8Array?s.push(t.buffer):null!==t&&"object"==typeof t&&s.push(...this.scanForTransferrables(t))}return s}return[]}registerHeartBeat(e){this.unregisterHeartBeat(),this.lease=e;let t=e-Math.floor(Date.now()/1e3);t>120?t-=120:t/=2,this.inFlightHeartBeatTimeoutId=setTimeout((()=>{this.obtainNewServerPermission(!0)}),1e3*t)}unregisterHeartBeat(){this.lease&&delete this.lease,this.inFlightHeartBeatTimeoutId&&(clearTimeout(this.inFlightHeartBeatTimeoutId),delete this.inFlightHeartBeatTimeoutId)}obtainNewServerPermission(t){return e(this,void 0,void 0,(function*(){if(this.wasmModule){const e=this.wasmModule.getActiveLicenseTokenInfo(),s=yield O(e,this.wasmModule);switch(s.status){case P.Ok:case P.RemoteLock:this.registerHeartBeat(s.lease);break;case P.NetworkError:case P.PayloadSignatureVerificationFailed:case P.PayloadCorrupted:t?(console.warn("Problem with obtaining server permission. Will attempt in 10 seconds "+P[s.status]),this.inFlightHeartBeatTimeoutId=setTimeout((()=>{this.obtainNewServerPermission(!1)}),1e4)):console.error("Problem with obtaining server permission. "+P[s.status]);break;case P.IncorrectTokenState:case P.PermissionExpired:console.error("Internal error: "+P[s.status])}return s.status}return console.error("Internal inconsistency! Wasm module not initialized where it's expected to be!"),P.IncorrectTokenState}))}willSoonExpire(){if(this.lease){if(this.wasmModule.getActiveLicenseTokenInfo().unlockResult===T.Valid){const e=Math.floor(Date.now()/1e3);return 30>this.lease-e}return!0}return!1}calculateWasmType(t){return e(this,void 0,void 0,(function*(){return null!==t.wasmType?t.wasmType:yield I(t.engineLocation)}))}calculateEngineLocationPrefix(e,t){const s=z(""===e.engineLocation?self.location.origin:e.engineLocation,function(e){switch(e){case M.AdvancedWithThreads:return"advanced-threads";case M.Advanced:return"advanced";case M.Basic:return"basic"}}(t));return e.allowHelloMessage&&console.log("Engine location prefix is:",s),s}processInitMessage(t){return e(this,void 0,void 0,(function*(){const s=yield this.calculateWasmType(t),r=this.calculateEngineLocationPrefix(t,s);let n={locateFile:e=>z(r,e)};t.registerLoadCallback&&(n=Object.assign(n,{setStatus:e=>{const t=new C(function(e){if("Running..."===e)return 100;if(0===e.length)return 0;const t=/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/.exec(e);if(t)return 100*parseInt(t[2])/parseInt(t[4]);return NaN}(e));this.context.postMessage(t)}}));try{const i=z(r,t.wasmModuleName+".js");N(s)&&(n=function(e,t,s){return t&&t>0&&(e=Object.assign(e,{allowedThreads:t})),null!==s&&(e=Object.assign(e,{mainScriptUrlOrBlob:s})),e}(n,t.numberOfWorkers,i)),importScripts(i);(0,self[t.wasmModuleName])(n).then((r=>e(this,void 0,void 0,(function*(){N(s)&&(t.allowHelloMessage&&console.log("Waiting for thread workers to boot..."),yield function(t){return e(this,void 0,void 0,(function*(){t.threadWorkersReadyPromise&&(yield t.threadWorkersReadyPromise)}))}(r));const n=yield function(t,s,r,n){return e(this,void 0,void 0,(function*(){const e=n.initializeWithLicenseKey(t,r,s);switch(e.unlockResult){case T.Invalid:return{error:new x(S.LicenseTokenStateInvalid,e.licenseError)};case T.Valid:return{error:null,showOverlay:(i=e.isTrial,o=e.allowRemoveDemoOverlay,a=e.allowRemoveProductionOverlay,!(i&&o||!i&&a))};case T.RequiresServerPermission:{const t=yield O(e,n);switch(t.status){case P.Ok:return{error:null,lease:t.lease};case P.NetworkError:{let e="";return t.networkErrorDescription&&(e=" "+t.networkErrorDescription),{error:new x(S.NetworkError,"There has been a network error while obtaining the server permission!"+e)}}case P.RemoteLock:return{error:new x(S.RemoteLock,"Provided license key has been remotely locked.Please contact support for more information!"),lease:t.lease};case P.PermissionExpired:return{error:new x(S.PermissionExpired,"Internal error (server permission expired)"),lease:t.lease};case P.PayloadCorrupted:return{error:new x(S.PayloadCorrupted,"Server permission payload is corrupted!"),lease:t.lease};case P.PayloadSignatureVerificationFailed:return{error:new x(S.PayloadSignatureVerificationFailed,"Failed to verify server permission's digital signature!"),lease:t.lease};case P.IncorrectTokenState:return{error:new x(S.IncorrectTokenState,"Internal error (Incorrect token state)"),lease:t.lease}}}}var i,o,a}))}(t.licenseKey,t.allowHelloMessage,t.userId,r);null===n.error?(this.wasmModule=r,n.lease?this.registerHeartBeat(n.lease):this.unregisterHeartBeat(),this.notifyInitSuccess(t,!!n.showOverlay,s)):this.notifyError(t,n.error)}))),(e=>{this.notifyError(t,e)}))}catch(e){this.notifyError(t,e)}}))}processInvokeFunction(e){if(null===this.wasmModule)return void this.notifyError(e,"WASM module is not initialized!");const t=e.funcName,s=this.unwrapParameters(e);try{const r=this.wasmModule[t](...s);this.context.postMessage(new R(e.messageID,r))}catch(t){this.notifyError(e,t)}}processCreateNewRecognizer(e){if(null===this.wasmModule)return void this.notifyError(e,"WASM module is not initialized!");const t=e.className,s=this.unwrapParameters(e);try{const r=new this.wasmModule[t](...s),n=this.getNextObjectHandle();this.objects[n]=r,this.context.postMessage(new w(e.messageID,n))}catch(t){this.notifyError(e,t)}}getRecognizers(e){const t=[];for(const s of e){t.push(this.objects[s])}return t}processCreateRecognizerRunner(t){return e(this,void 0,void 0,(function*(){if(null===this.wasmModule)this.notifyError(t,"WASM module is not initialized!");else if(null!==this.nativeRecognizerRunner)this.notifyError(t,"Recognizer runner is already created! Multiple instances are not allowed!");else{this.setupMetadataCallbacks(t.registeredMetadataCallbacks);try{if(this.willSoonExpire()){const e=yield this.obtainNewServerPermission(!1);if(e!==P.Ok){const s=P[e];return void this.notifyError(t,new x(S[s],"Cannot initialize recognizers because of invalid server permission: "+s))}}const e=this.getRecognizers(t.recognizerHandles);this.nativeRecognizerRunner=new this.wasmModule.RecognizerRunner(e,t.allowMultipleResults,this.metadataCallbacks),this.notifySuccess(t)}catch(e){this.notifyError(t,e)}}}))}processReconfigureRecognizerRunner(e){if(null===this.wasmModule)this.notifyError(e,"WASM module is not initialized!");else if(null===this.nativeRecognizerRunner)this.notifyError(e,"Recognizer runner is not created! There is nothing to reconfigure!");else try{const t=this.getRecognizers(e.recognizerHandles);this.nativeRecognizerRunner.reconfigureRecognizers(t,e.allowMultipleResults),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}}processDeleteRecognizerRunner(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.delete(),this.nativeRecognizerRunner=null,this.notifySuccess(e)}catch(t){this.notifyError(e,t)}else this.notifyError(e,"Recognizer runner is already deleted!")}wrapFunctions(e,t){if("object"!=typeof e)return e;const s=Object.assign({},e),r=Object.keys(s);for(const e of r){if("function"==typeof s[e]){s[e]={parameter:{recognizerHandle:t,callbackName:e},type:n.Callback}}}return s}processInvokeObject(e){try{const t=e.objectHandle,s=e.methodName,r=this.unwrapParameters(e),n=this.objects[t];if(void 0===n)this.notifyError(e,"Cannot find object with handle: "+t);else{const i=this.wrapFunctions(n[s](...r),t),o=this.scanForTransferrables(i);"delete"===s&&delete this.objects[t],this.context.postMessage(new R(e.messageID,i),o)}}catch(t){this.notifyError(e,t)}}processImage(e){if(null!==this.nativeRecognizerRunner)try{const t=this.nativeRecognizerRunner.processImage(e.frame);this.context.postMessage(new v(e.messageID,t))}catch(t){this.notifyError(e,t)}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}resetRecognizers(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.resetRecognizers(e.hardReset),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}setDetectionOnly(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setDetectionOnlyMode(e.detectionOnlyMode),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}setCameraPreviewMirrored(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setCameraPreviewMirrored(e.cameraPreviewMirrored),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}setupMetadataCallbacks(e){e.onDebugText?this.metadataCallbacks.onDebugText=e=>{const t=new E(i.onDebugText,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onDebugText,e.onDetectionFailed?this.metadataCallbacks.onDetectionFailed=()=>{const e=new E(i.onDetectionFailed,[]);this.context.postMessage(e)}:delete this.metadataCallbacks.onDetectionFailed,e.onPointsDetection?this.metadataCallbacks.onPointsDetection=e=>{const t=new E(i.onPointsDetection,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onPointsDetection,e.onQuadDetection?this.metadataCallbacks.onQuadDetection=e=>{const t=new E(i.onQuadDetection,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onQuadDetection,e.onFirstSideResult?this.metadataCallbacks.onFirstSideResult=()=>{const e=new E(i.onFirstSideResult,[]);this.context.postMessage(e)}:delete this.metadataCallbacks.onFirstSideResult,e.onGlare?this.metadataCallbacks.onGlare=e=>{const t=new E(i.onGlare,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onGlare}registerMetadataCallbacks(e){if(null!==this.nativeRecognizerRunner){this.setupMetadataCallbacks(e.registeredMetadataCallbacks);try{this.nativeRecognizerRunner.setJSDelegate(this.metadataCallbacks),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}registerClearTimeoutCallback(e){if(null!==this.nativeRecognizerRunner){this.clearTimeoutCallback=e.callbackNonEmpty?{onClearTimeout:()=>{const e=new E(i.clearTimeoutCallback,[]);this.context.postMessage(e)}}:null;try{this.nativeRecognizerRunner.setClearTimeoutCallback(this.clearTimeoutCallback),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}}}(); diff --git a/resources/BlinkIDImageCaptureWasmSDK.worker.min.js b/resources/BlinkIDImageCaptureWasmSDK.worker.min.js index a489628..945f23f 100644 --- a/resources/BlinkIDImageCaptureWasmSDK.worker.min.js +++ b/resources/BlinkIDImageCaptureWasmSDK.worker.min.js @@ -12,4 +12,4 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */function e(e,t,s,r){return new(s||(s=Promise))((function(n,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))}let t=0;class s{constructor(e){this.action=e,this.messageID=function(){const e=t;return t+=1,e}()}}class r extends s{constructor(e,t){super(r.action),this.wasmModuleName=e.wasmModuleName,this.licenseKey=e.licenseKey,this.userId=t,this.registerLoadCallback=null!==e.loadProgressCallback,this.allowHelloMessage=e.allowHelloMessage,this.engineLocation=e.engineLocation,this.wasmType=e.wasmType,this.numberOfWorkers=e.numberOfWorkers}}var n,i;r.action="init",function(e){e[e.Any=0]="Any",e[e.Recognizer=1]="Recognizer",e[e.RecognizerSettings=2]="RecognizerSettings",e[e.Callback=3]="Callback"}(n||(n={}));class o extends s{constructor(e,t){super(o.action),this.funcName=e,this.params=t}}o.action="invokeFunction";class a extends s{constructor(e,t){super(a.action),this.className=e,this.params=t}}a.action="createNewNativeObject";class c extends s{constructor(e,t,s){super(c.action),this.recognizerHandles=e,this.allowMultipleResults=t,this.registeredMetadataCallbacks=s}}c.action="createRecognizerRunner";class l extends s{constructor(e,t){super(l.action),this.recognizerHandles=e,this.allowMultipleResults=t}}l.action="reconfigureRecognizerRunner";class u extends s{constructor(){super(u.action)}}u.action="deleteRecognizerRunner";class h extends s{constructor(e,t,s){super(h.action),this.objectHandle=e,this.methodName=t,this.params=s}}h.action="invokeObject";class d extends s{constructor(e){super(d.action),this.frame=e}getTransferrables(){return[this.frame.imageData.data.buffer]}}d.action="processImage";class g extends s{constructor(e){super(g.action),this.hardReset=e}}g.action="resetRecognizers";class m extends s{constructor(e){super(m.action),this.registeredMetadataCallbacks=e}}m.action="registerMetadataCallbacks";class f extends s{constructor(e){super(f.action),this.detectionOnlyMode=e}}f.action="setDetectionOnly";class y extends s{constructor(e){super(y.action),this.callbackNonEmpty=e}}y.action="setClearTimeoutCallback";class p extends s{constructor(e){super(p.action),this.cameraPreviewMirrored=e}}p.action="setCameraPreviewMirrored";class b{constructor(e,t,s){this.success=!0,this.error=null,this.messageID=e,this.success=t,this.error=s}}class R{constructor(e,t,s,r){this.success=!0,this.showOverlay=!0,this.messageID=e,this.showOverlay=s,this.wasmType=r}}class k extends b{constructor(e,t){super(e,!0,null),this.result=t}}class w extends b{constructor(e,t){super(e,!0,null),this.objectHandle=t}}class v extends b{constructor(e,t){super(e,!0,null),this.recognitionState=t}}class C{constructor(e){this.isLoadProgressMessage=!0,this.progress=e}}!function(e){e[e.onDebugText=0]="onDebugText",e[e.onDetectionFailed=1]="onDetectionFailed",e[e.onQuadDetection=2]="onQuadDetection",e[e.onPointsDetection=3]="onPointsDetection",e[e.onFirstSideResult=4]="onFirstSideResult",e[e.clearTimeoutCallback=5]="clearTimeoutCallback",e[e.onGlare=6]="onGlare",e[e.recognizerCallback=7]="recognizerCallback"}(i||(i={}));class E{constructor(e,t){this.isCallbackMessage=!0,this.callbackType=e,this.callbackParameters=t}}function z(e,t){return t=t||"",""===(e=e||"")?t:e.endsWith("/")?t.startsWith("/")?e+t.substring(1):e+t:t.startsWith("/")?e+t:e+"/"+t}var M,T,S;function I(t){return e(this,void 0,void 0,(function*(){const e=yield(async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])))(),s=yield(async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,12,1,10,0,67,0,0,0,0,252,0,26,11])))(),r=yield(async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,65,0,192,26,11])))(),n=yield(async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11])))(),i=yield(async e=>{try{return"undefined"!=typeof MessageChannel&&(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(e)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]));if(!(e&&s&&r&&n))return M.Basic;if(!i)return M.Advanced;try{return new Worker(t+"/Worker.test.js").terminate(),M.AdvancedWithThreads}catch(e){return M.Advanced}}))}!function(e){e.Basic="BASIC",e.Advanced="ADVANCED",e.AdvancedWithThreads="ADVANCED_WITH_THREADS"}(M||(M={})),function(e){e[e.Invalid=0]="Invalid",e[e.RequiresServerPermission=1]="RequiresServerPermission",e[e.Valid=2]="Valid"}(T||(T={})),function(e){e.LicenseTokenStateInvalid="LICENSE_TOKEN_STATE_INVALID",e.NetworkError="NETWORK_ERROR",e.RemoteLock="REMOTE_LOCK",e.PermissionExpired="PERMISSION_EXPIRED",e.PayloadCorrupted="PAYLOAD_CORRUPTED",e.PayloadSignatureVerificationFailed="PAYLOAD_SIGNATURE_VERIFICATION_FAILED",e.IncorrectTokenState="INCORRECT_TOKEN_STATE"}(S||(S={}));class x{constructor(e,t){this.code="UNLOCK_LICENSE_ERROR",this.message=null,this.type=e,t&&(this.message=t)}}function D(e){return{licenseId:e.licenseId,licensee:e.licensee,packageName:e.packageName,platform:"Browser",sdkName:e.sdkName,sdkVersion:e.sdkVersion}}var P;function O(t,s){return e(this,void 0,void 0,(function*(){try{const e=yield fetch("https://baltazar.microblink.com/api/v1/status/check",{method:"POST",headers:{"Content-Type":"application/json"},cache:"no-cache",body:JSON.stringify(D(t))});if(e.ok){const t=""+(yield e.text());return s.submitServerPermission(t)}return{status:P.NetworkError,lease:0,networkErrorDescription:"Server responded with status "+e.status}}catch(e){return{status:P.NetworkError,lease:0,networkErrorDescription:"Unexpected error: "+JSON.stringify(e)}}}))}function N(e){return e===M.AdvancedWithThreads}!function(e){e[e.Ok=0]="Ok",e[e.NetworkError=1]="NetworkError",e[e.RemoteLock=2]="RemoteLock",e[e.PermissionExpired=3]="PermissionExpired",e[e.PayloadCorrupted=4]="PayloadCorrupted",e[e.PayloadSignatureVerificationFailed=5]="PayloadSignatureVerificationFailed",e[e.IncorrectTokenState=6]="IncorrectTokenState"}(P||(P={}));new class{constructor(){this.context=self,this.wasmModule=null,this.nativeRecognizerRunner=null,this.objects={},this.nextObjectHandle=0,this.metadataCallbacks={},this.clearTimeoutCallback=null,this.context.onmessage=e=>{const t=e.data;switch(t.action){case r.action:this.processInitMessage(t);break;case o.action:this.processInvokeFunction(t);break;case a.action:this.processCreateNewRecognizer(t);break;case h.action:this.processInvokeObject(t);break;case c.action:this.processCreateRecognizerRunner(t);break;case l.action:this.processReconfigureRecognizerRunner(t);break;case u.action:this.processDeleteRecognizerRunner(t);break;case d.action:this.processImage(t);break;case g.action:this.resetRecognizers(t);break;case f.action:this.setDetectionOnly(t);break;case p.action:this.setCameraPreviewMirrored(t);break;case m.action:this.registerMetadataCallbacks(t);break;case y.action:this.registerClearTimeoutCallback(t);break;default:throw Error("Unknown message action: "+JSON.stringify(t.action))}}}getNextObjectHandle(){const e=this.nextObjectHandle;return this.nextObjectHandle=this.nextObjectHandle+1,e}notifyError(e,t){this.context.postMessage(new b(e.messageID,!1,t))}notifySuccess(e){this.context.postMessage(new b(e.messageID,!0,null))}notifyInitSuccess(e,t,s){this.context.postMessage(new R(e.messageID,!0,t,s))}unwrapParameters(e){const t=[];for(const s of e.params){let r=s.parameter;s.type===n.Recognizer?(r=this.objects[r],void 0===r&&this.notifyError(e,"Cannot find object with handle: undefined")):s.type===n.RecognizerSettings&&(r=this.restoreFunctions(r)),t.push(r)}return t}restoreFunctions(e){const t=Object.keys(e);for(const s of t){const t=e[s];"object"==typeof t&&null!==t&&"parameter"in t&&"type"in t&&t.type===n.Callback&&(e[s]=(...e)=>{const s=new E(i.recognizerCallback,[t.parameter].concat(e));this.context.postMessage(s)})}return e}scanForTransferrables(e){if("object"==typeof e){const t=Object.keys(e),s=[];for(const r of t){const t=e[r];t instanceof ImageData?s.push(t.data.buffer):t instanceof Uint8Array?s.push(t.buffer):null!==t&&"object"==typeof t&&s.push(...this.scanForTransferrables(t))}return s}return[]}registerHeartBeat(e){this.unregisterHeartBeat(),this.lease=e;let t=e-Math.floor(Date.now()/1e3);t>120?t-=120:t/=2,this.inFlightHeartBeatTimeoutId=setTimeout(()=>{this.obtainNewServerPermission(!0)},1e3*t),console.log("Registered heartbeat in",t,"seconds")}unregisterHeartBeat(){this.lease&&delete this.lease,this.inFlightHeartBeatTimeoutId&&(clearTimeout(this.inFlightHeartBeatTimeoutId),delete this.inFlightHeartBeatTimeoutId)}obtainNewServerPermission(t){return e(this,void 0,void 0,(function*(){if(this.wasmModule){const e=this.wasmModule.getActiveLicenseTokenInfo(),s=yield O(e,this.wasmModule);switch(s.status){case P.Ok:case P.RemoteLock:this.registerHeartBeat(s.lease);break;case P.NetworkError:case P.PayloadSignatureVerificationFailed:case P.PayloadCorrupted:t?(console.warn("Problem with obtaining server permission. Will attempt in 10 seconds "+P[s.status]),this.inFlightHeartBeatTimeoutId=setTimeout(()=>{this.obtainNewServerPermission(!1)},1e4)):console.error("Problem with obtaining server permission. "+P[s.status]);break;case P.IncorrectTokenState:case P.PermissionExpired:console.error("Internal error: "+P[s.status])}return s.status}return console.error("Internal inconsistency! Wasm module not initialized where it's expected to be!"),P.IncorrectTokenState}))}willSoonExpire(){if(this.lease){if(this.wasmModule.getActiveLicenseTokenInfo().unlockResult===T.Valid){const e=Math.floor(Date.now()/1e3);return 30>this.lease-e}return!0}return!1}calculateWasmType(t){return e(this,void 0,void 0,(function*(){return null!==t.wasmType?t.wasmType:yield I(t.engineLocation)}))}calculateEngineLocationPrefix(e,t){const s=z(""===e.engineLocation?self.location.origin:e.engineLocation,function(e){switch(e){case M.AdvancedWithThreads:return"advanced-threads";case M.Advanced:return"advanced";case M.Basic:return"basic"}}(t));return e.allowHelloMessage&&console.log("Engine location prefix is:",s),s}processInitMessage(t){return e(this,void 0,void 0,(function*(){const s=yield this.calculateWasmType(t),r=this.calculateEngineLocationPrefix(t,s);let n={locateFile:e=>z(r,e)};t.registerLoadCallback&&(n=Object.assign(n,{setStatus:e=>{const t=new C(function(e){if("Running..."===e)return 100;if(0===e.length)return 0;const t=/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/.exec(e);if(t){return 100*parseInt(t[2])/parseInt(t[4])}return NaN}(e));this.context.postMessage(t)}}));try{const i=z(r,t.wasmModuleName+".js");N(s)&&(n=function(e,t,s){return t&&t>0&&(e=Object.assign(e,{allowedThreads:t})),null!==s&&(e=Object.assign(e,{mainScriptUrlOrBlob:s})),e}(n,t.numberOfWorkers,i)),importScripts(i);(0,self[t.wasmModuleName])(n).then(r=>e(this,void 0,void 0,(function*(){N(s)&&(t.allowHelloMessage&&console.log("Waiting for thread workers to boot..."),yield function(t){return e(this,void 0,void 0,(function*(){t.threadWorkersReadyPromise&&(yield t.threadWorkersReadyPromise)}))}(r));const n=yield function(t,s,r,n){return e(this,void 0,void 0,(function*(){const e=n.initializeWithLicenseKey(t,r,s);switch(e.unlockResult){case T.Invalid:return{error:new x(S.LicenseTokenStateInvalid,e.licenseError)};case T.Valid:return{error:null,showOverlay:(i=e.isTrial,o=e.allowRemoveDemoOverlay,a=e.allowRemoveProductionOverlay,!(i&&o||!i&&a))};case T.RequiresServerPermission:{const t=yield O(e,n);switch(t.status){case P.Ok:return{error:null,lease:t.lease};case P.NetworkError:{let e="";return t.networkErrorDescription&&(e=" "+t.networkErrorDescription),{error:new x(S.NetworkError,"There has been a network error while obtaining the server permission!"+e)}}case P.RemoteLock:return{error:new x(S.RemoteLock,"Provided license key has been remotely locked.Please contact support for more information!"),lease:t.lease};case P.PermissionExpired:return{error:new x(S.PermissionExpired,"Internal error (server permission expired)"),lease:t.lease};case P.PayloadCorrupted:return{error:new x(S.PayloadCorrupted,"Server permission payload is corrupted!"),lease:t.lease};case P.PayloadSignatureVerificationFailed:return{error:new x(S.PayloadSignatureVerificationFailed,"Failed to verify server permission's digital signature!"),lease:t.lease};case P.IncorrectTokenState:return{error:new x(S.IncorrectTokenState,"Internal error (Incorrect token state)"),lease:t.lease}}}}var i,o,a}))}(t.licenseKey,t.allowHelloMessage,t.userId,r);null===n.error?(this.wasmModule=r,n.lease?this.registerHeartBeat(n.lease):this.unregisterHeartBeat(),this.notifyInitSuccess(t,!!n.showOverlay,s)):this.notifyError(t,n.error)})),e=>{this.notifyError(t,e)})}catch(e){this.notifyError(t,e)}}))}processInvokeFunction(e){if(null===this.wasmModule)return void this.notifyError(e,"WASM module is not initialized!");const t=e.funcName,s=this.unwrapParameters(e);try{const r=this.wasmModule[t](...s);this.context.postMessage(new k(e.messageID,r))}catch(t){this.notifyError(e,t)}}processCreateNewRecognizer(e){if(null===this.wasmModule)return void this.notifyError(e,"WASM module is not initialized!");const t=e.className,s=this.unwrapParameters(e);try{const r=new this.wasmModule[t](...s),n=this.getNextObjectHandle();this.objects[n]=r,this.context.postMessage(new w(e.messageID,n))}catch(t){this.notifyError(e,t)}}getRecognizers(e){const t=[];for(const s of e){t.push(this.objects[s])}return t}processCreateRecognizerRunner(t){return e(this,void 0,void 0,(function*(){if(null===this.wasmModule)this.notifyError(t,"WASM module is not initialized!");else if(null!==this.nativeRecognizerRunner)this.notifyError(t,"Recognizer runner is already created! Multiple instances are not allowed!");else{this.setupMetadataCallbacks(t.registeredMetadataCallbacks);try{if(this.willSoonExpire()){const e=yield this.obtainNewServerPermission(!1);if(e!==P.Ok){const s=P[e];return void this.notifyError(t,new x(S[s],"Cannot initialize recognizers because of invalid server permission: "+s))}}const e=this.getRecognizers(t.recognizerHandles);this.nativeRecognizerRunner=new this.wasmModule.RecognizerRunner(e,t.allowMultipleResults,this.metadataCallbacks),this.notifySuccess(t)}catch(e){this.notifyError(t,e)}}}))}processReconfigureRecognizerRunner(e){if(null===this.wasmModule)this.notifyError(e,"WASM module is not initialized!");else if(null===this.nativeRecognizerRunner)this.notifyError(e,"Recognizer runner is not created! There is nothing to reconfigure!");else try{const t=this.getRecognizers(e.recognizerHandles);this.nativeRecognizerRunner.reconfigureRecognizers(t,e.allowMultipleResults),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}}processDeleteRecognizerRunner(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.delete(),this.nativeRecognizerRunner=null,this.notifySuccess(e)}catch(t){this.notifyError(e,t)}else this.notifyError(e,"Recognizer runner is already deleted!")}processInvokeObject(e){try{const t=e.objectHandle,s=e.methodName,r=this.unwrapParameters(e),n=this.objects[t];if(void 0===n)this.notifyError(e,"Cannot find object with handle: "+t);else{const i=n[s](...r),o=this.scanForTransferrables(i);"delete"===s&&delete this.objects[t],this.context.postMessage(new k(e.messageID,i),o)}}catch(t){this.notifyError(e,t)}}processImage(e){if(null!==this.nativeRecognizerRunner)try{const t=this.nativeRecognizerRunner.processImage(e.frame);this.context.postMessage(new v(e.messageID,t))}catch(t){this.notifyError(e,t)}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}resetRecognizers(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.resetRecognizers(e.hardReset),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}setDetectionOnly(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setDetectionOnlyMode(e.detectionOnlyMode),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}setCameraPreviewMirrored(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setCameraPreviewMirrored(e.cameraPreviewMirrored),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}setupMetadataCallbacks(e){e.onDebugText?this.metadataCallbacks.onDebugText=e=>{const t=new E(i.onDebugText,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onDebugText,e.onDetectionFailed?this.metadataCallbacks.onDetectionFailed=()=>{const e=new E(i.onDetectionFailed,[]);this.context.postMessage(e)}:delete this.metadataCallbacks.onDetectionFailed,e.onPointsDetection?this.metadataCallbacks.onPointsDetection=e=>{const t=new E(i.onPointsDetection,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onPointsDetection,e.onQuadDetection?this.metadataCallbacks.onQuadDetection=e=>{const t=new E(i.onQuadDetection,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onQuadDetection,e.onFirstSideResult?this.metadataCallbacks.onFirstSideResult=()=>{const e=new E(i.onFirstSideResult,[]);this.context.postMessage(e)}:delete this.metadataCallbacks.onFirstSideResult,e.onGlare?this.metadataCallbacks.onGlare=e=>{const t=new E(i.onGlare,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onGlare}registerMetadataCallbacks(e){if(null!==this.nativeRecognizerRunner){this.setupMetadataCallbacks(e.registeredMetadataCallbacks);try{this.nativeRecognizerRunner.setJSDelegate(this.metadataCallbacks),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}registerClearTimeoutCallback(e){if(null!==this.nativeRecognizerRunner){this.clearTimeoutCallback=e.callbackNonEmpty?{onClearTimeout:()=>{const e=new E(i.clearTimeoutCallback,[]);this.context.postMessage(e)}}:null;try{this.nativeRecognizerRunner.setClearTimeoutCallback(this.clearTimeoutCallback),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}}}(); + ***************************************************************************** */function e(e,t,s,r){return new(s||(s=Promise))((function(n,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))}let t=0;class s{constructor(e){this.action=e,this.messageID=function(){const e=t;return t+=1,e}()}}class r extends s{constructor(e,t){super(r.action),this.wasmModuleName=e.wasmModuleName,this.licenseKey=e.licenseKey,this.userId=t,this.registerLoadCallback=null!==e.loadProgressCallback,this.allowHelloMessage=e.allowHelloMessage,this.engineLocation=e.engineLocation,this.wasmType=e.wasmType,this.numberOfWorkers=e.numberOfWorkers}}var n,i;r.action="init",function(e){e[e.Any=0]="Any",e[e.Recognizer=1]="Recognizer",e[e.RecognizerSettings=2]="RecognizerSettings",e[e.Callback=3]="Callback"}(n||(n={}));class o extends s{constructor(e,t){super(o.action),this.funcName=e,this.params=t}}o.action="invokeFunction";class a extends s{constructor(e,t){super(a.action),this.className=e,this.params=t}}a.action="createNewNativeObject";class c extends s{constructor(e,t,s){super(c.action),this.recognizerHandles=e,this.allowMultipleResults=t,this.registeredMetadataCallbacks=s}}c.action="createRecognizerRunner";class l extends s{constructor(e,t){super(l.action),this.recognizerHandles=e,this.allowMultipleResults=t}}l.action="reconfigureRecognizerRunner";class u extends s{constructor(){super(u.action)}}u.action="deleteRecognizerRunner";class h extends s{constructor(e,t,s){super(h.action),this.objectHandle=e,this.methodName=t,this.params=s}}h.action="invokeObject";class d extends s{constructor(e){super(d.action),this.frame=e}getTransferrables(){return[this.frame.imageData.data.buffer]}}d.action="processImage";class g extends s{constructor(e){super(g.action),this.hardReset=e}}g.action="resetRecognizers";class m extends s{constructor(e){super(m.action),this.registeredMetadataCallbacks=e}}m.action="registerMetadataCallbacks";class f extends s{constructor(e){super(f.action),this.detectionOnlyMode=e}}f.action="setDetectionOnly";class y extends s{constructor(e){super(y.action),this.callbackNonEmpty=e}}y.action="setClearTimeoutCallback";class p extends s{constructor(e){super(p.action),this.cameraPreviewMirrored=e}}p.action="setCameraPreviewMirrored";class b{constructor(e,t,s){this.success=!0,this.error=null,this.messageID=e,this.success=t,this.error=s}}class k{constructor(e,t,s,r){this.success=!0,this.showOverlay=!0,this.messageID=e,this.showOverlay=s,this.wasmType=r}}class R extends b{constructor(e,t){super(e,!0,null),this.result=t}}class w extends b{constructor(e,t){super(e,!0,null),this.objectHandle=t}}class v extends b{constructor(e,t){super(e,!0,null),this.recognitionState=t}}class C{constructor(e){this.isLoadProgressMessage=!0,this.progress=e}}!function(e){e[e.onDebugText=0]="onDebugText",e[e.onDetectionFailed=1]="onDetectionFailed",e[e.onQuadDetection=2]="onQuadDetection",e[e.onPointsDetection=3]="onPointsDetection",e[e.onFirstSideResult=4]="onFirstSideResult",e[e.clearTimeoutCallback=5]="clearTimeoutCallback",e[e.onGlare=6]="onGlare",e[e.recognizerCallback=7]="recognizerCallback"}(i||(i={}));class E{constructor(e,t){this.isCallbackMessage=!0,this.callbackType=e,this.callbackParameters=t}}function z(e,t){return t=t||"",""===(e=e||"")?t:e.endsWith("/")?t.startsWith("/")?e+t.substring(1):e+t:t.startsWith("/")?e+t:e+"/"+t}var M,T,S;function I(t){return e(this,void 0,void 0,(function*(){const e=yield(async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])))(),s=yield(async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,12,1,10,0,67,0,0,0,0,252,0,26,11])))(),r=yield(async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,65,0,192,26,11])))(),n=yield(async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])))(),i=yield(async e=>{try{return"undefined"!=typeof MessageChannel&&(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(e)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]));if(!(e&&s&&r&&n))return M.Basic;if(!i)return M.Advanced;try{return new Worker(t+"/Worker.test.js").terminate(),M.AdvancedWithThreads}catch(e){return M.Advanced}}))}!function(e){e.Basic="BASIC",e.Advanced="ADVANCED",e.AdvancedWithThreads="ADVANCED_WITH_THREADS"}(M||(M={})),function(e){e[e.Invalid=0]="Invalid",e[e.RequiresServerPermission=1]="RequiresServerPermission",e[e.Valid=2]="Valid"}(T||(T={})),function(e){e.LicenseTokenStateInvalid="LICENSE_TOKEN_STATE_INVALID",e.NetworkError="NETWORK_ERROR",e.RemoteLock="REMOTE_LOCK",e.PermissionExpired="PERMISSION_EXPIRED",e.PayloadCorrupted="PAYLOAD_CORRUPTED",e.PayloadSignatureVerificationFailed="PAYLOAD_SIGNATURE_VERIFICATION_FAILED",e.IncorrectTokenState="INCORRECT_TOKEN_STATE"}(S||(S={}));class x{constructor(e,t){this.code="UNLOCK_LICENSE_ERROR",this.message=null,this.type=e,t&&(this.message=t)}}function D(e){return{licenseId:e.licenseId,licensee:e.licensee,packageName:e.packageName,platform:"Browser",sdkName:e.sdkName,sdkVersion:e.sdkVersion}}var P;function O(t,s){return e(this,void 0,void 0,(function*(){try{const e=yield fetch("https://baltazar.microblink.com/api/v1/status/check",{method:"POST",headers:{"Content-Type":"application/json"},cache:"no-cache",body:JSON.stringify(D(t))});if(e.ok){const t=""+(yield e.text());return s.submitServerPermission(t)}return{status:P.NetworkError,lease:0,networkErrorDescription:"Server responded with status "+e.status}}catch(e){return{status:P.NetworkError,lease:0,networkErrorDescription:"Unexpected error: "+JSON.stringify(e)}}}))}function N(e){return e===M.AdvancedWithThreads}!function(e){e[e.Ok=0]="Ok",e[e.NetworkError=1]="NetworkError",e[e.RemoteLock=2]="RemoteLock",e[e.PermissionExpired=3]="PermissionExpired",e[e.PayloadCorrupted=4]="PayloadCorrupted",e[e.PayloadSignatureVerificationFailed=5]="PayloadSignatureVerificationFailed",e[e.IncorrectTokenState=6]="IncorrectTokenState"}(P||(P={}));new class{constructor(){this.context=self,this.wasmModule=null,this.nativeRecognizerRunner=null,this.objects={},this.nextObjectHandle=0,this.metadataCallbacks={},this.clearTimeoutCallback=null,this.context.onmessage=e=>{const t=e.data;switch(t.action){case r.action:this.processInitMessage(t);break;case o.action:this.processInvokeFunction(t);break;case a.action:this.processCreateNewRecognizer(t);break;case h.action:this.processInvokeObject(t);break;case c.action:this.processCreateRecognizerRunner(t);break;case l.action:this.processReconfigureRecognizerRunner(t);break;case u.action:this.processDeleteRecognizerRunner(t);break;case d.action:this.processImage(t);break;case g.action:this.resetRecognizers(t);break;case f.action:this.setDetectionOnly(t);break;case p.action:this.setCameraPreviewMirrored(t);break;case m.action:this.registerMetadataCallbacks(t);break;case y.action:this.registerClearTimeoutCallback(t);break;default:throw Error("Unknown message action: "+JSON.stringify(t.action))}}}getNextObjectHandle(){const e=this.nextObjectHandle;return this.nextObjectHandle=this.nextObjectHandle+1,e}notifyError(e,t){this.context.postMessage(new b(e.messageID,!1,t))}notifySuccess(e){this.context.postMessage(new b(e.messageID,!0,null))}notifyInitSuccess(e,t,s){this.context.postMessage(new k(e.messageID,!0,t,s))}unwrapParameters(e){const t=[];for(const s of e.params){let r=s.parameter;s.type===n.Recognizer?(r=this.objects[r],void 0===r&&this.notifyError(e,"Cannot find object with handle: undefined")):s.type===n.RecognizerSettings&&(r=this.restoreFunctions(r)),t.push(r)}return t}restoreFunctions(e){const t=Object.keys(e);for(const s of t){const t=e[s];"object"==typeof t&&null!==t&&"parameter"in t&&"type"in t&&t.type===n.Callback&&(e[s]=(...e)=>{const s=new E(i.recognizerCallback,[t.parameter].concat(e));this.context.postMessage(s)})}return e}scanForTransferrables(e){if("object"==typeof e){const t=Object.keys(e),s=[];for(const r of t){const t=e[r];t instanceof ImageData?s.push(t.data.buffer):t instanceof Uint8Array?s.push(t.buffer):null!==t&&"object"==typeof t&&s.push(...this.scanForTransferrables(t))}return s}return[]}registerHeartBeat(e){this.unregisterHeartBeat(),this.lease=e;let t=e-Math.floor(Date.now()/1e3);t>120?t-=120:t/=2,this.inFlightHeartBeatTimeoutId=setTimeout((()=>{this.obtainNewServerPermission(!0)}),1e3*t),console.log("Registered heartbeat in",t,"seconds")}unregisterHeartBeat(){this.lease&&delete this.lease,this.inFlightHeartBeatTimeoutId&&(clearTimeout(this.inFlightHeartBeatTimeoutId),delete this.inFlightHeartBeatTimeoutId)}obtainNewServerPermission(t){return e(this,void 0,void 0,(function*(){if(this.wasmModule){const e=this.wasmModule.getActiveLicenseTokenInfo(),s=yield O(e,this.wasmModule);switch(s.status){case P.Ok:case P.RemoteLock:this.registerHeartBeat(s.lease);break;case P.NetworkError:case P.PayloadSignatureVerificationFailed:case P.PayloadCorrupted:t?(console.warn("Problem with obtaining server permission. Will attempt in 10 seconds "+P[s.status]),this.inFlightHeartBeatTimeoutId=setTimeout((()=>{this.obtainNewServerPermission(!1)}),1e4)):console.error("Problem with obtaining server permission. "+P[s.status]);break;case P.IncorrectTokenState:case P.PermissionExpired:console.error("Internal error: "+P[s.status])}return s.status}return console.error("Internal inconsistency! Wasm module not initialized where it's expected to be!"),P.IncorrectTokenState}))}willSoonExpire(){if(this.lease){if(this.wasmModule.getActiveLicenseTokenInfo().unlockResult===T.Valid){const e=Math.floor(Date.now()/1e3);return 30>this.lease-e}return!0}return!1}calculateWasmType(t){return e(this,void 0,void 0,(function*(){return null!==t.wasmType?t.wasmType:yield I(t.engineLocation)}))}calculateEngineLocationPrefix(e,t){const s=z(""===e.engineLocation?self.location.origin:e.engineLocation,function(e){switch(e){case M.AdvancedWithThreads:return"advanced-threads";case M.Advanced:return"advanced";case M.Basic:return"basic"}}(t));return e.allowHelloMessage&&console.log("Engine location prefix is:",s),s}processInitMessage(t){return e(this,void 0,void 0,(function*(){const s=yield this.calculateWasmType(t),r=this.calculateEngineLocationPrefix(t,s);let n={locateFile:e=>z(r,e)};t.registerLoadCallback&&(n=Object.assign(n,{setStatus:e=>{const t=new C(function(e){if("Running..."===e)return 100;if(0===e.length)return 0;const t=/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/.exec(e);if(t)return 100*parseInt(t[2])/parseInt(t[4]);return NaN}(e));this.context.postMessage(t)}}));try{const i=z(r,t.wasmModuleName+".js");N(s)&&(n=function(e,t,s){return t&&t>0&&(e=Object.assign(e,{allowedThreads:t})),null!==s&&(e=Object.assign(e,{mainScriptUrlOrBlob:s})),e}(n,t.numberOfWorkers,i)),importScripts(i);(0,self[t.wasmModuleName])(n).then((r=>e(this,void 0,void 0,(function*(){N(s)&&(t.allowHelloMessage&&console.log("Waiting for thread workers to boot..."),yield function(t){return e(this,void 0,void 0,(function*(){t.threadWorkersReadyPromise&&(yield t.threadWorkersReadyPromise)}))}(r));const n=yield function(t,s,r,n){return e(this,void 0,void 0,(function*(){const e=n.initializeWithLicenseKey(t,r,s);switch(e.unlockResult){case T.Invalid:return{error:new x(S.LicenseTokenStateInvalid,e.licenseError)};case T.Valid:return{error:null,showOverlay:(i=e.isTrial,o=e.allowRemoveDemoOverlay,a=e.allowRemoveProductionOverlay,!(i&&o||!i&&a))};case T.RequiresServerPermission:{const t=yield O(e,n);switch(t.status){case P.Ok:return{error:null,lease:t.lease};case P.NetworkError:{let e="";return t.networkErrorDescription&&(e=" "+t.networkErrorDescription),{error:new x(S.NetworkError,"There has been a network error while obtaining the server permission!"+e)}}case P.RemoteLock:return{error:new x(S.RemoteLock,"Provided license key has been remotely locked.Please contact support for more information!"),lease:t.lease};case P.PermissionExpired:return{error:new x(S.PermissionExpired,"Internal error (server permission expired)"),lease:t.lease};case P.PayloadCorrupted:return{error:new x(S.PayloadCorrupted,"Server permission payload is corrupted!"),lease:t.lease};case P.PayloadSignatureVerificationFailed:return{error:new x(S.PayloadSignatureVerificationFailed,"Failed to verify server permission's digital signature!"),lease:t.lease};case P.IncorrectTokenState:return{error:new x(S.IncorrectTokenState,"Internal error (Incorrect token state)"),lease:t.lease}}}}var i,o,a}))}(t.licenseKey,t.allowHelloMessage,t.userId,r);null===n.error?(this.wasmModule=r,n.lease?this.registerHeartBeat(n.lease):this.unregisterHeartBeat(),this.notifyInitSuccess(t,!!n.showOverlay,s)):this.notifyError(t,n.error)}))),(e=>{this.notifyError(t,e)}))}catch(e){this.notifyError(t,e)}}))}processInvokeFunction(e){if(null===this.wasmModule)return void this.notifyError(e,"WASM module is not initialized!");const t=e.funcName,s=this.unwrapParameters(e);try{const r=this.wasmModule[t](...s);this.context.postMessage(new R(e.messageID,r))}catch(t){this.notifyError(e,t)}}processCreateNewRecognizer(e){if(null===this.wasmModule)return void this.notifyError(e,"WASM module is not initialized!");const t=e.className,s=this.unwrapParameters(e);try{const r=new this.wasmModule[t](...s),n=this.getNextObjectHandle();this.objects[n]=r,this.context.postMessage(new w(e.messageID,n))}catch(t){this.notifyError(e,t)}}getRecognizers(e){const t=[];for(const s of e){t.push(this.objects[s])}return t}processCreateRecognizerRunner(t){return e(this,void 0,void 0,(function*(){if(null===this.wasmModule)this.notifyError(t,"WASM module is not initialized!");else if(null!==this.nativeRecognizerRunner)this.notifyError(t,"Recognizer runner is already created! Multiple instances are not allowed!");else{this.setupMetadataCallbacks(t.registeredMetadataCallbacks);try{if(this.willSoonExpire()){const e=yield this.obtainNewServerPermission(!1);if(e!==P.Ok){const s=P[e];return void this.notifyError(t,new x(S[s],"Cannot initialize recognizers because of invalid server permission: "+s))}}const e=this.getRecognizers(t.recognizerHandles);this.nativeRecognizerRunner=new this.wasmModule.RecognizerRunner(e,t.allowMultipleResults,this.metadataCallbacks),this.notifySuccess(t)}catch(e){this.notifyError(t,e)}}}))}processReconfigureRecognizerRunner(e){if(null===this.wasmModule)this.notifyError(e,"WASM module is not initialized!");else if(null===this.nativeRecognizerRunner)this.notifyError(e,"Recognizer runner is not created! There is nothing to reconfigure!");else try{const t=this.getRecognizers(e.recognizerHandles);this.nativeRecognizerRunner.reconfigureRecognizers(t,e.allowMultipleResults),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}}processDeleteRecognizerRunner(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.delete(),this.nativeRecognizerRunner=null,this.notifySuccess(e)}catch(t){this.notifyError(e,t)}else this.notifyError(e,"Recognizer runner is already deleted!")}wrapFunctions(e,t){if("object"!=typeof e)return e;const s=Object.assign({},e),r=Object.keys(s);for(const e of r){if("function"==typeof s[e]){s[e]={parameter:{recognizerHandle:t,callbackName:e},type:n.Callback}}}return s}processInvokeObject(e){try{const t=e.objectHandle,s=e.methodName,r=this.unwrapParameters(e),n=this.objects[t];if(void 0===n)this.notifyError(e,"Cannot find object with handle: "+t);else{const i=this.wrapFunctions(n[s](...r),t),o=this.scanForTransferrables(i);"delete"===s&&delete this.objects[t],this.context.postMessage(new R(e.messageID,i),o)}}catch(t){this.notifyError(e,t)}}processImage(e){if(null!==this.nativeRecognizerRunner)try{const t=this.nativeRecognizerRunner.processImage(e.frame);this.context.postMessage(new v(e.messageID,t))}catch(t){this.notifyError(e,t)}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}resetRecognizers(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.resetRecognizers(e.hardReset),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}setDetectionOnly(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setDetectionOnlyMode(e.detectionOnlyMode),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}setCameraPreviewMirrored(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setCameraPreviewMirrored(e.cameraPreviewMirrored),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}setupMetadataCallbacks(e){e.onDebugText?this.metadataCallbacks.onDebugText=e=>{const t=new E(i.onDebugText,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onDebugText,e.onDetectionFailed?this.metadataCallbacks.onDetectionFailed=()=>{const e=new E(i.onDetectionFailed,[]);this.context.postMessage(e)}:delete this.metadataCallbacks.onDetectionFailed,e.onPointsDetection?this.metadataCallbacks.onPointsDetection=e=>{const t=new E(i.onPointsDetection,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onPointsDetection,e.onQuadDetection?this.metadataCallbacks.onQuadDetection=e=>{const t=new E(i.onQuadDetection,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onQuadDetection,e.onFirstSideResult?this.metadataCallbacks.onFirstSideResult=()=>{const e=new E(i.onFirstSideResult,[]);this.context.postMessage(e)}:delete this.metadataCallbacks.onFirstSideResult,e.onGlare?this.metadataCallbacks.onGlare=e=>{const t=new E(i.onGlare,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onGlare}registerMetadataCallbacks(e){if(null!==this.nativeRecognizerRunner){this.setupMetadataCallbacks(e.registeredMetadataCallbacks);try{this.nativeRecognizerRunner.setJSDelegate(this.metadataCallbacks),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}registerClearTimeoutCallback(e){if(null!==this.nativeRecognizerRunner){this.clearTimeoutCallback=e.callbackNonEmpty?{onClearTimeout:()=>{const e=new E(i.clearTimeoutCallback,[]);this.context.postMessage(e)}}:null;try{this.nativeRecognizerRunner.setClearTimeoutCallback(this.clearTimeoutCallback),this.notifySuccess(e)}catch(t){this.notifyError(e,t)}}else this.notifyError(e,"Recognizer runner is not initialized! Cannot process image!")}}}(); diff --git a/resources/advanced-threads/BlinkIDImageCaptureWasmSDK.data b/resources/advanced-threads/BlinkIDImageCaptureWasmSDK.data index 85cb8a2..5963907 100644 Binary files a/resources/advanced-threads/BlinkIDImageCaptureWasmSDK.data and b/resources/advanced-threads/BlinkIDImageCaptureWasmSDK.data differ diff --git a/resources/advanced-threads/BlinkIDImageCaptureWasmSDK.js b/resources/advanced-threads/BlinkIDImageCaptureWasmSDK.js index dfeda6c..bb1ba5c 100644 --- a/resources/advanced-threads/BlinkIDImageCaptureWasmSDK.js +++ b/resources/advanced-threads/BlinkIDImageCaptureWasmSDK.js @@ -7,198 +7,196 @@ function(BlinkIDImageCaptureWasmSDK) { BlinkIDImageCaptureWasmSDK = BlinkIDImageCaptureWasmSDK || {}; -function g(){n.buffer!=t&&aa(n.buffer);return ba}function x(){n.buffer!=t&&aa(n.buffer);return ca}function da(){n.buffer!=t&&aa(n.buffer);return ea}function y(){n.buffer!=t&&aa(n.buffer);return fa}function A(){n.buffer!=t&&aa(n.buffer);return ha}function C(){n.buffer!=t&&aa(n.buffer);return ia}function ja(){n.buffer!=t&&aa(n.buffer);return ka}var D;D||(D=typeof BlinkIDImageCaptureWasmSDK !== 'undefined' ? BlinkIDImageCaptureWasmSDK : {});var la,ma;D.ready=new Promise(function(a,b){la=a;ma=b});D.Ic||(D.Ic=0);D.Ic++; -(function(a){function b(m,q,p){var r=new XMLHttpRequest;r.open("GET",m,!0);r.responseType="arraybuffer";r.onprogress=function(u){var k=q;u.total&&(k=u.total);if(u.loaded){r.ud?D.Wb[m].loaded=u.loaded:(r.ud=!0,D.Wb||(D.Wb={}),D.Wb[m]={loaded:u.loaded,total:k});var v=k=u=0,z;for(z in D.Wb){var B=D.Wb[z];u+=B.total;k+=B.loaded;v++}u=Math.ceil(u*D.Ic/v);D.setStatus&&D.setStatus("Downloading data... ("+k+"/"+u+")")}else!D.Wb&&D.setStatus&&D.setStatus("Downloading data...")};r.onerror=function(){throw Error("NetworkError for: "+ -m);};r.onload=function(){if(200==r.status||304==r.status||206==r.status||0==r.status&&r.response)p(r.response);else throw Error(r.statusText+" : "+r.responseURL);};r.send(null)}function c(m){console.error("package error:",m)}function d(){function m(u,k,v){this.start=u;this.end=k;this.audio=v}function q(u){if(!u)throw"Loading data file failed."+Error().stack;if(!(u instanceof ArrayBuffer))throw"bad input to processPackageData"+Error().stack;u=new Uint8Array(u);m.prototype.zd=u;u=a.files;for(var k= -0;k=c);){var e=a[b++];if(!e)break;if(e&128){var f=a[b++]&63;if(192==(e&224))d+=String.fromCharCode((e&31)<<6|f);else{var h=a[b++]&63;e=224==(e&240)?(e&15)<<12|f<<6|h:(e&7)<<18|f<<12|h<<6|a[b++]&63;65536>e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d}function K(a,b){return a?Ka(x(),a,b):""} -function La(a,b,c,d){if(!(0=h){var l=a.charCodeAt(++f);h=65536+((h&1023)<<10)|l&1023}if(127>=h){if(c>=d)break;b[c++]=h}else{if(2047>=h){if(c+1>=d)break;b[c++]=192|h>>6}else{if(65535>=h){if(c+2>=d)break;b[c++]=224|h>>12}else{if(c+3>=d)break;b[c++]=240|h>>18;b[c++]=128|h>>12&63}b[c++]=128|h>>6&63}b[c++]=128|h&63}}b[c]=0;return c-e}function Ma(a,b,c){La(a,x(),b,c)} -function Na(a){for(var b=0,c=0;c=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++c)&1023);127>=d?++b:b=2047>=d?b+2:65535>=d?b+3:b+4}return b}function Oa(a,b){for(var c="",d=0;!(d>=b/2);++d){var e=da()[a+2*d>>1];if(0==e)break;c+=String.fromCharCode(e)}return c}function Pa(a,b,c){void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var e=0;e>1]=f;b+=2}da()[b>>1]=0;return b-d} -function Qa(a){return 2*a.length}function Ra(a,b){for(var c=0,d="";!(c>=b/4);){var e=A()[a+4*c>>2];if(0==e)break;++c;65536<=e?(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023)):d+=String.fromCharCode(e)}return d}function Sa(a,b,c){void 0===c&&(c=2147483647);if(4>c)return 0;var d=b;c=d+c-4;for(var e=0;e=f){var h=a.charCodeAt(++e);f=65536+((f&1023)<<10)|h&1023}A()[b>>2]=f;b+=4;if(b+4>c)break}A()[b>>2]=0;return b-d} -function Ta(a){for(var b=0,c=0;c=d&&++c;b+=4}return b}function Ua(a){var b=Na(a)+1,c=L(b);c&&La(a,g(),c,b);return c}function Va(a,b){g().set(a,b)}var t,ba,ca,ea,fa,ha,ia,Wa,ka;F&&(t=D.buffer); -function aa(a){t=a;D.HEAP8=ba=new Int8Array(a);D.HEAP16=ea=new Int16Array(a);D.HEAP32=ha=new Int32Array(a);D.HEAPU8=ca=new Uint8Array(a);D.HEAPU16=fa=new Uint16Array(a);D.HEAPU32=ia=new Uint32Array(a);D.HEAPF32=Wa=new Float32Array(a);D.HEAPF64=ka=new Float64Array(a)}var Xa=D.INITIAL_MEMORY||209715200; -if(F)n=D.wasmMemory,t=D.buffer;else if(D.wasmMemory)n=D.wasmMemory;else if(n=new WebAssembly.Memory({initial:Xa/65536,maximum:12800,shared:!0}),!(n.buffer instanceof SharedArrayBuffer))throw E("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),xa&&console.log("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and also use a recent version)"), -Error("bad memory");n&&(t=n.buffer);Xa=t.byteLength;aa(t);var O,Ya=[],Za=[],$a=[];function ab(){F||(D.noFSInit||bb||(bb=!0,cb(),D.stdin=D.stdin,D.stdout=D.stdout,D.stderr=D.stderr,D.stdin?db("/dev","stdin",D.stdin):eb("/dev/tty","/dev/stdin"),D.stdout?db("/dev","stdout",null,D.stdout):eb("/dev/tty","/dev/stdout"),D.stderr?db("/dev","stderr",null,D.stderr):eb("/dev/tty1","/dev/stderr"),fb("/dev/stdin",0),fb("/dev/stdout",1),fb("/dev/stderr",1)),gb(Za))} -function hb(){var a=D.preRun.shift();Ya.unshift(a)}var jb=0,kb=null,lb=null;function mb(){Ja(!F,"addRunDependency cannot be used in a pthread worker");jb++;D.monitorRunDependencies&&D.monitorRunDependencies(jb)}function nb(){jb--;D.monitorRunDependencies&&D.monitorRunDependencies(jb);if(0==jb&&(null!==kb&&(clearInterval(kb),kb=null),lb)){var a=lb;lb=null;a()}}D.preloadedImages={};D.preloadedAudios={}; -function H(a){if(D.onAbort)D.onAbort(a);F&&console.error("Pthread aborting at "+Error().stack);a+="";E(a);Ha=!0;Ia=1;a=new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");ma(a);throw a;}function ob(){return pb.startsWith("data:application/octet-stream;base64,")}var pb="BlinkIDImageCaptureWasmSDK.wasm";ob()||(pb=za(pb)); -function qb(){var a=pb;try{if(a==pb&&Fa)return new Uint8Array(Fa);if(Ba)return Ba(a);throw"both async and sync fetching of the wasm failed";}catch(b){H(b)}}function rb(){return Fa||!va&&!wa||"function"!==typeof fetch?Promise.resolve().then(function(){return qb()}):fetch(pb,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+pb+"'";return a.arrayBuffer()}).catch(function(){return qb()})} -var P,sb,ub={293554:function(a){a=K(a);throw Error("Failed to reconfigure RecognizerRunner due to following error: "+a);},293690:function(a,b,c,d){a=K(a);b=K(b);c=K(c);d=K(d);throw Error(a+b+c+d);},293906:function(a,b){a=K(a);b=K(b);throw Error(a+b);},294016:function(a,b){a=K(a);b=K(b);console.log(a+b)},294114:function(a){throw Error(K(a));},294157:function(){throw"Canceled!";},294175:function(a,b){setTimeout(function(){tb(a,b)},0)},294254:function(){throw Error("Unable to perform that operation while recognizer is in use!"); -}};function gb(a){for(;0=a||a>g().length||a&1||0>b)return-28;if(0==b)return 0;2147483647<=b&&(b=Infinity);var c=Atomics.load(A(),wb>>2),d=0;if(c==a&&Atomics.compareExchange(A(),wb>>2,c,0)==c&&(--b,d=1,0>=b))return 1;a=Atomics.notify(A(),a>>2,b);if(0<=a)return a+d;throw"Atomics.notify returned an unexpected value "+a;}D._emscripten_futex_wake=vb; -function xb(a){if(F)throw"Internal Error! cleanupThread() can only ever be called from main application thread!";if(!a)throw"Internal Error! Null pthread_ptr in cleanupThread!";var b=Q.Nb[a];b&&(A()[a+12>>2]=0,Q.zc(b.worker))} -var Q={Sb:[],Rb:[],Uc:[],Me:function(){},Qd:function(){for(var a=L(228),b=0;57>b;++b)C()[a/4+b]=0;A()[a+12>>2]=a;b=a+152;A()[b>>2]=b;var c=L(512);for(b=0;128>b;++b)C()[c/4+b]=0;Atomics.store(C(),a+100>>2,c);Atomics.store(C(),a+40>>2,a);yb(a,!wa,1);zb(a)},Rd:function(){Q.receiveObjectTransfer=Q.fe;Q.threadInit=Q.te;Q.threadCancel=Q.se;Q.threadExit=Q.rd;Q.setExitStatus=Q.le},Nb:{},Bc:[],he:function(){for(;0>2,1);Atomics.store(C(), -a+60>>2,0);Q.he();Atomics.store(C(),a+4>>2,b);Atomics.store(C(),a+0>>2,1);vb(a+0,2147483647);yb(0,0,0)},le:function(a){Ia=a},rd:function(a){var b=Ab();b&&(Q.qd(b,a),F&&postMessage({cmd:"exit"}))},se:function(){Q.qd(Ab(),-1);postMessage({cmd:"cancelDone"})},re:function(){for(var a in Q.Nb){var b=Q.Nb[a];b&&b.worker&&Q.zc(b.worker)}Q.Nb={};for(a=0;a>2];A()[a.Ob+100>>2]=0;R(b);R(a.Ob)}a.Ob=0;a.Hc&&a.Vb&&R(a.Vb);a.Vb=0;a.worker&&(a.worker.Gb=null)}},zc:function(a){Q.ie(function(){delete Q.Nb[a.Gb.Ob];Q.Sb.push(a);Q.Rb.splice(Q.Rb.indexOf(a),1);Q.Jc(a.Gb);a.Gb=void 0})},ie:function(a){A()[Cb>>2]=0;try{a()}finally{A()[Cb>>2]=1}},fe:function(){},te:function(){for(var a in Q.Uc)Q.Uc[a]()},Oc:function(a,b){a.onmessage=function(c){var d=c.data,e=d.cmd;a.Gb&&(Q.Dd=a.Gb.Ob);if(d.targetThread&&d.targetThread!=Ab()){var f=Q.Nb[d.Te];f?f.worker.postMessage(c.data, -d.transferList):console.error('Internal error! Worker sent a message "'+e+'" to target pthread '+d.targetThread+", but that thread no longer exists!")}else if("processQueuedMainThreadWork"===e)Db();else if("spawnThread"===e)Eb(c.data);else if("cleanupThread"===e)xb(d.thread);else if("killThread"===e){c=d.thread;if(F)throw"Internal Error! killThread() can only ever be called from main application thread!";if(!c)throw"Internal Error! Null pthread_ptr in killThread!";A()[c+12>>2]=0;c=Q.Nb[c];c.worker.terminate(); -Q.Jc(c);Q.Rb.splice(Q.Rb.indexOf(c.worker),1);c.worker.Gb=void 0}else if("cancelThread"===e){c=d.thread;if(F)throw"Internal Error! cancelThread() can only ever be called from main application thread!";if(!c)throw"Internal Error! Null pthread_ptr in cancelThread!";Q.Nb[c].worker.postMessage({cmd:"cancel"})}else if("loaded"===e)a.loaded=!0,b&&b(a),a.jc&&(a.jc(),delete a.jc);else if("print"===e)Ca("Thread "+d.threadId+": "+d.text);else if("printErr"===e)E("Thread "+d.threadId+": "+d.text);else if("alert"=== -e)alert("Thread "+d.threadId+": "+d.text);else if("exit"===e)a.Gb&&Atomics.load(C(),a.Gb.Ob+64>>2)&&Q.zc(a);else if("exitProcess"===e)try{Fb(d.returnCode)}catch(h){if(h instanceof Gb)return;throw h;}else"cancelDone"===e?Q.zc(a):"objectTransfer"!==e&&("setimmediate"===c.data.target?a.postMessage(c.data):E("worker sent an unknown command "+e));Q.Dd=void 0};a.onerror=function(c){E("pthread sent an error! "+c.filename+":"+c.lineno+": "+c.message)};a.postMessage({cmd:"load",urlOrBlob:D.mainScriptUrlOrBlob|| -_scriptDir,wasmMemory:n,wasmModule:Ga})},vd:function(){var a=za("BlinkIDImageCaptureWasmSDK.worker.js");Q.Sb.push(new Worker(a))},Jd:function(){0==Q.Sb.length&&(Q.vd(),Q.Oc(Q.Sb[0]));return Q.Sb.pop()},Ce:function(a){for(a=performance.now()+a;performance.now()>2]=60*f;A()[Pb()>>2]=Number(b!=e);c=a(c);d=a(d);c=Ua(c);d=Ua(d);e>2]=c,A()[Qb()+4>>2]=d):(A()[Qb()>>2]=d,A()[Qb()+4>>2]=c)}} -function Rb(a,b){for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a}function Sb(a){var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=Rb(a.split("/").filter(function(d){return!!d}),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a} -function Tb(a){var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b}function Ub(a){if("/"===a)return"/";a=Sb(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)} -function Vb(){if("object"===typeof crypto&&"function"===typeof crypto.getRandomValues){var a=new Uint8Array(1);return function(){crypto.getRandomValues(a);return a[0]}}return function(){H("randomDevice")}} -function Wb(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:"/";if("string"!==typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=Rb(a.split("/").filter(function(d){return!!d}),!b).join("/");return(b?"/":"")+a||"."}var Xb=[];function Yb(a,b){Xb[a]={input:[],Bb:[],$b:b};Zb(a,$b)} -var $b={open:function(a){var b=Xb[a.node.hc];if(!b)throw new T(43);a.yb=b;a.seekable=!1},close:function(a){a.yb.$b.flush(a.yb)},flush:function(a){a.yb.$b.flush(a.yb)},read:function(a,b,c,d){if(!a.yb||!a.yb.$b.fd)throw new T(60);for(var e=0,f=0;f=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.sb,a.sb=new Uint8Array(b),0=a.node.xb)return 0;a=Math.min(a.node.xb-e,d);if(8b)throw new T(28);return b},Vc:function(a,b,c){U.bd(a.node,b+c);a.node.xb=Math.max(a.node.xb,b+c)},wc:function(a,b,c,d,e,f){if(0!==b)throw new T(28);if(32768!==(a.node.mode&61440))throw new T(43); -a=a.node.sb;if(f&2||a.buffer!==t){if(0>>0)%mc.length}function hc(a,b){var c;if(c=a.tb.dc?0:2)throw new T(c,a);for(c=mc[rc(a.id,b)];c;c=c.Zb){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.tb.dc(a,b)}function ec(a,b,c,d){a=new sc(a,b,c,d);b=rc(a.parent.id,a.name);a.Zb=mc[b];return mc[b]=a} -function fc(a){return 16384===(a&61440)}var tc={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090};function uc(a,b){try{return hc(a,b),20}catch(c){}return 0}function vc(a){var b=4096;for(a=a||0;a<=b;a++)if(!kc[a])return a;throw new T(33);}function wc(a,b){xc||(xc=function(){},xc.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}}});var c=new xc,d;for(d in a)c[d]=a[d];a=c;b=vc(b);a.Kb=b;return kc[b]=a} -var dc={open:function(a){a.ub=jc[a.node.hc].ub;a.ub.open&&a.ub.open(a)},Ub:function(){throw new T(70);}};function Zb(a,b){jc[a]={ub:b}}function yc(a,b){var c="/"===b,d=!b;if(c&&ic)throw new T(10);if(!c&&!d){var e=oc(b,{dd:!1});b=e.path;e=e.node;if(e.ec)throw new T(10);if(!fc(e.mode))throw new T(54);}b={type:a,Qe:{},hd:b,Zd:[]};a=a.Pb(b);a.Pb=b;b.root=a;c?ic=a:e&&(e.ec=b,e.Pb&&e.Pb.Zd.push(b))} -function zc(a,b,c){var d=oc(a,{parent:!0}).node;a=Ub(a);if(!a||"."===a||".."===a)throw new T(28);var e=uc(d,a);if(e)throw new T(e);if(!d.tb.vc)throw new T(63);return d.tb.vc(d,a,b,c)}function Ac(a){return zc(a,16895,0)}function Bc(a,b,c){"undefined"===typeof c&&(c=b,b=438);return zc(a,b|8192,c)}function eb(a,b){if(!Wb(a))throw new T(44);var c=oc(b,{parent:!0}).node;if(!c)throw new T(44);b=Ub(b);var d=uc(c,b);if(d)throw new T(d);if(!c.tb.Ac)throw new T(63);c.tb.Ac(c,b,a)} -function Cc(a){var b=oc(a,{parent:!0}).node,c=Ub(a),d=hc(b,c);a:{try{var e=hc(b,c)}catch(f){e=f.Ab;break a}e=fc(e.mode)?31:0}if(e)throw new T(e);if(!b.tb.Fc)throw new T(63);if(d.ec)throw new T(10);try{nc.willDeletePath&&nc.willDeletePath(a)}catch(f){E("FS.trackingDelegate['willDeletePath']('"+a+"') threw an exception: "+f.message)}b.tb.Fc(b,c);b=rc(d.parent.id,d.name);if(mc[b]===d)mc[b]=d.Zb;else for(b=mc[b];b;){if(b.Zb===d){b.Zb=d.Zb;break}b=b.Zb}try{if(nc.onDeletePath)nc.onDeletePath(a)}catch(f){E("FS.trackingDelegate['onDeletePath']('"+ -a+"') threw an exception: "+f.message)}}function pc(a){a=oc(a).node;if(!a)throw new T(44);if(!a.tb.ic)throw new T(28);return Wb(qc(a.parent),a.tb.ic(a))}function Dc(a,b){a="string"===typeof a?oc(a,{rc:!0}).node:a;if(!a.tb.Eb)throw new T(63);a.tb.Eb(a,{mode:b&4095|a.mode&-4096,timestamp:Date.now()})} -function fb(a,b,c,d){if(""===a)throw new T(44);if("string"===typeof b){var e=tc[b];if("undefined"===typeof e)throw Error("Unknown file open mode: "+b);b=e}c=b&64?("undefined"===typeof c?438:c)&4095|32768:0;if("object"===typeof a)var f=a;else{a=Sb(a);try{f=oc(a,{rc:!(b&131072)}).node}catch(h){}}e=!1;if(b&64)if(f){if(b&128)throw new T(20);}else f=zc(a,c,0),e=!0;if(!f)throw new T(44);8192===(f.mode&61440)&&(b&=-513);if(b&65536&&!fc(f.mode))throw new T(54);if(!e){if(f)if(40960===(f.mode&61440))c=32;else{if(c= -fc(f.mode))c=["r","w","rw"][b&3],b&512&&(c+="w"),c="r"!==c||b&512;c=c?31:0}else c=44;if(c)throw new T(c);}if(b&512){c=f;c="string"===typeof c?oc(c,{rc:!0}).node:c;if(!c.tb.Eb)throw new T(63);if(fc(c.mode))throw new T(31);if(32768!==(c.mode&61440))throw new T(28);c.tb.Eb(c,{size:0,timestamp:Date.now()})}b&=-131713;d=wc({node:f,path:qc(f),flags:b,seekable:!0,position:0,ub:f.ub,ze:[],error:!1},d);d.ub.open&&d.ub.open(d);!D.logReadFiles||b&1||(Ec||(Ec={}),a in Ec||(Ec[a]=1,E("FS.trackingDelegate error on read file: "+ -a)));try{nc.onOpenFile&&(f=0,1!==(b&2097155)&&(f|=1),0!==(b&2097155)&&(f|=2),nc.onOpenFile(a,f))}catch(h){E("FS.trackingDelegate['onOpenFile']('"+a+"', flags) threw an exception: "+h.message)}return d}function Fc(a){if(null===a.Kb)throw new T(8);a.Kc&&(a.Kc=null);try{a.ub.close&&a.ub.close(a)}catch(b){throw b;}finally{kc[a.Kb]=null}a.Kb=null} -function Gc(a,b,c){if(null===a.Kb)throw new T(8);if(!a.seekable||!a.ub.Ub)throw new T(70);if(0!=c&&1!=c&&2!=c)throw new T(28);a.position=a.ub.Ub(a,b,c);a.ze=[]} -function Hc(a,b,c,d,e,f){if(0>d||0>e)throw new T(28);if(null===a.Kb)throw new T(8);if(0===(a.flags&2097155))throw new T(8);if(fc(a.node.mode))throw new T(31);if(!a.ub.write)throw new T(28);a.seekable&&a.flags&1024&&Gc(a,0,2);var h="undefined"!==typeof e;if(!h)e=a.position;else if(!a.seekable)throw new T(70);b=a.ub.write(a,b,c,d,e,f);h||(a.position+=b);try{if(a.path&&nc.onWriteToFile)nc.onWriteToFile(a.path)}catch(l){E("FS.trackingDelegate['onWriteToFile']('"+a.path+"') threw an exception: "+l.message)}return b} -function cb(){T||(T=function(a,b){this.node=b;this.ke=function(c){this.Ab=c};this.ke(a);this.message="FS error"},T.prototype=Error(),T.prototype.constructor=T,[44].forEach(function(a){gc[a]=new T(a);gc[a].stack=""}))}var bb;function Ic(a,b){var c=0;a&&(c|=365);b&&(c|=146);return c}function Jc(a,b){a="string"===typeof a?a:qc(a);for(b=b.split("/").reverse();b.length;){var c=b.pop();if(c){var d=Sb(a+"/"+c);try{Ac(d)}catch(e){}a=d}}return d} -function Kc(a,b,c,d){a=Sb(("string"===typeof a?a:qc(a))+"/"+b);c=Ic(c,d);return zc(a,(void 0!==c?c:438)&4095|32768,0)}function Lc(a,b,c,d,e,f){a=b?Sb(("string"===typeof a?a:qc(a))+"/"+b):a;d=Ic(d,e);e=zc(a,(void 0!==d?d:438)&4095|32768,0);if(c){if("string"===typeof c){a=Array(c.length);b=0;for(var h=c.length;bthis.length-1||0>p)){var r=p%this.Yc;return this.sc(p/this.Yc|0)[r]}};f.prototype.je=function(p){this.sc=p};f.prototype.Wc=function(){var p=new XMLHttpRequest;p.open("HEAD",c,!1);p.send(null);if(!(200<=p.status&&300>p.status||304===p.status))throw Error("Couldn't load "+c+". Status: "+p.status);var r=Number(p.getResponseHeader("Content-length")),u,k=(u=p.getResponseHeader("Accept-Ranges"))&&"bytes"===u;p= -(u=p.getResponseHeader("Content-Encoding"))&&"gzip"===u;var v=1048576;k||(v=r);var z=this;z.je(function(B){var I=B*v,J=(B+1)*v-1;J=Math.min(J,r-1);if("undefined"===typeof z.qc[B]){var na=z.qc;if(I>J)throw Error("invalid range ("+I+", "+J+") or no bytes requested!");if(J>r-1)throw Error("only "+r+" bytes available! programmer error!");var w=new XMLHttpRequest;w.open("GET",c,!1);r!==v&&w.setRequestHeader("Range","bytes="+I+"-"+J);"undefined"!=typeof Uint8Array&&(w.responseType="arraybuffer");w.overrideMimeType&& -w.overrideMimeType("text/plain; charset=x-user-defined");w.send(null);if(!(200<=w.status&&300>w.status||304===w.status))throw Error("Couldn't load "+c+". Status: "+w.status);I=void 0!==w.response?new Uint8Array(w.response||[]):ac(w.responseText||"",!0);na[B]=I}if("undefined"===typeof z.qc[B])throw Error("doXHR failed!");return z.qc[B]});if(p||!r)v=r=1,v=r=this.sc(0).length,Ca("LazyFiles on gzip forces download of the whole file when length is accessed");this.td=r;this.sd=v;this.Nc=!0};if("undefined"!== -typeof XMLHttpRequest){if(!wa)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var h=new f;Object.defineProperties(h,{length:{get:function(){this.Nc||this.Wc();return this.td}},Yc:{get:function(){this.Nc||this.Wc();return this.sd}}});var l=void 0}else l=c,h=void 0;var m=Kc(a,b,d,e);h?m.sb=h:l&&(m.sb=null,m.url=l);Object.defineProperties(m,{xb:{get:function(){return this.sb.length}}});var q={};Object.keys(m.ub).forEach(function(p){var r= -m.ub[p];q[p]=function(){Mc(m);return r.apply(null,arguments)}});q.read=function(p,r,u,k,v){Mc(m);p=p.node.sb;if(v>=p.length)return 0;k=Math.min(p.length-v,k);if(p.slice)for(var z=0;z>2]=d.Ed;A()[b+4>>2]=0;A()[b+8>>2]=d.Lc;A()[b+12>>2]=d.mode;A()[b+16>>2]=d.ae;A()[b+20>>2]=d.uid;A()[b+24>>2]=d.Nd;A()[b+28>>2]=d.hc;A()[b+32>>2]=0;sb=[d.size>>>0,(P=d.size,1<=+Math.abs(P)?0>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)];A()[b+40>>2]=sb[0];A()[b+ -44>>2]=sb[1];A()[b+48>>2]=4096;A()[b+52>>2]=d.yd;A()[b+56>>2]=d.wd.getTime()/1E3|0;A()[b+60>>2]=0;A()[b+64>>2]=d.$d.getTime()/1E3|0;A()[b+68>>2]=0;A()[b+72>>2]=d.Cd.getTime()/1E3|0;A()[b+76>>2]=0;sb=[d.Lc>>>0,(P=d.Lc,1<=+Math.abs(P)?0>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)];A()[b+80>>2]=sb[0];A()[b+84>>2]=sb[1];return 0}var Sc=void 0;function Tc(){Sc+=4;return A()[Sc-4>>2]}function Uc(a){a=kc[a];if(!a)throw new T(8);return a} -function Vc(a,b,c){if(F)return S(3,1,a,b,c);Sc=c;try{var d=Uc(a);switch(b){case 0:var e=Tc();return 0>e?-28:fb(d.path,d.flags,0,e).Kb;case 1:case 2:return 0;case 3:return d.flags;case 4:return e=Tc(),d.flags|=e,0;case 12:return e=Tc(),da()[e+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return-1;default:return-28}}catch(f){return"undefined"!==typeof V&&f instanceof T||H(f),-f.Ab}} -function Wc(a,b){if(F)return S(4,1,a,b);try{var c=Uc(a);return Rc(c.path,b)}catch(d){return"undefined"!==typeof V&&d instanceof T||H(d),-d.Ab}} -function Xc(a,b,c){if(F)return S(5,1,a,b,c);Sc=c;try{var d=Uc(a);switch(b){case 21509:case 21505:return d.yb?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return d.yb?0:-59;case 21519:if(!d.yb)return-59;var e=Tc();return A()[e>>2]=0;case 21520:return d.yb?-28:-59;case 21531:a=e=Tc();if(!d.ub.Sd)throw new T(59);return d.ub.Sd(d,b,a);case 21523:return d.yb?0:-59;case 21524:return d.yb?0:-59;default:H("bad ioctl syscall "+b)}}catch(f){return"undefined"!==typeof V&&f instanceof -T||H(f),-f.Ab}} -function Yc(a,b,c,d,e,f){if(F)return S(6,1,a,b,c,d,e,f);try{a:{f<<=12;var h=!1;if(0!==(d&16)&&0!==a%65536)var l=-28;else{if(0!==(d&32)){var m=Zc(65536,b);if(!m){l=-48;break a}$c(m,0,b);h=!0}else{var q=kc[e];if(!q){l=-8;break a}var p=f;if(0!==(c&2)&&0===(d&2)&&2!==(q.flags&2097155))throw new T(2);if(1===(q.flags&2097155))throw new T(2);if(!q.ub.wc)throw new T(43);var r=q.ub.wc(q,a,b,p,c,d);m=r.wb;h=r.Gc}Qc[m]={Yd:m,Wd:b,Gc:h,Kb:e,ce:c,flags:d,offset:f};l=m}}return l}catch(u){return"undefined"!==typeof V&& -u instanceof T||H(u),-u.Ab}}function ad(a,b){if(F)return S(7,1,a,b);try{if(-1===(a|0)||0===b)var c=-28;else{var d=Qc[a];if(d&&b===d.Wd){var e=kc[d.Kb];if(e&&d.ce&2){var f=d.flags,h=d.offset,l=x().slice(a,a+b);e&&e.ub.xc&&e.ub.xc(e,l,h,b,f)}Qc[a]=null;d.Gc&&R(d.Yd)}c=0}return c}catch(m){return"undefined"!==typeof V&&m instanceof T||H(m),-m.Ab}} -function bd(a,b,c){if(F)return S(8,1,a,b,c);Sc=c;try{var d=K(a),e=c?Tc():0;return fb(d,b,e).Kb}catch(f){return"undefined"!==typeof V&&f instanceof T||H(f),-f.Ab}}function cd(a,b){if(F)return S(9,1,a,b);try{return a=K(a),Rc(a,b)}catch(c){return"undefined"!==typeof V&&c instanceof T||H(c),-c.Ab}}var dd={};function ed(a){for(;a.length;){var b=a.pop();a.pop()(b)}}function fd(a){return this.fromWireType(C()[a>>2])}var gd={},hd={},jd={}; -function kd(a){if(void 0===a)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?"_"+a:a}function ld(a,b){a=kd(a);return(new Function("body","return function "+a+'() {\n "use strict"; return body.apply(this, arguments);\n};\n'))(b)} -function md(a){var b=Error,c=ld(a,function(d){this.name=a;this.message=d;d=Error(d).stack;void 0!==d&&(this.stack=this.toString()+"\n"+d.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(b.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message};return c}var nd=void 0;function od(a){throw new nd(a);} -function pd(a,b,c){function d(l){l=c(l);l.length!==a.length&&od("Mismatched type converter count");for(var m=0;m>2)+d]);return c} -function Zd(a){var b=Function;if(!(b instanceof Function))throw new TypeError("new_ called with constructor type "+typeof b+" which is not a function");var c=ld(b.name||"unknownFunctionName",function(){});c.prototype=b.prototype;c=new c;a=b.apply(c,a);return a instanceof Object?a:c} -function $d(a,b,c,d,e){var f=b.length;2>f&&X("argTypes array size mismatch! Must at least get return value and 'this' types!");var h=null!==b[1]&&null!==c,l=!1;for(c=1;c>2])};case 3:return function(c){return this.fromWireType(ja()[c>>3])};default:throw new TypeError("Unknown float type: "+a);}} -function de(a,b,c){switch(b){case 0:return c?function(d){return g()[d]}:function(d){return x()[d]};case 1:return c?function(d){return da()[d>>1]}:function(d){return y()[d>>1]};case 2:return c?function(d){return A()[d>>2]}:function(d){return C()[d>>2]};default:throw new TypeError("Unknown integer type: "+a);}}function ee(a){a||X("Cannot use deleted val. handle = "+a);return Z[a].value}function fe(a,b){var c=hd[a];void 0===c&&X(b+" has unknown type "+Vd(a));return c} -function ge(a,b){for(var c=Array(a),d=0;d>2)+d],"parameter "+d);return c}var he={};function ie(a){var b=he[a];return void 0===b?W(a):b}var je=[];function ke(){return"object"===typeof globalThis?globalThis:Function("return this")()}function le(a){var b=je.length;je.push(a);return b}var me={},ne=[]; -function oe(){wa||(Da||(Da={}),Da["Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread"]||(Da["Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread"]=1,E("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread")))} -function pe(a,b,c){if(0>=a||a>g().length||a&1)return-28;if(va){if(Atomics.load(A(),a>>2)!=b)return-6;var d=performance.now();c=d+c;for(Atomics.exchange(A(),wb>>2,a);;){d=performance.now();if(d>c)return Atomics.exchange(A(),wb>>2,0),-73;d=Atomics.exchange(A(),wb>>2,0);if(0==d)break;Db();if(Atomics.load(A(),a>>2)!=b)return-6;Atomics.exchange(A(),wb>>2,a)}return 0}a=Atomics.wait(A(),a>>2,b,c);if("timed-out"===a)return-73;if("not-equal"===a)return-6;if("ok"===a)return 0;throw"Atomics.wait returned an unexpected value "+ -a;}function S(a,b){for(var c=arguments.length-2,d=qe(),e=re(8*c),f=e>>3,h=0;h>2]=b,A()[d.pc+4>>2]=c);if(d.jd||!d.Ee)d.jd&&(d=d.jd),a=!1,d.nc&&d.nc.mc&&(a=d.nc.mc.getParameter(2978),a=0===a[0]&&0===a[1]&&a[2]===d.width&&a[3]===d.height),d.width=b,d.height=c,a&&d.nc.mc.viewport(0,0,b,c);else{if(d.pc){d=A()[d.pc+8>>2];a=a?K(a):"";var e=qe(),f=re(12),h=0;if(a){h=Na(a)+1;var l=L(h);Ma(a,l,h);h=l}A()[f>>2]=h;A()[f+4>>2]=b;A()[f+8>>2]=c;xe(0,d,657457152,0,h,f);Ib(e);return 1}return-4}return 0} -function ye(a,b,c){return F?S(10,1,a,b,c):we(a,b,c)}var ze=[];function Ae(a,b){C()[a>>2]=b;C()[a+4>>2]=b/4294967296|0}function Be(a,b){try{var c=indexedDB.open("emscripten_filesystem",1)}catch(d){b(d);return}c.onupgradeneeded=function(d){d=d.target.result;d.objectStoreNames.contains("FILES")&&d.deleteObjectStore("FILES");d.createObjectStore("FILES")};c.onsuccess=function(d){a(d.target.result)};c.onerror=function(d){b(d)}}var Ce; -function De(a,b,c,d,e){function f(M){var N=0,G=0;M&&(G=w.response?w.response.byteLength:0,N=L(G),x().set(new Uint8Array(w.response),N));C()[a+12>>2]=N;Ae(a+16,G)}var h=C()[a+8>>2];if(h){var l=K(h),m=a+112,q=K(m);q||(q="GET");C();var p=C()[m+52>>2],r=C()[m+56>>2],u=!!C()[m+60>>2];C();var k=C()[m+68>>2],v=C()[m+72>>2],z=C()[m+76>>2],B=C()[m+80>>2];h=C()[m+84>>2];m=C()[m+88>>2];var I=!!(p&1),J=!!(p&2);p=!!(p&64);k=k?K(k):void 0;v=v?K(v):void 0;var na=B?K(B):void 0,w=new XMLHttpRequest;w.withCredentials= -u;w.open(q,l,!p,k,v);p||(w.timeout=r);w.Ve=l;w.responseType="arraybuffer";B&&w.overrideMimeType(na);if(z)for(;;){q=C()[z>>2];if(!q)break;l=C()[z+4>>2];if(!l)break;z+=8;q=K(q);l=K(l);w.setRequestHeader(q,l)}ze.push(w);z=ze.length;C()[a+0>>2]=z;h=h&&m?x().slice(h,h+m):null;w.onload=function(M){f(I&&!J);var N=w.response?w.response.byteLength:0;Ae(a+24,0);N&&Ae(a+32,N);y()[a+40>>1]=w.readyState;y()[a+42>>1]=w.status;w.statusText&&Ma(w.statusText,a+44,64);200<=w.status&&300>w.status?b&&b(a,w,M):c&&c(a, -w,M)};w.onerror=function(M){f(I);var N=w.status;Ae(a+24,0);Ae(a+32,w.response?w.response.byteLength:0);y()[a+40>>1]=w.readyState;y()[a+42>>1]=N;c&&c(a,w,M)};w.ontimeout=function(M){c&&c(a,w,M)};w.onprogress=function(M){var N=I&&J&&w.response?w.response.byteLength:0,G=0;I&&J&&(G=L(N),x().set(new Uint8Array(w.response),G));C()[a+12>>2]=G;Ae(a+16,N);Ae(a+24,M.loaded-N);Ae(a+32,M.total);y()[a+40>>1]=w.readyState;3<=w.readyState&&0===w.status&&0>1]=w.status;w.statusText&& -Ma(w.statusText,a+44,64);d&&d(a,w,M);G&&R(G)};w.onreadystatechange=function(M){y()[a+40>>1]=w.readyState;2<=w.readyState&&(y()[a+42>>1]=w.status);e&&e(a,w,M)};try{w.send(h)}catch(M){c&&c(a,w,M)}}else c(a,0,"no url specified!")} -function Ee(a,b){if(!Ha)if(b)a();else{try{a()}catch(c){if(c instanceof Gb)return;if("unwind"!==c)throw c&&"object"===typeof c&&c.stack&&E("exception thrown: "+[c,c.stack]),c;}if(F&&!Kb())try{if(F)throw a=Ia,F?Q.rd(a):Fb(a),xa&&process.Ge(a),"unwind";Fb(Ia)}catch(c){if(!(c instanceof Gb))throw c;}}} -function Fe(a,b,c,d){var e=Ce;if(e){var f=a+112;(f=C()[f+64>>2])||(f=C()[a+8>>2]);var h=K(f);try{var l=e.transaction(["FILES"],"readwrite").objectStore("FILES").put(b,h);l.onsuccess=function(){y()[a+40>>1]=4;y()[a+42>>1]=200;Ma("OK",a+44,64);c(a,0,h)};l.onerror=function(m){y()[a+40>>1]=4;y()[a+42>>1]=413;Ma("Payload Too Large",a+44,64);d(a,0,m)}}catch(m){d(a,0,m)}}else d(a,0,"IndexedDB not available!")} -function Ge(a,b,c){var d=Ce;if(d){var e=a+112;(e=C()[e+64>>2])||(e=C()[a+8>>2]);e=K(e);try{var f=d.transaction(["FILES"],"readonly").objectStore("FILES").get(e);f.onsuccess=function(h){if(h.target.result){h=h.target.result;var l=h.byteLength||h.length,m=L(l);x().set(new Uint8Array(h),m);C()[a+12>>2]=m;Ae(a+16,l);Ae(a+24,0);Ae(a+32,l);y()[a+40>>1]=4;y()[a+42>>1]=200;Ma("OK",a+44,64);b(a,0,h)}else y()[a+40>>1]=4,y()[a+42>>1]=404,Ma("Not Found",a+44,64),c(a,0,"no data")};f.onerror=function(h){y()[a+ -40>>1]=4;y()[a+42>>1]=404;Ma("Not Found",a+44,64);c(a,0,h)}}catch(h){c(a,0,h)}}else c(a,0,"IndexedDB not available!")} -function He(a,b,c){var d=Ce;if(d){var e=a+112;(e=C()[e+64>>2])||(e=C()[a+8>>2]);e=K(e);try{var f=d.transaction(["FILES"],"readwrite").objectStore("FILES").delete(e);f.onsuccess=function(h){h=h.target.result;C()[a+12>>2]=0;Ae(a+16,0);Ae(a+24,0);Ae(a+32,0);y()[a+40>>1]=4;y()[a+42>>1]=200;Ma("OK",a+44,64);b(a,0,h)};f.onerror=function(h){y()[a+40>>1]=4;y()[a+42>>1]=404;Ma("Not Found",a+44,64);c(a,0,h)}}catch(h){c(a,0,h)}}else c(a,0,"IndexedDB not available!")} -function Ie(a){var b=a.getExtension("ANGLE_instanced_arrays");b&&(a.vertexAttribDivisor=function(c,d){b.vertexAttribDivisorANGLE(c,d)},a.drawArraysInstanced=function(c,d,e,f){b.drawArraysInstancedANGLE(c,d,e,f)},a.drawElementsInstanced=function(c,d,e,f,h){b.drawElementsInstancedANGLE(c,d,e,f,h)})} -function Je(a){var b=a.getExtension("OES_vertex_array_object");b&&(a.createVertexArray=function(){return b.createVertexArrayOES()},a.deleteVertexArray=function(c){b.deleteVertexArrayOES(c)},a.bindVertexArray=function(c){b.bindVertexArrayOES(c)},a.isVertexArray=function(c){return b.isVertexArrayOES(c)})}function Ke(a){var b=a.getExtension("WEBGL_draw_buffers");b&&(a.drawBuffers=function(c,d){b.drawBuffersWEBGL(c,d)})} -function Le(a,b){a.ed||(a.ed=a.getContext,a.getContext=function(d,e){e=a.ed(d,e);return"webgl"==d==e instanceof WebGLRenderingContext?e:null});var c=a.getContext("webgl",b);return c?Me(c,b):0}function Me(a,b){var c=L(8);A()[c+4>>2]=Ab();var d={Ke:c,attributes:b,version:b.Xd,mc:a};a.canvas&&(a.canvas.nc=d);("undefined"===typeof b.ad||b.ad)&&Ne(d);return c} -function Ne(a){a||(a=Oe);if(!a.Pd){a.Pd=!0;var b=a.mc;Ie(b);Je(b);Ke(b);b.Fe=b.getExtension("EXT_disjoint_timer_query");b.Oe=b.getExtension("WEBGL_multi_draw");(b.getSupportedExtensions()||[]).forEach(function(c){c.includes("lose_context")||c.includes("debug")||b.getExtension(c)})}}var Oe,Pe=["default","low-power","high-performance"],Qe={}; -function Re(){if(!Se){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"===typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ta||"./this.program"},b;for(b in Qe)a[b]=Qe[b];var c=[];for(b in a)c.push(b+"="+a[b]);Se=c}return Se}var Se; -function Te(a,b){if(F)return S(11,1,a,b);try{var c=0;Re().forEach(function(d,e){var f=b+c;e=A()[a+4*e>>2]=f;for(f=0;f>0]=d.charCodeAt(f);g()[e>>0]=0;c+=d.length+1});return 0}catch(d){return"undefined"!==typeof V&&d instanceof T||H(d),d.Ab}}function Ue(a,b){if(F)return S(12,1,a,b);try{var c=Re();A()[a>>2]=c.length;var d=0;c.forEach(function(e){d+=e.length+1});A()[b>>2]=d;return 0}catch(e){return"undefined"!==typeof V&&e instanceof T||H(e),e.Ab}} -function Ve(a){if(F)return S(13,1,a);try{var b=Uc(a);Fc(b);return 0}catch(c){return"undefined"!==typeof V&&c instanceof T||H(c),c.Ab}}function We(a,b){if(F)return S(14,1,a,b);try{var c=Uc(a),d=c.yb?2:fc(c.mode)?3:40960===(c.mode&61440)?7:4;g()[b>>0]=d;return 0}catch(e){return"undefined"!==typeof V&&e instanceof T||H(e),e.Ab}} -function Xe(a,b,c,d){if(F)return S(15,1,a,b,c,d);try{a:{for(var e=Uc(a),f=a=0;f>2],l=A()[b+(8*f+4)>>2],m=e,q=g(),p=h,r=l,u=void 0;if(0>r||0>u)throw new T(28);if(null===m.Kb)throw new T(8);if(1===(m.flags&2097155))throw new T(8);if(fc(m.node.mode))throw new T(31);if(!m.ub.read)throw new T(28);var k="undefined"!==typeof u;if(!k)u=m.position;else if(!m.seekable)throw new T(70);var v=m.ub.read(m,q,p,r,u);k||(m.position+=v);var z=v;if(0>z){var B=-1;break a}a+=z;if(z> -2]=B;return 0}catch(I){return"undefined"!==typeof V&&I instanceof T||H(I),I.Ab}} -function Ye(a,b,c,d,e){if(F)return S(16,1,a,b,c,d,e);try{var f=Uc(a);a=4294967296*c+(b>>>0);if(-9007199254740992>=a||9007199254740992<=a)return-61;Gc(f,a,d);sb=[f.position>>>0,(P=f.position,1<=+Math.abs(P)?0>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)];A()[e>>2]=sb[0];A()[e+4>>2]=sb[1];f.Kc&&0===a&&0===d&&(f.Kc=null);return 0}catch(h){return"undefined"!==typeof V&&h instanceof T||H(h),h.Ab}} -function Ze(a,b,c,d){if(F)return S(17,1,a,b,c,d);try{a:{for(var e=Uc(a),f=a=0;f>2],l=A()[b+(8*f+4)>>2],m=Hc(e,g(),h,l,void 0);if(0>m){var q=-1;break a}a+=m}q=a}A()[d>>2]=q;return 0}catch(p){return"undefined"!==typeof V&&p instanceof T||H(p),p.Ab}}function $e(a,b){$e.ld||($e.ld=Vb());for(var c=0;c>0]=$e.ld();return 0} -function Eb(a){if(F)throw"Internal Error! spawnThread() can only ever be called from main application thread!";var b=Q.Jd();if(!b)return 6;if(void 0!==b.Gb)throw"Internal error!";if(!a.yc)throw"Internal error, no pthread ptr!";Q.Rb.push(b);for(var c=L(512),d=0;128>d;++d)A()[c+4*d>>2]=0;var e=a.Vb+a.ac;d=Q.Nb[a.yc]={worker:b,Vb:a.Vb,ac:a.ac,Hc:a.Hc,Ob:a.yc};var f=d.Ob>>2;Atomics.store(C(),f+16,a.$c);Atomics.store(C(),f+25,c);Atomics.store(C(),f+10,d.Ob);Atomics.store(C(),f+20,a.ac);Atomics.store(C(), -f+19,e);Atomics.store(C(),f+26,a.ac);Atomics.store(C(),f+28,e);Atomics.store(C(),f+29,a.$c);c=af()+40;Atomics.store(C(),f+43,c);b.Gb=d;var h={cmd:"run",start_routine:a.qe,arg:a.cc,threadInfoStruct:a.yc,stackBase:a.Vb,stackSize:a.ac};b.jc=function(){h.time=performance.now();b.postMessage(h,a.ye)};b.loaded&&(b.jc(),delete b.jc);return 0} -function bf(a,b){if(!a)return E("pthread_join attempted on a null thread pointer!"),71;if(F&&Ab()==a)return E("PThread "+a+" is attempting to join to itself!"),16;if(!F&&cf()==a)return E("Main thread "+a+" is attempting to join to itself!"),16;if(A()[a+12>>2]!==a)return E("pthread_join attempted on thread "+a+", which does not point to a valid thread, or does not exist anymore!"),71;if(Atomics.load(C(),a+64>>2))return E("Attempted to join thread "+a+", which was already detached!"),28;for(oe();;){var c= -Atomics.load(C(),a+0>>2);if(1==c)return c=Atomics.load(C(),a+4>>2),b&&(A()[b>>2]=c),Atomics.store(C(),a+64>>2,1),F?postMessage({cmd:"cleanupThread",thread:a}):xb(a),0;if(F){var d=Ab();if(d&&!Atomics.load(C(),d+56>>2)&&2==Atomics.load(C(),d+0>>2))throw"Canceled!";}F||Db();pe(a+0,c,F?100:1)}}function df(a){return 0===a%4&&(0!==a%100||0===a%400)}function ef(a,b){for(var c=0,d=0;d<=b;c+=a[d++]);return c}var ff=[31,29,31,30,31,30,31,31,30,31,30,31],gf=[31,28,31,30,31,30,31,31,30,31,30,31]; -function hf(a,b){for(a=new Date(a.getTime());0d-a.getDate())b-=d-a.getDate()+1,a.setDate(1),11>c?a.setMonth(c+1):(a.setMonth(0),a.setFullYear(a.getFullYear()+1));else{a.setDate(a.getDate()+b);break}}return a} -function jf(a,b,c,d){function e(k,v,z){for(k="number"===typeof k?k.toString():k||"";k.lengthI?-1:0=h(z,k)?0>=h(v,k)?k.getFullYear()+1:k.getFullYear():k.getFullYear()-1}var q=A()[d+40>>2];d={we:A()[d>>2],ve:A()[d+4>>2],Cc:A()[d+8>>2],kc:A()[d+12>>2],bc:A()[d+16>>2],Db:A()[d+20>>2],Dc:A()[d+24>>2],Ec:A()[d+28>>2],Ue:A()[d+ -32>>2],ue:A()[d+36>>2],xe:q?K(q):""};c=K(c);q={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var p in q)c=c.replace(new RegExp(p,"g"),q[p]);var r="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), -u="January February March April May June July August September October November December".split(" ");q={"%a":function(k){return r[k.Dc].substring(0,3)},"%A":function(k){return r[k.Dc]},"%b":function(k){return u[k.bc].substring(0,3)},"%B":function(k){return u[k.bc]},"%C":function(k){return f((k.Db+1900)/100|0,2)},"%d":function(k){return f(k.kc,2)},"%e":function(k){return e(k.kc,2," ")},"%g":function(k){return m(k).toString().substring(2)},"%G":function(k){return m(k)},"%H":function(k){return f(k.Cc, -2)},"%I":function(k){k=k.Cc;0==k?k=12:12k.Cc?"AM":"PM"},"%S":function(k){return f(k.we,2)},"%t":function(){return"\t"},"%u":function(k){return k.Dc||7},"%U":function(k){var v=new Date(k.Db+1900,0,1),z=0===v.getDay()?v:hf(v,7-v.getDay());k=new Date(k.Db+1900,k.bc,k.kc);return 0> -h(z,k)?f(Math.ceil((31-z.getDate()+(ef(df(k.getFullYear())?ff:gf,k.getMonth()-1)-31)+k.getDate())/7),2):0===h(z,v)?"01":"00"},"%V":function(k){var v=new Date(k.Db+1901,0,4),z=l(new Date(k.Db+1900,0,4));v=l(v);var B=hf(new Date(k.Db+1900,0,1),k.Ec);return 0>h(B,z)?"53":0>=h(v,B)?"01":f(Math.ceil((z.getFullYear()h(z,k)?f(Math.ceil((31-z.getDate()+(ef(df(k.getFullYear())?ff:gf,k.getMonth()-1)-31)+k.getDate())/7),2):0===h(z,v)?"01":"00"},"%y":function(k){return(k.Db+1900).toString().substring(2)},"%Y":function(k){return k.Db+1900},"%z":function(k){k=k.ue;var v=0<=k;k=Math.abs(k)/60;return(v?"+":"-")+String("0000"+(k/60*100+k%60)).slice(-4)},"%Z":function(k){return k.xe},"%%":function(){return"%"}};for(p in q)c.includes(p)&&(c=c.replace(new RegExp(p,"g"),q[p](d)));p=ac(c, -!1);if(p.length>b)return 0;Va(p,a);return p.length-1}function sc(a,b,c,d){a||(a=this);this.parent=a;this.Pb=a.Pb;this.ec=null;this.id=lc++;this.name=b;this.mode=c;this.tb={};this.ub={};this.hc=d} -Object.defineProperties(sc.prototype,{read:{get:function(){return 365===(this.mode&365)},set:function(a){a?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(a){a?this.mode|=146:this.mode&=-147}},Ud:{get:function(){return fc(this.mode)}},Td:{get:function(){return 8192===(this.mode&61440)}}});cb();mc=Array(4096);yc(U,"/");Ac("/tmp");Ac("/home");Ac("/home/web_user"); -(function(){Ac("/dev");Zb(259,{read:function(){return 0},write:function(b,c,d,e){return e}});Bc("/dev/null",259);Yb(1280,bc);Yb(1536,cc);Bc("/dev/tty",1280);Bc("/dev/tty1",1536);var a=Vb();db("/dev","random",a);db("/dev","urandom",a);Ac("/dev/shm");Ac("/dev/shm/tmp")})(); -(function(){Ac("/proc");var a=Ac("/proc/self");Ac("/proc/self/fd");yc({Pb:function(){var b=ec(a,"fd",16895,73);b.tb={dc:function(c,d){var e=kc[+d];if(!e)throw new T(8);c={parent:null,Pb:{hd:"fake"},tb:{ic:function(){return e.path}}};return c.parent=c}};return b}},"/proc/self/fd")})();var Pc;D.FS_createPath=Jc;D.FS_createDataFile=Lc;D.FS_createPreloadedFile=Oc;D.FS_createLazyFile=Nc;D.FS_createDevice=db;D.FS_unlink=Cc;nd=D.InternalError=md("InternalError"); -for(var kf=Array(256),lf=0;256>lf;++lf)kf[lf]=String.fromCharCode(lf);sd=kf;td=D.BindingError=md("BindingError");Cd.prototype.isAliasOf=function(a){if(!(this instanceof Cd&&a instanceof Cd))return!1;var b=this.rb.zb.vb,c=this.rb.wb,d=a.rb.zb.vb;for(a=a.rb.wb;b.Ib;)c=b.lc(c),b=b.Ib;for(;d.Ib;)a=d.lc(a),d=d.Ib;return b===d&&c===a}; -Cd.prototype.clone=function(){this.rb.wb||ud(this);if(this.rb.fc)return this.rb.count.value+=1,this;var a=yd,b=Object,c=b.create,d=Object.getPrototypeOf(this),e=this.rb;a=a(c.call(b,d,{rb:{value:{count:e.count,Xb:e.Xb,fc:e.fc,wb:e.wb,zb:e.zb,Fb:e.Fb,Hb:e.Hb}}}));a.rb.count.value+=1;a.rb.Xb=!1;return a};Cd.prototype["delete"]=function(){this.rb.wb||ud(this);this.rb.Xb&&!this.rb.fc&&X("Object already scheduled for deletion");wd(this);xd(this.rb);this.rb.fc||(this.rb.Fb=void 0,this.rb.wb=void 0)}; -Cd.prototype.isDeleted=function(){return!this.rb.wb};Cd.prototype.deleteLater=function(){this.rb.wb||ud(this);this.rb.Xb&&!this.rb.fc&&X("Object already scheduled for deletion");Ad.push(this);1===Ad.length&&zd&&zd(Bd);this.rb.Xb=!0;return this};Qd.prototype.Kd=function(a){this.md&&(a=this.md(a));return a};Qd.prototype.Zc=function(a){this.Qb&&this.Qb(a)};Qd.prototype.argPackAdvance=8;Qd.prototype.readValueFromPointer=fd;Qd.prototype.deleteObject=function(a){if(null!==a)a["delete"]()}; -Qd.prototype.fromWireType=function(a){function b(){return this.uc?Pd(this.vb.Yb,{zb:this.be,wb:c,Hb:this,Fb:a}):Pd(this.vb.Yb,{zb:this,wb:a})}var c=this.Kd(a);if(!c)return this.Zc(a),null;var d=Od(this.vb,c);if(void 0!==d){if(0===d.rb.count.value)return d.rb.wb=c,d.rb.Fb=a,d.clone();d=d.clone();this.Zc(a);return d}d=this.vb.Id(c);d=Dd[d];if(!d)return b.call(this);d=this.tc?d.Bd:d.pointerType;var e=Md(c,this.vb,d.vb);return null===e?b.call(this):this.uc?Pd(d.vb.Yb,{zb:d,wb:e,Hb:this,Fb:a}):Pd(d.vb.Yb, -{zb:d,wb:e})};D.getInheritedInstanceCount=function(){return Object.keys(Nd).length};D.getLiveInheritedInstances=function(){var a=[],b;for(b in Nd)Nd.hasOwnProperty(b)&&a.push(Nd[b]);return a};D.flushPendingDeletes=Bd;D.setDelayFunction=function(a){zd=a;Ad.length&&zd&&zd(Bd)};Ud=D.UnboundTypeError=md("UnboundTypeError");D.count_emval_handles=function(){for(var a=0,b=5;b>2]);A()[b>>2]=a.getSeconds();A()[b+4>>2]=a.getMinutes();A()[b+8>>2]=a.getHours();A()[b+12>>2]=a.getDate();A()[b+16>>2]=a.getMonth();A()[b+20>>2]=a.getFullYear()-1900;A()[b+24>>2]=a.getDay();var c=new Date(a.getFullYear(),0,1),d=(a.getTime()-c.getTime())/864E5|0;A()[b+28>>2]=d;A()[b+36>>2]=-(60*a.getTimezoneOffset()); -d=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();c=c.getTimezoneOffset();a=(d!=c&&a.getTimezoneOffset()==Math.min(c,d))|0;A()[b+32>>2]=a;a=A()[Qb()+(a?4:0)>>2];A()[b+40>>2]=a;return b},O:Vc,oa:Wc,ma:Xc,ra:Yc,qa:function(){return 0},pa:ad,P:bd,na:cd,e:function(a){var b=dd[a];delete dd[a];var c=b.Qc,d=b.Qb,e=b.cd,f=e.map(function(h){return h.Md}).concat(e.map(function(h){return h.ne}));pd([a],f,function(h){var l={};e.forEach(function(m,q){var p=h[q],r=m.sc,u=m.Ld,k=h[q+e.length],v=m.me,z=m.oe; -l[m.Hd]={read:function(B){return p.fromWireType(r(u,B))},write:function(B,I){var J=[];v(z,B,k.toWireType(J,I));ed(J)}}});return[{name:b.name,fromWireType:function(m){var q={},p;for(p in l)q[p]=l[p].read(m);d(m);return q},toWireType:function(m,q){for(var p in l)if(!(p in q))throw new TypeError('Missing field: "'+p+'"');var r=c();for(p in l)l[p].write(r,q[p]);null!==m&&m.push(d,r);return r},argPackAdvance:8,readValueFromPointer:fd,Jb:d}]})},Y:function(){},ta:function(a,b,c,d,e){var f=rd(c);b=W(b); -qd(a,{name:b,fromWireType:function(h){return!!h},toWireType:function(h,l){return l?d:e},argPackAdvance:8,readValueFromPointer:function(h){if(1===c)var l=g();else if(2===c)l=da();else if(4===c)l=A();else throw new TypeError("Unknown boolean type size: "+b);return this.fromWireType(l[h>>f])},Jb:null})},B:function(a,b,c,d,e,f,h,l,m,q,p,r,u){p=W(p);f=Td(e,f);l&&(l=Td(h,l));q&&(q=Td(m,q));u=Td(r,u);var k=kd(p);Fd(k,function(){Xd("Cannot construct "+p+" due to unbound types",[d])});pd([a,b,c],d?[d]:[], -function(v){v=v[0];if(d){var z=v.vb;var B=z.Yb}else B=Cd.prototype;v=ld(k,function(){if(Object.getPrototypeOf(this)!==I)throw new td("Use 'new' to construct "+p);if(void 0===J.Tb)throw new td(p+" has no accessible constructor");var w=J.Tb[arguments.length];if(void 0===w)throw new td("Tried to invoke ctor of "+p+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(J.Tb).toString()+") parameters instead!");return w.apply(this,arguments)});var I=Object.create(B,{constructor:{value:v}}); -v.prototype=I;var J=new Gd(p,v,I,u,z,f,l,q);z=new Qd(p,J,!0,!1);B=new Qd(p+"*",J,!1,!1);var na=new Qd(p+" const*",J,!1,!0);Dd[a]={pointerType:B,Bd:na};Rd(k,v);return[z,B,na]})},V:function(a,b,c,d,e,f){Ja(0>>l}}var m=b.includes("unsigned");qd(a,{name:b,fromWireType:f,toWireType:function(q,p){if("number"!==typeof p&&"boolean"!==typeof p)throw new TypeError('Cannot convert "'+Jd(p)+'" to '+this.name);if(pe)throw new TypeError('Passing a number "'+Jd(p)+'" from JS side to C/C++ side to an argument of type "'+b+'", which is outside the valid range ['+d+", "+e+"]!"); -return m?p>>>0:p|0},argPackAdvance:8,readValueFromPointer:de(b,h,0!==d),Jb:null})},g:function(a,b,c){function d(f){f>>=2;var h=C();return new e(t,h[f+1],h[f])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=W(c);qd(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d},{Od:!0})},R:function(a,b){b=W(b);var c="std::string"===b;qd(a,{name:b,fromWireType:function(d){var e=C()[d>>2];if(c)for(var f=d+4,h=0;h<=e;++h){var l=d+4+h;if(h== -e||0==x()[l]){f=K(f,l-f);if(void 0===m)var m=f;else m+=String.fromCharCode(0),m+=f;f=l+1}}else{m=Array(e);for(h=0;h>2]= -h;if(c&&f)Ma(e,l+4,h+1);else if(f)for(f=0;f> -2],p=h(),r,u=m+4,k=0;k<=q;++k){var v=m+4+k*b;if(k==q||0==p[v>>l])u=d(u,v-u),void 0===r?r=u:(r+=String.fromCharCode(0),r+=u),u=v+b}R(m);return r},toWireType:function(m,q){"string"!==typeof q&&X("Cannot pass non-string to C++ string type "+c);var p=f(q),r=L(4+p+b);C()[r>>2]=p>>l;e(q,r+4,p+b);null!==m&&m.push(R,r);return r},argPackAdvance:8,readValueFromPointer:fd,Jb:function(m){R(m)}})},f:function(a,b,c,d,e,f){dd[a]={name:W(b),Qc:Td(c,d),Qb:Td(e,f),cd:[]}},b:function(a,b,c,d,e,f,h,l,m,q){dd[a].cd.push({Hd:W(b), -Md:c,sc:Td(d,e),Ld:f,ne:h,me:Td(l,m),oe:q})},ua:function(a,b){b=W(b);qd(a,{Vd:!0,name:b,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},va:function(a){delete ze[a-1]},la:function(a,b){if(a==b)postMessage({cmd:"processQueuedMainThreadWork"});else if(F)postMessage({targetThread:a,cmd:"processThreadQueue"});else{a=(a=Q.Nb[a])&&a.worker;if(!a)return;a.postMessage({cmd:"processThreadQueue"})}return 1},m:function(a,b,c){a=ee(a);b=fe(b,"emval::as");var d=[],e=Y(d);A()[c>>2]=e;return b.toWireType(d, -a)},Fa:function(a,b,c,d){a=ee(a);c=ge(b,c);for(var e=Array(b),f=0;f>> 2) + "+f+'], "parameter '+f+'");\nvar arg'+f+" = argType"+f+".readValueFromPointer(args);\nargs += argType"+ -f+"['argPackAdvance'];\n";e=(new Function("requireRegisteredType","Module","__emval_register",h+("var obj = new constructor("+e+");\nreturn __emval_register(obj);\n}\n")))(fe,D,Y);me[b]=e}return e(a,c,d)},Ba:function(){return Y([])},Ja:function(a){return Y(ie(a))},Da:function(){return Y({})},Ia:function(a){ed(Z[a].value);be(a)},v:function(a,b,c){a=ee(a);b=ee(b);c=ee(c);a[b]=c},p:function(a,b){a=fe(a,"_emval_take_value");a=a.readValueFromPointer(b);return Y(a)},Ha:function(a){a=ee(a);return Y(typeof a)}, -l:function(){H()},t:function(){var a=D.allowedThreads;return a?a:navigator.hardwareConcurrency},H:function(a,b){if(0===a)a=Date.now();else if(1===a||4===a)a=Lb();else return-1;A()[b>>2]=a/1E3|0;A()[b+4>>2]=a%1E3*1E6|0;return 0},k:function(a,b,c){ne.length=0;var d;for(c>>=2;d=x()[b++];)(d=105>d)&&c&1&&c++,ne.push(d?ja()[c++>>1]:A()[c]),++c;return ub[a].apply(null,ne)},ha:oe,L:function(){},q:pe,n:vb,u:Lb,C:function(){return"undefined"!==typeof SharedArrayBuffer},F:function(a,b){nf(a,b||1);throw"longjmp"; -},$:function(a,b,c){x().copyWithin(a,b,b+c)},ia:function(a,b,c){te.length=b;c>>=3;for(var d=0;da?ub[-a-1]:mf[a]).apply(null,te)},aa:function(a){var b=x().length;a>>>=0;if(a<=b||838860800=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);d=Math.max(a,d);0>>16);aa(n.buffer);var e=1;break a}catch(f){}e=void 0}if(e)return!0}return!1},ja:function(a,b,c){return ve(a)? -we(a,b,c):ye(a,b,c)},K:function(){},wa:function(a,b,c,d,e){function f(G){De(G,h,q,p,m)}function h(G,rf){Fe(G,rf.response,function(ib){--Jb;Ee(function(){v?O.get(v)(ib):b&&b(ib)},N)},function(ib){--Jb;Ee(function(){v?O.get(v)(ib):b&&b(ib)},N)})}function l(G){De(G,r,q,p,m)}function m(G){Ee(function(){I?O.get(I)(G):e&&e(G)},N)}function q(G){--Jb;Ee(function(){z?O.get(z)(G):c&&c(G)},N)}function p(G){Ee(function(){B?O.get(B)(G):d&&d(G)},N)}function r(G){--Jb;Ee(function(){v?O.get(v)(G):b&&b(G)},N)}Jb+= -1;var u=a+112,k=K(u),v=C()[u+36>>2],z=C()[u+40>>2],B=C()[u+44>>2],I=C()[u+48>>2],J=C()[u+52>>2],na=!!(J&4),w=!!(J&32),M=!!(J&16),N=!!(J&64);if("EM_IDB_STORE"===k)k=C()[u+84>>2],Fe(a,x().slice(k,k+C()[u+88>>2]),r,q);else if("EM_IDB_DELETE"===k)He(a,r,q);else if(M){if(w)return 0;De(a,na?h:r,q,p,m)}else Ge(a,r,w?q:na?f:l);return a},ka:function(a,b){b>>=2;var c=A()[b+6];b={alpha:!!A()[b+0],depth:!!A()[b+1],stencil:!!A()[b+2],antialias:!!A()[b+3],premultipliedAlpha:!!A()[b+4],preserveDrawingBuffer:!!A()[b+ -5],powerPreference:Pe[c],failIfMajorPerformanceCaveat:!!A()[b+7],Xd:A()[b+8],Ne:A()[b+9],ad:A()[b+10],Gd:A()[b+11],Re:A()[b+12],Se:A()[b+13]};a=ve(a);return!a||b.Gd?0:Le(a,b)},ea:Te,fa:Ue,y:function(a){Fb(a)},w:Ve,da:We,N:Xe,X:Ye,M:Ze,d:function(){return Ea},Aa:function(){var a=self.navigator.userAgent,b=Na(a)+1,c=L(b);Ma(a,c,b);return c},ba:$e,_:function(){Q.Qd()},Z:of,E:pf,D:qf,a:n||D.wasmMemory,za:function(a){Nb();var b=new Date(A()[a+20>>2]+1900,A()[a+16>>2],A()[a+12>>2],A()[a+8>>2],A()[a+4>> -2],A()[a>>2],0),c=A()[a+32>>2],d=b.getTimezoneOffset(),e=new Date(b.getFullYear(),0,1),f=(new Date(b.getFullYear(),6,1)).getTimezoneOffset(),h=e.getTimezoneOffset(),l=Math.min(h,f);0>c?A()[a+32>>2]=Number(f!=h&&l==d):0>2]=b.getDay();c=(b.getTime()-e.getTime())/864E5|0;A()[a+28>>2]=c;A()[a>>2]=b.getSeconds();A()[a+4>>2]=b.getMinutes();A()[a+8>>2]=b.getHours();A()[a+12>>2]=b.getDate();A()[a+16>>2]=b.getMonth();return b.getTime()/ -1E3|0},I:function(a){var b=Q.Bc.pop();a&&b()},J:Mb,S:function(a,b,c,d){if("undefined"===typeof SharedArrayBuffer)return E("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;if(!a)return E("pthread_create called with a null thread pointer!"),28;var e=[];if(F&&0===e.length)return sf(687865856,a,b,c,d);var f=0,h=0;if(b&&-1!=b){var l=A()[b>>2];l+=81920;f=A()[b+8>>2];h=0!==A()[b+12>>2]}else l=2097152;(b=0==f)?f=Zc(16,l):(f-=l,Ja(0q;++q)C()[(m>> -2)+q]=0;A()[a>>2]=m;A()[m+12>>2]=m;a=m+152;A()[a>>2]=a;c={Vb:f,ac:l,Hc:b,$c:h,qe:c,yc:m,cc:d,ye:e};return F?(c.De="spawnThread",postMessage(c,e),0):Eb(c)},ya:function(a,b){return bf(a,b)},c:function(a){Ea=a},T:jf,ca:function(a,b,c,d){return jf(a,b,c,d)},U:function(a){var b=Date.now()/1E3|0;a&&(A()[a>>2]=b);return b}}; -(function(){function a(e,f){D.asm=e.exports;O=D.asm.Pa;Za.unshift(D.asm.Ka);Q.Uc.push(D.asm.Oa);Ga=f;F||nb("wasm-instantiate")}function b(e){a(e.instance,e.module)}function c(e){return rb().then(function(f){return WebAssembly.instantiate(f,d)}).then(e,function(f){E("failed to asynchronously prepare wasm: "+f);H(f)})}var d={a:tf};F||mb("wasm-instantiate");if(D.instantiateWasm)try{return D.instantiateWasm(d,a)}catch(e){return E("Module.instantiateWasm callback failed with error: "+e),!1}(function(){return Fa|| -"function"!==typeof WebAssembly.instantiateStreaming||ob()||"function"!==typeof fetch?c(b):fetch(pb,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,d).then(b,function(f){E("wasm streaming compile failed: "+f);E("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(ma);return{}})();D.___wasm_call_ctors=function(){return(D.___wasm_call_ctors=D.asm.Ka).apply(null,arguments)}; -var R=D._free=function(){return(R=D._free=D.asm.La).apply(null,arguments)},L=D._malloc=function(){return(L=D._malloc=D.asm.Ma).apply(null,arguments)},Ab=D._pthread_self=function(){return(Ab=D._pthread_self=D.asm.Na).apply(null,arguments)};D._emscripten_tls_init=function(){return(D._emscripten_tls_init=D.asm.Oa).apply(null,arguments)};var Wd=D.___getTypeName=function(){return(Wd=D.___getTypeName=D.asm.Qa).apply(null,arguments)}; -D.___embind_register_native_and_builtin_types=function(){return(D.___embind_register_native_and_builtin_types=D.asm.Ra).apply(null,arguments)};D._emscripten_current_thread_process_queued_calls=function(){return(D._emscripten_current_thread_process_queued_calls=D.asm.Sa).apply(null,arguments)}; -var zb=D._emscripten_register_main_browser_thread_id=function(){return(zb=D._emscripten_register_main_browser_thread_id=D.asm.Ta).apply(null,arguments)},cf=D._emscripten_main_browser_thread_id=function(){return(cf=D._emscripten_main_browser_thread_id=D.asm.Ua).apply(null,arguments)},tb=D.__emscripten_do_dispatch_to_thread=function(){return(tb=D.__emscripten_do_dispatch_to_thread=D.asm.Va).apply(null,arguments)},sf=D._emscripten_sync_run_in_main_thread_4=function(){return(sf=D._emscripten_sync_run_in_main_thread_4= -D.asm.Wa).apply(null,arguments)},Db=D._emscripten_main_thread_process_queued_calls=function(){return(Db=D._emscripten_main_thread_process_queued_calls=D.asm.Xa).apply(null,arguments)},se=D._emscripten_run_in_main_runtime_thread_js=function(){return(se=D._emscripten_run_in_main_runtime_thread_js=D.asm.Ya).apply(null,arguments)},xe=D.__emscripten_call_on_thread=function(){return(xe=D.__emscripten_call_on_thread=D.asm.Za).apply(null,arguments)},yb=D.__emscripten_thread_init=function(){return(yb=D.__emscripten_thread_init= -D.asm._a).apply(null,arguments)},af=D._emscripten_get_global_libc=function(){return(af=D._emscripten_get_global_libc=D.asm.$a).apply(null,arguments)},$c=D._memset=function(){return($c=D._memset=D.asm.ab).apply(null,arguments)},Bb=D.___pthread_tsd_run_dtors=function(){return(Bb=D.___pthread_tsd_run_dtors=D.asm.bb).apply(null,arguments)},Qb=D.__get_tzname=function(){return(Qb=D.__get_tzname=D.asm.cb).apply(null,arguments)},Pb=D.__get_daylight=function(){return(Pb=D.__get_daylight=D.asm.db).apply(null, -arguments)},Ob=D.__get_timezone=function(){return(Ob=D.__get_timezone=D.asm.eb).apply(null,arguments)},qe=D.stackSave=function(){return(qe=D.stackSave=D.asm.fb).apply(null,arguments)},Ib=D.stackRestore=function(){return(Ib=D.stackRestore=D.asm.gb).apply(null,arguments)},re=D.stackAlloc=function(){return(re=D.stackAlloc=D.asm.hb).apply(null,arguments)},Hb=D._emscripten_stack_set_limits=function(){return(Hb=D._emscripten_stack_set_limits=D.asm.ib).apply(null,arguments)},nf=D._setThrew=function(){return(nf= -D._setThrew=D.asm.jb).apply(null,arguments)},Zc=D._memalign=function(){return(Zc=D._memalign=D.asm.kb).apply(null,arguments)};D.dynCall_jiji=function(){return(D.dynCall_jiji=D.asm.lb).apply(null,arguments)};D.dynCall_ji=function(){return(D.dynCall_ji=D.asm.mb).apply(null,arguments)};D.dynCall_viijii=function(){return(D.dynCall_viijii=D.asm.nb).apply(null,arguments)};D.dynCall_iiiiij=function(){return(D.dynCall_iiiiij=D.asm.ob).apply(null,arguments)}; -D.dynCall_iiiiijj=function(){return(D.dynCall_iiiiijj=D.asm.pb).apply(null,arguments)};D.dynCall_iiiiiijj=function(){return(D.dynCall_iiiiiijj=D.asm.qb).apply(null,arguments)};var Cb=D.__emscripten_allow_main_runtime_queued_calls=293028,wb=D.__emscripten_main_thread_futex=953728;function pf(a,b){var c=qe();try{O.get(a)(b)}catch(d){Ib(c);if(d!==d+0&&"longjmp"!==d)throw d;nf(1,0)}}function qf(a,b,c){var d=qe();try{O.get(a)(b,c)}catch(e){Ib(d);if(e!==e+0&&"longjmp"!==e)throw e;nf(1,0)}} -function of(a,b,c,d){var e=qe();try{return O.get(a)(b,c,d)}catch(f){Ib(e);if(f!==f+0&&"longjmp"!==f)throw f;nf(1,0)}}D.addRunDependency=mb;D.removeRunDependency=nb;D.FS_createPath=Jc;D.FS_createDataFile=Lc;D.FS_createPreloadedFile=Oc;D.FS_createLazyFile=Nc;D.FS_createDevice=db;D.FS_unlink=Cc;D.PThread=Q;D.PThread=Q;D.wasmMemory=n;D.ExitStatus=Gb;var uf;function Gb(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}lb=function vf(){uf||wf();uf||(lb=vf)}; -function wf(){function a(){if(!uf&&(uf=!0,D.calledRun=!0,!Ha)){ab();la(D);if(D.onRuntimeInitialized)D.onRuntimeInitialized();if(!F){if(D.postRun)for("function"==typeof D.postRun&&(D.postRun=[D.postRun]);D.postRun.length;){var b=D.postRun.shift();$a.unshift(b)}gb($a)}}}if(!(0=d);)++c;if(16e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d}function J(a,b){return a?Na(y(),a,b):""} +function Oa(a,b,c,d){if(!(0=h){var l=a.charCodeAt(++f);h=65536+((h&1023)<<10)|l&1023}if(127>=h){if(c>=d)break;b[c++]=h}else{if(2047>=h){if(c+1>=d)break;b[c++]=192|h>>6}else{if(65535>=h){if(c+2>=d)break;b[c++]=224|h>>12}else{if(c+3>=d)break;b[c++]=240|h>>18;b[c++]=128|h>>12&63}b[c++]=128|h>>6&63}b[c++]=128|h&63}}b[c]=0;return c-e}function L(a,b,c){Oa(a,y(),b,c)} +function Pa(a){for(var b=0,c=0;c=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++c)&1023);127>=d?++b:b=2047>=d?b+2:65535>=d?b+3:b+4}return b}var Qa="undefined"!==typeof TextDecoder?new La("utf-16le"):void 0;function Ra(a,b){var c=a>>1;for(var d=c+b/2;!(c>=d)&&z()[c];)++c;c<<=1;if(32=b/2);++d){var e=da()[a+2*d>>1];if(0==e)break;c+=String.fromCharCode(e)}return c} +function Sa(a,b,c){void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var e=0;e>1]=f;b+=2}da()[b>>1]=0;return b-d}function Ta(a){return 2*a.length}function Ua(a,b){for(var c=0,d="";!(c>=b/4);){var e=A()[a+4*c>>2];if(0==e)break;++c;65536<=e?(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023)):d+=String.fromCharCode(e)}return d} +function Va(a,b,c){void 0===c&&(c=2147483647);if(4>c)return 0;var d=b;c=d+c-4;for(var e=0;e=f){var h=a.charCodeAt(++e);f=65536+((f&1023)<<10)|h&1023}A()[b>>2]=f;b+=4;if(b+4>c)break}A()[b>>2]=0;return b-d}function Wa(a){for(var b=0,c=0;c=d&&++c;b+=4}return b}function Xa(a){var b=Pa(a)+1,c=Ya(b);c&&Oa(a,g(),c,b);return c}function Za(a,b){g().set(a,b)}var t,ba,ca,ea,fa,ha,ia,$a,ka;F&&(t=D.buffer); +function aa(a){t=a;D.HEAP8=ba=new Int8Array(a);D.HEAP16=ea=new Int16Array(a);D.HEAP32=ha=new Int32Array(a);D.HEAPU8=ca=new Uint8Array(a);D.HEAPU16=fa=new Uint16Array(a);D.HEAPU32=ia=new Uint32Array(a);D.HEAPF32=$a=new Float32Array(a);D.HEAPF64=ka=new Float64Array(a)}var ab=D.INITIAL_MEMORY||209715200; +if(F)n=D.wasmMemory,t=D.buffer;else if(D.wasmMemory)n=D.wasmMemory;else if(n=new WebAssembly.Memory({initial:ab/65536,maximum:12800,shared:!0}),!(n.buffer instanceof SharedArrayBuffer))throw E("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),xa&&console.log("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and also use a recent version)"), +Error("bad memory");n&&(t=n.buffer);ab=t.byteLength;aa(t);var M,bb=[],cb=[],db=[],eb=0;function fb(){return noExitRuntime||0=a||a>g().length||a&1||0>b)return-28;if(0==b)return 0;2147483647<=b&&(b=Infinity);var c=Atomics.load(A(),Cb>>2),d=0;if(c==a&&Atomics.compareExchange(A(),Cb>>2,c,0)==c&&(--b,d=1,0>=b))return 1;a=Atomics.notify(A(),a>>2,b);if(0<=a)return a+d;throw"Atomics.notify returned an unexpected value "+a;} +D._emscripten_futex_wake=Bb;function Db(a){if(F)throw"Internal Error! cleanupThread() can only ever be called from main application thread!";if(!a)throw"Internal Error! Null pthread_ptr in cleanupThread!";var b=Q.Hb[a];b&&(A()[a+8>>2]=0,Q.zc(b.worker))}function Eb(a){if(!(a instanceof Fb||"unwind"===a))throw a&&"object"===typeof a&&a.stack&&E("exception thrown: "+[a,a.stack]),a;} +var Q={Sb:[],Rb:[],Uc:[],Ee:function(){},Od:function(a){Gb(a,!wa,1)},Pd:function(){Q.receiveObjectTransfer=Q.de;Q.threadInit=Q.oe;Q.setExitStatus=Q.ie},Hb:{},Tc:[],pd:function(){for(;0>2];A()[a.Ob+96>>2]=0;R(b);R(a.Ob)}a.Ob=0;a.Gc&&a.Vb&&R(a.Vb);a.Vb=0;a.worker&&(a.worker.Gb=null)}},zc:function(a){Q.fe(function(){delete Q.Hb[a.Gb.Ob];Q.Sb.push(a);Q.Rb.splice(Q.Rb.indexOf(a),1);Q.Ic(a.Gb);a.Gb=void 0})},fe:function(a){A()[Ib>>2]=0;try{a()}finally{A()[Ib>>2]=1}},de:function(){},oe:function(){for(var a in Q.Uc)Q.Uc[a]()},Nc:function(a,b){a.onmessage=function(c){var d=c.data,e=d.cmd;a.Gb&&(Q.Bd=a.Gb.Ob);if(d.targetThread&&d.targetThread!=Jb()){var f=Q.Hb[d.Le];f?f.worker.postMessage(c.data, +d.transferList):E('Internal error! Worker sent a message "'+e+'" to target pthread '+d.targetThread+", but that thread no longer exists!")}else if("processQueuedMainThreadWork"===e)Kb();else if("spawnThread"===e)Lb(c.data);else if("cleanupThread"===e)Db(d.thread);else if("killThread"===e){c=d.thread;if(F)throw"Internal Error! killThread() can only ever be called from main application thread!";if(!c)throw"Internal Error! Null pthread_ptr in killThread!";A()[c+8>>2]=0;d=Q.Hb[c];delete Q.Hb[c];d.worker.terminate(); +Q.Ic(d);Q.Rb.splice(Q.Rb.indexOf(d.worker),1);d.worker.Gb=void 0}else if("cancelThread"===e){c=d.thread;if(F)throw"Internal Error! cancelThread() can only ever be called from main application thread!";if(!c)throw"Internal Error! Null pthread_ptr in cancelThread!";Q.Hb[c].worker.postMessage({cmd:"cancel"})}else if("loaded"===e)a.loaded=!0,b&&b(a),a.jc&&(a.jc(),delete a.jc);else if("print"===e)Da("Thread "+d.threadId+": "+d.text);else if("printErr"===e)E("Thread "+d.threadId+": "+d.text);else if("alert"=== +e)alert("Thread "+d.threadId+": "+d.text);else if("exit"===e)a.Gb&&Atomics.load(C(),a.Gb.Ob+60>>2)&&Q.zc(a);else if("exitProcess"===e)try{Mb(d.returnCode)}catch(h){Eb(h)}else"cancelDone"===e?Q.zc(a):"objectTransfer"!==e&&("setimmediate"===c.data.target?a.postMessage(c.data):E("worker sent an unknown command "+e));Q.Bd=void 0};a.onerror=function(c){E("pthread sent an error! "+c.filename+":"+c.lineno+": "+c.message);throw c;};a.postMessage({cmd:"load",urlOrBlob:D.mainScriptUrlOrBlob||_scriptDir,wasmMemory:n, +wasmModule:Ha})},ud:function(){var a=za("BlinkIDImageCaptureWasmSDK.worker.js");Q.Sb.push(new Worker(a))},Hd:function(){0==Q.Sb.length&&(Q.ud(),Q.Nc(Q.Sb[0]));return Q.Sb.pop()}};D.establishStackSpace=function(a,b){Nb(a,b);Ob(a)};D.invokeEntryPoint=function(a,b){return M.get(a)(b)};var Pb;Pb=F?function(){return performance.now()-D.__performance_now_clock_drift}:function(){return performance.now()}; +function Qb(){function a(h){return(h=h.toTimeString().match(/\(([A-Za-z ]+)\)$/))?h[1]:"GMT"}if(F)return S(2,1);var b=(new Date).getFullYear(),c=new Date(b,0,1),d=new Date(b,6,1);b=c.getTimezoneOffset();var e=d.getTimezoneOffset(),f=Math.max(b,e);A()[Rb()>>2]=60*f;A()[Sb()>>2]=Number(b!=e);c=a(c);d=a(d);c=Xa(c);d=Xa(d);e>2]=c,A()[Tb()+4>>2]=d):(A()[Tb()>>2]=d,A()[Tb()+4>>2]=c)}var Ub;function Vb(a,b){y().fill(0,a,a+b)} +function Lb(a){if(F)throw"Internal Error! spawnThread() can only ever be called from main application thread!";var b=Q.Hd();if(!b)return 6;if(void 0!==b.Gb)throw"Internal error!";if(!a.yc)throw"Internal error, no pthread ptr!";Q.Rb.push(b);var c=Ya(512);Vb(c,512);var d=a.Vb+a.ac,e=Q.Hb[a.yc]={worker:b,Vb:a.Vb,ac:a.ac,Gc:a.Gc,Ob:a.yc},f=e.Ob>>2;Atomics.store(C(),f+15,a.detached);Atomics.store(C(),f+24,c);Atomics.store(C(),f+9,e.Ob);Atomics.store(C(),f+19,a.ac);Atomics.store(C(),f+18,d);Atomics.store(C(), +f+25,a.ac);Atomics.store(C(),f+27,d);Atomics.store(C(),f+28,a.detached);c=Wb()+40;Atomics.store(C(),f+42,c);b.Gb=e;var h={cmd:"run",start_routine:a.ne,arg:a.cc,threadInfoStruct:a.yc,stackBase:a.Vb,stackSize:a.ac};b.jc=function(){h.time=performance.now();b.postMessage(h,a.te)};b.loaded&&(b.jc(),delete b.jc);return 0} +function Xb(a,b,c){if(0>=a||a>g().length||a&1)return-28;if(va){if(Atomics.load(A(),a>>2)!=b)return-6;var d=performance.now();c=d+c;for(Atomics.exchange(A(),Cb>>2,a);;){d=performance.now();if(d>c)return Atomics.exchange(A(),Cb>>2,0),-73;d=Atomics.exchange(A(),Cb>>2,0);if(0==d)break;Kb();if(Atomics.load(A(),a>>2)!=b)return-6;Atomics.exchange(A(),Cb>>2,a)}return 0}a=Atomics.wait(A(),a>>2,b,c);if("timed-out"===a)return-73;if("not-equal"===a)return-6;if("ok"===a)return 0;throw"Atomics.wait returned an unexpected value "+ +a;}function Yb(){wa||(Ea||(Ea={}),Ea["Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread"]||(Ea["Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread"]=1,E("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread")))} +function Zb(a,b){if(!a)return E("pthread_join attempted on a null thread pointer!"),71;if(F&&Jb()==a)return E("PThread "+a+" is attempting to join to itself!"),16;if(!F&&$b()==a)return E("Main thread "+a+" is attempting to join to itself!"),16;if(A()[a+8>>2]!==a)return E("pthread_join attempted on thread "+a+", which does not point to a valid thread, or does not exist anymore!"),71;if(Atomics.load(C(),a+60>>2))return E("Attempted to join thread "+a+", which was already detached!"),28;for(Yb();;){var c= +Atomics.load(C(),a+0>>2);if(1==c)return b&&(c=Atomics.load(C(),a+88>>2),A()[b>>2]=c),Atomics.store(C(),a+60>>2,1),F?postMessage({cmd:"cleanupThread",thread:a}):Db(a),0;ac();F||Kb();Xb(a+0,c,F?100:1)}}function bc(a,b){for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a} +function cc(a){var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=bc(a.split("/").filter(function(d){return!!d}),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a}function dc(a){var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b}function ec(a){if("/"===a)return"/";a=cc(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)} +function fc(){if("object"===typeof crypto&&"function"===typeof crypto.getRandomValues){var a=new Uint8Array(1);return function(){crypto.getRandomValues(a);return a[0]}}return function(){G("randomDevice")}} +function gc(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:"/";if("string"!==typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=bc(a.split("/").filter(function(d){return!!d}),!b).join("/");return(b?"/":"")+a||"."}var hc=[];function ic(a,b){hc[a]={input:[],Ab:[],$b:b};jc(a,kc)} +var kc={open:function(a){var b=hc[a.node.hc];if(!b)throw new T(43);a.yb=b;a.seekable=!1},close:function(a){a.yb.$b.flush(a.yb)},flush:function(a){a.yb.$b.flush(a.yb)},read:function(a,b,c,d){if(!a.yb||!a.yb.$b.ed)throw new T(60);for(var e=0,f=0;f=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.sb,a.sb=new Uint8Array(b),0= +a.node.xb)return 0;a=Math.min(a.node.xb-e,d);if(8b)throw new T(28);return b},Vc:function(a,b,c){U.ad(a.node,b+c);a.node.xb=Math.max(a.node.xb,b+c)},wc:function(a,b,c,d,e,f){if(0!==b)throw new T(28);if(32768!==(a.node.mode&61440))throw new T(43);a=a.node.sb;if(f&2||a.buffer!==t){if(0>>0)%Ac.length}function uc(a,b){var c;if(c=(c=Gc(a,"x"))?c:a.tb.dc?0:2)throw new T(c,a);for(c=Ac[Fc(a.id,b)];c;c=c.Zb){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.tb.dc(a,b)} +function rc(a,b,c,d){a=new Hc(a,b,c,d);b=Fc(a.parent.id,a.name);a.Zb=Ac[b];return Ac[b]=a}function sc(a){return 16384===(a&61440)}var Ic={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090};function Jc(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b}function Gc(a,b){if(nb)return 0;if(!b.includes("r")||a.mode&292){if(b.includes("w")&&!(a.mode&146)||b.includes("x")&&!(a.mode&73))return 2}else return 2;return 0}function Kc(a,b){try{return uc(a,b),20}catch(c){}return Gc(a,"wx")} +function Lc(a){var b=4096;for(a=a||0;a<=b;a++)if(!yc[a])return a;throw new T(33);}function Mc(a,b){Nc||(Nc=function(){},Nc.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}}});var c=new Nc,d;for(d in a)c[d]=a[d];a=c;b=Lc(b);a.Lb=b;return yc[b]=a}var qc={open:function(a){a.ub=xc[a.node.hc].ub;a.ub.open&&a.ub.open(a)},Ub:function(){throw new T(70);}};function jc(a,b){xc[a]={ub:b}} +function Oc(a,b){var c="/"===b,d=!b;if(c&&wc)throw new T(10);if(!c&&!d){var e=Cc(b,{cd:!1});b=e.path;e=e.node;if(e.ec)throw new T(10);if(!sc(e.mode))throw new T(54);}b={type:a,Ie:{},gd:b,Xd:[]};a=a.Pb(b);a.Pb=b;b.root=a;c?wc=a:e&&(e.ec=b,e.Pb&&e.Pb.Xd.push(b))}function Pc(a,b,c){var d=Cc(a,{parent:!0}).node;a=ec(a);if(!a||"."===a||".."===a)throw new T(28);var e=Kc(d,a);if(e)throw new T(e);if(!d.tb.vc)throw new T(63);return d.tb.vc(d,a,b,c)}function Qc(a){return Pc(a,16895,0)} +function Rc(a,b,c){"undefined"===typeof c&&(c=b,b=438);return Pc(a,b|8192,c)}function lb(a,b){if(!gc(a))throw new T(44);var c=Cc(b,{parent:!0}).node;if(!c)throw new T(44);b=ec(b);var d=Kc(c,b);if(d)throw new T(d);if(!c.tb.Ac)throw new T(63);c.tb.Ac(c,b,a)} +function Sc(a){var b=Cc(a,{parent:!0}).node,c=ec(a),d=uc(b,c);a:{try{var e=uc(b,c)}catch(h){e=h.Cb;break a}var f=Gc(b,"wx");e=f?f:sc(e.mode)?31:0}if(e)throw new T(e);if(!b.tb.Ec)throw new T(63);if(d.ec)throw new T(10);try{Bc.willDeletePath&&Bc.willDeletePath(a)}catch(h){E("FS.trackingDelegate['willDeletePath']('"+a+"') threw an exception: "+h.message)}b.tb.Ec(b,c);b=Fc(d.parent.id,d.name);if(Ac[b]===d)Ac[b]=d.Zb;else for(b=Ac[b];b;){if(b.Zb===d){b.Zb=d.Zb;break}b=b.Zb}try{if(Bc.onDeletePath)Bc.onDeletePath(a)}catch(h){E("FS.trackingDelegate['onDeletePath']('"+ +a+"') threw an exception: "+h.message)}}function Dc(a){a=Cc(a).node;if(!a)throw new T(44);if(!a.tb.ic)throw new T(28);return gc(Ec(a.parent),a.tb.ic(a))}function Tc(a,b){a="string"===typeof a?Cc(a,{rc:!0}).node:a;if(!a.tb.Eb)throw new T(63);a.tb.Eb(a,{mode:b&4095|a.mode&-4096,timestamp:Date.now()})} +function mb(a,b,c,d){if(""===a)throw new T(44);if("string"===typeof b){var e=Ic[b];if("undefined"===typeof e)throw Error("Unknown file open mode: "+b);b=e}c=b&64?("undefined"===typeof c?438:c)&4095|32768:0;if("object"===typeof a)var f=a;else{a=cc(a);try{f=Cc(a,{rc:!(b&131072)}).node}catch(h){}}e=!1;if(b&64)if(f){if(b&128)throw new T(20);}else f=Pc(a,c,0),e=!0;if(!f)throw new T(44);8192===(f.mode&61440)&&(b&=-513);if(b&65536&&!sc(f.mode))throw new T(54);if(!e&&(c=f?40960===(f.mode&61440)?32:sc(f.mode)&& +("r"!==Jc(b)||b&512)?31:Gc(f,Jc(b)):44))throw new T(c);if(b&512){c=f;c="string"===typeof c?Cc(c,{rc:!0}).node:c;if(!c.tb.Eb)throw new T(63);if(sc(c.mode))throw new T(31);if(32768!==(c.mode&61440))throw new T(28);if(e=Gc(c,"w"))throw new T(e);c.tb.Eb(c,{size:0,timestamp:Date.now()})}b&=-131713;d=Mc({node:f,path:Ec(f),flags:b,seekable:!0,position:0,ub:f.ub,ue:[],error:!1},d);d.ub.open&&d.ub.open(d);!D.logReadFiles||b&1||(Uc||(Uc={}),a in Uc||(Uc[a]=1,E("FS.trackingDelegate error on read file: "+a))); +try{Bc.onOpenFile&&(f=0,1!==(b&2097155)&&(f|=1),0!==(b&2097155)&&(f|=2),Bc.onOpenFile(a,f))}catch(h){E("FS.trackingDelegate['onOpenFile']('"+a+"', flags) threw an exception: "+h.message)}return d}function Vc(a){if(null===a.Lb)throw new T(8);a.Jc&&(a.Jc=null);try{a.ub.close&&a.ub.close(a)}catch(b){throw b;}finally{yc[a.Lb]=null}a.Lb=null}function Wc(a,b,c){if(null===a.Lb)throw new T(8);if(!a.seekable||!a.ub.Ub)throw new T(70);if(0!=c&&1!=c&&2!=c)throw new T(28);a.position=a.ub.Ub(a,b,c);a.ue=[]} +function Xc(a,b,c,d,e,f){if(0>d||0>e)throw new T(28);if(null===a.Lb)throw new T(8);if(0===(a.flags&2097155))throw new T(8);if(sc(a.node.mode))throw new T(31);if(!a.ub.write)throw new T(28);a.seekable&&a.flags&1024&&Wc(a,0,2);var h="undefined"!==typeof e;if(!h)e=a.position;else if(!a.seekable)throw new T(70);b=a.ub.write(a,b,c,d,e,f);h||(a.position+=b);try{if(a.path&&Bc.onWriteToFile)Bc.onWriteToFile(a.path)}catch(l){E("FS.trackingDelegate['onWriteToFile']('"+a.path+"') threw an exception: "+l.message)}return b} +function jb(){T||(T=function(a,b){this.node=b;this.he=function(c){this.Cb=c};this.he(a);this.message="FS error"},T.prototype=Error(),T.prototype.constructor=T,[44].forEach(function(a){tc[a]=new T(a);tc[a].stack=""}))}var ib;function Yc(a,b){var c=0;a&&(c|=365);b&&(c|=146);return c}function Zc(a,b){a="string"===typeof a?a:Ec(a);for(b=b.split("/").reverse();b.length;){var c=b.pop();if(c){var d=cc(a+"/"+c);try{Qc(d)}catch(e){}a=d}}return d} +function $c(a,b,c,d){a=cc(("string"===typeof a?a:Ec(a))+"/"+b);c=Yc(c,d);return Pc(a,(void 0!==c?c:438)&4095|32768,0)}function ad(a,b,c,d,e,f){a=b?cc(("string"===typeof a?a:Ec(a))+"/"+b):a;d=Yc(d,e);e=Pc(a,(void 0!==d?d:438)&4095|32768,0);if(c){if("string"===typeof c){a=Array(c.length);b=0;for(var h=c.length;bthis.length-1||0>p)){var r=p%this.Yc;return this.sc(p/this.Yc|0)[r]}};f.prototype.ge=function(p){this.sc=p};f.prototype.Wc=function(){var p=new XMLHttpRequest;p.open("HEAD",c,!1);p.send(null);if(!(200<=p.status&&300>p.status||304===p.status))throw Error("Couldn't load "+c+". Status: "+p.status);var r=Number(p.getResponseHeader("Content-length")),v,k=(v=p.getResponseHeader("Accept-Ranges"))&&"bytes"===v;p= +(v=p.getResponseHeader("Content-Encoding"))&&"gzip"===v;var u=1048576;k||(u=r);var x=this;x.ge(function(B){var I=B*u,K=(B+1)*u-1;K=Math.min(K,r-1);if("undefined"===typeof x.qc[B]){var oa=x.qc;if(I>K)throw Error("invalid range ("+I+", "+K+") or no bytes requested!");if(K>r-1)throw Error("only "+r+" bytes available! programmer error!");var w=new XMLHttpRequest;w.open("GET",c,!1);r!==u&&w.setRequestHeader("Range","bytes="+I+"-"+K);"undefined"!=typeof Uint8Array&&(w.responseType="arraybuffer");w.overrideMimeType&& +w.overrideMimeType("text/plain; charset=x-user-defined");w.send(null);if(!(200<=w.status&&300>w.status||304===w.status))throw Error("Couldn't load "+c+". Status: "+w.status);I=void 0!==w.response?new Uint8Array(w.response||[]):lc(w.responseText||"",!0);oa[B]=I}if("undefined"===typeof x.qc[B])throw Error("doXHR failed!");return x.qc[B]});if(p||!r)u=r=1,u=r=this.sc(0).length,Da("LazyFiles on gzip forces download of the whole file when length is accessed");this.sd=r;this.rd=u;this.Mc=!0};if("undefined"!== +typeof XMLHttpRequest){if(!wa)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var h=new f;Object.defineProperties(h,{length:{get:function(){this.Mc||this.Wc();return this.sd}},Yc:{get:function(){this.Mc||this.Wc();return this.rd}}});var l=void 0}else l=c,h=void 0;var m=$c(a,b,d,e);h?m.sb=h:l&&(m.sb=null,m.url=l);Object.defineProperties(m,{xb:{get:function(){return this.sb.length}}});var q={};Object.keys(m.ub).forEach(function(p){var r= +m.ub[p];q[p]=function(){bd(m);return r.apply(null,arguments)}});q.read=function(p,r,v,k,u){bd(m);p=p.node.sb;if(u>=p.length)return 0;k=Math.min(p.length-u,k);if(p.slice)for(var x=0;x>2]=d.Cd;A()[b+4>>2]=0;A()[b+8>>2]=d.Kc;A()[b+12>>2]=d.mode;A()[b+16>>2]=d.Zd;A()[b+20>>2]=d.uid;A()[b+24>>2]=d.Ld;A()[b+28>>2]=d.hc;A()[b+32>>2]=0;zb=[d.size>>>0,(P=d.size,1<=+Math.abs(P)?0>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)];A()[b+40>>2]=zb[0];A()[b+ +44>>2]=zb[1];A()[b+48>>2]=4096;A()[b+52>>2]=d.xd;A()[b+56>>2]=d.vd.getTime()/1E3|0;A()[b+60>>2]=0;A()[b+64>>2]=d.Yd.getTime()/1E3|0;A()[b+68>>2]=0;A()[b+72>>2]=d.Ad.getTime()/1E3|0;A()[b+76>>2]=0;zb=[d.Kc>>>0,(P=d.Kc,1<=+Math.abs(P)?0>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)];A()[b+80>>2]=zb[0];A()[b+84>>2]=zb[1];return 0}var jd=void 0;function kd(){jd+=4;return A()[jd-4>>2]}function ld(a){a=yc[a];if(!a)throw new T(8);return a} +function md(a,b,c){if(F)return S(3,1,a,b,c);jd=c;try{var d=ld(a);switch(b){case 0:var e=kd();return 0>e?-28:mb(d.path,d.flags,0,e).Lb;case 1:case 2:return 0;case 3:return d.flags;case 4:return e=kd(),d.flags|=e,0;case 12:return e=kd(),da()[e+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return-1;default:return-28}}catch(f){return"undefined"!==typeof fd&&f instanceof T||G(f),-f.Cb}} +function nd(a,b){if(F)return S(4,1,a,b);try{var c=ld(a);return hd(c.path,b)}catch(d){return"undefined"!==typeof fd&&d instanceof T||G(d),-d.Cb}} +function od(a,b,c){if(F)return S(5,1,a,b,c);jd=c;try{var d=ld(a);switch(b){case 21509:case 21505:return d.yb?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return d.yb?0:-59;case 21519:if(!d.yb)return-59;var e=kd();return A()[e>>2]=0;case 21520:return d.yb?-28:-59;case 21531:a=e=kd();if(!d.ub.Qd)throw new T(59);return d.ub.Qd(d,b,a);case 21523:return d.yb?0:-59;case 21524:return d.yb?0:-59;default:G("bad ioctl syscall "+b)}}catch(f){return"undefined"!==typeof fd&&f instanceof +T||G(f),-f.Cb}} +function pd(a,b,c,d,e,f){if(F)return S(6,1,a,b,c,d,e,f);try{a:{f<<=12;var h=!1;if(0!==(d&16)&&0!==a%65536)var l=-28;else{if(0!==(d&32)){var m=oc(b);if(!m){l=-48;break a}h=!0}else{var q=yc[e];if(!q){l=-8;break a}var p=f;if(0!==(c&2)&&0===(d&2)&&2!==(q.flags&2097155))throw new T(2);if(1===(q.flags&2097155))throw new T(2);if(!q.ub.wc)throw new T(43);var r=q.ub.wc(q,a,b,p,c,d);m=r.wb;h=r.Fc}gd[m]={Wd:m,Ud:b,Fc:h,Lb:e,ae:c,flags:d,offset:f};l=m}}return l}catch(v){return"undefined"!==typeof fd&&v instanceof +T||G(v),-v.Cb}}function qd(a,b){if(F)return S(7,1,a,b);try{var c=gd[a];if(0!==b&&c){if(b===c.Ud){var d=yc[c.Lb];if(d&&c.ae&2){var e=c.flags,f=c.offset,h=y().slice(a,a+b);d&&d.ub.xc&&d.ub.xc(d,h,f,b,e)}gd[a]=null;c.Fc&&R(c.Wd)}var l=0}else l=-28;return l}catch(m){return"undefined"!==typeof fd&&m instanceof T||G(m),-m.Cb}}function rd(a,b,c){if(F)return S(8,1,a,b,c);jd=c;try{var d=J(a),e=c?kd():0;return mb(d,b,e).Lb}catch(f){return"undefined"!==typeof fd&&f instanceof T||G(f),-f.Cb}} +function sd(a,b){if(F)return S(9,1,a,b);try{return a=J(a),hd(a,b)}catch(c){return"undefined"!==typeof fd&&c instanceof T||G(c),-c.Cb}}var td={};function ud(a){for(;a.length;){var b=a.pop();a.pop()(b)}}function vd(a){return this.fromWireType(C()[a>>2])}var wd={},xd={},yd={};function zd(a){if(void 0===a)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?"_"+a:a} +function Ad(a,b){a=zd(a);return(new Function("body","return function "+a+'() {\n "use strict"; return body.apply(this, arguments);\n};\n'))(b)}function Bd(a){var b=Error,c=Ad(a,function(d){this.name=a;this.message=d;d=Error(d).stack;void 0!==d&&(this.stack=this.toString()+"\n"+d.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(b.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message};return c} +var Cd=void 0;function Dd(a){throw new Cd(a);}function Ed(a,b,c){function d(l){l=c(l);l.length!==a.length&&Dd("Mismatched type converter count");for(var m=0;m>2)+d]);return c} +function ne(a){var b=Function;if(!(b instanceof Function))throw new TypeError("new_ called with constructor type "+typeof b+" which is not a function");var c=Ad(b.name||"unknownFunctionName",function(){});c.prototype=b.prototype;c=new c;a=b.apply(c,a);return a instanceof Object?a:c} +function oe(a,b,c,d,e){var f=b.length;2>f&&W("argTypes array size mismatch! Must at least get return value and 'this' types!");var h=null!==b[1]&&null!==c,l=!1;for(c=1;c>2])};case 3:return function(c){return this.fromWireType(ja()[c>>3])};default:throw new TypeError("Unknown float type: "+a);}} +function se(a,b,c){switch(b){case 0:return c?function(d){return g()[d]}:function(d){return y()[d]};case 1:return c?function(d){return da()[d>>1]}:function(d){return z()[d>>1]};case 2:return c?function(d){return A()[d>>2]}:function(d){return C()[d>>2]};default:throw new TypeError("Unknown integer type: "+a);}}function te(a){a||W("Cannot use deleted val. handle = "+a);return Y[a].value}function ue(a,b){var c=xd[a];void 0===c&&W(b+" has unknown type "+je(a));return c} +function ve(a,b){for(var c=Array(a),d=0;d>2)+d],"parameter "+d);return c}var we={};function xe(a){var b=we[a];return void 0===b?V(a):b}var ye=[];function ze(){return"object"===typeof globalThis?globalThis:Function("return this")()}function Ae(a){var b=ye.length;ye.push(a);return b}var Be={};function Ce(){if(F)return S(10,1);G()}var De=[]; +function S(a,b){for(var c=arguments.length-2,d=Ee(),e=Fe(8*c),f=e>>3,h=0;h>2]=b,A()[d.pc+4>>2]=c);if(d.hd||!d.xe)d.hd&&(d=d.hd),a=!1,d.nc&&d.nc.mc&&(a=d.nc.mc.getParameter(2978),a=0===a[0]&&0===a[1]&&a[2]===d.width&&a[3]===d.height),d.width=b,d.height=c,a&&d.nc.mc.viewport(0,0,b,c);else{if(d.pc){d=A()[d.pc+8>>2];a=a?J(a):"";var e=Ee(),f=Fe(12),h=0;if(a){h=Pa(a)+1;var l=Ya(h);L(a,l,h);h=l}A()[f>>2]=h;A()[f+4>>2]=b;A()[f+8>>2]=c;Le(0,d,657457152,0,h,f);Ob(e);return 1}return-4}return 0} +function Me(a,b,c){return F?S(11,1,a,b,c):Ke(a,b,c)}function Ne(a,b){if(!Ia)if(b)a();else try{if(a(),F&&!fb())try{F?Oe(Ja):Mb(Ja)}catch(c){Eb(c)}}catch(c){Eb(c)}}var Pe=[];function Z(a,b){C()[a>>2]=b;C()[a+4>>2]=b/4294967296|0} +function Qe(a,b){try{var c=indexedDB.open("emscripten_filesystem",1)}catch(d){b(d);return}c.onupgradeneeded=function(d){d=d.target.result;d.objectStoreNames.contains("FILES")&&d.deleteObjectStore("FILES");d.createObjectStore("FILES")};c.onsuccess=function(d){a(d.target.result)};c.onerror=function(d){b(d)}}var Re; +function Se(a,b,c,d,e){function f(N){var O=0,H=0;N&&(H=w.response?w.response.byteLength:0,O=Ya(H),y().set(new Uint8Array(w.response),O));C()[a+12>>2]=O;Z(a+16,H)}var h=C()[a+8>>2];if(h){var l=J(h),m=a+112,q=J(m);q||(q="GET");C();var p=C()[m+52>>2],r=C()[m+56>>2],v=!!C()[m+60>>2];C();var k=C()[m+68>>2],u=C()[m+72>>2],x=C()[m+76>>2],B=C()[m+80>>2];h=C()[m+84>>2];m=C()[m+88>>2];var I=!!(p&1),K=!!(p&2);p=!!(p&64);k=k?J(k):void 0;u=u?J(u):void 0;var oa=B?J(B):void 0,w=new XMLHttpRequest;w.withCredentials= +v;w.open(q,l,!p,k,u);p||(w.timeout=r);w.Ne=l;w.responseType="arraybuffer";B&&w.overrideMimeType(oa);if(x)for(;;){q=C()[x>>2];if(!q)break;l=C()[x+4>>2];if(!l)break;x+=8;q=J(q);l=J(l);w.setRequestHeader(q,l)}Pe.push(w);x=Pe.length;C()[a+0>>2]=x;h=h&&m?y().slice(h,h+m):null;w.onload=function(N){f(I&&!K);var O=w.response?w.response.byteLength:0;Z(a+24,0);O&&Z(a+32,O);z()[a+40>>1]=w.readyState;z()[a+42>>1]=w.status;w.statusText&&L(w.statusText,a+44,64);200<=w.status&&300>w.status?b&&b(a,w,N):c&&c(a,w, +N)};w.onerror=function(N){f(I);var O=w.status;Z(a+24,0);Z(a+32,w.response?w.response.byteLength:0);z()[a+40>>1]=w.readyState;z()[a+42>>1]=O;c&&c(a,w,N)};w.ontimeout=function(N){c&&c(a,w,N)};w.onprogress=function(N){var O=I&&K&&w.response?w.response.byteLength:0,H=0;I&&K&&(H=Ya(O),y().set(new Uint8Array(w.response),H));C()[a+12>>2]=H;Z(a+16,O);Z(a+24,N.loaded-O);Z(a+32,N.total);z()[a+40>>1]=w.readyState;3<=w.readyState&&0===w.status&&0>1]=w.status;w.statusText&&L(w.statusText, +a+44,64);d&&d(a,w,N);H&&R(H)};w.onreadystatechange=function(N){z()[a+40>>1]=w.readyState;2<=w.readyState&&(z()[a+42>>1]=w.status);e&&e(a,w,N)};try{w.send(h)}catch(N){c&&c(a,w,N)}}else c(a,0,"no url specified!")} +function Te(a,b,c,d){var e=Re;if(e){var f=a+112;(f=C()[f+64>>2])||(f=C()[a+8>>2]);var h=J(f);try{var l=e.transaction(["FILES"],"readwrite").objectStore("FILES").put(b,h);l.onsuccess=function(){z()[a+40>>1]=4;z()[a+42>>1]=200;L("OK",a+44,64);c(a,0,h)};l.onerror=function(m){z()[a+40>>1]=4;z()[a+42>>1]=413;L("Payload Too Large",a+44,64);d(a,0,m)}}catch(m){d(a,0,m)}}else d(a,0,"IndexedDB not available!")} +function Ue(a,b,c){var d=Re;if(d){var e=a+112;(e=C()[e+64>>2])||(e=C()[a+8>>2]);e=J(e);try{var f=d.transaction(["FILES"],"readonly").objectStore("FILES").get(e);f.onsuccess=function(h){if(h.target.result){h=h.target.result;var l=h.byteLength||h.length,m=Ya(l);y().set(new Uint8Array(h),m);C()[a+12>>2]=m;Z(a+16,l);Z(a+24,0);Z(a+32,l);z()[a+40>>1]=4;z()[a+42>>1]=200;L("OK",a+44,64);b(a,0,h)}else z()[a+40>>1]=4,z()[a+42>>1]=404,L("Not Found",a+44,64),c(a,0,"no data")};f.onerror=function(h){z()[a+40>> +1]=4;z()[a+42>>1]=404;L("Not Found",a+44,64);c(a,0,h)}}catch(h){c(a,0,h)}}else c(a,0,"IndexedDB not available!")} +function Ve(a,b,c){var d=Re;if(d){var e=a+112;(e=C()[e+64>>2])||(e=C()[a+8>>2]);e=J(e);try{var f=d.transaction(["FILES"],"readwrite").objectStore("FILES").delete(e);f.onsuccess=function(h){h=h.target.result;C()[a+12>>2]=0;Z(a+16,0);Z(a+24,0);Z(a+32,0);z()[a+40>>1]=4;z()[a+42>>1]=200;L("OK",a+44,64);b(a,0,h)};f.onerror=function(h){z()[a+40>>1]=4;z()[a+42>>1]=404;L("Not Found",a+44,64);c(a,0,h)}}catch(h){c(a,0,h)}}else c(a,0,"IndexedDB not available!")} +function We(a){var b=a.getExtension("ANGLE_instanced_arrays");b&&(a.vertexAttribDivisor=function(c,d){b.vertexAttribDivisorANGLE(c,d)},a.drawArraysInstanced=function(c,d,e,f){b.drawArraysInstancedANGLE(c,d,e,f)},a.drawElementsInstanced=function(c,d,e,f,h){b.drawElementsInstancedANGLE(c,d,e,f,h)})} +function Xe(a){var b=a.getExtension("OES_vertex_array_object");b&&(a.createVertexArray=function(){return b.createVertexArrayOES()},a.deleteVertexArray=function(c){b.deleteVertexArrayOES(c)},a.bindVertexArray=function(c){b.bindVertexArrayOES(c)},a.isVertexArray=function(c){return b.isVertexArrayOES(c)})}function Ye(a){var b=a.getExtension("WEBGL_draw_buffers");b&&(a.drawBuffers=function(c,d){b.drawBuffersWEBGL(c,d)})} +function Ze(a,b){a.dd||(a.dd=a.getContext,a.getContext=function(d,e){e=a.dd(d,e);return"webgl"==d==e instanceof WebGLRenderingContext?e:null});var c=a.getContext("webgl",b);return c?$e(c,b):0}function $e(a,b){var c=Ya(8);A()[c+4>>2]=Jb();var d={Ce:c,attributes:b,version:b.Vd,mc:a};a.canvas&&(a.canvas.nc=d);("undefined"===typeof b.$c||b.$c)&&af(d);return c} +function af(a){a||(a=bf);if(!a.Nd){a.Nd=!0;var b=a.mc;We(b);Xe(b);Ye(b);b.ye=b.getExtension("EXT_disjoint_timer_query");b.Ge=b.getExtension("WEBGL_multi_draw");(b.getSupportedExtensions()||[]).forEach(function(c){c.includes("lose_context")||c.includes("debug")||b.getExtension(c)})}}var bf,cf=["default","low-power","high-performance"],df={}; +function ef(){if(!ff){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"===typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ta||"./this.program"},b;for(b in df)void 0===df[b]?delete a[b]:a[b]=df[b];var c=[];for(b in a)c.push(b+"="+a[b]);ff=c}return ff}var ff; +function gf(a,b){if(F)return S(12,1,a,b);var c=0;ef().forEach(function(d,e){var f=b+c;e=A()[a+4*e>>2]=f;for(f=0;f>0]=d.charCodeAt(f);g()[e>>0]=0;c+=d.length+1});return 0}function hf(a,b){if(F)return S(13,1,a,b);var c=ef();A()[a>>2]=c.length;var d=0;c.forEach(function(e){d+=e.length+1});A()[b>>2]=d;return 0}function jf(a){if(F)return S(14,1,a);try{var b=ld(a);Vc(b);return 0}catch(c){return"undefined"!==typeof fd&&c instanceof T||G(c),c.Cb}} +function kf(a,b){if(F)return S(15,1,a,b);try{var c=ld(a),d=c.yb?2:sc(c.mode)?3:40960===(c.mode&61440)?7:4;g()[b>>0]=d;return 0}catch(e){return"undefined"!==typeof fd&&e instanceof T||G(e),e.Cb}} +function lf(a,b,c,d){if(F)return S(16,1,a,b,c,d);try{a:{for(var e=ld(a),f=a=0;f>2],l=A()[b+(8*f+4)>>2],m=e,q=g(),p=h,r=l,v=void 0;if(0>r||0>v)throw new T(28);if(null===m.Lb)throw new T(8);if(1===(m.flags&2097155))throw new T(8);if(sc(m.node.mode))throw new T(31);if(!m.ub.read)throw new T(28);var k="undefined"!==typeof v;if(!k)v=m.position;else if(!m.seekable)throw new T(70);var u=m.ub.read(m,q,p,r,v);k||(m.position+=u);var x=u;if(0>x){var B=-1;break a}a+=x;if(x> +2]=B;return 0}catch(I){return"undefined"!==typeof fd&&I instanceof T||G(I),I.Cb}} +function mf(a,b,c,d,e){if(F)return S(17,1,a,b,c,d,e);try{var f=ld(a);a=4294967296*c+(b>>>0);if(-9007199254740992>=a||9007199254740992<=a)return-61;Wc(f,a,d);zb=[f.position>>>0,(P=f.position,1<=+Math.abs(P)?0>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)];A()[e>>2]=zb[0];A()[e+4>>2]=zb[1];f.Jc&&0===a&&0===d&&(f.Jc=null);return 0}catch(h){return"undefined"!==typeof fd&&h instanceof T||G(h),h.Cb}} +function nf(a,b,c,d){if(F)return S(18,1,a,b,c,d);try{a:{for(var e=ld(a),f=a=0;f>2],l=A()[b+(8*f+4)>>2],m=Xc(e,g(),h,l,void 0);if(0>m){var q=-1;break a}a+=m}q=a}A()[d>>2]=q;return 0}catch(p){return"undefined"!==typeof fd&&p instanceof T||G(p),p.Cb}}function of(a,b){of.kd||(of.kd=fc());for(var c=0;c>0]=of.kd();return 0}function pf(a){return 0===a%4&&(0!==a%100||0===a%400)}function qf(a,b){for(var c=0,d=0;d<=b;c+=a[d++]);return c} +var rf=[31,29,31,30,31,30,31,31,30,31,30,31],sf=[31,28,31,30,31,30,31,31,30,31,30,31];function tf(a,b){for(a=new Date(a.getTime());0d-a.getDate())b-=d-a.getDate()+1,a.setDate(1),11>c?a.setMonth(c+1):(a.setMonth(0),a.setFullYear(a.getFullYear()+1));else{a.setDate(a.getDate()+b);break}}return a} +function uf(a,b,c,d){function e(k,u,x){for(k="number"===typeof k?k.toString():k||"";k.lengthI?-1:0=h(x,k)?0>=h(u,k)?k.getFullYear()+1:k.getFullYear():k.getFullYear()-1}var q=A()[d+40>>2];d={re:A()[d>>2],qe:A()[d+4>>2],Bc:A()[d+8>>2],kc:A()[d+12>>2],bc:A()[d+16>>2],Db:A()[d+20>>2],Cc:A()[d+24>>2],Dc:A()[d+28>>2],Me:A()[d+ +32>>2],pe:A()[d+36>>2],se:q?J(q):""};c=J(c);q={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var p in q)c=c.replace(new RegExp(p,"g"),q[p]);var r="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), +v="January February March April May June July August September October November December".split(" ");q={"%a":function(k){return r[k.Cc].substring(0,3)},"%A":function(k){return r[k.Cc]},"%b":function(k){return v[k.bc].substring(0,3)},"%B":function(k){return v[k.bc]},"%C":function(k){return f((k.Db+1900)/100|0,2)},"%d":function(k){return f(k.kc,2)},"%e":function(k){return e(k.kc,2," ")},"%g":function(k){return m(k).toString().substring(2)},"%G":function(k){return m(k)},"%H":function(k){return f(k.Bc, +2)},"%I":function(k){k=k.Bc;0==k?k=12:12k.Bc?"AM":"PM"},"%S":function(k){return f(k.re,2)},"%t":function(){return"\t"},"%u":function(k){return k.Cc||7},"%U":function(k){var u=new Date(k.Db+1900,0,1),x=0===u.getDay()?u:tf(u,7-u.getDay());k=new Date(k.Db+1900,k.bc,k.kc);return 0> +h(x,k)?f(Math.ceil((31-x.getDate()+(qf(pf(k.getFullYear())?rf:sf,k.getMonth()-1)-31)+k.getDate())/7),2):0===h(x,u)?"01":"00"},"%V":function(k){var u=new Date(k.Db+1901,0,4),x=l(new Date(k.Db+1900,0,4));u=l(u);var B=tf(new Date(k.Db+1900,0,1),k.Dc);return 0>h(B,x)?"53":0>=h(u,B)?"01":f(Math.ceil((x.getFullYear()h(x,k)?f(Math.ceil((31-x.getDate()+(qf(pf(k.getFullYear())?rf:sf,k.getMonth()-1)-31)+k.getDate())/7),2):0===h(x,u)?"01":"00"},"%y":function(k){return(k.Db+1900).toString().substring(2)},"%Y":function(k){return k.Db+1900},"%z":function(k){k=k.pe;var u=0<=k;k=Math.abs(k)/60;return(u?"+":"-")+String("0000"+(k/60*100+k%60)).slice(-4)},"%Z":function(k){return k.se},"%%":function(){return"%"}};for(p in q)c.includes(p)&&(c=c.replace(new RegExp(p,"g"),q[p](d)));p=lc(c, +!1);if(p.length>b)return 0;Za(p,a);return p.length-1}function Hc(a,b,c,d){a||(a=this);this.parent=a;this.Pb=a.Pb;this.ec=null;this.id=zc++;this.name=b;this.mode=c;this.tb={};this.ub={};this.hc=d} +Object.defineProperties(Hc.prototype,{read:{get:function(){return 365===(this.mode&365)},set:function(a){a?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(a){a?this.mode|=146:this.mode&=-147}},Sd:{get:function(){return sc(this.mode)}},Rd:{get:function(){return 8192===(this.mode&61440)}}});jb();Ac=Array(4096);Oc(U,"/");Qc("/tmp");Qc("/home");Qc("/home/web_user"); +(function(){Qc("/dev");jc(259,{read:function(){return 0},write:function(b,c,d,e){return e}});Rc("/dev/null",259);ic(1280,mc);ic(1536,nc);Rc("/dev/tty",1280);Rc("/dev/tty1",1536);var a=fc();kb("/dev","random",a);kb("/dev","urandom",a);Qc("/dev/shm");Qc("/dev/shm/tmp")})(); +(function(){Qc("/proc");var a=Qc("/proc/self");Qc("/proc/self/fd");Oc({Pb:function(){var b=rc(a,"fd",16895,73);b.tb={dc:function(c,d){var e=yc[+d];if(!e)throw new T(8);c={parent:null,Pb:{gd:"fake"},tb:{ic:function(){return e.path}}};return c.parent=c}};return b}},"/proc/self/fd")})();var ed;D.FS_createPath=Zc;D.FS_createDataFile=ad;D.FS_createPreloadedFile=dd;D.FS_createLazyFile=cd;D.FS_createDevice=kb;D.FS_unlink=Sc;Cd=D.InternalError=Bd("InternalError"); +for(var vf=Array(256),wf=0;256>wf;++wf)vf[wf]=String.fromCharCode(wf);Hd=vf;Id=D.BindingError=Bd("BindingError");Rd.prototype.isAliasOf=function(a){if(!(this instanceof Rd&&a instanceof Rd))return!1;var b=this.rb.zb.vb,c=this.rb.wb,d=a.rb.zb.vb;for(a=a.rb.wb;b.Jb;)c=b.lc(c),b=b.Jb;for(;d.Jb;)a=d.lc(a),d=d.Jb;return b===d&&c===a}; +Rd.prototype.clone=function(){this.rb.wb||Jd(this);if(this.rb.fc)return this.rb.count.value+=1,this;var a=Nd,b=Object,c=b.create,d=Object.getPrototypeOf(this),e=this.rb;a=a(c.call(b,d,{rb:{value:{count:e.count,Xb:e.Xb,fc:e.fc,wb:e.wb,zb:e.zb,Fb:e.Fb,Ib:e.Ib}}}));a.rb.count.value+=1;a.rb.Xb=!1;return a};Rd.prototype["delete"]=function(){this.rb.wb||Jd(this);this.rb.Xb&&!this.rb.fc&&W("Object already scheduled for deletion");Ld(this);Md(this.rb);this.rb.fc||(this.rb.Fb=void 0,this.rb.wb=void 0)}; +Rd.prototype.isDeleted=function(){return!this.rb.wb};Rd.prototype.deleteLater=function(){this.rb.wb||Jd(this);this.rb.Xb&&!this.rb.fc&&W("Object already scheduled for deletion");Pd.push(this);1===Pd.length&&Od&&Od(Qd);this.rb.Xb=!0;return this};ee.prototype.Id=function(a){this.ld&&(a=this.ld(a));return a};ee.prototype.Zc=function(a){this.Qb&&this.Qb(a)};ee.prototype.argPackAdvance=8;ee.prototype.readValueFromPointer=vd;ee.prototype.deleteObject=function(a){if(null!==a)a["delete"]()}; +ee.prototype.fromWireType=function(a){function b(){return this.uc?de(this.vb.Yb,{zb:this.$d,wb:c,Ib:this,Fb:a}):de(this.vb.Yb,{zb:this,wb:a})}var c=this.Id(a);if(!c)return this.Zc(a),null;var d=ce(this.vb,c);if(void 0!==d){if(0===d.rb.count.value)return d.rb.wb=c,d.rb.Fb=a,d.clone();d=d.clone();this.Zc(a);return d}d=this.vb.Gd(c);d=Sd[d];if(!d)return b.call(this);d=this.tc?d.zd:d.pointerType;var e=ae(c,this.vb,d.vb);return null===e?b.call(this):this.uc?de(d.vb.Yb,{zb:d,wb:e,Ib:this,Fb:a}):de(d.vb.Yb, +{zb:d,wb:e})};D.getInheritedInstanceCount=function(){return Object.keys(be).length};D.getLiveInheritedInstances=function(){var a=[],b;for(b in be)be.hasOwnProperty(b)&&a.push(be[b]);return a};D.flushPendingDeletes=Qd;D.setDelayFunction=function(a){Od=a;Pd.length&&Od&&Od(Qd)};ie=D.UnboundTypeError=Bd("UnboundTypeError");D.count_emval_handles=function(){for(var a=0,b=5;b>2]);A()[b>>2]=a.getSeconds();A()[b+4>>2]=a.getMinutes();A()[b+8>>2]=a.getHours();A()[b+12>>2]=a.getDate();A()[b+16>>2]=a.getMonth();A()[b+20>>2]=a.getFullYear()-1900;A()[b+24>>2]=a.getDay();var c=new Date(a.getFullYear(),0,1),d=(a.getTime()-c.getTime())/864E5|0;A()[b+28>> +2]=d;A()[b+36>>2]=-(60*a.getTimezoneOffset());d=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();c=c.getTimezoneOffset();a=(d!=c&&a.getTimezoneOffset()==Math.min(c,d))|0;A()[b+32>>2]=a;a=A()[Tb()+(a?4:0)>>2];A()[b+40>>2]=a;return b},ua:function(a,b,c,d){if("undefined"===typeof SharedArrayBuffer)return E("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;if(!a)return E("pthread_create called with a null thread pointer!"),28;var e=[];if(F&&0===e.length)return yf(687865856, +a,b,c,d);var f=0,h=0;if(b&&-1!=b){var l=A()[b>>2];l+=81920;f=A()[b+8>>2];h=0!==A()[b+12>>2]}else l=2097152;(b=0==f)?f=pc(16,l):(f-=l,Ka(0>2]=m;A()[m+8>>2]=m;a=m+148;A()[a>>2]=a;c={Vb:f,ac:l,Gc:b,detached:h,ne:c,yc:m,cc:d,te:e};return F?(c.we="spawnThread",postMessage(c,e),0):Lb(c)},ta:function(a){F||(Q.pd(),Mb(a));var b=Jb();Atomics.store(C(),b+52>>2,1);Atomics.store(C(),b+56>>2,0);Q.pd();Atomics.store(C(),b+88>>2,a);Atomics.store(C(),b+0>>2,1);Bb(b+0,2147483647); +Gb(0,0,0);postMessage({cmd:"exit"})},ra:function(a,b){return Zb(a,b)},K:md,na:nd,la:od,qa:pd,pa:function(){return 0},oa:qd,L:rd,ma:sd,e:function(a){var b=td[a];delete td[a];var c=b.Pc,d=b.Qb,e=b.bd,f=e.map(function(h){return h.Kd}).concat(e.map(function(h){return h.ke}));Ed([a],f,function(h){var l={};e.forEach(function(m,q){var p=h[q],r=m.sc,v=m.Jd,k=h[q+e.length],u=m.je,x=m.le;l[m.Fd]={read:function(B){return p.fromWireType(r(v,B))},write:function(B,I){var K=[];u(x,B,k.toWireType(K,I));ud(K)}}}); +return[{name:b.name,fromWireType:function(m){var q={},p;for(p in l)q[p]=l[p].read(m);d(m);return q},toWireType:function(m,q){for(var p in l)if(!(p in q))throw new TypeError('Missing field: "'+p+'"');var r=c();for(p in l)l[p].write(r,q[p]);null!==m&&m.push(d,r);return r},argPackAdvance:8,readValueFromPointer:vd,Kb:d}]})},V:function(){},ya:function(a,b,c,d,e){var f=Gd(c);b=V(b);Fd(a,{name:b,fromWireType:function(h){return!!h},toWireType:function(h,l){return l?d:e},argPackAdvance:8,readValueFromPointer:function(h){if(1=== +c)var l=g();else if(2===c)l=da();else if(4===c)l=A();else throw new TypeError("Unknown boolean type size: "+b);return this.fromWireType(l[h>>f])},Kb:null})},A:function(a,b,c,d,e,f,h,l,m,q,p,r,v){p=V(p);f=he(e,f);l&&(l=he(h,l));q&&(q=he(m,q));v=he(r,v);var k=zd(p);Ud(k,function(){le("Cannot construct "+p+" due to unbound types",[d])});Ed([a,b,c],d?[d]:[],function(u){u=u[0];if(d){var x=u.vb;var B=x.Yb}else B=Rd.prototype;u=Ad(k,function(){if(Object.getPrototypeOf(this)!==I)throw new Id("Use 'new' to construct "+ +p);if(void 0===K.Tb)throw new Id(p+" has no accessible constructor");var w=K.Tb[arguments.length];if(void 0===w)throw new Id("Tried to invoke ctor of "+p+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(K.Tb).toString()+") parameters instead!");return w.apply(this,arguments)});var I=Object.create(B,{constructor:{value:u}});u.prototype=I;var K=new Vd(p,u,I,v,x,f,l,q);x=new ee(p,K,!0,!1);B=new ee(p+"*",K,!1,!1);var oa=new ee(p+" const*",K,!1,!0);Sd[a]={pointerType:B, +zd:oa};fe(k,u);return[x,B,oa]})},R:function(a,b,c,d,e,f){Ka(0>>l}}var m=b.includes("unsigned");Fd(a,{name:b,fromWireType:f,toWireType:function(q,p){if("number"!==typeof p&&"boolean"!== +typeof p)throw new TypeError('Cannot convert "'+Yd(p)+'" to '+this.name);if(pe)throw new TypeError('Passing a number "'+Yd(p)+'" from JS side to C/C++ side to an argument of type "'+b+'", which is outside the valid range ['+d+", "+e+"]!");return m?p>>>0:p|0},argPackAdvance:8,readValueFromPointer:se(b,h,0!==d),Kb:null})},g:function(a,b,c){function d(f){f>>=2;var h=C();return new e(t,h[f+1],h[f])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b]; +c=V(c);Fd(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d},{Md:!0})},N:function(a,b){b=V(b);var c="std::string"===b;Fd(a,{name:b,fromWireType:function(d){var e=C()[d>>2];if(c)for(var f=d+4,h=0;h<=e;++h){var l=d+4+h;if(h==e||0==y()[l]){f=J(f,l-f);if(void 0===m)var m=f;else m+=String.fromCharCode(0),m+=f;f=l+1}}else{m=Array(e);for(h=0;h>2]=h;if(c&&f)L(e,l+4,h+1);else if(f)for(f=0;f>2],p=h(),r,v=m+4,k=0;k<=q;++k){var u=m+4+k*b;if(k==q||0==p[u>>l])v=d(v,u-v),void 0===r?r=v:(r+=String.fromCharCode(0),r+=v),v=u+b}R(m);return r},toWireType:function(m,q){"string"!==typeof q&&W("Cannot pass non-string to C++ string type "+c);var p=f(q),r=Ya(4+p+b);C()[r>> +2]=p>>l;e(q,r+4,p+b);null!==m&&m.push(R,r);return r},argPackAdvance:8,readValueFromPointer:vd,Kb:function(m){R(m)}})},f:function(a,b,c,d,e,f){td[a]={name:V(b),Pc:he(c,d),Qb:he(e,f),bd:[]}},b:function(a,b,c,d,e,f,h,l,m,q){td[a].bd.push({Fd:V(b),Kd:c,sc:he(d,e),Jd:f,ke:h,je:he(l,m),le:q})},za:function(a,b){b=V(b);Fd(a,{Td:!0,name:b,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},va:function(a){delete Pe[a-1]},ka:function(a,b){if(a==b)postMessage({cmd:"processQueuedMainThreadWork"}); +else if(F)postMessage({targetThread:a,cmd:"processThreadQueue"});else{a=(a=Q.Hb[a])&&a.worker;if(!a)return;a.postMessage({cmd:"processThreadQueue"})}return 1},X:function(){throw"longjmp";},k:function(a,b,c){a=te(a);b=ue(b,"emval::as");var d=[],e=X(d);A()[c>>2]=e;return b.toWireType(d,a)},Ha:function(a,b,c,d){a=te(a);c=ve(b,c);for(var e=Array(b),f=0;f>> 2) + "+f+'], "parameter '+f+'");\nvar arg'+f+" = argType"+f+".readValueFromPointer(args);\nargs += argType"+f+"['argPackAdvance'];\n";e=(new Function("requireRegisteredType","Module","__emval_register",h+("var obj = new constructor("+e+");\nreturn __emval_register(obj);\n}\n")))(ue,D,X);Be[b]=e}return e(a,c,d)},Ca:function(){return X([])}, +T:function(a){return X(xe(a))},Ea:function(){return X({})},Ka:function(a){ud(Y[a].value);qe(a)},u:function(a,b,c){a=te(a);b=te(b);c=te(c);a[b]=c},o:function(a,b){a=ue(a,"_emval_take_value");a=a.readValueFromPointer(b);return X(a)},Ja:function(a){a=te(a);return X(typeof a)},l:Ce,B:function(){var a=D.allowedThreads;return a?a:navigator.hardwareConcurrency},E:function(a,b){if(0===a)a=Date.now();else if(1===a||4===a)a=Pb();else return-1;A()[b>>2]=a/1E3|0;A()[b+4>>2]=a%1E3*1E6|0;return 0},q:function(a, +b,c){De.length=0;var d;for(c>>=2;d=y()[b++];)(d=105>d)&&c&1&&c++,De.push(d?ja()[c++>>1]:A()[c]),++c;return Ab[a].apply(null,De)},aa:Yb,H:function(){},m:Xb,p:Bb,t:Pb,Aa:function(){return"undefined"!==typeof SharedArrayBuffer},Y:function(a,b,c){y().copyWithin(a,b,b+c)},fa:function(a,b,c){He.length=b;c>>=3;for(var d=0;da?Ab[-a-1]:xf[a]).apply(null,He)},Z:function(a){var b=y().length;a>>>=0;if(a<=b||838860800=c;c*=2){var d=b*(1+.2/c);d=Math.min(d, +a+100663296);d=Math.max(a,d);0>>16);aa(n.buffer);var e=1;break a}catch(f){}e=void 0}if(e)return!0}return!1},ga:function(a,b,c){return Je(a)?Ke(a,b,c):Me(a,b,c)},G:function(){},ja:function(a,b,c){eb+=1;return setTimeout(function(){--eb;Ne(function(){M.get(a)(c)})},b)},wa:function(a,b,c,d,e){function f(H){Se(H,h,q,p,m)}function h(H,Cf){Te(H,Cf.response,function(hb){--eb;Ne(function(){u?M.get(u)(hb):b&&b(hb)},O)},function(hb){--eb; +Ne(function(){u?M.get(u)(hb):b&&b(hb)},O)})}function l(H){Se(H,r,q,p,m)}function m(H){Ne(function(){I?M.get(I)(H):e&&e(H)},O)}function q(H){--eb;Ne(function(){x?M.get(x)(H):c&&c(H)},O)}function p(H){Ne(function(){B?M.get(B)(H):d&&d(H)},O)}function r(H){--eb;Ne(function(){u?M.get(u)(H):b&&b(H)},O)}eb+=1;var v=a+112,k=J(v),u=C()[v+36>>2],x=C()[v+40>>2],B=C()[v+44>>2],I=C()[v+48>>2],K=C()[v+52>>2],oa=!!(K&4),w=!!(K&32),N=!!(K&16),O=!!(K&64);if("EM_IDB_STORE"===k)k=C()[v+84>>2],Te(a,y().slice(k,k+C()[v+ +88>>2]),r,q);else if("EM_IDB_DELETE"===k)Ve(a,r,q);else if(N){if(w)return 0;Se(a,oa?h:r,q,p,m)}else Ue(a,r,w?q:oa?f:l);return a},sa:function(){throw"unwind";},ha:function(a,b){b>>=2;var c=A()[b+6];b={alpha:!!A()[b+0],depth:!!A()[b+1],stencil:!!A()[b+2],antialias:!!A()[b+3],premultipliedAlpha:!!A()[b+4],preserveDrawingBuffer:!!A()[b+5],powerPreference:cf[c],failIfMajorPerformanceCaveat:!!A()[b+7],Vd:A()[b+8],Fe:A()[b+9],$c:A()[b+10],Ed:A()[b+11],Je:A()[b+12],Ke:A()[b+13]};a=Je(a);return!a||b.Ed?0: +Ze(a,b)},ca:gf,da:hf,x:function(a){Mb(a)},v:jf,ba:kf,J:lf,U:mf,I:nf,d:function(){return Fa},Ga:function(){var a=self.navigator.userAgent,b=Pa(a)+1,c=Ya(b);L(a,c,b);return c},_:of,ia:function(a){Q.Od(a)},W:zf,D:Af,C:Bf,a:n||D.wasmMemory,Ba:function(a){Ub||(Ub=!0,Qb());var b=new Date(A()[a+20>>2]+1900,A()[a+16>>2],A()[a+12>>2],A()[a+8>>2],A()[a+4>>2],A()[a>>2],0),c=A()[a+32>>2],d=b.getTimezoneOffset(),e=new Date(b.getFullYear(),0,1),f=(new Date(b.getFullYear(),6,1)).getTimezoneOffset(),h=e.getTimezoneOffset(), +l=Math.min(h,f);0>c?A()[a+32>>2]=Number(f!=h&&l==d):0>2]=b.getDay();c=(b.getTime()-e.getTime())/864E5|0;A()[a+28>>2]=c;A()[a>>2]=b.getSeconds();A()[a+4>>2]=b.getMinutes();A()[a+8>>2]=b.getHours();A()[a+12>>2]=b.getDate();A()[a+16>>2]=b.getMonth();return b.getTime()/1E3|0},c:function(a){Fa=a},P:uf,$:function(a,b,c,d){return uf(a,b,c,d)},Q:function(a){var b=Date.now()/1E3|0;a&&(A()[a>>2]=b);return b}}; +(function(){function a(e,f){D.asm=e.exports;M=D.asm.Qa;cb.unshift(D.asm.La);Q.Uc.push(D.asm.Pa);Ha=f;F||ub("wasm-instantiate")}function b(e){a(e.instance,e.module)}function c(e){return yb().then(function(f){return WebAssembly.instantiate(f,d)}).then(function(f){return f}).then(e,function(f){E("failed to asynchronously prepare wasm: "+f);G(f)})}var d={a:Df};F||tb("wasm-instantiate");if(D.instantiateWasm)try{return D.instantiateWasm(d,a)}catch(e){return E("Module.instantiateWasm callback failed with error: "+ +e),!1}(function(){return Ga||"function"!==typeof WebAssembly.instantiateStreaming||vb()||"function"!==typeof fetch?c(b):fetch(wb,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,d).then(b,function(f){E("wasm streaming compile failed: "+f);E("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(ma);return{}})();D.___wasm_call_ctors=function(){return(D.___wasm_call_ctors=D.asm.La).apply(null,arguments)}; +var R=D._free=function(){return(R=D._free=D.asm.Ma).apply(null,arguments)},Ya=D._malloc=function(){return(Ya=D._malloc=D.asm.Na).apply(null,arguments)},Jb=D._pthread_self=function(){return(Jb=D._pthread_self=D.asm.Oa).apply(null,arguments)};D._emscripten_tls_init=function(){return(D._emscripten_tls_init=D.asm.Pa).apply(null,arguments)};var ke=D.___getTypeName=function(){return(ke=D.___getTypeName=D.asm.Ra).apply(null,arguments)}; +D.___embind_register_native_and_builtin_types=function(){return(D.___embind_register_native_and_builtin_types=D.asm.Sa).apply(null,arguments)};D._emscripten_current_thread_process_queued_calls=function(){return(D._emscripten_current_thread_process_queued_calls=D.asm.Ta).apply(null,arguments)}; +var $b=D._emscripten_main_browser_thread_id=function(){return($b=D._emscripten_main_browser_thread_id=D.asm.Ua).apply(null,arguments)},yf=D._emscripten_sync_run_in_main_thread_4=function(){return(yf=D._emscripten_sync_run_in_main_thread_4=D.asm.Va).apply(null,arguments)},Kb=D._emscripten_main_thread_process_queued_calls=function(){return(Kb=D._emscripten_main_thread_process_queued_calls=D.asm.Wa).apply(null,arguments)},Ge=D._emscripten_run_in_main_runtime_thread_js=function(){return(Ge=D._emscripten_run_in_main_runtime_thread_js= +D.asm.Xa).apply(null,arguments)},Le=D.__emscripten_call_on_thread=function(){return(Le=D.__emscripten_call_on_thread=D.asm.Ya).apply(null,arguments)},Oe=D.__emscripten_thread_exit=function(){return(Oe=D.__emscripten_thread_exit=D.asm.Za).apply(null,arguments)},ac=D._pthread_testcancel=function(){return(ac=D._pthread_testcancel=D.asm._a).apply(null,arguments)},Gb=D.__emscripten_thread_init=function(){return(Gb=D.__emscripten_thread_init=D.asm.$a).apply(null,arguments)},Wb=D._emscripten_get_global_libc= +function(){return(Wb=D._emscripten_get_global_libc=D.asm.ab).apply(null,arguments)},Hb=D.___pthread_tsd_run_dtors=function(){return(Hb=D.___pthread_tsd_run_dtors=D.asm.bb).apply(null,arguments)},Tb=D.__get_tzname=function(){return(Tb=D.__get_tzname=D.asm.cb).apply(null,arguments)},Sb=D.__get_daylight=function(){return(Sb=D.__get_daylight=D.asm.db).apply(null,arguments)},Rb=D.__get_timezone=function(){return(Rb=D.__get_timezone=D.asm.eb).apply(null,arguments)},Ee=D.stackSave=function(){return(Ee=D.stackSave= +D.asm.fb).apply(null,arguments)},Ob=D.stackRestore=function(){return(Ob=D.stackRestore=D.asm.gb).apply(null,arguments)},Fe=D.stackAlloc=function(){return(Fe=D.stackAlloc=D.asm.hb).apply(null,arguments)},Nb=D._emscripten_stack_set_limits=function(){return(Nb=D._emscripten_stack_set_limits=D.asm.ib).apply(null,arguments)},Ef=D._setThrew=function(){return(Ef=D._setThrew=D.asm.jb).apply(null,arguments)},pc=D._memalign=function(){return(pc=D._memalign=D.asm.kb).apply(null,arguments)}; +D.dynCall_jiji=function(){return(D.dynCall_jiji=D.asm.lb).apply(null,arguments)};D.dynCall_ji=function(){return(D.dynCall_ji=D.asm.mb).apply(null,arguments)};D.dynCall_viijii=function(){return(D.dynCall_viijii=D.asm.nb).apply(null,arguments)};D.dynCall_iiiiij=function(){return(D.dynCall_iiiiij=D.asm.ob).apply(null,arguments)};D.dynCall_iiiiijj=function(){return(D.dynCall_iiiiijj=D.asm.pb).apply(null,arguments)};D.dynCall_iiiiiijj=function(){return(D.dynCall_iiiiiijj=D.asm.qb).apply(null,arguments)}; +var Ib=D.__emscripten_allow_main_runtime_queued_calls=287804,Cb=D.__emscripten_main_thread_futex=951836;function Af(a,b){var c=Ee();try{M.get(a)(b)}catch(d){Ob(c);if(d!==d+0&&"longjmp"!==d)throw d;Ef(1,0)}}function Bf(a,b,c){var d=Ee();try{M.get(a)(b,c)}catch(e){Ob(d);if(e!==e+0&&"longjmp"!==e)throw e;Ef(1,0)}}function zf(a,b,c,d){var e=Ee();try{return M.get(a)(b,c,d)}catch(f){Ob(e);if(f!==f+0&&"longjmp"!==f)throw f;Ef(1,0)}}D.addRunDependency=tb;D.removeRunDependency=ub;D.FS_createPath=Zc; +D.FS_createDataFile=ad;D.FS_createPreloadedFile=dd;D.FS_createLazyFile=cd;D.FS_createDevice=kb;D.FS_unlink=Sc;D.keepRuntimeAlive=fb;D.PThread=Q;D.PThread=Q;D.wasmMemory=n;D.ExitStatus=Fb;var Ff;function Fb(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}sb=function Gf(){Ff||Hf();Ff||(sb=Gf)}; +function Hf(){function a(){if(!Ff&&(Ff=!0,D.calledRun=!0,!Ia)){gb();la(D);if(D.onRuntimeInitialized)D.onRuntimeInitialized();if(!F){if(D.postRun)for("function"==typeof D.postRun&&(D.postRun=[D.postRun]);D.postRun.length;){var b=D.postRun.shift();db.unshift(b)}ob(db)}}}if(!(0=d);)++c;if(16e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d}function z(a,b){return a?ta(A,a,b):""} +var g;g||(g=typeof BlinkIDImageCaptureWasmSDK !== 'undefined' ? BlinkIDImageCaptureWasmSDK : {});var aa,ba;g.ready=new Promise(function(a,b){aa=a;ba=b});g.Nb||(g.Nb=0);g.Nb++; +(function(a){function b(m,p,n){var r=new XMLHttpRequest;r.open("GET",m,!0);r.responseType="arraybuffer";r.onprogress=function(v){var k=p;v.total&&(k=v.total);if(v.loaded){r.qc?g.kb[m].loaded=v.loaded:(r.qc=!0,g.kb||(g.kb={}),g.kb[m]={loaded:v.loaded,total:k});var u=k=v=0,x;for(x in g.kb){var y=g.kb[x];v+=y.total;k+=y.loaded;u++}v=Math.ceil(v*g.Nb/u);g.setStatus&&g.setStatus("Downloading data... ("+k+"/"+v+")")}else!g.kb&&g.setStatus&&g.setStatus("Downloading data...")};r.onerror=function(){throw Error("NetworkError for: "+ +m);};r.onload=function(){if(200==r.status||304==r.status||206==r.status||0==r.status&&r.response)n(r.response);else throw Error(r.statusText+" : "+r.responseURL);};r.send(null)}function c(m){console.error("package error:",m)}function d(){function m(v,k,u){this.start=v;this.end=k;this.audio=u}function p(v){if(!v)throw"Loading data file failed."+Error().stack;if(!(v instanceof ArrayBuffer))throw"bad input to processPackageData"+Error().stack;v=new Uint8Array(v);m.prototype.uc=v;v=a.files;for(var k= +0;k=d);)++c;if(16e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d}function z(a,b){return a?ua(A,a,b):""} function B(a,b,c,d){if(!(0=h){var l=a.charCodeAt(++f);h=65536+((h&1023)<<10)|l&1023}if(127>=h){if(c>=d)break;b[c++]=h}else{if(2047>=h){if(c+1>=d)break;b[c++]=192|h>>6}else{if(65535>=h){if(c+2>=d)break;b[c++]=224|h>>12}else{if(c+3>=d)break;b[c++]=240|h>>18;b[c++]=128|h>>12&63}b[c++]=128|h>>6&63}b[c++]=128|h&63}}b[c]=0;return c-e} -function ua(a){for(var b=0,c=0;c=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++c)&1023);127>=d?++b:b=2047>=d?b+2:65535>=d?b+3:b+4}return b}var va="undefined"!==typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function wa(a,b){var c=a>>1;for(var d=c+b/2;!(c>=d)&&C[c];)++c;c<<=1;if(32=b/2);++d){var e=xa[a+2*d>>1];if(0==e)break;c+=String.fromCharCode(e)}return c} -function ya(a,b,c){void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var e=0;e>1]=a.charCodeAt(e),b+=2;xa[b>>1]=0;return b-d}function za(a){return 2*a.length}function Aa(a,b){for(var c=0,d="";!(c>=b/4);){var e=E[a+4*c>>2];if(0==e)break;++c;65536<=e?(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023)):d+=String.fromCharCode(e)}return d} -function Ba(a,b,c){void 0===c&&(c=2147483647);if(4>c)return 0;var d=b;c=d+c-4;for(var e=0;e=f){var h=a.charCodeAt(++e);f=65536+((f&1023)<<10)|h&1023}E[b>>2]=f;b+=4;if(b+4>c)break}E[b>>2]=0;return b-d}function Ca(a){for(var b=0,c=0;c=d&&++c;b+=4}return b}function Da(a){var b=ua(a)+1,c=Ea(b);c&&B(a,F,c,b);return c}var Fa,F,A,xa,C,E,I,Ga,Ha; -function Ia(){var a=qa.buffer;Fa=a;g.HEAP8=F=new Int8Array(a);g.HEAP16=xa=new Int16Array(a);g.HEAP32=E=new Int32Array(a);g.HEAPU8=A=new Uint8Array(a);g.HEAPU16=C=new Uint16Array(a);g.HEAPU32=I=new Uint32Array(a);g.HEAPF32=Ga=new Float32Array(a);g.HEAPF64=Ha=new Float64Array(a)}var L,Ja=[],Ka=[],La=[];function Ma(){var a=g.preRun.shift();Ja.unshift(a)}var Na=0,Oa=null,Pa=null;function Qa(){Na++;g.monitorRunDependencies&&g.monitorRunDependencies(Na)} -function Ra(){Na--;g.monitorRunDependencies&&g.monitorRunDependencies(Na);if(0==Na&&(null!==Oa&&(clearInterval(Oa),Oa=null),Pa)){var a=Pa;Pa=null;a()}}g.preloadedImages={};g.preloadedAudios={};function t(a){if(g.onAbort)g.onAbort(a);a+="";r(a);ra=!0;a=new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");ba(a);throw a;}function Sa(){return Ta.startsWith("data:application/octet-stream;base64,")}var Ta="BlinkIDImageCaptureWasmSDK.wasm"; -if(!Sa()){var Va=Ta;Ta=g.locateFile?g.locateFile(Va,ka):ka+Va}function Wa(){var a=Ta;try{if(a==Ta&&pa)return new Uint8Array(pa);if(ma)return ma(a);throw"both async and sync fetching of the wasm failed";}catch(b){t(b)}}function Xa(){return pa||!ia&&!ja||"function"!==typeof fetch?Promise.resolve().then(function(){return Wa()}):fetch(Ta,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+Ta+"'";return a.arrayBuffer()}).catch(function(){return Wa()})} -var M,Ya,Za={292357:function(a){a=z(a);throw Error("Failed to reconfigure RecognizerRunner due to following error: "+a);},292493:function(a,b,c,d){a=z(a);b=z(b);c=z(c);d=z(d);throw Error(a+b+c+d);},292709:function(a,b){a=z(a);b=z(b);throw Error(a+b);},292819:function(a,b){a=z(a);b=z(b);console.log(a+b)},292917:function(a){throw Error(z(a));},292960:function(){throw Error("Unable to perform that operation while recognizer is in use!");}}; -function $a(a){for(;0>2]=60*f;E[db()>>2]=Number(b!=e);c=a(c);d=a(d);c=Da(c);d=Da(d);e>2]=c,E[eb()+4>>2]=d):(E[eb()>>2]=d,E[eb()+4>>2]=c)}}var bb; -function fb(a,b){for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a}function N(a){var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=fb(a.split("/").filter(function(d){return!!d}),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a} -function gb(a){var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b}function hb(a){if("/"===a)return"/";a=N(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)} -function ib(){if("object"===typeof crypto&&"function"===typeof crypto.getRandomValues){var a=new Uint8Array(1);return function(){crypto.getRandomValues(a);return a[0]}}return function(){t("randomDevice")}} -function jb(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:"/";if("string"!==typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=fb(a.split("/").filter(function(d){return!!d}),!b).join("/");return(b?"/":"")+a||"."}var kb=[];function lb(a,b){kb[a]={input:[],Wa:[],pb:b};mb(a,nb)} -var nb={open:function(a){var b=kb[a.node.ub];if(!b)throw new O(43);a.Ta=b;a.seekable=!1},close:function(a){a.Ta.pb.flush(a.Ta)},flush:function(a){a.Ta.pb.flush(a.Ta)},read:function(a,b,c,d){if(!a.Ta||!a.Ta.pb.fc)throw new O(60);for(var e=0,f=0;f=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.Na,a.Na=new Uint8Array(b),0=a.node.Sa)return 0;a=Math.min(a.node.Sa-e,d);if(8b)throw new O(28);return b},Yb:function(a,b,c){P.cc(a.node,b+c);a.node.Sa=Math.max(a.node.Sa,b+c)},Fb:function(a,b,c,d,e,f){if(0!==b)throw new O(28);if(32768!==(a.node.mode&61440))throw new O(43); -a=a.node.Na;if(f&2||a.buffer!==Fa){if(0>>0)%zb.length}function ub(a,b){var c;if(c=a.Oa.rb?0:2)throw new O(c,a);for(c=zb[Eb(a.id,b)];c;c=c.ob){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.Oa.rb(a,b)}function sb(a,b,c,d){a=new Fb(a,b,c,d);b=Eb(a.parent.id,a.name);a.ob=zb[b];return zb[b]=a} -function Q(a){return 16384===(a&61440)}var Gb={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090};function Hb(a,b){try{return ub(a,b),20}catch(c){}return 0}function Ib(a){var b=4096;for(a=a||0;a<=b;a++)if(!xb[a])return a;throw new O(33);}function Jb(a,b){Kb||(Kb=function(){},Kb.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}}});var c=new Kb,d;for(d in a)c[d]=a[d];a=c;b=Ib(b);a.eb=b;return xb[b]=a} -var rb={open:function(a){a.Pa=wb[a.node.ub].Pa;a.Pa.open&&a.Pa.open(a)},kb:function(){throw new O(70);}};function mb(a,b){wb[a]={Pa:b}}function Lb(a,b){var c="/"===b,d=!b;if(c&&vb)throw new O(10);if(!c&&!d){var e=Bb(b,{ec:!1});b=e.path;e=e.node;if(e.sb)throw new O(10);if(!Q(e.mode))throw new O(54);}b={type:a,md:{},ic:b,Nc:[]};a=a.hb(b);a.hb=b;b.root=a;c?vb=a:e&&(e.sb=b,e.hb&&e.hb.Nc.push(b))} -function Mb(a,b,c){var d=Bb(a,{parent:!0}).node;a=hb(a);if(!a||"."===a||".."===a)throw new O(28);var e=Hb(d,a);if(e)throw new O(e);if(!d.Oa.Eb)throw new O(63);return d.Oa.Eb(d,a,b,c)}function Nb(a){return Mb(a,16895,0)}function Ob(a,b,c){"undefined"===typeof c&&(c=b,b=438);return Mb(a,b|8192,c)}function Pb(a,b){if(!jb(a))throw new O(44);var c=Bb(b,{parent:!0}).node;if(!c)throw new O(44);b=hb(b);var d=Hb(c,b);if(d)throw new O(d);if(!c.Oa.Hb)throw new O(63);c.Oa.Hb(c,b,a)} -function Qb(a){var b=Bb(a,{parent:!0}).node,c=hb(a),d=ub(b,c);a:{try{var e=ub(b,c)}catch(f){e=f.Va;break a}e=Q(e.mode)?31:0}if(e)throw new O(e);if(!b.Oa.Lb)throw new O(63);if(d.sb)throw new O(10);try{Ab.willDeletePath&&Ab.willDeletePath(a)}catch(f){r("FS.trackingDelegate['willDeletePath']('"+a+"') threw an exception: "+f.message)}b.Oa.Lb(b,c);b=Eb(d.parent.id,d.name);if(zb[b]===d)zb[b]=d.ob;else for(b=zb[b];b;){if(b.ob===d){b.ob=d.ob;break}b=b.ob}try{if(Ab.onDeletePath)Ab.onDeletePath(a)}catch(f){r("FS.trackingDelegate['onDeletePath']('"+ -a+"') threw an exception: "+f.message)}}function Cb(a){a=Bb(a).node;if(!a)throw new O(44);if(!a.Oa.vb)throw new O(28);return jb(Db(a.parent),a.Oa.vb(a))}function Rb(a,b){a="string"===typeof a?Bb(a,{Ab:!0}).node:a;if(!a.Oa.Za)throw new O(63);a.Oa.Za(a,{mode:b&4095|a.mode&-4096,timestamp:Date.now()})} -function Sb(a,b,c,d){if(""===a)throw new O(44);if("string"===typeof b){var e=Gb[b];if("undefined"===typeof e)throw Error("Unknown file open mode: "+b);b=e}c=b&64?("undefined"===typeof c?438:c)&4095|32768:0;if("object"===typeof a)var f=a;else{a=N(a);try{f=Bb(a,{Ab:!(b&131072)}).node}catch(h){}}e=!1;if(b&64)if(f){if(b&128)throw new O(20);}else f=Mb(a,c,0),e=!0;if(!f)throw new O(44);8192===(f.mode&61440)&&(b&=-513);if(b&65536&&!Q(f.mode))throw new O(54);if(!e){if(f)if(40960===(f.mode&61440))c=32;else{if(c= -Q(f.mode))c=["r","w","rw"][b&3],b&512&&(c+="w"),c="r"!==c||b&512;c=c?31:0}else c=44;if(c)throw new O(c);}if(b&512){c=f;c="string"===typeof c?Bb(c,{Ab:!0}).node:c;if(!c.Oa.Za)throw new O(63);if(Q(c.mode))throw new O(31);if(32768!==(c.mode&61440))throw new O(28);c.Oa.Za(c,{size:0,timestamp:Date.now()})}b&=-131713;d=Jb({node:f,path:Db(f),flags:b,seekable:!0,position:0,Pa:f.Pa,ed:[],error:!1},d);d.Pa.open&&d.Pa.open(d);!g.logReadFiles||b&1||(Tb||(Tb={}),a in Tb||(Tb[a]=1,r("FS.trackingDelegate error on read file: "+ -a)));try{Ab.onOpenFile&&(f=0,1!==(b&2097155)&&(f|=1),0!==(b&2097155)&&(f|=2),Ab.onOpenFile(a,f))}catch(h){r("FS.trackingDelegate['onOpenFile']('"+a+"', flags) threw an exception: "+h.message)}return d}function Ub(a){if(null===a.eb)throw new O(8);a.Pb&&(a.Pb=null);try{a.Pa.close&&a.Pa.close(a)}catch(b){throw b;}finally{xb[a.eb]=null}a.eb=null} -function Vb(a,b,c){if(null===a.eb)throw new O(8);if(!a.seekable||!a.Pa.kb)throw new O(70);if(0!=c&&1!=c&&2!=c)throw new O(28);a.position=a.Pa.kb(a,b,c);a.ed=[]} -function Wb(a,b,c,d,e,f){if(0>d||0>e)throw new O(28);if(null===a.eb)throw new O(8);if(0===(a.flags&2097155))throw new O(8);if(Q(a.node.mode))throw new O(31);if(!a.Pa.write)throw new O(28);a.seekable&&a.flags&1024&&Vb(a,0,2);var h="undefined"!==typeof e;if(!h)e=a.position;else if(!a.seekable)throw new O(70);b=a.Pa.write(a,b,c,d,e,f);h||(a.position+=b);try{if(a.path&&Ab.onWriteToFile)Ab.onWriteToFile(a.path)}catch(l){r("FS.trackingDelegate['onWriteToFile']('"+a.path+"') threw an exception: "+l.message)}return b} -function Xb(){O||(O=function(a,b){this.node=b;this.Wc=function(c){this.Va=c};this.Wc(a);this.message="FS error"},O.prototype=Error(),O.prototype.constructor=O,[44].forEach(function(a){tb[a]=new O(a);tb[a].stack=""}))}var Yb;function Zb(a,b){var c=0;a&&(c|=365);b&&(c|=146);return c}function $b(a,b){a="string"===typeof a?a:Db(a);for(b=b.split("/").reverse();b.length;){var c=b.pop();if(c){var d=N(a+"/"+c);try{Nb(d)}catch(e){}a=d}}return d} -function ac(a,b,c,d){a=N(("string"===typeof a?a:Db(a))+"/"+b);c=Zb(c,d);return Mb(a,(void 0!==c?c:438)&4095|32768,0)}function bc(a,b,c,d,e,f){a=b?N(("string"===typeof a?a:Db(a))+"/"+b):a;d=Zb(d,e);e=Mb(a,(void 0!==d?d:438)&4095|32768,0);if(c){if("string"===typeof c){a=Array(c.length);b=0;for(var h=c.length;bthis.length-1||0>n)){var q=n%this.ac;return this.Bb(n/this.ac|0)[q]}};f.prototype.Vc=function(n){this.Bb=n};f.prototype.Zb=function(){var n=new XMLHttpRequest;n.open("HEAD",c,!1);n.send(null);if(!(200<=n.status&&300>n.status||304===n.status))throw Error("Couldn't load "+c+". Status: "+n.status);var q=Number(n.getResponseHeader("Content-length")),v,k=(v=n.getResponseHeader("Accept-Ranges"))&&"bytes"===v;n= -(v=n.getResponseHeader("Content-Encoding"))&&"gzip"===v;var u=1048576;k||(u=q);var x=this;x.Vc(function(y){var H=y*u,G=(y+1)*u-1;G=Math.min(G,q-1);if("undefined"===typeof x.zb[y]){var ha=x.zb;if(H>G)throw Error("invalid range ("+H+", "+G+") or no bytes requested!");if(G>q-1)throw Error("only "+q+" bytes available! programmer error!");var w=new XMLHttpRequest;w.open("GET",c,!1);q!==u&&w.setRequestHeader("Range","bytes="+H+"-"+G);"undefined"!=typeof Uint8Array&&(w.responseType="arraybuffer");w.overrideMimeType&& -w.overrideMimeType("text/plain; charset=x-user-defined");w.send(null);if(!(200<=w.status&&300>w.status||304===w.status))throw Error("Couldn't load "+c+". Status: "+w.status);H=void 0!==w.response?new Uint8Array(w.response||[]):ob(w.responseText||"",!0);ha[y]=H}if("undefined"===typeof x.zb[y])throw Error("doXHR failed!");return x.zb[y]});if(n||!q)u=q=1,u=q=this.Bb(0).length,na("LazyFiles on gzip forces download of the whole file when length is accessed");this.qc=q;this.pc=u;this.Sb=!0};if("undefined"!== -typeof XMLHttpRequest){if(!ja)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var h=new f;Object.defineProperties(h,{length:{get:function(){this.Sb||this.Zb();return this.qc}},ac:{get:function(){this.Sb||this.Zb();return this.pc}}});var l=void 0}else l=c,h=void 0;var m=ac(a,b,d,e);h?m.Na=h:l&&(m.Na=null,m.url=l);Object.defineProperties(m,{Sa:{get:function(){return this.Na.length}}});var p={};Object.keys(m.Pa).forEach(function(n){var q= -m.Pa[n];p[n]=function(){dc(m);return q.apply(null,arguments)}});p.read=function(n,q,v,k,u){dc(m);n=n.node.Na;if(u>=n.length)return 0;k=Math.min(n.length-u,k);if(n.slice)for(var x=0;x>2]=d.yc;E[b+4>>2]=0;E[b+8>>2]=d.Qb;E[b+12>>2]=d.mode;E[b+16>>2]=d.Pc;E[b+20>>2]=d.uid;E[b+24>>2]=d.Fc;E[b+28>>2]=d.ub;E[b+32>>2]=0;Ya=[d.size>>>0,(M=d.size,1<=+Math.abs(M)?0>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)];E[b+40>>2]=Ya[0];E[b+44>>2]=Ya[1];E[b+48>> -2]=4096;E[b+52>>2]=d.uc;E[b+56>>2]=d.sc.getTime()/1E3|0;E[b+60>>2]=0;E[b+64>>2]=d.Oc.getTime()/1E3|0;E[b+68>>2]=0;E[b+72>>2]=d.xc.getTime()/1E3|0;E[b+76>>2]=0;Ya=[d.Qb>>>0,(M=d.Qb,1<=+Math.abs(M)?0>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)];E[b+80>>2]=Ya[0];E[b+84>>2]=Ya[1];return 0}var jc=void 0;function kc(){jc+=4;return E[jc-4>>2]}function lc(a){a=xb[a];if(!a)throw new O(8);return a}var mc={}; -function nc(a){for(;a.length;){var b=a.pop();a.pop()(b)}}function oc(a){return this.fromWireType(I[a>>2])}var pc={},qc={},rc={};function sc(a){if(void 0===a)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?"_"+a:a}function tc(a,b){a=sc(a);return(new Function("body","return function "+a+'() {\n "use strict"; return body.apply(this, arguments);\n};\n'))(b)} -function uc(a){var b=Error,c=tc(a,function(d){this.name=a;this.message=d;d=Error(d).stack;void 0!==d&&(this.stack=this.toString()+"\n"+d.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(b.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message};return c}var vc=void 0;function wc(a){throw new vc(a);} -function xc(a,b,c){function d(l){l=c(l);l.length!==a.length&&wc("Mismatched type converter count");for(var m=0;m>2)+d]);return c} -function fd(a){var b=Function;if(!(b instanceof Function))throw new TypeError("new_ called with constructor type "+typeof b+" which is not a function");var c=tc(b.name||"unknownFunctionName",function(){});c.prototype=b.prototype;c=new c;a=b.apply(c,a);return a instanceof Object?a:c} -function gd(a,b,c,d,e){var f=b.length;2>f&&T("argTypes array size mismatch! Must at least get return value and 'this' types!");var h=null!==b[1]&&null!==c,l=!1;for(c=1;c>2])};case 3:return function(c){return this.fromWireType(Ha[c>>3])};default:throw new TypeError("Unknown float type: "+a);}} -function ld(a,b,c){switch(b){case 0:return c?function(d){return F[d]}:function(d){return A[d]};case 1:return c?function(d){return xa[d>>1]}:function(d){return C[d>>1]};case 2:return c?function(d){return E[d>>2]}:function(d){return I[d>>2]};default:throw new TypeError("Unknown integer type: "+a);}}function Y(a){a||T("Cannot use deleted val. handle = "+a);return X[a].value}function md(a,b){var c=qc[a];void 0===c&&T(b+" has unknown type "+bd(a));return c} -function nd(a,b){for(var c=Array(a),d=0;d>2)+d],"parameter "+d);return c}var od={};function pd(a){var b=od[a];return void 0===b?S(a):b}var qd=[];function rd(){return"object"===typeof globalThis?globalThis:Function("return this")()}function sd(a){var b=qd.length;qd.push(a);return b}var td={},ud;ud=function(){return performance.now()};var vd=[];function wd(){return!ja}g._emscripten_is_main_browser_thread=wd;var xd=[];function Z(a,b){I[a>>2]=b;I[a+4>>2]=b/4294967296|0}var yd; -function zd(a,b,c,d,e){function f(J){var K=0,D=0;J&&(D=w.response?w.response.byteLength:0,K=Ea(D),A.set(new Uint8Array(w.response),K));I[a+12>>2]=K;Z(a+16,D)}var h=I[a+8>>2];if(h){var l=z(h),m=a+112,p=z(m);p||(p="GET");var n=I[m+52>>2],q=I[m+56>>2],v=!!I[m+60>>2],k=I[m+68>>2],u=I[m+72>>2];h=I[m+76>>2];var x=I[m+80>>2],y=I[m+84>>2];m=I[m+88>>2];var H=!!(n&1),G=!!(n&2);n=!!(n&64);k=k?z(k):void 0;u=u?z(u):void 0;var ha=x?z(x):void 0,w=new XMLHttpRequest;w.withCredentials=v;w.open(p,l,!n,k,u);n||(w.timeout= -q);w.od=l;w.responseType="arraybuffer";x&&w.overrideMimeType(ha);if(h)for(;;){p=I[h>>2];if(!p)break;l=I[h+4>>2];if(!l)break;h+=8;p=z(p);l=z(l);w.setRequestHeader(p,l)}xd.push(w);I[a+0>>2]=xd.length;h=y&&m?A.slice(y,y+m):null;w.onload=function(J){f(H&&!G);var K=w.response?w.response.byteLength:0;Z(a+24,0);K&&Z(a+32,K);C[a+40>>1]=w.readyState;C[a+42>>1]=w.status;w.statusText&&B(w.statusText,A,a+44,64);200<=w.status&&300>w.status?b&&b(a,w,J):c&&c(a,w,J)};w.onerror=function(J){f(H);var K=w.status;Z(a+ -24,0);Z(a+32,w.response?w.response.byteLength:0);C[a+40>>1]=w.readyState;C[a+42>>1]=K;c&&c(a,w,J)};w.ontimeout=function(J){c&&c(a,w,J)};w.onprogress=function(J){var K=H&&G&&w.response?w.response.byteLength:0,D=0;H&&G&&(D=Ea(K),A.set(new Uint8Array(w.response),D));I[a+12>>2]=D;Z(a+16,K);Z(a+24,J.loaded-K);Z(a+32,J.total);C[a+40>>1]=w.readyState;3<=w.readyState&&0===w.status&&0>1]=w.status;w.statusText&&B(w.statusText,A,a+44,64);d&&d(a,w,J);D&&W(D)};w.onreadystatechange= -function(J){C[a+40>>1]=w.readyState;2<=w.readyState&&(C[a+42>>1]=w.status);e&&e(a,w,J)};try{w.send(h)}catch(J){c&&c(a,w,J)}}else c(a,0,"no url specified!")}function Ad(a,b){if(!ra)if(b)a();else try{a()}catch(c){if(!(c instanceof Bd)&&"unwind"!==c)throw c&&"object"===typeof c&&c.stack&&r("exception thrown: "+[c,c.stack]),c;}} -function Cd(a,b,c,d){var e=yd;if(e){var f=I[a+112+64>>2];f||(f=I[a+8>>2]);var h=z(f);try{var l=e.transaction(["FILES"],"readwrite").objectStore("FILES").put(b,h);l.onsuccess=function(){C[a+40>>1]=4;C[a+42>>1]=200;B("OK",A,a+44,64);c(a,0,h)};l.onerror=function(m){C[a+40>>1]=4;C[a+42>>1]=413;B("Payload Too Large",A,a+44,64);d(a,0,m)}}catch(m){d(a,0,m)}}else d(a,0,"IndexedDB not available!")} -function Dd(a,b,c){var d=yd;if(d){var e=I[a+112+64>>2];e||(e=I[a+8>>2]);e=z(e);try{var f=d.transaction(["FILES"],"readonly").objectStore("FILES").get(e);f.onsuccess=function(h){if(h.target.result){h=h.target.result;var l=h.byteLength||h.length,m=Ea(l);A.set(new Uint8Array(h),m);I[a+12>>2]=m;Z(a+16,l);Z(a+24,0);Z(a+32,l);C[a+40>>1]=4;C[a+42>>1]=200;B("OK",A,a+44,64);b(a,0,h)}else C[a+40>>1]=4,C[a+42>>1]=404,B("Not Found",A,a+44,64),c(a,0,"no data")};f.onerror=function(h){C[a+40>>1]=4;C[a+42>>1]=404; +function va(a){for(var b=0,c=0;c=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++c)&1023);127>=d?++b:b=2047>=d?b+2:65535>=d?b+3:b+4}return b}var wa="undefined"!==typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function xa(a,b){var c=a>>1;for(var d=c+b/2;!(c>=d)&&C[c];)++c;c<<=1;if(32=b/2);++d){var e=ya[a+2*d>>1];if(0==e)break;c+=String.fromCharCode(e)}return c} +function za(a,b,c){void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var e=0;e>1]=a.charCodeAt(e),b+=2;ya[b>>1]=0;return b-d}function Aa(a){return 2*a.length}function Ba(a,b){for(var c=0,d="";!(c>=b/4);){var e=E[a+4*c>>2];if(0==e)break;++c;65536<=e?(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023)):d+=String.fromCharCode(e)}return d} +function Ca(a,b,c){void 0===c&&(c=2147483647);if(4>c)return 0;var d=b;c=d+c-4;for(var e=0;e=f){var h=a.charCodeAt(++e);f=65536+((f&1023)<<10)|h&1023}E[b>>2]=f;b+=4;if(b+4>c)break}E[b>>2]=0;return b-d}function Da(a){for(var b=0,c=0;c=d&&++c;b+=4}return b}function Ea(a){var b=va(a)+1,c=Fa(b);c&&B(a,F,c,b);return c}var Ga,F,A,ya,C,E,I,Ha,Ia; +function Ja(){var a=ra.buffer;Ga=a;g.HEAP8=F=new Int8Array(a);g.HEAP16=ya=new Int16Array(a);g.HEAP32=E=new Int32Array(a);g.HEAPU8=A=new Uint8Array(a);g.HEAPU16=C=new Uint16Array(a);g.HEAPU32=I=new Uint32Array(a);g.HEAPF32=Ha=new Float32Array(a);g.HEAPF64=Ia=new Float64Array(a)}var L,Ka=[],La=[],Ma=[];function Na(){var a=g.preRun.shift();Ka.unshift(a)}var Oa=0,Pa=null,Qa=null;function Ra(){Oa++;g.monitorRunDependencies&&g.monitorRunDependencies(Oa)} +function Sa(){Oa--;g.monitorRunDependencies&&g.monitorRunDependencies(Oa);if(0==Oa&&(null!==Pa&&(clearInterval(Pa),Pa=null),Qa)){var a=Qa;Qa=null;a()}}g.preloadedImages={};g.preloadedAudios={};function t(a){if(g.onAbort)g.onAbort(a);a+="";q(a);sa=!0;a=new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");ba(a);throw a;}function Ta(){return Ua.startsWith("data:application/octet-stream;base64,")}var Ua;Ua="BlinkIDImageCaptureWasmSDK.wasm"; +if(!Ta()){var Wa=Ua;Ua=g.locateFile?g.locateFile(Wa,ka):ka+Wa}function Xa(){var a=Ua;try{if(a==Ua&&qa)return new Uint8Array(qa);if(na)return na(a);throw"both async and sync fetching of the wasm failed";}catch(b){t(b)}}function Ya(){return qa||!ia&&!ja||"function"!==typeof fetch?Promise.resolve().then(function(){return Xa()}):fetch(Ua,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+Ua+"'";return a.arrayBuffer()}).catch(function(){return Xa()})} +var M,Za,$a={286313:function(a){a=z(a);throw Error("Failed to reconfigure RecognizerRunner due to following error: "+a);},286449:function(a,b,c,d){a=z(a);b=z(b);c=z(c);d=z(d);throw Error(a+b+c+d);},286665:function(a,b){a=z(a);b=z(b);throw Error(a+b);},286775:function(a,b){a=z(a);b=z(b);console.log(a+b)},286873:function(a){throw Error(z(a));},286916:function(){throw Error("Unable to perform that operation while recognizer is in use!");}}; +function ab(a){for(;0>2]=60*f;E[db()>>2]=Number(b!=e);c=a(c);d=a(d);c=Ea(c);d=Ea(d);e>2]=c,E[eb()+4>>2]=d):(E[eb()>>2]=d,E[eb()+4>>2]=c)}var fb; +function gb(a,b){for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a}function N(a){var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=gb(a.split("/").filter(function(d){return!!d}),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a} +function hb(a){var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b}function ib(a){if("/"===a)return"/";a=N(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)} +function jb(){if("object"===typeof crypto&&"function"===typeof crypto.getRandomValues){var a=new Uint8Array(1);return function(){crypto.getRandomValues(a);return a[0]}}return function(){t("randomDevice")}} +function kb(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:"/";if("string"!==typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=gb(a.split("/").filter(function(d){return!!d}),!b).join("/");return(b?"/":"")+a||"."}var lb=[];function mb(a,b){lb[a]={input:[],Ua:[],ob:b};nb(a,ob)} +var ob={open:function(a){var b=lb[a.node.tb];if(!b)throw new O(43);a.Sa=b;a.seekable=!1},close:function(a){a.Sa.ob.flush(a.Sa)},flush:function(a){a.Sa.ob.flush(a.Sa)},read:function(a,b,c,d){if(!a.Sa||!a.Sa.ob.ec)throw new O(60);for(var e=0,f=0;f=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.Ma,a.Ma=new Uint8Array(b),0=a.node.Ra)return 0; +a=Math.min(a.node.Ra-e,d);if(8b)throw new O(28);return b},Xb:function(a,b,c){P.bc(a.node,b+c);a.node.Ra=Math.max(a.node.Ra,b+c)},Eb:function(a,b,c,d,e,f){if(0!==b)throw new O(28);if(32768!==(a.node.mode&61440))throw new O(43);a=a.node.Ma;if(f&2||a.buffer!==Ga){if(0>>0)%Db.length}function xb(a,b){var c;if(c=(c=Kb(a,"x"))?c:a.Na.qb?0:2)throw new O(c,a);for(c=Db[Jb(a.id,b)];c;c=c.nb){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.Na.qb(a,b)} +function vb(a,b,c,d){a=new Lb(a,b,c,d);b=Jb(a.parent.id,a.name);a.nb=Db[b];return Db[b]=a}function Q(a){return 16384===(a&61440)}var Mb={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090};function Nb(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b}function Kb(a,b){if(Eb)return 0;if(!b.includes("r")||a.mode&292){if(b.includes("w")&&!(a.mode&146)||b.includes("x")&&!(a.mode&73))return 2}else return 2;return 0}function Ob(a,b){try{return xb(a,b),20}catch(c){}return Kb(a,"wx")} +function Pb(a){var b=4096;for(a=a||0;a<=b;a++)if(!Bb[a])return a;throw new O(33);}function Qb(a,b){Rb||(Rb=function(){},Rb.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}}});var c=new Rb,d;for(d in a)c[d]=a[d];a=c;b=Pb(b);a.cb=b;return Bb[b]=a}var ub={open:function(a){a.Oa=Ab[a.node.tb].Oa;a.Oa.open&&a.Oa.open(a)},jb:function(){throw new O(70);}};function nb(a,b){Ab[a]={Oa:b}} +function Sb(a,b){var c="/"===b,d=!b;if(c&&zb)throw new O(10);if(!c&&!d){var e=Gb(b,{dc:!1});b=e.path;e=e.node;if(e.rb)throw new O(10);if(!Q(e.mode))throw new O(54);}b={type:a,kd:{},hc:b,Mc:[]};a=a.gb(b);a.gb=b;b.root=a;c?zb=a:e&&(e.rb=b,e.gb&&e.gb.Mc.push(b))}function Tb(a,b,c){var d=Gb(a,{parent:!0}).node;a=ib(a);if(!a||"."===a||".."===a)throw new O(28);var e=Ob(d,a);if(e)throw new O(e);if(!d.Na.Db)throw new O(63);return d.Na.Db(d,a,b,c)}function Ub(a){return Tb(a,16895,0)} +function Vb(a,b,c){"undefined"===typeof c&&(c=b,b=438);return Tb(a,b|8192,c)}function Wb(a,b){if(!kb(a))throw new O(44);var c=Gb(b,{parent:!0}).node;if(!c)throw new O(44);b=ib(b);var d=Ob(c,b);if(d)throw new O(d);if(!c.Na.Gb)throw new O(63);c.Na.Gb(c,b,a)} +function Xb(a){var b=Gb(a,{parent:!0}).node,c=ib(a),d=xb(b,c);a:{try{var e=xb(b,c)}catch(h){e=h.Wa;break a}var f=Kb(b,"wx");e=f?f:Q(e.mode)?31:0}if(e)throw new O(e);if(!b.Na.Kb)throw new O(63);if(d.rb)throw new O(10);try{Fb.willDeletePath&&Fb.willDeletePath(a)}catch(h){q("FS.trackingDelegate['willDeletePath']('"+a+"') threw an exception: "+h.message)}b.Na.Kb(b,c);b=Jb(d.parent.id,d.name);if(Db[b]===d)Db[b]=d.nb;else for(b=Db[b];b;){if(b.nb===d){b.nb=d.nb;break}b=b.nb}try{if(Fb.onDeletePath)Fb.onDeletePath(a)}catch(h){q("FS.trackingDelegate['onDeletePath']('"+ +a+"') threw an exception: "+h.message)}}function Hb(a){a=Gb(a).node;if(!a)throw new O(44);if(!a.Na.ub)throw new O(28);return kb(Ib(a.parent),a.Na.ub(a))}function Yb(a,b){a="string"===typeof a?Gb(a,{zb:!0}).node:a;if(!a.Na.Ya)throw new O(63);a.Na.Ya(a,{mode:b&4095|a.mode&-4096,timestamp:Date.now()})} +function Zb(a,b,c,d){if(""===a)throw new O(44);if("string"===typeof b){var e=Mb[b];if("undefined"===typeof e)throw Error("Unknown file open mode: "+b);b=e}c=b&64?("undefined"===typeof c?438:c)&4095|32768:0;if("object"===typeof a)var f=a;else{a=N(a);try{f=Gb(a,{zb:!(b&131072)}).node}catch(h){}}e=!1;if(b&64)if(f){if(b&128)throw new O(20);}else f=Tb(a,c,0),e=!0;if(!f)throw new O(44);8192===(f.mode&61440)&&(b&=-513);if(b&65536&&!Q(f.mode))throw new O(54);if(!e&&(c=f?40960===(f.mode&61440)?32:Q(f.mode)&& +("r"!==Nb(b)||b&512)?31:Kb(f,Nb(b)):44))throw new O(c);if(b&512){c=f;c="string"===typeof c?Gb(c,{zb:!0}).node:c;if(!c.Na.Ya)throw new O(63);if(Q(c.mode))throw new O(31);if(32768!==(c.mode&61440))throw new O(28);if(e=Kb(c,"w"))throw new O(e);c.Na.Ya(c,{size:0,timestamp:Date.now()})}b&=-131713;d=Qb({node:f,path:Ib(f),flags:b,seekable:!0,position:0,Oa:f.Oa,dd:[],error:!1},d);d.Oa.open&&d.Oa.open(d);!g.logReadFiles||b&1||($b||($b={}),a in $b||($b[a]=1,q("FS.trackingDelegate error on read file: "+a))); +try{Fb.onOpenFile&&(f=0,1!==(b&2097155)&&(f|=1),0!==(b&2097155)&&(f|=2),Fb.onOpenFile(a,f))}catch(h){q("FS.trackingDelegate['onOpenFile']('"+a+"', flags) threw an exception: "+h.message)}return d}function ac(a){if(null===a.cb)throw new O(8);a.Ob&&(a.Ob=null);try{a.Oa.close&&a.Oa.close(a)}catch(b){throw b;}finally{Bb[a.cb]=null}a.cb=null}function bc(a,b,c){if(null===a.cb)throw new O(8);if(!a.seekable||!a.Oa.jb)throw new O(70);if(0!=c&&1!=c&&2!=c)throw new O(28);a.position=a.Oa.jb(a,b,c);a.dd=[]} +function cc(a,b,c,d,e,f){if(0>d||0>e)throw new O(28);if(null===a.cb)throw new O(8);if(0===(a.flags&2097155))throw new O(8);if(Q(a.node.mode))throw new O(31);if(!a.Oa.write)throw new O(28);a.seekable&&a.flags&1024&&bc(a,0,2);var h="undefined"!==typeof e;if(!h)e=a.position;else if(!a.seekable)throw new O(70);b=a.Oa.write(a,b,c,d,e,f);h||(a.position+=b);try{if(a.path&&Fb.onWriteToFile)Fb.onWriteToFile(a.path)}catch(l){q("FS.trackingDelegate['onWriteToFile']('"+a.path+"') threw an exception: "+l.message)}return b} +function dc(){O||(O=function(a,b){this.node=b;this.Vc=function(c){this.Wa=c};this.Vc(a);this.message="FS error"},O.prototype=Error(),O.prototype.constructor=O,[44].forEach(function(a){wb[a]=new O(a);wb[a].stack=""}))}var ec;function fc(a,b){var c=0;a&&(c|=365);b&&(c|=146);return c}function gc(a,b){a="string"===typeof a?a:Ib(a);for(b=b.split("/").reverse();b.length;){var c=b.pop();if(c){var d=N(a+"/"+c);try{Ub(d)}catch(e){}a=d}}return d} +function hc(a,b,c,d){a=N(("string"===typeof a?a:Ib(a))+"/"+b);c=fc(c,d);return Tb(a,(void 0!==c?c:438)&4095|32768,0)}function ic(a,b,c,d,e,f){a=b?N(("string"===typeof a?a:Ib(a))+"/"+b):a;d=fc(d,e);e=Tb(a,(void 0!==d?d:438)&4095|32768,0);if(c){if("string"===typeof c){a=Array(c.length);b=0;for(var h=c.length;bthis.length-1||0>n)){var r=n%this.$b;return this.Ab(n/this.$b|0)[r]}};f.prototype.Uc=function(n){this.Ab=n};f.prototype.Yb=function(){var n=new XMLHttpRequest;n.open("HEAD",c,!1);n.send(null);if(!(200<=n.status&&300>n.status||304===n.status))throw Error("Couldn't load "+c+". Status: "+n.status);var r=Number(n.getResponseHeader("Content-length")),v,k=(v=n.getResponseHeader("Accept-Ranges"))&&"bytes"===v;n= +(v=n.getResponseHeader("Content-Encoding"))&&"gzip"===v;var u=1048576;k||(u=r);var x=this;x.Uc(function(y){var H=y*u,G=(y+1)*u-1;G=Math.min(G,r-1);if("undefined"===typeof x.yb[y]){var ha=x.yb;if(H>G)throw Error("invalid range ("+H+", "+G+") or no bytes requested!");if(G>r-1)throw Error("only "+r+" bytes available! programmer error!");var w=new XMLHttpRequest;w.open("GET",c,!1);r!==u&&w.setRequestHeader("Range","bytes="+H+"-"+G);"undefined"!=typeof Uint8Array&&(w.responseType="arraybuffer");w.overrideMimeType&& +w.overrideMimeType("text/plain; charset=x-user-defined");w.send(null);if(!(200<=w.status&&300>w.status||304===w.status))throw Error("Couldn't load "+c+". Status: "+w.status);H=void 0!==w.response?new Uint8Array(w.response||[]):pb(w.responseText||"",!0);ha[y]=H}if("undefined"===typeof x.yb[y])throw Error("doXHR failed!");return x.yb[y]});if(n||!r)u=r=1,u=r=this.Ab(0).length,oa("LazyFiles on gzip forces download of the whole file when length is accessed");this.pc=r;this.oc=u;this.Rb=!0};if("undefined"!== +typeof XMLHttpRequest){if(!ja)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var h=new f;Object.defineProperties(h,{length:{get:function(){this.Rb||this.Yb();return this.pc}},$b:{get:function(){this.Rb||this.Yb();return this.oc}}});var l=void 0}else l=c,h=void 0;var m=hc(a,b,d,e);h?m.Ma=h:l&&(m.Ma=null,m.url=l);Object.defineProperties(m,{Ra:{get:function(){return this.Ma.length}}});var p={};Object.keys(m.Oa).forEach(function(n){var r= +m.Oa[n];p[n]=function(){kc(m);return r.apply(null,arguments)}});p.read=function(n,r,v,k,u){kc(m);n=n.node.Ma;if(u>=n.length)return 0;k=Math.min(n.length-u,k);if(n.slice)for(var x=0;x>2]=d.xc;E[b+4>>2]=0;E[b+8>>2]=d.Pb;E[b+12>>2]=d.mode;E[b+16>>2]=d.Oc;E[b+20>>2]=d.uid;E[b+24>>2]=d.Ec;E[b+28>>2]=d.tb;E[b+32>>2]=0;Za=[d.size>>>0,(M=d.size,1<=+Math.abs(M)?0>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)];E[b+40>>2]=Za[0];E[b+44>>2]=Za[1];E[b+48>> +2]=4096;E[b+52>>2]=d.tc;E[b+56>>2]=d.rc.getTime()/1E3|0;E[b+60>>2]=0;E[b+64>>2]=d.Nc.getTime()/1E3|0;E[b+68>>2]=0;E[b+72>>2]=d.wc.getTime()/1E3|0;E[b+76>>2]=0;Za=[d.Pb>>>0,(M=d.Pb,1<=+Math.abs(M)?0>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)];E[b+80>>2]=Za[0];E[b+84>>2]=Za[1];return 0}var qc=void 0;function rc(){qc+=4;return E[qc-4>>2]}function sc(a){a=Bb[a];if(!a)throw new O(8);return a}var tc={}; +function uc(a){for(;a.length;){var b=a.pop();a.pop()(b)}}function vc(a){return this.fromWireType(I[a>>2])}var wc={},xc={},yc={};function zc(a){if(void 0===a)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?"_"+a:a}function Ac(a,b){a=zc(a);return(new Function("body","return function "+a+'() {\n "use strict"; return body.apply(this, arguments);\n};\n'))(b)} +function Bc(a){var b=Error,c=Ac(a,function(d){this.name=a;this.message=d;d=Error(d).stack;void 0!==d&&(this.stack=this.toString()+"\n"+d.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(b.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message};return c}var Cc=void 0;function Dc(a){throw new Cc(a);} +function Ec(a,b,c){function d(l){l=c(l);l.length!==a.length&&Dc("Mismatched type converter count");for(var m=0;m>2)+d]);return c} +function nd(a){var b=Function;if(!(b instanceof Function))throw new TypeError("new_ called with constructor type "+typeof b+" which is not a function");var c=Ac(b.name||"unknownFunctionName",function(){});c.prototype=b.prototype;c=new c;a=b.apply(c,a);return a instanceof Object?a:c} +function od(a,b,c,d,e){var f=b.length;2>f&&T("argTypes array size mismatch! Must at least get return value and 'this' types!");var h=null!==b[1]&&null!==c,l=!1;for(c=1;c>2])};case 3:return function(c){return this.fromWireType(Ia[c>>3])};default:throw new TypeError("Unknown float type: "+a);}} +function sd(a,b,c){switch(b){case 0:return c?function(d){return F[d]}:function(d){return A[d]};case 1:return c?function(d){return ya[d>>1]}:function(d){return C[d>>1]};case 2:return c?function(d){return E[d>>2]}:function(d){return I[d>>2]};default:throw new TypeError("Unknown integer type: "+a);}}function Y(a){a||T("Cannot use deleted val. handle = "+a);return X[a].value}function td(a,b){var c=xc[a];void 0===c&&T(b+" has unknown type "+jd(a));return c} +function ud(a,b){for(var c=Array(a),d=0;d>2)+d],"parameter "+d);return c}var vd={};function wd(a){var b=vd[a];return void 0===b?S(a):b}var xd=[];function yd(){return"object"===typeof globalThis?globalThis:Function("return this")()}function zd(a){var b=xd.length;xd.push(a);return b}var Ad={},Bd;Bd=function(){return performance.now()};var Cd=[],Dd=[];function Z(a,b){I[a>>2]=b;I[a+4>>2]=b/4294967296|0}var Ed; +function Fd(a,b,c,d,e){function f(J){var K=0,D=0;J&&(D=w.response?w.response.byteLength:0,K=Fa(D),A.set(new Uint8Array(w.response),K));I[a+12>>2]=K;Z(a+16,D)}var h=I[a+8>>2];if(h){var l=z(h),m=a+112,p=z(m);p||(p="GET");var n=I[m+52>>2],r=I[m+56>>2],v=!!I[m+60>>2],k=I[m+68>>2],u=I[m+72>>2];h=I[m+76>>2];var x=I[m+80>>2],y=I[m+84>>2];m=I[m+88>>2];var H=!!(n&1),G=!!(n&2);n=!!(n&64);k=k?z(k):void 0;u=u?z(u):void 0;var ha=x?z(x):void 0,w=new XMLHttpRequest;w.withCredentials=v;w.open(p,l,!n,k,u);n||(w.timeout= +r);w.md=l;w.responseType="arraybuffer";x&&w.overrideMimeType(ha);if(h)for(;;){p=I[h>>2];if(!p)break;l=I[h+4>>2];if(!l)break;h+=8;p=z(p);l=z(l);w.setRequestHeader(p,l)}Dd.push(w);I[a+0>>2]=Dd.length;h=y&&m?A.slice(y,y+m):null;w.onload=function(J){f(H&&!G);var K=w.response?w.response.byteLength:0;Z(a+24,0);K&&Z(a+32,K);C[a+40>>1]=w.readyState;C[a+42>>1]=w.status;w.statusText&&B(w.statusText,A,a+44,64);200<=w.status&&300>w.status?b&&b(a,w,J):c&&c(a,w,J)};w.onerror=function(J){f(H);var K=w.status;Z(a+ +24,0);Z(a+32,w.response?w.response.byteLength:0);C[a+40>>1]=w.readyState;C[a+42>>1]=K;c&&c(a,w,J)};w.ontimeout=function(J){c&&c(a,w,J)};w.onprogress=function(J){var K=H&&G&&w.response?w.response.byteLength:0,D=0;H&&G&&(D=Fa(K),A.set(new Uint8Array(w.response),D));I[a+12>>2]=D;Z(a+16,K);Z(a+24,J.loaded-K);Z(a+32,J.total);C[a+40>>1]=w.readyState;3<=w.readyState&&0===w.status&&0>1]=w.status;w.statusText&&B(w.statusText,A,a+44,64);d&&d(a,w,J);D&&W(D)};w.onreadystatechange= +function(J){C[a+40>>1]=w.readyState;2<=w.readyState&&(C[a+42>>1]=w.status);e&&e(a,w,J)};try{w.send(h)}catch(J){c&&c(a,w,J)}}else c(a,0,"no url specified!")}function Gd(a,b){if(!sa)if(b)a();else try{a()}catch(c){if(a=c,!(a instanceof Hd||"unwind"===a))throw a&&"object"===typeof a&&a.stack&&q("exception thrown: "+[a,a.stack]),a;}} +function Id(a,b,c,d){var e=Ed;if(e){var f=I[a+112+64>>2];f||(f=I[a+8>>2]);var h=z(f);try{var l=e.transaction(["FILES"],"readwrite").objectStore("FILES").put(b,h);l.onsuccess=function(){C[a+40>>1]=4;C[a+42>>1]=200;B("OK",A,a+44,64);c(a,0,h)};l.onerror=function(m){C[a+40>>1]=4;C[a+42>>1]=413;B("Payload Too Large",A,a+44,64);d(a,0,m)}}catch(m){d(a,0,m)}}else d(a,0,"IndexedDB not available!")} +function Jd(a,b,c){var d=Ed;if(d){var e=I[a+112+64>>2];e||(e=I[a+8>>2]);e=z(e);try{var f=d.transaction(["FILES"],"readonly").objectStore("FILES").get(e);f.onsuccess=function(h){if(h.target.result){h=h.target.result;var l=h.byteLength||h.length,m=Fa(l);A.set(new Uint8Array(h),m);I[a+12>>2]=m;Z(a+16,l);Z(a+24,0);Z(a+32,l);C[a+40>>1]=4;C[a+42>>1]=200;B("OK",A,a+44,64);b(a,0,h)}else C[a+40>>1]=4,C[a+42>>1]=404,B("Not Found",A,a+44,64),c(a,0,"no data")};f.onerror=function(h){C[a+40>>1]=4;C[a+42>>1]=404; B("Not Found",A,a+44,64);c(a,0,h)}}catch(h){c(a,0,h)}}else c(a,0,"IndexedDB not available!")} -function Ed(a,b,c){var d=yd;if(d){var e=I[a+112+64>>2];e||(e=I[a+8>>2]);e=z(e);try{var f=d.transaction(["FILES"],"readwrite").objectStore("FILES").delete(e);f.onsuccess=function(h){h=h.target.result;I[a+12>>2]=0;Z(a+16,0);Z(a+24,0);Z(a+32,0);C[a+40>>1]=4;C[a+42>>1]=200;B("OK",A,a+44,64);b(a,0,h)};f.onerror=function(h){C[a+40>>1]=4;C[a+42>>1]=404;B("Not Found",A,a+44,64);c(a,0,h)}}catch(h){c(a,0,h)}}else c(a,0,"IndexedDB not available!")}var Fd={}; -function Gd(){if(!Hd){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"===typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ea||"./this.program"},b;for(b in Fd)a[b]=Fd[b];var c=[];for(b in a)c.push(b+"="+a[b]);Hd=c}return Hd}var Hd;function Id(a,b){Id.kc||(Id.kc=ib());for(var c=0;c>0]=Id.kc();return 0}function Jd(a){return 0===a%4&&(0!==a%100||0===a%400)} -function Kd(a,b){for(var c=0,d=0;d<=b;c+=a[d++]);return c}var Ld=[31,29,31,30,31,30,31,31,30,31,30,31],Md=[31,28,31,30,31,30,31,31,30,31,30,31];function Nd(a,b){for(a=new Date(a.getTime());0d-a.getDate())b-=d-a.getDate()+1,a.setDate(1),11>c?a.setMonth(c+1):(a.setMonth(0),a.setFullYear(a.getFullYear()+1));else{a.setDate(a.getDate()+b);break}}return a} -function Od(a,b,c,d){function e(k,u,x){for(k="number"===typeof k?k.toString():k||"";k.lengthH?-1:0=h(x,k)?0>=h(u,k)?k.getFullYear()+1:k.getFullYear():k.getFullYear()-1}var p=E[d+40>>2];d={cd:E[d>>2],bd:E[d+4>>2],Ib:E[d+8>>2],wb:E[d+12>>2],qb:E[d+16>>2],Ya:E[d+20>>2],Jb:E[d+24>>2],Kb:E[d+28>>2],nd:E[d+32>>2],ad:E[d+ -36>>2],dd:p?z(p):""};c=z(c);p={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var n in p)c=c.replace(new RegExp(n,"g"),p[n]);var q="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), -v="January February March April May June July August September October November December".split(" ");p={"%a":function(k){return q[k.Jb].substring(0,3)},"%A":function(k){return q[k.Jb]},"%b":function(k){return v[k.qb].substring(0,3)},"%B":function(k){return v[k.qb]},"%C":function(k){return f((k.Ya+1900)/100|0,2)},"%d":function(k){return f(k.wb,2)},"%e":function(k){return e(k.wb,2," ")},"%g":function(k){return m(k).toString().substring(2)},"%G":function(k){return m(k)},"%H":function(k){return f(k.Ib, -2)},"%I":function(k){k=k.Ib;0==k?k=12:12k.Ib?"AM":"PM"},"%S":function(k){return f(k.cd,2)},"%t":function(){return"\t"},"%u":function(k){return k.Jb||7},"%U":function(k){var u=new Date(k.Ya+1900,0,1),x=0===u.getDay()?u:Nd(u,7-u.getDay());k=new Date(k.Ya+1900,k.qb,k.wb);return 0> -h(x,k)?f(Math.ceil((31-x.getDate()+(Kd(Jd(k.getFullYear())?Ld:Md,k.getMonth()-1)-31)+k.getDate())/7),2):0===h(x,u)?"01":"00"},"%V":function(k){var u=new Date(k.Ya+1901,0,4),x=l(new Date(k.Ya+1900,0,4));u=l(u);var y=Nd(new Date(k.Ya+1900,0,1),k.Kb);return 0>h(y,x)?"53":0>=h(u,y)?"01":f(Math.ceil((x.getFullYear()h(x,k)?f(Math.ceil((31-x.getDate()+(Kd(Jd(k.getFullYear())?Ld:Md,k.getMonth()-1)-31)+k.getDate())/7),2):0===h(x,u)?"01":"00"},"%y":function(k){return(k.Ya+1900).toString().substring(2)},"%Y":function(k){return k.Ya+1900},"%z":function(k){k=k.ad;var u=0<=k;k=Math.abs(k)/60;return(u?"+":"-")+String("0000"+(k/60*100+k%60)).slice(-4)},"%Z":function(k){return k.dd},"%%":function(){return"%"}};for(n in p)c.includes(n)&&(c=c.replace(new RegExp(n,"g"),p[n](d)));n=ob(c, -!1);if(n.length>b)return 0;F.set(n,a);return n.length-1}function Fb(a,b,c,d){a||(a=this);this.parent=a;this.hb=a.hb;this.sb=null;this.id=yb++;this.name=b;this.mode=c;this.Oa={};this.Pa={};this.ub=d} -Object.defineProperties(Fb.prototype,{read:{get:function(){return 365===(this.mode&365)},set:function(a){a?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(a){a?this.mode|=146:this.mode&=-147}},Jc:{get:function(){return Q(this.mode)}},Ic:{get:function(){return 8192===(this.mode&61440)}}});Xb();zb=Array(4096);Lb(P,"/");Nb("/tmp");Nb("/home");Nb("/home/web_user"); -(function(){Nb("/dev");mb(259,{read:function(){return 0},write:function(b,c,d,e){return e}});Ob("/dev/null",259);lb(1280,pb);lb(1536,qb);Ob("/dev/tty",1280);Ob("/dev/tty1",1536);var a=ib();cc("/dev","random",a);cc("/dev","urandom",a);Nb("/dev/shm");Nb("/dev/shm/tmp")})(); -(function(){Nb("/proc");var a=Nb("/proc/self");Nb("/proc/self/fd");Lb({hb:function(){var b=sb(a,"fd",16895,73);b.Oa={rb:function(c,d){var e=xb[+d];if(!e)throw new O(8);c={parent:null,hb:{ic:"fake"},Oa:{vb:function(){return e.path}}};return c.parent=c}};return b}},"/proc/self/fd")})();var gc;g.FS_createPath=$b;g.FS_createDataFile=bc;g.FS_createPreloadedFile=fc;g.FS_createLazyFile=ec;g.FS_createDevice=cc;g.FS_unlink=Qb;vc=g.InternalError=uc("InternalError"); -for(var Pd=Array(256),Qd=0;256>Qd;++Qd)Pd[Qd]=String.fromCharCode(Qd);Ac=Pd;Bc=g.BindingError=uc("BindingError");Kc.prototype.isAliasOf=function(a){if(!(this instanceof Kc&&a instanceof Kc))return!1;var b=this.Ma.Ua.Qa,c=this.Ma.Ra,d=a.Ma.Ua.Qa;for(a=a.Ma.Ra;b.bb;)c=b.xb(c),b=b.bb;for(;d.bb;)a=d.xb(a),d=d.bb;return b===d&&c===a}; -Kc.prototype.clone=function(){this.Ma.Ra||Cc(this);if(this.Ma.tb)return this.Ma.count.value+=1,this;var a=Gc,b=Object,c=b.create,d=Object.getPrototypeOf(this),e=this.Ma;a=a(c.call(b,d,{Ma:{value:{count:e.count,mb:e.mb,tb:e.tb,Ra:e.Ra,Ua:e.Ua,$a:e.$a,ab:e.ab}}}));a.Ma.count.value+=1;a.Ma.mb=!1;return a};Kc.prototype["delete"]=function(){this.Ma.Ra||Cc(this);this.Ma.mb&&!this.Ma.tb&&T("Object already scheduled for deletion");Ec(this);Fc(this.Ma);this.Ma.tb||(this.Ma.$a=void 0,this.Ma.Ra=void 0)}; -Kc.prototype.isDeleted=function(){return!this.Ma.Ra};Kc.prototype.deleteLater=function(){this.Ma.Ra||Cc(this);this.Ma.mb&&!this.Ma.tb&&T("Object already scheduled for deletion");Ic.push(this);1===Ic.length&&Hc&&Hc(Jc);this.Ma.mb=!0;return this};Yc.prototype.Cc=function(a){this.lc&&(a=this.lc(a));return a};Yc.prototype.bc=function(a){this.ib&&this.ib(a)};Yc.prototype.argPackAdvance=8;Yc.prototype.readValueFromPointer=oc;Yc.prototype.deleteObject=function(a){if(null!==a)a["delete"]()}; -Yc.prototype.fromWireType=function(a){function b(){return this.Db?Xc(this.Qa.nb,{Ua:this.Qc,Ra:c,ab:this,$a:a}):Xc(this.Qa.nb,{Ua:this,Ra:a})}var c=this.Cc(a);if(!c)return this.bc(a),null;var d=Wc(this.Qa,c);if(void 0!==d){if(0===d.Ma.count.value)return d.Ma.Ra=c,d.Ma.$a=a,d.clone();d=d.clone();this.bc(a);return d}d=this.Qa.Bc(c);d=Lc[d];if(!d)return b.call(this);d=this.Cb?d.wc:d.pointerType;var e=Uc(c,this.Qa,d.Qa);return null===e?b.call(this):this.Db?Xc(d.Qa.nb,{Ua:d,Ra:e,ab:this,$a:a}):Xc(d.Qa.nb, -{Ua:d,Ra:e})};g.getInheritedInstanceCount=function(){return Object.keys(Vc).length};g.getLiveInheritedInstances=function(){var a=[],b;for(b in Vc)Vc.hasOwnProperty(b)&&a.push(Vc[b]);return a};g.flushPendingDeletes=Jc;g.setDelayFunction=function(a){Hc=a;Ic.length&&Hc&&Hc(Jc)};ad=g.UnboundTypeError=uc("UnboundTypeError");g.count_emval_handles=function(){for(var a=0,b=5;b>2]);E[b>>2]=a.getSeconds();E[b+4>>2]=a.getMinutes();E[b+8>>2]=a.getHours();E[b+12>>2]=a.getDate();E[b+16>>2]=a.getMonth();E[b+20>>2]=a.getFullYear()-1900;E[b+24>>2]=a.getDay();var c=new Date(a.getFullYear(),0,1);E[b+28>>2]=(a.getTime()-c.getTime())/864E5|0;E[b+36>>2]=-(60*a.getTimezoneOffset());var d=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();c=c.getTimezoneOffset();a=(d!=c&&a.getTimezoneOffset()==Math.min(c,d))|0;E[b+32>>2]=a;a=E[eb()+(a? -4:0)>>2];E[b+40>>2]=a;return b},D:function(a,b,c){jc=c;try{var d=lc(a);switch(b){case 0:var e=kc();return 0>e?-28:Sb(d.path,d.flags,0,e).eb;case 1:case 2:return 0;case 3:return d.flags;case 4:return e=kc(),d.flags|=e,0;case 12:return e=kc(),xa[e+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return-1;default:return-28}}catch(f){return"undefined"!==typeof R&&f instanceof O||t(f),-f.Va}},Z:function(a,b){try{var c=lc(a);return ic(c.path,b)}catch(d){return"undefined"!==typeof R&&d instanceof -O||t(d),-d.Va}},X:function(a,b,c){jc=c;try{var d=lc(a);switch(b){case 21509:case 21505:return d.Ta?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return d.Ta?0:-59;case 21519:if(!d.Ta)return-59;var e=kc();return E[e>>2]=0;case 21520:return d.Ta?-28:-59;case 21531:a=e=kc();if(!d.Pa.Hc)throw new O(59);return d.Pa.Hc(d,b,a);case 21523:return d.Ta?0:-59;case 21524:return d.Ta?0:-59;default:t("bad ioctl syscall "+b)}}catch(f){return"undefined"!==typeof R&&f instanceof O||t(f), --f.Va}},aa:function(a,b,c,d,e,f){try{a:{f<<=12;var h=!1;if(0!==(d&16)&&0!==a%65536)var l=-28;else{if(0!==(d&32)){var m=Rd(65536,b);if(!m){l=-48;break a}Sd(m,0,b);h=!0}else{var p=xb[e];if(!p){l=-8;break a}var n=f;if(0!==(c&2)&&0===(d&2)&&2!==(p.flags&2097155))throw new O(2);if(1===(p.flags&2097155))throw new O(2);if(!p.Pa.Fb)throw new O(43);var q=p.Pa.Fb(p,a,b,n,c,d);m=q.Ra;h=q.Mb}hc[m]={Mc:m,Lc:b,Mb:h,eb:e,Rc:c,flags:d,offset:f};l=m}}return l}catch(v){return"undefined"!==typeof R&&v instanceof O|| -t(v),-v.Va}},$:function(){return 0},_:function(a,b){try{if(-1===(a|0)||0===b)var c=-28;else{var d=hc[a];if(d&&b===d.Lc){var e=xb[d.eb];e&&d.Rc&2&&e&&e.Pa.Gb&&e.Pa.Gb(e,A.slice(a,a+b),d.offset,b,d.flags);hc[a]=null;d.Mb&&W(d.Mc)}c=0}return c}catch(f){return"undefined"!==typeof R&&f instanceof O||t(f),-f.Va}},E:function(a,b,c){jc=c;try{var d=z(a),e=c?kc():0;return Sb(d,b,e).eb}catch(f){return"undefined"!==typeof R&&f instanceof O||t(f),-f.Va}},Y:function(a,b){try{return a=z(a),ic(a,b)}catch(c){return"undefined"!== -typeof R&&c instanceof O||t(c),-c.Va}},d:function(a){var b=mc[a];delete mc[a];var c=b.Ub,d=b.ib,e=b.dc,f=e.map(function(h){return h.Ec}).concat(e.map(function(h){return h.Yc}));xc([a],f,function(h){var l={};e.forEach(function(m,p){var n=h[p],q=m.Bb,v=m.Dc,k=h[p+e.length],u=m.Xc,x=m.Zc;l[m.Ac]={read:function(y){return n.fromWireType(q(v,y))},write:function(y,H){var G=[];u(x,y,k.toWireType(G,H));nc(G)}}});return[{name:b.name,fromWireType:function(m){var p={},n;for(n in l)p[n]=l[n].read(m);d(m);return p}, -toWireType:function(m,p){for(var n in l)if(!(n in p))throw new TypeError('Missing field: "'+n+'"');var q=c();for(n in l)l[n].write(q,p[n]);null!==m&&m.push(d,q);return q},argPackAdvance:8,readValueFromPointer:oc,cb:d}]})},N:function(){},ca:function(a,b,c,d,e){var f=zc(c);b=S(b);yc(a,{name:b,fromWireType:function(h){return!!h},toWireType:function(h,l){return l?d:e},argPackAdvance:8,readValueFromPointer:function(h){if(1===c)var l=F;else if(2===c)l=xa;else if(4===c)l=E;else throw new TypeError("Unknown boolean type size: "+ -b);return this.fromWireType(l[h>>f])},cb:null})},v:function(a,b,c,d,e,f,h,l,m,p,n,q,v){n=S(n);f=V(e,f);l&&(l=V(h,l));p&&(p=V(m,p));v=V(q,v);var k=sc(n);Nc(k,function(){dd("Cannot construct "+n+" due to unbound types",[d])});xc([a,b,c],d?[d]:[],function(u){u=u[0];if(d){var x=u.Qa;var y=x.nb}else y=Kc.prototype;u=tc(k,function(){if(Object.getPrototypeOf(this)!==H)throw new Bc("Use 'new' to construct "+n);if(void 0===G.jb)throw new Bc(n+" has no accessible constructor");var w=G.jb[arguments.length]; -if(void 0===w)throw new Bc("Tried to invoke ctor of "+n+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(G.jb).toString()+") parameters instead!");return w.apply(this,arguments)});var H=Object.create(y,{constructor:{value:u}});u.prototype=H;var G=new Oc(n,u,H,v,x,f,l,p);x=new Yc(n,G,!0,!1);y=new Yc(n+"*",G,!1,!1);var ha=new Yc(n+" const*",G,!1,!0);Lc[a]={pointerType:y,wc:ha};Zc(k,u);return[x,y,ha]})},J:function(a,b,c,d,e,f){0>>l}}var m=b.includes("unsigned");yc(a,{name:b,fromWireType:f,toWireType:function(p,n){if("number"!==typeof n&&"boolean"!==typeof n)throw new TypeError('Cannot convert "'+Rc(n)+'" to '+this.name);if(ne)throw new TypeError('Passing a number "'+Rc(n)+'" from JS side to C/C++ side to an argument of type "'+b+'", which is outside the valid range ['+d+", "+e+"]!");return m?n>>>0:n|0},argPackAdvance:8,readValueFromPointer:ld(b,h,0!==d),cb:null})},f:function(a,b,c){function d(f){f>>=2;var h=I;return new e(Fa, -h[f+1],h[f])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=S(c);yc(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d},{Gc:!0})},G:function(a,b){b=S(b);var c="std::string"===b;yc(a,{name:b,fromWireType:function(d){var e=I[d>>2];if(c)for(var f=d+4,h=0;h<=e;++h){var l=d+4+h;if(h==e||0==A[l]){f=z(f,l-f);if(void 0===m)var m=f;else m+=String.fromCharCode(0),m+=f;f=l+1}}else{m=Array(e);for(h=0;h>2]=h;if(c&&f)B(e,A,l+4,h+1);else if(f)for(f=0;f>2],n=h(),q,v=m+4,k=0;k<=p;++k){var u=m+4+k*b;if(k==p||0==n[u>>l])v=d(v,u-v),void 0===q?q=v:(q+=String.fromCharCode(0),q+=v),v=u+b}W(m);return q},toWireType:function(m, -p){"string"!==typeof p&&T("Cannot pass non-string to C++ string type "+c);var n=f(p),q=Ea(4+n+b);I[q>>2]=n>>l;e(p,q+4,n+b);null!==m&&m.push(W,q);return q},argPackAdvance:8,readValueFromPointer:oc,cb:function(m){W(m)}})},e:function(a,b,c,d,e,f){mc[a]={name:S(b),Ub:V(c,d),ib:V(e,f),dc:[]}},a:function(a,b,c,d,e,f,h,l,m,p){mc[a].dc.push({Ac:S(b),Ec:c,Bb:V(d,e),Dc:f,Yc:h,Xc:V(l,m),Zc:p})},da:function(a,b){b=S(b);yc(a,{Kc:!0,name:b,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},ea:function(a){delete xd[a- -1]},h:function(a,b,c){a=Y(a);b=md(b,"emval::as");var d=[],e=U(d);E[c>>2]=e;return b.toWireType(d,a)},ma:function(a,b,c,d){a=Y(a);c=nd(b,c);for(var e=Array(b),f=0;f>> 2) + "+f+'], "parameter '+f+'");\nvar arg'+f+" = argType"+f+".readValueFromPointer(args);\nargs += argType"+ -f+"['argPackAdvance'];\n";e=(new Function("requireRegisteredType","Module","__emval_register",h+("var obj = new constructor("+e+");\nreturn __emval_register(obj);\n}\n")))(md,g,U);td[b]=e}return e(a,c,d)},ia:function(){return U([])},L:function(a){return U(pd(a))},ka:function(){return U({})},pa:function(a){nc(X[a].value);jd(a)},p:function(a,b,c){a=Y(a);b=Y(b);c=Y(c);a[b]=c},l:function(a,b){a=md(a,"_emval_take_value");a=a.readValueFromPointer(b);return U(a)},oa:function(a){a=Y(a);return U(typeof a)}, -j:function(){t()},A:function(a,b){if(0===a)a=Date.now();else if(1===a||4===a)a=ud();else return-1;E[b>>2]=a/1E3|0;E[b+4>>2]=a%1E3*1E6|0;return 0},o:function(a,b,c){vd.length=0;var d;for(c>>=2;d=A[b++];)(d=105>d)&&c&1&&c++,vd.push(d?Ha[c++>>1]:E[c]),++c;return Za[a].apply(null,vd)},ga:wd,y:function(a,b){Td(a,b||1);throw"longjmp";},P:function(a,b,c){A.copyWithin(a,b,b+c)},Q:function(a){var b=A.length;a>>>=0;if(2147483648=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);d= -Math.max(a,d);0>>16);Ia();var e=1;break a}catch(f){}e=void 0}if(e)return!0}return!1},fa:function(a,b,c,d,e){function f(D){zd(D,h,p,n,m)}function h(D,Yd){Cd(D,Yd.response,function(Ua){Ad(function(){u?L.get(u)(Ua):b&&b(Ua)},K)},function(Ua){Ad(function(){u?L.get(u)(Ua):b&&b(Ua)},K)})}function l(D){zd(D,q,p,n,m)}function m(D){Ad(function(){H?L.get(H)(D):e&&e(D)},K)}function p(D){Ad(function(){x?L.get(x)(D):c&&c(D)}, -K)}function n(D){Ad(function(){y?L.get(y)(D):d&&d(D)},K)}function q(D){Ad(function(){u?L.get(u)(D):b&&b(D)},K)}var v=a+112,k=z(v),u=I[v+36>>2],x=I[v+40>>2],y=I[v+44>>2],H=I[v+48>>2],G=I[v+52>>2],ha=!!(G&4),w=!!(G&32),J=!!(G&16),K=!!(G&64);if("EM_IDB_STORE"===k)k=I[v+84>>2],Cd(a,A.slice(k,k+I[v+88>>2]),q,p);else if("EM_IDB_DELETE"===k)Ed(a,q,p);else if(J){if(w)return 0;zd(a,ha?h:q,p,n,m)}else Dd(a,q,w?p:ha?f:l);return a},U:function(a,b){try{var c=0;Gd().forEach(function(d,e){var f=b+c;e=E[a+4*e>>2]= -f;for(f=0;f>0]=d.charCodeAt(f);F[e>>0]=0;c+=d.length+1});return 0}catch(d){return"undefined"!==typeof R&&d instanceof O||t(d),d.Va}},V:function(a,b){try{var c=Gd();E[a>>2]=c.length;var d=0;c.forEach(function(e){d+=e.length+1});E[b>>2]=d;return 0}catch(e){return"undefined"!==typeof R&&e instanceof O||t(e),e.Va}},s:function(a){if(!noExitRuntime){if(g.onExit)g.onExit(a);ra=!0}fa(a,new Bd(a))},q:function(a){try{var b=lc(a);Ub(b);return 0}catch(c){return"undefined"!==typeof R&&c instanceof -O||t(c),c.Va}},T:function(a,b){try{var c=lc(a);F[b>>0]=c.Ta?2:Q(c.mode)?3:40960===(c.mode&61440)?7:4;return 0}catch(d){return"undefined"!==typeof R&&d instanceof O||t(d),d.Va}},C:function(a,b,c,d){try{a:{for(var e=lc(a),f=a=0;f>2],l=e,m=E[b+8*f>>2],p=h,n=void 0,q=F;if(0>p||0>n)throw new O(28);if(null===l.eb)throw new O(8);if(1===(l.flags&2097155))throw new O(8);if(Q(l.node.mode))throw new O(31);if(!l.Pa.read)throw new O(28);var v="undefined"!==typeof n;if(!v)n=l.position; -else if(!l.seekable)throw new O(70);var k=l.Pa.read(l,q,m,p,n);v||(l.position+=k);var u=k;if(0>u){var x=-1;break a}a+=u;if(u>2]=x;return 0}catch(y){return"undefined"!==typeof R&&y instanceof O||t(y),y.Va}},M:function(a,b,c,d,e){try{var f=lc(a);a=4294967296*c+(b>>>0);if(-9007199254740992>=a||9007199254740992<=a)return-61;Vb(f,a,d);Ya=[f.position>>>0,(M=f.position,1<=+Math.abs(M)?0>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0: -0)];E[e>>2]=Ya[0];E[e+4>>2]=Ya[1];f.Pb&&0===a&&0===d&&(f.Pb=null);return 0}catch(h){return"undefined"!==typeof R&&h instanceof O||t(h),h.Va}},B:function(a,b,c,d){try{a:{for(var e=lc(a),f=a=0;f>2],E[b+(8*f+4)>>2],void 0);if(0>h){var l=-1;break a}a+=h}l=a}E[d>>2]=l;return 0}catch(m){return"undefined"!==typeof R&&m instanceof O||t(m),m.Va}},c:function(){return oa},qa:function(){var a=self.navigator.userAgent,b=ua(a)+1,c=Ea(b);B(a,A,c,b);return c},R:Id,O:Ud,x:Vd,w:Wd,ha:function(a){ab(); -var b=new Date(E[a+20>>2]+1900,E[a+16>>2],E[a+12>>2],E[a+8>>2],E[a+4>>2],E[a>>2],0),c=E[a+32>>2],d=b.getTimezoneOffset(),e=new Date(b.getFullYear(),0,1),f=(new Date(b.getFullYear(),6,1)).getTimezoneOffset(),h=e.getTimezoneOffset(),l=Math.min(h,f);0>c?E[a+32>>2]=Number(f!=h&&l==d):0>2]=b.getDay();E[a+28>>2]=(b.getTime()-e.getTime())/864E5|0;E[a>>2]=b.getSeconds();E[a+4>>2]=b.getMinutes();E[a+8>>2]=b.getHours();E[a+12>>2]= -b.getDate();E[a+16>>2]=b.getMonth();return b.getTime()/1E3|0},b:function(a){oa=a},H:Od,S:function(a,b,c,d){return Od(a,b,c,d)},I:function(a){var b=Date.now()/1E3|0;a&&(E[a>>2]=b);return b}}; -(function(){function a(e){g.asm=e.exports;qa=g.asm.ra;Ia();L=g.asm.Fa;Ka.unshift(g.asm.sa);Ra("wasm-instantiate")}function b(e){a(e.instance)}function c(e){return Xa().then(function(f){return WebAssembly.instantiate(f,d)}).then(e,function(f){r("failed to asynchronously prepare wasm: "+f);t(f)})}var d={a:Xd};Qa("wasm-instantiate");if(g.instantiateWasm)try{return g.instantiateWasm(d,a)}catch(e){return r("Module.instantiateWasm callback failed with error: "+e),!1}(function(){return pa||"function"!== -typeof WebAssembly.instantiateStreaming||Sa()||"function"!==typeof fetch?c(b):fetch(Ta,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,d).then(b,function(f){r("wasm streaming compile failed: "+f);r("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(ba);return{}})();g.___wasm_call_ctors=function(){return(g.___wasm_call_ctors=g.asm.sa).apply(null,arguments)}; -var W=g._free=function(){return(W=g._free=g.asm.ta).apply(null,arguments)},Ea=g._malloc=function(){return(Ea=g._malloc=g.asm.ua).apply(null,arguments)},cd=g.___getTypeName=function(){return(cd=g.___getTypeName=g.asm.va).apply(null,arguments)};g.___embind_register_native_and_builtin_types=function(){return(g.___embind_register_native_and_builtin_types=g.asm.wa).apply(null,arguments)}; -var Sd=g._memset=function(){return(Sd=g._memset=g.asm.xa).apply(null,arguments)},eb=g.__get_tzname=function(){return(eb=g.__get_tzname=g.asm.ya).apply(null,arguments)},db=g.__get_daylight=function(){return(db=g.__get_daylight=g.asm.za).apply(null,arguments)},cb=g.__get_timezone=function(){return(cb=g.__get_timezone=g.asm.Aa).apply(null,arguments)},Zd=g.stackSave=function(){return(Zd=g.stackSave=g.asm.Ba).apply(null,arguments)},$d=g.stackRestore=function(){return($d=g.stackRestore=g.asm.Ca).apply(null, -arguments)},Td=g._setThrew=function(){return(Td=g._setThrew=g.asm.Da).apply(null,arguments)},Rd=g._memalign=function(){return(Rd=g._memalign=g.asm.Ea).apply(null,arguments)};g.dynCall_jiji=function(){return(g.dynCall_jiji=g.asm.Ga).apply(null,arguments)};g.dynCall_ji=function(){return(g.dynCall_ji=g.asm.Ha).apply(null,arguments)};g.dynCall_viijii=function(){return(g.dynCall_viijii=g.asm.Ia).apply(null,arguments)};g.dynCall_iiiiij=function(){return(g.dynCall_iiiiij=g.asm.Ja).apply(null,arguments)}; -g.dynCall_iiiiijj=function(){return(g.dynCall_iiiiijj=g.asm.Ka).apply(null,arguments)};g.dynCall_iiiiiijj=function(){return(g.dynCall_iiiiiijj=g.asm.La).apply(null,arguments)};function Vd(a,b){var c=Zd();try{L.get(a)(b)}catch(d){$d(c);if(d!==d+0&&"longjmp"!==d)throw d;Td(1,0)}}function Wd(a,b,c){var d=Zd();try{L.get(a)(b,c)}catch(e){$d(d);if(e!==e+0&&"longjmp"!==e)throw e;Td(1,0)}} -function Ud(a,b,c,d){var e=Zd();try{return L.get(a)(b,c,d)}catch(f){$d(e);if(f!==f+0&&"longjmp"!==f)throw f;Td(1,0)}}g.addRunDependency=Qa;g.removeRunDependency=Ra;g.FS_createPath=$b;g.FS_createDataFile=bc;g.FS_createPreloadedFile=fc;g.FS_createLazyFile=ec;g.FS_createDevice=cc;g.FS_unlink=Qb;var ae;function Bd(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}Pa=function be(){ae||ce();ae||(Pa=be)}; -function ce(){function a(){if(!ae&&(ae=!0,g.calledRun=!0,!ra)){g.noFSInit||Yb||(Yb=!0,Xb(),g.stdin=g.stdin,g.stdout=g.stdout,g.stderr=g.stderr,g.stdin?cc("/dev","stdin",g.stdin):Pb("/dev/tty","/dev/stdin"),g.stdout?cc("/dev","stdout",null,g.stdout):Pb("/dev/tty","/dev/stdout"),g.stderr?cc("/dev","stderr",null,g.stderr):Pb("/dev/tty1","/dev/stderr"),Sb("/dev/stdin",0),Sb("/dev/stdout",1),Sb("/dev/stderr",1));$a(Ka);aa(g);if(g.onRuntimeInitialized)g.onRuntimeInitialized();if(g.postRun)for("function"== -typeof g.postRun&&(g.postRun=[g.postRun]);g.postRun.length;){var b=g.postRun.shift();La.unshift(b)}$a(La)}}if(!(0>2];e||(e=I[a+8>>2]);e=z(e);try{var f=d.transaction(["FILES"],"readwrite").objectStore("FILES").delete(e);f.onsuccess=function(h){h=h.target.result;I[a+12>>2]=0;Z(a+16,0);Z(a+24,0);Z(a+32,0);C[a+40>>1]=4;C[a+42>>1]=200;B("OK",A,a+44,64);b(a,0,h)};f.onerror=function(h){C[a+40>>1]=4;C[a+42>>1]=404;B("Not Found",A,a+44,64);c(a,0,h)}}catch(h){c(a,0,h)}}else c(a,0,"IndexedDB not available!")}var Ld={}; +function Md(){if(!Nd){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"===typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ea||"./this.program"},b;for(b in Ld)void 0===Ld[b]?delete a[b]:a[b]=Ld[b];var c=[];for(b in a)c.push(b+"="+a[b]);Nd=c}return Nd}var Nd;function Od(a,b){Od.jc||(Od.jc=jb());for(var c=0;c>0]=Od.jc();return 0}function Pd(a){return 0===a%4&&(0!==a%100||0===a%400)} +function Qd(a,b){for(var c=0,d=0;d<=b;c+=a[d++]);return c}var Rd=[31,29,31,30,31,30,31,31,30,31,30,31],Sd=[31,28,31,30,31,30,31,31,30,31,30,31];function Td(a,b){for(a=new Date(a.getTime());0d-a.getDate())b-=d-a.getDate()+1,a.setDate(1),11>c?a.setMonth(c+1):(a.setMonth(0),a.setFullYear(a.getFullYear()+1));else{a.setDate(a.getDate()+b);break}}return a} +function Ud(a,b,c,d){function e(k,u,x){for(k="number"===typeof k?k.toString():k||"";k.lengthH?-1:0=h(x,k)?0>=h(u,k)?k.getFullYear()+1:k.getFullYear():k.getFullYear()-1}var p=E[d+40>>2];d={bd:E[d>>2],ad:E[d+4>>2],Hb:E[d+8>>2],vb:E[d+12>>2],pb:E[d+16>>2],Xa:E[d+20>>2],Ib:E[d+24>>2],Jb:E[d+28>>2],ld:E[d+32>>2],$c:E[d+ +36>>2],cd:p?z(p):""};c=z(c);p={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var n in p)c=c.replace(new RegExp(n,"g"),p[n]);var r="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), +v="January February March April May June July August September October November December".split(" ");p={"%a":function(k){return r[k.Ib].substring(0,3)},"%A":function(k){return r[k.Ib]},"%b":function(k){return v[k.pb].substring(0,3)},"%B":function(k){return v[k.pb]},"%C":function(k){return f((k.Xa+1900)/100|0,2)},"%d":function(k){return f(k.vb,2)},"%e":function(k){return e(k.vb,2," ")},"%g":function(k){return m(k).toString().substring(2)},"%G":function(k){return m(k)},"%H":function(k){return f(k.Hb, +2)},"%I":function(k){k=k.Hb;0==k?k=12:12k.Hb?"AM":"PM"},"%S":function(k){return f(k.bd,2)},"%t":function(){return"\t"},"%u":function(k){return k.Ib||7},"%U":function(k){var u=new Date(k.Xa+1900,0,1),x=0===u.getDay()?u:Td(u,7-u.getDay());k=new Date(k.Xa+1900,k.pb,k.vb);return 0> +h(x,k)?f(Math.ceil((31-x.getDate()+(Qd(Pd(k.getFullYear())?Rd:Sd,k.getMonth()-1)-31)+k.getDate())/7),2):0===h(x,u)?"01":"00"},"%V":function(k){var u=new Date(k.Xa+1901,0,4),x=l(new Date(k.Xa+1900,0,4));u=l(u);var y=Td(new Date(k.Xa+1900,0,1),k.Jb);return 0>h(y,x)?"53":0>=h(u,y)?"01":f(Math.ceil((x.getFullYear()h(x,k)?f(Math.ceil((31-x.getDate()+(Qd(Pd(k.getFullYear())?Rd:Sd,k.getMonth()-1)-31)+k.getDate())/7),2):0===h(x,u)?"01":"00"},"%y":function(k){return(k.Xa+1900).toString().substring(2)},"%Y":function(k){return k.Xa+1900},"%z":function(k){k=k.$c;var u=0<=k;k=Math.abs(k)/60;return(u?"+":"-")+String("0000"+(k/60*100+k%60)).slice(-4)},"%Z":function(k){return k.cd},"%%":function(){return"%"}};for(n in p)c.includes(n)&&(c=c.replace(new RegExp(n,"g"),p[n](d)));n=pb(c, +!1);if(n.length>b)return 0;F.set(n,a);return n.length-1}function Lb(a,b,c,d){a||(a=this);this.parent=a;this.gb=a.gb;this.rb=null;this.id=Cb++;this.name=b;this.mode=c;this.Na={};this.Oa={};this.tb=d} +Object.defineProperties(Lb.prototype,{read:{get:function(){return 365===(this.mode&365)},set:function(a){a?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(a){a?this.mode|=146:this.mode&=-147}},Ic:{get:function(){return Q(this.mode)}},Hc:{get:function(){return 8192===(this.mode&61440)}}});dc();Db=Array(4096);Sb(P,"/");Ub("/tmp");Ub("/home");Ub("/home/web_user"); +(function(){Ub("/dev");nb(259,{read:function(){return 0},write:function(b,c,d,e){return e}});Vb("/dev/null",259);mb(1280,qb);mb(1536,rb);Vb("/dev/tty",1280);Vb("/dev/tty1",1536);var a=jb();jc("/dev","random",a);jc("/dev","urandom",a);Ub("/dev/shm");Ub("/dev/shm/tmp")})(); +(function(){Ub("/proc");var a=Ub("/proc/self");Ub("/proc/self/fd");Sb({gb:function(){var b=vb(a,"fd",16895,73);b.Na={qb:function(c,d){var e=Bb[+d];if(!e)throw new O(8);c={parent:null,gb:{hc:"fake"},Na:{ub:function(){return e.path}}};return c.parent=c}};return b}},"/proc/self/fd")})();var nc;g.FS_createPath=gc;g.FS_createDataFile=ic;g.FS_createPreloadedFile=mc;g.FS_createLazyFile=lc;g.FS_createDevice=jc;g.FS_unlink=Xb;Cc=g.InternalError=Bc("InternalError"); +for(var Vd=Array(256),Wd=0;256>Wd;++Wd)Vd[Wd]=String.fromCharCode(Wd);Hc=Vd;Ic=g.BindingError=Bc("BindingError");Rc.prototype.isAliasOf=function(a){if(!(this instanceof Rc&&a instanceof Rc))return!1;var b=this.La.Ta.Pa,c=this.La.Qa,d=a.La.Ta.Pa;for(a=a.La.Qa;b.ab;)c=b.wb(c),b=b.ab;for(;d.ab;)a=d.wb(a),d=d.ab;return b===d&&c===a}; +Rc.prototype.clone=function(){this.La.Qa||Jc(this);if(this.La.sb)return this.La.count.value+=1,this;var a=Nc,b=Object,c=b.create,d=Object.getPrototypeOf(this),e=this.La;a=a(c.call(b,d,{La:{value:{count:e.count,lb:e.lb,sb:e.sb,Qa:e.Qa,Ta:e.Ta,Za:e.Za,$a:e.$a}}}));a.La.count.value+=1;a.La.lb=!1;return a};Rc.prototype["delete"]=function(){this.La.Qa||Jc(this);this.La.lb&&!this.La.sb&&T("Object already scheduled for deletion");Lc(this);Mc(this.La);this.La.sb||(this.La.Za=void 0,this.La.Qa=void 0)}; +Rc.prototype.isDeleted=function(){return!this.La.Qa};Rc.prototype.deleteLater=function(){this.La.Qa||Jc(this);this.La.lb&&!this.La.sb&&T("Object already scheduled for deletion");Pc.push(this);1===Pc.length&&Oc&&Oc(Qc);this.La.lb=!0;return this};ed.prototype.Bc=function(a){this.kc&&(a=this.kc(a));return a};ed.prototype.ac=function(a){this.hb&&this.hb(a)};ed.prototype.argPackAdvance=8;ed.prototype.readValueFromPointer=vc;ed.prototype.deleteObject=function(a){if(null!==a)a["delete"]()}; +ed.prototype.fromWireType=function(a){function b(){return this.Cb?dd(this.Pa.mb,{Ta:this.Pc,Qa:c,$a:this,Za:a}):dd(this.Pa.mb,{Ta:this,Qa:a})}var c=this.Bc(a);if(!c)return this.ac(a),null;var d=cd(this.Pa,c);if(void 0!==d){if(0===d.La.count.value)return d.La.Qa=c,d.La.Za=a,d.clone();d=d.clone();this.ac(a);return d}d=this.Pa.Ac(c);d=Sc[d];if(!d)return b.call(this);d=this.Bb?d.vc:d.pointerType;var e=ad(c,this.Pa,d.Pa);return null===e?b.call(this):this.Cb?dd(d.Pa.mb,{Ta:d,Qa:e,$a:this,Za:a}):dd(d.Pa.mb, +{Ta:d,Qa:e})};g.getInheritedInstanceCount=function(){return Object.keys(bd).length};g.getLiveInheritedInstances=function(){var a=[],b;for(b in bd)bd.hasOwnProperty(b)&&a.push(bd[b]);return a};g.flushPendingDeletes=Qc;g.setDelayFunction=function(a){Oc=a;Pc.length&&Oc&&Oc(Qc)};hd=g.UnboundTypeError=Bc("UnboundTypeError");g.count_emval_handles=function(){for(var a=0,b=5;b>2]);E[b>>2]=a.getSeconds();E[b+4>>2]=a.getMinutes();E[b+8>>2]=a.getHours();E[b+12>>2]=a.getDate();E[b+16>>2]=a.getMonth();E[b+20>>2]=a.getFullYear()-1900;E[b+24>>2]=a.getDay();var c=new Date(a.getFullYear(),0,1);E[b+28>>2]=(a.getTime()-c.getTime())/864E5|0;E[b+36>>2]=-(60*a.getTimezoneOffset());var d=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();c=c.getTimezoneOffset();a=(d!=c&&a.getTimezoneOffset()==Math.min(c,d))|0;E[b+32>>2]=a; +a=E[eb()+(a?4:0)>>2];E[b+40>>2]=a;return b},C:function(a,b,c){qc=c;try{var d=sc(a);switch(b){case 0:var e=rc();return 0>e?-28:Zb(d.path,d.flags,0,e).cb;case 1:case 2:return 0;case 3:return d.flags;case 4:return e=rc(),d.flags|=e,0;case 12:return e=rc(),ya[e+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return-1;default:return-28}}catch(f){return"undefined"!==typeof R&&f instanceof O||t(f),-f.Wa}},Z:function(a,b){try{var c=sc(a);return pc(c.path,b)}catch(d){return"undefined"!== +typeof R&&d instanceof O||t(d),-d.Wa}},X:function(a,b,c){qc=c;try{var d=sc(a);switch(b){case 21509:case 21505:return d.Sa?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return d.Sa?0:-59;case 21519:if(!d.Sa)return-59;var e=rc();return E[e>>2]=0;case 21520:return d.Sa?-28:-59;case 21531:a=e=rc();if(!d.Oa.Gc)throw new O(59);return d.Oa.Gc(d,b,a);case 21523:return d.Sa?0:-59;case 21524:return d.Sa?0:-59;default:t("bad ioctl syscall "+b)}}catch(f){return"undefined"!==typeof R&& +f instanceof O||t(f),-f.Wa}},aa:function(a,b,c,d,e,f){try{a:{f<<=12;var h=!1;if(0!==(d&16)&&0!==a%65536)var l=-28;else{if(0!==(d&32)){var m=sb(b);if(!m){l=-48;break a}h=!0}else{var p=Bb[e];if(!p){l=-8;break a}var n=f;if(0!==(c&2)&&0===(d&2)&&2!==(p.flags&2097155))throw new O(2);if(1===(p.flags&2097155))throw new O(2);if(!p.Oa.Eb)throw new O(43);var r=p.Oa.Eb(p,a,b,n,c,d);m=r.Qa;h=r.Lb}oc[m]={Lc:m,Kc:b,Lb:h,cb:e,Qc:c,flags:d,offset:f};l=m}}return l}catch(v){return"undefined"!==typeof R&&v instanceof +O||t(v),-v.Wa}},$:function(){return 0},_:function(a,b){try{var c=oc[a];if(0!==b&&c){if(b===c.Kc){var d=Bb[c.cb];d&&c.Qc&2&&d&&d.Oa.Fb&&d.Oa.Fb(d,A.slice(a,a+b),c.offset,b,c.flags);oc[a]=null;c.Lb&&W(c.Lc)}var e=0}else e=-28;return e}catch(f){return"undefined"!==typeof R&&f instanceof O||t(f),-f.Wa}},D:function(a,b,c){qc=c;try{var d=z(a),e=c?rc():0;return Zb(d,b,e).cb}catch(f){return"undefined"!==typeof R&&f instanceof O||t(f),-f.Wa}},Y:function(a,b){try{return a=z(a),pc(a,b)}catch(c){return"undefined"!== +typeof R&&c instanceof O||t(c),-c.Wa}},d:function(a){var b=tc[a];delete tc[a];var c=b.Tb,d=b.hb,e=b.cc,f=e.map(function(h){return h.Dc}).concat(e.map(function(h){return h.Xc}));Ec([a],f,function(h){var l={};e.forEach(function(m,p){var n=h[p],r=m.Ab,v=m.Cc,k=h[p+e.length],u=m.Wc,x=m.Yc;l[m.zc]={read:function(y){return n.fromWireType(r(v,y))},write:function(y,H){var G=[];u(x,y,k.toWireType(G,H));uc(G)}}});return[{name:b.name,fromWireType:function(m){var p={},n;for(n in l)p[n]=l[n].read(m);d(m);return p}, +toWireType:function(m,p){for(var n in l)if(!(n in p))throw new TypeError('Missing field: "'+n+'"');var r=c();for(n in l)l[n].write(r,p[n]);null!==m&&m.push(d,r);return r},argPackAdvance:8,readValueFromPointer:vc,bb:d}]})},M:function(){},fa:function(a,b,c,d,e){var f=Gc(c);b=S(b);Fc(a,{name:b,fromWireType:function(h){return!!h},toWireType:function(h,l){return l?d:e},argPackAdvance:8,readValueFromPointer:function(h){if(1===c)var l=F;else if(2===c)l=ya;else if(4===c)l=E;else throw new TypeError("Unknown boolean type size: "+ +b);return this.fromWireType(l[h>>f])},bb:null})},v:function(a,b,c,d,e,f,h,l,m,p,n,r,v){n=S(n);f=V(e,f);l&&(l=V(h,l));p&&(p=V(m,p));v=V(r,v);var k=zc(n);Uc(k,function(){ld("Cannot construct "+n+" due to unbound types",[d])});Ec([a,b,c],d?[d]:[],function(u){u=u[0];if(d){var x=u.Pa;var y=x.mb}else y=Rc.prototype;u=Ac(k,function(){if(Object.getPrototypeOf(this)!==H)throw new Ic("Use 'new' to construct "+n);if(void 0===G.ib)throw new Ic(n+" has no accessible constructor");var w=G.ib[arguments.length]; +if(void 0===w)throw new Ic("Tried to invoke ctor of "+n+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(G.ib).toString()+") parameters instead!");return w.apply(this,arguments)});var H=Object.create(y,{constructor:{value:u}});u.prototype=H;var G=new Vc(n,u,H,v,x,f,l,p);x=new ed(n,G,!0,!1);y=new ed(n+"*",G,!1,!1);var ha=new ed(n+" const*",G,!1,!0);Sc[a]={pointerType:y,vc:ha};fd(k,u);return[x,y,ha]})},I:function(a,b,c,d,e,f){0>>l}}var m=b.includes("unsigned");Fc(a,{name:b,fromWireType:f,toWireType:function(p,n){if("number"!==typeof n&&"boolean"!==typeof n)throw new TypeError('Cannot convert "'+Yc(n)+'" to '+ +this.name);if(ne)throw new TypeError('Passing a number "'+Yc(n)+'" from JS side to C/C++ side to an argument of type "'+b+'", which is outside the valid range ['+d+", "+e+"]!");return m?n>>>0:n|0},argPackAdvance:8,readValueFromPointer:sd(b,h,0!==d),bb:null})},f:function(a,b,c){function d(f){f>>=2;var h=I;return new e(Ga,h[f+1],h[f])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=S(c);Fc(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d}, +{Fc:!0})},F:function(a,b){b=S(b);var c="std::string"===b;Fc(a,{name:b,fromWireType:function(d){var e=I[d>>2];if(c)for(var f=d+4,h=0;h<=e;++h){var l=d+4+h;if(h==e||0==A[l]){f=z(f,l-f);if(void 0===m)var m=f;else m+=String.fromCharCode(0),m+=f;f=l+1}}else{m=Array(e);for(h=0;h>2]=h;if(c&&f)B(e,A,l+4,h+1);else if(f)for(f=0;f>2],n=h(),r,v=m+4,k=0;k<=p;++k){var u=m+4+k*b;if(k==p||0==n[u>>l])v=d(v,u-v),void 0===r?r=v:(r+=String.fromCharCode(0),r+=v),v=u+b}W(m);return r},toWireType:function(m,p){"string"!==typeof p&&T("Cannot pass non-string to C++ string type "+c);var n=f(p),r=Fa(4+n+b);I[r>>2]=n>>l;e(p,r+4,n+b);null!==m&&m.push(W,r);return r},argPackAdvance:8,readValueFromPointer:vc, +bb:function(m){W(m)}})},e:function(a,b,c,d,e,f){tc[a]={name:S(b),Tb:V(c,d),hb:V(e,f),cc:[]}},a:function(a,b,c,d,e,f,h,l,m,p){tc[a].cc.push({zc:S(b),Dc:c,Ab:V(d,e),Cc:f,Xc:h,Wc:V(l,m),Yc:p})},ga:function(a,b){b=S(b);Fc(a,{Jc:!0,name:b,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},ba:function(a){delete Dd[a-1]},O:function(){throw"longjmp";},h:function(a,b,c){a=Y(a);b=td(b,"emval::as");var d=[],e=U(d);E[c>>2]=e;return b.toWireType(d,a)},ma:function(a,b,c,d){a=Y(a);c=ud(b,c);for(var e= +Array(b),f=0;f>> 2) + "+f+'], "parameter '+f+'");\nvar arg'+f+" = argType"+f+".readValueFromPointer(args);\nargs += argType"+f+"['argPackAdvance'];\n";e=(new Function("requireRegisteredType", +"Module","__emval_register",h+("var obj = new constructor("+e+");\nreturn __emval_register(obj);\n}\n")))(td,g,U);Ad[b]=e}return e(a,c,d)},ia:function(){return U([])},K:function(a){return U(wd(a))},ka:function(){return U({})},pa:function(a){uc(X[a].value);qd(a)},p:function(a,b,c){a=Y(a);b=Y(b);c=Y(c);a[b]=c},l:function(a,b){a=td(a,"_emval_take_value");a=a.readValueFromPointer(b);return U(a)},oa:function(a){a=Y(a);return U(typeof a)},j:function(){t()},z:function(a,b){if(0===a)a=Date.now();else if(1=== +a||4===a)a=Bd();else return-1;E[b>>2]=a/1E3|0;E[b+4>>2]=a%1E3*1E6|0;return 0},o:function(a,b,c){Cd.length=0;var d;for(c>>=2;d=A[b++];)(d=105>d)&&c&1&&c++,Cd.push(d?Ia[c++>>1]:E[c]),++c;return $a[a].apply(null,Cd)},da:function(){return!ja},P:function(a,b,c){A.copyWithin(a,b,b+c)},Q:function(a){var b=A.length;a>>>=0;if(2147483648=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);d=Math.max(a,d);0>>16);Ja();var e=1;break a}catch(f){}e=void 0}if(e)return!0}return!1},ca:function(a,b,c,d,e){function f(D){Fd(D,h,p,n,m)}function h(D,be){Id(D,be.response,function(Va){Gd(function(){u?L.get(u)(Va):b&&b(Va)},K)},function(Va){Gd(function(){u?L.get(u)(Va):b&&b(Va)},K)})}function l(D){Fd(D,r,p,n,m)}function m(D){Gd(function(){H?L.get(H)(D):e&&e(D)},K)}function p(D){Gd(function(){x?L.get(x)(D):c&&c(D)},K)}function n(D){Gd(function(){y?L.get(y)(D):d&&d(D)},K)}function r(D){Gd(function(){u?L.get(u)(D): +b&&b(D)},K)}var v=a+112,k=z(v),u=I[v+36>>2],x=I[v+40>>2],y=I[v+44>>2],H=I[v+48>>2],G=I[v+52>>2],ha=!!(G&4),w=!!(G&32),J=!!(G&16),K=!!(G&64);if("EM_IDB_STORE"===k)k=I[v+84>>2],Id(a,A.slice(k,k+I[v+88>>2]),r,p);else if("EM_IDB_DELETE"===k)Kd(a,r,p);else if(J){if(w)return 0;Fd(a,ha?h:r,p,n,m)}else Jd(a,r,w?p:ha?f:l);return a},U:function(a,b){var c=0;Md().forEach(function(d,e){var f=b+c;e=E[a+4*e>>2]=f;for(f=0;f>0]=d.charCodeAt(f);F[e>>0]=0;c+=d.length+1});return 0},V:function(a,b){var c= +Md();E[a>>2]=c.length;var d=0;c.forEach(function(e){d+=e.length+1});E[b>>2]=d;return 0},s:function(a){if(!noExitRuntime){if(g.onExit)g.onExit(a);sa=!0}fa(a,new Hd(a))},q:function(a){try{var b=sc(a);ac(b);return 0}catch(c){return"undefined"!==typeof R&&c instanceof O||t(c),c.Wa}},T:function(a,b){try{var c=sc(a);F[b>>0]=c.Sa?2:Q(c.mode)?3:40960===(c.mode&61440)?7:4;return 0}catch(d){return"undefined"!==typeof R&&d instanceof O||t(d),d.Wa}},B:function(a,b,c,d){try{a:{for(var e=sc(a),f=a=0;f>2],l=e,m=E[b+8*f>>2],p=h,n=void 0,r=F;if(0>p||0>n)throw new O(28);if(null===l.cb)throw new O(8);if(1===(l.flags&2097155))throw new O(8);if(Q(l.node.mode))throw new O(31);if(!l.Oa.read)throw new O(28);var v="undefined"!==typeof n;if(!v)n=l.position;else if(!l.seekable)throw new O(70);var k=l.Oa.read(l,r,m,p,n);v||(l.position+=k);var u=k;if(0>u){var x=-1;break a}a+=u;if(u>2]=x;return 0}catch(y){return"undefined"!==typeof R&&y instanceof O||t(y),y.Wa}},L:function(a,b,c, +d,e){try{var f=sc(a);a=4294967296*c+(b>>>0);if(-9007199254740992>=a||9007199254740992<=a)return-61;bc(f,a,d);Za=[f.position>>>0,(M=f.position,1<=+Math.abs(M)?0>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)];E[e>>2]=Za[0];E[e+4>>2]=Za[1];f.Ob&&0===a&&0===d&&(f.Ob=null);return 0}catch(h){return"undefined"!==typeof R&&h instanceof O||t(h),h.Wa}},A:function(a,b,c,d){try{a:{for(var e=sc(a),f=a=0;f>2],E[b+(8*f+4)>>2], +void 0);if(0>h){var l=-1;break a}a+=h}l=a}E[d>>2]=l;return 0}catch(m){return"undefined"!==typeof R&&m instanceof O||t(m),m.Wa}},c:function(){return pa},qa:function(){var a=self.navigator.userAgent,b=va(a)+1,c=Fa(b);B(a,A,c,b);return c},R:Od,N:Xd,x:Yd,w:Zd,ha:function(a){fb||(fb=!0,bb());var b=new Date(E[a+20>>2]+1900,E[a+16>>2],E[a+12>>2],E[a+8>>2],E[a+4>>2],E[a>>2],0),c=E[a+32>>2],d=b.getTimezoneOffset(),e=new Date(b.getFullYear(),0,1),f=(new Date(b.getFullYear(),6,1)).getTimezoneOffset(),h=e.getTimezoneOffset(), +l=Math.min(h,f);0>c?E[a+32>>2]=Number(f!=h&&l==d):0>2]=b.getDay();E[a+28>>2]=(b.getTime()-e.getTime())/864E5|0;E[a>>2]=b.getSeconds();E[a+4>>2]=b.getMinutes();E[a+8>>2]=b.getHours();E[a+12>>2]=b.getDate();E[a+16>>2]=b.getMonth();return b.getTime()/1E3|0},b:function(a){pa=a},G:Ud,S:function(a,b,c,d){return Ud(a,b,c,d)},H:function(a){var b=Date.now()/1E3|0;a&&(E[a>>2]=b);return b}}; +(function(){function a(e){g.asm=e.exports;ra=g.asm.ra;Ja();L=g.asm.Ea;La.unshift(g.asm.sa);Sa("wasm-instantiate")}function b(e){a(e.instance)}function c(e){return Ya().then(function(f){return WebAssembly.instantiate(f,d)}).then(function(f){return f}).then(e,function(f){q("failed to asynchronously prepare wasm: "+f);t(f)})}var d={a:$d};Ra("wasm-instantiate");if(g.instantiateWasm)try{return g.instantiateWasm(d,a)}catch(e){return q("Module.instantiateWasm callback failed with error: "+e),!1}(function(){return qa|| +"function"!==typeof WebAssembly.instantiateStreaming||Ta()||"function"!==typeof fetch?c(b):fetch(Ua,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,d).then(b,function(f){q("wasm streaming compile failed: "+f);q("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(ba);return{}})();g.___wasm_call_ctors=function(){return(g.___wasm_call_ctors=g.asm.sa).apply(null,arguments)}; +var W=g._free=function(){return(W=g._free=g.asm.ta).apply(null,arguments)},Fa=g._malloc=function(){return(Fa=g._malloc=g.asm.ua).apply(null,arguments)},kd=g.___getTypeName=function(){return(kd=g.___getTypeName=g.asm.va).apply(null,arguments)};g.___embind_register_native_and_builtin_types=function(){return(g.___embind_register_native_and_builtin_types=g.asm.wa).apply(null,arguments)}; +var eb=g.__get_tzname=function(){return(eb=g.__get_tzname=g.asm.xa).apply(null,arguments)},db=g.__get_daylight=function(){return(db=g.__get_daylight=g.asm.ya).apply(null,arguments)},cb=g.__get_timezone=function(){return(cb=g.__get_timezone=g.asm.za).apply(null,arguments)},ae=g.stackSave=function(){return(ae=g.stackSave=g.asm.Aa).apply(null,arguments)},ce=g.stackRestore=function(){return(ce=g.stackRestore=g.asm.Ba).apply(null,arguments)},de=g._setThrew=function(){return(de=g._setThrew=g.asm.Ca).apply(null, +arguments)},tb=g._memalign=function(){return(tb=g._memalign=g.asm.Da).apply(null,arguments)};g.dynCall_jiji=function(){return(g.dynCall_jiji=g.asm.Fa).apply(null,arguments)};g.dynCall_ji=function(){return(g.dynCall_ji=g.asm.Ga).apply(null,arguments)};g.dynCall_viijii=function(){return(g.dynCall_viijii=g.asm.Ha).apply(null,arguments)};g.dynCall_iiiiij=function(){return(g.dynCall_iiiiij=g.asm.Ia).apply(null,arguments)};g.dynCall_iiiiijj=function(){return(g.dynCall_iiiiijj=g.asm.Ja).apply(null,arguments)}; +g.dynCall_iiiiiijj=function(){return(g.dynCall_iiiiiijj=g.asm.Ka).apply(null,arguments)};function Yd(a,b){var c=ae();try{L.get(a)(b)}catch(d){ce(c);if(d!==d+0&&"longjmp"!==d)throw d;de(1,0)}}function Zd(a,b,c){var d=ae();try{L.get(a)(b,c)}catch(e){ce(d);if(e!==e+0&&"longjmp"!==e)throw e;de(1,0)}}function Xd(a,b,c,d){var e=ae();try{return L.get(a)(b,c,d)}catch(f){ce(e);if(f!==f+0&&"longjmp"!==f)throw f;de(1,0)}}g.addRunDependency=Ra;g.removeRunDependency=Sa;g.FS_createPath=gc;g.FS_createDataFile=ic; +g.FS_createPreloadedFile=mc;g.FS_createLazyFile=lc;g.FS_createDevice=jc;g.FS_unlink=Xb;var ee;function Hd(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}Qa=function fe(){ee||ge();ee||(Qa=fe)}; +function ge(){function a(){if(!ee&&(ee=!0,g.calledRun=!0,!sa)){g.noFSInit||ec||(ec=!0,dc(),g.stdin=g.stdin,g.stdout=g.stdout,g.stderr=g.stderr,g.stdin?jc("/dev","stdin",g.stdin):Wb("/dev/tty","/dev/stdin"),g.stdout?jc("/dev","stdout",null,g.stdout):Wb("/dev/tty","/dev/stdout"),g.stderr?jc("/dev","stderr",null,g.stderr):Wb("/dev/tty1","/dev/stderr"),Zb("/dev/stdin",0),Zb("/dev/stdout",1),Zb("/dev/stderr",1));Eb=!1;ab(La);aa(g);if(g.onRuntimeInitialized)g.onRuntimeInitialized();if(g.postRun)for("function"== +typeof g.postRun&&(g.postRun=[g.postRun]);g.postRun.length;){var b=g.postRun.shift();Ma.unshift(b)}ab(Ma)}}if(!(0=d);)++c;if(16e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d}function z(a,b){return a?ta(A,a,b):""} +var g;g||(g=typeof BlinkIDImageCaptureWasmSDK !== 'undefined' ? BlinkIDImageCaptureWasmSDK : {});var aa,ba;g.ready=new Promise(function(a,b){aa=a;ba=b});g.Nb||(g.Nb=0);g.Nb++; +(function(a){function b(m,p,n){var r=new XMLHttpRequest;r.open("GET",m,!0);r.responseType="arraybuffer";r.onprogress=function(v){var k=p;v.total&&(k=v.total);if(v.loaded){r.qc?g.kb[m].loaded=v.loaded:(r.qc=!0,g.kb||(g.kb={}),g.kb[m]={loaded:v.loaded,total:k});var u=k=v=0,x;for(x in g.kb){var y=g.kb[x];v+=y.total;k+=y.loaded;u++}v=Math.ceil(v*g.Nb/u);g.setStatus&&g.setStatus("Downloading data... ("+k+"/"+v+")")}else!g.kb&&g.setStatus&&g.setStatus("Downloading data...")};r.onerror=function(){throw Error("NetworkError for: "+ +m);};r.onload=function(){if(200==r.status||304==r.status||206==r.status||0==r.status&&r.response)n(r.response);else throw Error(r.statusText+" : "+r.responseURL);};r.send(null)}function c(m){console.error("package error:",m)}function d(){function m(v,k,u){this.start=v;this.end=k;this.audio=u}function p(v){if(!v)throw"Loading data file failed."+Error().stack;if(!(v instanceof ArrayBuffer))throw"bad input to processPackageData"+Error().stack;v=new Uint8Array(v);m.prototype.uc=v;v=a.files;for(var k= +0;k=d);)++c;if(16e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d}function z(a,b){return a?ua(A,a,b):""} function B(a,b,c,d){if(!(0=h){var l=a.charCodeAt(++f);h=65536+((h&1023)<<10)|l&1023}if(127>=h){if(c>=d)break;b[c++]=h}else{if(2047>=h){if(c+1>=d)break;b[c++]=192|h>>6}else{if(65535>=h){if(c+2>=d)break;b[c++]=224|h>>12}else{if(c+3>=d)break;b[c++]=240|h>>18;b[c++]=128|h>>12&63}b[c++]=128|h>>6&63}b[c++]=128|h&63}}b[c]=0;return c-e} -function ua(a){for(var b=0,c=0;c=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++c)&1023);127>=d?++b:b=2047>=d?b+2:65535>=d?b+3:b+4}return b}var va="undefined"!==typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function wa(a,b){var c=a>>1;for(var d=c+b/2;!(c>=d)&&C[c];)++c;c<<=1;if(32=b/2);++d){var e=xa[a+2*d>>1];if(0==e)break;c+=String.fromCharCode(e)}return c} -function ya(a,b,c){void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var e=0;e>1]=a.charCodeAt(e),b+=2;xa[b>>1]=0;return b-d}function za(a){return 2*a.length}function Aa(a,b){for(var c=0,d="";!(c>=b/4);){var e=E[a+4*c>>2];if(0==e)break;++c;65536<=e?(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023)):d+=String.fromCharCode(e)}return d} -function Ba(a,b,c){void 0===c&&(c=2147483647);if(4>c)return 0;var d=b;c=d+c-4;for(var e=0;e=f){var h=a.charCodeAt(++e);f=65536+((f&1023)<<10)|h&1023}E[b>>2]=f;b+=4;if(b+4>c)break}E[b>>2]=0;return b-d}function Ca(a){for(var b=0,c=0;c=d&&++c;b+=4}return b}function Da(a){var b=ua(a)+1,c=Ea(b);c&&B(a,F,c,b);return c}var Fa,F,A,xa,C,E,I,Ga,Ha; -function Ia(){var a=qa.buffer;Fa=a;g.HEAP8=F=new Int8Array(a);g.HEAP16=xa=new Int16Array(a);g.HEAP32=E=new Int32Array(a);g.HEAPU8=A=new Uint8Array(a);g.HEAPU16=C=new Uint16Array(a);g.HEAPU32=I=new Uint32Array(a);g.HEAPF32=Ga=new Float32Array(a);g.HEAPF64=Ha=new Float64Array(a)}var L,Ja=[],Ka=[],La=[];function Ma(){var a=g.preRun.shift();Ja.unshift(a)}var Na=0,Oa=null,Pa=null;function Qa(){Na++;g.monitorRunDependencies&&g.monitorRunDependencies(Na)} -function Ra(){Na--;g.monitorRunDependencies&&g.monitorRunDependencies(Na);if(0==Na&&(null!==Oa&&(clearInterval(Oa),Oa=null),Pa)){var a=Pa;Pa=null;a()}}g.preloadedImages={};g.preloadedAudios={};function t(a){if(g.onAbort)g.onAbort(a);a+="";r(a);ra=!0;a=new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");ba(a);throw a;}function Sa(){return Ta.startsWith("data:application/octet-stream;base64,")}var Ta="BlinkIDImageCaptureWasmSDK.wasm"; -if(!Sa()){var Va=Ta;Ta=g.locateFile?g.locateFile(Va,ka):ka+Va}function Wa(){var a=Ta;try{if(a==Ta&&pa)return new Uint8Array(pa);if(ma)return ma(a);throw"both async and sync fetching of the wasm failed";}catch(b){t(b)}}function Xa(){return pa||!ia&&!ja||"function"!==typeof fetch?Promise.resolve().then(function(){return Wa()}):fetch(Ta,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+Ta+"'";return a.arrayBuffer()}).catch(function(){return Wa()})} -var M,Ya,Za={292837:function(a){a=z(a);throw Error("Failed to reconfigure RecognizerRunner due to following error: "+a);},292973:function(a,b,c,d){a=z(a);b=z(b);c=z(c);d=z(d);throw Error(a+b+c+d);},293189:function(a,b){a=z(a);b=z(b);throw Error(a+b);},293299:function(a,b){a=z(a);b=z(b);console.log(a+b)},293397:function(a){throw Error(z(a));},293440:function(){throw Error("Unable to perform that operation while recognizer is in use!");}}; -function $a(a){for(;0>2]=60*f;E[db()>>2]=Number(b!=e);c=a(c);d=a(d);c=Da(c);d=Da(d);e>2]=c,E[eb()+4>>2]=d):(E[eb()>>2]=d,E[eb()+4>>2]=c)}}var bb; -function fb(a,b){for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a}function N(a){var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=fb(a.split("/").filter(function(d){return!!d}),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a} -function gb(a){var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b}function hb(a){if("/"===a)return"/";a=N(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)} -function ib(){if("object"===typeof crypto&&"function"===typeof crypto.getRandomValues){var a=new Uint8Array(1);return function(){crypto.getRandomValues(a);return a[0]}}return function(){t("randomDevice")}} -function jb(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:"/";if("string"!==typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=fb(a.split("/").filter(function(d){return!!d}),!b).join("/");return(b?"/":"")+a||"."}var kb=[];function lb(a,b){kb[a]={input:[],Wa:[],pb:b};mb(a,nb)} -var nb={open:function(a){var b=kb[a.node.ub];if(!b)throw new O(43);a.Ta=b;a.seekable=!1},close:function(a){a.Ta.pb.flush(a.Ta)},flush:function(a){a.Ta.pb.flush(a.Ta)},read:function(a,b,c,d){if(!a.Ta||!a.Ta.pb.fc)throw new O(60);for(var e=0,f=0;f=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.Na,a.Na=new Uint8Array(b),0=a.node.Sa)return 0;a=Math.min(a.node.Sa-e,d);if(8b)throw new O(28);return b},Yb:function(a,b,c){P.cc(a.node,b+c);a.node.Sa=Math.max(a.node.Sa,b+c)},Fb:function(a,b,c,d,e,f){if(0!==b)throw new O(28);if(32768!==(a.node.mode&61440))throw new O(43); -a=a.node.Na;if(f&2||a.buffer!==Fa){if(0>>0)%zb.length}function ub(a,b){var c;if(c=a.Oa.rb?0:2)throw new O(c,a);for(c=zb[Eb(a.id,b)];c;c=c.ob){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.Oa.rb(a,b)}function sb(a,b,c,d){a=new Fb(a,b,c,d);b=Eb(a.parent.id,a.name);a.ob=zb[b];return zb[b]=a} -function Q(a){return 16384===(a&61440)}var Gb={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090};function Hb(a,b){try{return ub(a,b),20}catch(c){}return 0}function Ib(a){var b=4096;for(a=a||0;a<=b;a++)if(!xb[a])return a;throw new O(33);}function Jb(a,b){Kb||(Kb=function(){},Kb.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}}});var c=new Kb,d;for(d in a)c[d]=a[d];a=c;b=Ib(b);a.eb=b;return xb[b]=a} -var rb={open:function(a){a.Pa=wb[a.node.ub].Pa;a.Pa.open&&a.Pa.open(a)},kb:function(){throw new O(70);}};function mb(a,b){wb[a]={Pa:b}}function Lb(a,b){var c="/"===b,d=!b;if(c&&vb)throw new O(10);if(!c&&!d){var e=Bb(b,{ec:!1});b=e.path;e=e.node;if(e.sb)throw new O(10);if(!Q(e.mode))throw new O(54);}b={type:a,md:{},ic:b,Nc:[]};a=a.hb(b);a.hb=b;b.root=a;c?vb=a:e&&(e.sb=b,e.hb&&e.hb.Nc.push(b))} -function Mb(a,b,c){var d=Bb(a,{parent:!0}).node;a=hb(a);if(!a||"."===a||".."===a)throw new O(28);var e=Hb(d,a);if(e)throw new O(e);if(!d.Oa.Eb)throw new O(63);return d.Oa.Eb(d,a,b,c)}function Nb(a){return Mb(a,16895,0)}function Ob(a,b,c){"undefined"===typeof c&&(c=b,b=438);return Mb(a,b|8192,c)}function Pb(a,b){if(!jb(a))throw new O(44);var c=Bb(b,{parent:!0}).node;if(!c)throw new O(44);b=hb(b);var d=Hb(c,b);if(d)throw new O(d);if(!c.Oa.Hb)throw new O(63);c.Oa.Hb(c,b,a)} -function Qb(a){var b=Bb(a,{parent:!0}).node,c=hb(a),d=ub(b,c);a:{try{var e=ub(b,c)}catch(f){e=f.Va;break a}e=Q(e.mode)?31:0}if(e)throw new O(e);if(!b.Oa.Lb)throw new O(63);if(d.sb)throw new O(10);try{Ab.willDeletePath&&Ab.willDeletePath(a)}catch(f){r("FS.trackingDelegate['willDeletePath']('"+a+"') threw an exception: "+f.message)}b.Oa.Lb(b,c);b=Eb(d.parent.id,d.name);if(zb[b]===d)zb[b]=d.ob;else for(b=zb[b];b;){if(b.ob===d){b.ob=d.ob;break}b=b.ob}try{if(Ab.onDeletePath)Ab.onDeletePath(a)}catch(f){r("FS.trackingDelegate['onDeletePath']('"+ -a+"') threw an exception: "+f.message)}}function Cb(a){a=Bb(a).node;if(!a)throw new O(44);if(!a.Oa.vb)throw new O(28);return jb(Db(a.parent),a.Oa.vb(a))}function Rb(a,b){a="string"===typeof a?Bb(a,{Ab:!0}).node:a;if(!a.Oa.Za)throw new O(63);a.Oa.Za(a,{mode:b&4095|a.mode&-4096,timestamp:Date.now()})} -function Sb(a,b,c,d){if(""===a)throw new O(44);if("string"===typeof b){var e=Gb[b];if("undefined"===typeof e)throw Error("Unknown file open mode: "+b);b=e}c=b&64?("undefined"===typeof c?438:c)&4095|32768:0;if("object"===typeof a)var f=a;else{a=N(a);try{f=Bb(a,{Ab:!(b&131072)}).node}catch(h){}}e=!1;if(b&64)if(f){if(b&128)throw new O(20);}else f=Mb(a,c,0),e=!0;if(!f)throw new O(44);8192===(f.mode&61440)&&(b&=-513);if(b&65536&&!Q(f.mode))throw new O(54);if(!e){if(f)if(40960===(f.mode&61440))c=32;else{if(c= -Q(f.mode))c=["r","w","rw"][b&3],b&512&&(c+="w"),c="r"!==c||b&512;c=c?31:0}else c=44;if(c)throw new O(c);}if(b&512){c=f;c="string"===typeof c?Bb(c,{Ab:!0}).node:c;if(!c.Oa.Za)throw new O(63);if(Q(c.mode))throw new O(31);if(32768!==(c.mode&61440))throw new O(28);c.Oa.Za(c,{size:0,timestamp:Date.now()})}b&=-131713;d=Jb({node:f,path:Db(f),flags:b,seekable:!0,position:0,Pa:f.Pa,ed:[],error:!1},d);d.Pa.open&&d.Pa.open(d);!g.logReadFiles||b&1||(Tb||(Tb={}),a in Tb||(Tb[a]=1,r("FS.trackingDelegate error on read file: "+ -a)));try{Ab.onOpenFile&&(f=0,1!==(b&2097155)&&(f|=1),0!==(b&2097155)&&(f|=2),Ab.onOpenFile(a,f))}catch(h){r("FS.trackingDelegate['onOpenFile']('"+a+"', flags) threw an exception: "+h.message)}return d}function Ub(a){if(null===a.eb)throw new O(8);a.Pb&&(a.Pb=null);try{a.Pa.close&&a.Pa.close(a)}catch(b){throw b;}finally{xb[a.eb]=null}a.eb=null} -function Vb(a,b,c){if(null===a.eb)throw new O(8);if(!a.seekable||!a.Pa.kb)throw new O(70);if(0!=c&&1!=c&&2!=c)throw new O(28);a.position=a.Pa.kb(a,b,c);a.ed=[]} -function Wb(a,b,c,d,e,f){if(0>d||0>e)throw new O(28);if(null===a.eb)throw new O(8);if(0===(a.flags&2097155))throw new O(8);if(Q(a.node.mode))throw new O(31);if(!a.Pa.write)throw new O(28);a.seekable&&a.flags&1024&&Vb(a,0,2);var h="undefined"!==typeof e;if(!h)e=a.position;else if(!a.seekable)throw new O(70);b=a.Pa.write(a,b,c,d,e,f);h||(a.position+=b);try{if(a.path&&Ab.onWriteToFile)Ab.onWriteToFile(a.path)}catch(l){r("FS.trackingDelegate['onWriteToFile']('"+a.path+"') threw an exception: "+l.message)}return b} -function Xb(){O||(O=function(a,b){this.node=b;this.Wc=function(c){this.Va=c};this.Wc(a);this.message="FS error"},O.prototype=Error(),O.prototype.constructor=O,[44].forEach(function(a){tb[a]=new O(a);tb[a].stack=""}))}var Yb;function Zb(a,b){var c=0;a&&(c|=365);b&&(c|=146);return c}function $b(a,b){a="string"===typeof a?a:Db(a);for(b=b.split("/").reverse();b.length;){var c=b.pop();if(c){var d=N(a+"/"+c);try{Nb(d)}catch(e){}a=d}}return d} -function ac(a,b,c,d){a=N(("string"===typeof a?a:Db(a))+"/"+b);c=Zb(c,d);return Mb(a,(void 0!==c?c:438)&4095|32768,0)}function bc(a,b,c,d,e,f){a=b?N(("string"===typeof a?a:Db(a))+"/"+b):a;d=Zb(d,e);e=Mb(a,(void 0!==d?d:438)&4095|32768,0);if(c){if("string"===typeof c){a=Array(c.length);b=0;for(var h=c.length;bthis.length-1||0>n)){var q=n%this.ac;return this.Bb(n/this.ac|0)[q]}};f.prototype.Vc=function(n){this.Bb=n};f.prototype.Zb=function(){var n=new XMLHttpRequest;n.open("HEAD",c,!1);n.send(null);if(!(200<=n.status&&300>n.status||304===n.status))throw Error("Couldn't load "+c+". Status: "+n.status);var q=Number(n.getResponseHeader("Content-length")),v,k=(v=n.getResponseHeader("Accept-Ranges"))&&"bytes"===v;n= -(v=n.getResponseHeader("Content-Encoding"))&&"gzip"===v;var u=1048576;k||(u=q);var x=this;x.Vc(function(y){var H=y*u,G=(y+1)*u-1;G=Math.min(G,q-1);if("undefined"===typeof x.zb[y]){var ha=x.zb;if(H>G)throw Error("invalid range ("+H+", "+G+") or no bytes requested!");if(G>q-1)throw Error("only "+q+" bytes available! programmer error!");var w=new XMLHttpRequest;w.open("GET",c,!1);q!==u&&w.setRequestHeader("Range","bytes="+H+"-"+G);"undefined"!=typeof Uint8Array&&(w.responseType="arraybuffer");w.overrideMimeType&& -w.overrideMimeType("text/plain; charset=x-user-defined");w.send(null);if(!(200<=w.status&&300>w.status||304===w.status))throw Error("Couldn't load "+c+". Status: "+w.status);H=void 0!==w.response?new Uint8Array(w.response||[]):ob(w.responseText||"",!0);ha[y]=H}if("undefined"===typeof x.zb[y])throw Error("doXHR failed!");return x.zb[y]});if(n||!q)u=q=1,u=q=this.Bb(0).length,na("LazyFiles on gzip forces download of the whole file when length is accessed");this.qc=q;this.pc=u;this.Sb=!0};if("undefined"!== -typeof XMLHttpRequest){if(!ja)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var h=new f;Object.defineProperties(h,{length:{get:function(){this.Sb||this.Zb();return this.qc}},ac:{get:function(){this.Sb||this.Zb();return this.pc}}});var l=void 0}else l=c,h=void 0;var m=ac(a,b,d,e);h?m.Na=h:l&&(m.Na=null,m.url=l);Object.defineProperties(m,{Sa:{get:function(){return this.Na.length}}});var p={};Object.keys(m.Pa).forEach(function(n){var q= -m.Pa[n];p[n]=function(){dc(m);return q.apply(null,arguments)}});p.read=function(n,q,v,k,u){dc(m);n=n.node.Na;if(u>=n.length)return 0;k=Math.min(n.length-u,k);if(n.slice)for(var x=0;x>2]=d.yc;E[b+4>>2]=0;E[b+8>>2]=d.Qb;E[b+12>>2]=d.mode;E[b+16>>2]=d.Pc;E[b+20>>2]=d.uid;E[b+24>>2]=d.Fc;E[b+28>>2]=d.ub;E[b+32>>2]=0;Ya=[d.size>>>0,(M=d.size,1<=+Math.abs(M)?0>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)];E[b+40>>2]=Ya[0];E[b+44>>2]=Ya[1];E[b+48>> -2]=4096;E[b+52>>2]=d.uc;E[b+56>>2]=d.sc.getTime()/1E3|0;E[b+60>>2]=0;E[b+64>>2]=d.Oc.getTime()/1E3|0;E[b+68>>2]=0;E[b+72>>2]=d.xc.getTime()/1E3|0;E[b+76>>2]=0;Ya=[d.Qb>>>0,(M=d.Qb,1<=+Math.abs(M)?0>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)];E[b+80>>2]=Ya[0];E[b+84>>2]=Ya[1];return 0}var jc=void 0;function kc(){jc+=4;return E[jc-4>>2]}function lc(a){a=xb[a];if(!a)throw new O(8);return a}var mc={}; -function nc(a){for(;a.length;){var b=a.pop();a.pop()(b)}}function oc(a){return this.fromWireType(I[a>>2])}var pc={},qc={},rc={};function sc(a){if(void 0===a)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?"_"+a:a}function tc(a,b){a=sc(a);return(new Function("body","return function "+a+'() {\n "use strict"; return body.apply(this, arguments);\n};\n'))(b)} -function uc(a){var b=Error,c=tc(a,function(d){this.name=a;this.message=d;d=Error(d).stack;void 0!==d&&(this.stack=this.toString()+"\n"+d.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(b.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message};return c}var vc=void 0;function wc(a){throw new vc(a);} -function xc(a,b,c){function d(l){l=c(l);l.length!==a.length&&wc("Mismatched type converter count");for(var m=0;m>2)+d]);return c} -function fd(a){var b=Function;if(!(b instanceof Function))throw new TypeError("new_ called with constructor type "+typeof b+" which is not a function");var c=tc(b.name||"unknownFunctionName",function(){});c.prototype=b.prototype;c=new c;a=b.apply(c,a);return a instanceof Object?a:c} -function gd(a,b,c,d,e){var f=b.length;2>f&&T("argTypes array size mismatch! Must at least get return value and 'this' types!");var h=null!==b[1]&&null!==c,l=!1;for(c=1;c>2])};case 3:return function(c){return this.fromWireType(Ha[c>>3])};default:throw new TypeError("Unknown float type: "+a);}} -function ld(a,b,c){switch(b){case 0:return c?function(d){return F[d]}:function(d){return A[d]};case 1:return c?function(d){return xa[d>>1]}:function(d){return C[d>>1]};case 2:return c?function(d){return E[d>>2]}:function(d){return I[d>>2]};default:throw new TypeError("Unknown integer type: "+a);}}function Y(a){a||T("Cannot use deleted val. handle = "+a);return X[a].value}function md(a,b){var c=qc[a];void 0===c&&T(b+" has unknown type "+bd(a));return c} -function nd(a,b){for(var c=Array(a),d=0;d>2)+d],"parameter "+d);return c}var od={};function pd(a){var b=od[a];return void 0===b?S(a):b}var qd=[];function rd(){return"object"===typeof globalThis?globalThis:Function("return this")()}function sd(a){var b=qd.length;qd.push(a);return b}var td={},ud;ud=function(){return performance.now()};var vd=[];function wd(){return!ja}g._emscripten_is_main_browser_thread=wd;var xd=[];function Z(a,b){I[a>>2]=b;I[a+4>>2]=b/4294967296|0}var yd; -function zd(a,b,c,d,e){function f(J){var K=0,D=0;J&&(D=w.response?w.response.byteLength:0,K=Ea(D),A.set(new Uint8Array(w.response),K));I[a+12>>2]=K;Z(a+16,D)}var h=I[a+8>>2];if(h){var l=z(h),m=a+112,p=z(m);p||(p="GET");var n=I[m+52>>2],q=I[m+56>>2],v=!!I[m+60>>2],k=I[m+68>>2],u=I[m+72>>2];h=I[m+76>>2];var x=I[m+80>>2],y=I[m+84>>2];m=I[m+88>>2];var H=!!(n&1),G=!!(n&2);n=!!(n&64);k=k?z(k):void 0;u=u?z(u):void 0;var ha=x?z(x):void 0,w=new XMLHttpRequest;w.withCredentials=v;w.open(p,l,!n,k,u);n||(w.timeout= -q);w.od=l;w.responseType="arraybuffer";x&&w.overrideMimeType(ha);if(h)for(;;){p=I[h>>2];if(!p)break;l=I[h+4>>2];if(!l)break;h+=8;p=z(p);l=z(l);w.setRequestHeader(p,l)}xd.push(w);I[a+0>>2]=xd.length;h=y&&m?A.slice(y,y+m):null;w.onload=function(J){f(H&&!G);var K=w.response?w.response.byteLength:0;Z(a+24,0);K&&Z(a+32,K);C[a+40>>1]=w.readyState;C[a+42>>1]=w.status;w.statusText&&B(w.statusText,A,a+44,64);200<=w.status&&300>w.status?b&&b(a,w,J):c&&c(a,w,J)};w.onerror=function(J){f(H);var K=w.status;Z(a+ -24,0);Z(a+32,w.response?w.response.byteLength:0);C[a+40>>1]=w.readyState;C[a+42>>1]=K;c&&c(a,w,J)};w.ontimeout=function(J){c&&c(a,w,J)};w.onprogress=function(J){var K=H&&G&&w.response?w.response.byteLength:0,D=0;H&&G&&(D=Ea(K),A.set(new Uint8Array(w.response),D));I[a+12>>2]=D;Z(a+16,K);Z(a+24,J.loaded-K);Z(a+32,J.total);C[a+40>>1]=w.readyState;3<=w.readyState&&0===w.status&&0>1]=w.status;w.statusText&&B(w.statusText,A,a+44,64);d&&d(a,w,J);D&&W(D)};w.onreadystatechange= -function(J){C[a+40>>1]=w.readyState;2<=w.readyState&&(C[a+42>>1]=w.status);e&&e(a,w,J)};try{w.send(h)}catch(J){c&&c(a,w,J)}}else c(a,0,"no url specified!")}function Ad(a,b){if(!ra)if(b)a();else try{a()}catch(c){if(!(c instanceof Bd)&&"unwind"!==c)throw c&&"object"===typeof c&&c.stack&&r("exception thrown: "+[c,c.stack]),c;}} -function Cd(a,b,c,d){var e=yd;if(e){var f=I[a+112+64>>2];f||(f=I[a+8>>2]);var h=z(f);try{var l=e.transaction(["FILES"],"readwrite").objectStore("FILES").put(b,h);l.onsuccess=function(){C[a+40>>1]=4;C[a+42>>1]=200;B("OK",A,a+44,64);c(a,0,h)};l.onerror=function(m){C[a+40>>1]=4;C[a+42>>1]=413;B("Payload Too Large",A,a+44,64);d(a,0,m)}}catch(m){d(a,0,m)}}else d(a,0,"IndexedDB not available!")} -function Dd(a,b,c){var d=yd;if(d){var e=I[a+112+64>>2];e||(e=I[a+8>>2]);e=z(e);try{var f=d.transaction(["FILES"],"readonly").objectStore("FILES").get(e);f.onsuccess=function(h){if(h.target.result){h=h.target.result;var l=h.byteLength||h.length,m=Ea(l);A.set(new Uint8Array(h),m);I[a+12>>2]=m;Z(a+16,l);Z(a+24,0);Z(a+32,l);C[a+40>>1]=4;C[a+42>>1]=200;B("OK",A,a+44,64);b(a,0,h)}else C[a+40>>1]=4,C[a+42>>1]=404,B("Not Found",A,a+44,64),c(a,0,"no data")};f.onerror=function(h){C[a+40>>1]=4;C[a+42>>1]=404; +function va(a){for(var b=0,c=0;c=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++c)&1023);127>=d?++b:b=2047>=d?b+2:65535>=d?b+3:b+4}return b}var wa="undefined"!==typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function xa(a,b){var c=a>>1;for(var d=c+b/2;!(c>=d)&&C[c];)++c;c<<=1;if(32=b/2);++d){var e=ya[a+2*d>>1];if(0==e)break;c+=String.fromCharCode(e)}return c} +function za(a,b,c){void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var e=0;e>1]=a.charCodeAt(e),b+=2;ya[b>>1]=0;return b-d}function Aa(a){return 2*a.length}function Ba(a,b){for(var c=0,d="";!(c>=b/4);){var e=E[a+4*c>>2];if(0==e)break;++c;65536<=e?(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023)):d+=String.fromCharCode(e)}return d} +function Ca(a,b,c){void 0===c&&(c=2147483647);if(4>c)return 0;var d=b;c=d+c-4;for(var e=0;e=f){var h=a.charCodeAt(++e);f=65536+((f&1023)<<10)|h&1023}E[b>>2]=f;b+=4;if(b+4>c)break}E[b>>2]=0;return b-d}function Da(a){for(var b=0,c=0;c=d&&++c;b+=4}return b}function Ea(a){var b=va(a)+1,c=Fa(b);c&&B(a,F,c,b);return c}var Ga,F,A,ya,C,E,I,Ha,Ia; +function Ja(){var a=ra.buffer;Ga=a;g.HEAP8=F=new Int8Array(a);g.HEAP16=ya=new Int16Array(a);g.HEAP32=E=new Int32Array(a);g.HEAPU8=A=new Uint8Array(a);g.HEAPU16=C=new Uint16Array(a);g.HEAPU32=I=new Uint32Array(a);g.HEAPF32=Ha=new Float32Array(a);g.HEAPF64=Ia=new Float64Array(a)}var L,Ka=[],La=[],Ma=[];function Na(){var a=g.preRun.shift();Ka.unshift(a)}var Oa=0,Pa=null,Qa=null;function Ra(){Oa++;g.monitorRunDependencies&&g.monitorRunDependencies(Oa)} +function Sa(){Oa--;g.monitorRunDependencies&&g.monitorRunDependencies(Oa);if(0==Oa&&(null!==Pa&&(clearInterval(Pa),Pa=null),Qa)){var a=Qa;Qa=null;a()}}g.preloadedImages={};g.preloadedAudios={};function t(a){if(g.onAbort)g.onAbort(a);a+="";q(a);sa=!0;a=new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");ba(a);throw a;}function Ta(){return Ua.startsWith("data:application/octet-stream;base64,")}var Ua;Ua="BlinkIDImageCaptureWasmSDK.wasm"; +if(!Ta()){var Wa=Ua;Ua=g.locateFile?g.locateFile(Wa,ka):ka+Wa}function Xa(){var a=Ua;try{if(a==Ua&&qa)return new Uint8Array(qa);if(na)return na(a);throw"both async and sync fetching of the wasm failed";}catch(b){t(b)}}function Ya(){return qa||!ia&&!ja||"function"!==typeof fetch?Promise.resolve().then(function(){return Xa()}):fetch(Ua,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+Ua+"'";return a.arrayBuffer()}).catch(function(){return Xa()})} +var M,Za,$a={294345:function(a){a=z(a);throw Error("Failed to reconfigure RecognizerRunner due to following error: "+a);},294481:function(a,b,c,d){a=z(a);b=z(b);c=z(c);d=z(d);throw Error(a+b+c+d);},294697:function(a,b){a=z(a);b=z(b);throw Error(a+b);},294807:function(a,b){a=z(a);b=z(b);console.log(a+b)},294905:function(a){throw Error(z(a));},294948:function(){throw Error("Unable to perform that operation while recognizer is in use!");}}; +function ab(a){for(;0>2]=60*f;E[db()>>2]=Number(b!=e);c=a(c);d=a(d);c=Ea(c);d=Ea(d);e>2]=c,E[eb()+4>>2]=d):(E[eb()>>2]=d,E[eb()+4>>2]=c)}var fb; +function gb(a,b){for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a}function N(a){var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=gb(a.split("/").filter(function(d){return!!d}),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a} +function hb(a){var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b}function ib(a){if("/"===a)return"/";a=N(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)} +function jb(){if("object"===typeof crypto&&"function"===typeof crypto.getRandomValues){var a=new Uint8Array(1);return function(){crypto.getRandomValues(a);return a[0]}}return function(){t("randomDevice")}} +function kb(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:"/";if("string"!==typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=gb(a.split("/").filter(function(d){return!!d}),!b).join("/");return(b?"/":"")+a||"."}var lb=[];function mb(a,b){lb[a]={input:[],Ua:[],ob:b};nb(a,ob)} +var ob={open:function(a){var b=lb[a.node.tb];if(!b)throw new O(43);a.Sa=b;a.seekable=!1},close:function(a){a.Sa.ob.flush(a.Sa)},flush:function(a){a.Sa.ob.flush(a.Sa)},read:function(a,b,c,d){if(!a.Sa||!a.Sa.ob.ec)throw new O(60);for(var e=0,f=0;f=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.Ma,a.Ma=new Uint8Array(b),0=a.node.Ra)return 0; +a=Math.min(a.node.Ra-e,d);if(8b)throw new O(28);return b},Xb:function(a,b,c){P.bc(a.node,b+c);a.node.Ra=Math.max(a.node.Ra,b+c)},Eb:function(a,b,c,d,e,f){if(0!==b)throw new O(28);if(32768!==(a.node.mode&61440))throw new O(43);a=a.node.Ma;if(f&2||a.buffer!==Ga){if(0>>0)%Db.length}function xb(a,b){var c;if(c=(c=Kb(a,"x"))?c:a.Na.qb?0:2)throw new O(c,a);for(c=Db[Jb(a.id,b)];c;c=c.nb){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.Na.qb(a,b)} +function vb(a,b,c,d){a=new Lb(a,b,c,d);b=Jb(a.parent.id,a.name);a.nb=Db[b];return Db[b]=a}function Q(a){return 16384===(a&61440)}var Mb={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090};function Nb(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b}function Kb(a,b){if(Eb)return 0;if(!b.includes("r")||a.mode&292){if(b.includes("w")&&!(a.mode&146)||b.includes("x")&&!(a.mode&73))return 2}else return 2;return 0}function Ob(a,b){try{return xb(a,b),20}catch(c){}return Kb(a,"wx")} +function Pb(a){var b=4096;for(a=a||0;a<=b;a++)if(!Bb[a])return a;throw new O(33);}function Qb(a,b){Rb||(Rb=function(){},Rb.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}}});var c=new Rb,d;for(d in a)c[d]=a[d];a=c;b=Pb(b);a.cb=b;return Bb[b]=a}var ub={open:function(a){a.Oa=Ab[a.node.tb].Oa;a.Oa.open&&a.Oa.open(a)},jb:function(){throw new O(70);}};function nb(a,b){Ab[a]={Oa:b}} +function Sb(a,b){var c="/"===b,d=!b;if(c&&zb)throw new O(10);if(!c&&!d){var e=Gb(b,{dc:!1});b=e.path;e=e.node;if(e.rb)throw new O(10);if(!Q(e.mode))throw new O(54);}b={type:a,kd:{},hc:b,Mc:[]};a=a.gb(b);a.gb=b;b.root=a;c?zb=a:e&&(e.rb=b,e.gb&&e.gb.Mc.push(b))}function Tb(a,b,c){var d=Gb(a,{parent:!0}).node;a=ib(a);if(!a||"."===a||".."===a)throw new O(28);var e=Ob(d,a);if(e)throw new O(e);if(!d.Na.Db)throw new O(63);return d.Na.Db(d,a,b,c)}function Ub(a){return Tb(a,16895,0)} +function Vb(a,b,c){"undefined"===typeof c&&(c=b,b=438);return Tb(a,b|8192,c)}function Wb(a,b){if(!kb(a))throw new O(44);var c=Gb(b,{parent:!0}).node;if(!c)throw new O(44);b=ib(b);var d=Ob(c,b);if(d)throw new O(d);if(!c.Na.Gb)throw new O(63);c.Na.Gb(c,b,a)} +function Xb(a){var b=Gb(a,{parent:!0}).node,c=ib(a),d=xb(b,c);a:{try{var e=xb(b,c)}catch(h){e=h.Wa;break a}var f=Kb(b,"wx");e=f?f:Q(e.mode)?31:0}if(e)throw new O(e);if(!b.Na.Kb)throw new O(63);if(d.rb)throw new O(10);try{Fb.willDeletePath&&Fb.willDeletePath(a)}catch(h){q("FS.trackingDelegate['willDeletePath']('"+a+"') threw an exception: "+h.message)}b.Na.Kb(b,c);b=Jb(d.parent.id,d.name);if(Db[b]===d)Db[b]=d.nb;else for(b=Db[b];b;){if(b.nb===d){b.nb=d.nb;break}b=b.nb}try{if(Fb.onDeletePath)Fb.onDeletePath(a)}catch(h){q("FS.trackingDelegate['onDeletePath']('"+ +a+"') threw an exception: "+h.message)}}function Hb(a){a=Gb(a).node;if(!a)throw new O(44);if(!a.Na.ub)throw new O(28);return kb(Ib(a.parent),a.Na.ub(a))}function Yb(a,b){a="string"===typeof a?Gb(a,{zb:!0}).node:a;if(!a.Na.Ya)throw new O(63);a.Na.Ya(a,{mode:b&4095|a.mode&-4096,timestamp:Date.now()})} +function Zb(a,b,c,d){if(""===a)throw new O(44);if("string"===typeof b){var e=Mb[b];if("undefined"===typeof e)throw Error("Unknown file open mode: "+b);b=e}c=b&64?("undefined"===typeof c?438:c)&4095|32768:0;if("object"===typeof a)var f=a;else{a=N(a);try{f=Gb(a,{zb:!(b&131072)}).node}catch(h){}}e=!1;if(b&64)if(f){if(b&128)throw new O(20);}else f=Tb(a,c,0),e=!0;if(!f)throw new O(44);8192===(f.mode&61440)&&(b&=-513);if(b&65536&&!Q(f.mode))throw new O(54);if(!e&&(c=f?40960===(f.mode&61440)?32:Q(f.mode)&& +("r"!==Nb(b)||b&512)?31:Kb(f,Nb(b)):44))throw new O(c);if(b&512){c=f;c="string"===typeof c?Gb(c,{zb:!0}).node:c;if(!c.Na.Ya)throw new O(63);if(Q(c.mode))throw new O(31);if(32768!==(c.mode&61440))throw new O(28);if(e=Kb(c,"w"))throw new O(e);c.Na.Ya(c,{size:0,timestamp:Date.now()})}b&=-131713;d=Qb({node:f,path:Ib(f),flags:b,seekable:!0,position:0,Oa:f.Oa,dd:[],error:!1},d);d.Oa.open&&d.Oa.open(d);!g.logReadFiles||b&1||($b||($b={}),a in $b||($b[a]=1,q("FS.trackingDelegate error on read file: "+a))); +try{Fb.onOpenFile&&(f=0,1!==(b&2097155)&&(f|=1),0!==(b&2097155)&&(f|=2),Fb.onOpenFile(a,f))}catch(h){q("FS.trackingDelegate['onOpenFile']('"+a+"', flags) threw an exception: "+h.message)}return d}function ac(a){if(null===a.cb)throw new O(8);a.Ob&&(a.Ob=null);try{a.Oa.close&&a.Oa.close(a)}catch(b){throw b;}finally{Bb[a.cb]=null}a.cb=null}function bc(a,b,c){if(null===a.cb)throw new O(8);if(!a.seekable||!a.Oa.jb)throw new O(70);if(0!=c&&1!=c&&2!=c)throw new O(28);a.position=a.Oa.jb(a,b,c);a.dd=[]} +function cc(a,b,c,d,e,f){if(0>d||0>e)throw new O(28);if(null===a.cb)throw new O(8);if(0===(a.flags&2097155))throw new O(8);if(Q(a.node.mode))throw new O(31);if(!a.Oa.write)throw new O(28);a.seekable&&a.flags&1024&&bc(a,0,2);var h="undefined"!==typeof e;if(!h)e=a.position;else if(!a.seekable)throw new O(70);b=a.Oa.write(a,b,c,d,e,f);h||(a.position+=b);try{if(a.path&&Fb.onWriteToFile)Fb.onWriteToFile(a.path)}catch(l){q("FS.trackingDelegate['onWriteToFile']('"+a.path+"') threw an exception: "+l.message)}return b} +function dc(){O||(O=function(a,b){this.node=b;this.Vc=function(c){this.Wa=c};this.Vc(a);this.message="FS error"},O.prototype=Error(),O.prototype.constructor=O,[44].forEach(function(a){wb[a]=new O(a);wb[a].stack=""}))}var ec;function fc(a,b){var c=0;a&&(c|=365);b&&(c|=146);return c}function gc(a,b){a="string"===typeof a?a:Ib(a);for(b=b.split("/").reverse();b.length;){var c=b.pop();if(c){var d=N(a+"/"+c);try{Ub(d)}catch(e){}a=d}}return d} +function hc(a,b,c,d){a=N(("string"===typeof a?a:Ib(a))+"/"+b);c=fc(c,d);return Tb(a,(void 0!==c?c:438)&4095|32768,0)}function ic(a,b,c,d,e,f){a=b?N(("string"===typeof a?a:Ib(a))+"/"+b):a;d=fc(d,e);e=Tb(a,(void 0!==d?d:438)&4095|32768,0);if(c){if("string"===typeof c){a=Array(c.length);b=0;for(var h=c.length;bthis.length-1||0>n)){var r=n%this.$b;return this.Ab(n/this.$b|0)[r]}};f.prototype.Uc=function(n){this.Ab=n};f.prototype.Yb=function(){var n=new XMLHttpRequest;n.open("HEAD",c,!1);n.send(null);if(!(200<=n.status&&300>n.status||304===n.status))throw Error("Couldn't load "+c+". Status: "+n.status);var r=Number(n.getResponseHeader("Content-length")),v,k=(v=n.getResponseHeader("Accept-Ranges"))&&"bytes"===v;n= +(v=n.getResponseHeader("Content-Encoding"))&&"gzip"===v;var u=1048576;k||(u=r);var x=this;x.Uc(function(y){var H=y*u,G=(y+1)*u-1;G=Math.min(G,r-1);if("undefined"===typeof x.yb[y]){var ha=x.yb;if(H>G)throw Error("invalid range ("+H+", "+G+") or no bytes requested!");if(G>r-1)throw Error("only "+r+" bytes available! programmer error!");var w=new XMLHttpRequest;w.open("GET",c,!1);r!==u&&w.setRequestHeader("Range","bytes="+H+"-"+G);"undefined"!=typeof Uint8Array&&(w.responseType="arraybuffer");w.overrideMimeType&& +w.overrideMimeType("text/plain; charset=x-user-defined");w.send(null);if(!(200<=w.status&&300>w.status||304===w.status))throw Error("Couldn't load "+c+". Status: "+w.status);H=void 0!==w.response?new Uint8Array(w.response||[]):pb(w.responseText||"",!0);ha[y]=H}if("undefined"===typeof x.yb[y])throw Error("doXHR failed!");return x.yb[y]});if(n||!r)u=r=1,u=r=this.Ab(0).length,oa("LazyFiles on gzip forces download of the whole file when length is accessed");this.pc=r;this.oc=u;this.Rb=!0};if("undefined"!== +typeof XMLHttpRequest){if(!ja)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var h=new f;Object.defineProperties(h,{length:{get:function(){this.Rb||this.Yb();return this.pc}},$b:{get:function(){this.Rb||this.Yb();return this.oc}}});var l=void 0}else l=c,h=void 0;var m=hc(a,b,d,e);h?m.Ma=h:l&&(m.Ma=null,m.url=l);Object.defineProperties(m,{Ra:{get:function(){return this.Ma.length}}});var p={};Object.keys(m.Oa).forEach(function(n){var r= +m.Oa[n];p[n]=function(){kc(m);return r.apply(null,arguments)}});p.read=function(n,r,v,k,u){kc(m);n=n.node.Ma;if(u>=n.length)return 0;k=Math.min(n.length-u,k);if(n.slice)for(var x=0;x>2]=d.xc;E[b+4>>2]=0;E[b+8>>2]=d.Pb;E[b+12>>2]=d.mode;E[b+16>>2]=d.Oc;E[b+20>>2]=d.uid;E[b+24>>2]=d.Ec;E[b+28>>2]=d.tb;E[b+32>>2]=0;Za=[d.size>>>0,(M=d.size,1<=+Math.abs(M)?0>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)];E[b+40>>2]=Za[0];E[b+44>>2]=Za[1];E[b+48>> +2]=4096;E[b+52>>2]=d.tc;E[b+56>>2]=d.rc.getTime()/1E3|0;E[b+60>>2]=0;E[b+64>>2]=d.Nc.getTime()/1E3|0;E[b+68>>2]=0;E[b+72>>2]=d.wc.getTime()/1E3|0;E[b+76>>2]=0;Za=[d.Pb>>>0,(M=d.Pb,1<=+Math.abs(M)?0>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)];E[b+80>>2]=Za[0];E[b+84>>2]=Za[1];return 0}var qc=void 0;function rc(){qc+=4;return E[qc-4>>2]}function sc(a){a=Bb[a];if(!a)throw new O(8);return a}var tc={}; +function uc(a){for(;a.length;){var b=a.pop();a.pop()(b)}}function vc(a){return this.fromWireType(I[a>>2])}var wc={},xc={},yc={};function zc(a){if(void 0===a)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?"_"+a:a}function Ac(a,b){a=zc(a);return(new Function("body","return function "+a+'() {\n "use strict"; return body.apply(this, arguments);\n};\n'))(b)} +function Bc(a){var b=Error,c=Ac(a,function(d){this.name=a;this.message=d;d=Error(d).stack;void 0!==d&&(this.stack=this.toString()+"\n"+d.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(b.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message};return c}var Cc=void 0;function Dc(a){throw new Cc(a);} +function Ec(a,b,c){function d(l){l=c(l);l.length!==a.length&&Dc("Mismatched type converter count");for(var m=0;m>2)+d]);return c} +function nd(a){var b=Function;if(!(b instanceof Function))throw new TypeError("new_ called with constructor type "+typeof b+" which is not a function");var c=Ac(b.name||"unknownFunctionName",function(){});c.prototype=b.prototype;c=new c;a=b.apply(c,a);return a instanceof Object?a:c} +function od(a,b,c,d,e){var f=b.length;2>f&&T("argTypes array size mismatch! Must at least get return value and 'this' types!");var h=null!==b[1]&&null!==c,l=!1;for(c=1;c>2])};case 3:return function(c){return this.fromWireType(Ia[c>>3])};default:throw new TypeError("Unknown float type: "+a);}} +function sd(a,b,c){switch(b){case 0:return c?function(d){return F[d]}:function(d){return A[d]};case 1:return c?function(d){return ya[d>>1]}:function(d){return C[d>>1]};case 2:return c?function(d){return E[d>>2]}:function(d){return I[d>>2]};default:throw new TypeError("Unknown integer type: "+a);}}function Y(a){a||T("Cannot use deleted val. handle = "+a);return X[a].value}function td(a,b){var c=xc[a];void 0===c&&T(b+" has unknown type "+jd(a));return c} +function ud(a,b){for(var c=Array(a),d=0;d>2)+d],"parameter "+d);return c}var vd={};function wd(a){var b=vd[a];return void 0===b?S(a):b}var xd=[];function yd(){return"object"===typeof globalThis?globalThis:Function("return this")()}function zd(a){var b=xd.length;xd.push(a);return b}var Ad={},Bd;Bd=function(){return performance.now()};var Cd=[],Dd=[];function Z(a,b){I[a>>2]=b;I[a+4>>2]=b/4294967296|0}var Ed; +function Fd(a,b,c,d,e){function f(J){var K=0,D=0;J&&(D=w.response?w.response.byteLength:0,K=Fa(D),A.set(new Uint8Array(w.response),K));I[a+12>>2]=K;Z(a+16,D)}var h=I[a+8>>2];if(h){var l=z(h),m=a+112,p=z(m);p||(p="GET");var n=I[m+52>>2],r=I[m+56>>2],v=!!I[m+60>>2],k=I[m+68>>2],u=I[m+72>>2];h=I[m+76>>2];var x=I[m+80>>2],y=I[m+84>>2];m=I[m+88>>2];var H=!!(n&1),G=!!(n&2);n=!!(n&64);k=k?z(k):void 0;u=u?z(u):void 0;var ha=x?z(x):void 0,w=new XMLHttpRequest;w.withCredentials=v;w.open(p,l,!n,k,u);n||(w.timeout= +r);w.md=l;w.responseType="arraybuffer";x&&w.overrideMimeType(ha);if(h)for(;;){p=I[h>>2];if(!p)break;l=I[h+4>>2];if(!l)break;h+=8;p=z(p);l=z(l);w.setRequestHeader(p,l)}Dd.push(w);I[a+0>>2]=Dd.length;h=y&&m?A.slice(y,y+m):null;w.onload=function(J){f(H&&!G);var K=w.response?w.response.byteLength:0;Z(a+24,0);K&&Z(a+32,K);C[a+40>>1]=w.readyState;C[a+42>>1]=w.status;w.statusText&&B(w.statusText,A,a+44,64);200<=w.status&&300>w.status?b&&b(a,w,J):c&&c(a,w,J)};w.onerror=function(J){f(H);var K=w.status;Z(a+ +24,0);Z(a+32,w.response?w.response.byteLength:0);C[a+40>>1]=w.readyState;C[a+42>>1]=K;c&&c(a,w,J)};w.ontimeout=function(J){c&&c(a,w,J)};w.onprogress=function(J){var K=H&&G&&w.response?w.response.byteLength:0,D=0;H&&G&&(D=Fa(K),A.set(new Uint8Array(w.response),D));I[a+12>>2]=D;Z(a+16,K);Z(a+24,J.loaded-K);Z(a+32,J.total);C[a+40>>1]=w.readyState;3<=w.readyState&&0===w.status&&0>1]=w.status;w.statusText&&B(w.statusText,A,a+44,64);d&&d(a,w,J);D&&W(D)};w.onreadystatechange= +function(J){C[a+40>>1]=w.readyState;2<=w.readyState&&(C[a+42>>1]=w.status);e&&e(a,w,J)};try{w.send(h)}catch(J){c&&c(a,w,J)}}else c(a,0,"no url specified!")}function Gd(a,b){if(!sa)if(b)a();else try{a()}catch(c){if(a=c,!(a instanceof Hd||"unwind"===a))throw a&&"object"===typeof a&&a.stack&&q("exception thrown: "+[a,a.stack]),a;}} +function Id(a,b,c,d){var e=Ed;if(e){var f=I[a+112+64>>2];f||(f=I[a+8>>2]);var h=z(f);try{var l=e.transaction(["FILES"],"readwrite").objectStore("FILES").put(b,h);l.onsuccess=function(){C[a+40>>1]=4;C[a+42>>1]=200;B("OK",A,a+44,64);c(a,0,h)};l.onerror=function(m){C[a+40>>1]=4;C[a+42>>1]=413;B("Payload Too Large",A,a+44,64);d(a,0,m)}}catch(m){d(a,0,m)}}else d(a,0,"IndexedDB not available!")} +function Jd(a,b,c){var d=Ed;if(d){var e=I[a+112+64>>2];e||(e=I[a+8>>2]);e=z(e);try{var f=d.transaction(["FILES"],"readonly").objectStore("FILES").get(e);f.onsuccess=function(h){if(h.target.result){h=h.target.result;var l=h.byteLength||h.length,m=Fa(l);A.set(new Uint8Array(h),m);I[a+12>>2]=m;Z(a+16,l);Z(a+24,0);Z(a+32,l);C[a+40>>1]=4;C[a+42>>1]=200;B("OK",A,a+44,64);b(a,0,h)}else C[a+40>>1]=4,C[a+42>>1]=404,B("Not Found",A,a+44,64),c(a,0,"no data")};f.onerror=function(h){C[a+40>>1]=4;C[a+42>>1]=404; B("Not Found",A,a+44,64);c(a,0,h)}}catch(h){c(a,0,h)}}else c(a,0,"IndexedDB not available!")} -function Ed(a,b,c){var d=yd;if(d){var e=I[a+112+64>>2];e||(e=I[a+8>>2]);e=z(e);try{var f=d.transaction(["FILES"],"readwrite").objectStore("FILES").delete(e);f.onsuccess=function(h){h=h.target.result;I[a+12>>2]=0;Z(a+16,0);Z(a+24,0);Z(a+32,0);C[a+40>>1]=4;C[a+42>>1]=200;B("OK",A,a+44,64);b(a,0,h)};f.onerror=function(h){C[a+40>>1]=4;C[a+42>>1]=404;B("Not Found",A,a+44,64);c(a,0,h)}}catch(h){c(a,0,h)}}else c(a,0,"IndexedDB not available!")}var Fd={}; -function Gd(){if(!Hd){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"===typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ea||"./this.program"},b;for(b in Fd)a[b]=Fd[b];var c=[];for(b in a)c.push(b+"="+a[b]);Hd=c}return Hd}var Hd;function Id(a,b){Id.kc||(Id.kc=ib());for(var c=0;c>0]=Id.kc();return 0}function Jd(a){return 0===a%4&&(0!==a%100||0===a%400)} -function Kd(a,b){for(var c=0,d=0;d<=b;c+=a[d++]);return c}var Ld=[31,29,31,30,31,30,31,31,30,31,30,31],Md=[31,28,31,30,31,30,31,31,30,31,30,31];function Nd(a,b){for(a=new Date(a.getTime());0d-a.getDate())b-=d-a.getDate()+1,a.setDate(1),11>c?a.setMonth(c+1):(a.setMonth(0),a.setFullYear(a.getFullYear()+1));else{a.setDate(a.getDate()+b);break}}return a} -function Od(a,b,c,d){function e(k,u,x){for(k="number"===typeof k?k.toString():k||"";k.lengthH?-1:0=h(x,k)?0>=h(u,k)?k.getFullYear()+1:k.getFullYear():k.getFullYear()-1}var p=E[d+40>>2];d={cd:E[d>>2],bd:E[d+4>>2],Ib:E[d+8>>2],wb:E[d+12>>2],qb:E[d+16>>2],Ya:E[d+20>>2],Jb:E[d+24>>2],Kb:E[d+28>>2],nd:E[d+32>>2],ad:E[d+ -36>>2],dd:p?z(p):""};c=z(c);p={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var n in p)c=c.replace(new RegExp(n,"g"),p[n]);var q="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), -v="January February March April May June July August September October November December".split(" ");p={"%a":function(k){return q[k.Jb].substring(0,3)},"%A":function(k){return q[k.Jb]},"%b":function(k){return v[k.qb].substring(0,3)},"%B":function(k){return v[k.qb]},"%C":function(k){return f((k.Ya+1900)/100|0,2)},"%d":function(k){return f(k.wb,2)},"%e":function(k){return e(k.wb,2," ")},"%g":function(k){return m(k).toString().substring(2)},"%G":function(k){return m(k)},"%H":function(k){return f(k.Ib, -2)},"%I":function(k){k=k.Ib;0==k?k=12:12k.Ib?"AM":"PM"},"%S":function(k){return f(k.cd,2)},"%t":function(){return"\t"},"%u":function(k){return k.Jb||7},"%U":function(k){var u=new Date(k.Ya+1900,0,1),x=0===u.getDay()?u:Nd(u,7-u.getDay());k=new Date(k.Ya+1900,k.qb,k.wb);return 0> -h(x,k)?f(Math.ceil((31-x.getDate()+(Kd(Jd(k.getFullYear())?Ld:Md,k.getMonth()-1)-31)+k.getDate())/7),2):0===h(x,u)?"01":"00"},"%V":function(k){var u=new Date(k.Ya+1901,0,4),x=l(new Date(k.Ya+1900,0,4));u=l(u);var y=Nd(new Date(k.Ya+1900,0,1),k.Kb);return 0>h(y,x)?"53":0>=h(u,y)?"01":f(Math.ceil((x.getFullYear()h(x,k)?f(Math.ceil((31-x.getDate()+(Kd(Jd(k.getFullYear())?Ld:Md,k.getMonth()-1)-31)+k.getDate())/7),2):0===h(x,u)?"01":"00"},"%y":function(k){return(k.Ya+1900).toString().substring(2)},"%Y":function(k){return k.Ya+1900},"%z":function(k){k=k.ad;var u=0<=k;k=Math.abs(k)/60;return(u?"+":"-")+String("0000"+(k/60*100+k%60)).slice(-4)},"%Z":function(k){return k.dd},"%%":function(){return"%"}};for(n in p)c.includes(n)&&(c=c.replace(new RegExp(n,"g"),p[n](d)));n=ob(c, -!1);if(n.length>b)return 0;F.set(n,a);return n.length-1}function Fb(a,b,c,d){a||(a=this);this.parent=a;this.hb=a.hb;this.sb=null;this.id=yb++;this.name=b;this.mode=c;this.Oa={};this.Pa={};this.ub=d} -Object.defineProperties(Fb.prototype,{read:{get:function(){return 365===(this.mode&365)},set:function(a){a?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(a){a?this.mode|=146:this.mode&=-147}},Jc:{get:function(){return Q(this.mode)}},Ic:{get:function(){return 8192===(this.mode&61440)}}});Xb();zb=Array(4096);Lb(P,"/");Nb("/tmp");Nb("/home");Nb("/home/web_user"); -(function(){Nb("/dev");mb(259,{read:function(){return 0},write:function(b,c,d,e){return e}});Ob("/dev/null",259);lb(1280,pb);lb(1536,qb);Ob("/dev/tty",1280);Ob("/dev/tty1",1536);var a=ib();cc("/dev","random",a);cc("/dev","urandom",a);Nb("/dev/shm");Nb("/dev/shm/tmp")})(); -(function(){Nb("/proc");var a=Nb("/proc/self");Nb("/proc/self/fd");Lb({hb:function(){var b=sb(a,"fd",16895,73);b.Oa={rb:function(c,d){var e=xb[+d];if(!e)throw new O(8);c={parent:null,hb:{ic:"fake"},Oa:{vb:function(){return e.path}}};return c.parent=c}};return b}},"/proc/self/fd")})();var gc;g.FS_createPath=$b;g.FS_createDataFile=bc;g.FS_createPreloadedFile=fc;g.FS_createLazyFile=ec;g.FS_createDevice=cc;g.FS_unlink=Qb;vc=g.InternalError=uc("InternalError"); -for(var Pd=Array(256),Qd=0;256>Qd;++Qd)Pd[Qd]=String.fromCharCode(Qd);Ac=Pd;Bc=g.BindingError=uc("BindingError");Kc.prototype.isAliasOf=function(a){if(!(this instanceof Kc&&a instanceof Kc))return!1;var b=this.Ma.Ua.Qa,c=this.Ma.Ra,d=a.Ma.Ua.Qa;for(a=a.Ma.Ra;b.bb;)c=b.xb(c),b=b.bb;for(;d.bb;)a=d.xb(a),d=d.bb;return b===d&&c===a}; -Kc.prototype.clone=function(){this.Ma.Ra||Cc(this);if(this.Ma.tb)return this.Ma.count.value+=1,this;var a=Gc,b=Object,c=b.create,d=Object.getPrototypeOf(this),e=this.Ma;a=a(c.call(b,d,{Ma:{value:{count:e.count,mb:e.mb,tb:e.tb,Ra:e.Ra,Ua:e.Ua,$a:e.$a,ab:e.ab}}}));a.Ma.count.value+=1;a.Ma.mb=!1;return a};Kc.prototype["delete"]=function(){this.Ma.Ra||Cc(this);this.Ma.mb&&!this.Ma.tb&&T("Object already scheduled for deletion");Ec(this);Fc(this.Ma);this.Ma.tb||(this.Ma.$a=void 0,this.Ma.Ra=void 0)}; -Kc.prototype.isDeleted=function(){return!this.Ma.Ra};Kc.prototype.deleteLater=function(){this.Ma.Ra||Cc(this);this.Ma.mb&&!this.Ma.tb&&T("Object already scheduled for deletion");Ic.push(this);1===Ic.length&&Hc&&Hc(Jc);this.Ma.mb=!0;return this};Yc.prototype.Cc=function(a){this.lc&&(a=this.lc(a));return a};Yc.prototype.bc=function(a){this.ib&&this.ib(a)};Yc.prototype.argPackAdvance=8;Yc.prototype.readValueFromPointer=oc;Yc.prototype.deleteObject=function(a){if(null!==a)a["delete"]()}; -Yc.prototype.fromWireType=function(a){function b(){return this.Db?Xc(this.Qa.nb,{Ua:this.Qc,Ra:c,ab:this,$a:a}):Xc(this.Qa.nb,{Ua:this,Ra:a})}var c=this.Cc(a);if(!c)return this.bc(a),null;var d=Wc(this.Qa,c);if(void 0!==d){if(0===d.Ma.count.value)return d.Ma.Ra=c,d.Ma.$a=a,d.clone();d=d.clone();this.bc(a);return d}d=this.Qa.Bc(c);d=Lc[d];if(!d)return b.call(this);d=this.Cb?d.wc:d.pointerType;var e=Uc(c,this.Qa,d.Qa);return null===e?b.call(this):this.Db?Xc(d.Qa.nb,{Ua:d,Ra:e,ab:this,$a:a}):Xc(d.Qa.nb, -{Ua:d,Ra:e})};g.getInheritedInstanceCount=function(){return Object.keys(Vc).length};g.getLiveInheritedInstances=function(){var a=[],b;for(b in Vc)Vc.hasOwnProperty(b)&&a.push(Vc[b]);return a};g.flushPendingDeletes=Jc;g.setDelayFunction=function(a){Hc=a;Ic.length&&Hc&&Hc(Jc)};ad=g.UnboundTypeError=uc("UnboundTypeError");g.count_emval_handles=function(){for(var a=0,b=5;b>2]);E[b>>2]=a.getSeconds();E[b+4>>2]=a.getMinutes();E[b+8>>2]=a.getHours();E[b+12>>2]=a.getDate();E[b+16>>2]=a.getMonth();E[b+20>>2]=a.getFullYear()-1900;E[b+24>>2]=a.getDay();var c=new Date(a.getFullYear(),0,1);E[b+28>>2]=(a.getTime()-c.getTime())/864E5|0;E[b+36>>2]=-(60*a.getTimezoneOffset());var d=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();c=c.getTimezoneOffset();a=(d!=c&&a.getTimezoneOffset()==Math.min(c,d))|0;E[b+32>>2]=a;a=E[eb()+(a? -4:0)>>2];E[b+40>>2]=a;return b},D:function(a,b,c){jc=c;try{var d=lc(a);switch(b){case 0:var e=kc();return 0>e?-28:Sb(d.path,d.flags,0,e).eb;case 1:case 2:return 0;case 3:return d.flags;case 4:return e=kc(),d.flags|=e,0;case 12:return e=kc(),xa[e+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return-1;default:return-28}}catch(f){return"undefined"!==typeof R&&f instanceof O||t(f),-f.Va}},Z:function(a,b){try{var c=lc(a);return ic(c.path,b)}catch(d){return"undefined"!==typeof R&&d instanceof -O||t(d),-d.Va}},X:function(a,b,c){jc=c;try{var d=lc(a);switch(b){case 21509:case 21505:return d.Ta?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return d.Ta?0:-59;case 21519:if(!d.Ta)return-59;var e=kc();return E[e>>2]=0;case 21520:return d.Ta?-28:-59;case 21531:a=e=kc();if(!d.Pa.Hc)throw new O(59);return d.Pa.Hc(d,b,a);case 21523:return d.Ta?0:-59;case 21524:return d.Ta?0:-59;default:t("bad ioctl syscall "+b)}}catch(f){return"undefined"!==typeof R&&f instanceof O||t(f), --f.Va}},aa:function(a,b,c,d,e,f){try{a:{f<<=12;var h=!1;if(0!==(d&16)&&0!==a%65536)var l=-28;else{if(0!==(d&32)){var m=Rd(65536,b);if(!m){l=-48;break a}Sd(m,0,b);h=!0}else{var p=xb[e];if(!p){l=-8;break a}var n=f;if(0!==(c&2)&&0===(d&2)&&2!==(p.flags&2097155))throw new O(2);if(1===(p.flags&2097155))throw new O(2);if(!p.Pa.Fb)throw new O(43);var q=p.Pa.Fb(p,a,b,n,c,d);m=q.Ra;h=q.Mb}hc[m]={Mc:m,Lc:b,Mb:h,eb:e,Rc:c,flags:d,offset:f};l=m}}return l}catch(v){return"undefined"!==typeof R&&v instanceof O|| -t(v),-v.Va}},$:function(){return 0},_:function(a,b){try{if(-1===(a|0)||0===b)var c=-28;else{var d=hc[a];if(d&&b===d.Lc){var e=xb[d.eb];e&&d.Rc&2&&e&&e.Pa.Gb&&e.Pa.Gb(e,A.slice(a,a+b),d.offset,b,d.flags);hc[a]=null;d.Mb&&W(d.Mc)}c=0}return c}catch(f){return"undefined"!==typeof R&&f instanceof O||t(f),-f.Va}},E:function(a,b,c){jc=c;try{var d=z(a),e=c?kc():0;return Sb(d,b,e).eb}catch(f){return"undefined"!==typeof R&&f instanceof O||t(f),-f.Va}},Y:function(a,b){try{return a=z(a),ic(a,b)}catch(c){return"undefined"!== -typeof R&&c instanceof O||t(c),-c.Va}},d:function(a){var b=mc[a];delete mc[a];var c=b.Ub,d=b.ib,e=b.dc,f=e.map(function(h){return h.Ec}).concat(e.map(function(h){return h.Yc}));xc([a],f,function(h){var l={};e.forEach(function(m,p){var n=h[p],q=m.Bb,v=m.Dc,k=h[p+e.length],u=m.Xc,x=m.Zc;l[m.Ac]={read:function(y){return n.fromWireType(q(v,y))},write:function(y,H){var G=[];u(x,y,k.toWireType(G,H));nc(G)}}});return[{name:b.name,fromWireType:function(m){var p={},n;for(n in l)p[n]=l[n].read(m);d(m);return p}, -toWireType:function(m,p){for(var n in l)if(!(n in p))throw new TypeError('Missing field: "'+n+'"');var q=c();for(n in l)l[n].write(q,p[n]);null!==m&&m.push(d,q);return q},argPackAdvance:8,readValueFromPointer:oc,cb:d}]})},N:function(){},ca:function(a,b,c,d,e){var f=zc(c);b=S(b);yc(a,{name:b,fromWireType:function(h){return!!h},toWireType:function(h,l){return l?d:e},argPackAdvance:8,readValueFromPointer:function(h){if(1===c)var l=F;else if(2===c)l=xa;else if(4===c)l=E;else throw new TypeError("Unknown boolean type size: "+ -b);return this.fromWireType(l[h>>f])},cb:null})},v:function(a,b,c,d,e,f,h,l,m,p,n,q,v){n=S(n);f=V(e,f);l&&(l=V(h,l));p&&(p=V(m,p));v=V(q,v);var k=sc(n);Nc(k,function(){dd("Cannot construct "+n+" due to unbound types",[d])});xc([a,b,c],d?[d]:[],function(u){u=u[0];if(d){var x=u.Qa;var y=x.nb}else y=Kc.prototype;u=tc(k,function(){if(Object.getPrototypeOf(this)!==H)throw new Bc("Use 'new' to construct "+n);if(void 0===G.jb)throw new Bc(n+" has no accessible constructor");var w=G.jb[arguments.length]; -if(void 0===w)throw new Bc("Tried to invoke ctor of "+n+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(G.jb).toString()+") parameters instead!");return w.apply(this,arguments)});var H=Object.create(y,{constructor:{value:u}});u.prototype=H;var G=new Oc(n,u,H,v,x,f,l,p);x=new Yc(n,G,!0,!1);y=new Yc(n+"*",G,!1,!1);var ha=new Yc(n+" const*",G,!1,!0);Lc[a]={pointerType:y,wc:ha};Zc(k,u);return[x,y,ha]})},J:function(a,b,c,d,e,f){0>>l}}var m=b.includes("unsigned");yc(a,{name:b,fromWireType:f,toWireType:function(p,n){if("number"!==typeof n&&"boolean"!==typeof n)throw new TypeError('Cannot convert "'+Rc(n)+'" to '+this.name);if(ne)throw new TypeError('Passing a number "'+Rc(n)+'" from JS side to C/C++ side to an argument of type "'+b+'", which is outside the valid range ['+d+", "+e+"]!");return m?n>>>0:n|0},argPackAdvance:8,readValueFromPointer:ld(b,h,0!==d),cb:null})},f:function(a,b,c){function d(f){f>>=2;var h=I;return new e(Fa, -h[f+1],h[f])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=S(c);yc(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d},{Gc:!0})},G:function(a,b){b=S(b);var c="std::string"===b;yc(a,{name:b,fromWireType:function(d){var e=I[d>>2];if(c)for(var f=d+4,h=0;h<=e;++h){var l=d+4+h;if(h==e||0==A[l]){f=z(f,l-f);if(void 0===m)var m=f;else m+=String.fromCharCode(0),m+=f;f=l+1}}else{m=Array(e);for(h=0;h>2]=h;if(c&&f)B(e,A,l+4,h+1);else if(f)for(f=0;f>2],n=h(),q,v=m+4,k=0;k<=p;++k){var u=m+4+k*b;if(k==p||0==n[u>>l])v=d(v,u-v),void 0===q?q=v:(q+=String.fromCharCode(0),q+=v),v=u+b}W(m);return q},toWireType:function(m, -p){"string"!==typeof p&&T("Cannot pass non-string to C++ string type "+c);var n=f(p),q=Ea(4+n+b);I[q>>2]=n>>l;e(p,q+4,n+b);null!==m&&m.push(W,q);return q},argPackAdvance:8,readValueFromPointer:oc,cb:function(m){W(m)}})},e:function(a,b,c,d,e,f){mc[a]={name:S(b),Ub:V(c,d),ib:V(e,f),dc:[]}},a:function(a,b,c,d,e,f,h,l,m,p){mc[a].dc.push({Ac:S(b),Ec:c,Bb:V(d,e),Dc:f,Yc:h,Xc:V(l,m),Zc:p})},da:function(a,b){b=S(b);yc(a,{Kc:!0,name:b,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},ea:function(a){delete xd[a- -1]},h:function(a,b,c){a=Y(a);b=md(b,"emval::as");var d=[],e=U(d);E[c>>2]=e;return b.toWireType(d,a)},ma:function(a,b,c,d){a=Y(a);c=nd(b,c);for(var e=Array(b),f=0;f>> 2) + "+f+'], "parameter '+f+'");\nvar arg'+f+" = argType"+f+".readValueFromPointer(args);\nargs += argType"+ -f+"['argPackAdvance'];\n";e=(new Function("requireRegisteredType","Module","__emval_register",h+("var obj = new constructor("+e+");\nreturn __emval_register(obj);\n}\n")))(md,g,U);td[b]=e}return e(a,c,d)},ia:function(){return U([])},L:function(a){return U(pd(a))},ka:function(){return U({})},pa:function(a){nc(X[a].value);jd(a)},p:function(a,b,c){a=Y(a);b=Y(b);c=Y(c);a[b]=c},l:function(a,b){a=md(a,"_emval_take_value");a=a.readValueFromPointer(b);return U(a)},oa:function(a){a=Y(a);return U(typeof a)}, -j:function(){t()},A:function(a,b){if(0===a)a=Date.now();else if(1===a||4===a)a=ud();else return-1;E[b>>2]=a/1E3|0;E[b+4>>2]=a%1E3*1E6|0;return 0},o:function(a,b,c){vd.length=0;var d;for(c>>=2;d=A[b++];)(d=105>d)&&c&1&&c++,vd.push(d?Ha[c++>>1]:E[c]),++c;return Za[a].apply(null,vd)},ga:wd,y:function(a,b){Td(a,b||1);throw"longjmp";},P:function(a,b,c){A.copyWithin(a,b,b+c)},Q:function(a){var b=A.length;a>>>=0;if(2147483648=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);d= -Math.max(a,d);0>>16);Ia();var e=1;break a}catch(f){}e=void 0}if(e)return!0}return!1},fa:function(a,b,c,d,e){function f(D){zd(D,h,p,n,m)}function h(D,Yd){Cd(D,Yd.response,function(Ua){Ad(function(){u?L.get(u)(Ua):b&&b(Ua)},K)},function(Ua){Ad(function(){u?L.get(u)(Ua):b&&b(Ua)},K)})}function l(D){zd(D,q,p,n,m)}function m(D){Ad(function(){H?L.get(H)(D):e&&e(D)},K)}function p(D){Ad(function(){x?L.get(x)(D):c&&c(D)}, -K)}function n(D){Ad(function(){y?L.get(y)(D):d&&d(D)},K)}function q(D){Ad(function(){u?L.get(u)(D):b&&b(D)},K)}var v=a+112,k=z(v),u=I[v+36>>2],x=I[v+40>>2],y=I[v+44>>2],H=I[v+48>>2],G=I[v+52>>2],ha=!!(G&4),w=!!(G&32),J=!!(G&16),K=!!(G&64);if("EM_IDB_STORE"===k)k=I[v+84>>2],Cd(a,A.slice(k,k+I[v+88>>2]),q,p);else if("EM_IDB_DELETE"===k)Ed(a,q,p);else if(J){if(w)return 0;zd(a,ha?h:q,p,n,m)}else Dd(a,q,w?p:ha?f:l);return a},U:function(a,b){try{var c=0;Gd().forEach(function(d,e){var f=b+c;e=E[a+4*e>>2]= -f;for(f=0;f>0]=d.charCodeAt(f);F[e>>0]=0;c+=d.length+1});return 0}catch(d){return"undefined"!==typeof R&&d instanceof O||t(d),d.Va}},V:function(a,b){try{var c=Gd();E[a>>2]=c.length;var d=0;c.forEach(function(e){d+=e.length+1});E[b>>2]=d;return 0}catch(e){return"undefined"!==typeof R&&e instanceof O||t(e),e.Va}},s:function(a){if(!noExitRuntime){if(g.onExit)g.onExit(a);ra=!0}fa(a,new Bd(a))},q:function(a){try{var b=lc(a);Ub(b);return 0}catch(c){return"undefined"!==typeof R&&c instanceof -O||t(c),c.Va}},T:function(a,b){try{var c=lc(a);F[b>>0]=c.Ta?2:Q(c.mode)?3:40960===(c.mode&61440)?7:4;return 0}catch(d){return"undefined"!==typeof R&&d instanceof O||t(d),d.Va}},C:function(a,b,c,d){try{a:{for(var e=lc(a),f=a=0;f>2],l=e,m=E[b+8*f>>2],p=h,n=void 0,q=F;if(0>p||0>n)throw new O(28);if(null===l.eb)throw new O(8);if(1===(l.flags&2097155))throw new O(8);if(Q(l.node.mode))throw new O(31);if(!l.Pa.read)throw new O(28);var v="undefined"!==typeof n;if(!v)n=l.position; -else if(!l.seekable)throw new O(70);var k=l.Pa.read(l,q,m,p,n);v||(l.position+=k);var u=k;if(0>u){var x=-1;break a}a+=u;if(u>2]=x;return 0}catch(y){return"undefined"!==typeof R&&y instanceof O||t(y),y.Va}},M:function(a,b,c,d,e){try{var f=lc(a);a=4294967296*c+(b>>>0);if(-9007199254740992>=a||9007199254740992<=a)return-61;Vb(f,a,d);Ya=[f.position>>>0,(M=f.position,1<=+Math.abs(M)?0>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0: -0)];E[e>>2]=Ya[0];E[e+4>>2]=Ya[1];f.Pb&&0===a&&0===d&&(f.Pb=null);return 0}catch(h){return"undefined"!==typeof R&&h instanceof O||t(h),h.Va}},B:function(a,b,c,d){try{a:{for(var e=lc(a),f=a=0;f>2],E[b+(8*f+4)>>2],void 0);if(0>h){var l=-1;break a}a+=h}l=a}E[d>>2]=l;return 0}catch(m){return"undefined"!==typeof R&&m instanceof O||t(m),m.Va}},c:function(){return oa},qa:function(){var a=self.navigator.userAgent,b=ua(a)+1,c=Ea(b);B(a,A,c,b);return c},R:Id,O:Ud,x:Vd,w:Wd,ha:function(a){ab(); -var b=new Date(E[a+20>>2]+1900,E[a+16>>2],E[a+12>>2],E[a+8>>2],E[a+4>>2],E[a>>2],0),c=E[a+32>>2],d=b.getTimezoneOffset(),e=new Date(b.getFullYear(),0,1),f=(new Date(b.getFullYear(),6,1)).getTimezoneOffset(),h=e.getTimezoneOffset(),l=Math.min(h,f);0>c?E[a+32>>2]=Number(f!=h&&l==d):0>2]=b.getDay();E[a+28>>2]=(b.getTime()-e.getTime())/864E5|0;E[a>>2]=b.getSeconds();E[a+4>>2]=b.getMinutes();E[a+8>>2]=b.getHours();E[a+12>>2]= -b.getDate();E[a+16>>2]=b.getMonth();return b.getTime()/1E3|0},b:function(a){oa=a},H:Od,S:function(a,b,c,d){return Od(a,b,c,d)},I:function(a){var b=Date.now()/1E3|0;a&&(E[a>>2]=b);return b}}; -(function(){function a(e){g.asm=e.exports;qa=g.asm.ra;Ia();L=g.asm.Fa;Ka.unshift(g.asm.sa);Ra("wasm-instantiate")}function b(e){a(e.instance)}function c(e){return Xa().then(function(f){return WebAssembly.instantiate(f,d)}).then(e,function(f){r("failed to asynchronously prepare wasm: "+f);t(f)})}var d={a:Xd};Qa("wasm-instantiate");if(g.instantiateWasm)try{return g.instantiateWasm(d,a)}catch(e){return r("Module.instantiateWasm callback failed with error: "+e),!1}(function(){return pa||"function"!== -typeof WebAssembly.instantiateStreaming||Sa()||"function"!==typeof fetch?c(b):fetch(Ta,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,d).then(b,function(f){r("wasm streaming compile failed: "+f);r("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(ba);return{}})();g.___wasm_call_ctors=function(){return(g.___wasm_call_ctors=g.asm.sa).apply(null,arguments)}; -var W=g._free=function(){return(W=g._free=g.asm.ta).apply(null,arguments)},Ea=g._malloc=function(){return(Ea=g._malloc=g.asm.ua).apply(null,arguments)},cd=g.___getTypeName=function(){return(cd=g.___getTypeName=g.asm.va).apply(null,arguments)};g.___embind_register_native_and_builtin_types=function(){return(g.___embind_register_native_and_builtin_types=g.asm.wa).apply(null,arguments)}; -var Sd=g._memset=function(){return(Sd=g._memset=g.asm.xa).apply(null,arguments)},eb=g.__get_tzname=function(){return(eb=g.__get_tzname=g.asm.ya).apply(null,arguments)},db=g.__get_daylight=function(){return(db=g.__get_daylight=g.asm.za).apply(null,arguments)},cb=g.__get_timezone=function(){return(cb=g.__get_timezone=g.asm.Aa).apply(null,arguments)},Zd=g.stackSave=function(){return(Zd=g.stackSave=g.asm.Ba).apply(null,arguments)},$d=g.stackRestore=function(){return($d=g.stackRestore=g.asm.Ca).apply(null, -arguments)},Td=g._setThrew=function(){return(Td=g._setThrew=g.asm.Da).apply(null,arguments)},Rd=g._memalign=function(){return(Rd=g._memalign=g.asm.Ea).apply(null,arguments)};g.dynCall_jiji=function(){return(g.dynCall_jiji=g.asm.Ga).apply(null,arguments)};g.dynCall_ji=function(){return(g.dynCall_ji=g.asm.Ha).apply(null,arguments)};g.dynCall_viijii=function(){return(g.dynCall_viijii=g.asm.Ia).apply(null,arguments)};g.dynCall_iiiiij=function(){return(g.dynCall_iiiiij=g.asm.Ja).apply(null,arguments)}; -g.dynCall_iiiiijj=function(){return(g.dynCall_iiiiijj=g.asm.Ka).apply(null,arguments)};g.dynCall_iiiiiijj=function(){return(g.dynCall_iiiiiijj=g.asm.La).apply(null,arguments)};function Vd(a,b){var c=Zd();try{L.get(a)(b)}catch(d){$d(c);if(d!==d+0&&"longjmp"!==d)throw d;Td(1,0)}}function Wd(a,b,c){var d=Zd();try{L.get(a)(b,c)}catch(e){$d(d);if(e!==e+0&&"longjmp"!==e)throw e;Td(1,0)}} -function Ud(a,b,c,d){var e=Zd();try{return L.get(a)(b,c,d)}catch(f){$d(e);if(f!==f+0&&"longjmp"!==f)throw f;Td(1,0)}}g.addRunDependency=Qa;g.removeRunDependency=Ra;g.FS_createPath=$b;g.FS_createDataFile=bc;g.FS_createPreloadedFile=fc;g.FS_createLazyFile=ec;g.FS_createDevice=cc;g.FS_unlink=Qb;var ae;function Bd(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}Pa=function be(){ae||ce();ae||(Pa=be)}; -function ce(){function a(){if(!ae&&(ae=!0,g.calledRun=!0,!ra)){g.noFSInit||Yb||(Yb=!0,Xb(),g.stdin=g.stdin,g.stdout=g.stdout,g.stderr=g.stderr,g.stdin?cc("/dev","stdin",g.stdin):Pb("/dev/tty","/dev/stdin"),g.stdout?cc("/dev","stdout",null,g.stdout):Pb("/dev/tty","/dev/stdout"),g.stderr?cc("/dev","stderr",null,g.stderr):Pb("/dev/tty1","/dev/stderr"),Sb("/dev/stdin",0),Sb("/dev/stdout",1),Sb("/dev/stderr",1));$a(Ka);aa(g);if(g.onRuntimeInitialized)g.onRuntimeInitialized();if(g.postRun)for("function"== -typeof g.postRun&&(g.postRun=[g.postRun]);g.postRun.length;){var b=g.postRun.shift();La.unshift(b)}$a(La)}}if(!(0>2];e||(e=I[a+8>>2]);e=z(e);try{var f=d.transaction(["FILES"],"readwrite").objectStore("FILES").delete(e);f.onsuccess=function(h){h=h.target.result;I[a+12>>2]=0;Z(a+16,0);Z(a+24,0);Z(a+32,0);C[a+40>>1]=4;C[a+42>>1]=200;B("OK",A,a+44,64);b(a,0,h)};f.onerror=function(h){C[a+40>>1]=4;C[a+42>>1]=404;B("Not Found",A,a+44,64);c(a,0,h)}}catch(h){c(a,0,h)}}else c(a,0,"IndexedDB not available!")}var Ld={}; +function Md(){if(!Nd){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"===typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ea||"./this.program"},b;for(b in Ld)void 0===Ld[b]?delete a[b]:a[b]=Ld[b];var c=[];for(b in a)c.push(b+"="+a[b]);Nd=c}return Nd}var Nd;function Od(a,b){Od.jc||(Od.jc=jb());for(var c=0;c>0]=Od.jc();return 0}function Pd(a){return 0===a%4&&(0!==a%100||0===a%400)} +function Qd(a,b){for(var c=0,d=0;d<=b;c+=a[d++]);return c}var Rd=[31,29,31,30,31,30,31,31,30,31,30,31],Sd=[31,28,31,30,31,30,31,31,30,31,30,31];function Td(a,b){for(a=new Date(a.getTime());0d-a.getDate())b-=d-a.getDate()+1,a.setDate(1),11>c?a.setMonth(c+1):(a.setMonth(0),a.setFullYear(a.getFullYear()+1));else{a.setDate(a.getDate()+b);break}}return a} +function Ud(a,b,c,d){function e(k,u,x){for(k="number"===typeof k?k.toString():k||"";k.lengthH?-1:0=h(x,k)?0>=h(u,k)?k.getFullYear()+1:k.getFullYear():k.getFullYear()-1}var p=E[d+40>>2];d={bd:E[d>>2],ad:E[d+4>>2],Hb:E[d+8>>2],vb:E[d+12>>2],pb:E[d+16>>2],Xa:E[d+20>>2],Ib:E[d+24>>2],Jb:E[d+28>>2],ld:E[d+32>>2],$c:E[d+ +36>>2],cd:p?z(p):""};c=z(c);p={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var n in p)c=c.replace(new RegExp(n,"g"),p[n]);var r="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), +v="January February March April May June July August September October November December".split(" ");p={"%a":function(k){return r[k.Ib].substring(0,3)},"%A":function(k){return r[k.Ib]},"%b":function(k){return v[k.pb].substring(0,3)},"%B":function(k){return v[k.pb]},"%C":function(k){return f((k.Xa+1900)/100|0,2)},"%d":function(k){return f(k.vb,2)},"%e":function(k){return e(k.vb,2," ")},"%g":function(k){return m(k).toString().substring(2)},"%G":function(k){return m(k)},"%H":function(k){return f(k.Hb, +2)},"%I":function(k){k=k.Hb;0==k?k=12:12k.Hb?"AM":"PM"},"%S":function(k){return f(k.bd,2)},"%t":function(){return"\t"},"%u":function(k){return k.Ib||7},"%U":function(k){var u=new Date(k.Xa+1900,0,1),x=0===u.getDay()?u:Td(u,7-u.getDay());k=new Date(k.Xa+1900,k.pb,k.vb);return 0> +h(x,k)?f(Math.ceil((31-x.getDate()+(Qd(Pd(k.getFullYear())?Rd:Sd,k.getMonth()-1)-31)+k.getDate())/7),2):0===h(x,u)?"01":"00"},"%V":function(k){var u=new Date(k.Xa+1901,0,4),x=l(new Date(k.Xa+1900,0,4));u=l(u);var y=Td(new Date(k.Xa+1900,0,1),k.Jb);return 0>h(y,x)?"53":0>=h(u,y)?"01":f(Math.ceil((x.getFullYear()h(x,k)?f(Math.ceil((31-x.getDate()+(Qd(Pd(k.getFullYear())?Rd:Sd,k.getMonth()-1)-31)+k.getDate())/7),2):0===h(x,u)?"01":"00"},"%y":function(k){return(k.Xa+1900).toString().substring(2)},"%Y":function(k){return k.Xa+1900},"%z":function(k){k=k.$c;var u=0<=k;k=Math.abs(k)/60;return(u?"+":"-")+String("0000"+(k/60*100+k%60)).slice(-4)},"%Z":function(k){return k.cd},"%%":function(){return"%"}};for(n in p)c.includes(n)&&(c=c.replace(new RegExp(n,"g"),p[n](d)));n=pb(c, +!1);if(n.length>b)return 0;F.set(n,a);return n.length-1}function Lb(a,b,c,d){a||(a=this);this.parent=a;this.gb=a.gb;this.rb=null;this.id=Cb++;this.name=b;this.mode=c;this.Na={};this.Oa={};this.tb=d} +Object.defineProperties(Lb.prototype,{read:{get:function(){return 365===(this.mode&365)},set:function(a){a?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(a){a?this.mode|=146:this.mode&=-147}},Ic:{get:function(){return Q(this.mode)}},Hc:{get:function(){return 8192===(this.mode&61440)}}});dc();Db=Array(4096);Sb(P,"/");Ub("/tmp");Ub("/home");Ub("/home/web_user"); +(function(){Ub("/dev");nb(259,{read:function(){return 0},write:function(b,c,d,e){return e}});Vb("/dev/null",259);mb(1280,qb);mb(1536,rb);Vb("/dev/tty",1280);Vb("/dev/tty1",1536);var a=jb();jc("/dev","random",a);jc("/dev","urandom",a);Ub("/dev/shm");Ub("/dev/shm/tmp")})(); +(function(){Ub("/proc");var a=Ub("/proc/self");Ub("/proc/self/fd");Sb({gb:function(){var b=vb(a,"fd",16895,73);b.Na={qb:function(c,d){var e=Bb[+d];if(!e)throw new O(8);c={parent:null,gb:{hc:"fake"},Na:{ub:function(){return e.path}}};return c.parent=c}};return b}},"/proc/self/fd")})();var nc;g.FS_createPath=gc;g.FS_createDataFile=ic;g.FS_createPreloadedFile=mc;g.FS_createLazyFile=lc;g.FS_createDevice=jc;g.FS_unlink=Xb;Cc=g.InternalError=Bc("InternalError"); +for(var Vd=Array(256),Wd=0;256>Wd;++Wd)Vd[Wd]=String.fromCharCode(Wd);Hc=Vd;Ic=g.BindingError=Bc("BindingError");Rc.prototype.isAliasOf=function(a){if(!(this instanceof Rc&&a instanceof Rc))return!1;var b=this.La.Ta.Pa,c=this.La.Qa,d=a.La.Ta.Pa;for(a=a.La.Qa;b.ab;)c=b.wb(c),b=b.ab;for(;d.ab;)a=d.wb(a),d=d.ab;return b===d&&c===a}; +Rc.prototype.clone=function(){this.La.Qa||Jc(this);if(this.La.sb)return this.La.count.value+=1,this;var a=Nc,b=Object,c=b.create,d=Object.getPrototypeOf(this),e=this.La;a=a(c.call(b,d,{La:{value:{count:e.count,lb:e.lb,sb:e.sb,Qa:e.Qa,Ta:e.Ta,Za:e.Za,$a:e.$a}}}));a.La.count.value+=1;a.La.lb=!1;return a};Rc.prototype["delete"]=function(){this.La.Qa||Jc(this);this.La.lb&&!this.La.sb&&T("Object already scheduled for deletion");Lc(this);Mc(this.La);this.La.sb||(this.La.Za=void 0,this.La.Qa=void 0)}; +Rc.prototype.isDeleted=function(){return!this.La.Qa};Rc.prototype.deleteLater=function(){this.La.Qa||Jc(this);this.La.lb&&!this.La.sb&&T("Object already scheduled for deletion");Pc.push(this);1===Pc.length&&Oc&&Oc(Qc);this.La.lb=!0;return this};ed.prototype.Bc=function(a){this.kc&&(a=this.kc(a));return a};ed.prototype.ac=function(a){this.hb&&this.hb(a)};ed.prototype.argPackAdvance=8;ed.prototype.readValueFromPointer=vc;ed.prototype.deleteObject=function(a){if(null!==a)a["delete"]()}; +ed.prototype.fromWireType=function(a){function b(){return this.Cb?dd(this.Pa.mb,{Ta:this.Pc,Qa:c,$a:this,Za:a}):dd(this.Pa.mb,{Ta:this,Qa:a})}var c=this.Bc(a);if(!c)return this.ac(a),null;var d=cd(this.Pa,c);if(void 0!==d){if(0===d.La.count.value)return d.La.Qa=c,d.La.Za=a,d.clone();d=d.clone();this.ac(a);return d}d=this.Pa.Ac(c);d=Sc[d];if(!d)return b.call(this);d=this.Bb?d.vc:d.pointerType;var e=ad(c,this.Pa,d.Pa);return null===e?b.call(this):this.Cb?dd(d.Pa.mb,{Ta:d,Qa:e,$a:this,Za:a}):dd(d.Pa.mb, +{Ta:d,Qa:e})};g.getInheritedInstanceCount=function(){return Object.keys(bd).length};g.getLiveInheritedInstances=function(){var a=[],b;for(b in bd)bd.hasOwnProperty(b)&&a.push(bd[b]);return a};g.flushPendingDeletes=Qc;g.setDelayFunction=function(a){Oc=a;Pc.length&&Oc&&Oc(Qc)};hd=g.UnboundTypeError=Bc("UnboundTypeError");g.count_emval_handles=function(){for(var a=0,b=5;b>2]);E[b>>2]=a.getSeconds();E[b+4>>2]=a.getMinutes();E[b+8>>2]=a.getHours();E[b+12>>2]=a.getDate();E[b+16>>2]=a.getMonth();E[b+20>>2]=a.getFullYear()-1900;E[b+24>>2]=a.getDay();var c=new Date(a.getFullYear(),0,1);E[b+28>>2]=(a.getTime()-c.getTime())/864E5|0;E[b+36>>2]=-(60*a.getTimezoneOffset());var d=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();c=c.getTimezoneOffset();a=(d!=c&&a.getTimezoneOffset()==Math.min(c,d))|0;E[b+32>>2]=a; +a=E[eb()+(a?4:0)>>2];E[b+40>>2]=a;return b},C:function(a,b,c){qc=c;try{var d=sc(a);switch(b){case 0:var e=rc();return 0>e?-28:Zb(d.path,d.flags,0,e).cb;case 1:case 2:return 0;case 3:return d.flags;case 4:return e=rc(),d.flags|=e,0;case 12:return e=rc(),ya[e+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return-1;default:return-28}}catch(f){return"undefined"!==typeof R&&f instanceof O||t(f),-f.Wa}},Z:function(a,b){try{var c=sc(a);return pc(c.path,b)}catch(d){return"undefined"!== +typeof R&&d instanceof O||t(d),-d.Wa}},X:function(a,b,c){qc=c;try{var d=sc(a);switch(b){case 21509:case 21505:return d.Sa?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return d.Sa?0:-59;case 21519:if(!d.Sa)return-59;var e=rc();return E[e>>2]=0;case 21520:return d.Sa?-28:-59;case 21531:a=e=rc();if(!d.Oa.Gc)throw new O(59);return d.Oa.Gc(d,b,a);case 21523:return d.Sa?0:-59;case 21524:return d.Sa?0:-59;default:t("bad ioctl syscall "+b)}}catch(f){return"undefined"!==typeof R&& +f instanceof O||t(f),-f.Wa}},aa:function(a,b,c,d,e,f){try{a:{f<<=12;var h=!1;if(0!==(d&16)&&0!==a%65536)var l=-28;else{if(0!==(d&32)){var m=sb(b);if(!m){l=-48;break a}h=!0}else{var p=Bb[e];if(!p){l=-8;break a}var n=f;if(0!==(c&2)&&0===(d&2)&&2!==(p.flags&2097155))throw new O(2);if(1===(p.flags&2097155))throw new O(2);if(!p.Oa.Eb)throw new O(43);var r=p.Oa.Eb(p,a,b,n,c,d);m=r.Qa;h=r.Lb}oc[m]={Lc:m,Kc:b,Lb:h,cb:e,Qc:c,flags:d,offset:f};l=m}}return l}catch(v){return"undefined"!==typeof R&&v instanceof +O||t(v),-v.Wa}},$:function(){return 0},_:function(a,b){try{var c=oc[a];if(0!==b&&c){if(b===c.Kc){var d=Bb[c.cb];d&&c.Qc&2&&d&&d.Oa.Fb&&d.Oa.Fb(d,A.slice(a,a+b),c.offset,b,c.flags);oc[a]=null;c.Lb&&W(c.Lc)}var e=0}else e=-28;return e}catch(f){return"undefined"!==typeof R&&f instanceof O||t(f),-f.Wa}},D:function(a,b,c){qc=c;try{var d=z(a),e=c?rc():0;return Zb(d,b,e).cb}catch(f){return"undefined"!==typeof R&&f instanceof O||t(f),-f.Wa}},Y:function(a,b){try{return a=z(a),pc(a,b)}catch(c){return"undefined"!== +typeof R&&c instanceof O||t(c),-c.Wa}},d:function(a){var b=tc[a];delete tc[a];var c=b.Tb,d=b.hb,e=b.cc,f=e.map(function(h){return h.Dc}).concat(e.map(function(h){return h.Xc}));Ec([a],f,function(h){var l={};e.forEach(function(m,p){var n=h[p],r=m.Ab,v=m.Cc,k=h[p+e.length],u=m.Wc,x=m.Yc;l[m.zc]={read:function(y){return n.fromWireType(r(v,y))},write:function(y,H){var G=[];u(x,y,k.toWireType(G,H));uc(G)}}});return[{name:b.name,fromWireType:function(m){var p={},n;for(n in l)p[n]=l[n].read(m);d(m);return p}, +toWireType:function(m,p){for(var n in l)if(!(n in p))throw new TypeError('Missing field: "'+n+'"');var r=c();for(n in l)l[n].write(r,p[n]);null!==m&&m.push(d,r);return r},argPackAdvance:8,readValueFromPointer:vc,bb:d}]})},M:function(){},fa:function(a,b,c,d,e){var f=Gc(c);b=S(b);Fc(a,{name:b,fromWireType:function(h){return!!h},toWireType:function(h,l){return l?d:e},argPackAdvance:8,readValueFromPointer:function(h){if(1===c)var l=F;else if(2===c)l=ya;else if(4===c)l=E;else throw new TypeError("Unknown boolean type size: "+ +b);return this.fromWireType(l[h>>f])},bb:null})},v:function(a,b,c,d,e,f,h,l,m,p,n,r,v){n=S(n);f=V(e,f);l&&(l=V(h,l));p&&(p=V(m,p));v=V(r,v);var k=zc(n);Uc(k,function(){ld("Cannot construct "+n+" due to unbound types",[d])});Ec([a,b,c],d?[d]:[],function(u){u=u[0];if(d){var x=u.Pa;var y=x.mb}else y=Rc.prototype;u=Ac(k,function(){if(Object.getPrototypeOf(this)!==H)throw new Ic("Use 'new' to construct "+n);if(void 0===G.ib)throw new Ic(n+" has no accessible constructor");var w=G.ib[arguments.length]; +if(void 0===w)throw new Ic("Tried to invoke ctor of "+n+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(G.ib).toString()+") parameters instead!");return w.apply(this,arguments)});var H=Object.create(y,{constructor:{value:u}});u.prototype=H;var G=new Vc(n,u,H,v,x,f,l,p);x=new ed(n,G,!0,!1);y=new ed(n+"*",G,!1,!1);var ha=new ed(n+" const*",G,!1,!0);Sc[a]={pointerType:y,vc:ha};fd(k,u);return[x,y,ha]})},I:function(a,b,c,d,e,f){0>>l}}var m=b.includes("unsigned");Fc(a,{name:b,fromWireType:f,toWireType:function(p,n){if("number"!==typeof n&&"boolean"!==typeof n)throw new TypeError('Cannot convert "'+Yc(n)+'" to '+ +this.name);if(ne)throw new TypeError('Passing a number "'+Yc(n)+'" from JS side to C/C++ side to an argument of type "'+b+'", which is outside the valid range ['+d+", "+e+"]!");return m?n>>>0:n|0},argPackAdvance:8,readValueFromPointer:sd(b,h,0!==d),bb:null})},f:function(a,b,c){function d(f){f>>=2;var h=I;return new e(Ga,h[f+1],h[f])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=S(c);Fc(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d}, +{Fc:!0})},F:function(a,b){b=S(b);var c="std::string"===b;Fc(a,{name:b,fromWireType:function(d){var e=I[d>>2];if(c)for(var f=d+4,h=0;h<=e;++h){var l=d+4+h;if(h==e||0==A[l]){f=z(f,l-f);if(void 0===m)var m=f;else m+=String.fromCharCode(0),m+=f;f=l+1}}else{m=Array(e);for(h=0;h>2]=h;if(c&&f)B(e,A,l+4,h+1);else if(f)for(f=0;f>2],n=h(),r,v=m+4,k=0;k<=p;++k){var u=m+4+k*b;if(k==p||0==n[u>>l])v=d(v,u-v),void 0===r?r=v:(r+=String.fromCharCode(0),r+=v),v=u+b}W(m);return r},toWireType:function(m,p){"string"!==typeof p&&T("Cannot pass non-string to C++ string type "+c);var n=f(p),r=Fa(4+n+b);I[r>>2]=n>>l;e(p,r+4,n+b);null!==m&&m.push(W,r);return r},argPackAdvance:8,readValueFromPointer:vc, +bb:function(m){W(m)}})},e:function(a,b,c,d,e,f){tc[a]={name:S(b),Tb:V(c,d),hb:V(e,f),cc:[]}},a:function(a,b,c,d,e,f,h,l,m,p){tc[a].cc.push({zc:S(b),Dc:c,Ab:V(d,e),Cc:f,Xc:h,Wc:V(l,m),Yc:p})},ga:function(a,b){b=S(b);Fc(a,{Jc:!0,name:b,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},ba:function(a){delete Dd[a-1]},O:function(){throw"longjmp";},h:function(a,b,c){a=Y(a);b=td(b,"emval::as");var d=[],e=U(d);E[c>>2]=e;return b.toWireType(d,a)},ma:function(a,b,c,d){a=Y(a);c=ud(b,c);for(var e= +Array(b),f=0;f>> 2) + "+f+'], "parameter '+f+'");\nvar arg'+f+" = argType"+f+".readValueFromPointer(args);\nargs += argType"+f+"['argPackAdvance'];\n";e=(new Function("requireRegisteredType", +"Module","__emval_register",h+("var obj = new constructor("+e+");\nreturn __emval_register(obj);\n}\n")))(td,g,U);Ad[b]=e}return e(a,c,d)},ia:function(){return U([])},K:function(a){return U(wd(a))},ka:function(){return U({})},pa:function(a){uc(X[a].value);qd(a)},p:function(a,b,c){a=Y(a);b=Y(b);c=Y(c);a[b]=c},l:function(a,b){a=td(a,"_emval_take_value");a=a.readValueFromPointer(b);return U(a)},oa:function(a){a=Y(a);return U(typeof a)},j:function(){t()},z:function(a,b){if(0===a)a=Date.now();else if(1=== +a||4===a)a=Bd();else return-1;E[b>>2]=a/1E3|0;E[b+4>>2]=a%1E3*1E6|0;return 0},o:function(a,b,c){Cd.length=0;var d;for(c>>=2;d=A[b++];)(d=105>d)&&c&1&&c++,Cd.push(d?Ia[c++>>1]:E[c]),++c;return $a[a].apply(null,Cd)},da:function(){return!ja},P:function(a,b,c){A.copyWithin(a,b,b+c)},Q:function(a){var b=A.length;a>>>=0;if(2147483648=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);d=Math.max(a,d);0>>16);Ja();var e=1;break a}catch(f){}e=void 0}if(e)return!0}return!1},ca:function(a,b,c,d,e){function f(D){Fd(D,h,p,n,m)}function h(D,be){Id(D,be.response,function(Va){Gd(function(){u?L.get(u)(Va):b&&b(Va)},K)},function(Va){Gd(function(){u?L.get(u)(Va):b&&b(Va)},K)})}function l(D){Fd(D,r,p,n,m)}function m(D){Gd(function(){H?L.get(H)(D):e&&e(D)},K)}function p(D){Gd(function(){x?L.get(x)(D):c&&c(D)},K)}function n(D){Gd(function(){y?L.get(y)(D):d&&d(D)},K)}function r(D){Gd(function(){u?L.get(u)(D): +b&&b(D)},K)}var v=a+112,k=z(v),u=I[v+36>>2],x=I[v+40>>2],y=I[v+44>>2],H=I[v+48>>2],G=I[v+52>>2],ha=!!(G&4),w=!!(G&32),J=!!(G&16),K=!!(G&64);if("EM_IDB_STORE"===k)k=I[v+84>>2],Id(a,A.slice(k,k+I[v+88>>2]),r,p);else if("EM_IDB_DELETE"===k)Kd(a,r,p);else if(J){if(w)return 0;Fd(a,ha?h:r,p,n,m)}else Jd(a,r,w?p:ha?f:l);return a},U:function(a,b){var c=0;Md().forEach(function(d,e){var f=b+c;e=E[a+4*e>>2]=f;for(f=0;f>0]=d.charCodeAt(f);F[e>>0]=0;c+=d.length+1});return 0},V:function(a,b){var c= +Md();E[a>>2]=c.length;var d=0;c.forEach(function(e){d+=e.length+1});E[b>>2]=d;return 0},s:function(a){if(!noExitRuntime){if(g.onExit)g.onExit(a);sa=!0}fa(a,new Hd(a))},q:function(a){try{var b=sc(a);ac(b);return 0}catch(c){return"undefined"!==typeof R&&c instanceof O||t(c),c.Wa}},T:function(a,b){try{var c=sc(a);F[b>>0]=c.Sa?2:Q(c.mode)?3:40960===(c.mode&61440)?7:4;return 0}catch(d){return"undefined"!==typeof R&&d instanceof O||t(d),d.Wa}},B:function(a,b,c,d){try{a:{for(var e=sc(a),f=a=0;f>2],l=e,m=E[b+8*f>>2],p=h,n=void 0,r=F;if(0>p||0>n)throw new O(28);if(null===l.cb)throw new O(8);if(1===(l.flags&2097155))throw new O(8);if(Q(l.node.mode))throw new O(31);if(!l.Oa.read)throw new O(28);var v="undefined"!==typeof n;if(!v)n=l.position;else if(!l.seekable)throw new O(70);var k=l.Oa.read(l,r,m,p,n);v||(l.position+=k);var u=k;if(0>u){var x=-1;break a}a+=u;if(u>2]=x;return 0}catch(y){return"undefined"!==typeof R&&y instanceof O||t(y),y.Wa}},L:function(a,b,c, +d,e){try{var f=sc(a);a=4294967296*c+(b>>>0);if(-9007199254740992>=a||9007199254740992<=a)return-61;bc(f,a,d);Za=[f.position>>>0,(M=f.position,1<=+Math.abs(M)?0>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)];E[e>>2]=Za[0];E[e+4>>2]=Za[1];f.Ob&&0===a&&0===d&&(f.Ob=null);return 0}catch(h){return"undefined"!==typeof R&&h instanceof O||t(h),h.Wa}},A:function(a,b,c,d){try{a:{for(var e=sc(a),f=a=0;f>2],E[b+(8*f+4)>>2], +void 0);if(0>h){var l=-1;break a}a+=h}l=a}E[d>>2]=l;return 0}catch(m){return"undefined"!==typeof R&&m instanceof O||t(m),m.Wa}},c:function(){return pa},qa:function(){var a=self.navigator.userAgent,b=va(a)+1,c=Fa(b);B(a,A,c,b);return c},R:Od,N:Xd,x:Yd,w:Zd,ha:function(a){fb||(fb=!0,bb());var b=new Date(E[a+20>>2]+1900,E[a+16>>2],E[a+12>>2],E[a+8>>2],E[a+4>>2],E[a>>2],0),c=E[a+32>>2],d=b.getTimezoneOffset(),e=new Date(b.getFullYear(),0,1),f=(new Date(b.getFullYear(),6,1)).getTimezoneOffset(),h=e.getTimezoneOffset(), +l=Math.min(h,f);0>c?E[a+32>>2]=Number(f!=h&&l==d):0>2]=b.getDay();E[a+28>>2]=(b.getTime()-e.getTime())/864E5|0;E[a>>2]=b.getSeconds();E[a+4>>2]=b.getMinutes();E[a+8>>2]=b.getHours();E[a+12>>2]=b.getDate();E[a+16>>2]=b.getMonth();return b.getTime()/1E3|0},b:function(a){pa=a},G:Ud,S:function(a,b,c,d){return Ud(a,b,c,d)},H:function(a){var b=Date.now()/1E3|0;a&&(E[a>>2]=b);return b}}; +(function(){function a(e){g.asm=e.exports;ra=g.asm.ra;Ja();L=g.asm.Ea;La.unshift(g.asm.sa);Sa("wasm-instantiate")}function b(e){a(e.instance)}function c(e){return Ya().then(function(f){return WebAssembly.instantiate(f,d)}).then(function(f){return f}).then(e,function(f){q("failed to asynchronously prepare wasm: "+f);t(f)})}var d={a:$d};Ra("wasm-instantiate");if(g.instantiateWasm)try{return g.instantiateWasm(d,a)}catch(e){return q("Module.instantiateWasm callback failed with error: "+e),!1}(function(){return qa|| +"function"!==typeof WebAssembly.instantiateStreaming||Ta()||"function"!==typeof fetch?c(b):fetch(Ua,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,d).then(b,function(f){q("wasm streaming compile failed: "+f);q("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(ba);return{}})();g.___wasm_call_ctors=function(){return(g.___wasm_call_ctors=g.asm.sa).apply(null,arguments)}; +var W=g._free=function(){return(W=g._free=g.asm.ta).apply(null,arguments)},Fa=g._malloc=function(){return(Fa=g._malloc=g.asm.ua).apply(null,arguments)},kd=g.___getTypeName=function(){return(kd=g.___getTypeName=g.asm.va).apply(null,arguments)};g.___embind_register_native_and_builtin_types=function(){return(g.___embind_register_native_and_builtin_types=g.asm.wa).apply(null,arguments)}; +var eb=g.__get_tzname=function(){return(eb=g.__get_tzname=g.asm.xa).apply(null,arguments)},db=g.__get_daylight=function(){return(db=g.__get_daylight=g.asm.ya).apply(null,arguments)},cb=g.__get_timezone=function(){return(cb=g.__get_timezone=g.asm.za).apply(null,arguments)},ae=g.stackSave=function(){return(ae=g.stackSave=g.asm.Aa).apply(null,arguments)},ce=g.stackRestore=function(){return(ce=g.stackRestore=g.asm.Ba).apply(null,arguments)},de=g._setThrew=function(){return(de=g._setThrew=g.asm.Ca).apply(null, +arguments)},tb=g._memalign=function(){return(tb=g._memalign=g.asm.Da).apply(null,arguments)};g.dynCall_jiji=function(){return(g.dynCall_jiji=g.asm.Fa).apply(null,arguments)};g.dynCall_ji=function(){return(g.dynCall_ji=g.asm.Ga).apply(null,arguments)};g.dynCall_viijii=function(){return(g.dynCall_viijii=g.asm.Ha).apply(null,arguments)};g.dynCall_iiiiij=function(){return(g.dynCall_iiiiij=g.asm.Ia).apply(null,arguments)};g.dynCall_iiiiijj=function(){return(g.dynCall_iiiiijj=g.asm.Ja).apply(null,arguments)}; +g.dynCall_iiiiiijj=function(){return(g.dynCall_iiiiiijj=g.asm.Ka).apply(null,arguments)};function Yd(a,b){var c=ae();try{L.get(a)(b)}catch(d){ce(c);if(d!==d+0&&"longjmp"!==d)throw d;de(1,0)}}function Zd(a,b,c){var d=ae();try{L.get(a)(b,c)}catch(e){ce(d);if(e!==e+0&&"longjmp"!==e)throw e;de(1,0)}}function Xd(a,b,c,d){var e=ae();try{return L.get(a)(b,c,d)}catch(f){ce(e);if(f!==f+0&&"longjmp"!==f)throw f;de(1,0)}}g.addRunDependency=Ra;g.removeRunDependency=Sa;g.FS_createPath=gc;g.FS_createDataFile=ic; +g.FS_createPreloadedFile=mc;g.FS_createLazyFile=lc;g.FS_createDevice=jc;g.FS_unlink=Xb;var ee;function Hd(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}Qa=function fe(){ee||ge();ee||(Qa=fe)}; +function ge(){function a(){if(!ee&&(ee=!0,g.calledRun=!0,!sa)){g.noFSInit||ec||(ec=!0,dc(),g.stdin=g.stdin,g.stdout=g.stdout,g.stderr=g.stderr,g.stdin?jc("/dev","stdin",g.stdin):Wb("/dev/tty","/dev/stdin"),g.stdout?jc("/dev","stdout",null,g.stdout):Wb("/dev/tty","/dev/stdout"),g.stderr?jc("/dev","stderr",null,g.stderr):Wb("/dev/tty1","/dev/stderr"),Zb("/dev/stdin",0),Zb("/dev/stdout",1),Zb("/dev/stderr",1));Eb=!1;ab(La);aa(g);if(g.onRuntimeInitialized)g.onRuntimeInitialized();if(g.postRun)for("function"== +typeof g.postRun&&(g.postRun=[g.postRun]);g.postRun.length;){var b=g.postRun.shift();Ma.unshift(b)}ab(Ma)}}if(!(0 lowercaseLabel.includes( keyword ) ); +} + +export class SelectedCamera +{ + readonly deviceId: string; + + readonly groupId: string; + + readonly facing: PreferredCameraType; + + readonly label: string; + + constructor( mdi: MediaDeviceInfo, facing: PreferredCameraType ) + { + this.deviceId = mdi.deviceId; + this.facing = facing; + this.groupId = mdi.groupId; + this.label = mdi.label; + } +} + +export interface CameraDevices +{ + frontCameras: SelectedCamera[]; + backCameras: SelectedCamera[]; +} + +export async function getCameraDevices(): Promise< CameraDevices > +{ + const frontCameras: SelectedCamera[] = []; + const backCameras: SelectedCamera[] = []; + + { + let devices = await navigator.mediaDevices.enumerateDevices(); + // if permission is not given, label of video devices will be empty string + if ( devices.filter( device => device.kind === "videoinput" ).every( device => device.label === "" ) ) + { + const stream = await navigator.mediaDevices.getUserMedia + ( + { + video: + { + facingMode: { ideal: "environment" } + }, + audio: false + } + ); + + // enumerate devices again - now the label field should be non-empty, as we have a stream active + // (even if we didn't get persistent permission for camera) + devices = await navigator.mediaDevices.enumerateDevices(); + + // close the stream, as we don't need it anymore + stream.getTracks().forEach( track => track.stop() ); + } + + const cameras = devices.filter( device => device.kind === "videoinput" ); + for ( const camera of cameras ) + { + if ( isBackCameraLabel( camera.label ) ) + { + backCameras.push( new SelectedCamera( camera, PreferredCameraType.BackFacingCamera ) ); + } + else + { + frontCameras.push( new SelectedCamera( camera, PreferredCameraType.FrontFacingCamera ) ); + } + } + } + + return { + frontCameras, + backCameras + }; +} + +export async function selectCamera( + cameraId: string | null, + preferredCameraType: PreferredCameraType +): Promise< SelectedCamera | null > +{ + const { frontCameras, backCameras } = await getCameraDevices(); + + if ( frontCameras.length > 0 || backCameras.length > 0 ) + { + // decide from which array the camera will be selected + let cameraPool: SelectedCamera[] = ( backCameras.length > 0 ? backCameras : frontCameras ); + // if there is at least one back facing camera and user prefers back facing camera, use that as a selection pool + if ( preferredCameraType === PreferredCameraType.BackFacingCamera && backCameras.length > 0 ) + { + cameraPool = backCameras; + } + // if there is at least one front facing camera and is preferred by user, use that as a selection pool + if ( preferredCameraType === PreferredCameraType.FrontFacingCamera && frontCameras.length > 0 ) + { + cameraPool = frontCameras; + } + // otherwise use whichever pool is non-empty + + // sort camera pool by label + cameraPool = cameraPool.sort( ( camera1, camera2 ) => camera1.label.localeCompare( camera2.label ) ); + + // Check if cameras are labeled with resolution information, take the higher-resolution one in that case + // Otherwise pick the first camera + { + let selectedCameraIndex = 0; + + const cameraResolutions: number[] = cameraPool.map + ( + camera => + { + const regExp = RegExp( /\b([0-9]+)MP?\b/, "i" ); + const match = regExp.exec( camera.label ); + if ( match !== null ) + { + return parseInt( match[1], 10 ); + } + else + { + return NaN; + } + } + ); + if ( !cameraResolutions.some( cameraResolution => isNaN( cameraResolution ) ) ) + { + selectedCameraIndex = cameraResolutions.lastIndexOf( Math.max( ...cameraResolutions ) ); + } + if ( cameraId ) + { + let cameraDevice = null; + + cameraDevice = frontCameras.filter( device => device.deviceId === cameraId )[0]; + if ( !cameraDevice ) + { + cameraDevice = backCameras.filter( device => device.deviceId === cameraId )[0]; + } + + return cameraDevice || null; + } + + return cameraPool[ selectedCameraIndex ]; + } + } + else + { + // no cameras available on the device + return null; + } +} + +/** + * Bind camera device to video feed (HTMLVideoElement). + * + * This function will return `true` in case that video feed of camera device has been flipped, + * and `false` otherwise. + * + * @param camera Camera device which should be binded with the video element. + * @param videoFeed HTMLVideoElement to which camera device should be binded. + * @param preferredCameraType Enum representing whether to use front facing or back facing camera. + */ +export async function bindCameraToVideoFeed( + camera: SelectedCamera, + videoFeed: HTMLVideoElement, + preferredCameraType: PreferredCameraType = PreferredCameraType.BackFacingCamera +): Promise< boolean > +{ + const constraints: MediaStreamConstraints = + { + audio: false, + video: + { + width: + { + min: 640, + ideal: 1920, + max: 1920 + }, + height: + { + min: 480, + ideal: 1080, + max: 1080 + } + } + }; + if ( camera.deviceId === "" ) + { + const isPreferredBackFacing = preferredCameraType === PreferredCameraType.BackFacingCamera; + ( constraints.video as MediaTrackConstraints ).facingMode = + { + ideal: isPreferredBackFacing ? "environment" : "user" + }; + } + else + { + ( constraints.video as MediaTrackConstraints ).deviceId = + { + exact: camera.deviceId + }; + } + + const stream = await navigator.mediaDevices.getUserMedia( constraints ); + videoFeed.controls = false; + videoFeed.srcObject = stream; + + let cameraFlipped = false; + if ( camera.facing === PreferredCameraType.FrontFacingCamera ) + { + videoFeed.style.transform = "scaleX(-1)"; + cameraFlipped = true; + } + + return cameraFlipped; +} + +export function clearVideoFeed( videoFeed: HTMLVideoElement ): void +{ + if ( videoFeed && videoFeed.srcObject !== null ) + { + ( videoFeed.srcObject as MediaStream ).getTracks().forEach( track => track.stop() ); + videoFeed.srcObject = null; + } +} diff --git a/src/MicroblinkSDK/MicroblinkSDK.ts b/src/MicroblinkSDK/MicroblinkSDK.ts index 9446c93..e240eae 100644 --- a/src/MicroblinkSDK/MicroblinkSDK.ts +++ b/src/MicroblinkSDK/MicroblinkSDK.ts @@ -8,6 +8,7 @@ import { MetadataCallbacks } from "./MetadataCallbacks"; import { WasmSDKLoadSettings } from "./WasmLoadSettings"; +export * from "./CameraUtils"; export * from "./DataStructures"; export * from "./MetadataCallbacks"; export * from "./FrameCapture"; diff --git a/src/MicroblinkSDK/VideoRecognizer.ts b/src/MicroblinkSDK/VideoRecognizer.ts index 84f941b..8ec628b 100644 --- a/src/MicroblinkSDK/VideoRecognizer.ts +++ b/src/MicroblinkSDK/VideoRecognizer.ts @@ -2,6 +2,15 @@ * Copyright (c) Microblink Ltd. All rights reserved. */ +import +{ + bindCameraToVideoFeed, + PreferredCameraType, + clearVideoFeed, + selectCamera, + SelectedCamera +} from "./CameraUtils"; + import { RecognizerRunner, @@ -10,17 +19,6 @@ import import { captureFrame } from "./FrameCapture"; -/** - * Preferred type of camera to be used when opening the camera feed. - */ -export enum PreferredCameraType -{ - /** Prefer back facing camera */ - BackFacingCamera, - /** Prefer front facing camera */ - FrontFacingCamera -} - /** * Explanation why VideoRecognizer has failed to open the camera feed. */ @@ -117,7 +115,7 @@ export class VideoRecognizer reject( new VideoRecognizerError( NotSupportedReason.VideoElementNotProvided, errorMessage ) ); return; } - if ( navigator.mediaDevices && navigator.mediaDevices.getUserMedia ) + if ( navigator.mediaDevices && navigator.mediaDevices.getUserMedia !== undefined ) { try { @@ -129,54 +127,17 @@ export class VideoRecognizer return; } - const constraints: MediaStreamConstraints = - { - audio: false, - video: - { - width: - { - min: 640, - ideal: 1920, - max: 1920 - }, - height: - { - min: 480, - ideal: 1080, - max: 1080 - } - } - }; - if ( selectedCamera.deviceId === "" ) - { - const isPreferredBackFacing = preferredCameraType === PreferredCameraType.BackFacingCamera; - ( constraints.video as MediaTrackConstraints ).facingMode = - { - ideal: isPreferredBackFacing ? "environment" : "user" - }; - } - else - { - ( constraints.video as MediaTrackConstraints ).deviceId = - { - exact: selectedCamera.deviceId - }; - } + const cameraFlipped = await bindCameraToVideoFeed( selectedCamera, cameraFeed, preferredCameraType ); - const stream = await navigator.mediaDevices.getUserMedia( constraints ); - cameraFeed.controls = false; - cameraFeed.srcObject = stream; - let cameraFlipped = false; - // mirror the camera view for front-facing camera - if ( selectedCamera.facing === PreferredCameraType.FrontFacingCamera ) - { - cameraFeed.style.transform = "scaleX(-1)"; - cameraFlipped = true; - } // TODO: await maybe not needed here await recognizerRunner.setCameraPreviewMirrored( cameraFlipped ); - resolve( new VideoRecognizer( cameraFeed, recognizerRunner, cameraFlipped ) ); + resolve( new VideoRecognizer( + cameraFeed, + recognizerRunner, + cameraFlipped, + false, + selectedCamera.deviceId + ) ); } catch( error ) { @@ -261,15 +222,19 @@ export class VideoRecognizer videoFeed: HTMLVideoElement, recognizerRunner: RecognizerRunner, cameraFlipped = false, - allowManualVideoPlayout = false + allowManualVideoPlayout = false, + deviceId: string | null = null ) { this.videoFeed = videoFeed; this.recognizerRunner = recognizerRunner; this.cameraFlipped = cameraFlipped; this.allowManualVideoPlayout = allowManualVideoPlayout; + this.deviceId = deviceId; } + deviceId: string | null = null; + async flipCamera(): Promise< void > { if ( this.videoFeed ) @@ -317,7 +282,7 @@ export class VideoRecognizer * @param recognitionTimeoutMs Amount of time before returned promise will be resolved regardless of whether * recognition was successful or not. */ - startRecognition( onScanningDone: OnScanningDone, recognitionTimeoutMs = 15000 ): Promise< void > + startRecognition( onScanningDone: OnScanningDone, recognitionTimeoutMs = 20000 ): Promise< void > { return new Promise( ( resolve, reject ) => { @@ -387,13 +352,14 @@ export class VideoRecognizer * unpaused, recognition will be performed and promise will be resolved with recognition status. After * the resolution of returned promise, the video stream will be paused, but not released. To release the * stream, use function releaseVideoFeed. + * * This is a simple version of startRecognition that should be used for most cases, like when you only need * to perform one scan per video session. * * @param recognitionTimeoutMs Amount of time before returned promise will be resolved regardless of whether * recognition was successful or not. */ - recognize( recognitionTimeoutMs = 15000 ): Promise< RecognizerResultState > + recognize( recognitionTimeoutMs = 20000 ): Promise< RecognizerResultState > { return new Promise ( @@ -493,12 +459,14 @@ export class VideoRecognizer this.cancelled = false; this.timedOut = false; this.recognitionPaused = false; + if ( this.videoFeed && this.videoFeed.paused ) { const msg = "Cannot resume recognition while video feed is paused! Use recognize or startRecognition"; reject( new Error( msg ) ); return; } + setTimeout ( () => @@ -509,7 +477,7 @@ export class VideoRecognizer ( () => { - void this.recognitionLoop().then + this.recognitionLoop().then ( () => resolve() ).catch @@ -549,16 +517,88 @@ export class VideoRecognizer */ releaseVideoFeed(): void { - if ( this.videoFeed !== null ) + if ( !this.videoFeed || this.videoFeed?.readyState < this.videoFeed?.HAVE_CURRENT_DATA ) + { + this.shouldReleaseVideoFeed = true; + return; + } + + if ( !this.videoFeed.paused ) + { + this.cancelRecognition(); + } + + clearVideoFeed( this.videoFeed ); + this.videoFeed = null; + this.shouldReleaseVideoFeed = false; + } + + /** + * Change currently used camera device for recognition. To get list of available camera devices + * use "getCameraDevices" method. + * + * Keep in mind that this method will reset recognizers. + * + * @param camera Desired camera device which should be used for recognition. + */ + changeCameraDevice( camera: SelectedCamera ): Promise< void > + { + return new Promise( ( resolve, reject ) => { - if ( this.videoFeed.srcObject !== null ) + if ( this.videoFeed === null ) { - if ( !this.videoFeed.paused ) this.cancelRecognition(); - ( this.videoFeed.srcObject as MediaStream ).getTracks().forEach( track => track.stop() ); - this.videoFeed.srcObject = null; + reject( new Error( "Cannot change camera device because video feed is missing!" ) ); + return; } - this.videoFeed = null; - } + + this.pauseRecognition(); + clearVideoFeed( this.videoFeed ); + + bindCameraToVideoFeed( camera, this.videoFeed ).then + ( + () => + { + if ( this.videoFeed === null ) + { + reject( new Error( "Cannot change camera device because video feed is missing!" ) ); + return; + } + + this.videoFeed.play().then + ( + () => + { + // Recognition errors should be handled by `startRecognition` or `recognize` method + void this.resumeRecognition( true ); + resolve(); + }, + /* eslint-disable @typescript-eslint/no-explicit-any */ + ( nativeError: any ) => + { + if ( !this.allowManualVideoPlayout ) + { + console.warn( "Native error", nativeError ); + const m = "The play() request was interrupted or prevented by browser security rules!"; + reject( new Error( m ) ); + return; + } + + if ( !this.videoFeed ) + { + reject( new Error( "Cannot change camera device because video feed is missing!" ) ); + return; + } + + this.videoFeed.controls = true; + } + /* eslint-enable @typescript-eslint/no-explicit-any */ + ); + } + ).catch + ( + ( error ) => reject( error ) + ); + } ); } /** ********************************************************************************************* @@ -575,7 +615,7 @@ export class VideoRecognizer private recognitionPaused = false; - private recognitionTimeoutMs = 15000; + private recognitionTimeoutMs = 20000; private timeoutID = 0; @@ -587,6 +627,8 @@ export class VideoRecognizer private cameraFlipped = false; + private shouldReleaseVideoFeed = false; + private playPauseEvent(): Promise< void > { return new Promise( ( resolve, reject ) => @@ -620,7 +662,16 @@ export class VideoRecognizer reject( new Error( "Missing video feed!" ) ); return; } + + if ( this.shouldReleaseVideoFeed && this.videoFeed.readyState > this.videoFeed.HAVE_CURRENT_DATA ) + { + this.releaseVideoFeed(); + resolve(); + return; + } + const cameraFrame = captureFrame( this.videoFeed ); + this.recognizerRunner.processImage( cameraFrame ).then ( ( processResult: RecognizerResultState ) => @@ -702,7 +753,7 @@ export class VideoRecognizer } ).catch ( - ( error ) => reject ( error ) + ( error ) => reject( error ) ); } ); } @@ -716,183 +767,3 @@ export class VideoRecognizer } } } - -// inspired by https://unpkg.com/browse/scandit-sdk@4.6.1/src/lib/cameraAccess.ts -const backCameraKeywords: string[] = [ - "rear", - "back", - "rück", - "arrière", - "trasera", - "trás", - "traseira", - "posteriore", - "后面", - "後面", - "背面", - "后置", // alternative - "後置", // alternative - "背置", // alternative - "задней", - "الخلفية", - "후", - "arka", - "achterzijde", - "หลัง", - "baksidan", - "bagside", - "sau", - "bak", - "tylny", - "takakamera", - "belakang", - "אחורית", - "πίσω", - "spate", - "hátsó", - "zadní", - "darrere", - "zadná", - "задня", - "stražnja", - "belakang", - "बैक" -]; - -function isBackCameraLabel( label: string ): boolean -{ - const lowercaseLabel = label.toLowerCase(); - - return backCameraKeywords.some( keyword => lowercaseLabel.includes( keyword ) ); -} - -class SelectedCamera -{ - readonly deviceId: string; - - readonly groupId: string; - - readonly facing: PreferredCameraType; - - readonly label: string; - - constructor( mdi: MediaDeviceInfo, facing: PreferredCameraType ) - { - this.deviceId = mdi.deviceId; - this.facing = facing; - this.groupId = mdi.groupId; - this.label = mdi.label; - } -} - -async function selectCamera( - cameraId: string | null, - preferredCameraType: PreferredCameraType -): Promise< SelectedCamera | null > -{ - const frontCameras: SelectedCamera[] = []; - const backCameras: SelectedCamera[] = []; - - { - let devices = await navigator.mediaDevices.enumerateDevices(); - // if permission is not given, label of video devices will be empty string - if ( devices.filter( device => device.kind === "videoinput" ).every( device => device.label === "" ) ) - { - const stream = await navigator.mediaDevices.getUserMedia - ( - { - video: - { - facingMode: { ideal: "environment" } - }, - audio: false - } - ); - - // enumerate devices again - now the label field should be non-empty, as we have a stream active - // (even if we didn't get persistent permission for camera) - devices = await navigator.mediaDevices.enumerateDevices(); - - // close the stream, as we don't need it anymore - stream.getTracks().forEach( track => track.stop() ); - } - - const cameras = devices.filter( device => device.kind === "videoinput" ); - for ( const camera of cameras ) - { - if ( isBackCameraLabel( camera.label ) ) - { - backCameras.push( new SelectedCamera( camera, PreferredCameraType.BackFacingCamera ) ); - } - else - { - frontCameras.push( new SelectedCamera( camera, PreferredCameraType.FrontFacingCamera ) ); - } - } - } - if ( frontCameras.length > 0 || backCameras.length > 0 ) - { - // decide from which array the camera will be selected - let cameraPool: SelectedCamera[] = ( backCameras.length > 0 ? backCameras : frontCameras ); - // if there is at least one back facing camera and user prefers back facing camera, use that as a selection pool - if ( preferredCameraType === PreferredCameraType.BackFacingCamera && backCameras.length > 0 ) - { - cameraPool = backCameras; - } - // if there is at least one front facing camera and is preferred by user, use that as a selection pool - if ( preferredCameraType === PreferredCameraType.FrontFacingCamera && frontCameras.length > 0 ) - { - cameraPool = frontCameras; - } - // otherwise use whichever pool is non-empty - - // sort camera pool by label - cameraPool = cameraPool.sort( ( camera1, camera2 ) => camera1.label.localeCompare( camera2.label ) ); - - // Check if cameras are labeled with resolution information, take the higher-resolution one in that case - // Otherwise pick the first camera - { - let selectedCameraIndex = 0; - - const cameraResolutions: number[] = cameraPool.map - ( - camera => - { - const regExp = RegExp( /\b([0-9]+)MP?\b/, "i" ); - const match = regExp.exec( camera.label ); - if ( match !== null ) - { - return parseInt( match[1], 10 ); - } - else - { - return NaN; - } - } - ); - if ( !cameraResolutions.some( cameraResolution => isNaN( cameraResolution ) ) ) - { - selectedCameraIndex = cameraResolutions.lastIndexOf( Math.max( ...cameraResolutions ) ); - } - if ( cameraId ) - { - let cameraDevice = null; - - cameraDevice = frontCameras.filter( device => device.deviceId === cameraId )[0]; - if ( !cameraDevice ) - { - cameraDevice = backCameras.filter( device => device.deviceId === cameraId )[0]; - } - - return cameraDevice || null; - } - - return cameraPool[ selectedCameraIndex ]; - } - } - else - { - // no cameras available on the device - return null; - } -} diff --git a/src/MicroblinkSDK/worker/MicroblinkSDK.worker.ts b/src/MicroblinkSDK/worker/MicroblinkSDK.worker.ts index 1822b60..80374c7 100644 --- a/src/MicroblinkSDK/worker/MicroblinkSDK.worker.ts +++ b/src/MicroblinkSDK/worker/MicroblinkSDK.worker.ts @@ -698,6 +698,39 @@ export default class MicroblinkWorker } } + /* eslint-disable @typescript-eslint/no-explicit-any */ + private wrapFunctions( values?: any, objectHandle?: number ): any + { + /* eslint-disable @typescript-eslint/no-explicit-any, + @typescript-eslint/no-unsafe-assignment, + @typescript-eslint/no-unsafe-member-access */ + if ( typeof values !== "object" ) + { + return values; + } + + const result: any = { ...values }; + + const keys = Object.keys( result ); + for ( const key of keys ) + { + const data: any = result[ key ]; + if ( typeof data === "function" ) + { + const wrappedFunction: Messages.WrappedParameter = { + parameter: { + recognizerHandle: objectHandle, + callbackName: key + } as Messages.CallbackAddress, + type: Messages.ParameterType.Callback + }; + result[ key ] = wrappedFunction; + } + } + + return result; + } + private processInvokeObject( msg: Messages.InvokeObjectMethod ) { try @@ -716,7 +749,7 @@ export default class MicroblinkWorker /* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call */ - const result = object[ methodName ]( ...params ); + const result = this.wrapFunctions( object[ methodName ]( ...params ), objectHandle ); /* eslint-enable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call */ diff --git a/ui/README.md b/ui/README.md index 2b2c4e5..eadabc3 100644 --- a/ui/README.md +++ b/ui/README.md @@ -57,9 +57,8 @@ cp -r node_modules/@microblink/blinkid-imagecapture-in-browser-sdk/resources/* s ``` ```html - + - mb-screen mb-component --> mb-spinner mb-component --> mb-button + mb-component --> mb-image-box + mb-component --> mb-button-classic + mb-component --> mb-completed mb-component --> mb-overlay mb-component --> mb-modal mb-component --> mb-camera-experience mb-component --> mb-api-process-status + mb-camera-experience --> mb-camera-toolbar + mb-camera-toolbar --> mb-camera-selection mb-api-process-status --> mb-modal style blinkid-imagecapture-in-browser fill:#f9f,stroke:#333,stroke-width:4px ``` diff --git a/ui/docs/components/shared/mb-button-classic/readme.md b/ui/docs/components/shared/mb-button-classic/readme.md new file mode 100644 index 0000000..01523a6 --- /dev/null +++ b/ui/docs/components/shared/mb-button-classic/readme.md @@ -0,0 +1,38 @@ +# mb-button-classic + + + + + + +## Properties + +| Property | Attribute | Description | Type | Default | +| ---------------- | ----------------- | ---------------------------------------------------------------------------------------- | --------- | ------- | +| `disabled` | `disabled` | Set to 'true' if button should be disabled, and if click events should not be triggered. | `boolean` | `false` | +| `preventDefault` | `prevent-default` | Set to 'true' if default event should be prevented. | `boolean` | `false` | + + +## Events + +| Event | Description | Type | +| ------------- | --------------------------------------------------------------------------------------------------------------------- | ---------------------- | +| `buttonClick` | Event which is triggered when user clicks on button element. This event is not triggered when the button is disabled. | `CustomEvent` | + + +## Dependencies + +### Used by + + - [mb-component](../mb-component) + +### Graph +```mermaid +graph TD; + mb-component --> mb-button-classic + style mb-button-classic fill:#f9f,stroke:#333,stroke-width:4px +``` + +---------------------------------------------- + +*Built with [StencilJS](https://stenciljs.com/)* diff --git a/ui/docs/components/shared/mb-button/readme.md b/ui/docs/components/shared/mb-button/readme.md index 40ee5c5..12fa54f 100644 --- a/ui/docs/components/shared/mb-button/readme.md +++ b/ui/docs/components/shared/mb-button/readme.md @@ -16,6 +16,7 @@ | `imageSrcDefault` | `image-src-default` | Passed image from parent component. | `string` | `''` | | `label` | `label` | Set to string which should be displayed below the icon. If omitted, nothing will show. | `string` | `''` | | `preventDefault` | `prevent-default` | Set to 'true' if default event should be prevented. | `boolean` | `false` | +| `selected` | `selected` | Set to 'true' if button should enter 'selected' state. | `boolean` | `false` | | `translationService` | -- | Instance of TranslationService passed from root component. | `TranslationService` | `undefined` | | `visible` | `visible` | Set to 'true' if button should be visible. | `boolean` | `false` | diff --git a/ui/docs/components/shared/mb-camera-experience/readme.md b/ui/docs/components/shared/mb-camera-experience/readme.md index 8451b13..81bdd6c 100644 --- a/ui/docs/components/shared/mb-camera-experience/readme.md +++ b/ui/docs/components/shared/mb-camera-experience/readme.md @@ -7,27 +7,58 @@ ## Properties -| Property | Attribute | Description | Type | Default | -| ---------------------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ----------- | -| `apiState` | `api-state` | Api state passed from root component. | `string` | `undefined` | -| `cameraFlipped` | `camera-flipped` | Camera horizontal state passed from root component. Horizontal camera image can be mirrored | `boolean` | `false` | -| `showCameraFeedbackBarcodeMessage` | `show-camera-feedback-barcode-message` | Show camera feedback message on camera for Barcode scanning | `boolean` | `false` | -| `showOverlay` | `show-overlay` | Unless specifically granted by your license key, you are not allowed to modify or remove the Microblink logo displayed on the bottom of the camera overlay. | `boolean` | `true` | -| `showScanningLine` | `show-scanning-line` | Show scanning line on camera | `boolean` | `false` | -| `translationService` | -- | Instance of TranslationService passed from root component. | `TranslationService` | `undefined` | -| `type` | `type` | Choose desired camera experience. Each experience type must be implemented in this component. | `CameraExperience.Barcode \| CameraExperience.BlinkCard \| CameraExperience.CardCombined \| CameraExperience.CardSingleSide` | `undefined` | +| Property | Attribute | Description | Type | Default | +| ---------------------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ----------- | +| `apiState` | `api-state` | Api state passed from root component. | `string` | `undefined` | +| `cameraFlipped` | `camera-flipped` | Camera horizontal state passed from root component. Horizontal camera image can be mirrored | `boolean` | `false` | +| `showCameraFeedbackBarcodeMessage` | `show-camera-feedback-barcode-message` | Show camera feedback message on camera for Barcode scanning | `boolean` | `false` | +| `showOverlay` | `show-overlay` | Unless specifically granted by your license key, you are not allowed to modify or remove the Microblink logo displayed on the bottom of the camera overlay. | `boolean` | `true` | +| `showScanningLine` | `show-scanning-line` | Show scanning line on camera | `boolean` | `false` | +| `translationService` | -- | Instance of TranslationService passed from root component. | `TranslationService` | `undefined` | +| `type` | `type` | Choose desired camera experience. Each experience type must be implemented in this component. | `CameraExperience.Barcode \| CameraExperience.CardCombined \| CameraExperience.CardSingleSide \| CameraExperience.PaymentCard` | `undefined` | ## Events -| Event | Description | Type | -| ------------------ | ---------------------------------------- | ------------------- | -| `close` | Emitted when user clicks on 'X' button. | `CustomEvent` | -| `flipCameraAction` | Emitted when user clicks on Flip button. | `CustomEvent` | +| Event | Description | Type | +| -------------------- | ---------------------------------------------------- | -------------------------- | +| `changeCameraDevice` | Emitted when user selects a different camera device. | `CustomEvent` | +| `close` | Emitted when user clicks on 'X' button. | `CustomEvent` | +| `flipCameraAction` | Emitted when user clicks on Flip button. | `CustomEvent` | ## Methods +### `populateCameraDevices() => Promise` + +Populate list of camera devices. + +#### Returns + +Type: `Promise` + + + +### `resetState() => Promise` + + + +#### Returns + +Type: `Promise` + + + +### `setActiveCamera(cameraId: string) => Promise` + +Change active camera. + +#### Returns + +Type: `Promise` + + + ### `setCameraFlipState(isFlipped: boolean) => Promise` Method is exposed outside which allow us to control Camera Flip state from parent component. @@ -40,7 +71,7 @@ Type: `Promise` ### `setState(state: CameraExperienceState, isBackSide?: boolean, force?: boolean) => Promise` -Set camera scanning state. + #### Returns @@ -55,9 +86,15 @@ Type: `Promise` - [mb-component](../mb-component) +### Depends on + +- [mb-camera-toolbar](../mb-camera-toolbar) + ### Graph ```mermaid graph TD; + mb-camera-experience --> mb-camera-toolbar + mb-camera-toolbar --> mb-camera-selection mb-component --> mb-camera-experience style mb-camera-experience fill:#f9f,stroke:#333,stroke-width:4px ``` diff --git a/ui/docs/components/shared/mb-camera-selection/readme.md b/ui/docs/components/shared/mb-camera-selection/readme.md new file mode 100644 index 0000000..6cc59b8 --- /dev/null +++ b/ui/docs/components/shared/mb-camera-selection/readme.md @@ -0,0 +1,53 @@ +# mb-camera-selection + + + + + + +## Events + +| Event | Description | Type | +| -------------------- | ---------------------------------------------------- | -------------------------- | +| `changeCameraDevice` | Emitted when user selects a different camera device. | `CustomEvent` | + + +## Methods + +### `populateCameraDevices() => Promise` + +Populate list of camera devices. + +#### Returns + +Type: `Promise` + + + +### `setActiveCamera(cameraId: string) => Promise` + +Change active camera. + +#### Returns + +Type: `Promise` + + + + +## Dependencies + +### Used by + + - [mb-camera-toolbar](../mb-camera-toolbar) + +### Graph +```mermaid +graph TD; + mb-camera-toolbar --> mb-camera-selection + style mb-camera-selection fill:#f9f,stroke:#333,stroke-width:4px +``` + +---------------------------------------------- + +*Built with [StencilJS](https://stenciljs.com/)* diff --git a/ui/docs/components/shared/mb-camera-toolbar/readme.md b/ui/docs/components/shared/mb-camera-toolbar/readme.md new file mode 100644 index 0000000..8a350cf --- /dev/null +++ b/ui/docs/components/shared/mb-camera-toolbar/readme.md @@ -0,0 +1,69 @@ +# mb-camera-toolbar + + + + + + +## Properties + +| Property | Attribute | Description | Type | Default | +| ------------------ | -------------------- | ---------------------------------------------------------------------------- | --------- | ------- | +| `cameraFlipped` | `camera-flipped` | Whether the camera is flipped, this property will be flip the relevant icon. | `boolean` | `false` | +| `enableCameraFlip` | `enable-camera-flip` | Whether to show 'Camera flip' button. | `boolean` | `false` | +| `showClose` | `show-close` | Set to `true` if close button should be displayed. | `boolean` | `false` | + + +## Events + +| Event | Description | Type | +| -------------------- | ------------------------------------------------------------ | -------------------------- | +| `changeCameraDevice` | Emitted when user selects a different camera device. | `CustomEvent` | +| `closeEvent` | Event which is triggered when close button is clicked. | `CustomEvent` | +| `flipEvent` | Event which is triggered when flip camera button is clicked. | `CustomEvent` | + + +## Methods + +### `populateCameraDevices() => Promise` + +Populate list of camera devices. + +#### Returns + +Type: `Promise` + + + +### `setActiveCamera(cameraId: string) => Promise` + +Change active camera. + +#### Returns + +Type: `Promise` + + + + +## Dependencies + +### Used by + + - [mb-camera-experience](../mb-camera-experience) + +### Depends on + +- [mb-camera-selection](../mb-camera-selection) + +### Graph +```mermaid +graph TD; + mb-camera-toolbar --> mb-camera-selection + mb-camera-experience --> mb-camera-toolbar + style mb-camera-toolbar fill:#f9f,stroke:#333,stroke-width:4px +``` + +---------------------------------------------- + +*Built with [StencilJS](https://stenciljs.com/)* diff --git a/ui/docs/components/shared/mb-completed/readme.md b/ui/docs/components/shared/mb-completed/readme.md new file mode 100644 index 0000000..dd2d2d2 --- /dev/null +++ b/ui/docs/components/shared/mb-completed/readme.md @@ -0,0 +1,30 @@ +# mb-completed + + + + + + +## Properties + +| Property | Attribute | Description | Type | Default | +| -------- | --------- | ------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `icon` | `icon` | Value of `src` attribute for element. | `string` | `'data:image/svg+xml;utf8,'` | + + +## Dependencies + +### Used by + + - [mb-component](../mb-component) + +### Graph +```mermaid +graph TD; + mb-component --> mb-completed + style mb-completed fill:#f9f,stroke:#333,stroke-width:4px +``` + +---------------------------------------------- + +*Built with [StencilJS](https://stenciljs.com/)* diff --git a/ui/docs/components/shared/mb-component/readme.md b/ui/docs/components/shared/mb-component/readme.md index fbc1046..9880813 100644 --- a/ui/docs/components/shared/mb-component/readme.md +++ b/ui/docs/components/shared/mb-component/readme.md @@ -7,35 +7,39 @@ ## Properties -| Property | Attribute | Description | Type | Default | -| ---------------------------------- | -------------------------------------- | ---------------------------------------------------------- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `allowHelloMessage` | `allow-hello-message` | See description in public component. | `boolean` | `true` | -| `cameraId` | `camera-id` | Camera device ID passed from root component. | `string` | `null` | -| `enableDrag` | `enable-drag` | See description in public component. | `boolean` | `true` | -| `engineLocation` | `engine-location` | See description in public component. | `string` | `''` | -| `hideLoadingAndErrorUi` | `hide-loading-and-error-ui` | See description in public component. | `boolean` | `false` | -| `iconCameraActive` | `icon-camera-active` | See description in public component. | `string` | `'data:image/svg+xml;utf8,'` | -| `iconCameraDefault` | `icon-camera-default` | See description in public component. | `string` | `'data:image/svg+xml;utf8,'` | -| `iconGalleryActive` | `icon-gallery-active` | See description in public component. | `string` | `'data:image/svg+xml;utf8,'` | -| `iconGalleryDefault` | `icon-gallery-default` | See description in public component. | `string` | `'data:image/svg+xml;utf8,'` | -| `iconInvalidFormat` | `icon-invalid-format` | See description in public component. | `string` | `'data:image/svg+xml;utf8,'` | -| `iconSpinnerFromGalleryExperience` | `icon-spinner-from-gallery-experience` | See description in public component. | `string` | `undefined` | -| `iconSpinnerScreenLoading` | `icon-spinner-screen-loading` | See description in public component. | `string` | `undefined` | -| `includeSuccessFrame` | `include-success-frame` | See description in public component. | `boolean` | `false` | -| `licenseKey` | `license-key` | See description in public component. | `string` | `undefined` | -| `recognizerOptions` | -- | See description in public component. | `{ [key: string]: any; }` | `undefined` | -| `recognizers` | -- | See description in public component. | `string[]` | `undefined` | -| `rtl` | `rtl` | See description in public component. | `boolean` | `false` | -| `scanFromCamera` | `scan-from-camera` | See description in public component. | `boolean` | `true` | -| `scanFromImage` | `scan-from-image` | See description in public component. | `boolean` | `true` | -| `sdkService` | -- | Instance of SdkService passed from root component. | `SdkService` | `undefined` | -| `showActionLabels` | `show-action-labels` | See description in public component. | `boolean` | `false` | -| `showCameraFeedbackBarcodeMessage` | `show-camera-feedback-barcode-message` | See description in public component. | `boolean` | `false` | -| `showModalWindows` | `show-modal-windows` | See description in public component. | `boolean` | `false` | -| `showScanningLine` | `show-scanning-line` | See description in public component. | `boolean` | `false` | -| `thoroughScanFromImage` | `thorough-scan-from-image` | See description in public component. | `boolean` | `false` | -| `translationService` | -- | Instance of TranslationService passed from root component. | `TranslationService` | `undefined` | -| `wasmType` | `wasm-type` | See description in public component. | `string` | `undefined` | +| Property | Attribute | Description | Type | Default | +| ---------------------------------- | -------------------------------------- | ---------------------------------------------------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `allowHelloMessage` | `allow-hello-message` | See description in public component. | `boolean` | `true` | +| `cameraId` | `camera-id` | Camera device ID passed from root component. | `string` | `null` | +| `enableDrag` | `enable-drag` | See description in public component. | `boolean` | `true` | +| `engineLocation` | `engine-location` | See description in public component. | `string` | `''` | +| `galleryDropType` | `gallery-drop-type` | See description in public component. | `"FULLSCREEN" \| "INLINE"` | `'INLINE'` | +| `galleryOverlayType` | `gallery-overlay-type` | See description in public component. | `"FULLSCREEN" \| "INLINE"` | `'INLINE'` | +| `hideLoadingAndErrorUi` | `hide-loading-and-error-ui` | See description in public component. | `boolean` | `false` | +| `iconCameraActive` | `icon-camera-active` | See description in public component. | `string` | `'data:image/svg+xml;utf8,'` | +| `iconCameraDefault` | `icon-camera-default` | See description in public component. | `string` | `'data:image/svg+xml;utf8,'` | +| `iconGalleryActive` | `icon-gallery-active` | See description in public component. | `string` | `'data:image/svg+xml;utf8,'` | +| `iconGalleryDefault` | `icon-gallery-default` | See description in public component. | `string` | `'data:image/svg+xml;utf8,'` | +| `iconGalleryScanningCompleted` | `icon-gallery-scanning-completed` | See description in public component. | `string` | `undefined` | +| `iconInvalidFormat` | `icon-invalid-format` | See description in public component. | `string` | `'data:image/svg+xml;utf8,'` | +| `iconSpinnerFromGalleryExperience` | `icon-spinner-from-gallery-experience` | See description in public component. | `string` | `undefined` | +| `iconSpinnerScreenLoading` | `icon-spinner-screen-loading` | See description in public component. | `string` | `undefined` | +| `includeSuccessFrame` | `include-success-frame` | See description in public component. | `boolean` | `false` | +| `licenseKey` | `license-key` | See description in public component. | `string` | `undefined` | +| `recognitionTimeout` | `recognition-timeout` | See description in public component. | `number` | `undefined` | +| `recognizerOptions` | -- | See description in public component. | `{ [key: string]: any; }` | `undefined` | +| `recognizers` | -- | See description in public component. | `string[]` | `undefined` | +| `rtl` | `rtl` | See description in public component. | `boolean` | `false` | +| `scanFromCamera` | `scan-from-camera` | See description in public component. | `boolean` | `true` | +| `scanFromImage` | `scan-from-image` | See description in public component. | `boolean` | `true` | +| `sdkService` | -- | Instance of SdkService passed from root component. | `SdkService` | `undefined` | +| `showActionLabels` | `show-action-labels` | See description in public component. | `boolean` | `false` | +| `showCameraFeedbackBarcodeMessage` | `show-camera-feedback-barcode-message` | See description in public component. | `boolean` | `false` | +| `showModalWindows` | `show-modal-windows` | See description in public component. | `boolean` | `false` | +| `showScanningLine` | `show-scanning-line` | See description in public component. | `boolean` | `false` | +| `thoroughScanFromImage` | `thorough-scan-from-image` | See description in public component. | `boolean` | `false` | +| `translationService` | -- | Instance of TranslationService passed from root component. | `TranslationService` | `undefined` | +| `wasmType` | `wasm-type` | See description in public component. | `string` | `undefined` | ## Events @@ -78,6 +82,9 @@ Type: `Promise` - [mb-screen](../mb-screen) - [mb-spinner](../mb-spinner) - [mb-button](../mb-button) +- [mb-image-box](../mb-image-box) +- [mb-button-classic](../mb-button-classic) +- [mb-completed](../mb-completed) - [mb-overlay](../mb-overlay) - [mb-modal](../mb-modal) - [mb-camera-experience](../mb-camera-experience) @@ -89,10 +96,15 @@ graph TD; mb-component --> mb-screen mb-component --> mb-spinner mb-component --> mb-button + mb-component --> mb-image-box + mb-component --> mb-button-classic + mb-component --> mb-completed mb-component --> mb-overlay mb-component --> mb-modal mb-component --> mb-camera-experience mb-component --> mb-api-process-status + mb-camera-experience --> mb-camera-toolbar + mb-camera-toolbar --> mb-camera-selection mb-api-process-status --> mb-modal blinkid-imagecapture-in-browser --> mb-component style mb-component fill:#f9f,stroke:#333,stroke-width:4px diff --git a/ui/docs/components/shared/mb-image-box/readme.md b/ui/docs/components/shared/mb-image-box/readme.md new file mode 100644 index 0000000..a51f613 --- /dev/null +++ b/ui/docs/components/shared/mb-image-box/readme.md @@ -0,0 +1,51 @@ +# mb-image-box + + + + + + +## Properties + +| Property | Attribute | Description | Type | Default | +| ------------ | ------------- | ------------------------------------------------------------------------------------------- | -------- | ----------- | +| `anchorText` | `anchor-text` | Text which should be displayed inside 'Add image' anchor element when file is not selected. | `string` | `undefined` | +| `boxTitle` | `box-title` | Text which represents name of the image. | `string` | `undefined` | + + +## Events + +| Event | Description | Type | +| ------------- | ------------------------------------------------------------- | ----------------------- | +| `imageChange` | Event which is triggered when selected image file is changed. | `CustomEvent` | + + +## Methods + +### `clear() => Promise` + +Clear input image. + +#### Returns + +Type: `Promise` + + + + +## Dependencies + +### Used by + + - [mb-component](../mb-component) + +### Graph +```mermaid +graph TD; + mb-component --> mb-image-box + style mb-image-box fill:#f9f,stroke:#333,stroke-width:4px +``` + +---------------------------------------------- + +*Built with [StencilJS](https://stenciljs.com/)* diff --git a/ui/examples/javascript-combined/index.html b/ui/examples/javascript-combined/index.html index 3529f06..1387dbd 100644 --- a/ui/examples/javascript-combined/index.html +++ b/ui/examples/javascript-combined/index.html @@ -7,13 +7,13 @@ - + - + - + @@ -56,7 +71,7 @@ if ( window.location.hostname === "blinkid.github.io" ) { - el.licenseKey = "sRwAAAYRYmxpbmtpZC5naXRodWIuaW+qBF9heYYlTvZbvmaACK9LsOPr2Dus6G8yiiYYl5VQwUApVeP999MMDDDO5rn2MaO8V+8T49z3hjPjRAjrZoTNaT0aQxP+eiYnG4hKWeWdhAO6eciw8G3RPZLibIy9qXZpSpmh7IkJaKtMeUkuWYTRIMc6c6LIdjFd/rfMeTrvF2WEIksMW1v5eD0XphdjoYGM8RLV/fGtftidb2+7RfIdhLEjOZfM9w=="; + el.licenseKey = "sRwAAAYRYmxpbmtpZC5naXRodWIuaW+qBF9heYYlTvZbvmaGyKtLQks1inX9LpYE8wI2jFaCiL8plqSE9Fb5+jgzGLhYWH53IlLSx6CvKy8gxG5w1R7BpZMaJdup3M6htIaa+wLELlTbr8FPWQNDQuKh7Qr+M9qkMAJFdzRatyvTz7CaS5rEE4gOSXLVk/DaIYt1WSHb9tzfyoo4h1g8hDh38ZiwpaW/vJyZi6pEDF1ESLjX5q+LZUU4qOuYUOTUUQ=="; } el.engineLocation = "https://blinkid.github.io/blinkid-imagecapture-in-browser/resources"; diff --git a/ui/examples/javascript/index.html b/ui/examples/javascript/index.html index f031524..111971d 100644 --- a/ui/examples/javascript/index.html +++ b/ui/examples/javascript/index.html @@ -7,13 +7,13 @@ - + - + - + @@ -56,7 +71,7 @@ if ( window.location.hostname === "blinkid.github.io" ) { - el.licenseKey = "sRwAAAYRYmxpbmtpZC5naXRodWIuaW+qBF9heYYlTvZbvmaACK9LsOPr2Dus6G8yiiYYl5VQwUApVeP999MMDDDO5rn2MaO8V+8T49z3hjPjRAjrZoTNaT0aQxP+eiYnG4hKWeWdhAO6eciw8G3RPZLibIy9qXZpSpmh7IkJaKtMeUkuWYTRIMc6c6LIdjFd/rfMeTrvF2WEIksMW1v5eD0XphdjoYGM8RLV/fGtftidb2+7RfIdhLEjOZfM9w=="; + el.licenseKey = "sRwAAAYRYmxpbmtpZC5naXRodWIuaW+qBF9heYYlTvZbvmaGyKtLQks1inX9LpYE8wI2jFaCiL8plqSE9Fb5+jgzGLhYWH53IlLSx6CvKy8gxG5w1R7BpZMaJdup3M6htIaa+wLELlTbr8FPWQNDQuKh7Qr+M9qkMAJFdzRatyvTz7CaS5rEE4gOSXLVk/DaIYt1WSHb9tzfyoo4h1g8hDh38ZiwpaW/vJyZi6pEDF1ESLjX5q+LZUU4qOuYUOTUUQ=="; } el.engineLocation = "https://blinkid.github.io/blinkid-imagecapture-in-browser/resources"; diff --git a/ui/examples/typescript/package.json b/ui/examples/typescript/package.json index 66c38e7..63abea1 100644 --- a/ui/examples/typescript/package.json +++ b/ui/examples/typescript/package.json @@ -19,6 +19,6 @@ "typescript": "^3.9.5" }, "dependencies": { - "@microblink/blinkid-imagecapture-in-browser-sdk": "~5.13.0" + "@microblink/blinkid-imagecapture-in-browser-sdk": "~5.14.0" } } \ No newline at end of file diff --git a/ui/examples/typescript/public/style.css b/ui/examples/typescript/public/style.css index eae3774..0c4e24d 100644 --- a/ui/examples/typescript/public/style.css +++ b/ui/examples/typescript/public/style.css @@ -26,3 +26,19 @@ body padding: 3rem 1.5rem; background-color: #eee; } + +blinkid-imagecapture-in-browser +{ + max-width: 400px; + + /* Customization of UI - see variables in src/components/shared/styles/_globals.scss */ + /* + --mb-component-background: red; + --mb-component-action-label: none; + --mb-component-border-width: 0; + --mb-component-action-buttons-width: 100%; + --mb-component-action-buttons-justify-content: space-evenly; + --mb-component-button-size: 48px; + --mb-component-button-border-radius: 24px; + */ +} diff --git a/ui/examples/typescript/src/app.ts b/ui/examples/typescript/src/app.ts index 260e1b9..988108e 100644 --- a/ui/examples/typescript/src/app.ts +++ b/ui/examples/typescript/src/app.ts @@ -28,7 +28,7 @@ function initializeUiComponent() throw "Could not find UI component!"; } - el.licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPgo/w35CpGFWLwUXza1htObpRih8QOvGrTQkcxdS4jAQV5d17d4zNLUVZRwTIjjr0gaYz+v4H++9CE49zVdEv18K9TNNU8BEnCYW6bthX1CABGUpVVJLoR8PlRPBNDhFI2KlQj/zPXu955Wc+b+Cvm8IPJOLO0FuMmtn4RL7bSPDeJs62WRv6G00bgY0Ha8jKkoWOki/5+4KKP1g0Vp4YMOG7tc="; + el.licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPgo/w35CpGFWKcUTzWfFms+1HtOJBLOa0Z9jQdHUQo1EWP1afmump3DAd/zRkoNODh6Y9FtA1eYVaya36wQmmWpLEliFyV9va44nCIrCRqyoUzeQolAjPINbKGqHklMsfYekNYLDA2i+7zfxUF8Ac3eQ3FiDhrN3d1l+36UjfUfU9e6omHNFxdqysdOxvgVw9bNH8fjbKRmI1CJHbJmb1AWmi2YGwk0="; el.engineLocation = window.location.origin; el.recognizers = [ "BlinkIdImageCaptureRecognizer" ]; diff --git a/ui/package-lock.json b/ui/package-lock.json index 74d1621..3a97add 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -33,15 +33,15 @@ } }, "autoprefixer": { - "version": "10.3.1", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.3.1.tgz", - "integrity": "sha512-L8AmtKzdiRyYg7BUXJTzigmhbQRCXFKz6SA1Lqo0+AR2FBbQ4aTAPFSDlOutnFkjhiz8my4agGXog1xlMjPJ6A==", + "version": "10.3.6", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.3.6.tgz", + "integrity": "sha512-3bDjTfF0MfZntwVCSd18XAT2Zndufh3Mep+mafbzdIQEeWbncVRUVDjH8/EPANV9Hq40seJ24QcYAyhUsFz7gQ==", "dev": true, "requires": { - "browserslist": "^4.16.6", - "caniuse-lite": "^1.0.30001243", - "colorette": "^1.2.2", + "browserslist": "^4.17.1", + "caniuse-lite": "^1.0.30001260", "fraction.js": "^4.1.1", + "nanocolors": "^0.2.8", "normalize-range": "^0.1.2", "postcss-value-parser": "^4.1.0" } @@ -63,28 +63,28 @@ } }, "browserslist": { - "version": "4.16.7", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.7.tgz", - "integrity": "sha512-7I4qVwqZltJ7j37wObBe3SoTz+nS8APaNcrBOlgoirb6/HbEU2XxW/LpUDTCngM6iauwFqmRTuOMfyKnFGY5JA==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.2.tgz", + "integrity": "sha512-jSDZyqJmkKMEMi7SZAgX5UltFdR5NAO43vY0AwTpu4X3sGH7GLLQ83KiUomgrnvZRCeW0yPPnKqnxPqQOER9zQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001248", - "colorette": "^1.2.2", - "electron-to-chromium": "^1.3.793", + "caniuse-lite": "^1.0.30001261", + "electron-to-chromium": "^1.3.854", "escalade": "^3.1.1", - "node-releases": "^1.1.73" + "nanocolors": "^0.2.12", + "node-releases": "^1.1.76" } }, "caniuse-lite": { - "version": "1.0.30001251", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001251.tgz", - "integrity": "sha512-HOe1r+9VkU4TFmnU70z+r7OLmtR+/chB1rdcJUeQlAinjEeb0cKL20tlAtOagNZhbrtLnCvV19B4FmF1rgzl6A==", + "version": "1.0.30001264", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001264.tgz", + "integrity": "sha512-Ftfqqfcs/ePiUmyaySsQ4PUsdcYyXG2rfoBVsk3iY1ahHaJEw65vfb7Suzqm+cEkwwPIv/XWkg27iCpRavH4zA==", "dev": true }, "colorette": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.3.0.tgz", - "integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", + "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", "dev": true }, "concat-map": { @@ -94,9 +94,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.805", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.805.tgz", - "integrity": "sha512-uUJF59M6pNSRHQaXwdkaNB4BhSQ9lldRdG1qCjlrAFkynPGDc5wPoUcYEQQeQGmKyAWJPvGkYAWmtVrxWmDAkg==", + "version": "1.3.857", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.857.tgz", + "integrity": "sha512-a5kIr2lajm4bJ5E4D3fp8Y/BRB0Dx2VOcCRE5Gtb679mXIME/OFhWler8Gy2ksrf8gFX+EFCSIGA33FB3gqYpg==", "dev": true }, "escalade": { @@ -118,9 +118,9 @@ "dev": true }, "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -156,16 +156,22 @@ "brace-expansion": "^1.1.7" } }, + "nanocolors": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/nanocolors/-/nanocolors-0.2.12.tgz", + "integrity": "sha512-SFNdALvzW+rVlzqexid6epYdt8H9Zol7xDoQarioEFcFN0JHo4CYNztAxmtfgGTVRCmFlEOqqhBpoFGKqSAMug==", + "dev": true + }, "nanoid": { - "version": "3.1.25", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz", - "integrity": "sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q==", + "version": "3.1.28", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.28.tgz", + "integrity": "sha512-gSu9VZ2HtmoKYe/lmyPFES5nknFrHa+/DT9muUFWFMi6Jh9E1I7bkvlQ8xxf1Kos9pi9o8lBnIOkatMhKX/YUw==", "dev": true }, "node-releases": { - "version": "1.1.74", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.74.tgz", - "integrity": "sha512-caJBVempXZPepZoZAPCWRTNxYQ+xtG/KAi4ozTA5A+nJ7IU+kLQCbqaUjb5Rwy14M9upBWiQ4NutcmW04LJSRw==", + "version": "1.1.77", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.77.tgz", + "integrity": "sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ==", "dev": true }, "normalize-range": { @@ -222,9 +228,9 @@ "dev": true }, "typescript": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", - "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.3.tgz", + "integrity": "sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==", "dev": true }, "wrappy": { diff --git a/ui/src/components.d.ts b/ui/src/components.d.ts index cdc7c95..f251d38 100644 --- a/ui/src/components.d.ts +++ b/ui/src/components.d.ts @@ -5,7 +5,7 @@ * It contains typing information for all components that exist in this project. */ import { HTMLStencilElement, JSXBase } from "@stencil/core/internal"; -import { CameraExperience, CameraExperienceState, EventFatalError, EventReady, EventScanError, EventScanSuccess, FeedbackMessage } from "./utils/data-structures"; +import { CameraEntry, CameraExperience, CameraExperienceState, EventFatalError, EventReady, EventScanError, EventScanSuccess, FeedbackMessage } from "./utils/data-structures"; import { TranslationService } from "./utils/translation.service"; import { SdkService } from "./utils/sdk.service"; export namespace Components { @@ -26,6 +26,14 @@ export namespace Components { * Absolute location of WASM and related JS/data files. Useful when resource files should be loaded over CDN, or when web frameworks/libraries are used which store resources in specific locations, e.g. inside "assets" folder. Important: if engine is hosted on another origin, CORS must be enabled between two hosts. That is, server where engine is hosted must have 'Access-Control-Allow-Origin' header for the location of the web app. Important: SDK and WASM resources must be from the same version of package. Default value is empty string, i.e. "". In case of empty string, value of "window.location.origin" property is going to be used. */ "engineLocation": string; + /** + * Define whether to use 'FULLSCREEN' or 'INLINE' gallery dropdown type. If 'FULLSCREEN' is used, when a user drags an image over the UI component, an overlay will pop up and cover the whole screen. If 'INLINE' is used, there is no fullscreen overlay, but rather the overlay is restricted to the size of the UI component. Default value is 'INLINE'. + */ + "galleryDropType": 'FULLSCREEN' | 'INLINE'; + /** + * Define whether to use 'FULLSCREEN' or 'INLINE' gallery overlay type. If 'FULLSCREEN' is used, when a user selects an image from which data should be extracted, an overlay will pop up and cover the whole screen. On the other hand, if 'INLINE' is used, there is no overlay but rather a 'Processing' message inside the UI component. Default value is 'INLINE'. + */ + "galleryOverlayType": 'FULLSCREEN' | 'INLINE'; /** * If set to 'true', UI component will not display feedback, i.e. information and error messages. Setting this attribute to 'false' won't disable 'scanError' and 'scanInfo' events. Default value is 'false'. */ @@ -51,15 +59,19 @@ export namespace Components { */ "iconGalleryDefault": string; /** - * Provide alternative invalid format icon which is used during drag and drop action. Every value that is placed here is passed as a value of `src` attribute to element. This attribute can be used to provide location, base64 or any URL of alternative gallery icon. Image is scaled to 24x24 pixels. + * Provide alternative completed icon. This icon is used when gallery scanning process is done, in case that `galleryOverlayType` property is set to `INLINE`. Every value that is placed here is passed as a value of `src` attribute to element. This attribute can be used to provide location, base64 or any URL of alternative icon. Image is scaled to 24x24 pixels. + */ + "iconGalleryScanningCompleted": string; + /** + * Provide alternative invalid format icon which is used during drag and drop action. Every value that is placed here is passed as a value of `src` attribute to element. This attribute can be used to provide location, base64 or any URL of alternative icon. Image is scaled to 24x24 pixels. */ "iconInvalidFormat": string; /** - * Provide alternative loading icon. CSS rotation is applied to this icon. Every value that is placed here is passed as a value of `src` attribute to element. This attribute can be used to provide location, base64 or any URL of alternative gallery icon. Image is scaled to 24x24 pixels. + * Provide alternative loading icon. CSS rotation is applied to this icon. Every value that is placed here is passed as a value of `src` attribute to element. This attribute can be used to provide location, base64 or any URL of alternative icon. Image is scaled to 24x24 pixels. */ "iconSpinnerFromGalleryExperience": string; /** - * Provide alternative loading icon. CSS rotation is applied to this icon. Every value that is placed here is passed as a value of `src` attribute to element. This attribute can be used to provide location, base64 or any URL of alternative gallery icon. Image is scaled to 24x24 pixels. + * Provide alternative loading icon. CSS rotation is applied to this icon. Every value that is placed here is passed as a value of `src` attribute to element. This attribute can be used to provide location, base64 or any URL of alternative icon. Image is scaled to 24x24 pixels. */ "iconSpinnerScreenLoading": string; /** @@ -74,6 +86,10 @@ export namespace Components { * Set custom translations for UI component. List of available translation keys can be found in `src/utils/translation.service.ts` file. */ "rawTranslations": string; + /** + * Amount of time in milliseconds before the recognition process is cancelled regardless of whether recognition was successful or not. This setting applies only to video recognition. Keep in mind that the timer starts after the first non-empty result. This behaviour ensures that the user has enough time to take out the document and place it in front of the camera device. + */ + "recognitionTimeout": number; /** * Specify recognizer options. This option can only bet set as a JavaScript property. Pass an object to `recognizerOptions` property where each key represents a recognizer, while the value represents desired recognizer options. ``` blinkId.recognizerOptions = { 'BlinkIdImageCaptureRecognizer': { // Enable scanning of both document sides 'captureBothDocumentSides': true, // Scan images of documents that have already been cropped and don't require detection 'scanCroppedDocumentImage': true } } ``` For a full list of available recognizer options see source code of a recognizer. For example, list of available recognizer options for BlinkIdImageCaptureRecognizer can be seen in the `src/Recognizers/BlinkID/ImageCapture/ImageCaptureRecognizer.ts` file. */ @@ -162,6 +178,10 @@ export namespace Components { * Set to 'true' if default event should be prevented. */ "preventDefault": boolean; + /** + * Set to 'true' if button should enter 'selected' state. + */ + "selected": boolean; /** * Instance of TranslationService passed from root component. */ @@ -171,6 +191,16 @@ export namespace Components { */ "visible": boolean; } + interface MbButtonClassic { + /** + * Set to 'true' if button should be disabled, and if click events should not be triggered. + */ + "disabled": boolean; + /** + * Set to 'true' if default event should be prevented. + */ + "preventDefault": boolean; + } interface MbCameraExperience { /** * Api state passed from root component. @@ -181,12 +211,18 @@ export namespace Components { */ "cameraFlipped": boolean; /** - * Method is exposed outside which allow us to control Camera Flip state from parent component. + * Populate list of camera devices. */ - "setCameraFlipState": (isFlipped: boolean) => Promise; + "populateCameraDevices": () => Promise; + "resetState": () => Promise; /** - * Set camera scanning state. + * Change active camera. */ + "setActiveCamera": (cameraId: string) => Promise; + /** + * Method is exposed outside which allow us to control Camera Flip state from parent component. + */ + "setCameraFlipState": (isFlipped: boolean) => Promise; "setState": (state: CameraExperienceState, isBackSide?: boolean, force?: boolean) => Promise; /** * Show camera feedback message on camera for Barcode scanning @@ -209,6 +245,44 @@ export namespace Components { */ "type": CameraExperience; } + interface MbCameraSelection { + /** + * Populate list of camera devices. + */ + "populateCameraDevices": () => Promise; + /** + * Change active camera. + */ + "setActiveCamera": (cameraId: string) => Promise; + } + interface MbCameraToolbar { + /** + * Whether the camera is flipped, this property will be flip the relevant icon. + */ + "cameraFlipped": boolean; + /** + * Whether to show 'Camera flip' button. + */ + "enableCameraFlip": boolean; + /** + * Populate list of camera devices. + */ + "populateCameraDevices": () => Promise; + /** + * Change active camera. + */ + "setActiveCamera": (cameraId: string) => Promise; + /** + * Set to `true` if close button should be displayed. + */ + "showClose": boolean; + } + interface MbCompleted { + /** + * Value of `src` attribute for element. + */ + "icon": string; + } interface MbComponent { /** * See description in public component. @@ -226,6 +300,14 @@ export namespace Components { * See description in public component. */ "engineLocation": string; + /** + * See description in public component. + */ + "galleryDropType": 'FULLSCREEN' | 'INLINE'; + /** + * See description in public component. + */ + "galleryOverlayType": 'FULLSCREEN' | 'INLINE'; /** * See description in public component. */ @@ -246,6 +328,10 @@ export namespace Components { * See description in public component. */ "iconGalleryDefault": string; + /** + * See description in public component. + */ + "iconGalleryScanningCompleted": string; /** * See description in public component. */ @@ -266,6 +352,10 @@ export namespace Components { * See description in public component. */ "licenseKey": string; + /** + * See description in public component. + */ + "recognitionTimeout": number; /** * See description in public component. */ @@ -335,6 +425,20 @@ export namespace Components { */ "visible": boolean; } + interface MbImageBox { + /** + * Text which should be displayed inside 'Add image' anchor element when file is not selected. + */ + "anchorText": string; + /** + * Text which represents name of the image. + */ + "boxTitle": string; + /** + * Clear input image. + */ + "clear": () => Promise; + } interface MbModal { /** * Passed body content from parent component @@ -399,12 +503,36 @@ declare global { prototype: HTMLMbButtonElement; new (): HTMLMbButtonElement; }; + interface HTMLMbButtonClassicElement extends Components.MbButtonClassic, HTMLStencilElement { + } + var HTMLMbButtonClassicElement: { + prototype: HTMLMbButtonClassicElement; + new (): HTMLMbButtonClassicElement; + }; interface HTMLMbCameraExperienceElement extends Components.MbCameraExperience, HTMLStencilElement { } var HTMLMbCameraExperienceElement: { prototype: HTMLMbCameraExperienceElement; new (): HTMLMbCameraExperienceElement; }; + interface HTMLMbCameraSelectionElement extends Components.MbCameraSelection, HTMLStencilElement { + } + var HTMLMbCameraSelectionElement: { + prototype: HTMLMbCameraSelectionElement; + new (): HTMLMbCameraSelectionElement; + }; + interface HTMLMbCameraToolbarElement extends Components.MbCameraToolbar, HTMLStencilElement { + } + var HTMLMbCameraToolbarElement: { + prototype: HTMLMbCameraToolbarElement; + new (): HTMLMbCameraToolbarElement; + }; + interface HTMLMbCompletedElement extends Components.MbCompleted, HTMLStencilElement { + } + var HTMLMbCompletedElement: { + prototype: HTMLMbCompletedElement; + new (): HTMLMbCompletedElement; + }; interface HTMLMbComponentElement extends Components.MbComponent, HTMLStencilElement { } var HTMLMbComponentElement: { @@ -423,6 +551,12 @@ declare global { prototype: HTMLMbFeedbackElement; new (): HTMLMbFeedbackElement; }; + interface HTMLMbImageBoxElement extends Components.MbImageBox, HTMLStencilElement { + } + var HTMLMbImageBoxElement: { + prototype: HTMLMbImageBoxElement; + new (): HTMLMbImageBoxElement; + }; interface HTMLMbModalElement extends Components.MbModal, HTMLStencilElement { } var HTMLMbModalElement: { @@ -451,10 +585,15 @@ declare global { "blinkid-imagecapture-in-browser": HTMLBlinkidImagecaptureInBrowserElement; "mb-api-process-status": HTMLMbApiProcessStatusElement; "mb-button": HTMLMbButtonElement; + "mb-button-classic": HTMLMbButtonClassicElement; "mb-camera-experience": HTMLMbCameraExperienceElement; + "mb-camera-selection": HTMLMbCameraSelectionElement; + "mb-camera-toolbar": HTMLMbCameraToolbarElement; + "mb-completed": HTMLMbCompletedElement; "mb-component": HTMLMbComponentElement; "mb-container": HTMLMbContainerElement; "mb-feedback": HTMLMbFeedbackElement; + "mb-image-box": HTMLMbImageBoxElement; "mb-modal": HTMLMbModalElement; "mb-overlay": HTMLMbOverlayElement; "mb-screen": HTMLMbScreenElement; @@ -479,6 +618,14 @@ declare namespace LocalJSX { * Absolute location of WASM and related JS/data files. Useful when resource files should be loaded over CDN, or when web frameworks/libraries are used which store resources in specific locations, e.g. inside "assets" folder. Important: if engine is hosted on another origin, CORS must be enabled between two hosts. That is, server where engine is hosted must have 'Access-Control-Allow-Origin' header for the location of the web app. Important: SDK and WASM resources must be from the same version of package. Default value is empty string, i.e. "". In case of empty string, value of "window.location.origin" property is going to be used. */ "engineLocation"?: string; + /** + * Define whether to use 'FULLSCREEN' or 'INLINE' gallery dropdown type. If 'FULLSCREEN' is used, when a user drags an image over the UI component, an overlay will pop up and cover the whole screen. If 'INLINE' is used, there is no fullscreen overlay, but rather the overlay is restricted to the size of the UI component. Default value is 'INLINE'. + */ + "galleryDropType"?: 'FULLSCREEN' | 'INLINE'; + /** + * Define whether to use 'FULLSCREEN' or 'INLINE' gallery overlay type. If 'FULLSCREEN' is used, when a user selects an image from which data should be extracted, an overlay will pop up and cover the whole screen. On the other hand, if 'INLINE' is used, there is no overlay but rather a 'Processing' message inside the UI component. Default value is 'INLINE'. + */ + "galleryOverlayType"?: 'FULLSCREEN' | 'INLINE'; /** * If set to 'true', UI component will not display feedback, i.e. information and error messages. Setting this attribute to 'false' won't disable 'scanError' and 'scanInfo' events. Default value is 'false'. */ @@ -504,15 +651,19 @@ declare namespace LocalJSX { */ "iconGalleryDefault"?: string; /** - * Provide alternative invalid format icon which is used during drag and drop action. Every value that is placed here is passed as a value of `src` attribute to element. This attribute can be used to provide location, base64 or any URL of alternative gallery icon. Image is scaled to 24x24 pixels. + * Provide alternative completed icon. This icon is used when gallery scanning process is done, in case that `galleryOverlayType` property is set to `INLINE`. Every value that is placed here is passed as a value of `src` attribute to element. This attribute can be used to provide location, base64 or any URL of alternative icon. Image is scaled to 24x24 pixels. + */ + "iconGalleryScanningCompleted"?: string; + /** + * Provide alternative invalid format icon which is used during drag and drop action. Every value that is placed here is passed as a value of `src` attribute to element. This attribute can be used to provide location, base64 or any URL of alternative icon. Image is scaled to 24x24 pixels. */ "iconInvalidFormat"?: string; /** - * Provide alternative loading icon. CSS rotation is applied to this icon. Every value that is placed here is passed as a value of `src` attribute to element. This attribute can be used to provide location, base64 or any URL of alternative gallery icon. Image is scaled to 24x24 pixels. + * Provide alternative loading icon. CSS rotation is applied to this icon. Every value that is placed here is passed as a value of `src` attribute to element. This attribute can be used to provide location, base64 or any URL of alternative icon. Image is scaled to 24x24 pixels. */ "iconSpinnerFromGalleryExperience"?: string; /** - * Provide alternative loading icon. CSS rotation is applied to this icon. Every value that is placed here is passed as a value of `src` attribute to element. This attribute can be used to provide location, base64 or any URL of alternative gallery icon. Image is scaled to 24x24 pixels. + * Provide alternative loading icon. CSS rotation is applied to this icon. Every value that is placed here is passed as a value of `src` attribute to element. This attribute can be used to provide location, base64 or any URL of alternative icon. Image is scaled to 24x24 pixels. */ "iconSpinnerScreenLoading"?: string; /** @@ -555,6 +706,10 @@ declare namespace LocalJSX { * Set custom translations for UI component. List of available translation keys can be found in `src/utils/translation.service.ts` file. */ "rawTranslations"?: string; + /** + * Amount of time in milliseconds before the recognition process is cancelled regardless of whether recognition was successful or not. This setting applies only to video recognition. Keep in mind that the timer starts after the first non-empty result. This behaviour ensures that the user has enough time to take out the document and place it in front of the camera device. + */ + "recognitionTimeout"?: number; /** * Specify recognizer options. This option can only bet set as a JavaScript property. Pass an object to `recognizerOptions` property where each key represents a recognizer, while the value represents desired recognizer options. ``` blinkId.recognizerOptions = { 'BlinkIdImageCaptureRecognizer': { // Enable scanning of both document sides 'captureBothDocumentSides': true, // Scan images of documents that have already been cropped and don't require detection 'scanCroppedDocumentImage': true } } ``` For a full list of available recognizer options see source code of a recognizer. For example, list of available recognizer options for BlinkIdImageCaptureRecognizer can be seen in the `src/Recognizers/BlinkID/ImageCapture/ImageCaptureRecognizer.ts` file. */ @@ -647,6 +802,10 @@ declare namespace LocalJSX { * Set to 'true' if default event should be prevented. */ "preventDefault"?: boolean; + /** + * Set to 'true' if button should enter 'selected' state. + */ + "selected"?: boolean; /** * Instance of TranslationService passed from root component. */ @@ -656,6 +815,20 @@ declare namespace LocalJSX { */ "visible"?: boolean; } + interface MbButtonClassic { + /** + * Set to 'true' if button should be disabled, and if click events should not be triggered. + */ + "disabled"?: boolean; + /** + * Event which is triggered when user clicks on button element. This event is not triggered when the button is disabled. + */ + "onButtonClick"?: (event: CustomEvent) => void; + /** + * Set to 'true' if default event should be prevented. + */ + "preventDefault"?: boolean; + } interface MbCameraExperience { /** * Api state passed from root component. @@ -665,6 +838,10 @@ declare namespace LocalJSX { * Camera horizontal state passed from root component. Horizontal camera image can be mirrored */ "cameraFlipped"?: boolean; + /** + * Emitted when user selects a different camera device. + */ + "onChangeCameraDevice"?: (event: CustomEvent) => void; /** * Emitted when user clicks on 'X' button. */ @@ -694,6 +871,44 @@ declare namespace LocalJSX { */ "type"?: CameraExperience; } + interface MbCameraSelection { + /** + * Emitted when user selects a different camera device. + */ + "onChangeCameraDevice"?: (event: CustomEvent) => void; + } + interface MbCameraToolbar { + /** + * Whether the camera is flipped, this property will be flip the relevant icon. + */ + "cameraFlipped"?: boolean; + /** + * Whether to show 'Camera flip' button. + */ + "enableCameraFlip"?: boolean; + /** + * Emitted when user selects a different camera device. + */ + "onChangeCameraDevice"?: (event: CustomEvent) => void; + /** + * Event which is triggered when close button is clicked. + */ + "onCloseEvent"?: (event: CustomEvent) => void; + /** + * Event which is triggered when flip camera button is clicked. + */ + "onFlipEvent"?: (event: CustomEvent) => void; + /** + * Set to `true` if close button should be displayed. + */ + "showClose"?: boolean; + } + interface MbCompleted { + /** + * Value of `src` attribute for element. + */ + "icon"?: string; + } interface MbComponent { /** * See description in public component. @@ -711,6 +926,14 @@ declare namespace LocalJSX { * See description in public component. */ "engineLocation"?: string; + /** + * See description in public component. + */ + "galleryDropType"?: 'FULLSCREEN' | 'INLINE'; + /** + * See description in public component. + */ + "galleryOverlayType"?: 'FULLSCREEN' | 'INLINE'; /** * See description in public component. */ @@ -731,6 +954,10 @@ declare namespace LocalJSX { * See description in public component. */ "iconGalleryDefault"?: string; + /** + * See description in public component. + */ + "iconGalleryScanningCompleted"?: string; /** * See description in public component. */ @@ -779,6 +1006,10 @@ declare namespace LocalJSX { * See event 'scanSuccess' in public component. */ "onScanSuccess"?: (event: CustomEvent) => void; + /** + * See description in public component. + */ + "recognitionTimeout"?: number; /** * See description in public component. */ @@ -840,6 +1071,20 @@ declare namespace LocalJSX { */ "visible"?: boolean; } + interface MbImageBox { + /** + * Text which should be displayed inside 'Add image' anchor element when file is not selected. + */ + "anchorText"?: string; + /** + * Text which represents name of the image. + */ + "boxTitle"?: string; + /** + * Event which is triggered when selected image file is changed. + */ + "onImageChange"?: (event: CustomEvent) => void; + } interface MbModal { /** * Passed body content from parent component @@ -892,10 +1137,15 @@ declare namespace LocalJSX { "blinkid-imagecapture-in-browser": BlinkidImagecaptureInBrowser; "mb-api-process-status": MbApiProcessStatus; "mb-button": MbButton; + "mb-button-classic": MbButtonClassic; "mb-camera-experience": MbCameraExperience; + "mb-camera-selection": MbCameraSelection; + "mb-camera-toolbar": MbCameraToolbar; + "mb-completed": MbCompleted; "mb-component": MbComponent; "mb-container": MbContainer; "mb-feedback": MbFeedback; + "mb-image-box": MbImageBox; "mb-modal": MbModal; "mb-overlay": MbOverlay; "mb-screen": MbScreen; @@ -909,10 +1159,15 @@ declare module "@stencil/core" { "blinkid-imagecapture-in-browser": LocalJSX.BlinkidImagecaptureInBrowser & JSXBase.HTMLAttributes; "mb-api-process-status": LocalJSX.MbApiProcessStatus & JSXBase.HTMLAttributes; "mb-button": LocalJSX.MbButton & JSXBase.HTMLAttributes; + "mb-button-classic": LocalJSX.MbButtonClassic & JSXBase.HTMLAttributes; "mb-camera-experience": LocalJSX.MbCameraExperience & JSXBase.HTMLAttributes; + "mb-camera-selection": LocalJSX.MbCameraSelection & JSXBase.HTMLAttributes; + "mb-camera-toolbar": LocalJSX.MbCameraToolbar & JSXBase.HTMLAttributes; + "mb-completed": LocalJSX.MbCompleted & JSXBase.HTMLAttributes; "mb-component": LocalJSX.MbComponent & JSXBase.HTMLAttributes; "mb-container": LocalJSX.MbContainer & JSXBase.HTMLAttributes; "mb-feedback": LocalJSX.MbFeedback & JSXBase.HTMLAttributes; + "mb-image-box": LocalJSX.MbImageBox & JSXBase.HTMLAttributes; "mb-modal": LocalJSX.MbModal & JSXBase.HTMLAttributes; "mb-overlay": LocalJSX.MbOverlay & JSXBase.HTMLAttributes; "mb-screen": LocalJSX.MbScreen & JSXBase.HTMLAttributes; diff --git a/ui/src/components/blinkid-imagecapture-in-browser/blinkid-imagecapture-in-browser.scss b/ui/src/components/blinkid-imagecapture-in-browser/blinkid-imagecapture-in-browser.scss index 9b979ca..41de0d5 100644 --- a/ui/src/components/blinkid-imagecapture-in-browser/blinkid-imagecapture-in-browser.scss +++ b/ui/src/components/blinkid-imagecapture-in-browser/blinkid-imagecapture-in-browser.scss @@ -6,4 +6,5 @@ :host { display: block; + width: 100%; } diff --git a/ui/src/components/blinkid-imagecapture-in-browser/blinkid-imagecapture-in-browser.tsx b/ui/src/components/blinkid-imagecapture-in-browser/blinkid-imagecapture-in-browser.tsx index 6146620..2f07b45 100644 --- a/ui/src/components/blinkid-imagecapture-in-browser/blinkid-imagecapture-in-browser.tsx +++ b/ui/src/components/blinkid-imagecapture-in-browser/blinkid-imagecapture-in-browser.tsx @@ -131,6 +131,18 @@ export class BlinkidImageCaptureInBrowser implements MicroblinkUI { */ @Prop() recognizerOptions: { [key: string]: any }; + /** + * Amount of time in milliseconds before the recognition process is cancelled regardless of + * whether recognition was successful or not. + * + * This setting applies only to video recognition. + * + * Keep in mind that the timer starts after the first non-empty result. This behaviour ensures + * that the user has enough time to take out the document and place it in front of the camera + * device. + */ + @Prop() recognitionTimeout: number; + /** * Set to 'false' if component should not enable drag and drop functionality. * @@ -181,6 +193,32 @@ export class BlinkidImageCaptureInBrowser implements MicroblinkUI { */ @Prop() thoroughScanFromImage: boolean = false; + /** + * Define whether to use 'FULLSCREEN' or 'INLINE' gallery overlay type. + * + * If 'FULLSCREEN' is used, when a user selects an image from which data should be extracted, an overlay will pop up + * and cover the whole screen. + * + * On the other hand, if 'INLINE' is used, there is no overlay but rather a 'Processing' message inside the UI + * component. + * + * Default value is 'INLINE'. + */ + @Prop() galleryOverlayType: 'FULLSCREEN' | 'INLINE' = 'INLINE'; + + /** + * Define whether to use 'FULLSCREEN' or 'INLINE' gallery dropdown type. + * + * If 'FULLSCREEN' is used, when a user drags an image over the UI component, an overlay will pop up and cover the + * whole screen. + * + * If 'INLINE' is used, there is no fullscreen overlay, but rather the overlay is restricted to the size of the UI + * component. + * + * Default value is 'INLINE'. + */ + @Prop() galleryDropType: 'FULLSCREEN' | 'INLINE' = 'INLINE'; + /** * Set to 'true' if text labels should be displayed below action buttons. * @@ -241,7 +279,7 @@ export class BlinkidImageCaptureInBrowser implements MicroblinkUI { * Provide alternative invalid format icon which is used during drag and drop action. * * Every value that is placed here is passed as a value of `src` attribute to element. This attribute can be - * used to provide location, base64 or any URL of alternative gallery icon. + * used to provide location, base64 or any URL of alternative icon. * * Image is scaled to 24x24 pixels. */ @@ -251,7 +289,7 @@ export class BlinkidImageCaptureInBrowser implements MicroblinkUI { * Provide alternative loading icon. CSS rotation is applied to this icon. * * Every value that is placed here is passed as a value of `src` attribute to element. This attribute can be - * used to provide location, base64 or any URL of alternative gallery icon. + * used to provide location, base64 or any URL of alternative icon. * * Image is scaled to 24x24 pixels. */ @@ -261,12 +299,23 @@ export class BlinkidImageCaptureInBrowser implements MicroblinkUI { * Provide alternative loading icon. CSS rotation is applied to this icon. * * Every value that is placed here is passed as a value of `src` attribute to element. This attribute can be - * used to provide location, base64 or any URL of alternative gallery icon. + * used to provide location, base64 or any URL of alternative icon. * * Image is scaled to 24x24 pixels. */ @Prop() iconSpinnerFromGalleryExperience: string; + /** + * Provide alternative completed icon. This icon is used when gallery scanning process is done, in case that + * `galleryOverlayType` property is set to `INLINE`. + * + * Every value that is placed here is passed as a value of `src` attribute to element. This attribute can be + * used to provide location, base64 or any URL of alternative icon. + * + * Image is scaled to 24x24 pixels. + */ + @Prop() iconGalleryScanningCompleted: string; + /** * Camera device ID passed from root component. * @@ -348,6 +397,7 @@ export class BlinkidImageCaptureInBrowser implements MicroblinkUI { this.finalTranslations = this.translations ? this.translations : rawTranslations; this.translationService = new TranslationService(this.finalTranslations || {}); + this.sdkService?.delete(); this.sdkService = new SdkService(); } @@ -363,11 +413,14 @@ export class BlinkidImageCaptureInBrowser implements MicroblinkUI { wasmType={ this.wasmType } recognizers={ this.finalRecognizers } recognizerOptions={ this.recognizerOptions } + recognitionTimeout={ this.recognitionTimeout } enableDrag={ this.enableDrag } hideLoadingAndErrorUi={ this.hideLoadingAndErrorUi } scanFromCamera={ this.scanFromCamera } scanFromImage={ this.scanFromImage } thoroughScanFromImage={ this.thoroughScanFromImage } + galleryOverlayType={ this.galleryOverlayType } + galleryDropType={ this.galleryDropType } showActionLabels={ this.showActionLabels } showModalWindows={ this.showModalWindows } iconCameraDefault={ this.iconCameraDefault} @@ -377,6 +430,7 @@ export class BlinkidImageCaptureInBrowser implements MicroblinkUI { iconInvalidFormat={ this.iconInvalidFormat } iconSpinnerScreenLoading={ this.iconSpinnerScreenLoading } iconSpinnerFromGalleryExperience={ this.iconSpinnerFromGalleryExperience } + iconGalleryScanningCompleted={ this.iconGalleryScanningCompleted } sdkService={ this.sdkService } translationService={ this.translationService } cameraId={ this.cameraId } diff --git a/ui/src/components/shared/mb-api-process-status/mb-api-process-status.scss b/ui/src/components/shared/mb-api-process-status/mb-api-process-status.scss index 57c219b..16e8338 100644 --- a/ui/src/components/shared/mb-api-process-status/mb-api-process-status.scss +++ b/ui/src/components/shared/mb-api-process-status/mb-api-process-status.scss @@ -33,8 +33,8 @@ color: #fff; background-color: map-get(map-get(map-get($base-colors, text-quaternary), onlight), foreground); - -webkit-backdrop-filter: blur(27px); - backdrop-filter: blur(27px); + -webkit-backdrop-filter: blur(var(--mb-blur-filter)); + backdrop-filter: blur(var(--mb-blur-filter)); border-radius: 2 * $base-unit; } diff --git a/ui/src/components/shared/mb-button-classic/mb-button-classic.scss b/ui/src/components/shared/mb-button-classic/mb-button-classic.scss new file mode 100644 index 0000000..50a4f8e --- /dev/null +++ b/ui/src/components/shared/mb-button-classic/mb-button-classic.scss @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microblink Ltd. All rights reserved. + */ + +@import "../styles/globals-sass"; + +:host { + box-sizing: border-box; + + display: block; + + a { + display: block; + + margin: 0; + padding: 0; + + width: 100%; + height: 2 * $padding-unit-large; + line-height: 2 * $padding-unit-large; + + color: var(--mb-component-button-classic-text-color); + background: var(--mb-component-button-classic-background); + + text-align: center; + text-decoration: none; + + font-family: var(--mb-font-family); + font-size: var(--mb-component-button-classic-font-size); + font-weight: var(--mb-component-button-classic-font-weight); + } + + a:hover, + a:active, + a:focus { + cursor: pointer; + } +} + +:host(.disabled) { + opacity: 0.5; + + a { + cursor: default; + } +} diff --git a/ui/src/components/shared/mb-button-classic/mb-button-classic.tsx b/ui/src/components/shared/mb-button-classic/mb-button-classic.tsx new file mode 100644 index 0000000..ec0839b --- /dev/null +++ b/ui/src/components/shared/mb-button-classic/mb-button-classic.tsx @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microblink Ltd. All rights reserved. + */ + +import { + Component, + Event, + EventEmitter, + Host, + h, + Prop +} from '@stencil/core'; + +@Component({ + tag: 'mb-button-classic', + styleUrl: 'mb-button-classic.scss', + shadow: true, +}) +export class MbButtonClassic { + + /** + * Set to 'true' if button should be disabled, and if click events should not be triggered. + */ + @Prop() disabled: boolean = false; + + /** + * Set to 'true' if default event should be prevented. + */ + @Prop() preventDefault: boolean = false; + + /** + * Event which is triggered when user clicks on button element. This event is not triggered + * when the button is disabled. + */ + @Event() buttonClick: EventEmitter; + + render() { + return ( + this.handleClick(ev) }> + + + + + ); + } + + private getClassNames(): string { + const classNames = []; + + if (this.disabled) { + classNames.push('disabled'); + } + + return classNames.join(' '); + } + + private handleClick(ev: UIEvent) { + if (this.preventDefault) { + ev.preventDefault(); + } + + if (this.disabled) { + ev.stopPropagation(); + return; + } + + this.buttonClick.emit(ev); + } +} diff --git a/ui/src/components/shared/mb-button-classic/test/mb-button-classic.e2e.ts b/ui/src/components/shared/mb-button-classic/test/mb-button-classic.e2e.ts new file mode 100644 index 0000000..0c76c69 --- /dev/null +++ b/ui/src/components/shared/mb-button-classic/test/mb-button-classic.e2e.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Microblink Ltd. All rights reserved. + */ + +import { newE2EPage } from '@stencil/core/testing'; + +describe('mb-button-classic', () => { + it('renders', async () => { + const page = await newE2EPage(); + await page.setContent(''); + + const element = await page.find('mb-button-classic'); + expect(element).toHaveClass('hydrated'); + }); +}); diff --git a/ui/src/components/shared/mb-button-classic/test/mb-button-classic.spec.tsx b/ui/src/components/shared/mb-button-classic/test/mb-button-classic.spec.tsx new file mode 100644 index 0000000..0cebb42 --- /dev/null +++ b/ui/src/components/shared/mb-button-classic/test/mb-button-classic.spec.tsx @@ -0,0 +1,22 @@ +/** + * Copyright (c) Microblink Ltd. All rights reserved. + */ + +import { newSpecPage } from '@stencil/core/testing'; +import { MbButtonClassic } from '../mb-button-classic'; + +describe('mb-button-classic', () => { + it('renders', async () => { + const page = await newSpecPage({ + components: [MbButtonClassic], + html: ``, + }); + expect(page.root).toEqualHtml(` + + + + + + `); + }); +}); diff --git a/ui/src/components/shared/mb-button/mb-button.scss b/ui/src/components/shared/mb-button/mb-button.scss index f429377..eeb2fe4 100644 --- a/ui/src/components/shared/mb-button/mb-button.scss +++ b/ui/src/components/shared/mb-button/mb-button.scss @@ -56,6 +56,13 @@ display: block; } +:host(.selected) { + a { + background-color: var(--mb-component-button-background-selected); + border-color: var(--mb-component-button-border-color-selected); + } +} + :host(.icon) { a { display: flex; @@ -86,8 +93,8 @@ padding-top: $padding-unit-medium; font-size: var(--mb-component-font-size); - font-weight: var(--mb-component-font-weight); - line-height: var(--mb-component-line-height); + font-weight: var(--mb-font-weight); + line-height: var(--mb-line-height); color: var(--mb-feedback-font-color-info); } diff --git a/ui/src/components/shared/mb-button/mb-button.tsx b/ui/src/components/shared/mb-button/mb-button.tsx index 83b7d5d..c623dc6 100644 --- a/ui/src/components/shared/mb-button/mb-button.tsx +++ b/ui/src/components/shared/mb-button/mb-button.tsx @@ -40,6 +40,11 @@ export class MbButton { */ @Prop() visible: boolean = false; + /** + * Set to 'true' if button should enter 'selected' state. + */ + @Prop() selected: boolean = false; + /** * Passed image from parent component. */ @@ -75,7 +80,10 @@ export class MbButton { render() { return ( - this.handleClick(ev) } ref={el => this.buttonElement = el as HTMLDivElement}> + this.handleClick(ev) } + ref={el => this.buttonElement = el as HTMLDivElement}> this.anchorElement = el as HTMLAnchorElement} href="javascript:void(0)"> { this.imageSrcDefault && this.imageAlt === 'action-alt-camera' && @@ -119,6 +127,10 @@ export class MbButton { classNames.push('visible'); } + if (this.selected) { + classNames.push('selected'); + } + return classNames.join(' '); } @@ -136,11 +148,15 @@ export class MbButton { } private handleMouseOver() { - if (!this.buttonElement.classList.contains('disabled')) this.iconElem.setAttribute('src', this.imageSrcActive); + if (!this.buttonElement.classList.contains('disabled')) { + this.iconElem.setAttribute('src', this.imageSrcActive); + } } private handleMouseOut() { - if (!this.buttonElement.classList.contains('disabled')) this.iconElem.setAttribute('src', this.imageSrcDefault); + if (!this.buttonElement.classList.contains('disabled')) { + this.iconElem.setAttribute('src', this.imageSrcDefault); + } } private iconElem: HTMLOrSVGImageElement; diff --git a/ui/src/components/shared/mb-camera-experience/mb-camera-experience.scss b/ui/src/components/shared/mb-camera-experience/mb-camera-experience.scss index a02ad8e..d69fd7b 100644 --- a/ui/src/components/shared/mb-camera-experience/mb-camera-experience.scss +++ b/ui/src/components/shared/mb-camera-experience/mb-camera-experience.scss @@ -5,7 +5,7 @@ @import "../styles/_globals-sass"; @import "../styles/_reticle"; -@import "../styles/_blinkcard-rectangle"; +@import "../styles/_payment-card-rectangle"; @import "../styles/_barcode-rectangle"; *::after, @@ -20,73 +20,24 @@ height: 112px; background: linear-gradient(180deg, rgba(0, 0, 0, 0.35625) 0%, rgba(0, 0, 0, 0.25) 20.83%, rgba(0, 0, 0, 0) 100%); - &.top { top: 0; } &.bottom { bottom: 0; transform: matrix(1, 0, 0, -1, 0, 0); } } - .controls { + mb-camera-toolbar { position: absolute; - width: 100%; - min-height: 100px; top: 0; + left: 0; + right: 0; z-index: 0; - - svg { - width: 24px; - height: 24px; - filter: drop-shadow(0px 1px 4px rgba(0, 0, 0, 0.4)); - } - - .close-button { - display: block; - position: absolute; - width: 24px; - height: 24px; - top: 54px; - right: 16px; - cursor: pointer; - } - - #flipBtn { - background-color: transparent; - background-size: auto; - position: absolute; - top: 54px; - left: 16px; - width: 24px; - height: 24px; - margin: 0; - padding: 0; - user-select: none; - border: 1px solid transparent; - outline: 0; - - transform-style: preserve-3d; - -webkit-perspective: 600px; - -ms-perspective: 600px; - -o-perspective: 600px; - perspective: 600px; - - -webkit-transition: 800ms; - -o-transition: 800ms; - transition: 800ms; - - cursor: pointer; - } - - #flipBtn.flipped { - -webkit-transform: rotateY(180deg); - -ms-transform: rotateY(180deg); - -o-transform: rotateY(180deg); - transform: rotateY(180deg); - } } } -:host(.is-error) .controls { display: none; } +:host(.is-error) mb-camera-toolbar { + display: none; +} :host::after { width: 92px + 30px; @@ -109,7 +60,7 @@ :host { #card-identity, #barcode, - #blinkcard { + #card-payment { position: absolute; top: 0; bottom: 0; @@ -131,15 +82,18 @@ margin: 0; padding: 2 * $base-unit 3 * $base-unit; - font-weight: 500; + font-size: 1em; + font-weight: 600; text-align: center; text-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1); white-space: nowrap; color: #fff; - background-color: map-get(map-get(map-get($base-colors, text-quaternary), onlight), foreground); - -webkit-backdrop-filter: blur(27px); - backdrop-filter: blur(27px); + background-color: rgba(map-get(map-get(map-get($base-colors, text-quaternary), onlight), foreground), 0.7); + + -webkit-backdrop-filter: blur(var(--mb-blur-filter)); + backdrop-filter: blur(var(--mb-blur-filter)); + border-radius: 2 * $base-unit; transition: all 200ms cubic-bezier(.42,.01,.35,1.74); @@ -155,8 +109,8 @@ top: 50%; left: 50%; - width: 96px; - height: 96px; + width: var(--mb-reticle-size); + height: var(--mb-reticle-size); transform-origin: center; transform: translate(-50%, -50%); @@ -184,7 +138,7 @@ } } - #blinkcard .rectangle-container { + #card-payment .rectangle-container { width: 100%; height: 100%; display: -ms-flexbox; @@ -264,7 +218,7 @@ } } - #blinkcard .rectangle-container .box.body { + #card-payment .rectangle-container .box.body { flex: 0 1 263px !important; .rectangle { flex: 0 1 374px !important; @@ -283,11 +237,6 @@ .gradient-overlay { height: 112px; } - .controls { - width: calc(100% - 100px); - left: 50px; - } - #barcode .rectangle-container { top: 112px; left: 50px; @@ -303,7 +252,7 @@ } } - #blinkcard .rectangle-container .box.body { + #card-payment .rectangle-container .box.body { flex: 0 1 472px !important; .rectangle { flex: 0 1 672px !important; @@ -322,11 +271,6 @@ .gradient-overlay { height: 112px; } - .controls { - width: calc(100% - 100px); - left: 50px; - } - #barcode .rectangle-container { top: 112px; left: 50px; @@ -342,7 +286,7 @@ } } - #blinkcard .rectangle-container .box.body { + #card-payment .rectangle-container .box.body { flex: 0 1 548px !important; .rectangle { flex: 0 1 780px !important; @@ -359,11 +303,6 @@ left: calc(50% - #{46px + 15px}); } - .controls { - width: calc(100% - 374px); - left: 188px; - } - .gradient-overlay { height: 112px; } #barcode .rectangle-container { @@ -381,7 +320,7 @@ } } - #blinkcard .rectangle-container .box.body { + #card-payment .rectangle-container .box.body { flex: 0 1 500px !important; .rectangle { flex: 0 1 712px !important; @@ -398,11 +337,6 @@ left: calc(50% - #{46px + 15px}); } - .controls { - width: calc(100% - 374px); - left: 188px; - } - .gradient-overlay { height: 112px; } #barcode .rectangle-container { @@ -420,7 +354,7 @@ } } - #blinkcard .rectangle-container .box.body { + #card-payment .rectangle-container .box.body { flex: 0 1 680px !important; .rectangle { flex: 0 1 968px !important; @@ -437,11 +371,6 @@ left: calc(50% - #{46px + 15px}); } - .controls { - width: calc(100% - 374px); - left: 188px; - } - .gradient-overlay { height: 112px; } #barcode .rectangle-container { @@ -459,7 +388,7 @@ } } - #blinkcard .rectangle-container .box.body { + #card-payment .rectangle-container .box.body { flex: 0 1 860px !important; .rectangle { flex: 0 1 1224px !important; @@ -479,7 +408,7 @@ .gradient-overlay { height: 88px; } - #blinkcard .rectangle-container .box.body { + #card-payment .rectangle-container .box.body { flex: 0 1 180px !important; .rectangle { flex: 0 1 260px !important; @@ -499,7 +428,7 @@ .gradient-overlay { height: 88px; } - #blinkcard .rectangle-container .box.body { + #card-payment .rectangle-container .box.body { flex: 0 1 240px !important; .rectangle { flex: 0 1 340px !important; @@ -518,7 +447,7 @@ .gradient-overlay { height: 88px;; } - #blinkcard .rectangle-container .box.body { + #card-payment .rectangle-container .box.body { flex: 0 1 300px !important; .rectangle { flex: 0 1 500px !important; @@ -537,7 +466,7 @@ .gradient-overlay { height: 88px;; } - #blinkcard .rectangle-container .box.body { + #card-payment .rectangle-container .box.body { flex: 0 1 300px !important; .rectangle { flex: 0 1 500px !important; diff --git a/ui/src/components/shared/mb-camera-experience/mb-camera-experience.tsx b/ui/src/components/shared/mb-camera-experience/mb-camera-experience.tsx index e39469e..134afd4 100644 --- a/ui/src/components/shared/mb-camera-experience/mb-camera-experience.tsx +++ b/ui/src/components/shared/mb-camera-experience/mb-camera-experience.tsx @@ -14,6 +14,7 @@ import { } from '@stencil/core'; import { + CameraEntry, CameraExperience, CameraExperienceState, CameraExperienceStateDuration @@ -74,6 +75,27 @@ export class MbCameraExperience { */ @Event() close: EventEmitter; + /** + * Emitted when user selects a different camera device. + */ + @Event() changeCameraDevice: EventEmitter; + + /** + * Change active camera. + */ + @Method() + async setActiveCamera(cameraId: string) { + this.cameraToolbar.setActiveCamera(cameraId); + } + + /** + * Populate list of camera devices. + */ + @Method() + async populateCameraDevices() { + await this.cameraToolbar.populateCameraDevices(); + } + @Watch('apiState') apiStateHandler(apiState: string, _oldValue: string) { if (apiState === '' && (this.type === CameraExperience.CardSingleSide || this.type === CameraExperience.CardCombined)) @@ -92,16 +114,9 @@ export class MbCameraExperience { */ @Method() async setCameraFlipState(isFlipped: boolean) { - if (isFlipped) - this.cameraFlipBtn.classList.add('flipped'); - else - this.cameraFlipBtn.classList.remove('flipped'); + this.cameraFlipped = isFlipped; } - - /** - * Set camera scanning state. - */ @Method() setState(state: CameraExperienceState, isBackSide: boolean = false, force: boolean = false): Promise { return new Promise((resolve) => { @@ -110,7 +125,6 @@ export class MbCameraExperience { return; } - this.cameraStateInProgress = true; let cameraStateChangeId = this.cameraStateChangeId + 1; this.cameraStateChangeId = cameraStateChangeId; @@ -130,9 +144,9 @@ export class MbCameraExperience { stateClass === 'is-detection' && this.showScanningLine ? this.scanningLineBarcode.classList.add('is-active') : this.scanningLineBarcode.classList.remove('is-active'); this.cameraCursorBarcode.setAttribute('class', `rectangle ${stateClass}`); break; - case CameraExperience.BlinkCard: - stateClass === 'is-default' && this.showScanningLine ? this.scanningLineBlinkCard.classList.add('is-active') : this.scanningLineBlinkCard.classList.remove('is-active'); - this.cameraCursorBlinkCard.setAttribute('class', `rectangle ${stateClass}`); + case CameraExperience.PaymentCard: + stateClass === 'is-default' && this.showScanningLine ? this.scanningLinePaymentCard.classList.add('is-active') : this.scanningLinePaymentCard.classList.remove('is-active'); + this.cameraCursorPaymentCard.setAttribute('class', `rectangle ${stateClass}`); break; } @@ -150,13 +164,35 @@ export class MbCameraExperience { }); } + @Method() + resetState(): Promise { + return new Promise((resolve) => { + // Reset flags + this.cameraStateChangeId = 0; + + this.cameraStateInProgress = false; + this.flipCameraStateInProgress = false; + + // Reset DOM + while (this.cameraMessageIdentityCard.firstChild) { + this.cameraMessageIdentityCard.removeChild(this.cameraMessageIdentityCard.firstChild); + } + + while (this.cameraMessagePaymentCard.firstChild) { + this.cameraMessagePaymentCard.removeChild(this.cameraMessagePaymentCard.firstChild); + } + while (this.cameraMessageBarcode.firstChild) { + this.cameraMessageBarcode.removeChild(this.cameraMessageBarcode.firstChild); + } + + resolve(); + }); + } render() { return ( -
- {/* Barcode camera experience */}
@@ -190,23 +226,23 @@ export class MbCameraExperience {
- {/* BlinkCard camera experience */} -
+ {/* PaymentCard camera experience */} +
-
this.cameraCursorBlinkCard = el as HTMLDivElement }> +
this.cameraCursorPaymentCard = el as HTMLDivElement }>
-
this.scanningLineBlinkCard = el as HTMLDivElement }>
+
this.scanningLinePaymentCard = el as HTMLDivElement }>
-

this.cameraMessageBlinkCard = el as HTMLParagraphElement }>

+

this.cameraMessagePaymentCard = el as HTMLParagraphElement }>

@@ -215,51 +251,40 @@ export class MbCameraExperience {
-
- { this.apiState !== 'error' && - this.handleStop(ev) } class="close-button"> - - - - - - } - - -
+ this.handleStop()} + onFlipEvent={() => this.flipCamera()} + onChangeCameraDevice={(ev: CustomEvent) => this.handleChangeCameraDevice(ev.detail)} + ref={ el => this.cameraToolbar = el as HTMLMbCameraToolbarElement } + > ); } private cameraCursorBarcode!: HTMLDivElement; private cameraCursorIdentityCard!: HTMLDivElement; - private cameraCursorBlinkCard!: HTMLDivElement; + private cameraCursorPaymentCard!: HTMLDivElement; private cameraMessageIdentityCard!: HTMLParagraphElement; - private cameraMessageBlinkCard!: HTMLParagraphElement; + private cameraMessagePaymentCard!: HTMLParagraphElement; private cameraMessageBarcode!: HTMLParagraphElement; - private cameraStateInProgress: boolean = false; + private cameraToolbar!: HTMLMbCameraToolbarElement; + private cardIdentityElement!: HTMLDivElement; + + // Flags private cameraStateChangeId: number = 0; - private cardIdentityElement: HTMLDivElement; - private cameraFlipBtn: HTMLButtonElement; + private cameraStateInProgress: boolean = false; private flipCameraStateInProgress: boolean = false; private scanningLineBarcode!: HTMLDivElement; - private scanningLineBlinkCard!: HTMLDivElement; + private scanningLinePaymentCard!: HTMLDivElement; private flipCamera(): void { this.flipCameraAction.emit(); } - private handleStop(ev: UIEvent) { - ev.preventDefault(); - ev.stopPropagation(); + private handleStop() { this.close.emit(); } @@ -313,23 +338,29 @@ export class MbCameraExperience { private setMessage(state: CameraExperienceState, isBackSide: boolean, type: CameraExperience): void { const message = this.getStateMessage(state, isBackSide, type); - switch(type) { + switch (type) { case CameraExperience.CardSingleSide: case CameraExperience.CardCombined: while (this.cameraMessageIdentityCard.firstChild) { this.cameraMessageIdentityCard.removeChild(this.cameraMessageIdentityCard.firstChild); } - if (message) this.cameraMessageIdentityCard.appendChild(message); + + if (message) { + this.cameraMessageIdentityCard.appendChild(message); + } this.cameraMessageIdentityCard.setAttribute('class', message && message !== null ? 'message is-active' : 'message'); break; - case CameraExperience.BlinkCard: - while (this.cameraMessageBlinkCard.firstChild) { - this.cameraMessageBlinkCard.removeChild(this.cameraMessageBlinkCard.firstChild); + case CameraExperience.PaymentCard: + while (this.cameraMessagePaymentCard.firstChild) { + this.cameraMessagePaymentCard.removeChild(this.cameraMessagePaymentCard.firstChild); } - if (message) this.cameraMessageBlinkCard.appendChild(message); - this.cameraMessageBlinkCard.setAttribute('class', message && message !== null ? 'message is-active' : 'message'); + if (message) { + this.cameraMessagePaymentCard.appendChild(message); + } + + this.cameraMessagePaymentCard.setAttribute('class', message && message !== null ? 'message is-active' : 'message'); break; case CameraExperience.Barcode: while (this.cameraMessageBarcode.firstChild) { @@ -337,7 +368,10 @@ export class MbCameraExperience { } if (this.showCameraFeedbackBarcodeMessage) { - if (message) this.cameraMessageBarcode.appendChild(message); + if (message) { + this.cameraMessageBarcode.appendChild(message); + } + this.cameraMessageBarcode.setAttribute('class', message && message !== null ? 'message is-active' : 'message'); } break; @@ -400,4 +434,8 @@ export class MbCameraExperience { return null; } } + + private handleChangeCameraDevice(camera: CameraEntry) { + this.changeCameraDevice.emit(camera); + } } diff --git a/ui/src/components/shared/mb-camera-selection/mb-camera-selection.scss b/ui/src/components/shared/mb-camera-selection/mb-camera-selection.scss new file mode 100644 index 0000000..c432feb --- /dev/null +++ b/ui/src/components/shared/mb-camera-selection/mb-camera-selection.scss @@ -0,0 +1,180 @@ +/** + * Copyright (c) Microblink Ltd. All rights reserved. + */ + +@import "../styles/_globals-sass"; + +:host { + box-sizing: border-box; + + display: block; + position: relative; + + padding: $padding-unit-small 0; + + font-family: inherit; + font-size: var(--mb-font-size); + + .active-camera { + box-sizing: border-box; + + display: block; + + // Width + border + width: var(--mb-toolbar-selection-width); + + // Line height + padding + border + height: calc(var(--mb-line-height) + #{ $padding-unit-small * 2 } + 2px); + + margin: 0 auto; + + color: var(--mb-toolbar-color); + line-height: var(--mb-line-height); + + text-align: center; + text-decoration: none; + + border: 1px solid transparent; + border-radius: var(--mb-toolbar-border-radius); + + .icon, + .name { + display: inline-block; + vertical-align: middle; + } + + .icon { + width: 20px; + height: 20px; + + svg { + width: 20px; + height: 20px; + } + } + + .name { + // width = 100% - padding width - 2 * width of an icon + max-width: calc(100% - #{ 2 * $padding-unit-medium } - 40px); + + padding: 0 $padding-unit-medium 0 $padding-unit-small; + + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + // States + & { + padding: $padding-unit-small $padding-unit-large; + background-color: transparent; + } + + &:hover, + &:active, + &:focus { + background-color: rgba(map-get(map-get(map-get($base-colors, text-secondary), onlight), foreground), 0.3); + } + + &:hover { + + } + + &.active, + &:active, + &:focus { + padding: $padding-unit-small $padding-unit-large; + border-color: var(--mb-toolbar-border-color); + } + } + + #list-background { + display: none; + + position: fixed; + top: 0; + left: 0; + + width: 100vw; + height: 100vh; + + &.visible { + display: block; + } + } + + .list { + display: none; + + position: absolute; + top: calc(var(--mb-font-size) * 1.5 + #{ $padding-unit-small * 2 * 2 }); + left: calc(50% - var(--mb-toolbar-selection-width) / 2); + + width: var(--mb-toolbar-selection-width); + + padding: 0; + + background-color: var(--mb-toolbar-list-background); + border-radius: var(--mb-toolbar-border-radius); + box-shadow: var(--mb-toolbar-list-shadow); + + &.visible { + display: block; + } + + svg, + .name, + .spacer { + display: inline-block; + vertical-align: middle; + } + + .spacer, + svg { + width: 24px; + height: 20px; + } + + .name { + max-width: calc(100% - 24px); + + overflow: hidden; + text-overflow: ellipsis; + } + + ul { + margin: 0; + padding: $padding-unit-medium 0; + + list-style: none; + + a { + display: block; + text-align: left; + + color: inherit; + text-decoration: none; + } + + li { + display: block; + + padding: $padding-unit-small $padding-unit-large; + line-height: var(--mb-line-height); + + &.active { + color: map-get(map-get(map-get($base-colors, primary-blue), onlight), background); + } + + &:last-child { + padding-bottom: 0; + } + + &:hover, + &:focus { + background-color: rgba(map-get(map-get(map-get($base-colors, fill-quaternary), onlight), foreground), 0.08); + } + } + } + } +} diff --git a/ui/src/components/shared/mb-camera-selection/mb-camera-selection.tsx b/ui/src/components/shared/mb-camera-selection/mb-camera-selection.tsx new file mode 100644 index 0000000..b0c581f --- /dev/null +++ b/ui/src/components/shared/mb-camera-selection/mb-camera-selection.tsx @@ -0,0 +1,146 @@ +/** + * Copyright (c) Microblink Ltd. All rights reserved. + */ + +import { + Component, + Event, + EventEmitter, + Host, + h, + Method, + State +} from '@stencil/core'; + +import { CameraEntry } from '../../../utils/data-structures'; +import { getCameraDevices } from '../../../utils/sdk.service'; + +@Component({ + tag: 'mb-camera-selection', + styleUrl: 'mb-camera-selection.scss', + shadow: true, +}) +export class MbCameraSelection { + + /** + * Emitted when user selects a different camera device. + */ + @Event() changeCameraDevice: EventEmitter; + + /** + * Change active camera. + */ + @Method() + async setActiveCamera(cameraId: string) { + const camera = this.cameraList.find((el: CameraEntry) => el.details.deviceId === cameraId); + + if (!camera) { + return; + } + + this.activeCamera = camera; + } + + /** + * Populate list of camera devices. + */ + @Method() + async populateCameraDevices() { + try { + const devices = await getCameraDevices(); + this.cameraList = devices; + } + catch (error) { + // Camera access error is handled by the video recognizer. + this.cameraList = []; + } + } + + render() { + const cameraListElements = this.cameraList.map((camera: CameraEntry) => { + const isActive = this.activeCamera?.details?.deviceId === camera.details.deviceId; + + let classValue = ''; + let content = ( ) + + if (isActive) { + classValue = 'active'; + content = ( + + + + ) + } + + return ( +
  • + this.handleCameraSelection(ev, camera) }> + { content } + { camera.prettyName } + +
  • + ) + }); + + return ( + + this.handleListOpen(ev) }> + + + + + + + { this.activeCamera.prettyName } + + + + + + +
    this.setListVisibility(false) } + >
    +
    +
      + { cameraListElements } +
    +
    +
    + ); + } + + @State() activeCamera: CameraEntry = { + prettyName: '-', + details: { deviceId: -1 } + }; + + @State() cameraList: Array = []; + @State() isListVisible: boolean = false; + + private handleListOpen(ev: UIEvent) { + ev.preventDefault(); + ev.stopPropagation(); + this.setListVisibility(!this.isListVisible); + } + + private handleCameraSelection(ev: UIEvent, camera: CameraEntry) { + ev.preventDefault(); + ev.stopPropagation(); + this.changeCameraDevice.emit(camera); + this.activeCamera = camera; + this.setListVisibility(false); + } + + private setListVisibility(visible: boolean) { + this.isListVisible = visible; + } +} diff --git a/ui/src/components/shared/mb-camera-selection/test/mb-camera-selection.e2e.ts b/ui/src/components/shared/mb-camera-selection/test/mb-camera-selection.e2e.ts new file mode 100644 index 0000000..47389fe --- /dev/null +++ b/ui/src/components/shared/mb-camera-selection/test/mb-camera-selection.e2e.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Microblink Ltd. All rights reserved. + */ + +import { newE2EPage } from '@stencil/core/testing'; + +describe('mb-camera-selection', () => { + it('renders', async () => { + const page = await newE2EPage(); + await page.setContent(''); + + const element = await page.find('mb-camera-selection'); + expect(element).toHaveClass('hydrated'); + }); +}); diff --git a/ui/src/components/shared/mb-camera-selection/test/mb-camera-selection.spec.tsx b/ui/src/components/shared/mb-camera-selection/test/mb-camera-selection.spec.tsx new file mode 100644 index 0000000..e693064 --- /dev/null +++ b/ui/src/components/shared/mb-camera-selection/test/mb-camera-selection.spec.tsx @@ -0,0 +1,22 @@ +/** + * Copyright (c) Microblink Ltd. All rights reserved. + */ + +import { newSpecPage } from '@stencil/core/testing'; +import { MbCameraSelection } from '../mb-camera-selection'; + +describe('mb-camera-selection', () => { + it('renders', async () => { + const page = await newSpecPage({ + components: [MbCameraSelection], + html: ``, + }); + expect(page.root).toEqualHtml(` + + + + + + `); + }); +}); diff --git a/ui/src/components/shared/mb-camera-toolbar/mb-camera-toolbar.scss b/ui/src/components/shared/mb-camera-toolbar/mb-camera-toolbar.scss new file mode 100644 index 0000000..cd3fc20 --- /dev/null +++ b/ui/src/components/shared/mb-camera-toolbar/mb-camera-toolbar.scss @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microblink Ltd. All rights reserved. + */ + +@import "../styles/_globals-sass"; + +:host { + width: 100%; + + padding-top: $padding-unit-large; + + background-color: rgba(map-get(map-get(map-get($base-colors, text-secondary), onlight), foreground), 0.7); + -webkit-backdrop-filter: blur(var(--mb-blur-filter)); + backdrop-filter: blur(var(--mb-blur-filter)); + + header { + display: flex; + flex-wrap: wrap; + + padding: 0 $padding-unit-large; + } + + header > * { + display: block; + + flex-grow: 1; + } + + .camera-selection-wrapper { + width: calc(100% - 3em); + } + + mb-camera-selection { + display: none; + + &.visible { + display: block; + } + } +} + +@media only screen and (min-width: $breakpoint-width-tablet) { + :host { + padding-top: 0; + + header { + padding-left: #{ $padding-unit-large * 2 }; + padding-right: #{ $padding-unit-large * 2 }; + } + } +} + +@media only screen and (min-width: $breakpoint-width-laptop-1280) { + :host { + header { + max-width: 1024px; + margin: 0 auto; + padding-left: 0; + padding-right: 0; + } + } +} + +/** + * Toolbar buttons + */ +$button-size: calc(var(--mb-font-size) * 1.5); + +:host { + .toolbar-button { + width: $button-size; + height: $button-size; + padding: $padding-unit-medium 0; + + cursor: pointer; + + svg { + width: $button-size; + height: $button-size; + + border: 1px solid transparent; + border-radius: var(--mb-toolbar-border-radius); + + filter: drop-shadow(0px 1px 4px rgba(0, 0, 0, 0.4)); + } + + &:hover { + svg { + background-color: rgba(map-get(map-get(map-get($base-colors, text-secondary), onlight), foreground), 0.3); + box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1); + } + } + + &:focus, + &:active { + svg { + border-color: var(--mb-toolbar-border-color); + } + } + } + + .close-button { + } + + .flip-button { + transform-style: preserve-3d; + -webkit-perspective: 600px; + -ms-perspective: 600px; + -o-perspective: 600px; + perspective: 600px; + + -webkit-transition: 800ms; + -o-transition: 800ms; + transition: 800ms; + + &.flipped { + -webkit-transform: rotateY(180deg); + -ms-transform: rotateY(180deg); + -o-transform: rotateY(180deg); + transform: rotateY(180deg); + } + } +} diff --git a/ui/src/components/shared/mb-camera-toolbar/mb-camera-toolbar.tsx b/ui/src/components/shared/mb-camera-toolbar/mb-camera-toolbar.tsx new file mode 100644 index 0000000..446a504 --- /dev/null +++ b/ui/src/components/shared/mb-camera-toolbar/mb-camera-toolbar.tsx @@ -0,0 +1,159 @@ +/** + * Copyright (c) Microblink Ltd. All rights reserved. + */ + +import { + Component, + Event, + EventEmitter, + Host, + h, + Method, + Prop, + State +} from '@stencil/core'; + +import { CameraEntry } from '../../../utils/data-structures'; +import * as DeviceHelpers from '../../../utils/device.helpers'; + +@Component({ + tag: 'mb-camera-toolbar', + styleUrl: 'mb-camera-toolbar.scss', + shadow: true +}) +export class MbCameraToolbar { + + /** + * Set to `true` if close button should be displayed. + */ + @Prop() showClose: boolean = false; + + /** + * Whether to show 'Camera flip' button. + */ + @Prop() enableCameraFlip: boolean = false; + + /** + * Whether the camera is flipped, this property will be flip the relevant icon. + */ + @Prop() cameraFlipped: boolean = false; + + /** + * Event which is triggered when close button is clicked. + */ + @Event() closeEvent: EventEmitter; + + /** + * Event which is triggered when flip camera button is clicked. + */ + @Event() flipEvent: EventEmitter; + + /** + * Emitted when user selects a different camera device. + */ + @Event() changeCameraDevice: EventEmitter; + + /** + * Change active camera. + */ + @Method() + async setActiveCamera(cameraId: string) { + this.cameraSelection.setActiveCamera(cameraId); + } + + /** + * Populate list of camera devices. + */ + @Method() + async populateCameraDevices() { + await this.cameraSelection.populateCameraDevices(); + } + + async connectedCallback() { + window.addEventListener('resize', this.handleResize.bind(this), false); + } + + async componentDidRender() { + this.handleResize(); + } + + async disconnectedCallback() { + window.removeEventListener('resize', this.handleResize.bind(this), false); + } + + render() { + let flipButton = ''; + + if (this.enableCameraFlip) { + flipButton = ( + this.handleFlip(ev) }> + + + + + + + + ) + } + + let closeButton = ''; + + if (this.showClose) { + closeButton = ( + this.handleClose(ev) }> + + + + + + ) + } + + return ( + +
    + { flipButton } +
    + ) => this.handleChangeCameraDevice(ev.detail)} + class={ this.isDesktop ? 'visible' : '' } + ref={ el => this.cameraSelection = el as HTMLMbCameraSelectionElement } + > +
    + { closeButton } +
    +
    + ); + } + + @State() isDesktop: boolean = DeviceHelpers.isDesktop(); + + private cameraSelection!: HTMLMbCameraSelectionElement; + + private handleClose(ev: UIEvent) { + ev.preventDefault(); + ev.stopPropagation(); + this.closeEvent.emit(); + } + + private handleFlip(ev: UIEvent) { + ev.preventDefault(); + ev.stopPropagation(); + this.flipEvent.emit(); + } + + private handleResize() { + this.isDesktop = DeviceHelpers.isDesktop(); + } + + private handleChangeCameraDevice(camera: CameraEntry) { + this.changeCameraDevice.emit(camera); + } +} diff --git a/ui/src/components/shared/mb-camera-toolbar/test/mb-camera-toolbar.e2e.ts b/ui/src/components/shared/mb-camera-toolbar/test/mb-camera-toolbar.e2e.ts new file mode 100644 index 0000000..f9f0e98 --- /dev/null +++ b/ui/src/components/shared/mb-camera-toolbar/test/mb-camera-toolbar.e2e.ts @@ -0,0 +1,14 @@ +/** + * Copyright (c) Microblink Ltd. All rights reserved. + */ +import { newE2EPage } from '@stencil/core/testing'; + +describe('mb-camera-toolbar', () => { + it('renders', async () => { + const page = await newE2EPage(); + await page.setContent(''); + + const element = await page.find('mb-camera-toolbar'); + expect(element).toHaveClass('hydrated'); + }); +}); diff --git a/ui/src/components/shared/mb-camera-toolbar/test/mb-camera-toolbar.spec.tsx b/ui/src/components/shared/mb-camera-toolbar/test/mb-camera-toolbar.spec.tsx new file mode 100644 index 0000000..49d125a --- /dev/null +++ b/ui/src/components/shared/mb-camera-toolbar/test/mb-camera-toolbar.spec.tsx @@ -0,0 +1,21 @@ +/** + * Copyright (c) Microblink Ltd. All rights reserved. + */ +import { newSpecPage } from '@stencil/core/testing'; +import { MbCameraToolbar } from '../mb-camera-toolbar'; + +describe('mb-camera-toolbar', () => { + it('renders', async () => { + const page = await newSpecPage({ + components: [MbCameraToolbar], + html: ``, + }); + expect(page.root).toEqualHtml(` + + + + + + `); + }); +}); diff --git a/ui/src/components/shared/mb-completed/mb-completed.scss b/ui/src/components/shared/mb-completed/mb-completed.scss new file mode 100644 index 0000000..9dab8e7 --- /dev/null +++ b/ui/src/components/shared/mb-completed/mb-completed.scss @@ -0,0 +1,17 @@ +/** + * Copyright (c) Microblink Ltd. All rights reserved. + */ + +@import "../styles/_globals-sass"; + +:host { + display: block; + + padding: 0; + + img { + display: block; + width: 24px; + height: 24px; + } +} diff --git a/ui/src/components/shared/mb-completed/mb-completed.tsx b/ui/src/components/shared/mb-completed/mb-completed.tsx new file mode 100644 index 0000000..90c55eb --- /dev/null +++ b/ui/src/components/shared/mb-completed/mb-completed.tsx @@ -0,0 +1,27 @@ +/** + * Copyright (c) Microblink Ltd. All rights reserved. + */ + +import { Component, Host, h, Prop } from '@stencil/core'; + +@Component({ + tag: 'mb-completed', + styleUrl: 'mb-completed.scss', + shadow: true, +}) +export class MbCompleted { + + /** + * Value of `src` attribute for element. + */ + @Prop() icon: string = 'data:image/svg+xml;utf8,'; + + render() { + return ( + + + + ); + } + +} diff --git a/ui/src/components/shared/mb-completed/test/mb-completed.e2e.ts b/ui/src/components/shared/mb-completed/test/mb-completed.e2e.ts new file mode 100644 index 0000000..abfc82a --- /dev/null +++ b/ui/src/components/shared/mb-completed/test/mb-completed.e2e.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Microblink Ltd. All rights reserved. + */ + +import { newE2EPage } from '@stencil/core/testing'; + +describe('mb-completed', () => { + it('renders', async () => { + const page = await newE2EPage(); + await page.setContent(''); + + const element = await page.find('mb-completed'); + expect(element).toHaveClass('hydrated'); + }); +}); diff --git a/ui/src/components/shared/mb-completed/test/mb-completed.spec.tsx b/ui/src/components/shared/mb-completed/test/mb-completed.spec.tsx new file mode 100644 index 0000000..00865ae --- /dev/null +++ b/ui/src/components/shared/mb-completed/test/mb-completed.spec.tsx @@ -0,0 +1,22 @@ +/** + * Copyright (c) Microblink Ltd. All rights reserved. + */ + +import { newSpecPage } from '@stencil/core/testing'; +import { MbCompleted } from '../mb-completed'; + +describe('mb-completed', () => { + it('renders', async () => { + const page = await newSpecPage({ + components: [MbCompleted], + html: ``, + }); + expect(page.root).toEqualHtml(` + + + + + + `); + }); +}); diff --git a/ui/src/components/shared/mb-component/mb-component.scss b/ui/src/components/shared/mb-component/mb-component.scss index 9266a74..d845549 100644 --- a/ui/src/components/shared/mb-component/mb-component.scss +++ b/ui/src/components/shared/mb-component/mb-component.scss @@ -9,16 +9,16 @@ position: relative; display: block; - width: 100%; + width: var(--mb-component-width); background: var(--mb-component-background); color: var(--mb-component-font-color); - font-size: var(--mb-component-font-size); - font-style: var(--mb-component-font-style); - font-weight: var(--mb-component-font-weight); - letter-spacing: var(--mb-component-letter-spacing); - line-height: var(--mb-component-line-height); + font-size: var(--mb-font-size); + font-style: var(--mb-font-style); + font-weight: var(--mb-font-weight); + letter-spacing: var(--mb-letter-spacing); + line-height: var(--mb-line-height); text-transform: var(--mb-component-text-transform); border-color: var(--mb-component-border-color); @@ -27,6 +27,20 @@ border-width: var(--mb-component-border-width); box-shadow: var(--mb-component-box-shadow); + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +@media only screen and (min-width: $breakpoint-width-laptop-1440) { + :host { + font-size: var(--mb-font-size-desktop); + } +} + +.flex-break { + flex-basis: 100%; + width: 0; } /** @@ -40,14 +54,42 @@ padding: $padding-unit-large; } +:host #screen-error.visible { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + + .icon-alert { + display: flex; + margin-right: 10px; + } +} + +:host #screen-error:not(.visible), +:host #screen-action:not(.visible), +:host #screen-loading:not(.visible), +:host #screen-processing:not(.visible) { + :host & { + border: none; + } +} + +/** + * Action screen + */ :host #screen-action.visible { display: flex; + flex-wrap: wrap; justify-content: space-between; align-items: center; .action-label { display: var(--mb-component-action-label); margin: 0 $padding-unit-large 0 0; + cursor: default; + + font-size: var(--mb-component-action-label-font-size); &:dir(rtl) { background-color: black; @@ -63,6 +105,41 @@ margin: var(--mb-component-action-buttons-last-margin); } } + + .combined-image-upload { + display: none; + width: 100%; + padding: 0; + + &.visible { + display: block; + padding: $padding-unit-medium 0; + } + + mb-image-box, + mb-button-classic { + display: block; + box-sizing: border-box; + float: left; + } + + mb-image-box { + width: calc(50% - #{$padding-unit-small}); + + &:nth-of-type(1) { + margin-right: $padding-unit-small; + } + + &:nth-of-type(2) { + margin-left: $padding-unit-small; + } + } + + mb-button-classic { + width: 100%; + margin-top: $padding-unit-medium; + } + } } :host([dir="rtl"]) #screen-action.visible { @@ -77,23 +154,42 @@ } } -:host #screen-error.visible { + +/** + * Processing screen + */ +:host #screen-processing.visible { +} + +:host #screen-processing p { + display: none; + margin: $padding-unit-medium 0; +} + +:host #screen-processing p.visible { display: flex; flex-direction: row; align-items: center; justify-content: center; +} - .icon-alert { - display: flex; - margin-right: 10px; +:host #screen-processing p.in-progress { + color: var(--mb-component-font-color-secondary); +} + +:host #screen-processing p.done { + color: var(--mb-component-font-color); +} + +:host #screen-processing[data-type="single"] p { + span { + margin-left: $padding-unit-medium; } } -:host #screen-error:not(.visible), -:host #screen-action:not(.visible), -:host #screen-loading:not(.visible) { - :host & { - border: none; +:host #screen-processing[data-type="combined"] p { + span { + margin-left: $padding-unit-medium; } } @@ -118,41 +214,51 @@ text-align: center; color: var(--mb-component-font-color); - font-size: var(--mb-component-font-size); - font-style: var(--mb-component-font-style); - font-weight: var(--mb-component-font-weight); - letter-spacing: var(--mb-component-letter-spacing); - line-height: var(--mb-component-line-height); + font-size: var(--mb-font-size); + font-style: var(--mb-font-style); + font-weight: var(--mb-font-weight); + letter-spacing: var(--mb-letter-spacing); + line-height: var(--mb-line-height); text-transform: var(--mb-component-text-transform); } -} -:host #overlay-drag-and-drop.visible { - background-color: var(--mb-overlay-draganddrop-background); -} + &.visible { + background-color: var(--mb-overlay-draganddrop-background); + } -:host #overlay-drag-and-drop.visible.error { - background-color: var(--mb-overlay-draganddrop-background-error); -} + &.visible.error { + background-color: var(--mb-overlay-draganddrop-background-error); + } -:host #overlay-drag-and-drop.non-fullscreen.visible { - flex-direction: row; + &.inline { + position: absolute; - background-color: var(--mb-component-background); + flex-direction: row; - border-color: var(--mb-component-border-color); - border-radius: var(--mb-component-border-radius); - border-style: var(--mb-component-border-style); - border-width: var(--mb-component-border-width); + .drag-and-drop-message { + margin: 0 0 0 $padding-unit-medium; + } - .drag-and-drop-message { - margin: 0 0 0 $padding-unit-medium; - } -} + border-style: var(--mb-overlay-draganddrop-border-style); + border-radius: var(--mb-component-border-radius); + border-width: var(--mb-component-border-width); + + &.visible { + border-color: var(--mb-overlay-draganddrop-border-color); + } -:host #overlay-drag-and-drop.non-fullscreen.visible.error { - border-color: var(--mb-overlay-draganddrop-border-color-error); - border-style: var(--mb-overlay-draganddrop-border-style-error); + &.visible.error { + border-color: var(--mb-overlay-draganddrop-border-color-error); + + .drag-and-drop-icon { + margin-left: $padding-unit-large; + } + + .drag-and-drop-message { + text-align: left; + } + } + } } :host #drag-and-drop-zone { @@ -182,10 +288,17 @@ } :host #overlay-camera-experience { + width: 100vw; + height: 100%; + min-height: 100vh; + min-height: -webkit-fill-available; + overflow: hidden; + justify-content: center; align-items: center; background-color: #000; + overflow-y: hidden; .holder { position: relative; diff --git a/ui/src/components/shared/mb-component/mb-component.tsx b/ui/src/components/shared/mb-component/mb-component.tsx index 0957abb..1e2fb08 100644 --- a/ui/src/components/shared/mb-component/mb-component.tsx +++ b/ui/src/components/shared/mb-component/mb-component.tsx @@ -4,35 +4,39 @@ import { Component, + Element, Event, EventEmitter, Host, h, - Prop, - Element, - Method + Method, + Prop } from '@stencil/core'; import * as BlinkIDImageCaptureSDK from '../../../../../es/blinkid-imagecapture-sdk'; import { + CameraEntry, CameraExperienceState, Code, + CombinedImageRecognitionConfiguration, + CombinedImageType, EventFatalError, EventReady, EventScanError, EventScanSuccess, FeedbackCode, FeedbackMessage, + ImageRecognitionConfiguration, + ImageRecognitionType, RecognitionEvent, RecognitionStatus, - ImageRecognitionConfiguration, VideoRecognitionConfiguration } from '../../../utils/data-structures'; import { - SdkService, - CheckConclusion + CheckConclusion, + SdkService } from '../../../utils/sdk.service'; import { TranslationService } from '../../../utils/translation.service'; @@ -77,6 +81,11 @@ export class MbComponent { */ @Prop({ mutable: true }) recognizerOptions: { [key: string]: any }; + /** + * See description in public component. + */ + @Prop() recognitionTimeout: number; + /** * See description in public component. */ @@ -107,11 +116,22 @@ export class MbComponent { */ @Prop() scanFromImage: boolean = true; + /** * See description in public component. */ @Prop() thoroughScanFromImage: boolean = false; + /** + * See description in public component. + */ + @Prop() galleryOverlayType: 'FULLSCREEN' | 'INLINE' = 'INLINE'; + + /** + * See description in public component. + */ + @Prop() galleryDropType: 'FULLSCREEN' | 'INLINE' = 'INLINE'; + /** * See description in public component. */ @@ -167,6 +187,11 @@ export class MbComponent { */ @Prop() iconSpinnerFromGalleryExperience: string; + /** + * See description in public component. + */ + @Prop() iconGalleryScanningCompleted: string; + /** * Instance of SdkService passed from root component. */ @@ -343,8 +368,9 @@ export class MbComponent { disabled={false} preventDefault={false} visible={false} + selected={false} icon={true} - onButtonClick={() => this.scanFromImageInput.click()} + onButtonClick={() => this.onFromImageClicked()} imageSrcDefault={this.iconGalleryDefault} imageSrcActive={this.iconGalleryActive} imageAlt="action-alt-gallery" @@ -352,15 +378,46 @@ export class MbComponent { >
    +
    +
    + this.imageBoxFirst = el as HTMLMbImageBoxElement} + box-title={this.translationService.i('process-image-box-first').toString()} + anchor-text={this.translationService.i('process-image-box-add').toString()} + onImageChange={(ev: CustomEvent) => this.onCombinedImageChange(ev.detail, CombinedImageType.First)}> + this.imageBoxSecond = el as HTMLMbImageBoxElement} + box-title={this.translationService.i('process-image-box-second').toString()} + anchor-text={this.translationService.i('process-image-box-add').toString()} + onImageChange={(ev: CustomEvent) => this.onCombinedImageChange(ev.detail, CombinedImageType.Second)}> + this.combinedScanFromImageButton = el as HTMLMbButtonClassicElement} + disabled={true} + onButtonClick={() => this.startScanFromImageCombined()} + >{this.translationService.i('process-image-upload-cta').toString()} +
    + + this.screens.processing = el as HTMLMbScreenElement} + > +

    + + {this.translationService.i('process-image-message-inline').toString()} +

    +

    + + {this.translationService.i('process-image-message-inline-done').toString()} +

    this.overlays.draganddrop = el as HTMLMbOverlayElement} > -

    +

    Whoops, we don't support that image format. Please upload a JPEG or PNG file.

    this.dragAndDropZone = el as HTMLDivElement}>
    this.stopRecognition()} onFlipCameraAction={() => this.flipCameraAction()} + onChangeCameraDevice={(ev: CustomEvent) => this.changeCameraDevice(ev.detail)} class="overlay-camera-element" > { await this.sdkService.flipCamera(); @@ -577,7 +658,16 @@ export class MbComponent { this.cameraExperience.setCameraFlipState(cameraFlipped); } - /* Helper methods */ + private async changeCameraDevice(camera: CameraEntry) { + if (this.cameraChangeInProgress) { + return; + } + + this.cameraChangeInProgress = true; + await this.sdkService.changeCameraDevice(camera.details); + this.cameraChangeInProgress = false; + } + private async checkInputProperties(): Promise { if (!this.licenseKey) { this.setFatalError(new EventFatalError(Code.MissingLicenseKey, 'Missing license key!')); @@ -617,15 +707,28 @@ export class MbComponent { configuration.recognizerOptions = this.recognizerOptions; } + if (this.recognitionTimeout && typeof this.recognitionTimeout === 'number') { + configuration.recognitionTimeout = this.recognitionTimeout; + } + this.isBackSide = false; const eventHandler = (recognitionEvent: RecognitionEvent) => { switch (recognitionEvent.status) { case RecognitionStatus.Preparing: + this.feedback.emit({ + code: FeedbackCode.ScanStarted, + state: 'FEEDBACK_OK', + message: '' + }); this.showOverlay('camera'); this.cameraExperience.setState(CameraExperienceState.Default); break; + case RecognitionStatus.Ready: + this.cameraExperience.setActiveCamera(this.sdkService.videoRecognizer.deviceId); + break; + case RecognitionStatus.Processing: // Just keep working break; @@ -720,28 +823,24 @@ export class MbComponent { case RecognitionStatus.ScanSuccessful: /* Which recognizer is it? ImageCapture or some other? * - * Image capture has the 'imageCapture' flag set to true, we do not want to close camera overlay after image + * ImageCapture has the 'imageCapture' flag set to true, we do not want to close camera overlay after image * acquisition process is finished. Cause maybe backend service will failed and we can press retry to resume * with the same video recognizer and try again */ if (!recognitionEvent.data.imageCapture) { this.cameraExperience.setState(CameraExperienceState.DoneAll, false, true) .then(() => { + this.cameraExperience.resetState(); this.cameraExperience.classList.add('hide'); - this.showOverlay(''); - window.setTimeout(() => { - this.cameraExperience.setState(CameraExperienceState.Default); - }, 1000); - - this.scanSuccess.emit(recognitionEvent.data?.result); - this.feedback.emit({ - code: FeedbackCode.ScanSuccessful, - state: 'FEEDBACK_OK', - message: '' + this.scanSuccess.emit(recognitionEvent.data?.result); + this.feedback.emit({ + code: FeedbackCode.ScanSuccessful, + state: 'FEEDBACK_OK', + message: '' + }); }); - }); } else { const resultIsValid = recognitionEvent.data.result.recognizer.processingStatus === 0 && recognitionEvent.data.result.recognizer.state === 2; @@ -839,6 +938,8 @@ export class MbComponent { try { this.cameraExperience.classList.remove('hide'); this.cameraScanStarted.emit(); + + void this.cameraExperience.populateCameraDevices(); await this.sdkService.scanFromCamera(configuration, eventHandler); const cameraFlipped = this.sdkService.isCameraFlipped(); @@ -852,7 +953,7 @@ export class MbComponent { this.showLicenseInfoModal(error); } else { - console.log("error", error); + console.error('Error during camera scan', error); this.scanError.emit({ code: Code.GenericScanError, @@ -877,10 +978,10 @@ export class MbComponent { } } - private async startScanFromImage(files?: FileList) { + private async startScanFromImage(file?: File) { const configuration: ImageRecognitionConfiguration = { recognizers: this.recognizers, - fileList: files ? files : this.scanFromImageInput.files + file: file ? file : this.scanFromImageInput.files[0] }; if (this.recognizerOptions && Object.keys(this.recognizerOptions).length > 0) { @@ -890,7 +991,12 @@ export class MbComponent { const eventHandler = (recognitionEvent: RecognitionEvent) => { switch (recognitionEvent.status) { case RecognitionStatus.Preparing: - this.showOverlay('processing'); + this.feedback.emit({ + code: FeedbackCode.ScanStarted, + state: 'FEEDBACK_OK', + message: '' + }); + this.showScanFromImageUi(); break; case RecognitionStatus.Processing: @@ -909,13 +1015,13 @@ export class MbComponent { state: 'FEEDBACK_ERROR', message: this.translationService.i('feedback-scan-unsuccessful').toString() }); - this.showOverlay(''); - this.scanFromImageInput.value = ''; + this.hideScanFromImageUi(); + this.clearInputImages(); break; case RecognitionStatus.DetectionFailed: // Do nothing, RecognitionStatus.EmptyResultState will handle negative outcome - this.scanFromImageInput.value = ''; + this.clearInputImages(); break; case RecognitionStatus.EmptyResultState: @@ -930,13 +1036,13 @@ export class MbComponent { state: 'FEEDBACK_ERROR', message: this.translationService.i('feedback-scan-unsuccessful').toString() }); - this.showOverlay(''); - this.scanFromImageInput.value = ''; + this.hideScanFromImageUi(); + this.clearInputImages(); break; case RecognitionStatus.UnknownError: // Do nothing, RecognitionStatus.EmptyResultState will handle negative outcome - this.scanFromImageInput.value = ''; + this.clearInputImages(); break; case RecognitionStatus.ScanSuccessful: @@ -946,10 +1052,10 @@ export class MbComponent { state: 'FEEDBACK_OK', message: '' }); - this.scanFromImageInput.value = ''; + this.clearInputImages(); if (!recognitionEvent.data.imageCapture) { - this.showOverlay(''); + this.hideScanFromImageUi(); } break; @@ -987,7 +1093,161 @@ export class MbComponent { message: this.translationService.i('feedback-error-generic').toString() }); - this.showOverlay(''); + this.hideScanFromImageUi(); + } + } + else { + this.setFatalError( + new EventFatalError( + Code.InternetNotAvailable, + this.translationService.i('check-internet-connection').toString() + ) + ); + this.showLicenseInfoModal( + this.translationService.i('check-internet-connection').toString() + ); + } + }); + } + } + + private async startScanFromImageCombined() { + const configuration: CombinedImageRecognitionConfiguration = { + recognizers: this.recognizers, + firstFile: this.galleryImageFirstFile, + secondFile: this.galleryImageSecondFile + }; + + if (this.recognizerOptions) { + configuration.recognizerOptions = this.recognizerOptions; + } + + const eventHandler = (recognitionEvent: RecognitionEvent) => { + switch (recognitionEvent.status) { + case RecognitionStatus.Preparing: + this.showScanFromImageUi(); + this.feedback.emit({ + code: FeedbackCode.ScanStarted, + state: 'FEEDBACK_OK', + message: '' + }); + break; + + case RecognitionStatus.Ready: + this.cameraExperience.setActiveCamera(this.sdkService.videoRecognizer.deviceId); + break; + + case RecognitionStatus.Processing: + // Just keep working + break; + + case RecognitionStatus.NoFirstImageFileFound: + this.scanError.emit({ + code: Code.NoFirstImageFileFound, + fatal: true, + message: 'First image file is missing!', + recognizerName: '' + }); + this.feedback.emit({ + code: FeedbackCode.ScanUnsuccessful, + state: 'FEEDBACK_ERROR', + message: this.translationService.i('feedback-scan-unsuccessful').toString() + }); + this.hideScanFromImageUi(); + this.clearInputImages(); + break; + + case RecognitionStatus.NoSecondImageFileFound: + this.scanError.emit({ + code: Code.NoSecondImageFileFound, + fatal: true, + message: 'Second image file is missing!', + recognizerName: '' + }); + this.feedback.emit({ + code: FeedbackCode.ScanUnsuccessful, + state: 'FEEDBACK_ERROR', + message: this.translationService.i('feedback-scan-unsuccessful').toString() + }); + this.hideScanFromImageUi(); + this.clearInputImages(); + break; + + case RecognitionStatus.DetectionFailed: + // Do nothing, RecognitionStatus.EmptyResultState will handle negative outcome + this.clearInputImages(); + break; + + case RecognitionStatus.EmptyResultState: + this.scanError.emit({ + code: Code.EmptyResult, + fatal: false, + message: 'Could not extract information from image!', + recognizerName: recognitionEvent.data.recognizerName + }); + this.feedback.emit({ + code: FeedbackCode.ScanUnsuccessful, + state: 'FEEDBACK_ERROR', + message: this.translationService.i('feedback-scan-unsuccessful').toString() + }); + this.hideScanFromImageUi(); + this.clearInputImages(); + break; + + case RecognitionStatus.UnknownError: + // Do nothing, RecognitionStatus.EmptyResultState will handle negative outcome + this.clearInputImages(); + break; + + case RecognitionStatus.ScanSuccessful: + this.scanSuccess.emit(recognitionEvent.data); + this.feedback.emit({ + code: FeedbackCode.ScanSuccessful, + state: 'FEEDBACK_OK', + message: '' + }); + this.clearInputImages(); + + if (!recognitionEvent.data.imageCapture) { + this.hideScanFromImageUi(); + } + break; + + default: + //console.warn('Unhandled image recognition status:', recognitionEvent.status); + } + }; + + try { + this.imageScanStarted.emit(); + + if (this.thoroughScanFromImage) { + configuration.thoroughScan = true; + } + + await this.sdkService.scanFromImageCombined(configuration, eventHandler); + } catch (error) { + this.checkIfInternetIsAvailable() + .then((isAvailable) => { + if (isAvailable) { + if (error?.code === 'UNLOCK_LICENSE_ERROR' ) { + this.setFatalError(new EventFatalError(Code.LicenseError, 'Something is wrong with the license.', error)); + this.showLicenseInfoModal(error); + } + else { + this.scanError.emit({ + code: Code.GenericScanError, + fatal: true, + message: `There was a problem during scan action.`, + recognizerName: '' + }); + this.feedback.emit({ + code: FeedbackCode.GenericScanError, + state: 'FEEDBACK_ERROR', + message: this.translationService.i('feedback-error-generic').toString() + }); + + this.hideScanFromImageUi(); } } else { @@ -1038,11 +1298,14 @@ export class MbComponent { } private setDragAndDrop() { - this.overlays.draganddrop.classList.remove('non-fullscreen'); - + const dropTarget = this.galleryDropType === 'FULLSCREEN' ? window : this.hostEl; const lockTimeout = 3000; let lockDragAndDrop = false; + if (this.galleryDropType === 'INLINE') { + this.overlays.draganddrop.classList.add('inline'); + } + const closeOverlay = () => { if (lockDragAndDrop) { window.setTimeout(() => { @@ -1055,6 +1318,7 @@ export class MbComponent { }, lockTimeout); } else { this.showOverlay(''); + window.setTimeout(() => { this.showScreen('action'); this.hostEl.style.borderStyle = 'solid'; @@ -1062,7 +1326,7 @@ export class MbComponent { } } - window.addEventListener('dragenter', (ev: any) => { + dropTarget.addEventListener('dragenter', (ev: any) => { ev.stopPropagation(); ev.preventDefault(); @@ -1070,11 +1334,10 @@ export class MbComponent { return; } - this.showScreen(''); this.hostEl.style.borderStyle = 'none'; }); - window.addEventListener('dragover', (ev: any) => { + dropTarget.addEventListener('dragover', (ev: any) => { ev.stopPropagation(); ev.preventDefault(); @@ -1082,7 +1345,6 @@ export class MbComponent { return; } - this.showScreen(''); this.hostEl.style.borderStyle = 'none'; this.overlays.draganddrop.classList.remove('error'); @@ -1111,7 +1373,7 @@ export class MbComponent { } if (GenericHelpers.hasSupportedImageFiles(ev.dataTransfer.files)) { - this.startScanFromImage(ev.dataTransfer.files); + this.startScanFromImage(ev.dataTransfer.files[0]); } else { this.overlays.draganddrop.classList.add('error'); this.overlays.draganddrop.querySelector('p').innerText = this.translationService.i('drop-error').toString(); @@ -1185,4 +1447,114 @@ export class MbComponent { return null; } } + + private onFromImageClicked(): void { + if (this.imageRecognitionType === ImageRecognitionType.Single) { + this.scanFromImageInput.click(); + } + + if (this.imageRecognitionType === ImageRecognitionType.Combined) { + if (this.combinedGalleryOpened) { + this.closeCombinedGalleryUpload(); + } + else { + this.openCombinedGalleryUpload(); + } + } + } + + private clearInputImages(): void { + if (this.imageRecognitionType === ImageRecognitionType.Single) { + this.scanFromImageInput.value = ''; + } + + if (this.imageRecognitionType === ImageRecognitionType.Combined) { + this.imageBoxFirst.clear(); + this.imageBoxSecond.clear(); + } + } + + private openCombinedGalleryUpload(): void { + const dialog = this.screens.action.querySelector('.combined-image-upload'); + dialog.classList.add('visible'); + + this.scanFromImageButton.selected = true; + this.combinedGalleryOpened = true; + } + + private closeCombinedGalleryUpload(): void { + const dialog = this.screens.action.querySelector('.combined-image-upload'); + dialog.classList.remove('visible'); + + this.scanFromImageButton.selected = false; + this.combinedGalleryOpened = false; + } + + private async onCombinedImageChange(ev: FileList, imageType: CombinedImageType) { + if (ev === null) { + if (imageType === CombinedImageType.First) { + this.galleryImageFirstFile = null; + } + + if (imageType === CombinedImageType.Second) { + this.galleryImageSecondFile = null; + } + } + else { + const imageFile = GenericHelpers.getImageFile(ev); + + if (imageFile === null) { + return; + } + + if (imageType === CombinedImageType.First) { + this.galleryImageFirstFile = imageFile; + } + + if (imageType === CombinedImageType.Second) { + this.galleryImageSecondFile = imageFile; + } + } + + if (this.galleryImageFirstFile !== null && this.galleryImageSecondFile !== null) { + this.combinedScanFromImageButton.disabled = false; + } + else { + this.combinedScanFromImageButton.disabled = true; + } + } + + private showScanFromImageUi(): void { + if (this.galleryOverlayType === 'INLINE') { + const inProgress = this.screens.processing.querySelector('p.in-progress'); + const done = this.screens.processing.querySelector('p.done'); + + inProgress.classList.add('visible'); + done.classList.remove('visible'); + + this.showScreen('processing'); + } + + if (this.galleryOverlayType === 'FULLSCREEN') { + this.showOverlay('processing'); + } + } + + private hideScanFromImageUi(): void { + if (this.galleryOverlayType === 'INLINE') { + const inProgress = this.screens.processing.querySelector('p.in-progress'); + const done = this.screens.processing.querySelector('p.done'); + + inProgress.classList.remove('visible'); + done.classList.add('visible'); + + window.setTimeout(() => { + this.showScreen('action'); + }, 1000); + } + + if (this.galleryOverlayType === 'FULLSCREEN') { + this.showOverlay(''); + } + } } diff --git a/ui/src/components/shared/mb-image-box/mb-image-box.scss b/ui/src/components/shared/mb-image-box/mb-image-box.scss new file mode 100644 index 0000000..62cacec --- /dev/null +++ b/ui/src/components/shared/mb-image-box/mb-image-box.scss @@ -0,0 +1,88 @@ +/** + * Copyright (c) Microblink Ltd. All rights reserved. + */ + +@import "../styles/globals-sass"; + +:host { + display: block; + + padding: $padding-unit-medium; + + border: var(--mb-component-image-box-border-width) solid var(--mb-component-image-box-border-color); + border-radius: var(--mb-component-image-box-border-radius); + + .label { + margin: 0; + padding: 0 0 $padding-unit-small 0; + + height: var(--mb-component-image-box-label-height); + line-height: var(--mb-component-image-box-label-height); + + color: var(--mb-component-image-box-label-color); + + font-family: var(--mb-font-family); + font-size: var(--mb-component-image-box-label-font-size); + font-weight: var(--mb-component-image-box-label-font-weight); + } + + .cta { + display: block; + height: var(--mb-component-image-box-cta-height); + + color: var(--mb-component-image-box-cta-color); + + text-decoration: none; + + font-family: var(--mb-font-family); + font-size: var(--mb-component-image-box-cta-font-size); + font-weight: var(--mb-component-image-box-cta-font-weight); + + .cta-label, + svg { + vertical-align: middle; + } + + .cta-label { + display: inline-block; + + max-width: calc(100% - #{$padding-unit-medium + 20px}); + height: var(--mb-component-image-box-cta-label-height); + line-height: var(--mb-component-image-box-cta-label-height); + + margin: 0; + padding: 0 $padding-unit-medium 0 0; + + &.filename { + max-width: unset; + width: calc(100% - 20px); + padding: 0; + color: var(--mb-component-image-box-file-color); + font-weight: var(--mb-component-image-box-file-font-weight); + + text-overflow: ellipsis; + overflow: hidden; + } + } + + svg { + display: none; + + width: 20px; + height: 20px; + margin: 0; + + &.visible { + display: inline-block; + } + } + } +} + +:host input[type="file"] { + position: absolute; + width: 0; + height: 0; + opacity: 0; + clip: rect(1px, 1px, 1px, 1px); +} diff --git a/ui/src/components/shared/mb-image-box/mb-image-box.tsx b/ui/src/components/shared/mb-image-box/mb-image-box.tsx new file mode 100644 index 0000000..60c5ee7 --- /dev/null +++ b/ui/src/components/shared/mb-image-box/mb-image-box.tsx @@ -0,0 +1,131 @@ +/** + * Copyright (c) Microblink Ltd. All rights reserved. + */ + +import { + Component, + Event, + EventEmitter, + Host, + h, + Method, + Prop +} from '@stencil/core'; + +import { extractFilenameFromPath } from '../../../utils/generic.helpers'; + +@Component({ + tag: 'mb-image-box', + styleUrl: 'mb-image-box.scss', + shadow: true, +}) +export class MbImageBox { + + /** + * Text which represents name of the image. + */ + @Prop() boxTitle: string; + + /** + * Text which should be displayed inside 'Add image' anchor element when file + * is not selected. + */ + @Prop() anchorText: string; + + /** + * Event which is triggered when selected image file is changed. + */ + @Event() imageChange: EventEmitter; + + /** + * Clear input image. + */ + @Method() + async clear() { + this.onClearImage(); + } + + render() { + return ( + +

    {this.boxTitle}

    + this.scanFromImageInput = el as HTMLInputElement} + type="file" + accept="image/*" + onChange={ (ev: UIEvent) => this.onImageChange(ev) } /> + this.onFromImageClicked(ev) }> +

    this.ctaLabel = el as HTMLParagraphElement}>

    + this.addIcon = el as SVGElement} + class="visible" + width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"> + + + this.removeIcon = el as SVGElement} + width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg"> + + +
    +
    + ); + } + + async componentDidRender() { + this.ctaLabel.innerText = this.anchorText; + } + + private scanFromImageInput: HTMLInputElement; + private ctaLabel: HTMLParagraphElement; + private addIcon: SVGElement; + private removeIcon: SVGElement; + + private hasImage: boolean = false; + + private onFromImageClicked(ev: UIEvent) { + ev.preventDefault(); + ev.stopPropagation(); + + if (this.hasImage) { + this.onClearImage(); + } + else { + this.scanFromImageInput.click(); + } + } + + private onImageChange(ev: UIEvent) { + const target = ev.target as HTMLInputElement; + + if (target.files && target.files.length) { + this.ctaLabel.innerText = extractFilenameFromPath(target.value); + this.ctaLabel.classList.add('filename'); + this.addIcon.classList.remove('visible'); + this.removeIcon.classList.add('visible'); + this.hasImage = true; + + this.imageChange.emit(target.files); + } + else { + this.onClearImage(); + } + } + + private onClearImage() { + this.ctaLabel.innerText = this.anchorText; + this.ctaLabel.classList.remove('filename'); + this.addIcon.classList.add('visible'); + this.removeIcon.classList.remove('visible'); + this.hasImage = false; + this.scanFromImageInput.value = ""; + + this.imageChange.emit(); + } +} diff --git a/ui/src/components/shared/mb-image-box/test/mb-image-box.e2e.ts b/ui/src/components/shared/mb-image-box/test/mb-image-box.e2e.ts new file mode 100644 index 0000000..720ac96 --- /dev/null +++ b/ui/src/components/shared/mb-image-box/test/mb-image-box.e2e.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Microblink Ltd. All rights reserved. + */ + +import { newE2EPage } from '@stencil/core/testing'; + +describe('mb-image-box', () => { + it('renders', async () => { + const page = await newE2EPage(); + await page.setContent(''); + + const element = await page.find('mb-image-box'); + expect(element).toHaveClass('hydrated'); + }); +}); diff --git a/ui/src/components/shared/mb-image-box/test/mb-image-box.spec.tsx b/ui/src/components/shared/mb-image-box/test/mb-image-box.spec.tsx new file mode 100644 index 0000000..a1dac75 --- /dev/null +++ b/ui/src/components/shared/mb-image-box/test/mb-image-box.spec.tsx @@ -0,0 +1,22 @@ +/** + * Copyright (c) Microblink Ltd. All rights reserved. + */ + +import { newSpecPage } from '@stencil/core/testing'; +import { MbImageBox } from '../mb-image-box'; + +describe('mb-image-box', () => { + it('renders', async () => { + const page = await newSpecPage({ + components: [MbImageBox], + html: ``, + }); + expect(page.root).toEqualHtml(` + + + + + + `); + }); +}); diff --git a/ui/src/components/shared/mb-modal/mb-modal.scss b/ui/src/components/shared/mb-modal/mb-modal.scss index b19f094..9a0c795 100644 --- a/ui/src/components/shared/mb-modal/mb-modal.scss +++ b/ui/src/components/shared/mb-modal/mb-modal.scss @@ -44,15 +44,15 @@ .title { text-align: center; font-weight: 500; - font-size: 16px; - line-height: 24px; + font-size: var(--mb-modal-title-font-size); + line-height: var(--mb-modal-title-line-height); } .content { margin: 24px 0; font-weight: 400; - font-size: 14px; - line-height: 20px; + font-size: var(--mb-modal-content-font-size); + line-height: var(--mb-modal-content-line-height); &.centered { text-align: center; diff --git a/ui/src/components/shared/mb-overlay/mb-overlay.scss b/ui/src/components/shared/mb-overlay/mb-overlay.scss index bdf8b3f..04215b1 100644 --- a/ui/src/components/shared/mb-overlay/mb-overlay.scss +++ b/ui/src/components/shared/mb-overlay/mb-overlay.scss @@ -18,20 +18,29 @@ visibility: hidden; overflow: hidden; + background-color: transparent; + border-style: none; + border-color: transparent; + transform: translate(0, 0); transform-origin: center; - transition: opacity 0.2s ease 0.4s, visibility 0.1s ease 0.5s, z-index 0.7s; + transition: background-color 0.2s ease 0.4s, + border-style 0.2s ease 0.4s, + border-color 0.2s ease 0.4s, + opacity 0.2s ease 0.4s, + visibility 0.1s ease 0.5s, + z-index 0.7s; } :host(.visible) { z-index: 200; - background-color: transparent; - visibility: visible; opacity: 1; + background-color: transparent; + transform: translate(0, 0); transition: opacity 0.2s ease, visibility 0.1s ease; diff --git a/ui/src/components/shared/mb-overlay/mb-overlay.tsx b/ui/src/components/shared/mb-overlay/mb-overlay.tsx index 8f5c2bc..05d6756 100644 --- a/ui/src/components/shared/mb-overlay/mb-overlay.tsx +++ b/ui/src/components/shared/mb-overlay/mb-overlay.tsx @@ -2,7 +2,13 @@ * Copyright (c) Microblink Ltd. All rights reserved. */ -import { Component, Host, h, Prop } from '@stencil/core'; +import { + Component, + Element, + Host, + h, + Prop +} from '@stencil/core'; @Component({ tag: 'mb-overlay', @@ -21,6 +27,11 @@ export class MbOverlay { */ @Prop() visible: boolean = false; + /** + * Host element as variable for manipulation (CSS in this case) + */ + @Element() hostEl: HTMLElement; + render() { return ( @@ -32,6 +43,12 @@ export class MbOverlay { getClassName(): string { const classNames = []; + this.hostEl.classList.forEach((value) => { + if (value !== 'visible' && value !== 'non-fullscreen') { + classNames.push(value); + } + }); + if (this.visible) { classNames.push('visible'); } @@ -42,5 +59,4 @@ export class MbOverlay { return classNames.join(' '); } - } diff --git a/ui/src/components/shared/styles/_barcode-rectangle.scss b/ui/src/components/shared/styles/_barcode-rectangle.scss index f1d7030..685a043 100644 --- a/ui/src/components/shared/styles/_barcode-rectangle.scss +++ b/ui/src/components/shared/styles/_barcode-rectangle.scss @@ -180,7 +180,7 @@ $rectangle-scanning-line-animation-duration: 2400ms; top: -125px; background: radial-gradient(100% 100% at 49.85% 100%, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%); - filter: blur(4px); + filter: blur(var(--mb-blur-scanning-line)); &.is-active { opacity: 1; diff --git a/ui/src/components/shared/styles/_globals-sass.scss b/ui/src/components/shared/styles/_globals-sass.scss index f5b57de..2083aea 100644 --- a/ui/src/components/shared/styles/_globals-sass.scss +++ b/ui/src/components/shared/styles/_globals-sass.scss @@ -1,8 +1,6 @@ /** * Copyright (c) Microblink Ltd. All rights reserved. - */ - -/** + * * SASS variables, not customizable via CSS variables */ $padding-unit-small: 4px; @@ -70,7 +68,7 @@ $base-colors: ( ), text-secondary: ( - onlight: ( name: "text-secondary", foreground: #75757A ), + onlight: ( name: "text-secondary", foreground: #3C3C43 ), ondark: ( name: "text-secondary", foreground: #AEAEB5 ) ), @@ -117,7 +115,7 @@ $base-colors: ( ), fill-quaternary: ( - onlight: ( name: "fill-quaternary", foreground: #F0F0F1 ), + onlight: ( name: "fill-quaternary", foreground: #747480 ), ondark: ( name: "fill-quaternary", foreground: #303032 ) ), diff --git a/ui/src/components/shared/styles/_globals.scss b/ui/src/components/shared/styles/_globals.scss index 0b483b3..ee8a2d0 100644 --- a/ui/src/components/shared/styles/_globals.scss +++ b/ui/src/components/shared/styles/_globals.scss @@ -11,18 +11,23 @@ * be reloaded for the changes to take effect. */ :host { - /* Global font family */ + /* General properties */ --mb-font-family: inherit; + --mb-font-size: max(16px, 1rem); + --mb-font-size-desktop: max(20px, 1rem); + --mb-font-style: normal; + --mb-font-weight: 400; + --mb-letter-spacing: normal; + --mb-line-height: 1.5em; /* Component (UI with buttons) */ --mb-component-background: #FFF; + --mb-component-width: 100%; + --mb-component-font-color: #000; - --mb-component-font-size: 14px; - --mb-component-font-style: normal; - --mb-component-font-weight: 400; - --mb-component-letter-spacing: normal; - --mb-component-line-height: 20px; + --mb-component-font-color-secondary: #3C3C43B2; + --mb-component-font-size: inherit; --mb-component-text-transform: none; --mb-component-border-color: rgba(120, 120, 128, 0.2); @@ -35,7 +40,9 @@ --mb-component-button-size: #{$button-size}; --mb-component-button-icon-size: #{$button-icon-size}; --mb-component-button-background: #FFF; + --mb-component-button-background-selected: rgba(72, 178, 232, 0.1); --mb-component-button-border-color: rgba(120, 120, 128, 0.2); + --mb-component-button-border-color-selected: rgba(120, 120, 128, 0.2); --mb-component-button-border-color-focus: rgba(72, 178, 232, 0.5); --mb-component-button-border-color-hover: rgba(60, 60, 67, 0.29); --mb-component-button-border-color-disabled: rgba(116, 116, 128, 0.08); @@ -46,31 +53,75 @@ --mb-component-button-box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1); --mb-component-button-box-shadow-disabled: none; + --mb-component-button-classic-background: #48B2E8; + --mb-component-button-classic-font-size: 1em; + --mb-component-button-classic-font-weight: 500; + --mb-component-button-classic-text-color: #FFF; + + --mb-component-image-box-border-color: rgba(120, 120, 128, 0.2); + --mb-component-image-box-border-radius: 2px; + --mb-component-image-box-border-width: 1px; + + --mb-component-image-box-label-height: #{$padding-unit-large}; + --mb-component-image-box-label-color: rgba(60, 60, 67, 0.5); + --mb-component-image-box-label-font-size: 0.875em; + --mb-component-image-box-label-font-weight: 400; + + --mb-component-image-box-cta-height: #{$padding-unit-large + $padding-unit-small}; + --mb-component-image-box-cta-label-height: #{$padding-unit-large + $padding-unit-small}; + --mb-component-image-box-cta-color: #48B2E8; + --mb-component-image-box-cta-font-size: 0.875em; + --mb-component-image-box-cta-font-weight: 600; + + --mb-component-image-box-file-color: #000; + --mb-component-image-box-file-font-weight: 400; + --mb-component-action-buttons-justify-content: flex-end; --mb-component-action-buttons-width: calc(2 * #{$button-size} + #{$padding-unit-medium}); --mb-component-action-buttons-last-margin: 0 0 0 8px; --mb-component-action-label: block; + --mb-component-action-label-font-size: inherit; + + /* Camera scanning UI */ + --mb-blur-filter: 27px; + --mb-blur-scanning-line: 4px; + + --mb-toolbar-color: #FFF; + --mb-toolbar-border-color: #FFF; + --mb-toolbar-border-radius: 4px; + --mb-toolbar-selection-width: 298px; + --mb-toolbar-list-background: #FFF; + --mb-toolbar-list-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05), 0px 2px 24px rgba(0, 0, 0, 0.1); + + --mb-reticle-size: 6em; /* User feedback (messages below buttons) */ --mb-feedback-font-color-error: #FF2D55; --mb-feedback-font-color-info: rgba(60, 60, 67, 0.7); - --mb-feedback-font-size: 12px; + --mb-feedback-font-size: 0.875em; --mb-feedback-font-style: normal; --mb-feedback-font-weight: 400; --mb-feedback-letter-spacing: normal; - --mb-feedback-line-height: 16px; + --mb-feedback-line-height: 1em; --mb-feedback-text-transform: none; /* Overlays */ - --mb-overlay-draganddrop-background: rgba(72, 178, 232, 0.25); - --mb-overlay-draganddrop-background-error: rgba(255, 45, 85, 0.25); + --mb-overlay-draganddrop-background: #EDF7FD; + --mb-overlay-draganddrop-background-error: #FFEAEE; + --mb-overlay-draganddrop-border-color: #48B2E8; --mb-overlay-draganddrop-border-color-error: #FF2D55; - --mb-overlay-draganddrop-border-style-error: dashed; + --mb-overlay-draganddrop-border-style: dashed; --mb-overlay-gallery-experience-background: rgba(0, 0, 0, 0.6); --mb-overlay-gallery-experience-font-color: #FFF; - --mb-overlay-gallery-experience-font-size: 16px; + --mb-overlay-gallery-experience-font-size: 1em; --mb-overlay-gallery-experience-font-weight: 500; - --mb-overlay-gallery-experience-line-height: 24px; + --mb-overlay-gallery-experience-line-height: 1.5em; + + /* Modals */ + --mb-modal-title-font-size: 1em; + --mb-modal-title-line-height: 1.5em; + --mb-modal-content-font-size: 0.875em; + --mb-modal-content-line-height: 1.4em; } diff --git a/ui/src/components/shared/styles/_blinkcard-rectangle.scss b/ui/src/components/shared/styles/_payment-card-rectangle.scss similarity index 99% rename from ui/src/components/shared/styles/_blinkcard-rectangle.scss rename to ui/src/components/shared/styles/_payment-card-rectangle.scss index 984f0e3..d30e532 100644 --- a/ui/src/components/shared/styles/_blinkcard-rectangle.scss +++ b/ui/src/components/shared/styles/_payment-card-rectangle.scss @@ -143,7 +143,7 @@ $rectangle-scanning-line-animation-duration: 2400ms; } // Shape & states -:host #blinkcard .rectangle { +:host #card-payment .rectangle { box-sizing: border-box; position: relative; background-color: transparent; @@ -346,7 +346,7 @@ $rectangle-scanning-line-animation-duration: 2400ms; top: -125px; background: radial-gradient(100% 100% at 49.85% 100%, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%); - filter: blur(4px); + filter: blur(var(--mb-blur-scanning-line)); &.is-active { opacity: 1; diff --git a/ui/src/components/shared/styles/_reticle.scss b/ui/src/components/shared/styles/_reticle.scss index 3701bd6..f712d65 100644 --- a/ui/src/components/shared/styles/_reticle.scss +++ b/ui/src/components/shared/styles/_reticle.scss @@ -7,8 +7,8 @@ $angle: 67.5; $reticle-bg: ( - default: map-get(map-get(map-get($base-colors, fill-primary), onlight), foreground), - error: rgba(map-get(map-get(map-get($base-colors, semantic-error), onlight), background), 0.5) + default: map-get(map-get(map-get($base-colors, text-quaternary), onlight), foreground), + error: rgba(map-get(map-get(map-get($base-colors, semantic-error), onlight), background), 0.75) ); // Animations @@ -116,8 +116,10 @@ $reticle-bg: ( background-position: center; background-size: contain; background-repeat: no-repeat; - -webkit-backdrop-filter: blur(27px); - backdrop-filter: blur(27px); + + -webkit-backdrop-filter: blur(var(--mb-blur-filter)); + backdrop-filter: blur(var(--mb-blur-filter)); + transition: all 0.4s ease; &__cursor { diff --git a/ui/src/index.html b/ui/src/index.html index 1661b17..19ccdbf 100644 --- a/ui/src/index.html +++ b/ui/src/index.html @@ -6,7 +6,6 @@ BlinkID ImageCapture UI Component - diff --git a/ui/src/utils/data-structures.ts b/ui/src/utils/data-structures.ts index c38323e..2c3b0a4 100644 --- a/ui/src/utils/data-structures.ts +++ b/ui/src/utils/data-structures.ts @@ -8,14 +8,16 @@ import * as BlinkIDImageCaptureSDK from '../../../es/blinkid-imagecapture-sdk'; export interface MicroblinkUI { // SDK settings - allowHelloMessage: boolean; - engineLocation: string; - licenseKey: string; - wasmType: string; - rawRecognizers: string; - recognizers: Array; - recognizerOptions: { [key: string]: any }; - includeSuccessFrame?: boolean; + allowHelloMessage: boolean; + engineLocation: string; + licenseKey: string; + wasmType: string; + rawRecognizers: string; + recognizers: Array; + recognizerOptions: { [key: string]: any }; + recognitionTimeout?: number; + includeSuccessFrame?: boolean; + thoroughScanFromImage: boolean; // Functional properties enableDrag: boolean; @@ -24,18 +26,27 @@ export interface MicroblinkUI { scanFromCamera: boolean; scanFromImage: boolean; + // Localization + translations: { [key: string]: string }; + rawTranslations: string; + // UI customization - translations: { [key: string]: string }; - rawTranslations: string; - showActionLabels: boolean; - showModalWindows: boolean; - iconCameraDefault: string; - iconCameraActive: string; - iconGalleryDefault: string; - iconGalleryActive: string; - iconInvalidFormat: string; - iconSpinnerScreenLoading: string; + galleryOverlayType: 'FULLSCREEN' | 'INLINE'; + galleryDropType: 'FULLSCREEN' | 'INLINE'; + showActionLabels: boolean; + showModalWindows: boolean; + showScanningLine?: boolean; + showCameraFeedbackBarcodeMessage?: boolean; + + // Icons + iconCameraDefault: string; + iconCameraActive: string; + iconGalleryDefault: string; + iconGalleryActive: string; + iconInvalidFormat: string; + iconSpinnerScreenLoading: string; iconSpinnerFromGalleryExperience: string; + iconGalleryScanningCompleted: string; // Events fatalError: EventEmitter; @@ -130,6 +141,8 @@ export enum Code { InvalidRecognizerOptions = 'INVALID_RECOGNIZER_OPTIONS', MissingLicenseKey = 'MISSING_LICENSE_KEY', NoImageFileFound = 'NO_IMAGE_FILE_FOUND', + NoFirstImageFileFound = 'NO_FIRST_IMAGE_FILE_FOUND', + NoSecondImageFileFound = 'NO_SECOND_IMAGE_FILE_FOUND', SdkLoadFailed = 'SDK_LOAD_FAILED', GenericScanError = 'GENERIC_SCAN_ERROR', CameraNotAllowed = 'CAMERA_NOT_ALLOWED', @@ -149,6 +162,7 @@ export const AvailableRecognizers: { [key: string]: string } = { export interface VideoRecognitionConfiguration { recognizers: Array, recognizerOptions?: any, + recognitionTimeout?: number, successFrame: boolean, cameraFeed: HTMLVideoElement, cameraId: string | null; @@ -158,7 +172,25 @@ export interface ImageRecognitionConfiguration { recognizers: Array, recognizerOptions?: any, thoroughScan?: boolean, - fileList: FileList + file: File +} + +export interface CombinedImageRecognitionConfiguration { + recognizers: Array, + recognizerOptions?: any, + thoroughScan?: boolean, + firstFile: File, + secondFile: File +} + +export enum ImageRecognitionType { + Single = 'Single', + Combined = 'Combined' +} + +export enum CombinedImageType { + First = 'First', + Second = 'Second' } export interface RecognizerInstance { @@ -169,7 +201,10 @@ export interface RecognizerInstance { export enum RecognitionStatus { NoImageFileFound = 'NoImageFileFound', + NoFirstImageFileFound = 'NoFirstImageFileFound', + NoSecondImageFileFound = 'NoSecondImageFileFound', Preparing = 'Preparing', + Ready = 'Ready', Processing = 'Processing', DetectionFailed = 'DetectionFailed', EmptyResultState = 'EmptyResultState', @@ -216,7 +251,7 @@ export enum CameraExperience { Barcode = 'BARCODE', CardCombined = 'CARD_COMBINED', CardSingleSide = 'CARD_SINGLE_SIDE', - BlinkCard = 'BLINKCARD' + PaymentCard = 'PAYMENT_CARD' } export enum CameraExperienceState { @@ -256,6 +291,7 @@ export enum FeedbackCode { CameraInUse = 'CAMERA_IN_USE', CameraNotAllowed = 'CAMERA_NOT_ALLOWED', GenericScanError = 'GENERIC_SCAN_ERROR', + ScanStarted = 'SCAN_STARTED', ScanUnsuccessful = 'SCAN_UNSUCCESSFUL', ScanSuccessful = 'SCAN_SUCCESSFUL' } @@ -265,3 +301,11 @@ export interface FeedbackMessage { state : 'FEEDBACK_ERROR' | 'FEEDBACK_INFO' | 'FEEDBACK_OK'; message : string; } + +/** + * Camera selection + */ +export interface CameraEntry { + prettyName: string; + details: BlinkIDImageCaptureSDK.SelectedCamera; +} diff --git a/ui/src/utils/device.helpers.ts b/ui/src/utils/device.helpers.ts index e813275..4dca15c 100644 --- a/ui/src/utils/device.helpers.ts +++ b/ui/src/utils/device.helpers.ts @@ -43,3 +43,12 @@ export async function checkMandatoryCapabilites(): Promise { return wasmSupport; } + +/** + * Determine whether this is a desktop device based on the screen resolution. + */ +export function isDesktop(): boolean { + const viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0); + + return viewportWidth >= 1024; +} diff --git a/ui/src/utils/generic.helpers.ts b/ui/src/utils/generic.helpers.ts index a5e69ec..f47db78 100644 --- a/ui/src/utils/generic.helpers.ts +++ b/ui/src/utils/generic.helpers.ts @@ -1,7 +1,6 @@ /** * Copyright (c) Microblink Ltd. All rights reserved. */ - export function stringToArray(inputString: string): Array { if (!inputString || !inputString.length) { return []; @@ -29,3 +28,24 @@ export function hasSupportedImageFiles(files: FileList): boolean { return false; } + +export function extractFilenameFromPath(path: string): string { + return path.split('\\').pop(); +} + +export function getImageFile(fileList: FileList): File|null { + if (fileList === null) { + return null; + } + + let image = null; + const imageRegex = RegExp(/^image\//); + + for (let i = 0; i < fileList.length; ++i) { + if (imageRegex.exec(fileList[i].type)) { + image = fileList[i]; + } + } + + return image; +} diff --git a/ui/src/utils/sdk.service.ts b/ui/src/utils/sdk.service.ts index 5ff69e4..9e526a2 100644 --- a/ui/src/utils/sdk.service.ts +++ b/ui/src/utils/sdk.service.ts @@ -6,12 +6,15 @@ import * as BlinkIDImageCaptureSDK from "../../../es/blinkid-imagecapture-sdk"; import { AvailableRecognizers, + CameraEntry, CameraExperience, Code, EventFatalError, EventReady, VideoRecognitionConfiguration, ImageRecognitionConfiguration, + CombinedImageRecognitionConfiguration, + ImageRecognitionType, RecognizerInstance, RecognitionEvent, RecognitionStatus, @@ -24,6 +27,19 @@ export interface CheckConclusion { message?: string; } +export async function getCameraDevices(): Promise> { + const devices = await BlinkIDImageCaptureSDK.getCameraDevices(); + const allDevices = devices.frontCameras.concat(devices.backCameras); + const finalEntries = allDevices.map((el: BlinkIDImageCaptureSDK.SelectedCamera) => { + return { + prettyName: el.label, + details: el + } + }); + + return finalEntries; +} + export class SdkService { private sdk: BlinkIDImageCaptureSDK.WasmSDK; @@ -33,7 +49,7 @@ export class SdkService { private recognizerName: string; - private videoRecognizer: BlinkIDImageCaptureSDK.VideoRecognizer; + public videoRecognizer: BlinkIDImageCaptureSDK.VideoRecognizer; public showOverlay: boolean = false; @@ -41,6 +57,10 @@ export class SdkService { this.eventEmitter$ = document.createElement('a'); } + public delete() { + this.sdk?.delete(); + } + public initialize(licenseKey: string, sdkSettings: SdkSettings): Promise { const loadSettings = new BlinkIDImageCaptureSDK.WasmSDKLoadSettings(licenseKey); @@ -123,6 +143,8 @@ export class SdkService { configuration.cameraId ); + eventCallback({ status: RecognitionStatus.Ready }); + await this.videoRecognizer.setVideoRecognitionMode(BlinkIDImageCaptureSDK.VideoRecognitionMode.Recognition); this.eventEmitter$.addEventListener('terminate', async () => { @@ -131,11 +153,11 @@ export class SdkService { } if (recognizerRunner) { - try { - await recognizerRunner.delete(); - } catch (error) { - // Psst, this error should not happen. - } + try { + await recognizerRunner.delete(); + } catch (error) { + // Psst, this error should not happen. + } } for (const recognizer of recognizers) { @@ -224,7 +246,7 @@ export class SdkService { if (this.recognizerName !== 'BlinkIdImageCaptureRecognizer') { window.setTimeout(() => void this.cancelRecognition(), 400); } - }); + }, configuration.recognitionTimeout); } catch (error) { if (error && error.name === 'VideoRecognizerError') { const reason = (error as BlinkIDImageCaptureSDK.VideoRecognizerError).reason; @@ -270,13 +292,21 @@ export class SdkService { } public isScanFromImageAvailable(_recognizers: Array = [], _recognizerOptions: any = {}): boolean { - if (_recognizers.indexOf('BlinkIdImageCaptureRecognizer') !== -1) { - if (_recognizerOptions && Object.keys(_recognizerOptions).length > 0 && _recognizerOptions['BlinkIdImageCaptureRecognizer']?.captureBothDocumentSides) return false; - else return true; - } return true; } + public getScanFromImageType(_recognizers: Array = [], _recognizerOptions: any = {}): ImageRecognitionType { + if ( + _recognizerOptions && + Object.keys(_recognizerOptions).length > 0 && + _recognizerOptions['BlinkIdImageCaptureRecognizer']?.captureBothDocumentSides + ) { + return ImageRecognitionType.Combined; + } + + return ImageRecognitionType.Single; + } + public async scanFromImage( configuration: ImageRecognitionConfiguration, eventCallback: (ev: RecognitionEvent) => void @@ -293,36 +323,15 @@ export class SdkService { eventCallback ); - // Get image file - const imageRegex = RegExp(/^image\//); - const file: File|null = (() => { - for (let i = 0; i < configuration.fileList.length; ++i) { - if (imageRegex.exec(configuration.fileList[i].type)) { - return configuration.fileList[i]; - } - } - - return null; - })(); - - if (!file) { - eventCallback({ status: RecognitionStatus.NoImageFileFound }); - return; - } - - const imageElement = new Image(); - imageElement.src = URL.createObjectURL(file); - await imageElement.decode(); - - const imageFrame = BlinkIDImageCaptureSDK.captureFrame(imageElement); + const handleTerminate = async () => { + this.eventEmitter$.removeEventListener('terminate', handleTerminate); - this.eventEmitter$.addEventListener('terminate', async () => { if (recognizerRunner) { - try { - await recognizerRunner.delete(); - } catch (error) { - // Psst, this error should not happen. - } + try { + await recognizerRunner.delete(); + } catch (error) { + // Psst, this error should not happen. + } } for (const recognizer of recognizers) { @@ -340,7 +349,23 @@ export class SdkService { } this.eventEmitter$.dispatchEvent(new Event('terminate:done')); - }); + }; + + this.eventEmitter$.addEventListener('terminate', handleTerminate); + + // Get image file + if (!configuration.file || !RegExp(/^image\//).exec(configuration.file.type)) { + eventCallback({ status: RecognitionStatus.NoImageFileFound }); + window.setTimeout(() => void this.cancelRecognition(), 500); + return; + } + + const file = configuration.file; + const imageElement = new Image(); + imageElement.src = URL.createObjectURL(file); + await imageElement.decode(); + + const imageFrame = BlinkIDImageCaptureSDK.captureFrame(imageElement); // Get results eventCallback({ status: RecognitionStatus.Processing }); @@ -359,7 +384,8 @@ export class SdkService { recognizerName: recognizer.name } }); - } else { + } + else { const recognitionResults: RecognitionResults = { recognizer: results, imageCapture: recognizer.name === 'BlinkIdImageCaptureRecognizer', @@ -372,32 +398,177 @@ export class SdkService { break; } } - } else { + } + else { // If necessary, scan the image once again with different settings if (configuration.thoroughScan) { - configuration.thoroughScan = false; + const c = configuration; + + c.thoroughScan = false; + c.recognizerOptions = c.recognizerOptions || {}; + + for (const r of c.recognizers) { + c.recognizerOptions[r] = c.recognizerOptions[r] || {}; + c.recognizerOptions[r].scanCroppedDocumentImage = !!c.recognizerOptions[r].scanCroppedDocumentImage; + c.recognizerOptions[r].scanCroppedDocumentImage = !c.recognizerOptions[r].scanCroppedDocumentImage; + } + + const eventHandler = (recognitionEvent: RecognitionEvent) => eventCallback(recognitionEvent); + const handleTerminateDone = () => { + this.eventEmitter$.removeEventListener('terminate:done', handleTerminateDone); + this.scanFromImage(configuration, eventHandler); + } + this.eventEmitter$.addEventListener('terminate:done', handleTerminateDone); + window.setTimeout(() => void this.cancelRecognition(), 500); + return; + } + + eventCallback({ + status: RecognitionStatus.EmptyResultState, + data: { + initiatedByUser: this.cancelInitiatedFromOutside, + recognizerName: '' + } + }); + } + + window.setTimeout(() => void this.cancelRecognition(), 500); + } + + public async scanFromImageCombined( + configuration: CombinedImageRecognitionConfiguration, + eventCallback: (ev: RecognitionEvent) => void + ): Promise { + eventCallback({ status: RecognitionStatus.Preparing }); + + const recognizers = await this.createRecognizers( + configuration.recognizers, + configuration.recognizerOptions + ); + + const recognizerRunner = await this.createRecognizerRunner( + recognizers, + eventCallback + ); + + const handleTerminate = async () => { + this.eventEmitter$.removeEventListener('terminate', handleTerminate); + + if (recognizerRunner) { + try { + await recognizerRunner.delete(); + } catch (error) { + // Psst, this error should not happen. + } + } + + for (const recognizer of recognizers) { + if (!recognizer) { + continue; + } if ( - !Array.isArray(configuration.recognizerOptions) || - configuration.recognizerOptions.indexOf('scanCroppedDocumentImage') === -1 + recognizer.recognizer && + recognizer.recognizer.objectHandle > -1 && + typeof recognizer.recognizer.delete === 'function' ) { - if (!Array.isArray(configuration.recognizerOptions)) { - configuration.recognizerOptions = []; + await recognizer.recognizer.delete(); + } + } + + this.eventEmitter$.dispatchEvent(new Event('terminate:done')); + }; + + this.eventEmitter$.addEventListener('terminate', handleTerminate); + + if (!configuration.firstFile) { + eventCallback({ status: RecognitionStatus.NoFirstImageFileFound }); + window.setTimeout(() => void this.cancelRecognition(), 500); + return; + } + + if (!configuration.secondFile) { + eventCallback({ status: RecognitionStatus.NoSecondImageFileFound }); + window.setTimeout(() => void this.cancelRecognition(), 500); + return; + } + + // Get results + eventCallback({ status: RecognitionStatus.Processing }); + + const imageElement = new Image(); + imageElement.src = URL.createObjectURL(configuration.firstFile); + await imageElement.decode(); + + const firstFrame = BlinkIDImageCaptureSDK.captureFrame(imageElement); + const firstProcessResult = await recognizerRunner.processImage(firstFrame); + + if (firstProcessResult !== BlinkIDImageCaptureSDK.RecognizerResultState.Empty) { + const imageElement = new Image(); + imageElement.src = URL.createObjectURL(configuration.secondFile); + await imageElement.decode(); + + const secondFrame = BlinkIDImageCaptureSDK.captureFrame(imageElement); + const secondProcessResult = await recognizerRunner.processImage(secondFrame); + + if (secondProcessResult !== BlinkIDImageCaptureSDK.RecognizerResultState.Empty) { + for (const recognizer of recognizers) { + const results = await recognizer.recognizer.getResult(); + + if (!results || results.state === BlinkIDImageCaptureSDK.RecognizerResultState.Empty) { + eventCallback({ + status: RecognitionStatus.EmptyResultState, + data: { + initiatedByUser: this.cancelInitiatedFromOutside, + recognizerName: recognizer.name + } + }); + } + else { + const recognitionResults: RecognitionResults = { + recognizer: results, + imageCapture: recognizer.name === 'BlinkIdImageCaptureRecognizer', + recognizerName: recognizer.name + }; + eventCallback({ + status: RecognitionStatus.ScanSuccessful, + data: recognitionResults + }); + break; } - configuration.recognizerOptions.push('scanCroppedDocumentImage'); } - else { - const position = configuration.recognizerOptions.indexOf('scanCroppedDocumentImage'); - configuration.recognizerOptions.splice(position, 1); + } + else { + eventCallback({ + status: RecognitionStatus.EmptyResultState, + data: { + initiatedByUser: this.cancelInitiatedFromOutside, + recognizerName: '' + } + }); + } + } + else { + // If necessary, scan the image once again with different settings + if (configuration.thoroughScan) { + const c = configuration; + + c.thoroughScan = false; + c.recognizerOptions = c.recognizerOptions || {}; + + for (const r of c.recognizers) { + c.recognizerOptions[r] = c.recognizerOptions[r] || {}; + c.recognizerOptions[r].scanCroppedDocumentImage = !!c.recognizerOptions[r].scanCroppedDocumentImage; + c.recognizerOptions[r].scanCroppedDocumentImage = !c.recognizerOptions[r].scanCroppedDocumentImage; } const eventHandler = (recognitionEvent: RecognitionEvent) => eventCallback(recognitionEvent); const handleTerminateDone = () => { this.eventEmitter$.removeEventListener('terminate:done', handleTerminateDone); - this.scanFromImage(configuration, eventHandler); + this.scanFromImageCombined(configuration, eventHandler); } - this.cancelRecognition(); this.eventEmitter$.addEventListener('terminate:done', handleTerminateDone); + window.setTimeout(() => void this.cancelRecognition(), 500); return; } @@ -421,6 +592,14 @@ export class SdkService { this.videoRecognizer.resumeRecognition(true); } + public changeCameraDevice(camera: BlinkIDImageCaptureSDK.SelectedCamera): Promise { + return new Promise((resolve) => { + this.videoRecognizer.changeCameraDevice(camera) + .then(() => resolve(true)) + .catch(() => resolve(false)); + }); + } + ////////////////////////////////////////////////////////////////////////////// // // PRIVATE METHODS @@ -443,17 +622,24 @@ export class SdkService { if (recognizerOptions && Object.keys(recognizerOptions).length > 0) { for (const recognizer of pureRecognizers) { - let settingsUpdated = false; const settings = await recognizer.currentSettings(); + let updated = false; + + if ( + !recognizerOptions[recognizer.recognizerName] || + Object.keys(recognizerOptions[recognizer.recognizerName]).length < 1 + ) { + continue; + } for (const [key, value] of Object.entries(recognizerOptions[recognizer.recognizerName])) { if (key in settings) { settings[key] = value; - settingsUpdated = true; + updated = true; } } - if (settingsUpdated) { + if (updated) { await recognizer.updateSettings(settings); } } @@ -550,4 +736,3 @@ export class SdkService { this.eventEmitter$.dispatchEvent(new Event('terminate')); } } - diff --git a/ui/src/utils/translation.service.ts b/ui/src/utils/translation.service.ts index bd6f31d..47f5aeb 100644 --- a/ui/src/utils/translation.service.ts +++ b/ui/src/utils/translation.service.ts @@ -16,8 +16,8 @@ export const defaultTranslations: { [key: string]: string|Array } = { 'camera-not-allowed': 'Cannot access camera.', 'camera-in-use': 'Camera is already used by another application.', 'camera-generic-error': 'Cannot access camera.', - 'camera-feedback-scan-front': ['Place the front side', 'of a document'], - 'camera-feedback-scan-back': ['Place the back side', 'of a document'], + 'camera-feedback-scan-front': ['Scan the front side', 'of a document'], + 'camera-feedback-scan-back': ['Scan the back side', 'of a document'], 'camera-feedback-flip': 'Flip the document', 'camera-feedback-barcode-message': 'Scan the barcode', 'camera-feedback-move-farther': 'Move farther', @@ -26,7 +26,13 @@ export const defaultTranslations: { [key: string]: string|Array } = { 'drop-info': 'Drop image here', 'drop-error': 'Whoops, we don\'t support that image format. Please upload a JPEG or PNG file.', 'initialization-error': 'Failed to load component. Try using another device or update your browser.', + 'process-image-box-first': 'Front side image', + 'process-image-box-second': 'Back side image', + 'process-image-box-add': 'Add image', + 'process-image-upload-cta': 'Upload', 'process-image-message': 'Just a moment.', + 'process-image-message-inline': 'Processing', + 'process-image-message-inline-done': 'Processing done', 'process-api-message': 'Just a moment', 'process-api-retry': 'Retry', 'feedback-scan-unsuccessful-title': 'Scan unsuccessful',