├── LICENSE ├── README.md ├── docs └── demo.png ├── images └── tesseract.js.png ├── index.html ├── js ├── main.js ├── tesseract-core.wasm.js ├── tesseract.min.js ├── tesseract.min.js.map ├── worker.min.js └── worker.min.js.map ├── manifest.json ├── package-lock.json └── traineddata └── eng.traineddata.gz /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 jeromewu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # tesseract.js-chrome-extension 2 | 3 | An example to use tesseract.js in chrome extension 4 | 5 | ![](docs/demo.png) 6 | 7 | ## Install 8 | 9 | 1. Clone this repository: 10 | 11 | ``` 12 | $ git clone https://github.com/jeromewu/tesseract.js-chrome-extension.git 13 | ``` 14 | 15 | 2. Visit [chrome://extensions/](chrome://extensions/) 16 | 3. Click **Load unpacked** and choose the root of this repository 17 | 18 | ## Assets Download URL 19 | 20 | - js/tesseract.min.js: https://unpkg.com/tesseract.js@v2.0.0-alpha.9/dist/tesseract.min.js 21 | - js/tesseract.min.js.map: https://unpkg.com/tesseract.js@v2.0.0-alpha.9/dist/tesseract.min.js.map 22 | - js/worker.min.js: https://unpkg.com/tesseract.js@v2.0.0-alpha.9/dist/worker.min.js 23 | - js/worker.min.js.map: https://unpkg.com/tesseract.js@v2.0.0-alpha.9/dist/worker.min.js.map 24 | - js/tesseract-core.wasm.js: https://unpkg.com/tesseract.js-core@v2.0.0-beta.10/tesseract-core.wasm.js 25 | - traineddata/eng.traineddata.gz: http://tessdata.projectnaptha.com/4.0.0/eng.traineddata.gz 26 | -------------------------------------------------------------------------------- /docs/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeromewu/tesseract.js-chrome-extension/8fac10ad33812985e8a246c2916e6bf1747accc4/docs/demo.png -------------------------------------------------------------------------------- /images/tesseract.js.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeromewu/tesseract.js-chrome-extension/8fac10ad33812985e8a246c2916e6bf1747accc4/images/tesseract.js.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Tesseract.js Chrome Extension Example 6 | 7 | 8 | 9 | 10 | 11 |

12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /js/main.js: -------------------------------------------------------------------------------- 1 | const doOCR = async () => { 2 | const image = document.getElementById('image'); 3 | const result = document.getElementById('result'); 4 | 5 | const { createWorker } = Tesseract; 6 | const worker = createWorker({ 7 | workerPath: chrome.runtime.getURL('js/worker.min.js'), 8 | langPath: chrome.runtime.getURL('traineddata'), 9 | corePath: chrome.runtime.getURL('js/tesseract-core.wasm.js'), 10 | }); 11 | 12 | await worker.load(); 13 | await worker.loadLanguage('eng'); 14 | await worker.initialize('eng'); 15 | const { data: { text } } = await worker.recognize(image); 16 | console.log(text); 17 | result.innerHTML = `

OCR Result:

${text}

`; 18 | await worker.terminate(); 19 | } 20 | 21 | const startBtn = document.getElementById('start-btn'); 22 | startBtn.onclick = doOCR; 23 | -------------------------------------------------------------------------------- /js/tesseract.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Tesseract=t():e.Tesseract=t()}(window,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=14)}([function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=r(9),i=r(33),a=Object.prototype.toString;function c(e){return"[object Array]"===a.call(e)}function u(e){return null!==e&&"object"===n(e)}function s(e){return"[object Function]"===a.call(e)}function f(e,t){if(null!=e)if("object"!==n(e)&&(e=[e]),c(e))for(var r=0,o=e.length;r=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],function(e){u.headers[e]={}}),n.forEach(["post","put","patch"],function(e){u.headers[e]=n.merge(i)}),e.exports=u}).call(this,r(8))},function(e,t,r){var n=r(1),o=0;e.exports=function(e){var t=e.id,r=e.action,i=e.payload,a=void 0===i?{}:i,c=t;return void 0===c&&(c=n("Job",o),o+=1),{id:c,action:r,payload:a}}},function(e,t,r){function n(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function o(e){return function(){var t=this,r=arguments;return new Promise(function(o,i){var a=e.apply(t,r);function c(e){n(a,o,i,c,u,"next",e)}function u(e){n(a,o,i,c,u,"throw",e)}c(void 0)})}}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var u=r(18),s=r(20),f=r(5),l=r(2).log,p=r(1),d=r(21).defaultOEM,h=r(22),m=h.defaultOptions,y=h.spawnWorker,g=h.terminateWorker,v=h.onMessage,b=h.loadImage,w=h.send,x=0;e.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=p("Worker",x),r=u(i({},m,e)),n=r.logger,a=c(r,["logger"]),h={},j={},O=y(a);x+=1;var E=function(e,t){h[e]=t},k=function(e,t){j[e]=t},S=function(e){var r=e.id,n=e.action,o=e.payload;return new Promise(function(e,i){l("[".concat(t,"]: Start ").concat(r,", action=").concat(n)),E(n,e),k(n,i),w(O,{workerId:t,jobId:r,action:n,payload:o})})},L=function(){var e=o(regeneratorRuntime.mark(function e(t){var r,n,o=arguments;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},n=o.length>2?o[2]:void 0,e.t0=S,e.t1=f,e.t2=n,e.next=7,b(t);case 7:return e.t3=e.sent,e.t4=r,e.t5={image:e.t3,options:e.t4},e.t6={id:e.t2,action:"recognize",payload:e.t5},e.t7=(0,e.t1)(e.t6),e.abrupt("return",(0,e.t0)(e.t7));case 13:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),P=function(){var e=o(regeneratorRuntime.mark(function e(t,r){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=S,e.t1=f,e.t2=r,e.next=5,b(t);case 5:return e.t3=e.sent,e.t4={image:e.t3},e.t5={id:e.t2,action:"detect",payload:e.t4},e.t6=(0,e.t1)(e.t5),e.abrupt("return",(0,e.t0)(e.t6));case 10:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}(),R=function(){var e=o(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null===O){e.next=5;break}return e.next=3,S(f({id:t,action:"terminate"}));case 3:g(O),O=null;case 5:return e.abrupt("return",Promise.resolve());case 6:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}();return v(O,function(e){var t=e.workerId,r=e.jobId,o=e.status,a=e.action,c=e.data;if("resolve"===o){l("[".concat(t,"]: Complete ").concat(r));var u=c;"recognize"===a?u=s(c):"getPDF"===a&&(u=Array.from(i({},c,{length:Object.keys(c).length}))),h[a]({jobId:r,data:u})}else{if("reject"===o)throw j[a](c),Error(c);"progress"===o&&n(c)}}),{id:t,worker:O,setResolve:E,setReject:k,load:function(e){return S(f({id:e,action:"load",payload:{options:a}}))},loadLanguage:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"eng",t=arguments.length>1?arguments[1]:void 0;return S(f({id:t,action:"loadLanguage",payload:{langs:e,options:a}}))},initialize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"eng",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d,r=arguments.length>2?arguments[2]:void 0;return S(f({id:r,action:"initialize",payload:{langs:e,oem:t}}))},setParameters:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return S(f({id:t,action:"setParameters",payload:{params:e}}))},recognize:L,getPDF:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Tesseract OCR Result",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;return S(f({id:r,action:"getPDF",payload:{title:e,textonly:t}}))},detect:P,terminate:R}}},function(e,t){e.exports={TESSERACT_ONLY:0,LSTM_ONLY:1,TESSERACT_LSTM_COMBINED:2,DEFAULT:3}},function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var u,s=[],f=!1,l=-1;function p(){f&&u&&(f=!1,u.length?s=u.concat(s):l=-1,s.length&&d())}function d(){if(!f){var e=c(p);f=!0;for(var t=s.length;t;){for(u=s,s=[];++l1)for(var r=1;r=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),s=o.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:R(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),m}},e}("object"===t(e)?e.exports:{});try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}}).call(this,r(16)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){var n=this;function o(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t1?n-1:0),i=1;i 6 | * @license MIT 7 | */ 8 | e.exports=function(e){return null!=e&&(r(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,r){"use strict";var n=r(4),o=r(0),i=r(43),a=r(44);function c(e){this.defaults=e,this.interceptors={request:new i,response:new i}}c.prototype.request=function(e){"string"==typeof e&&(e=o.merge({url:arguments[0]},arguments[1])),(e=o.merge(n,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[a,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)r=r.then(t.shift(),t.shift());return r},o.forEach(["delete","get","head","options"],function(e){c.prototype[e]=function(t,r){return this.request(o.merge(r||{},{method:e,url:t}))}}),o.forEach(["post","put","patch"],function(e){c.prototype[e]=function(t,r,n){return this.request(o.merge(n||{},{method:e,url:t,data:r}))}}),e.exports=c},function(e,t,r){"use strict";var n=r(0);e.exports=function(e,t){n.forEach(e,function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])})}},function(e,t,r){"use strict";var n=r(11);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},function(e,t,r){"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e}},function(e,t,r){"use strict";var n=r(0);function o(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var a=[];n.forEach(t,function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))}))}),i=a.join("&")}return i&&(e+=(-1===e.indexOf("?")?"?":"&")+i),e}},function(e,t,r){"use strict";var n=r(0),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,i,a={};return e?(n.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),r=n.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}}),a):a}},function(e,t,r){"use strict";var n=r(0);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function o(){this.message="String contains an invalid character"}o.prototype=new Error,o.prototype.code=5,o.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,r,i=String(e),a="",c=0,u=n;i.charAt(0|c)||(u="=",c%1);a+=u.charAt(63&t>>8-c%1*8)){if((r=i.charCodeAt(c+=.75))>255)throw new o;t=t<<8|r}return a}},function(e,t,r){"use strict";var n=r(0);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,a){var c=[];c.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&c.push("expires="+new Date(r).toGMTString()),n.isString(o)&&c.push("path="+o),n.isString(i)&&c.push("domain="+i),!0===a&&c.push("secure"),document.cookie=c.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";var n=r(0);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=o},function(e,t,r){"use strict";var n=r(0),o=r(45),i=r(12),a=r(4),c=r(46),u=r(47);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.baseURL&&!c(e.url)&&(e.url=u(e.baseURL,e.url)),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||a.adapter)(e).then(function(t){return s(e),t.data=o(t.data,t.headers,e.transformResponse),t},function(t){return i(t)||(s(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,r){"use strict";var n=r(0);e.exports=function(e,t,r){return n.forEach(r,function(r){e=r(e,t)}),e}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";var n=r(13);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var r=this;e(function(e){r.reason||(r.reason=new n(e),t(r.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o(function(t){e=t}),cancel:e}},e.exports=o},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){function n(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function o(e){return function(){var t=this,r=arguments;return new Promise(function(o,i){var a=e.apply(t,r);function c(e){n(a,o,i,c,u,"next",e)}function u(e){n(a,o,i,c,u,"throw",e)}c(void 0)})}}var i=r(6),a=function(){var e=o(regeneratorRuntime.mark(function e(t,r,n){var a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=i(n),e.next=3,a.load();case 3:return e.next=5,a.loadLanguage(r);case 5:return e.next=7,a.initialize(r);case 7:return e.abrupt("return",a.recognize(t).finally(o(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.terminate();case 2:case"end":return e.stop()}},e)}))));case 8:case"end":return e.stop()}},e)}));return function(t,r,n){return e.apply(this,arguments)}}(),c=function(){var e=o(regeneratorRuntime.mark(function e(t,r){var n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=i(r),e.next=3,n.load();case 3:return e.next=5,n.loadLanguage("osd");case 5:return e.next=7,n.initialize("osd");case 7:return e.abrupt("return",n.detect(t).finally(o(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.terminate();case 2:case"end":return e.stop()}},e)}))));case 8:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}();e.exports={recognize:a,detect:c}},function(e,t){e.exports={OSD_ONLY:"0",AUTO_OSD:"1",AUTO_ONLY:"2",AUTO:"3",SINGLE_COLUMN:"4",SINGLE_BLOCK_VERT_TEXT:"5",SINGLE_BLOCK:"6",SINGLE_LINE:"7",SINGLE_WORD:"8",CIRCLE_WORD:"9",SINGLE_CHAR:"10",SPARSE_TEXT:"11",SPARSE_TEXT_OSD:"12"}}])}); 9 | //# sourceMappingURL=tesseract.min.js.map -------------------------------------------------------------------------------- /js/worker.min.js: -------------------------------------------------------------------------------- 1 | !function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=11)}([function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=r(6),o=r(22),s=Object.prototype.toString;function a(t){return"[object Array]"===s.call(t)}function f(t){return null!==t&&"object"===n(t)}function u(t){return"[object Function]"===s.call(t)}function c(t,e){if(null!=t)if("object"!==n(t)&&(t=[t]),a(t))for(var r=0,i=t.length;r 6 | * @license MIT 7 | */ 8 | var n=r(15),i=r(16),o=r(17);function s(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(f.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return M(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(t).length;default:if(n)return M(t).length;e=(""+e).toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=f.from(e,n)),f.isBuffer(e))return 0===e.length?-1:y(t,e,r,n,i);if("number"==typeof e)return e&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,i){var o,s=1,a=t.length,f=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,f/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var c=-1;for(o=r;oa&&(r=a-f),o=r;o>=0;o--){for(var h=!0,p=0;pi&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function _(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function S(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:u>223?3:u>191?2:1;if(i+h<=r)switch(h){case 1:u<128&&(c=u);break;case 2:128==(192&(o=t[i+1]))&&(f=(31&u)<<6|63&o)>127&&(c=f);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(f=(15&u)<<12|(63&o)<<6|63&s)>2047&&(f<55296||f>57343)&&(c=f);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(f=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&f<1114112&&(c=f)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=h}return function(t){var e=t.length;if(e<=U)return String.fromCharCode.apply(String,t);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return k(this,e,r);case"latin1":case"binary":return T(this,e,r);case"base64":return _(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},f.prototype.compare=function(t,e,r,n,i){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),u=this.slice(n,i),c=t.slice(e,r),h=0;hi)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return x(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var U=4096;function k(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,r,n,i,o){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function R(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function O(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function j(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(t,e,r,n,o){return o||j(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function z(t,e,r,n,o){return o||j(t,0,r,8),i.write(t,e,r,n,52,8),r+8}f.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(i*=256);)n+=this[t+--e]*i;return n},f.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},f.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},f.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+r},f.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},f.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},f.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},f.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):O(this,t,e,!0),e+4},f.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):O(this,t,e,!1),e+4},f.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},f.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},f.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},f.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},f.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},f.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):O(this,t,e,!0),e+4},f.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):O(this,t,e,!1),e+4},f.prototype.writeFloatLE=function(t,e,r){return C(this,t,e,!0,r)},f.prototype.writeFloatBE=function(t,e,r){return C(this,t,e,!1,r)},f.prototype.writeDoubleLE=function(t,e,r){return z(this,t,e,!0,r)},f.prototype.writeDoubleBE=function(t,e,r){return z(this,t,e,!1,r)},f.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function F(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(N,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Y(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(2))},function(t,e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"===("undefined"==typeof window?"undefined":r(window))&&(n=window)}t.exports=n},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var f,u=[],c=!1,h=-1;function p(){c&&f&&(c=!1,f.length?u=f.concat(u):h=-1,u.length&&l())}function l(){if(!c){var t=a(p);c=!0;for(var e=u.length;e;){for(f=u,u=[];++h1)for(var r=1;r=200&&t<300}};f.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],function(t){f.headers[t]={}}),n.forEach(["post","put","patch"],function(t){f.headers[t]=n.merge(o)}),t.exports=f}).call(this,r(3))},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e1){var r=function(t,r){r=_objectSpread({offset:0},r);for(var n=0;n=33&&73===e[r]&&68===e[r+1]&&65===e[r+2]&&84===e[r+3]}),o=e.subarray(33,i);return o.findIndex(function(t,e){return 97===o[e]&&99===o[e+1]&&84===o[e+2]&&76===o[e+3]})>=0?{ext:"apng",mime:"image/apng"}:{ext:"png",mime:"image/png"}}if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(r([87,69,66,80],{offset:8}))return{ext:"webp",mime:"image/webp"};if(r([70,76,73,70]))return{ext:"flif",mime:"image/flif"};if((r([73,73,42,0])||r([77,77,0,42]))&&r([67,82],{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r([73,73,82,79,8,0,0,0,24]))return{ext:"orf",mime:"image/x-olympus-orf"};if(r([73,73,42,0])&&(r([16,251,134,1],{offset:4})||r([8,0,0,0,19,0],{offset:4})||r([8,0,0,0,18,0],{offset:4})))return{ext:"arw",mime:"image/x-sony-arw"};if(r([73,73,42,0,8,0,0,0])&&(r([45,0,254,0],{offset:8})||r([39,0,254,0],{offset:8})))return{ext:"dng",mime:"image/x-adobe-dng"};if(r([73,73,42,0])&&r([28,0,254,0],{offset:8}))return{ext:"nef",mime:"image/x-nikon-nef"};if(r([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:"rw2",mime:"image/x-panasonic-rw2"};if(n("FUJIFILMCCD-RAW"))return{ext:"raf",mime:"image/x-fujifilm-raf"};if(r([73,73,42,0])||r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([56,66,80,83]))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};var s=[80,75,3,4];if(r(s)){if(r([109,105,109,101,116,121,112,101,97,112,112,108,105,99,97,116,105,111,110,47,101,112,117,98,43,122,105,112],{offset:30}))return{ext:"epub",mime:"application/epub+zip"};if(r(xpiZipFilename,{offset:30}))return{ext:"xpi",mime:"application/x-xpinstall"};if(n("mimetypeapplication/vnd.oasis.opendocument.text",{offset:30}))return{ext:"odt",mime:"application/vnd.oasis.opendocument.text"};if(n("mimetypeapplication/vnd.oasis.opendocument.spreadsheet",{offset:30}))return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};if(n("mimetypeapplication/vnd.oasis.opendocument.presentation",{offset:30}))return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"};var a,f=0,u=!1;do{var c=f+30;if(u||(u=r(oxmlContentTypes,{offset:c})||r(oxmlRels,{offset:c})),a||(n("word/",{offset:c})?a={ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}:n("ppt/",{offset:c})?a={ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"}:n("xl/",{offset:c})&&(a={ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})),u&&a)return a;f=multiByteIndexOf(e,s,c)}while(f>=0);if(a)return a}if(r([80,75])&&(3===e[2]||5===e[2]||7===e[2])&&(4===e[3]||6===e[3]||8===e[3]))return{ext:"zip",mime:"application/zip"};if(r([48,48,48,48,48,48],{offset:148,mask:[248,248,248,248,248,248]})&&tarHeaderChecksumMatches(e))return{ext:"tar",mime:"application/x-tar"};if(r([82,97,114,33,26,7])&&(0===e[6]||1===e[6]))return{ext:"rar",mime:"application/x-rar-compressed"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([102,114,101,101],{offset:4})||r([109,100,97,116],{offset:4})||r([109,111,111,118],{offset:4})||r([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(r([102,116,121,112],{offset:4})&&0!=(96&e[8])&&0!=(96&e[9])&&0!=(96&e[10])&&0!=(96&e[11])){var h=uint8ArrayUtf8ByteString(e,8,12);switch(h){case"mif1":return{ext:"heic",mime:"image/heif"};case"msf1":return{ext:"heic",mime:"image/heif-sequence"};case"heic":case"heix":return{ext:"heic",mime:"image/heic"};case"hevc":case"hevx":return{ext:"heic",mime:"image/heic-sequence"};case"qt ":return{ext:"mov",mime:"video/quicktime"};case"M4V ":case"M4VH":case"M4VP":return{ext:"m4v",mime:"video/x-m4v"};case"M4P ":return{ext:"m4p",mime:"video/mp4"};case"M4B ":return{ext:"m4b",mime:"audio/mp4"};case"M4A ":return{ext:"m4a",mime:"audio/x-m4a"};case"F4V ":return{ext:"f4v",mime:"video/mp4"};case"F4P ":return{ext:"f4p",mime:"video/mp4"};case"F4A ":return{ext:"f4a",mime:"audio/mp4"};case"F4B ":return{ext:"f4b",mime:"audio/mp4"};default:return h.startsWith("3g")?h.startsWith("3g2")?{ext:"3g2",mime:"video/3gpp2"}:{ext:"3gp",mime:"video/3gpp"}:{ext:"mp4",mime:"video/mp4"}}}if(r([77,84,104,100]))return{ext:"mid",mime:"audio/midi"};if(r([26,69,223,163])){var p=e.subarray(4,4100),l=p.findIndex(function(t,e,r){return 66===r[e]&&130===r[e+1]});if(-1!==l){var d=l+3,m=function(t){return _toConsumableArray(t).every(function(t,e){return p[d+e]===t.charCodeAt(0)})};if(m("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(m("webm"))return{ext:"webm",mime:"video/webm"}}}if(r([82,73,70,70])){if(r([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(r([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/vnd.wave"};if(r([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(r([48,38,178,117,142,102,207,17,166,217])){var g=30;do{var y=readUInt64LE(e,g+16);if(r([145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101],{offset:g})){if(r([64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43],{offset:g+24}))return{ext:"wma",mime:"audio/x-ms-wma"};if(r([192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43],{offset:g+24}))return{ext:"wmv",mime:"video/x-ms-asf"};break}g+=y}while(g+24<=e.length);return{ext:"asf",mime:"application/vnd.ms-asf"}}if(r([0,0,1,186])||r([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};for(var v=0;v<2&&v=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var f=i.call(s,"catchLoc"),u=i.call(s,"finallyLoc");if(f&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;k(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:I(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),m}},t}("object"===e(t)?t.exports:{});try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}}).call(this,r(14)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";e.byteLength=function(t){return 3*t.length/4-u(t)},e.toByteArray=function(t){var e,r,n,s,a,f=t.length;s=u(t),a=new o(3*f/4-s),r=s>0?f-4:f;var c=0;for(e=0;e>16&255,a[c++]=n>>8&255,a[c++]=255&n;2===s?(n=i[t.charCodeAt(e)]<<2|i[t.charCodeAt(e+1)]>>4,a[c++]=255&n):1===s&&(n=i[t.charCodeAt(e)]<<10|i[t.charCodeAt(e+1)]<<4|i[t.charCodeAt(e+2)]>>2,a[c++]=n>>8&255,a[c++]=255&n);return a},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o="",s=[],a=0,f=r-i;af?f:a+16383));1===i?(e=t[r-1],o+=n[e>>2],o+=n[e<<4&63],o+="=="):2===i&&(e=(t[r-2]<<8)+t[r-1],o+=n[e>>10],o+=n[e>>4&63],o+=n[e<<2&63],o+="=");return s.push(o),s.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,f=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function c(t,e,r){for(var i,o,s=[],a=e;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,f=(1<>1,c=-7,h=r?i-1:0,p=r?-1:1,l=t[e+h];for(h+=p,o=l&(1<<-c)-1,l>>=-c,c+=a;c>0;o=256*o+t[e+h],h+=p,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+t[e+h],h+=p,c-=8);if(0===o)o=1-u;else{if(o===f)return s?NaN:1/0*(l?-1:1);s+=Math.pow(2,n),o-=u}return(l?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,f,u=8*o-i-1,c=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:o-1,d=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-s))<1&&(s--,f*=2),(e+=s+h>=1?p/f:p*Math.pow(2,1-h))*f>=2&&(s++,f/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*f-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+l]=255&a,l+=d,a/=256,i-=8);for(s=s<0;t[r+l]=255&s,l+=d,s/=256,u-=8);t[r+l-d]|=128*m}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){"use strict";(function(t){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e1&&void 0!==arguments[1]?arguments[1]:0,r=t[e],n=1,i=0;++i<8;)n*=256,r+=t[e+i]*n;return r},e.tarHeaderChecksumMatches=function(t){if(t.length<512)return!1;for(var e=256,r=0,i=0;i<148;i++){var o=t[i];e+=o,r+=128&o}for(var s=156;s<512;s++){var a=t[s];e+=a,r+=128&a}var f=parseInt(n(t,148,154),8);return f===e||f===e-(r<<1)},e.multiByteIndexOf=function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(t&&t.isBuffer(e))return e.indexOf(t.from(r),n);for(var i=function(t,e,r){for(var n=1;n=0;){if(i(e,r,o))return o;o=e.indexOf(r[0],o+1)}return-1},e.uint8ArrayUtf8ByteString=n}).call(this,r(1).Buffer)},function(t,e,r){"use strict";t.exports={extensions:["jpg","png","apng","gif","webp","flif","cr2","orf","arw","dng","nef","rw2","raf","tif","bmp","jxr","psd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","msi","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","wmv","wma","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc"],mimeTypes:["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-canon-cr2","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/epub+zip","application/x-xpinstall","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","video/mp4","audio/midi","video/x-matroska","video/webm","video/quicktime","video/vnd.avi","audio/vnd.wave","audio/qcelp","audio/x-ms-wma","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","audio/opus","video/ogg","audio/ogg","application/ogg","audio/x-flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","image/x-icon","video/x-flv","application/postscript","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-msi","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/ktx","application/dicom","audio/x-musepack","text/calendar","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2"]}},function(t,e,r){t.exports=r(21)},function(t,e,r){"use strict";var n=r(0),i=r(6),o=r(23),s=r(4);function a(t){var e=new o(t),r=i(o.prototype.request,e);return n.extend(r,o.prototype,e),n.extend(r,e),r}var f=a(s);f.Axios=o,f.create=function(t){return a(n.merge(s,t))},f.Cancel=r(10),f.CancelToken=r(37),f.isCancel=r(9),f.all=function(t){return Promise.all(t)},f.spread=r(38),t.exports=f,t.exports.default=f},function(t,e){function r(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)} 9 | /*! 10 | * Determine if an object is a Buffer 11 | * 12 | * @author Feross Aboukhadijeh 13 | * @license MIT 14 | */ 15 | t.exports=function(t){return null!=t&&(r(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&r(t.slice(0,0))}(t)||!!t._isBuffer)}},function(t,e,r){"use strict";var n=r(4),i=r(0),o=r(32),s=r(33);function a(t){this.defaults=t,this.interceptors={request:new o,response:new o}}a.prototype.request=function(t){"string"==typeof t&&(t=i.merge({url:arguments[0]},arguments[1])),(t=i.merge(n,{method:"get"},this.defaults,t)).method=t.method.toLowerCase();var e=[s,void 0],r=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)r=r.then(e.shift(),e.shift());return r},i.forEach(["delete","get","head","options"],function(t){a.prototype[t]=function(e,r){return this.request(i.merge(r||{},{method:t,url:e}))}}),i.forEach(["post","put","patch"],function(t){a.prototype[t]=function(e,r,n){return this.request(i.merge(n||{},{method:t,url:e,data:r}))}}),t.exports=a},function(t,e,r){"use strict";var n=r(0);t.exports=function(t,e){n.forEach(t,function(r,n){n!==e&&n.toUpperCase()===e.toUpperCase()&&(t[e]=r,delete t[n])})}},function(t,e,r){"use strict";var n=r(8);t.exports=function(t,e,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?e(n("Request failed with status code "+r.status,r.config,null,r.request,r)):t(r)}},function(t,e,r){"use strict";t.exports=function(t,e,r,n,i){return t.config=e,r&&(t.code=r),t.request=n,t.response=i,t}},function(t,e,r){"use strict";var n=r(0);function i(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,r){if(!e)return t;var o;if(r)o=r(e);else if(n.isURLSearchParams(e))o=e.toString();else{var s=[];n.forEach(e,function(t,e){null!=t&&(n.isArray(t)?e+="[]":t=[t],n.forEach(t,function(t){n.isDate(t)?t=t.toISOString():n.isObject(t)&&(t=JSON.stringify(t)),s.push(i(e)+"="+i(t))}))}),o=s.join("&")}return o&&(t+=(-1===t.indexOf("?")?"?":"&")+o),t}},function(t,e,r){"use strict";var n=r(0),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,r,o,s={};return t?(n.forEach(t.split("\n"),function(t){if(o=t.indexOf(":"),e=n.trim(t.substr(0,o)).toLowerCase(),r=n.trim(t.substr(o+1)),e){if(s[e]&&i.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([r]):s[e]?s[e]+", "+r:r}}),s):s}},function(t,e,r){"use strict";var n=r(0);t.exports=n.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(t){var n=t;return e&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=i(window.location.href),function(e){var r=n.isString(e)?i(e):e;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}},function(t,e,r){"use strict";var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function i(){this.message="String contains an invalid character"}i.prototype=new Error,i.prototype.code=5,i.prototype.name="InvalidCharacterError",t.exports=function(t){for(var e,r,o=String(t),s="",a=0,f=n;o.charAt(0|a)||(f="=",a%1);s+=f.charAt(63&e>>8-a%1*8)){if((r=o.charCodeAt(a+=.75))>255)throw new i;e=e<<8|r}return s}},function(t,e,r){"use strict";var n=r(0);t.exports=n.isStandardBrowserEnv()?{write:function(t,e,r,i,o,s){var a=[];a.push(t+"="+encodeURIComponent(e)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(i)&&a.push("path="+i),n.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,r){"use strict";var n=r(0);function i(){this.handlers=[]}i.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){n.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=i},function(t,e,r){"use strict";var n=r(0),i=r(34),o=r(9),s=r(4),a=r(35),f=r(36);function u(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return u(t),t.baseURL&&!a(t.url)&&(t.url=f(t.baseURL,t.url)),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=n.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||s.adapter)(t).then(function(e){return u(t),e.data=i(e.data,e.headers,t.transformResponse),e},function(e){return o(e)||(u(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,r){"use strict";var n=r(0);t.exports=function(t,e,r){return n.forEach(r,function(r){t=r(t,e)}),t}},function(t,e,r){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,r){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,r){"use strict";var n=r(10);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var r=this;t(function(t){r.reason||(r.reason=new n(t),e(r.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i(function(e){t=e}),cancel:t}},t.exports=i},function(t,e,r){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e){t.exports=function(t){return r.test(t)};var r=/^(?:\w+:)?\/\/([^\s\.]+\.\S{2}|localhost[\:?\d]*)\S*$/},function(t,e){t.exports=function(t,e,r){var n,i,o,s,a,f=r.tessjs_create_hocr,u=r.tessjs_create_tsv,c=r.tessjs_create_box,h=r.tessjs_create_unlv,p=r.tessjs_create_osd,l=e.GetIterator(),d=t.RIL_BLOCK,m=t.RIL_PARA,g=t.RIL_TEXTLINE,y=t.RIL_WORD,v=t.RIL_SYMBOL,b=[],w=function(e,r){return Object.keys(t).filter(function(n){return n.startsWith("".concat(r,"_"))&&t[n]===e}).map(function(t){return t.slice(r.length+1)})[0]};l.Begin();do{if(l.IsAtBeginningOf(d)){var x=l.BlockPolygon(),A=null;if(t.getPointer(x)>0){var E=x.get_n(),_=x.get_x(),S=x.get_y();A=[];for(var U=0;U0){var a=this.pos+i*n+3*this.width;t.fill(0,a,a+this.extraBytes)}}return t},t.exports=function(t,e){return void 0===e&&(e=100),{data:new r(t).encode(),width:t.width,height:t.height}}}).call(this,r(1).Buffer)},function(t,e,r){(function(e){function r(t,e){if(this.pos=0,this.buffer=t,this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=this.buffer.toString("utf-8",0,this.pos+=2),"BM"!=this.flag)throw new Error("Invalid BMP File");this.parseHeader(),this.parseRGBA()}r.prototype.parseHeader=function(){if(this.fileSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.reserved=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.offset=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.headerSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.width=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.height=this.buffer.readInt32LE(this.pos),this.pos+=4,this.planes=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.bitPP=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.compress=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.rawSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.hr=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.vr=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.colors=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.importantColors=this.buffer.readUInt32LE(this.pos),this.pos+=4,16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var t=0===this.colors?1<=0?this.height-1:-this.height;for(r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i>7-a&1];this.data[s+4*a]=0,this.data[s+4*a+1]=f.blue,this.data[s+4*a+2]=f.green,this.data[s+4*a+3]=f.red}0!=e&&(this.pos+=4-e)}},r.prototype.bit4=function(){if(2==this.compress){var t=function(t){var r=this.palette[t];this.data[e]=0,this.data[e+1]=r.blue,this.data[e+2]=r.green,this.data[e+3]=r.red,e+=4};this.data.fill(255);for(var e=0,r=this.bottom_up?this.height-1:0,n=!1;e>4),1&u&&u+1>1&1)&&this.pos++}}else for(u=0;u>4),n=!n}}else{var c=Math.ceil(this.width/2),h=c%4;for(a=this.height-1;a>=0;a--){var p=this.bottom_up?a:this.height-1-a;for(s=0;s>4,d=15&o,m=this.palette[l];if(this.data[e]=0,this.data[e+1]=m.blue,this.data[e+2]=m.green,this.data[e+3]=m.red,2*s+1>=this.width)break;m=this.palette[d],this.data[e+4]=0,this.data[e+4+1]=m.blue,this.data[e+4+2]=m.green,this.data[e+4+3]=m.red}0!=h&&(this.pos+=4-h)}}},r.prototype.bit8=function(){if(1==this.compress){var t=function(t){var r=this.palette[t];this.data[e]=0,this.data[e+1]=r.blue,this.data[e+2]=r.green,this.data[e+3]=r.red,e+=4};this.data.fill(255);for(var e=0,r=this.bottom_up?this.height-1:0;e=0;s--){var c=this.bottom_up?s:this.height-1-s;for(o=0;o=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i>5&e)/e*255|0,f=(o>>10&e)/e*255|0,u=o>>15?255:0,c=n*this.width*4+4*i;this.data[c]=u,this.data[c+1]=s,this.data[c+2]=a,this.data[c+3]=f}this.pos+=t}},r.prototype.bit16=function(){var t=this.width%2*2;this.maskRed=31744,this.maskGreen=992,this.maskBlue=31,this.mask0=0,3==this.compress&&(this.maskRed=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskGreen=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskBlue=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.mask0=this.buffer.readUInt32LE(this.pos),this.pos+=4);for(var e=[0,0,0],r=0;r<16;r++)this.maskRed>>r&1&&e[0]++,this.maskGreen>>r&1&&e[1]++,this.maskBlue>>r&1&&e[2]++;e[1]+=e[0],e[2]+=e[1],e[0]=8-e[0],e[1]-=8,e[2]-=8;for(var n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,o=0;o>e[1],u=(s&this.maskRed)>>e[2],c=i*this.width*4+4*o;this.data[c]=0,this.data[c+1]=a,this.data[c+2]=f,this.data[c+3]=u}this.pos+=t}},r.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,r=0;r=0;t--)for(var e=this.bottom_up?t:this.height-1-t,r=0;r=0;t--)for(e=this.bottom_up?t:this.height-1-t,r=0;r>>8&255]<<16|l[t>>>16&255]<<8|l[t>>>24&255])>>32-e:l[t]>>8-e),8>e+s)a=a<>e-n-1&1,8==++s&&(s=0,i[o++]=l[a],a=0,o===i.length&&(i=this.f()));i[o]=a,this.buffer=i,this.m=s,this.index=o},a.prototype.finish=function(){var t,e=this.buffer,r=this.index;return 0f;++f){for(var c=p=f,h=7,p=p>>>1;p;p>>>=1)c<<=1,c|=1&p,--h;u[f]=(c<>>0}var l=u;function d(t,e,r){var n,i="number"==typeof e?e:e=0,o="number"==typeof r?r:t.length;for(n=-1,i=7&o;i--;++e)n=n>>>8^g[255&(n^t[e])];for(i=o>>3;i--;e+=8)n=(n=(n=(n=(n=(n=(n=(n=n>>>8^g[255&(n^t[e])])>>>8^g[255&(n^t[e+1])])>>>8^g[255&(n^t[e+2])])>>>8^g[255&(n^t[e+3])])>>>8^g[255&(n^t[e+4])])>>>8^g[255&(n^t[e+5])])>>>8^g[255&(n^t[e+6])])>>>8^g[255&(n^t[e+7])];return(4294967295^n)>>>0}var m=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],g=s?new Uint32Array(m):m;function y(){}function v(t){this.buffer=new(s?Uint16Array:Array)(2*t),this.length=0}function b(t){var e,r,n,i,o,a,f,u,c,h,p=t.length,l=0,d=Number.POSITIVE_INFINITY;for(u=0;ul&&(l=t[u]),t[u]>=1;for(h=n<<16|u,c=a;co[n]);)i=o[r],o[r]=o[n],o[n]=i,i=o[r+1],o[r+1]=o[n+1],o[n+1]=i,r=n;return this.length},v.prototype.pop=function(){var t,e,r,n,i,o=this.buffer;for(e=o[0],t=o[1],this.length-=2,o[0]=o[this.length],o[1]=o[this.length+1],i=0;!((n=2*i+2)>=this.length)&&(n+2o[n]&&(n+=2),o[n]>o[i]);)r=o[i],o[i]=o[n],o[n]=r,r=o[i+1],o[i+1]=o[n+1],o[n+1]=r,i=n;return{index:t,value:e,length:this.length}};var x,A=2,E={NONE:0,L:1,t:A,X:3},_=[];for(x=0;288>x;x++)switch(o){case 143>=x:_.push([x+48,8]);break;case 255>=x:_.push([x-144+400,9]);break;case 279>=x:_.push([x-256+0,7]);break;case 287>=x:_.push([x-280+192,8]);break;default:n("invalid literal: "+x)}function S(t,e){this.length=t,this.N=e}w.prototype.h=function(){var t,e,r,f,u=this.input;switch(this.k){case 0:for(r=0,f=u.length;r>>8&255,y[v++]=255&p,y[v++]=p>>>8&255,s)y.set(l,v),v+=l.length,y=y.subarray(0,v);else{for(m=0,g=l.length;mK)for(;0K?K:138)>K-3&&$=$?(rt[Z++]=17,rt[Z++]=$-3,nt[17]++):(rt[Z++]=18,rt[Z++]=$-11,nt[18]++),K-=$;else if(rt[Z++]=et[W],nt[et[W]]++,3>--K)for(;0K?K:6)>K-3&&$Y;Y++)V[Y]=N[H[Y]];for(R=19;4=t:return[265,t-11,1];case 14>=t:return[266,t-13,1];case 16>=t:return[267,t-15,1];case 18>=t:return[268,t-17,1];case 22>=t:return[269,t-19,2];case 26>=t:return[270,t-23,2];case 30>=t:return[271,t-27,2];case 34>=t:return[272,t-31,2];case 42>=t:return[273,t-35,3];case 50>=t:return[274,t-43,3];case 58>=t:return[275,t-51,3];case 66>=t:return[276,t-59,3];case 82>=t:return[277,t-67,4];case 98>=t:return[278,t-83,4];case 114>=t:return[279,t-99,4];case 130>=t:return[280,t-115,4];case 162>=t:return[281,t-131,5];case 194>=t:return[282,t-163,5];case 226>=t:return[283,t-195,5];case 257>=t:return[284,t-227,5];case 258===t:return[285,t-258,0];default:n("invalid length: "+t)}}var e,r,i=[];for(e=3;258>=e;e++)r=t(e),i[e]=r[2]<<24|r[1]<<16|r[0];return i}(),k=s?new Uint32Array(U):U;function T(t,e){function r(t,e){var r,i,s,a,f=t.N,u=[],c=0;switch(r=k[t.length],u[c++]=65535&r,u[c++]=r>>16&255,u[c++]=r>>24,o){case 1===f:i=[0,f-1,0];break;case 2===f:i=[1,f-2,0];break;case 3===f:i=[2,f-3,0];break;case 4===f:i=[3,f-4,0];break;case 6>=f:i=[4,f-5,1];break;case 8>=f:i=[5,f-7,1];break;case 12>=f:i=[6,f-9,2];break;case 16>=f:i=[7,f-13,2];break;case 24>=f:i=[8,f-17,3];break;case 32>=f:i=[9,f-25,3];break;case 48>=f:i=[10,f-33,4];break;case 64>=f:i=[11,f-49,4];break;case 96>=f:i=[12,f-65,5];break;case 128>=f:i=[13,f-97,5];break;case 192>=f:i=[14,f-129,6];break;case 256>=f:i=[15,f-193,6];break;case 384>=f:i=[16,f-257,7];break;case 512>=f:i=[17,f-385,7];break;case 768>=f:i=[18,f-513,8];break;case 1024>=f:i=[19,f-769,8];break;case 1536>=f:i=[20,f-1025,9];break;case 2048>=f:i=[21,f-1537,9];break;case 3072>=f:i=[22,f-2049,10];break;case 4096>=f:i=[23,f-3073,10];break;case 6144>=f:i=[24,f-4097,11];break;case 8192>=f:i=[25,f-6145,11];break;case 12288>=f:i=[26,f-8193,12];break;case 16384>=f:i=[27,f-12289,12];break;case 24576>=f:i=[28,f-16385,13];break;case 32768>=f:i=[29,f-24577,13];break;default:n("invalid distance")}for(r=i,u[c++]=r[0],u[c++]=r[1],u[c++]=r[2],s=0,a=u.length;s=u;)w[u++]=0;for(u=0;29>=u;)x[u++]=0}for(w[256]=1,a=0,f=e.length;a=f){for(d&&r(d,-1),u=0,c=f-a;uo&&e+ou&&(i=n,u=o),258===o)break}return new S(u,e-i)}function B(t,e){var r,n,i,o,a,f=t.length,u=new v(572),c=new(s?Uint8Array:Array)(f);if(!s)for(o=0;o2*c[o-1]+h[o]&&(c[o]=2*c[o-1]+h[o]),l[o]=Array(c[o]),d[o]=Array(c[o]);for(i=0;it[i]?(l[o][a]=f,d[o][a]=e,u+=2):(l[o][a]=t[i],d[o][a]=i,++i);m[o]=0,1===h[o]&&n(o)}return p}(n,n.length,e),o=0,a=r.length;o>>=1;return o}function L(t,e){this.input=t,this.b=this.c=0,this.g={},e&&(e.flags&&(this.g=e.flags),"string"==typeof e.filename&&(this.filename=e.filename),"string"==typeof e.comment&&(this.w=e.comment),e.deflateOptions&&(this.l=e.deflateOptions)),this.l||(this.l={})}L.prototype.h=function(){var t,e,r,n,o,a,f,u,c=new(s?Uint8Array:Array)(32768),h=0,p=this.input,l=this.c,m=this.filename,g=this.w;if(c[h++]=31,c[h++]=139,c[h++]=8,t=0,this.g.fname&&(t|=j),this.g.fcomment&&(t|=C),this.g.fhcrc&&(t|=O),c[h++]=t,e=(Date.now?Date.now():+new Date)/1e3|0,c[h++]=255&e,c[h++]=e>>>8&255,c[h++]=e>>>16&255,c[h++]=e>>>24&255,c[h++]=0,c[h++]=R,this.g.fname!==i){for(f=0,u=m.length;f>>8&255),c[h++]=255&a;c[h++]=0}if(this.g.comment){for(f=0,u=g.length;f>>8&255),c[h++]=255&a;c[h++]=0}return this.g.fhcrc&&(r=65535&d(c,0,h),c[h++]=255&r,c[h++]=r>>>8&255),this.l.outputBuffer=c,this.l.outputIndex=h,c=(o=new w(p,this.l)).h(),h=o.b,s&&(h+8>c.buffer.byteLength?(this.a=new Uint8Array(h+8),this.a.set(new Uint8Array(c.buffer)),c=this.a):c=new Uint8Array(c.buffer)),n=d(p,i,i),c[h++]=255&n,c[h++]=n>>>8&255,c[h++]=n>>>16&255,c[h++]=n>>>24&255,u=p.length,c[h++]=255&u,c[h++]=u>>>8&255,c[h++]=u>>>16&255,c[h++]=u>>>24&255,this.c=l,s&&h>>=1){case 0:var e=this.input,r=this.c,a=this.a,f=this.b,u=e.length,c=i,h=a.length,p=i;switch(this.e=this.j=0,r+1>=u&&n(Error("invalid uncompressed block header: LEN")),c=e[r++]|e[r++]<<8,r+1>=u&&n(Error("invalid uncompressed block header: NLEN")),c===~(e[r++]|e[r++]<<8)&&n(Error("invalid uncompressed block header: length verify")),r+c>e.length&&n(Error("input buffer is broken")),this.q){case N:for(;f+c>a.length;){if(c-=p=h-f,s)a.set(e.subarray(r,r+p),f),f+=p,r+=p;else for(;p--;)a[f++]=e[r++];this.b=f,a=this.f(),f=this.b}break;case D:for(;f+c>a.length;)a=this.f({B:2});break;default:n(Error("invalid inflate mode"))}if(s)a.set(e.subarray(r,r+c),f),f+=c,r+=c;else for(;c--;)a[f++]=e[r++];this.c=r,this.b=f,this.a=a;break;case 1:this.r(et,nt);break;case 2:var l,d,m,g,y=it(this,5)+257,v=it(this,5)+1,w=it(this,4)+4,x=new(s?Uint8Array:Array)(q.length),A=i,E=i,_=i,S=i,U=i;for(U=0;U=M?8:255>=M?9:279>=M?7:8;var Q,tt,et=b($),rt=new(s?Uint8Array:Array)(30);for(Q=0,tt=rt.length;Q=f&&n(Error("input buffer is broken")),i|=s[a++]<>>e,t.e=o-e,t.c=a,r}function ot(t,e){for(var r,i,o=t.j,s=t.e,a=t.input,f=t.c,u=a.length,c=e[0],h=e[1];s=u);)o|=a[f++]<>>16)>s&&n(Error("invalid code length: "+i)),t.j=o>>i,t.e=s-i,t.c=f,65535&r}function st(t){this.input=t,this.c=0,this.G=[],this.R=!1}function at(t){if("string"==typeof t){var e,r,n=t.split("");for(e=0,r=n.length;e>>0;t=n}for(var i,o=1,s=0,a=t.length,f=0;0>>0}function ft(t,e){var r,i;switch(this.input=t,this.c=0,!e&&(e={})||(e.index&&(this.c=e.index),e.verify&&(this.V=e.verify)),r=t[this.c++],i=t[this.c++],15&r){case ut:this.method=ut;break;default:n(Error("unsupported compression method"))}0!=((r<<8)+i)%31&&n(Error("invalid fcheck flag:"+((r<<8)+i)%31)),32&i&&n(Error("fdict flag is not supported")),this.J=new z(t,{index:this.c,bufferSize:e.bufferSize,bufferType:e.bufferType,resize:e.resize})}z.prototype.r=function(t,e){var r=this.a,n=this.b;this.A=t;for(var i,o,s,a,f=r.length-258;256!==(i=ot(this,t));)if(256>i)n>=f&&(this.b=n,r=this.f(),n=this.b),r[n++]=i;else for(a=H[o=i-257],0=f&&(this.b=n,r=this.f(),n=this.b);a--;)r[n]=r[n++-s];for(;8<=this.e;)this.e-=8,this.c--;this.b=n},z.prototype.Q=function(t,e){var r=this.a,n=this.b;this.A=t;for(var i,o,s,a,f=r.length;256!==(i=ot(this,t));)if(256>i)n>=f&&(f=(r=this.f()).length),r[n++]=i;else for(a=H[o=i-257],0f&&(f=(r=this.f()).length);a--;)r[n]=r[n++-s];for(;8<=this.e;)this.e-=8,this.c--;this.b=n},z.prototype.f=function(){var t,e,r=new(s?Uint8Array:Array)(this.b-32768),n=this.b-32768,i=this.a;if(s)r.set(i.subarray(32768,r.length));else for(t=0,e=r.length;tt;++t)i[t]=i[n+t];return this.b=32768,i},z.prototype.S=function(t){var e,r,n,i=this.input.length/this.c+1|0,o=this.input,a=this.a;return t&&("number"==typeof t.B&&(i=t.B),"number"==typeof t.M&&(i+=t.M)),2>i?r=(n=(o.length-this.c)/this.A[2]/2*258|0)e&&(this.a.length=e),t=this.a),this.buffer=t},st.prototype.i=function(){for(var t=this.input.length;this.c>>0,d(e,i,i)!==m&&n(Error("invalid CRC-32 checksum: 0x"+d(e,i,i).toString(16)+" / 0x"+m.toString(16))),a.Z=f=(g[v++]|g[v++]<<8|g[v++]<<16|g[v++]<<24)>>>0,(4294967295&e.length)!==f&&n(Error("invalid input size: "+(4294967295&e.length)+" / "+f)),this.G.push(a),this.c=v}this.R=o;var b,w,x,A=this.G,E=0,_=0;for(b=0,w=A.length;b>>0!==at(t)&&n(Error("invalid adler-32 checksum"))),t};var ut=8;function ct(t,e){this.input=t,this.a=new(s?Uint8Array:Array)(32768),this.k=ht.t;var r,n={};for(r in!e&&(e={})||"number"!=typeof e.compressionType||(this.k=e.compressionType),e)n[r]=e[r];n.outputBuffer=this.a,this.I=new w(this.input,n)}var ht=E;function pt(t,e){var r;return r=new ct(t).h(),e||(e={}),e.H?r:gt(r)}function lt(t,e){var r;return t.subarray=t.slice,r=new ft(t).i(),e||(e={}),e.noBuffer?r:gt(r)}function dt(t,e){var r;return t.subarray=t.slice,r=new L(t).h(),e||(e={}),e.H?r:gt(r)}function mt(t,e){var r;return t.subarray=t.slice,r=new st(t).i(),e||(e={}),e.H?r:gt(r)}function gt(t){var e,n,i=new r(t.length);for(e=0,n=t.length;e>24&255,f[u++]=a>>16&255,f[u++]=a>>8&255,f[u++]=255&a,f},e.deflate=function(e,r,n){t.nextTick(function(){var t,i;try{i=pt(e,n)}catch(e){t=e}r(t,i)})},e.deflateSync=pt,e.inflate=function(e,r,n){t.nextTick(function(){var t,i;try{i=lt(e,n)}catch(e){t=e}r(t,i)})},e.inflateSync=lt,e.gzip=function(e,r,n){t.nextTick(function(){var t,i;try{i=dt(e,n)}catch(e){t=e}r(t,i)})},e.gzipSync=dt,e.gunzip=function(e,r,n){t.nextTick(function(){var t,i;try{i=mt(e,n)}catch(e){t=e}r(t,i)})},e.gunzipSync=mt}).call(this)}).call(this,r(3),r(1).Buffer)},function(t,e,r){t.exports=r(53)},function(t,e,r){var n,i;void 0===(i="function"==typeof(n=function(){return function(){var t=arguments.length;if(0===t)throw new Error("resolveUrl requires at least one argument; got none.");var e=document.createElement("base");if(e.href=arguments[0],1===t)return e.href;var r=document.getElementsByTagName("head")[0];r.insertBefore(e,r.firstChild);for(var n,i=document.createElement("a"),o=1;o0&&void 0!==arguments[0]?arguments[0]:"keyval-store",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"keyval";!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storeName=r,this._dbp=new Promise(function(t,n){var i=indexedDB.open(e,1);i.onerror=function(){return n(i.error)},i.onsuccess=function(){return t(i.result)},i.onupgradeneeded=function(){i.result.createObjectStore(r)}})}var e,r,i;return e=t,(r=[{key:"_withIDBStore",value:function(t,e){var r=this;return this._dbp.then(function(n){return new Promise(function(i,o){var s=n.transaction(r.storeName,t);s.oncomplete=function(){return i()},s.onabort=s.onerror=function(){return o(s.error)},e(s.objectStore(r.storeName))})})}}])&&n(e.prototype,r),i&&n(e,i),t}();function s(){return i||(i=new o),i}function a(t){var e;return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:s())._withIDBStore("readonly",function(r){e=r.get(t)}).then(function(){return e.result})}function f(t,e){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:s())._withIDBStore("readwrite",function(r){r.put(e,t)})}function u(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:s())._withIDBStore("readwrite",function(e){e.delete(t)})}function c(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:s())._withIDBStore("readwrite",function(t){t.clear()})}function h(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s(),e=[];return t._withIDBStore("readonly",function(t){(t.openKeyCursor||t.openCursor).call(t).onsuccess=function(){this.result&&(e.push(this.result.key),this.result.continue())}}).then(function(){return e})}}]); 17 | //# sourceMappingURL=worker.min.js.map -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Tesseract.js Chrome Extension Example", 3 | "version": "1.0", 4 | "description": "Tesseract.js Chrome Extension Example", 5 | "manifest_version": 2, 6 | "browser_action": { 7 | "default_popup": "index.html" 8 | }, 9 | "web_accessible_resources": [ 10 | "js/worker.min.js", 11 | "js/tessearct-core.wasm.js", 12 | "traineddata/*.traineddata.gz" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "requires": true, 3 | "lockfileVersion": 1, 4 | "dependencies": { 5 | "abstract-leveldown": { 6 | "version": "0.12.4", 7 | "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-0.12.4.tgz", 8 | "integrity": "sha1-KeGOYy5g5OIh1YECR4UqY9ey5BA=", 9 | "requires": { 10 | "xtend": "~3.0.0" 11 | }, 12 | "dependencies": { 13 | "xtend": { 14 | "version": "3.0.0", 15 | "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", 16 | "integrity": "sha1-XM50B7r2Qsunvs2laBEcST9ZZlo=" 17 | } 18 | } 19 | }, 20 | "encoding": { 21 | "version": "0.1.12", 22 | "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", 23 | "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", 24 | "requires": { 25 | "iconv-lite": "~0.4.13" 26 | } 27 | }, 28 | "file-type": { 29 | "version": "3.9.0", 30 | "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", 31 | "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=" 32 | }, 33 | "iconv-lite": { 34 | "version": "0.4.24", 35 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 36 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 37 | "requires": { 38 | "safer-buffer": ">= 2.1.2 < 3" 39 | } 40 | }, 41 | "idb-wrapper": { 42 | "version": "1.7.2", 43 | "resolved": "https://registry.npmjs.org/idb-wrapper/-/idb-wrapper-1.7.2.tgz", 44 | "integrity": "sha512-zfNREywMuf0NzDo9mVsL0yegjsirJxHpKHvWcyRozIqQy89g0a3U+oBPOCN4cc0oCiOuYgZHimzaW/R46G1Mpg==" 45 | }, 46 | "is-stream": { 47 | "version": "1.1.0", 48 | "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", 49 | "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" 50 | }, 51 | "is-url": { 52 | "version": "1.2.2", 53 | "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.2.tgz", 54 | "integrity": "sha1-SYkFpZO/R8wtnn9zg3K792lsfyY=" 55 | }, 56 | "isbuffer": { 57 | "version": "0.0.0", 58 | "resolved": "https://registry.npmjs.org/isbuffer/-/isbuffer-0.0.0.tgz", 59 | "integrity": "sha1-OMFG2d9Si4v5sHAcPUPPEt8/w5s=" 60 | }, 61 | "isomorphic-fetch": { 62 | "version": "2.2.1", 63 | "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", 64 | "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", 65 | "requires": { 66 | "node-fetch": "^1.0.1", 67 | "whatwg-fetch": ">=0.10.0" 68 | } 69 | }, 70 | "jpeg-js": { 71 | "version": "0.2.0", 72 | "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.2.0.tgz", 73 | "integrity": "sha1-U+RI7J0mPmgyZkZ+lELSxaLvVII=" 74 | }, 75 | "level-js": { 76 | "version": "2.2.4", 77 | "resolved": "https://registry.npmjs.org/level-js/-/level-js-2.2.4.tgz", 78 | "integrity": "sha1-vAVfQYBjXUSJtWHJSG+jcOjBFpc=", 79 | "requires": { 80 | "abstract-leveldown": "~0.12.0", 81 | "idb-wrapper": "^1.5.0", 82 | "isbuffer": "~0.0.0", 83 | "ltgt": "^2.1.2", 84 | "typedarray-to-buffer": "~1.0.0", 85 | "xtend": "~2.1.2" 86 | } 87 | }, 88 | "ltgt": { 89 | "version": "2.2.1", 90 | "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", 91 | "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=" 92 | }, 93 | "node-fetch": { 94 | "version": "1.7.3", 95 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", 96 | "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", 97 | "requires": { 98 | "encoding": "^0.1.11", 99 | "is-stream": "^1.0.1" 100 | } 101 | }, 102 | "object-assign": { 103 | "version": "4.1.1", 104 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 105 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" 106 | }, 107 | "object-keys": { 108 | "version": "0.4.0", 109 | "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", 110 | "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=" 111 | }, 112 | "png.js": { 113 | "version": "0.2.1", 114 | "resolved": "https://registry.npmjs.org/png.js/-/png.js-0.2.1.tgz", 115 | "integrity": "sha1-2muDwTS9wQGUDZqxyY6RVK/7sfI=" 116 | }, 117 | "safer-buffer": { 118 | "version": "2.1.2", 119 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 120 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 121 | }, 122 | "tesseract.js": { 123 | "version": "1.0.19", 124 | "resolved": "https://registry.npmjs.org/tesseract.js/-/tesseract.js-1.0.19.tgz", 125 | "integrity": "sha512-UXnCd2GkDOuVwPYv8MryzDwXEPLJ/BjEuT76PWzVC8XhZbsChRkpoiKDSGDbZ2BW2rwg1yBWJ0joSdCTw1umBA==", 126 | "requires": { 127 | "file-type": "^3.8.0", 128 | "is-url": "1.2.2", 129 | "isomorphic-fetch": "^2.2.1", 130 | "jpeg-js": "^0.2.0", 131 | "level-js": "^2.2.4", 132 | "node-fetch": "^1.6.3", 133 | "object-assign": "^4.1.0", 134 | "png.js": "^0.2.1", 135 | "tesseract.js-core": "^1.0.2" 136 | } 137 | }, 138 | "tesseract.js-core": { 139 | "version": "1.0.2", 140 | "resolved": "https://registry.npmjs.org/tesseract.js-core/-/tesseract.js-core-1.0.2.tgz", 141 | "integrity": "sha1-HOM6KdyBI1e4NWow7e34sYgEOzc=" 142 | }, 143 | "typedarray-to-buffer": { 144 | "version": "1.0.4", 145 | "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-1.0.4.tgz", 146 | "integrity": "sha1-m7i6DoQfs/TPH+fCRenz+opf6Zw=" 147 | }, 148 | "whatwg-fetch": { 149 | "version": "3.0.0", 150 | "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz", 151 | "integrity": "sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q==" 152 | }, 153 | "xtend": { 154 | "version": "2.1.2", 155 | "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", 156 | "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", 157 | "requires": { 158 | "object-keys": "~0.4.0" 159 | } 160 | } 161 | } 162 | } 163 | -------------------------------------------------------------------------------- /traineddata/eng.traineddata.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeromewu/tesseract.js-chrome-extension/8fac10ad33812985e8a246c2916e6bf1747accc4/traineddata/eng.traineddata.gz --------------------------------------------------------------------------------