You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
quaggaJS/dist/quagga.min.js

1 line
84 KiB
JavaScript

var Quagga=function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(e.toString()).default:"object"==typeof exports?exports.Quagga=e(e.toString()).default:t.Quagga=e(e.toString()).default}(this,function(t){return 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}return 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=30)}([function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},function(t,e){function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},r(e)}t.exports=r},function(t,e,r){var n=r(12),i=r(6);t.exports=function(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?i(t):e}},function(t,e,r){var n=r(25);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)}},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e,r){t.exports=r(27)},function(t,e,r){r(3);var n=r(26);function i(e,r,a){return"undefined"!=typeof Reflect&&Reflect.get?t.exports=i=Reflect.get:t.exports=i=function(t,e,r){var i=n(t,e);if(i){var a=Object.getOwnPropertyDescriptor(i,e);return a.get?a.get.call(r):a.value}},i(e,r,a||e)}t.exports=i},function(t,e,r){"use strict";r.d(e,"a",function(){return h});var n=r(2),i=r.n(n),a=r(1),o=r.n(a),s=r(0),u=r.n(s),c=r(15),h=function(){function t(e,r,n,a){i()(this,t),u()(this,"data",void 0),u()(this,"size",void 0),r?this.data=r:(this.data=new(n||Uint8Array)(e.x*e.y),a&&this.data.fill(0)),this.size=e}return o()(t,[{key:"inImageWithBorder",value:function(t,e){return t.x>=e&&t.y>=e&&t.x<this.size.x-e&&t.y<this.size.y-e}},{key:"subImageAsCopy",value:function(t,e,r){for(var n=t.size.y,i=t.size.x,a=0;a<i;a++)for(var o=0;o<n;o++)t.data[o*i+a]=this.data[(r+o)*this.size.x+e+a]}},{key:"get",value:function(t,e){return this.data[e*this.size.x+t]}},{key:"set",value:function(t,e,r){return this.data[e*this.size.x+t]=r,this}},{key:"zeroBorder",value:function(){for(var t=this.size.x,e=this.size.y,r=this.data,n=0;n<t;n++)r[n]=r[(e-1)*t+n]=0;for(var i=1;i<e-1;i++)r[i*t]=r[i*t+(t-1)]=0}},{key:"invert",value:function(){for(var t=this.data,e=t.length;e--;)t[e]=t[e]?0:1}},{key:"moments",value:function(t){var e=this.size.y,r=this.size.x,n=new Array,i=new Array;if(t<=0)return i;for(var a=0;a<t;a++)n[a]={m00:0,m01:0,m10:0,m11:0,m02:0,m20:0,theta:0,rad:0};for(var o=0;o<e;o++)for(var s=o*o,u=0;u<r;u++){var c=this.data[o*r+u];if(c>0){var h=n[c-1];h.m00+=1,h.m01+=o,h.m10+=u,h.m11+=u*o,h.m02+=s,h.m20+=u*u}}for(var l=Math.PI,f=l/4,d=0;d<t;d++){var v=n[d];if(!isNaN(v.m00)&&0!==v.m00){var _=v.m10/v.m00,p=v.m01/v.m00,g=v.m11/v.m00-_*p,y=v