imatrix-ui 2.8.97-dw-tmp2 → 2.8.97-dw-tmp4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/super-ui.css +1 -0
- package/lib/super-ui.umd.min.js +36 -1
- package/package.json +1 -2
- package/src/i18n/i18n.js +1 -1
- package/src/i18n/langs/cn.js +1 -1
- package/src/i18n/langs/en.js +1 -1
- package/src/permission.js +1 -1
- package/src/plugins.js +4 -4
- package/src/store/modules/permission.js +5 -0
- package/src/styles/index.scss +2 -2
- package/src/utils/permissionAuth.js +6 -0
- package/src/utils/request.js +1 -1
- package/src/views/login/index.vue +1 -1
- package/lib/css/super-ui.common~46f24e9d.f712732a.css +0 -1
- package/lib/css/super-ui.common~60a56baa.e6f54088.css +0 -1
- package/lib/css/super-ui.common~691e02b5.3387eefb.css +0 -1
- package/lib/css/super-ui.common~e2e93592.e9ec19a9.css +0 -1
- package/lib/css/super-ui.umd.min~46f24e9d.f712732a.css +0 -1
- package/lib/css/super-ui.umd.min~60a56baa.e6f54088.css +0 -1
- package/lib/css/super-ui.umd.min~691e02b5.3387eefb.css +0 -1
- package/lib/css/super-ui.umd.min~e2e93592.e9ec19a9.css +0 -1
- package/lib/css/super-ui.umd~46f24e9d.f712732a.css +0 -1
- package/lib/css/super-ui.umd~60a56baa.e6f54088.css +0 -1
- package/lib/css/super-ui.umd~691e02b5.3387eefb.css +0 -1
- package/lib/css/super-ui.umd~e2e93592.e9ec19a9.css +0 -1
- package/lib/css/vendors~super-ui.common~253ae210.b57e4bfb.css +0 -1
- package/lib/css/vendors~super-ui.umd.min~253ae210.b57e4bfb.css +0 -1
- package/lib/css/vendors~super-ui.umd~253ae210.b57e4bfb.css +0 -1
- package/lib/css/yarn.tinymce~97d7b732.ea366551.css +0 -1
- package/lib/super-ui.common.super-ui.common~46f24e9d.js +0 -12446
- package/lib/super-ui.common.super-ui.common~60a56baa.js +0 -2774
- package/lib/super-ui.common.super-ui.common~691e02b5.js +0 -3062
- package/lib/super-ui.common.super-ui.common~970f9218.js +0 -3729
- package/lib/super-ui.common.super-ui.common~bd3594d6.js +0 -5264
- package/lib/super-ui.common.super-ui.common~e2e93592.js +0 -6945
- package/lib/super-ui.common.vendors~super-ui.common~253ae210.js +0 -3504
- package/lib/super-ui.common.yarn.async-validator~7864cd12.js +0 -1225
- package/lib/super-ui.common.yarn.core-js~2b13b260.js +0 -7542
- package/lib/super-ui.common.yarn.gcommon~c5c7b9b4.js +0 -11
- package/lib/super-ui.common.yarn.gcommon~cd278a5f.js +0 -4846
- package/lib/super-ui.common.yarn.resize-observer-polyfill~7370204d.js +0 -942
- package/lib/super-ui.common.yarn.sortablejs~f811d8fd.js +0 -3714
- package/lib/super-ui.common.yarn.tinymce~253ae210.js +0 -568
- package/lib/super-ui.common.yarn.tinymce~29bc5d46.js +0 -2125
- package/lib/super-ui.common.yarn.tinymce~35f50c21.js +0 -34090
- package/lib/super-ui.common.yarn.tinymce~8a52df3b.js +0 -30088
- package/lib/super-ui.common.yarn.tinymce~97d7b732.js +0 -31
- package/lib/super-ui.common.yarn.tinymce~b5d80f29.js +0 -7936
- package/lib/super-ui.common.yarn.tinymce~c1068939.js +0 -13346
- package/lib/super-ui.common.yarn.vue-i18n~02576867.js +0 -2179
- package/lib/super-ui.common.yarn.vue-virtual-scroll-list~bd67cfcd.js +0 -1069
- package/lib/super-ui.common.yarn.zxing~3446ce64.js +0 -11996
- package/lib/super-ui.common.yarn.zxing~61a1471b.js +0 -11202
- package/lib/super-ui.common.yarn.zxing~b49f3034.js +0 -3576
- package/lib/super-ui.common.yarn.zxing~fd3cc9f3.js +0 -2916
- package/lib/super-ui.umd.min.super-ui.umd.min~46f24e9d.js +0 -2
- package/lib/super-ui.umd.min.super-ui.umd.min~60a56baa.js +0 -2
- package/lib/super-ui.umd.min.super-ui.umd.min~691e02b5.js +0 -2
- package/lib/super-ui.umd.min.super-ui.umd.min~970f9218.js +0 -2
- package/lib/super-ui.umd.min.super-ui.umd.min~bd3594d6.js +0 -2
- package/lib/super-ui.umd.min.super-ui.umd.min~e2e93592.js +0 -2
- package/lib/super-ui.umd.min.vendors~super-ui.umd.min~253ae210.js +0 -24
- package/lib/super-ui.umd.min.yarn.async-validator~7864cd12.js +0 -2
- package/lib/super-ui.umd.min.yarn.core-js~2b13b260.js +0 -2
- package/lib/super-ui.umd.min.yarn.gcommon~c5c7b9b4.js +0 -2
- package/lib/super-ui.umd.min.yarn.gcommon~cd278a5f.js +0 -26
- package/lib/super-ui.umd.min.yarn.resize-observer-polyfill~7370204d.js +0 -2
- package/lib/super-ui.umd.min.yarn.sortablejs~f811d8fd.js +0 -8
- package/lib/super-ui.umd.min.yarn.tinymce~253ae210.js +0 -2
- package/lib/super-ui.umd.min.yarn.tinymce~29bc5d46.js +0 -2
- package/lib/super-ui.umd.min.yarn.tinymce~35f50c21.js +0 -2
- package/lib/super-ui.umd.min.yarn.tinymce~8a52df3b.js +0 -2
- package/lib/super-ui.umd.min.yarn.tinymce~97d7b732.js +0 -2
- package/lib/super-ui.umd.min.yarn.tinymce~b5d80f29.js +0 -2
- package/lib/super-ui.umd.min.yarn.tinymce~c1068939.js +0 -2
- package/lib/super-ui.umd.min.yarn.vue-i18n~02576867.js +0 -7
- package/lib/super-ui.umd.min.yarn.vue-virtual-scroll-list~bd67cfcd.js +0 -8
- package/lib/super-ui.umd.min.yarn.zxing~3446ce64.js +0 -2
- package/lib/super-ui.umd.min.yarn.zxing~61a1471b.js +0 -2
- package/lib/super-ui.umd.min.yarn.zxing~b49f3034.js +0 -2
- package/lib/super-ui.umd.min.yarn.zxing~fd3cc9f3.js +0 -2
- package/lib/super-ui.umd.super-ui.umd~46f24e9d.js +0 -12446
- package/lib/super-ui.umd.super-ui.umd~60a56baa.js +0 -2774
- package/lib/super-ui.umd.super-ui.umd~691e02b5.js +0 -3062
- package/lib/super-ui.umd.super-ui.umd~970f9218.js +0 -3739
- package/lib/super-ui.umd.super-ui.umd~bd3594d6.js +0 -5264
- package/lib/super-ui.umd.super-ui.umd~e2e93592.js +0 -6945
- package/lib/super-ui.umd.vendors~super-ui.umd~253ae210.js +0 -3504
- package/lib/super-ui.umd.yarn.async-validator~7864cd12.js +0 -1225
- package/lib/super-ui.umd.yarn.core-js~2b13b260.js +0 -7542
- package/lib/super-ui.umd.yarn.gcommon~c5c7b9b4.js +0 -11
- package/lib/super-ui.umd.yarn.gcommon~cd278a5f.js +0 -4846
- package/lib/super-ui.umd.yarn.resize-observer-polyfill~7370204d.js +0 -942
- package/lib/super-ui.umd.yarn.sortablejs~f811d8fd.js +0 -3714
- package/lib/super-ui.umd.yarn.tinymce~253ae210.js +0 -568
- package/lib/super-ui.umd.yarn.tinymce~29bc5d46.js +0 -2125
- package/lib/super-ui.umd.yarn.tinymce~35f50c21.js +0 -34090
- package/lib/super-ui.umd.yarn.tinymce~8a52df3b.js +0 -30088
- package/lib/super-ui.umd.yarn.tinymce~97d7b732.js +0 -31
- package/lib/super-ui.umd.yarn.tinymce~b5d80f29.js +0 -7936
- package/lib/super-ui.umd.yarn.tinymce~c1068939.js +0 -13346
- package/lib/super-ui.umd.yarn.vue-i18n~02576867.js +0 -2179
- package/lib/super-ui.umd.yarn.vue-virtual-scroll-list~bd67cfcd.js +0 -1069
- package/lib/super-ui.umd.yarn.zxing~3446ce64.js +0 -11996
- package/lib/super-ui.umd.yarn.zxing~61a1471b.js +0 -11202
- package/lib/super-ui.umd.yarn.zxing~b49f3034.js +0 -3576
- package/lib/super-ui.umd.yarn.zxing~fd3cc9f3.js +0 -2916
|
@@ -1,3576 +0,0 @@
|
|
|
1
|
-
((typeof self !== 'undefined' ? self : this)["webpackJsonpsuper_ui"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpsuper_ui"] || []).push([[25],{
|
|
2
|
-
|
|
3
|
-
/***/ "00ec":
|
|
4
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5
|
-
|
|
6
|
-
"use strict";
|
|
7
|
-
/* harmony import */ var _LuminanceSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f20f");
|
|
8
|
-
/*
|
|
9
|
-
* Copyright 2009 ZXing authors
|
|
10
|
-
*
|
|
11
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
12
|
-
* you may not use this file except in compliance with the License.
|
|
13
|
-
* You may obtain a copy of the License at
|
|
14
|
-
*
|
|
15
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
-
*
|
|
17
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
18
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
19
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
20
|
-
* See the License for the specific language governing permissions and
|
|
21
|
-
* limitations under the License.
|
|
22
|
-
*/
|
|
23
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
24
|
-
var extendStatics = function (d, b) {
|
|
25
|
-
extendStatics = Object.setPrototypeOf ||
|
|
26
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
27
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
28
|
-
return extendStatics(d, b);
|
|
29
|
-
};
|
|
30
|
-
return function (d, b) {
|
|
31
|
-
extendStatics(d, b);
|
|
32
|
-
function __() { this.constructor = d; }
|
|
33
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
|
-
|
|
37
|
-
/*namespace com.google.zxing {*/
|
|
38
|
-
/**
|
|
39
|
-
* A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes
|
|
40
|
-
* white and vice versa, and each value becomes (255-value).
|
|
41
|
-
*
|
|
42
|
-
* @author Sean Owen
|
|
43
|
-
*/
|
|
44
|
-
var InvertedLuminanceSource = /** @class */ (function (_super) {
|
|
45
|
-
__extends(InvertedLuminanceSource, _super);
|
|
46
|
-
function InvertedLuminanceSource(delegate) {
|
|
47
|
-
var _this = _super.call(this, delegate.getWidth(), delegate.getHeight()) || this;
|
|
48
|
-
_this.delegate = delegate;
|
|
49
|
-
return _this;
|
|
50
|
-
}
|
|
51
|
-
/*@Override*/
|
|
52
|
-
InvertedLuminanceSource.prototype.getRow = function (y /*int*/, row) {
|
|
53
|
-
var sourceRow = this.delegate.getRow(y, row);
|
|
54
|
-
var width = this.getWidth();
|
|
55
|
-
for (var i = 0; i < width; i++) {
|
|
56
|
-
sourceRow[i] = /*(byte)*/ (255 - (sourceRow[i] & 0xFF));
|
|
57
|
-
}
|
|
58
|
-
return sourceRow;
|
|
59
|
-
};
|
|
60
|
-
/*@Override*/
|
|
61
|
-
InvertedLuminanceSource.prototype.getMatrix = function () {
|
|
62
|
-
var matrix = this.delegate.getMatrix();
|
|
63
|
-
var length = this.getWidth() * this.getHeight();
|
|
64
|
-
var invertedMatrix = new Uint8ClampedArray(length);
|
|
65
|
-
for (var i = 0; i < length; i++) {
|
|
66
|
-
invertedMatrix[i] = /*(byte)*/ (255 - (matrix[i] & 0xFF));
|
|
67
|
-
}
|
|
68
|
-
return invertedMatrix;
|
|
69
|
-
};
|
|
70
|
-
/*@Override*/
|
|
71
|
-
InvertedLuminanceSource.prototype.isCropSupported = function () {
|
|
72
|
-
return this.delegate.isCropSupported();
|
|
73
|
-
};
|
|
74
|
-
/*@Override*/
|
|
75
|
-
InvertedLuminanceSource.prototype.crop = function (left /*int*/, top /*int*/, width /*int*/, height /*int*/) {
|
|
76
|
-
return new InvertedLuminanceSource(this.delegate.crop(left, top, width, height));
|
|
77
|
-
};
|
|
78
|
-
/*@Override*/
|
|
79
|
-
InvertedLuminanceSource.prototype.isRotateSupported = function () {
|
|
80
|
-
return this.delegate.isRotateSupported();
|
|
81
|
-
};
|
|
82
|
-
/**
|
|
83
|
-
* @return original delegate {@link LuminanceSource} since invert undoes itself
|
|
84
|
-
*/
|
|
85
|
-
/*@Override*/
|
|
86
|
-
InvertedLuminanceSource.prototype.invert = function () {
|
|
87
|
-
return this.delegate;
|
|
88
|
-
};
|
|
89
|
-
/*@Override*/
|
|
90
|
-
InvertedLuminanceSource.prototype.rotateCounterClockwise = function () {
|
|
91
|
-
return new InvertedLuminanceSource(this.delegate.rotateCounterClockwise());
|
|
92
|
-
};
|
|
93
|
-
/*@Override*/
|
|
94
|
-
InvertedLuminanceSource.prototype.rotateCounterClockwise45 = function () {
|
|
95
|
-
return new InvertedLuminanceSource(this.delegate.rotateCounterClockwise45());
|
|
96
|
-
};
|
|
97
|
-
return InvertedLuminanceSource;
|
|
98
|
-
}(_LuminanceSource__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]));
|
|
99
|
-
/* harmony default export */ __webpack_exports__["a"] = (InvertedLuminanceSource);
|
|
100
|
-
//# sourceMappingURL=InvertedLuminanceSource.js.map
|
|
101
|
-
|
|
102
|
-
/***/ }),
|
|
103
|
-
|
|
104
|
-
/***/ "0c36":
|
|
105
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
106
|
-
|
|
107
|
-
"use strict";
|
|
108
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return HTMLCanvasElementLuminanceSource; });
|
|
109
|
-
/* harmony import */ var _core_InvertedLuminanceSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("00ec");
|
|
110
|
-
/* harmony import */ var _core_LuminanceSource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("f20f");
|
|
111
|
-
/* harmony import */ var _core_IllegalArgumentException__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("f0a7");
|
|
112
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
113
|
-
var extendStatics = function (d, b) {
|
|
114
|
-
extendStatics = Object.setPrototypeOf ||
|
|
115
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
116
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
117
|
-
return extendStatics(d, b);
|
|
118
|
-
};
|
|
119
|
-
return function (d, b) {
|
|
120
|
-
extendStatics(d, b);
|
|
121
|
-
function __() { this.constructor = d; }
|
|
122
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
123
|
-
};
|
|
124
|
-
})();
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* @deprecated Moving to @zxing/browser
|
|
130
|
-
*/
|
|
131
|
-
var HTMLCanvasElementLuminanceSource = /** @class */ (function (_super) {
|
|
132
|
-
__extends(HTMLCanvasElementLuminanceSource, _super);
|
|
133
|
-
function HTMLCanvasElementLuminanceSource(canvas) {
|
|
134
|
-
var _this = _super.call(this, canvas.width, canvas.height) || this;
|
|
135
|
-
_this.canvas = canvas;
|
|
136
|
-
_this.tempCanvasElement = null;
|
|
137
|
-
_this.buffer = HTMLCanvasElementLuminanceSource.makeBufferFromCanvasImageData(canvas);
|
|
138
|
-
return _this;
|
|
139
|
-
}
|
|
140
|
-
HTMLCanvasElementLuminanceSource.makeBufferFromCanvasImageData = function (canvas) {
|
|
141
|
-
var imageData = canvas.getContext('2d').getImageData(0, 0, canvas.width, canvas.height);
|
|
142
|
-
return HTMLCanvasElementLuminanceSource.toGrayscaleBuffer(imageData.data, canvas.width, canvas.height);
|
|
143
|
-
};
|
|
144
|
-
HTMLCanvasElementLuminanceSource.toGrayscaleBuffer = function (imageBuffer, width, height) {
|
|
145
|
-
var grayscaleBuffer = new Uint8ClampedArray(width * height);
|
|
146
|
-
for (var i = 0, j = 0, length_1 = imageBuffer.length; i < length_1; i += 4, j++) {
|
|
147
|
-
var gray = void 0;
|
|
148
|
-
var alpha = imageBuffer[i + 3];
|
|
149
|
-
// The color of fully-transparent pixels is irrelevant. They are often, technically, fully-transparent
|
|
150
|
-
// black (0 alpha, and then 0 RGB). They are often used, of course as the "white" area in a
|
|
151
|
-
// barcode image. Force any such pixel to be white:
|
|
152
|
-
if (alpha === 0) {
|
|
153
|
-
gray = 0xFF;
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
var pixelR = imageBuffer[i];
|
|
157
|
-
var pixelG = imageBuffer[i + 1];
|
|
158
|
-
var pixelB = imageBuffer[i + 2];
|
|
159
|
-
// .299R + 0.587G + 0.114B (YUV/YIQ for PAL and NTSC),
|
|
160
|
-
// (306*R) >> 10 is approximately equal to R*0.299, and so on.
|
|
161
|
-
// 0x200 >> 10 is 0.5, it implements rounding.
|
|
162
|
-
gray = (306 * pixelR +
|
|
163
|
-
601 * pixelG +
|
|
164
|
-
117 * pixelB +
|
|
165
|
-
0x200) >> 10;
|
|
166
|
-
}
|
|
167
|
-
grayscaleBuffer[j] = gray;
|
|
168
|
-
}
|
|
169
|
-
return grayscaleBuffer;
|
|
170
|
-
};
|
|
171
|
-
HTMLCanvasElementLuminanceSource.prototype.getRow = function (y /*int*/, row) {
|
|
172
|
-
if (y < 0 || y >= this.getHeight()) {
|
|
173
|
-
throw new _core_IllegalArgumentException__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"]('Requested row is outside the image: ' + y);
|
|
174
|
-
}
|
|
175
|
-
var width = this.getWidth();
|
|
176
|
-
var start = y * width;
|
|
177
|
-
if (row === null) {
|
|
178
|
-
row = this.buffer.slice(start, start + width);
|
|
179
|
-
}
|
|
180
|
-
else {
|
|
181
|
-
if (row.length < width) {
|
|
182
|
-
row = new Uint8ClampedArray(width);
|
|
183
|
-
}
|
|
184
|
-
// The underlying raster of image consists of bytes with the luminance values
|
|
185
|
-
// TODO: can avoid set/slice?
|
|
186
|
-
row.set(this.buffer.slice(start, start + width));
|
|
187
|
-
}
|
|
188
|
-
return row;
|
|
189
|
-
};
|
|
190
|
-
HTMLCanvasElementLuminanceSource.prototype.getMatrix = function () {
|
|
191
|
-
return this.buffer;
|
|
192
|
-
};
|
|
193
|
-
HTMLCanvasElementLuminanceSource.prototype.isCropSupported = function () {
|
|
194
|
-
return true;
|
|
195
|
-
};
|
|
196
|
-
HTMLCanvasElementLuminanceSource.prototype.crop = function (left /*int*/, top /*int*/, width /*int*/, height /*int*/) {
|
|
197
|
-
_super.prototype.crop.call(this, left, top, width, height);
|
|
198
|
-
return this;
|
|
199
|
-
};
|
|
200
|
-
/**
|
|
201
|
-
* This is always true, since the image is a gray-scale image.
|
|
202
|
-
*
|
|
203
|
-
* @return true
|
|
204
|
-
*/
|
|
205
|
-
HTMLCanvasElementLuminanceSource.prototype.isRotateSupported = function () {
|
|
206
|
-
return true;
|
|
207
|
-
};
|
|
208
|
-
HTMLCanvasElementLuminanceSource.prototype.rotateCounterClockwise = function () {
|
|
209
|
-
this.rotate(-90);
|
|
210
|
-
return this;
|
|
211
|
-
};
|
|
212
|
-
HTMLCanvasElementLuminanceSource.prototype.rotateCounterClockwise45 = function () {
|
|
213
|
-
this.rotate(-45);
|
|
214
|
-
return this;
|
|
215
|
-
};
|
|
216
|
-
HTMLCanvasElementLuminanceSource.prototype.getTempCanvasElement = function () {
|
|
217
|
-
if (null === this.tempCanvasElement) {
|
|
218
|
-
var tempCanvasElement = this.canvas.ownerDocument.createElement('canvas');
|
|
219
|
-
tempCanvasElement.width = this.canvas.width;
|
|
220
|
-
tempCanvasElement.height = this.canvas.height;
|
|
221
|
-
this.tempCanvasElement = tempCanvasElement;
|
|
222
|
-
}
|
|
223
|
-
return this.tempCanvasElement;
|
|
224
|
-
};
|
|
225
|
-
HTMLCanvasElementLuminanceSource.prototype.rotate = function (angle) {
|
|
226
|
-
var tempCanvasElement = this.getTempCanvasElement();
|
|
227
|
-
var tempContext = tempCanvasElement.getContext('2d');
|
|
228
|
-
var angleRadians = angle * HTMLCanvasElementLuminanceSource.DEGREE_TO_RADIANS;
|
|
229
|
-
// Calculate and set new dimensions for temp canvas
|
|
230
|
-
var width = this.canvas.width;
|
|
231
|
-
var height = this.canvas.height;
|
|
232
|
-
var newWidth = Math.ceil(Math.abs(Math.cos(angleRadians)) * width + Math.abs(Math.sin(angleRadians)) * height);
|
|
233
|
-
var newHeight = Math.ceil(Math.abs(Math.sin(angleRadians)) * width + Math.abs(Math.cos(angleRadians)) * height);
|
|
234
|
-
tempCanvasElement.width = newWidth;
|
|
235
|
-
tempCanvasElement.height = newHeight;
|
|
236
|
-
// Draw at center of temp canvas to prevent clipping of image data
|
|
237
|
-
tempContext.translate(newWidth / 2, newHeight / 2);
|
|
238
|
-
tempContext.rotate(angleRadians);
|
|
239
|
-
tempContext.drawImage(this.canvas, width / -2, height / -2);
|
|
240
|
-
this.buffer = HTMLCanvasElementLuminanceSource.makeBufferFromCanvasImageData(tempCanvasElement);
|
|
241
|
-
return this;
|
|
242
|
-
};
|
|
243
|
-
HTMLCanvasElementLuminanceSource.prototype.invert = function () {
|
|
244
|
-
return new _core_InvertedLuminanceSource__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"](this);
|
|
245
|
-
};
|
|
246
|
-
HTMLCanvasElementLuminanceSource.DEGREE_TO_RADIANS = Math.PI / 180;
|
|
247
|
-
return HTMLCanvasElementLuminanceSource;
|
|
248
|
-
}(_core_LuminanceSource__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]));
|
|
249
|
-
|
|
250
|
-
//# sourceMappingURL=HTMLCanvasElementLuminanceSource.js.map
|
|
251
|
-
|
|
252
|
-
/***/ }),
|
|
253
|
-
|
|
254
|
-
/***/ "1228":
|
|
255
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
256
|
-
|
|
257
|
-
"use strict";
|
|
258
|
-
/* harmony import */ var _InvertedLuminanceSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("00ec");
|
|
259
|
-
/* harmony import */ var _LuminanceSource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("f20f");
|
|
260
|
-
/* harmony import */ var _util_System__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("63af");
|
|
261
|
-
/* harmony import */ var _IllegalArgumentException__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("f0a7");
|
|
262
|
-
/*
|
|
263
|
-
* Copyright 2009 ZXing authors
|
|
264
|
-
*
|
|
265
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
266
|
-
* you may not use this file except in compliance with the License.
|
|
267
|
-
* You may obtain a copy of the License at
|
|
268
|
-
*
|
|
269
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
270
|
-
*
|
|
271
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
272
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
273
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
274
|
-
* See the License for the specific language governing permissions and
|
|
275
|
-
* limitations under the License.
|
|
276
|
-
*/
|
|
277
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
278
|
-
var extendStatics = function (d, b) {
|
|
279
|
-
extendStatics = Object.setPrototypeOf ||
|
|
280
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
281
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
282
|
-
return extendStatics(d, b);
|
|
283
|
-
};
|
|
284
|
-
return function (d, b) {
|
|
285
|
-
extendStatics(d, b);
|
|
286
|
-
function __() { this.constructor = d; }
|
|
287
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
288
|
-
};
|
|
289
|
-
})();
|
|
290
|
-
/*namespace com.google.zxing {*/
|
|
291
|
-
// required because of circular dependencies between LuminanceSource and InvertedLuminanceSource
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
/**
|
|
297
|
-
* This class is used to help decode images from files which arrive as RGB data from
|
|
298
|
-
* an ARGB pixel array. It does not support rotation.
|
|
299
|
-
*
|
|
300
|
-
* @author dswitkin@google.com (Daniel Switkin)
|
|
301
|
-
* @author Betaminos
|
|
302
|
-
*/
|
|
303
|
-
var RGBLuminanceSource = /** @class */ (function (_super) {
|
|
304
|
-
__extends(RGBLuminanceSource, _super);
|
|
305
|
-
function RGBLuminanceSource(luminances, width /*int*/, height /*int*/, dataWidth /*int*/, dataHeight /*int*/, left /*int*/, top /*int*/) {
|
|
306
|
-
var _this = _super.call(this, width, height) || this;
|
|
307
|
-
_this.dataWidth = dataWidth;
|
|
308
|
-
_this.dataHeight = dataHeight;
|
|
309
|
-
_this.left = left;
|
|
310
|
-
_this.top = top;
|
|
311
|
-
if (luminances.BYTES_PER_ELEMENT === 4) { // Int32Array
|
|
312
|
-
var size = width * height;
|
|
313
|
-
var luminancesUint8Array = new Uint8ClampedArray(size);
|
|
314
|
-
for (var offset = 0; offset < size; offset++) {
|
|
315
|
-
var pixel = luminances[offset];
|
|
316
|
-
var r = (pixel >> 16) & 0xff; // red
|
|
317
|
-
var g2 = (pixel >> 7) & 0x1fe; // 2 * green
|
|
318
|
-
var b = pixel & 0xff; // blue
|
|
319
|
-
// Calculate green-favouring average cheaply
|
|
320
|
-
luminancesUint8Array[offset] = /*(byte) */ ((r + g2 + b) / 4) & 0xFF;
|
|
321
|
-
}
|
|
322
|
-
_this.luminances = luminancesUint8Array;
|
|
323
|
-
}
|
|
324
|
-
else {
|
|
325
|
-
_this.luminances = luminances;
|
|
326
|
-
}
|
|
327
|
-
if (undefined === dataWidth) {
|
|
328
|
-
_this.dataWidth = width;
|
|
329
|
-
}
|
|
330
|
-
if (undefined === dataHeight) {
|
|
331
|
-
_this.dataHeight = height;
|
|
332
|
-
}
|
|
333
|
-
if (undefined === left) {
|
|
334
|
-
_this.left = 0;
|
|
335
|
-
}
|
|
336
|
-
if (undefined === top) {
|
|
337
|
-
_this.top = 0;
|
|
338
|
-
}
|
|
339
|
-
if (_this.left + width > _this.dataWidth || _this.top + height > _this.dataHeight) {
|
|
340
|
-
throw new _IllegalArgumentException__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"]('Crop rectangle does not fit within image data.');
|
|
341
|
-
}
|
|
342
|
-
return _this;
|
|
343
|
-
}
|
|
344
|
-
/*@Override*/
|
|
345
|
-
RGBLuminanceSource.prototype.getRow = function (y /*int*/, row) {
|
|
346
|
-
if (y < 0 || y >= this.getHeight()) {
|
|
347
|
-
throw new _IllegalArgumentException__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"]('Requested row is outside the image: ' + y);
|
|
348
|
-
}
|
|
349
|
-
var width = this.getWidth();
|
|
350
|
-
if (row === null || row === undefined || row.length < width) {
|
|
351
|
-
row = new Uint8ClampedArray(width);
|
|
352
|
-
}
|
|
353
|
-
var offset = (y + this.top) * this.dataWidth + this.left;
|
|
354
|
-
_util_System__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].arraycopy(this.luminances, offset, row, 0, width);
|
|
355
|
-
return row;
|
|
356
|
-
};
|
|
357
|
-
/*@Override*/
|
|
358
|
-
RGBLuminanceSource.prototype.getMatrix = function () {
|
|
359
|
-
var width = this.getWidth();
|
|
360
|
-
var height = this.getHeight();
|
|
361
|
-
// If the caller asks for the entire underlying image, save the copy and give them the
|
|
362
|
-
// original data. The docs specifically warn that result.length must be ignored.
|
|
363
|
-
if (width === this.dataWidth && height === this.dataHeight) {
|
|
364
|
-
return this.luminances;
|
|
365
|
-
}
|
|
366
|
-
var area = width * height;
|
|
367
|
-
var matrix = new Uint8ClampedArray(area);
|
|
368
|
-
var inputOffset = this.top * this.dataWidth + this.left;
|
|
369
|
-
// If the width matches the full width of the underlying data, perform a single copy.
|
|
370
|
-
if (width === this.dataWidth) {
|
|
371
|
-
_util_System__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].arraycopy(this.luminances, inputOffset, matrix, 0, area);
|
|
372
|
-
return matrix;
|
|
373
|
-
}
|
|
374
|
-
// Otherwise copy one cropped row at a time.
|
|
375
|
-
for (var y = 0; y < height; y++) {
|
|
376
|
-
var outputOffset = y * width;
|
|
377
|
-
_util_System__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].arraycopy(this.luminances, inputOffset, matrix, outputOffset, width);
|
|
378
|
-
inputOffset += this.dataWidth;
|
|
379
|
-
}
|
|
380
|
-
return matrix;
|
|
381
|
-
};
|
|
382
|
-
/*@Override*/
|
|
383
|
-
RGBLuminanceSource.prototype.isCropSupported = function () {
|
|
384
|
-
return true;
|
|
385
|
-
};
|
|
386
|
-
/*@Override*/
|
|
387
|
-
RGBLuminanceSource.prototype.crop = function (left /*int*/, top /*int*/, width /*int*/, height /*int*/) {
|
|
388
|
-
return new RGBLuminanceSource(this.luminances, width, height, this.dataWidth, this.dataHeight, this.left + left, this.top + top);
|
|
389
|
-
};
|
|
390
|
-
RGBLuminanceSource.prototype.invert = function () {
|
|
391
|
-
return new _InvertedLuminanceSource__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"](this);
|
|
392
|
-
};
|
|
393
|
-
return RGBLuminanceSource;
|
|
394
|
-
}(_LuminanceSource__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]));
|
|
395
|
-
/* unused harmony default export */ var _unused_webpack_default_export = (RGBLuminanceSource);
|
|
396
|
-
//# sourceMappingURL=RGBLuminanceSource.js.map
|
|
397
|
-
|
|
398
|
-
/***/ }),
|
|
399
|
-
|
|
400
|
-
/***/ "1f78":
|
|
401
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
402
|
-
|
|
403
|
-
"use strict";
|
|
404
|
-
/* harmony import */ var _DecodeHintType__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fe96");
|
|
405
|
-
/* harmony import */ var _BarcodeFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("a363");
|
|
406
|
-
/* harmony import */ var _qrcode_QRCodeReader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("d2fa");
|
|
407
|
-
/* harmony import */ var _aztec_AztecReader__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("0ba3");
|
|
408
|
-
/* harmony import */ var _oned_MultiFormatOneDReader__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("a793");
|
|
409
|
-
/* harmony import */ var _datamatrix_DataMatrixReader__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("ee54");
|
|
410
|
-
/* harmony import */ var _NotFoundException__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("ca08");
|
|
411
|
-
/* harmony import */ var _pdf417_PDF417Reader__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("f60b");
|
|
412
|
-
/* harmony import */ var _ReaderException__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("d615");
|
|
413
|
-
/*
|
|
414
|
-
* Copyright 2009 ZXing authors
|
|
415
|
-
*
|
|
416
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
417
|
-
* you may not use this file except in compliance with the License.
|
|
418
|
-
* You may obtain a copy of the License at
|
|
419
|
-
*
|
|
420
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
421
|
-
*
|
|
422
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
423
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
424
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
425
|
-
* See the License for the specific language governing permissions and
|
|
426
|
-
* limitations under the License.
|
|
427
|
-
*/
|
|
428
|
-
var __values = (undefined && undefined.__values) || function(o) {
|
|
429
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
430
|
-
if (m) return m.call(o);
|
|
431
|
-
if (o && typeof o.length === "number") return {
|
|
432
|
-
next: function () {
|
|
433
|
-
if (o && i >= o.length) o = void 0;
|
|
434
|
-
return { value: o && o[i++], done: !o };
|
|
435
|
-
}
|
|
436
|
-
};
|
|
437
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
438
|
-
};
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
/*namespace com.google.zxing {*/
|
|
449
|
-
/**
|
|
450
|
-
* MultiFormatReader is a convenience class and the main entry point into the library for most uses.
|
|
451
|
-
* By default it attempts to decode all barcode formats that the library supports. Optionally, you
|
|
452
|
-
* can provide a hints object to request different behavior, for example only decoding QR codes.
|
|
453
|
-
*
|
|
454
|
-
* @author Sean Owen
|
|
455
|
-
* @author dswitkin@google.com (Daniel Switkin)
|
|
456
|
-
*/
|
|
457
|
-
var MultiFormatReader = /** @class */ (function () {
|
|
458
|
-
function MultiFormatReader() {
|
|
459
|
-
}
|
|
460
|
-
/**
|
|
461
|
-
* This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it
|
|
462
|
-
* passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly.
|
|
463
|
-
* Use setHints() followed by decodeWithState() for continuous scan applications.
|
|
464
|
-
*
|
|
465
|
-
* @param image The pixel data to decode
|
|
466
|
-
* @return The contents of the image
|
|
467
|
-
*
|
|
468
|
-
* @throws NotFoundException Any errors which occurred
|
|
469
|
-
*/
|
|
470
|
-
/*@Override*/
|
|
471
|
-
// public decode(image: BinaryBitmap): Result {
|
|
472
|
-
// setHints(null)
|
|
473
|
-
// return decodeInternal(image)
|
|
474
|
-
// }
|
|
475
|
-
/**
|
|
476
|
-
* Decode an image using the hints provided. Does not honor existing state.
|
|
477
|
-
*
|
|
478
|
-
* @param image The pixel data to decode
|
|
479
|
-
* @param hints The hints to use, clearing the previous state.
|
|
480
|
-
* @return The contents of the image
|
|
481
|
-
*
|
|
482
|
-
* @throws NotFoundException Any errors which occurred
|
|
483
|
-
*/
|
|
484
|
-
/*@Override*/
|
|
485
|
-
MultiFormatReader.prototype.decode = function (image, hints) {
|
|
486
|
-
this.setHints(hints);
|
|
487
|
-
return this.decodeInternal(image);
|
|
488
|
-
};
|
|
489
|
-
/**
|
|
490
|
-
* Decode an image using the state set up by calling setHints() previously. Continuous scan
|
|
491
|
-
* clients will get a <b>large</b> speed increase by using this instead of decode().
|
|
492
|
-
*
|
|
493
|
-
* @param image The pixel data to decode
|
|
494
|
-
* @return The contents of the image
|
|
495
|
-
*
|
|
496
|
-
* @throws NotFoundException Any errors which occurred
|
|
497
|
-
*/
|
|
498
|
-
MultiFormatReader.prototype.decodeWithState = function (image) {
|
|
499
|
-
// Make sure to set up the default state so we don't crash
|
|
500
|
-
if (this.readers === null || this.readers === undefined) {
|
|
501
|
-
this.setHints(null);
|
|
502
|
-
}
|
|
503
|
-
return this.decodeInternal(image);
|
|
504
|
-
};
|
|
505
|
-
/**
|
|
506
|
-
* This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls
|
|
507
|
-
* to decodeWithState(image) can reuse the same set of readers without reallocating memory. This
|
|
508
|
-
* is important for performance in continuous scan clients.
|
|
509
|
-
*
|
|
510
|
-
* @param hints The set of hints to use for subsequent calls to decode(image)
|
|
511
|
-
*/
|
|
512
|
-
MultiFormatReader.prototype.setHints = function (hints) {
|
|
513
|
-
this.hints = hints;
|
|
514
|
-
var tryHarder = hints !== null && hints !== undefined && undefined !== hints.get(_DecodeHintType__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].TRY_HARDER);
|
|
515
|
-
/*@SuppressWarnings("unchecked")*/
|
|
516
|
-
var formats = hints === null || hints === undefined ? null : hints.get(_DecodeHintType__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].POSSIBLE_FORMATS);
|
|
517
|
-
var readers = new Array();
|
|
518
|
-
if (formats !== null && formats !== undefined) {
|
|
519
|
-
var addOneDReader = formats.some(function (f) {
|
|
520
|
-
return f === _BarcodeFormat__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].UPC_A ||
|
|
521
|
-
f === _BarcodeFormat__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].UPC_E ||
|
|
522
|
-
f === _BarcodeFormat__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].EAN_13 ||
|
|
523
|
-
f === _BarcodeFormat__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].EAN_8 ||
|
|
524
|
-
f === _BarcodeFormat__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].CODABAR ||
|
|
525
|
-
f === _BarcodeFormat__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].CODE_39 ||
|
|
526
|
-
f === _BarcodeFormat__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].CODE_93 ||
|
|
527
|
-
f === _BarcodeFormat__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].CODE_128 ||
|
|
528
|
-
f === _BarcodeFormat__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].ITF ||
|
|
529
|
-
f === _BarcodeFormat__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].RSS_14 ||
|
|
530
|
-
f === _BarcodeFormat__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].RSS_EXPANDED;
|
|
531
|
-
});
|
|
532
|
-
// Put 1D readers upfront in "normal" mode
|
|
533
|
-
// TYPESCRIPTPORT: TODO: uncomment below as they are ported
|
|
534
|
-
if (addOneDReader && !tryHarder) {
|
|
535
|
-
readers.push(new _oned_MultiFormatOneDReader__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"](hints));
|
|
536
|
-
}
|
|
537
|
-
if (formats.includes(_BarcodeFormat__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].QR_CODE)) {
|
|
538
|
-
readers.push(new _qrcode_QRCodeReader__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"]());
|
|
539
|
-
}
|
|
540
|
-
if (formats.includes(_BarcodeFormat__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].DATA_MATRIX)) {
|
|
541
|
-
readers.push(new _datamatrix_DataMatrixReader__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"]());
|
|
542
|
-
}
|
|
543
|
-
if (formats.includes(_BarcodeFormat__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].AZTEC)) {
|
|
544
|
-
readers.push(new _aztec_AztecReader__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"]());
|
|
545
|
-
}
|
|
546
|
-
if (formats.includes(_BarcodeFormat__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].PDF_417)) {
|
|
547
|
-
readers.push(new _pdf417_PDF417Reader__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"]());
|
|
548
|
-
}
|
|
549
|
-
// if (formats.includes(BarcodeFormat.MAXICODE)) {
|
|
550
|
-
// readers.push(new MaxiCodeReader())
|
|
551
|
-
// }
|
|
552
|
-
// At end in "try harder" mode
|
|
553
|
-
if (addOneDReader && tryHarder) {
|
|
554
|
-
readers.push(new _oned_MultiFormatOneDReader__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"](hints));
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
if (readers.length === 0) {
|
|
558
|
-
if (!tryHarder) {
|
|
559
|
-
readers.push(new _oned_MultiFormatOneDReader__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"](hints));
|
|
560
|
-
}
|
|
561
|
-
readers.push(new _qrcode_QRCodeReader__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"]());
|
|
562
|
-
readers.push(new _datamatrix_DataMatrixReader__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"]());
|
|
563
|
-
readers.push(new _aztec_AztecReader__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"]());
|
|
564
|
-
readers.push(new _pdf417_PDF417Reader__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"]());
|
|
565
|
-
// readers.push(new MaxiCodeReader())
|
|
566
|
-
if (tryHarder) {
|
|
567
|
-
readers.push(new _oned_MultiFormatOneDReader__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"](hints));
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
this.readers = readers; // .toArray(new Reader[readers.size()])
|
|
571
|
-
};
|
|
572
|
-
/*@Override*/
|
|
573
|
-
MultiFormatReader.prototype.reset = function () {
|
|
574
|
-
var e_1, _a;
|
|
575
|
-
if (this.readers !== null) {
|
|
576
|
-
try {
|
|
577
|
-
for (var _b = __values(this.readers), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
578
|
-
var reader = _c.value;
|
|
579
|
-
reader.reset();
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
583
|
-
finally {
|
|
584
|
-
try {
|
|
585
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
586
|
-
}
|
|
587
|
-
finally { if (e_1) throw e_1.error; }
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
};
|
|
591
|
-
/**
|
|
592
|
-
* @throws NotFoundException
|
|
593
|
-
*/
|
|
594
|
-
MultiFormatReader.prototype.decodeInternal = function (image) {
|
|
595
|
-
var e_2, _a;
|
|
596
|
-
if (this.readers === null) {
|
|
597
|
-
throw new _ReaderException__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"]('No readers where selected, nothing can be read.');
|
|
598
|
-
}
|
|
599
|
-
try {
|
|
600
|
-
for (var _b = __values(this.readers), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
601
|
-
var reader = _c.value;
|
|
602
|
-
// Trying to decode with ${reader} reader.
|
|
603
|
-
try {
|
|
604
|
-
return reader.decode(image, this.hints);
|
|
605
|
-
}
|
|
606
|
-
catch (ex) {
|
|
607
|
-
if (ex instanceof _ReaderException__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"]) {
|
|
608
|
-
continue;
|
|
609
|
-
}
|
|
610
|
-
// Bad Exception.
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
615
|
-
finally {
|
|
616
|
-
try {
|
|
617
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
618
|
-
}
|
|
619
|
-
finally { if (e_2) throw e_2.error; }
|
|
620
|
-
}
|
|
621
|
-
throw new _NotFoundException__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"]('No MultiFormat Readers were able to detect the code.');
|
|
622
|
-
};
|
|
623
|
-
return MultiFormatReader;
|
|
624
|
-
}());
|
|
625
|
-
/* harmony default export */ __webpack_exports__["a"] = (MultiFormatReader);
|
|
626
|
-
//# sourceMappingURL=MultiFormatReader.js.map
|
|
627
|
-
|
|
628
|
-
/***/ }),
|
|
629
|
-
|
|
630
|
-
/***/ "2d92":
|
|
631
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
632
|
-
|
|
633
|
-
"use strict";
|
|
634
|
-
/* harmony import */ var _Exception__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d0b6");
|
|
635
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
636
|
-
var extendStatics = function (d, b) {
|
|
637
|
-
extendStatics = Object.setPrototypeOf ||
|
|
638
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
639
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
640
|
-
return extendStatics(d, b);
|
|
641
|
-
};
|
|
642
|
-
return function (d, b) {
|
|
643
|
-
extendStatics(d, b);
|
|
644
|
-
function __() { this.constructor = d; }
|
|
645
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
646
|
-
};
|
|
647
|
-
})();
|
|
648
|
-
|
|
649
|
-
/**
|
|
650
|
-
* Custom Error class of type Exception.
|
|
651
|
-
*/
|
|
652
|
-
var ChecksumException = /** @class */ (function (_super) {
|
|
653
|
-
__extends(ChecksumException, _super);
|
|
654
|
-
function ChecksumException() {
|
|
655
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
656
|
-
}
|
|
657
|
-
ChecksumException.getChecksumInstance = function () {
|
|
658
|
-
return new ChecksumException();
|
|
659
|
-
};
|
|
660
|
-
ChecksumException.kind = 'ChecksumException';
|
|
661
|
-
return ChecksumException;
|
|
662
|
-
}(_Exception__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]));
|
|
663
|
-
/* harmony default export */ __webpack_exports__["a"] = (ChecksumException);
|
|
664
|
-
//# sourceMappingURL=ChecksumException.js.map
|
|
665
|
-
|
|
666
|
-
/***/ }),
|
|
667
|
-
|
|
668
|
-
/***/ "3cb6":
|
|
669
|
-
/***/ (function(module, exports) {
|
|
670
|
-
|
|
671
|
-
//# sourceMappingURL=DecodeContinuouslyCallback.js.map
|
|
672
|
-
|
|
673
|
-
/***/ }),
|
|
674
|
-
|
|
675
|
-
/***/ "5622":
|
|
676
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
677
|
-
|
|
678
|
-
"use strict";
|
|
679
|
-
/*
|
|
680
|
-
* Copyright 2009 ZXing authors
|
|
681
|
-
*
|
|
682
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
683
|
-
* you may not use this file except in compliance with the License.
|
|
684
|
-
* You may obtain a copy of the License at
|
|
685
|
-
*
|
|
686
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
687
|
-
*
|
|
688
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
689
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
690
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
691
|
-
* See the License for the specific language governing permissions and
|
|
692
|
-
* limitations under the License.
|
|
693
|
-
*/
|
|
694
|
-
/**
|
|
695
|
-
* This class hierarchy provides a set of methods to convert luminance data to 1 bit data.
|
|
696
|
-
* It allows the algorithm to vary polymorphically, for example allowing a very expensive
|
|
697
|
-
* thresholding technique for servers and a fast one for mobile. It also permits the implementation
|
|
698
|
-
* to vary, e.g. a JNI version for Android and a Java fallback version for other platforms.
|
|
699
|
-
*
|
|
700
|
-
* @author dswitkin@google.com (Daniel Switkin)
|
|
701
|
-
*/
|
|
702
|
-
var Binarizer = /** @class */ (function () {
|
|
703
|
-
function Binarizer(source) {
|
|
704
|
-
this.source = source;
|
|
705
|
-
}
|
|
706
|
-
Binarizer.prototype.getLuminanceSource = function () {
|
|
707
|
-
return this.source;
|
|
708
|
-
};
|
|
709
|
-
Binarizer.prototype.getWidth = function () {
|
|
710
|
-
return this.source.getWidth();
|
|
711
|
-
};
|
|
712
|
-
Binarizer.prototype.getHeight = function () {
|
|
713
|
-
return this.source.getHeight();
|
|
714
|
-
};
|
|
715
|
-
return Binarizer;
|
|
716
|
-
}());
|
|
717
|
-
/* harmony default export */ __webpack_exports__["a"] = (Binarizer);
|
|
718
|
-
//# sourceMappingURL=Binarizer.js.map
|
|
719
|
-
|
|
720
|
-
/***/ }),
|
|
721
|
-
|
|
722
|
-
/***/ "57fd":
|
|
723
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
724
|
-
|
|
725
|
-
"use strict";
|
|
726
|
-
/* harmony import */ var _IllegalArgumentException__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f0a7");
|
|
727
|
-
/*
|
|
728
|
-
* Copyright 2009 ZXing authors
|
|
729
|
-
*
|
|
730
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
731
|
-
* you may not use this file except in compliance with the License.
|
|
732
|
-
* You may obtain a copy of the License at
|
|
733
|
-
*
|
|
734
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
735
|
-
*
|
|
736
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
737
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
738
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
739
|
-
* See the License for the specific language governing permissions and
|
|
740
|
-
* limitations under the License.
|
|
741
|
-
*/
|
|
742
|
-
|
|
743
|
-
var BinaryBitmap = /** @class */ (function () {
|
|
744
|
-
function BinaryBitmap(binarizer) {
|
|
745
|
-
this.binarizer = binarizer;
|
|
746
|
-
if (binarizer === null) {
|
|
747
|
-
throw new _IllegalArgumentException__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]('Binarizer must be non-null.');
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
/**
|
|
751
|
-
* @return The width of the bitmap.
|
|
752
|
-
*/
|
|
753
|
-
BinaryBitmap.prototype.getWidth = function () {
|
|
754
|
-
return this.binarizer.getWidth();
|
|
755
|
-
};
|
|
756
|
-
/**
|
|
757
|
-
* @return The height of the bitmap.
|
|
758
|
-
*/
|
|
759
|
-
BinaryBitmap.prototype.getHeight = function () {
|
|
760
|
-
return this.binarizer.getHeight();
|
|
761
|
-
};
|
|
762
|
-
/**
|
|
763
|
-
* Converts one row of luminance data to 1 bit data. May actually do the conversion, or return
|
|
764
|
-
* cached data. Callers should assume this method is expensive and call it as seldom as possible.
|
|
765
|
-
* This method is intended for decoding 1D barcodes and may choose to apply sharpening.
|
|
766
|
-
*
|
|
767
|
-
* @param y The row to fetch, which must be in [0, bitmap height)
|
|
768
|
-
* @param row An optional preallocated array. If null or too small, it will be ignored.
|
|
769
|
-
* If used, the Binarizer will call BitArray.clear(). Always use the returned object.
|
|
770
|
-
* @return The array of bits for this row (true means black).
|
|
771
|
-
* @throws NotFoundException if row can't be binarized
|
|
772
|
-
*/
|
|
773
|
-
BinaryBitmap.prototype.getBlackRow = function (y /*int*/, row) {
|
|
774
|
-
return this.binarizer.getBlackRow(y, row);
|
|
775
|
-
};
|
|
776
|
-
/**
|
|
777
|
-
* Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive
|
|
778
|
-
* and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or
|
|
779
|
-
* may not apply sharpening. Therefore, a row from this matrix may not be identical to one
|
|
780
|
-
* fetched using getBlackRow(), so don't mix and match between them.
|
|
781
|
-
*
|
|
782
|
-
* @return The 2D array of bits for the image (true means black).
|
|
783
|
-
* @throws NotFoundException if image can't be binarized to make a matrix
|
|
784
|
-
*/
|
|
785
|
-
BinaryBitmap.prototype.getBlackMatrix = function () {
|
|
786
|
-
// The matrix is created on demand the first time it is requested, then cached. There are two
|
|
787
|
-
// reasons for this:
|
|
788
|
-
// 1. This work will never be done if the caller only installs 1D Reader objects, or if a
|
|
789
|
-
// 1D Reader finds a barcode before the 2D Readers run.
|
|
790
|
-
// 2. This work will only be done once even if the caller installs multiple 2D Readers.
|
|
791
|
-
if (this.matrix === null || this.matrix === undefined) {
|
|
792
|
-
this.matrix = this.binarizer.getBlackMatrix();
|
|
793
|
-
}
|
|
794
|
-
return this.matrix;
|
|
795
|
-
};
|
|
796
|
-
/**
|
|
797
|
-
* @return Whether this bitmap can be cropped.
|
|
798
|
-
*/
|
|
799
|
-
BinaryBitmap.prototype.isCropSupported = function () {
|
|
800
|
-
return this.binarizer.getLuminanceSource().isCropSupported();
|
|
801
|
-
};
|
|
802
|
-
/**
|
|
803
|
-
* Returns a new object with cropped image data. Implementations may keep a reference to the
|
|
804
|
-
* original data rather than a copy. Only callable if isCropSupported() is true.
|
|
805
|
-
*
|
|
806
|
-
* @param left The left coordinate, which must be in [0,getWidth())
|
|
807
|
-
* @param top The top coordinate, which must be in [0,getHeight())
|
|
808
|
-
* @param width The width of the rectangle to crop.
|
|
809
|
-
* @param height The height of the rectangle to crop.
|
|
810
|
-
* @return A cropped version of this object.
|
|
811
|
-
*/
|
|
812
|
-
BinaryBitmap.prototype.crop = function (left /*int*/, top /*int*/, width /*int*/, height /*int*/) {
|
|
813
|
-
var newSource = this.binarizer.getLuminanceSource().crop(left, top, width, height);
|
|
814
|
-
return new BinaryBitmap(this.binarizer.createBinarizer(newSource));
|
|
815
|
-
};
|
|
816
|
-
/**
|
|
817
|
-
* @return Whether this bitmap supports counter-clockwise rotation.
|
|
818
|
-
*/
|
|
819
|
-
BinaryBitmap.prototype.isRotateSupported = function () {
|
|
820
|
-
return this.binarizer.getLuminanceSource().isRotateSupported();
|
|
821
|
-
};
|
|
822
|
-
/**
|
|
823
|
-
* Returns a new object with rotated image data by 90 degrees counterclockwise.
|
|
824
|
-
* Only callable if {@link #isRotateSupported()} is true.
|
|
825
|
-
*
|
|
826
|
-
* @return A rotated version of this object.
|
|
827
|
-
*/
|
|
828
|
-
BinaryBitmap.prototype.rotateCounterClockwise = function () {
|
|
829
|
-
var newSource = this.binarizer.getLuminanceSource().rotateCounterClockwise();
|
|
830
|
-
return new BinaryBitmap(this.binarizer.createBinarizer(newSource));
|
|
831
|
-
};
|
|
832
|
-
/**
|
|
833
|
-
* Returns a new object with rotated image data by 45 degrees counterclockwise.
|
|
834
|
-
* Only callable if {@link #isRotateSupported()} is true.
|
|
835
|
-
*
|
|
836
|
-
* @return A rotated version of this object.
|
|
837
|
-
*/
|
|
838
|
-
BinaryBitmap.prototype.rotateCounterClockwise45 = function () {
|
|
839
|
-
var newSource = this.binarizer.getLuminanceSource().rotateCounterClockwise45();
|
|
840
|
-
return new BinaryBitmap(this.binarizer.createBinarizer(newSource));
|
|
841
|
-
};
|
|
842
|
-
/*@Override*/
|
|
843
|
-
BinaryBitmap.prototype.toString = function () {
|
|
844
|
-
try {
|
|
845
|
-
return this.getBlackMatrix().toString();
|
|
846
|
-
}
|
|
847
|
-
catch (e /*: NotFoundException*/) {
|
|
848
|
-
return '';
|
|
849
|
-
}
|
|
850
|
-
};
|
|
851
|
-
return BinaryBitmap;
|
|
852
|
-
}());
|
|
853
|
-
/* harmony default export */ __webpack_exports__["a"] = (BinaryBitmap);
|
|
854
|
-
//# sourceMappingURL=BinaryBitmap.js.map
|
|
855
|
-
|
|
856
|
-
/***/ }),
|
|
857
|
-
|
|
858
|
-
/***/ "6246":
|
|
859
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
860
|
-
|
|
861
|
-
"use strict";
|
|
862
|
-
/* unused harmony export BrowserPDF417Reader */
|
|
863
|
-
/* harmony import */ var _BrowserCodeReader__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f505");
|
|
864
|
-
/* harmony import */ var _core_pdf417_PDF417Reader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("f60b");
|
|
865
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
866
|
-
var extendStatics = function (d, b) {
|
|
867
|
-
extendStatics = Object.setPrototypeOf ||
|
|
868
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
869
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
870
|
-
return extendStatics(d, b);
|
|
871
|
-
};
|
|
872
|
-
return function (d, b) {
|
|
873
|
-
extendStatics(d, b);
|
|
874
|
-
function __() { this.constructor = d; }
|
|
875
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
876
|
-
};
|
|
877
|
-
})();
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
/**
|
|
881
|
-
* @deprecated Moving to @zxing/browser
|
|
882
|
-
*
|
|
883
|
-
* QR Code reader to use from browser.
|
|
884
|
-
*/
|
|
885
|
-
var BrowserPDF417Reader = /** @class */ (function (_super) {
|
|
886
|
-
__extends(BrowserPDF417Reader, _super);
|
|
887
|
-
/**
|
|
888
|
-
* Creates an instance of BrowserPDF417Reader.
|
|
889
|
-
* @param {number} [timeBetweenScansMillis=500] the time delay between subsequent decode tries
|
|
890
|
-
*/
|
|
891
|
-
function BrowserPDF417Reader(timeBetweenScansMillis) {
|
|
892
|
-
if (timeBetweenScansMillis === void 0) { timeBetweenScansMillis = 500; }
|
|
893
|
-
return _super.call(this, new _core_pdf417_PDF417Reader__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"](), timeBetweenScansMillis) || this;
|
|
894
|
-
}
|
|
895
|
-
return BrowserPDF417Reader;
|
|
896
|
-
}(_BrowserCodeReader__WEBPACK_IMPORTED_MODULE_0__[/* BrowserCodeReader */ "a"]));
|
|
897
|
-
|
|
898
|
-
//# sourceMappingURL=BrowserPDF417Reader.js.map
|
|
899
|
-
|
|
900
|
-
/***/ }),
|
|
901
|
-
|
|
902
|
-
/***/ "6cd7":
|
|
903
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
904
|
-
|
|
905
|
-
"use strict";
|
|
906
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return BrowserMultiFormatReader; });
|
|
907
|
-
/* harmony import */ var _BrowserCodeReader__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f505");
|
|
908
|
-
/* harmony import */ var _core_MultiFormatReader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("1f78");
|
|
909
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
910
|
-
var extendStatics = function (d, b) {
|
|
911
|
-
extendStatics = Object.setPrototypeOf ||
|
|
912
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
913
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
914
|
-
return extendStatics(d, b);
|
|
915
|
-
};
|
|
916
|
-
return function (d, b) {
|
|
917
|
-
extendStatics(d, b);
|
|
918
|
-
function __() { this.constructor = d; }
|
|
919
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
920
|
-
};
|
|
921
|
-
})();
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
var BrowserMultiFormatReader = /** @class */ (function (_super) {
|
|
925
|
-
__extends(BrowserMultiFormatReader, _super);
|
|
926
|
-
function BrowserMultiFormatReader(hints, timeBetweenScansMillis) {
|
|
927
|
-
if (hints === void 0) { hints = null; }
|
|
928
|
-
if (timeBetweenScansMillis === void 0) { timeBetweenScansMillis = 500; }
|
|
929
|
-
var _this = this;
|
|
930
|
-
var reader = new _core_MultiFormatReader__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]();
|
|
931
|
-
reader.setHints(hints);
|
|
932
|
-
_this = _super.call(this, reader, timeBetweenScansMillis) || this;
|
|
933
|
-
return _this;
|
|
934
|
-
}
|
|
935
|
-
/**
|
|
936
|
-
* Overwrite decodeBitmap to call decodeWithState, which will pay
|
|
937
|
-
* attention to the hints set in the constructor function
|
|
938
|
-
*/
|
|
939
|
-
BrowserMultiFormatReader.prototype.decodeBitmap = function (binaryBitmap) {
|
|
940
|
-
return this.reader.decodeWithState(binaryBitmap);
|
|
941
|
-
};
|
|
942
|
-
return BrowserMultiFormatReader;
|
|
943
|
-
}(_BrowserCodeReader__WEBPACK_IMPORTED_MODULE_0__[/* BrowserCodeReader */ "a"]));
|
|
944
|
-
|
|
945
|
-
//# sourceMappingURL=BrowserMultiFormatReader.js.map
|
|
946
|
-
|
|
947
|
-
/***/ }),
|
|
948
|
-
|
|
949
|
-
/***/ "6d19":
|
|
950
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
951
|
-
|
|
952
|
-
"use strict";
|
|
953
|
-
/* harmony import */ var _util_System__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("63af");
|
|
954
|
-
/* harmony import */ var _LuminanceSource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("f20f");
|
|
955
|
-
/* harmony import */ var _InvertedLuminanceSource__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("00ec");
|
|
956
|
-
/* harmony import */ var _IllegalArgumentException__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("f0a7");
|
|
957
|
-
/*
|
|
958
|
-
* Copyright 2009 ZXing authors
|
|
959
|
-
*
|
|
960
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
961
|
-
* you may not use this file except in compliance with the License.
|
|
962
|
-
* You may obtain a copy of the License at
|
|
963
|
-
*
|
|
964
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
965
|
-
*
|
|
966
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
967
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
968
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
969
|
-
* See the License for the specific language governing permissions and
|
|
970
|
-
* limitations under the License.
|
|
971
|
-
*/
|
|
972
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
973
|
-
var extendStatics = function (d, b) {
|
|
974
|
-
extendStatics = Object.setPrototypeOf ||
|
|
975
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
976
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
977
|
-
return extendStatics(d, b);
|
|
978
|
-
};
|
|
979
|
-
return function (d, b) {
|
|
980
|
-
extendStatics(d, b);
|
|
981
|
-
function __() { this.constructor = d; }
|
|
982
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
983
|
-
};
|
|
984
|
-
})();
|
|
985
|
-
/*namespace com.google.zxing {*/
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
/**
|
|
991
|
-
* This object extends LuminanceSource around an array of YUV data returned from the camera driver,
|
|
992
|
-
* with the option to crop to a rectangle within the full data. This can be used to exclude
|
|
993
|
-
* superfluous pixels around the perimeter and speed up decoding.
|
|
994
|
-
*
|
|
995
|
-
* It works for any pixel format where the Y channel is planar and appears first, including
|
|
996
|
-
* YCbCr_420_SP and YCbCr_422_SP.
|
|
997
|
-
*
|
|
998
|
-
* @author dswitkin@google.com (Daniel Switkin)
|
|
999
|
-
*/
|
|
1000
|
-
var PlanarYUVLuminanceSource = /** @class */ (function (_super) {
|
|
1001
|
-
__extends(PlanarYUVLuminanceSource, _super);
|
|
1002
|
-
function PlanarYUVLuminanceSource(yuvData, dataWidth /*int*/, dataHeight /*int*/, left /*int*/, top /*int*/, width /*int*/, height /*int*/, reverseHorizontal) {
|
|
1003
|
-
var _this = _super.call(this, width, height) || this;
|
|
1004
|
-
_this.yuvData = yuvData;
|
|
1005
|
-
_this.dataWidth = dataWidth;
|
|
1006
|
-
_this.dataHeight = dataHeight;
|
|
1007
|
-
_this.left = left;
|
|
1008
|
-
_this.top = top;
|
|
1009
|
-
if (left + width > dataWidth || top + height > dataHeight) {
|
|
1010
|
-
throw new _IllegalArgumentException__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"]('Crop rectangle does not fit within image data.');
|
|
1011
|
-
}
|
|
1012
|
-
if (reverseHorizontal) {
|
|
1013
|
-
_this.reverseHorizontal(width, height);
|
|
1014
|
-
}
|
|
1015
|
-
return _this;
|
|
1016
|
-
}
|
|
1017
|
-
/*@Override*/
|
|
1018
|
-
PlanarYUVLuminanceSource.prototype.getRow = function (y /*int*/, row) {
|
|
1019
|
-
if (y < 0 || y >= this.getHeight()) {
|
|
1020
|
-
throw new _IllegalArgumentException__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"]('Requested row is outside the image: ' + y);
|
|
1021
|
-
}
|
|
1022
|
-
var width = this.getWidth();
|
|
1023
|
-
if (row === null || row === undefined || row.length < width) {
|
|
1024
|
-
row = new Uint8ClampedArray(width);
|
|
1025
|
-
}
|
|
1026
|
-
var offset = (y + this.top) * this.dataWidth + this.left;
|
|
1027
|
-
_util_System__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].arraycopy(this.yuvData, offset, row, 0, width);
|
|
1028
|
-
return row;
|
|
1029
|
-
};
|
|
1030
|
-
/*@Override*/
|
|
1031
|
-
PlanarYUVLuminanceSource.prototype.getMatrix = function () {
|
|
1032
|
-
var width = this.getWidth();
|
|
1033
|
-
var height = this.getHeight();
|
|
1034
|
-
// If the caller asks for the entire underlying image, save the copy and give them the
|
|
1035
|
-
// original data. The docs specifically warn that result.length must be ignored.
|
|
1036
|
-
if (width === this.dataWidth && height === this.dataHeight) {
|
|
1037
|
-
return this.yuvData;
|
|
1038
|
-
}
|
|
1039
|
-
var area = width * height;
|
|
1040
|
-
var matrix = new Uint8ClampedArray(area);
|
|
1041
|
-
var inputOffset = this.top * this.dataWidth + this.left;
|
|
1042
|
-
// If the width matches the full width of the underlying data, perform a single copy.
|
|
1043
|
-
if (width === this.dataWidth) {
|
|
1044
|
-
_util_System__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].arraycopy(this.yuvData, inputOffset, matrix, 0, area);
|
|
1045
|
-
return matrix;
|
|
1046
|
-
}
|
|
1047
|
-
// Otherwise copy one cropped row at a time.
|
|
1048
|
-
for (var y = 0; y < height; y++) {
|
|
1049
|
-
var outputOffset = y * width;
|
|
1050
|
-
_util_System__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].arraycopy(this.yuvData, inputOffset, matrix, outputOffset, width);
|
|
1051
|
-
inputOffset += this.dataWidth;
|
|
1052
|
-
}
|
|
1053
|
-
return matrix;
|
|
1054
|
-
};
|
|
1055
|
-
/*@Override*/
|
|
1056
|
-
PlanarYUVLuminanceSource.prototype.isCropSupported = function () {
|
|
1057
|
-
return true;
|
|
1058
|
-
};
|
|
1059
|
-
/*@Override*/
|
|
1060
|
-
PlanarYUVLuminanceSource.prototype.crop = function (left /*int*/, top /*int*/, width /*int*/, height /*int*/) {
|
|
1061
|
-
return new PlanarYUVLuminanceSource(this.yuvData, this.dataWidth, this.dataHeight, this.left + left, this.top + top, width, height, false);
|
|
1062
|
-
};
|
|
1063
|
-
PlanarYUVLuminanceSource.prototype.renderThumbnail = function () {
|
|
1064
|
-
var width = this.getWidth() / PlanarYUVLuminanceSource.THUMBNAIL_SCALE_FACTOR;
|
|
1065
|
-
var height = this.getHeight() / PlanarYUVLuminanceSource.THUMBNAIL_SCALE_FACTOR;
|
|
1066
|
-
var pixels = new Int32Array(width * height);
|
|
1067
|
-
var yuv = this.yuvData;
|
|
1068
|
-
var inputOffset = this.top * this.dataWidth + this.left;
|
|
1069
|
-
for (var y = 0; y < height; y++) {
|
|
1070
|
-
var outputOffset = y * width;
|
|
1071
|
-
for (var x = 0; x < width; x++) {
|
|
1072
|
-
var grey = yuv[inputOffset + x * PlanarYUVLuminanceSource.THUMBNAIL_SCALE_FACTOR] & 0xff;
|
|
1073
|
-
pixels[outputOffset + x] = 0xFF000000 | (grey * 0x00010101);
|
|
1074
|
-
}
|
|
1075
|
-
inputOffset += this.dataWidth * PlanarYUVLuminanceSource.THUMBNAIL_SCALE_FACTOR;
|
|
1076
|
-
}
|
|
1077
|
-
return pixels;
|
|
1078
|
-
};
|
|
1079
|
-
/**
|
|
1080
|
-
* @return width of image from {@link #renderThumbnail()}
|
|
1081
|
-
*/
|
|
1082
|
-
PlanarYUVLuminanceSource.prototype.getThumbnailWidth = function () {
|
|
1083
|
-
return this.getWidth() / PlanarYUVLuminanceSource.THUMBNAIL_SCALE_FACTOR;
|
|
1084
|
-
};
|
|
1085
|
-
/**
|
|
1086
|
-
* @return height of image from {@link #renderThumbnail()}
|
|
1087
|
-
*/
|
|
1088
|
-
PlanarYUVLuminanceSource.prototype.getThumbnailHeight = function () {
|
|
1089
|
-
return this.getHeight() / PlanarYUVLuminanceSource.THUMBNAIL_SCALE_FACTOR;
|
|
1090
|
-
};
|
|
1091
|
-
PlanarYUVLuminanceSource.prototype.reverseHorizontal = function (width /*int*/, height /*int*/) {
|
|
1092
|
-
var yuvData = this.yuvData;
|
|
1093
|
-
for (var y = 0, rowStart = this.top * this.dataWidth + this.left; y < height; y++, rowStart += this.dataWidth) {
|
|
1094
|
-
var middle = rowStart + width / 2;
|
|
1095
|
-
for (var x1 = rowStart, x2 = rowStart + width - 1; x1 < middle; x1++, x2--) {
|
|
1096
|
-
var temp = yuvData[x1];
|
|
1097
|
-
yuvData[x1] = yuvData[x2];
|
|
1098
|
-
yuvData[x2] = temp;
|
|
1099
|
-
}
|
|
1100
|
-
}
|
|
1101
|
-
};
|
|
1102
|
-
PlanarYUVLuminanceSource.prototype.invert = function () {
|
|
1103
|
-
return new _InvertedLuminanceSource__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"](this);
|
|
1104
|
-
};
|
|
1105
|
-
PlanarYUVLuminanceSource.THUMBNAIL_SCALE_FACTOR = 2;
|
|
1106
|
-
return PlanarYUVLuminanceSource;
|
|
1107
|
-
}(_LuminanceSource__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]));
|
|
1108
|
-
/* unused harmony default export */ var _unused_webpack_default_export = (PlanarYUVLuminanceSource);
|
|
1109
|
-
//# sourceMappingURL=PlanarYUVLuminanceSource.js.map
|
|
1110
|
-
|
|
1111
|
-
/***/ }),
|
|
1112
|
-
|
|
1113
|
-
/***/ "7163":
|
|
1114
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1115
|
-
|
|
1116
|
-
"use strict";
|
|
1117
|
-
/*
|
|
1118
|
-
* Copyright 2009 ZXing authors
|
|
1119
|
-
*
|
|
1120
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1121
|
-
* you may not use this file except in compliance with the License.
|
|
1122
|
-
* You may obtain a copy of the License at
|
|
1123
|
-
*
|
|
1124
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1125
|
-
*
|
|
1126
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1127
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1128
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1129
|
-
* See the License for the specific language governing permissions and
|
|
1130
|
-
* limitations under the License.
|
|
1131
|
-
*/
|
|
1132
|
-
/*namespace com.google.zxing {*/
|
|
1133
|
-
/**
|
|
1134
|
-
* These are a set of hints that you may pass to Writers to specify their behavior.
|
|
1135
|
-
*
|
|
1136
|
-
* @author dswitkin@google.com (Daniel Switkin)
|
|
1137
|
-
*/
|
|
1138
|
-
var EncodeHintType;
|
|
1139
|
-
(function (EncodeHintType) {
|
|
1140
|
-
/**
|
|
1141
|
-
* Specifies what degree of error correction to use, for example in QR Codes.
|
|
1142
|
-
* Type depends on the encoder. For example for QR codes it's type
|
|
1143
|
-
* {@link com.google.zxing.qrcode.decoder.ErrorCorrectionLevel ErrorCorrectionLevel}.
|
|
1144
|
-
* For Aztec it is of type {@link Integer}, representing the minimal percentage of error correction words.
|
|
1145
|
-
* For PDF417 it is of type {@link Integer}, valid values being 0 to 8.
|
|
1146
|
-
* In all cases, it can also be a {@link String} representation of the desired value as well.
|
|
1147
|
-
* Note: an Aztec symbol should have a minimum of 25% EC words.
|
|
1148
|
-
*/
|
|
1149
|
-
EncodeHintType[EncodeHintType["ERROR_CORRECTION"] = 0] = "ERROR_CORRECTION";
|
|
1150
|
-
/**
|
|
1151
|
-
* Specifies what character encoding to use where applicable (type {@link String})
|
|
1152
|
-
*/
|
|
1153
|
-
EncodeHintType[EncodeHintType["CHARACTER_SET"] = 1] = "CHARACTER_SET";
|
|
1154
|
-
/**
|
|
1155
|
-
* Specifies the matrix shape for Data Matrix (type {@link com.google.zxing.datamatrix.encoder.SymbolShapeHint})
|
|
1156
|
-
*/
|
|
1157
|
-
EncodeHintType[EncodeHintType["DATA_MATRIX_SHAPE"] = 2] = "DATA_MATRIX_SHAPE";
|
|
1158
|
-
/**
|
|
1159
|
-
* Specifies a minimum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.
|
|
1160
|
-
*
|
|
1161
|
-
* @deprecated use width/height params in
|
|
1162
|
-
* {@link com.google.zxing.datamatrix.DataMatrixWriter#encode(String, BarcodeFormat, int, int)}
|
|
1163
|
-
*/
|
|
1164
|
-
/*@Deprecated*/
|
|
1165
|
-
EncodeHintType[EncodeHintType["MIN_SIZE"] = 3] = "MIN_SIZE";
|
|
1166
|
-
/**
|
|
1167
|
-
* Specifies a maximum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.
|
|
1168
|
-
*
|
|
1169
|
-
* @deprecated without replacement
|
|
1170
|
-
*/
|
|
1171
|
-
/*@Deprecated*/
|
|
1172
|
-
EncodeHintType[EncodeHintType["MAX_SIZE"] = 4] = "MAX_SIZE";
|
|
1173
|
-
/**
|
|
1174
|
-
* Specifies margin, in pixels, to use when generating the barcode. The meaning can vary
|
|
1175
|
-
* by format; for example it controls margin before and after the barcode horizontally for
|
|
1176
|
-
* most 1D formats. (Type {@link Integer}, or {@link String} representation of the integer value).
|
|
1177
|
-
*/
|
|
1178
|
-
EncodeHintType[EncodeHintType["MARGIN"] = 5] = "MARGIN";
|
|
1179
|
-
/**
|
|
1180
|
-
* Specifies whether to use compact mode for PDF417 (type {@link Boolean}, or "true" or "false"
|
|
1181
|
-
* {@link String} value).
|
|
1182
|
-
*/
|
|
1183
|
-
EncodeHintType[EncodeHintType["PDF417_COMPACT"] = 6] = "PDF417_COMPACT";
|
|
1184
|
-
/**
|
|
1185
|
-
* Specifies what compaction mode to use for PDF417 (type
|
|
1186
|
-
* {@link com.google.zxing.pdf417.encoder.Compaction Compaction} or {@link String} value of one of its
|
|
1187
|
-
* enum values).
|
|
1188
|
-
*/
|
|
1189
|
-
EncodeHintType[EncodeHintType["PDF417_COMPACTION"] = 7] = "PDF417_COMPACTION";
|
|
1190
|
-
/**
|
|
1191
|
-
* Specifies the minimum and maximum number of rows and columns for PDF417 (type
|
|
1192
|
-
* {@link com.google.zxing.pdf417.encoder.Dimensions Dimensions}).
|
|
1193
|
-
*/
|
|
1194
|
-
EncodeHintType[EncodeHintType["PDF417_DIMENSIONS"] = 8] = "PDF417_DIMENSIONS";
|
|
1195
|
-
/**
|
|
1196
|
-
* Specifies the required number of layers for an Aztec code.
|
|
1197
|
-
* A negative number (-1, -2, -3, -4) specifies a compact Aztec code.
|
|
1198
|
-
* 0 indicates to use the minimum number of layers (the default).
|
|
1199
|
-
* A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code.
|
|
1200
|
-
* (Type {@link Integer}, or {@link String} representation of the integer value).
|
|
1201
|
-
*/
|
|
1202
|
-
EncodeHintType[EncodeHintType["AZTEC_LAYERS"] = 9] = "AZTEC_LAYERS";
|
|
1203
|
-
/**
|
|
1204
|
-
* Specifies the exact version of QR code to be encoded.
|
|
1205
|
-
* (Type {@link Integer}, or {@link String} representation of the integer value).
|
|
1206
|
-
*/
|
|
1207
|
-
EncodeHintType[EncodeHintType["QR_VERSION"] = 10] = "QR_VERSION";
|
|
1208
|
-
})(EncodeHintType || (EncodeHintType = {}));
|
|
1209
|
-
/* harmony default export */ __webpack_exports__["a"] = (EncodeHintType);
|
|
1210
|
-
//# sourceMappingURL=EncodeHintType.js.map
|
|
1211
|
-
|
|
1212
|
-
/***/ }),
|
|
1213
|
-
|
|
1214
|
-
/***/ "7978":
|
|
1215
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1216
|
-
|
|
1217
|
-
"use strict";
|
|
1218
|
-
/* harmony import */ var _Exception__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d0b6");
|
|
1219
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
1220
|
-
var extendStatics = function (d, b) {
|
|
1221
|
-
extendStatics = Object.setPrototypeOf ||
|
|
1222
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
1223
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
1224
|
-
return extendStatics(d, b);
|
|
1225
|
-
};
|
|
1226
|
-
return function (d, b) {
|
|
1227
|
-
extendStatics(d, b);
|
|
1228
|
-
function __() { this.constructor = d; }
|
|
1229
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1230
|
-
};
|
|
1231
|
-
})();
|
|
1232
|
-
|
|
1233
|
-
/**
|
|
1234
|
-
* Custom Error class of type Exception.
|
|
1235
|
-
*/
|
|
1236
|
-
var FormatException = /** @class */ (function (_super) {
|
|
1237
|
-
__extends(FormatException, _super);
|
|
1238
|
-
function FormatException() {
|
|
1239
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1240
|
-
}
|
|
1241
|
-
FormatException.getFormatInstance = function () {
|
|
1242
|
-
return new FormatException();
|
|
1243
|
-
};
|
|
1244
|
-
FormatException.kind = 'FormatException';
|
|
1245
|
-
return FormatException;
|
|
1246
|
-
}(_Exception__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]));
|
|
1247
|
-
/* harmony default export */ __webpack_exports__["a"] = (FormatException);
|
|
1248
|
-
//# sourceMappingURL=FormatException.js.map
|
|
1249
|
-
|
|
1250
|
-
/***/ }),
|
|
1251
|
-
|
|
1252
|
-
/***/ "8283":
|
|
1253
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1254
|
-
|
|
1255
|
-
"use strict";
|
|
1256
|
-
/* unused harmony export BrowserQRCodeReader */
|
|
1257
|
-
/* harmony import */ var _BrowserCodeReader__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f505");
|
|
1258
|
-
/* harmony import */ var _core_qrcode_QRCodeReader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("d2fa");
|
|
1259
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
1260
|
-
var extendStatics = function (d, b) {
|
|
1261
|
-
extendStatics = Object.setPrototypeOf ||
|
|
1262
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
1263
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
1264
|
-
return extendStatics(d, b);
|
|
1265
|
-
};
|
|
1266
|
-
return function (d, b) {
|
|
1267
|
-
extendStatics(d, b);
|
|
1268
|
-
function __() { this.constructor = d; }
|
|
1269
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1270
|
-
};
|
|
1271
|
-
})();
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
/**
|
|
1275
|
-
* @deprecated Moving to @zxing/browser
|
|
1276
|
-
*
|
|
1277
|
-
* QR Code reader to use from browser.
|
|
1278
|
-
*/
|
|
1279
|
-
var BrowserQRCodeReader = /** @class */ (function (_super) {
|
|
1280
|
-
__extends(BrowserQRCodeReader, _super);
|
|
1281
|
-
/**
|
|
1282
|
-
* Creates an instance of BrowserQRCodeReader.
|
|
1283
|
-
* @param {number} [timeBetweenScansMillis=500] the time delay between subsequent decode tries
|
|
1284
|
-
*/
|
|
1285
|
-
function BrowserQRCodeReader(timeBetweenScansMillis) {
|
|
1286
|
-
if (timeBetweenScansMillis === void 0) { timeBetweenScansMillis = 500; }
|
|
1287
|
-
return _super.call(this, new _core_qrcode_QRCodeReader__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"](), timeBetweenScansMillis) || this;
|
|
1288
|
-
}
|
|
1289
|
-
return BrowserQRCodeReader;
|
|
1290
|
-
}(_BrowserCodeReader__WEBPACK_IMPORTED_MODULE_0__[/* BrowserCodeReader */ "a"]));
|
|
1291
|
-
|
|
1292
|
-
//# sourceMappingURL=BrowserQRCodeReader.js.map
|
|
1293
|
-
|
|
1294
|
-
/***/ }),
|
|
1295
|
-
|
|
1296
|
-
/***/ "8285":
|
|
1297
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1298
|
-
|
|
1299
|
-
"use strict";
|
|
1300
|
-
/* harmony import */ var _Exception__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d0b6");
|
|
1301
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
1302
|
-
var extendStatics = function (d, b) {
|
|
1303
|
-
extendStatics = Object.setPrototypeOf ||
|
|
1304
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
1305
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
1306
|
-
return extendStatics(d, b);
|
|
1307
|
-
};
|
|
1308
|
-
return function (d, b) {
|
|
1309
|
-
extendStatics(d, b);
|
|
1310
|
-
function __() { this.constructor = d; }
|
|
1311
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1312
|
-
};
|
|
1313
|
-
})();
|
|
1314
|
-
|
|
1315
|
-
/**
|
|
1316
|
-
* Custom Error class of type Exception.
|
|
1317
|
-
*/
|
|
1318
|
-
var ReedSolomonException = /** @class */ (function (_super) {
|
|
1319
|
-
__extends(ReedSolomonException, _super);
|
|
1320
|
-
function ReedSolomonException() {
|
|
1321
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1322
|
-
}
|
|
1323
|
-
ReedSolomonException.kind = 'ReedSolomonException';
|
|
1324
|
-
return ReedSolomonException;
|
|
1325
|
-
}(_Exception__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]));
|
|
1326
|
-
/* harmony default export */ __webpack_exports__["a"] = (ReedSolomonException);
|
|
1327
|
-
//# sourceMappingURL=ReedSolomonException.js.map
|
|
1328
|
-
|
|
1329
|
-
/***/ }),
|
|
1330
|
-
|
|
1331
|
-
/***/ "8635":
|
|
1332
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1333
|
-
|
|
1334
|
-
"use strict";
|
|
1335
|
-
/* harmony import */ var _Exception__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d0b6");
|
|
1336
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
1337
|
-
var extendStatics = function (d, b) {
|
|
1338
|
-
extendStatics = Object.setPrototypeOf ||
|
|
1339
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
1340
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
1341
|
-
return extendStatics(d, b);
|
|
1342
|
-
};
|
|
1343
|
-
return function (d, b) {
|
|
1344
|
-
extendStatics(d, b);
|
|
1345
|
-
function __() { this.constructor = d; }
|
|
1346
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1347
|
-
};
|
|
1348
|
-
})();
|
|
1349
|
-
|
|
1350
|
-
/**
|
|
1351
|
-
* Custom Error class of type Exception.
|
|
1352
|
-
*/
|
|
1353
|
-
var ArithmeticException = /** @class */ (function (_super) {
|
|
1354
|
-
__extends(ArithmeticException, _super);
|
|
1355
|
-
function ArithmeticException() {
|
|
1356
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1357
|
-
}
|
|
1358
|
-
ArithmeticException.kind = 'ArithmeticException';
|
|
1359
|
-
return ArithmeticException;
|
|
1360
|
-
}(_Exception__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]));
|
|
1361
|
-
/* harmony default export */ __webpack_exports__["a"] = (ArithmeticException);
|
|
1362
|
-
//# sourceMappingURL=ArithmeticException.js.map
|
|
1363
|
-
|
|
1364
|
-
/***/ }),
|
|
1365
|
-
|
|
1366
|
-
/***/ "8a55":
|
|
1367
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1368
|
-
|
|
1369
|
-
"use strict";
|
|
1370
|
-
/* harmony import */ var _IndexOutOfBoundsException__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("9dcc");
|
|
1371
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
1372
|
-
var extendStatics = function (d, b) {
|
|
1373
|
-
extendStatics = Object.setPrototypeOf ||
|
|
1374
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
1375
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
1376
|
-
return extendStatics(d, b);
|
|
1377
|
-
};
|
|
1378
|
-
return function (d, b) {
|
|
1379
|
-
extendStatics(d, b);
|
|
1380
|
-
function __() { this.constructor = d; }
|
|
1381
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1382
|
-
};
|
|
1383
|
-
})();
|
|
1384
|
-
|
|
1385
|
-
/**
|
|
1386
|
-
* Custom Error class of type Exception.
|
|
1387
|
-
*/
|
|
1388
|
-
var ArrayIndexOutOfBoundsException = /** @class */ (function (_super) {
|
|
1389
|
-
__extends(ArrayIndexOutOfBoundsException, _super);
|
|
1390
|
-
function ArrayIndexOutOfBoundsException(index, message) {
|
|
1391
|
-
if (index === void 0) { index = undefined; }
|
|
1392
|
-
if (message === void 0) { message = undefined; }
|
|
1393
|
-
var _this = _super.call(this, message) || this;
|
|
1394
|
-
_this.index = index;
|
|
1395
|
-
_this.message = message;
|
|
1396
|
-
return _this;
|
|
1397
|
-
}
|
|
1398
|
-
ArrayIndexOutOfBoundsException.kind = 'ArrayIndexOutOfBoundsException';
|
|
1399
|
-
return ArrayIndexOutOfBoundsException;
|
|
1400
|
-
}(_IndexOutOfBoundsException__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]));
|
|
1401
|
-
/* harmony default export */ __webpack_exports__["a"] = (ArrayIndexOutOfBoundsException);
|
|
1402
|
-
//# sourceMappingURL=ArrayIndexOutOfBoundsException.js.map
|
|
1403
|
-
|
|
1404
|
-
/***/ }),
|
|
1405
|
-
|
|
1406
|
-
/***/ "8b0f":
|
|
1407
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1408
|
-
|
|
1409
|
-
"use strict";
|
|
1410
|
-
/* harmony import */ var _Exception__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d0b6");
|
|
1411
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
1412
|
-
var extendStatics = function (d, b) {
|
|
1413
|
-
extendStatics = Object.setPrototypeOf ||
|
|
1414
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
1415
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
1416
|
-
return extendStatics(d, b);
|
|
1417
|
-
};
|
|
1418
|
-
return function (d, b) {
|
|
1419
|
-
extendStatics(d, b);
|
|
1420
|
-
function __() { this.constructor = d; }
|
|
1421
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1422
|
-
};
|
|
1423
|
-
})();
|
|
1424
|
-
|
|
1425
|
-
/**
|
|
1426
|
-
* Custom Error class of type Exception.
|
|
1427
|
-
*/
|
|
1428
|
-
var NullPointerException = /** @class */ (function (_super) {
|
|
1429
|
-
__extends(NullPointerException, _super);
|
|
1430
|
-
function NullPointerException() {
|
|
1431
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1432
|
-
}
|
|
1433
|
-
NullPointerException.kind = 'NullPointerException';
|
|
1434
|
-
return NullPointerException;
|
|
1435
|
-
}(_Exception__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]));
|
|
1436
|
-
/* harmony default export */ __webpack_exports__["a"] = (NullPointerException);
|
|
1437
|
-
//# sourceMappingURL=NullPointerException.js.map
|
|
1438
|
-
|
|
1439
|
-
/***/ }),
|
|
1440
|
-
|
|
1441
|
-
/***/ "8f21":
|
|
1442
|
-
/***/ (function(module, exports) {
|
|
1443
|
-
|
|
1444
|
-
//# sourceMappingURL=HTMLVisualMediaElement.js.map
|
|
1445
|
-
|
|
1446
|
-
/***/ }),
|
|
1447
|
-
|
|
1448
|
-
/***/ "9878":
|
|
1449
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1450
|
-
|
|
1451
|
-
"use strict";
|
|
1452
|
-
/* unused harmony export BrowserQRCodeSvgWriter */
|
|
1453
|
-
/* harmony import */ var _core_EncodeHintType__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7163");
|
|
1454
|
-
/* harmony import */ var _core_qrcode_encoder_Encoder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("6833");
|
|
1455
|
-
/* harmony import */ var _core_qrcode_decoder_ErrorCorrectionLevel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("5134");
|
|
1456
|
-
/* harmony import */ var _core_IllegalArgumentException__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("f0a7");
|
|
1457
|
-
/* harmony import */ var _core_IllegalStateException__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("9cca");
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
/**
|
|
1464
|
-
* @deprecated Moving to @zxing/browser
|
|
1465
|
-
*/
|
|
1466
|
-
var BrowserQRCodeSvgWriter = /** @class */ (function () {
|
|
1467
|
-
function BrowserQRCodeSvgWriter() {
|
|
1468
|
-
}
|
|
1469
|
-
/**
|
|
1470
|
-
* Writes and renders a QRCode SVG element.
|
|
1471
|
-
*
|
|
1472
|
-
* @param contents
|
|
1473
|
-
* @param width
|
|
1474
|
-
* @param height
|
|
1475
|
-
* @param hints
|
|
1476
|
-
*/
|
|
1477
|
-
BrowserQRCodeSvgWriter.prototype.write = function (contents, width, height, hints) {
|
|
1478
|
-
if (hints === void 0) { hints = null; }
|
|
1479
|
-
if (contents.length === 0) {
|
|
1480
|
-
throw new _core_IllegalArgumentException__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"]('Found empty contents');
|
|
1481
|
-
}
|
|
1482
|
-
// if (format != BarcodeFormat.QR_CODE) {
|
|
1483
|
-
// throw new IllegalArgumentException("Can only encode QR_CODE, but got " + format)
|
|
1484
|
-
// }
|
|
1485
|
-
if (width < 0 || height < 0) {
|
|
1486
|
-
throw new _core_IllegalArgumentException__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"]('Requested dimensions are too small: ' + width + 'x' + height);
|
|
1487
|
-
}
|
|
1488
|
-
var errorCorrectionLevel = _core_qrcode_decoder_ErrorCorrectionLevel__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].L;
|
|
1489
|
-
var quietZone = BrowserQRCodeSvgWriter.QUIET_ZONE_SIZE;
|
|
1490
|
-
if (hints !== null) {
|
|
1491
|
-
if (undefined !== hints.get(_core_EncodeHintType__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].ERROR_CORRECTION)) {
|
|
1492
|
-
errorCorrectionLevel = _core_qrcode_decoder_ErrorCorrectionLevel__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].fromString(hints.get(_core_EncodeHintType__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].ERROR_CORRECTION).toString());
|
|
1493
|
-
}
|
|
1494
|
-
if (undefined !== hints.get(_core_EncodeHintType__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].MARGIN)) {
|
|
1495
|
-
quietZone = Number.parseInt(hints.get(_core_EncodeHintType__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].MARGIN).toString(), 10);
|
|
1496
|
-
}
|
|
1497
|
-
}
|
|
1498
|
-
var code = _core_qrcode_encoder_Encoder__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].encode(contents, errorCorrectionLevel, hints);
|
|
1499
|
-
return this.renderResult(code, width, height, quietZone);
|
|
1500
|
-
};
|
|
1501
|
-
/**
|
|
1502
|
-
* Renders the result and then appends it to the DOM.
|
|
1503
|
-
*/
|
|
1504
|
-
BrowserQRCodeSvgWriter.prototype.writeToDom = function (containerElement, contents, width, height, hints) {
|
|
1505
|
-
if (hints === void 0) { hints = null; }
|
|
1506
|
-
if (typeof containerElement === 'string') {
|
|
1507
|
-
containerElement = document.querySelector(containerElement);
|
|
1508
|
-
}
|
|
1509
|
-
var svgElement = this.write(contents, width, height, hints);
|
|
1510
|
-
if (containerElement)
|
|
1511
|
-
containerElement.appendChild(svgElement);
|
|
1512
|
-
};
|
|
1513
|
-
/**
|
|
1514
|
-
* Note that the input matrix uses 0 == white, 1 == black.
|
|
1515
|
-
* The output matrix uses 0 == black, 255 == white (i.e. an 8 bit greyscale bitmap).
|
|
1516
|
-
*/
|
|
1517
|
-
BrowserQRCodeSvgWriter.prototype.renderResult = function (code, width /*int*/, height /*int*/, quietZone /*int*/) {
|
|
1518
|
-
var input = code.getMatrix();
|
|
1519
|
-
if (input === null) {
|
|
1520
|
-
throw new _core_IllegalStateException__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"]();
|
|
1521
|
-
}
|
|
1522
|
-
var inputWidth = input.getWidth();
|
|
1523
|
-
var inputHeight = input.getHeight();
|
|
1524
|
-
var qrWidth = inputWidth + (quietZone * 2);
|
|
1525
|
-
var qrHeight = inputHeight + (quietZone * 2);
|
|
1526
|
-
var outputWidth = Math.max(width, qrWidth);
|
|
1527
|
-
var outputHeight = Math.max(height, qrHeight);
|
|
1528
|
-
var multiple = Math.min(Math.floor(outputWidth / qrWidth), Math.floor(outputHeight / qrHeight));
|
|
1529
|
-
// Padding includes both the quiet zone and the extra white pixels to accommodate the requested
|
|
1530
|
-
// dimensions. For example, if input is 25x25 the QR will be 33x33 including the quiet zone.
|
|
1531
|
-
// If the requested size is 200x160, the multiple will be 4, for a QR of 132x132. These will
|
|
1532
|
-
// handle all the padding from 100x100 (the actual QR) up to 200x160.
|
|
1533
|
-
var leftPadding = Math.floor((outputWidth - (inputWidth * multiple)) / 2);
|
|
1534
|
-
var topPadding = Math.floor((outputHeight - (inputHeight * multiple)) / 2);
|
|
1535
|
-
var svgElement = this.createSVGElement(outputWidth, outputHeight);
|
|
1536
|
-
for (var inputY = 0, outputY = topPadding; inputY < inputHeight; inputY++, outputY += multiple) {
|
|
1537
|
-
// Write the contents of this row of the barcode
|
|
1538
|
-
for (var inputX = 0, outputX = leftPadding; inputX < inputWidth; inputX++, outputX += multiple) {
|
|
1539
|
-
if (input.get(inputX, inputY) === 1) {
|
|
1540
|
-
var svgRectElement = this.createSvgRectElement(outputX, outputY, multiple, multiple);
|
|
1541
|
-
svgElement.appendChild(svgRectElement);
|
|
1542
|
-
}
|
|
1543
|
-
}
|
|
1544
|
-
}
|
|
1545
|
-
return svgElement;
|
|
1546
|
-
};
|
|
1547
|
-
/**
|
|
1548
|
-
* Creates a SVG element.
|
|
1549
|
-
*
|
|
1550
|
-
* @param w SVG's width attribute
|
|
1551
|
-
* @param h SVG's height attribute
|
|
1552
|
-
*/
|
|
1553
|
-
BrowserQRCodeSvgWriter.prototype.createSVGElement = function (w, h) {
|
|
1554
|
-
var svgElement = document.createElementNS(BrowserQRCodeSvgWriter.SVG_NS, 'svg');
|
|
1555
|
-
svgElement.setAttributeNS(null, 'height', w.toString());
|
|
1556
|
-
svgElement.setAttributeNS(null, 'width', h.toString());
|
|
1557
|
-
return svgElement;
|
|
1558
|
-
};
|
|
1559
|
-
/**
|
|
1560
|
-
* Creates a SVG rect element.
|
|
1561
|
-
*
|
|
1562
|
-
* @param x Element's x coordinate
|
|
1563
|
-
* @param y Element's y coordinate
|
|
1564
|
-
* @param w Element's width attribute
|
|
1565
|
-
* @param h Element's height attribute
|
|
1566
|
-
*/
|
|
1567
|
-
BrowserQRCodeSvgWriter.prototype.createSvgRectElement = function (x, y, w, h) {
|
|
1568
|
-
var rect = document.createElementNS(BrowserQRCodeSvgWriter.SVG_NS, 'rect');
|
|
1569
|
-
rect.setAttributeNS(null, 'x', x.toString());
|
|
1570
|
-
rect.setAttributeNS(null, 'y', y.toString());
|
|
1571
|
-
rect.setAttributeNS(null, 'height', w.toString());
|
|
1572
|
-
rect.setAttributeNS(null, 'width', h.toString());
|
|
1573
|
-
rect.setAttributeNS(null, 'fill', '#000000');
|
|
1574
|
-
return rect;
|
|
1575
|
-
};
|
|
1576
|
-
BrowserQRCodeSvgWriter.QUIET_ZONE_SIZE = 4;
|
|
1577
|
-
/**
|
|
1578
|
-
* SVG markup NameSpace
|
|
1579
|
-
*/
|
|
1580
|
-
BrowserQRCodeSvgWriter.SVG_NS = 'http://www.w3.org/2000/svg';
|
|
1581
|
-
return BrowserQRCodeSvgWriter;
|
|
1582
|
-
}());
|
|
1583
|
-
|
|
1584
|
-
//# sourceMappingURL=BrowserQRCodeSvgWriter.js.map
|
|
1585
|
-
|
|
1586
|
-
/***/ }),
|
|
1587
|
-
|
|
1588
|
-
/***/ "9cca":
|
|
1589
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1590
|
-
|
|
1591
|
-
"use strict";
|
|
1592
|
-
/* harmony import */ var _Exception__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d0b6");
|
|
1593
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
1594
|
-
var extendStatics = function (d, b) {
|
|
1595
|
-
extendStatics = Object.setPrototypeOf ||
|
|
1596
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
1597
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
1598
|
-
return extendStatics(d, b);
|
|
1599
|
-
};
|
|
1600
|
-
return function (d, b) {
|
|
1601
|
-
extendStatics(d, b);
|
|
1602
|
-
function __() { this.constructor = d; }
|
|
1603
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1604
|
-
};
|
|
1605
|
-
})();
|
|
1606
|
-
|
|
1607
|
-
/**
|
|
1608
|
-
* Custom Error class of type Exception.
|
|
1609
|
-
*/
|
|
1610
|
-
var IllegalStateException = /** @class */ (function (_super) {
|
|
1611
|
-
__extends(IllegalStateException, _super);
|
|
1612
|
-
function IllegalStateException() {
|
|
1613
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1614
|
-
}
|
|
1615
|
-
IllegalStateException.kind = 'IllegalStateException';
|
|
1616
|
-
return IllegalStateException;
|
|
1617
|
-
}(_Exception__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]));
|
|
1618
|
-
/* harmony default export */ __webpack_exports__["a"] = (IllegalStateException);
|
|
1619
|
-
//# sourceMappingURL=IllegalStateException.js.map
|
|
1620
|
-
|
|
1621
|
-
/***/ }),
|
|
1622
|
-
|
|
1623
|
-
/***/ "9dcc":
|
|
1624
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1625
|
-
|
|
1626
|
-
"use strict";
|
|
1627
|
-
/* harmony import */ var _Exception__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d0b6");
|
|
1628
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
1629
|
-
var extendStatics = function (d, b) {
|
|
1630
|
-
extendStatics = Object.setPrototypeOf ||
|
|
1631
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
1632
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
1633
|
-
return extendStatics(d, b);
|
|
1634
|
-
};
|
|
1635
|
-
return function (d, b) {
|
|
1636
|
-
extendStatics(d, b);
|
|
1637
|
-
function __() { this.constructor = d; }
|
|
1638
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1639
|
-
};
|
|
1640
|
-
})();
|
|
1641
|
-
|
|
1642
|
-
/**
|
|
1643
|
-
* Custom Error class of type Exception.
|
|
1644
|
-
*/
|
|
1645
|
-
var IndexOutOfBoundsException = /** @class */ (function (_super) {
|
|
1646
|
-
__extends(IndexOutOfBoundsException, _super);
|
|
1647
|
-
function IndexOutOfBoundsException() {
|
|
1648
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1649
|
-
}
|
|
1650
|
-
IndexOutOfBoundsException.kind = 'IndexOutOfBoundsException';
|
|
1651
|
-
return IndexOutOfBoundsException;
|
|
1652
|
-
}(_Exception__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]));
|
|
1653
|
-
/* harmony default export */ __webpack_exports__["a"] = (IndexOutOfBoundsException);
|
|
1654
|
-
//# sourceMappingURL=IndexOutOfBoundsException.js.map
|
|
1655
|
-
|
|
1656
|
-
/***/ }),
|
|
1657
|
-
|
|
1658
|
-
/***/ "9fa8":
|
|
1659
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1660
|
-
|
|
1661
|
-
"use strict";
|
|
1662
|
-
/* unused harmony export BrowserDatamatrixCodeReader */
|
|
1663
|
-
/* harmony import */ var _BrowserCodeReader__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f505");
|
|
1664
|
-
/* harmony import */ var _core_datamatrix_DataMatrixReader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ee54");
|
|
1665
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
1666
|
-
var extendStatics = function (d, b) {
|
|
1667
|
-
extendStatics = Object.setPrototypeOf ||
|
|
1668
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
1669
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
1670
|
-
return extendStatics(d, b);
|
|
1671
|
-
};
|
|
1672
|
-
return function (d, b) {
|
|
1673
|
-
extendStatics(d, b);
|
|
1674
|
-
function __() { this.constructor = d; }
|
|
1675
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1676
|
-
};
|
|
1677
|
-
})();
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
/**
|
|
1681
|
-
* @deprecated Moving to @zxing/browser
|
|
1682
|
-
*
|
|
1683
|
-
* QR Code reader to use from browser.
|
|
1684
|
-
*/
|
|
1685
|
-
var BrowserDatamatrixCodeReader = /** @class */ (function (_super) {
|
|
1686
|
-
__extends(BrowserDatamatrixCodeReader, _super);
|
|
1687
|
-
/**
|
|
1688
|
-
* Creates an instance of BrowserQRCodeReader.
|
|
1689
|
-
* @param {number} [timeBetweenScansMillis=500] the time delay between subsequent decode tries
|
|
1690
|
-
*/
|
|
1691
|
-
function BrowserDatamatrixCodeReader(timeBetweenScansMillis) {
|
|
1692
|
-
if (timeBetweenScansMillis === void 0) { timeBetweenScansMillis = 500; }
|
|
1693
|
-
return _super.call(this, new _core_datamatrix_DataMatrixReader__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"](), timeBetweenScansMillis) || this;
|
|
1694
|
-
}
|
|
1695
|
-
return BrowserDatamatrixCodeReader;
|
|
1696
|
-
}(_BrowserCodeReader__WEBPACK_IMPORTED_MODULE_0__[/* BrowserCodeReader */ "a"]));
|
|
1697
|
-
|
|
1698
|
-
//# sourceMappingURL=BrowserDatamatrixCodeReader.js.map
|
|
1699
|
-
|
|
1700
|
-
/***/ }),
|
|
1701
|
-
|
|
1702
|
-
/***/ "a363":
|
|
1703
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1704
|
-
|
|
1705
|
-
"use strict";
|
|
1706
|
-
/*
|
|
1707
|
-
* Direct port to TypeScript of ZXing by Adrian Toșcă
|
|
1708
|
-
*/
|
|
1709
|
-
/*
|
|
1710
|
-
* Copyright 2009 ZXing authors
|
|
1711
|
-
*
|
|
1712
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1713
|
-
* you may not use this file except in compliance with the License.
|
|
1714
|
-
* You may obtain a copy of the License at
|
|
1715
|
-
*
|
|
1716
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1717
|
-
*
|
|
1718
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1719
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1720
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1721
|
-
* See the License for the specific language governing permissions and
|
|
1722
|
-
* limitations under the License.
|
|
1723
|
-
*/
|
|
1724
|
-
/*namespace com.google.zxing {*/
|
|
1725
|
-
/**
|
|
1726
|
-
* Enumerates barcode formats known to this package. Please keep alphabetized.
|
|
1727
|
-
*
|
|
1728
|
-
* @author Sean Owen
|
|
1729
|
-
*/
|
|
1730
|
-
var BarcodeFormat;
|
|
1731
|
-
(function (BarcodeFormat) {
|
|
1732
|
-
/** Aztec 2D barcode format. */
|
|
1733
|
-
BarcodeFormat[BarcodeFormat["AZTEC"] = 0] = "AZTEC";
|
|
1734
|
-
/** CODABAR 1D format. */
|
|
1735
|
-
BarcodeFormat[BarcodeFormat["CODABAR"] = 1] = "CODABAR";
|
|
1736
|
-
/** Code 39 1D format. */
|
|
1737
|
-
BarcodeFormat[BarcodeFormat["CODE_39"] = 2] = "CODE_39";
|
|
1738
|
-
/** Code 93 1D format. */
|
|
1739
|
-
BarcodeFormat[BarcodeFormat["CODE_93"] = 3] = "CODE_93";
|
|
1740
|
-
/** Code 128 1D format. */
|
|
1741
|
-
BarcodeFormat[BarcodeFormat["CODE_128"] = 4] = "CODE_128";
|
|
1742
|
-
/** Data Matrix 2D barcode format. */
|
|
1743
|
-
BarcodeFormat[BarcodeFormat["DATA_MATRIX"] = 5] = "DATA_MATRIX";
|
|
1744
|
-
/** EAN-8 1D format. */
|
|
1745
|
-
BarcodeFormat[BarcodeFormat["EAN_8"] = 6] = "EAN_8";
|
|
1746
|
-
/** EAN-13 1D format. */
|
|
1747
|
-
BarcodeFormat[BarcodeFormat["EAN_13"] = 7] = "EAN_13";
|
|
1748
|
-
/** ITF (Interleaved Two of Five) 1D format. */
|
|
1749
|
-
BarcodeFormat[BarcodeFormat["ITF"] = 8] = "ITF";
|
|
1750
|
-
/** MaxiCode 2D barcode format. */
|
|
1751
|
-
BarcodeFormat[BarcodeFormat["MAXICODE"] = 9] = "MAXICODE";
|
|
1752
|
-
/** PDF417 format. */
|
|
1753
|
-
BarcodeFormat[BarcodeFormat["PDF_417"] = 10] = "PDF_417";
|
|
1754
|
-
/** QR Code 2D barcode format. */
|
|
1755
|
-
BarcodeFormat[BarcodeFormat["QR_CODE"] = 11] = "QR_CODE";
|
|
1756
|
-
/** RSS 14 */
|
|
1757
|
-
BarcodeFormat[BarcodeFormat["RSS_14"] = 12] = "RSS_14";
|
|
1758
|
-
/** RSS EXPANDED */
|
|
1759
|
-
BarcodeFormat[BarcodeFormat["RSS_EXPANDED"] = 13] = "RSS_EXPANDED";
|
|
1760
|
-
/** UPC-A 1D format. */
|
|
1761
|
-
BarcodeFormat[BarcodeFormat["UPC_A"] = 14] = "UPC_A";
|
|
1762
|
-
/** UPC-E 1D format. */
|
|
1763
|
-
BarcodeFormat[BarcodeFormat["UPC_E"] = 15] = "UPC_E";
|
|
1764
|
-
/** UPC/EAN extension format. Not a stand-alone format. */
|
|
1765
|
-
BarcodeFormat[BarcodeFormat["UPC_EAN_EXTENSION"] = 16] = "UPC_EAN_EXTENSION";
|
|
1766
|
-
})(BarcodeFormat || (BarcodeFormat = {}));
|
|
1767
|
-
/* harmony default export */ __webpack_exports__["a"] = (BarcodeFormat);
|
|
1768
|
-
//# sourceMappingURL=BarcodeFormat.js.map
|
|
1769
|
-
|
|
1770
|
-
/***/ }),
|
|
1771
|
-
|
|
1772
|
-
/***/ "a70f":
|
|
1773
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1774
|
-
|
|
1775
|
-
"use strict";
|
|
1776
|
-
/* harmony import */ var _qrcode_QRCodeWriter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("370f");
|
|
1777
|
-
/* harmony import */ var _BarcodeFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("a363");
|
|
1778
|
-
/* harmony import */ var _IllegalArgumentException__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("f0a7");
|
|
1779
|
-
/*
|
|
1780
|
-
* Copyright 2008 ZXing authors
|
|
1781
|
-
*
|
|
1782
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1783
|
-
* you may not use this file except in compliance with the License.
|
|
1784
|
-
* You may obtain a copy of the License at
|
|
1785
|
-
*
|
|
1786
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1787
|
-
*
|
|
1788
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1789
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1790
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1791
|
-
* See the License for the specific language governing permissions and
|
|
1792
|
-
* limitations under the License.
|
|
1793
|
-
*/
|
|
1794
|
-
// import DataMatrixWriter from './datamatrix/DataMatrixWriter'
|
|
1795
|
-
// import CodaBarWriter from './oned/CodaBarWriter'
|
|
1796
|
-
// import Code128Writer from './oned/Code128Writer'
|
|
1797
|
-
// import Code39Writer from './oned/Code39Writer'
|
|
1798
|
-
// import Code93Writer from './oned/Code93Writer'
|
|
1799
|
-
// import EAN13Writer from './oned/EAN13Writer'
|
|
1800
|
-
// import EAN8Writer from './oned/EAN8Writer'
|
|
1801
|
-
// import ITFWriter from './oned/ITFWriter'
|
|
1802
|
-
// import UPCAWriter from './oned/UPCAWriter'
|
|
1803
|
-
// import UPCEWriter from './oned/UPCEWriter'
|
|
1804
|
-
// import PDF417Writer from './pdf417/PDF417Writer'
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
/*import java.util.Map;*/
|
|
1809
|
-
/**
|
|
1810
|
-
* This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat
|
|
1811
|
-
* requested and encodes the barcode with the supplied contents.
|
|
1812
|
-
*
|
|
1813
|
-
* @author dswitkin@google.com (Daniel Switkin)
|
|
1814
|
-
*/
|
|
1815
|
-
var MultiFormatWriter = /** @class */ (function () {
|
|
1816
|
-
function MultiFormatWriter() {
|
|
1817
|
-
}
|
|
1818
|
-
/*@Override*/
|
|
1819
|
-
// public encode(contents: string,
|
|
1820
|
-
// format: BarcodeFormat,
|
|
1821
|
-
// width: number /*int*/,
|
|
1822
|
-
// height: number /*int*/): BitMatrix /*throws WriterException */ {
|
|
1823
|
-
// return encode(contents, format, width, height, null)
|
|
1824
|
-
// }
|
|
1825
|
-
/*@Override*/
|
|
1826
|
-
MultiFormatWriter.prototype.encode = function (contents, format, width /*int*/, height /*int*/, hints) {
|
|
1827
|
-
var writer;
|
|
1828
|
-
switch (format) {
|
|
1829
|
-
// case BarcodeFormat.EAN_8:
|
|
1830
|
-
// writer = new EAN8Writer()
|
|
1831
|
-
// break
|
|
1832
|
-
// case BarcodeFormat.UPC_E:
|
|
1833
|
-
// writer = new UPCEWriter()
|
|
1834
|
-
// break
|
|
1835
|
-
// case BarcodeFormat.EAN_13:
|
|
1836
|
-
// writer = new EAN13Writer()
|
|
1837
|
-
// break
|
|
1838
|
-
// case BarcodeFormat.UPC_A:
|
|
1839
|
-
// writer = new UPCAWriter()
|
|
1840
|
-
// break
|
|
1841
|
-
case _BarcodeFormat__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].QR_CODE:
|
|
1842
|
-
writer = new _qrcode_QRCodeWriter__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]();
|
|
1843
|
-
break;
|
|
1844
|
-
// case BarcodeFormat.CODE_39:
|
|
1845
|
-
// writer = new Code39Writer()
|
|
1846
|
-
// break
|
|
1847
|
-
// case BarcodeFormat.CODE_93:
|
|
1848
|
-
// writer = new Code93Writer()
|
|
1849
|
-
// break
|
|
1850
|
-
// case BarcodeFormat.CODE_128:
|
|
1851
|
-
// writer = new Code128Writer()
|
|
1852
|
-
// break
|
|
1853
|
-
// case BarcodeFormat.ITF:
|
|
1854
|
-
// writer = new ITFWriter()
|
|
1855
|
-
// break
|
|
1856
|
-
// case BarcodeFormat.PDF_417:
|
|
1857
|
-
// writer = new PDF417Writer()
|
|
1858
|
-
// break
|
|
1859
|
-
// case BarcodeFormat.CODABAR:
|
|
1860
|
-
// writer = new CodaBarWriter()
|
|
1861
|
-
// break
|
|
1862
|
-
// case BarcodeFormat.DATA_MATRIX:
|
|
1863
|
-
// writer = new DataMatrixWriter()
|
|
1864
|
-
// break
|
|
1865
|
-
// case BarcodeFormat.AZTEC:
|
|
1866
|
-
// writer = new AztecWriter()
|
|
1867
|
-
// break
|
|
1868
|
-
default:
|
|
1869
|
-
throw new _IllegalArgumentException__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"]('No encoder available for format ' + format);
|
|
1870
|
-
}
|
|
1871
|
-
return writer.encode(contents, format, width, height, hints);
|
|
1872
|
-
};
|
|
1873
|
-
return MultiFormatWriter;
|
|
1874
|
-
}());
|
|
1875
|
-
/* unused harmony default export */ var _unused_webpack_default_export = (MultiFormatWriter);
|
|
1876
|
-
//# sourceMappingURL=MultiFormatWriter.js.map
|
|
1877
|
-
|
|
1878
|
-
/***/ }),
|
|
1879
|
-
|
|
1880
|
-
/***/ "a9e3":
|
|
1881
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1882
|
-
|
|
1883
|
-
"use strict";
|
|
1884
|
-
/* harmony import */ var _browser_BrowserAztecCodeReader__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d5b2");
|
|
1885
|
-
/* harmony import */ var _browser_BrowserBarcodeReader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("e3f3");
|
|
1886
|
-
/* harmony import */ var _browser_BrowserCodeReader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("f505");
|
|
1887
|
-
/* harmony import */ var _browser_BrowserDatamatrixCodeReader__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("9fa8");
|
|
1888
|
-
/* harmony import */ var _browser_BrowserMultiFormatReader__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("6cd7");
|
|
1889
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BrowserMultiFormatReader", function() { return _browser_BrowserMultiFormatReader__WEBPACK_IMPORTED_MODULE_4__["a"]; });
|
|
1890
|
-
|
|
1891
|
-
/* harmony import */ var _browser_BrowserPDF417Reader__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("6246");
|
|
1892
|
-
/* harmony import */ var _browser_BrowserQRCodeReader__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("8283");
|
|
1893
|
-
/* harmony import */ var _browser_BrowserQRCodeSvgWriter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("9878");
|
|
1894
|
-
/* harmony import */ var _browser_DecodeContinuouslyCallback__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("3cb6");
|
|
1895
|
-
/* harmony import */ var _browser_DecodeContinuouslyCallback__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_browser_DecodeContinuouslyCallback__WEBPACK_IMPORTED_MODULE_8__);
|
|
1896
|
-
/* harmony import */ var _browser_HTMLCanvasElementLuminanceSource__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("0c36");
|
|
1897
|
-
/* harmony import */ var _browser_HTMLVisualMediaElement__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("8f21");
|
|
1898
|
-
/* harmony import */ var _browser_HTMLVisualMediaElement__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_browser_HTMLVisualMediaElement__WEBPACK_IMPORTED_MODULE_10__);
|
|
1899
|
-
/* harmony import */ var _browser_VideoInputDevice__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("e027");
|
|
1900
|
-
// browser
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
//# sourceMappingURL=browser.js.map
|
|
1914
|
-
|
|
1915
|
-
/***/ }),
|
|
1916
|
-
|
|
1917
|
-
/***/ "ca08":
|
|
1918
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1919
|
-
|
|
1920
|
-
"use strict";
|
|
1921
|
-
/* harmony import */ var _Exception__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d0b6");
|
|
1922
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
1923
|
-
var extendStatics = function (d, b) {
|
|
1924
|
-
extendStatics = Object.setPrototypeOf ||
|
|
1925
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
1926
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
1927
|
-
return extendStatics(d, b);
|
|
1928
|
-
};
|
|
1929
|
-
return function (d, b) {
|
|
1930
|
-
extendStatics(d, b);
|
|
1931
|
-
function __() { this.constructor = d; }
|
|
1932
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1933
|
-
};
|
|
1934
|
-
})();
|
|
1935
|
-
|
|
1936
|
-
/**
|
|
1937
|
-
* Custom Error class of type Exception.
|
|
1938
|
-
*/
|
|
1939
|
-
var NotFoundException = /** @class */ (function (_super) {
|
|
1940
|
-
__extends(NotFoundException, _super);
|
|
1941
|
-
function NotFoundException() {
|
|
1942
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1943
|
-
}
|
|
1944
|
-
NotFoundException.getNotFoundInstance = function () {
|
|
1945
|
-
return new NotFoundException();
|
|
1946
|
-
};
|
|
1947
|
-
NotFoundException.kind = 'NotFoundException';
|
|
1948
|
-
return NotFoundException;
|
|
1949
|
-
}(_Exception__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]));
|
|
1950
|
-
/* harmony default export */ __webpack_exports__["a"] = (NotFoundException);
|
|
1951
|
-
//# sourceMappingURL=NotFoundException.js.map
|
|
1952
|
-
|
|
1953
|
-
/***/ }),
|
|
1954
|
-
|
|
1955
|
-
/***/ "d0b6":
|
|
1956
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1957
|
-
|
|
1958
|
-
"use strict";
|
|
1959
|
-
/* harmony import */ var ts_custom_error__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("9963");
|
|
1960
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
1961
|
-
var extendStatics = function (d, b) {
|
|
1962
|
-
extendStatics = Object.setPrototypeOf ||
|
|
1963
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
1964
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
1965
|
-
return extendStatics(d, b);
|
|
1966
|
-
};
|
|
1967
|
-
return function (d, b) {
|
|
1968
|
-
extendStatics(d, b);
|
|
1969
|
-
function __() { this.constructor = d; }
|
|
1970
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1971
|
-
};
|
|
1972
|
-
})();
|
|
1973
|
-
|
|
1974
|
-
/**
|
|
1975
|
-
* Custom Error class of type Exception.
|
|
1976
|
-
*/
|
|
1977
|
-
var Exception = /** @class */ (function (_super) {
|
|
1978
|
-
__extends(Exception, _super);
|
|
1979
|
-
/**
|
|
1980
|
-
* Allows Exception to be constructed directly
|
|
1981
|
-
* with some message and prototype definition.
|
|
1982
|
-
*/
|
|
1983
|
-
function Exception(message) {
|
|
1984
|
-
if (message === void 0) { message = undefined; }
|
|
1985
|
-
var _this = _super.call(this, message) || this;
|
|
1986
|
-
_this.message = message;
|
|
1987
|
-
return _this;
|
|
1988
|
-
}
|
|
1989
|
-
Exception.prototype.getKind = function () {
|
|
1990
|
-
var ex = this.constructor;
|
|
1991
|
-
return ex.kind;
|
|
1992
|
-
};
|
|
1993
|
-
/**
|
|
1994
|
-
* It's typed as string so it can be extended and overriden.
|
|
1995
|
-
*/
|
|
1996
|
-
Exception.kind = 'Exception';
|
|
1997
|
-
return Exception;
|
|
1998
|
-
}(ts_custom_error__WEBPACK_IMPORTED_MODULE_0__[/* CustomError */ "a"]));
|
|
1999
|
-
/* harmony default export */ __webpack_exports__["a"] = (Exception);
|
|
2000
|
-
//# sourceMappingURL=Exception.js.map
|
|
2001
|
-
|
|
2002
|
-
/***/ }),
|
|
2003
|
-
|
|
2004
|
-
/***/ "d5b2":
|
|
2005
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2006
|
-
|
|
2007
|
-
"use strict";
|
|
2008
|
-
/* unused harmony export BrowserAztecCodeReader */
|
|
2009
|
-
/* harmony import */ var _BrowserCodeReader__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f505");
|
|
2010
|
-
/* harmony import */ var _core_aztec_AztecReader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("0ba3");
|
|
2011
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
2012
|
-
var extendStatics = function (d, b) {
|
|
2013
|
-
extendStatics = Object.setPrototypeOf ||
|
|
2014
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
2015
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
2016
|
-
return extendStatics(d, b);
|
|
2017
|
-
};
|
|
2018
|
-
return function (d, b) {
|
|
2019
|
-
extendStatics(d, b);
|
|
2020
|
-
function __() { this.constructor = d; }
|
|
2021
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
2022
|
-
};
|
|
2023
|
-
})();
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
/**
|
|
2027
|
-
* Aztec Code reader to use from browser.
|
|
2028
|
-
*
|
|
2029
|
-
* @class BrowserAztecCodeReader
|
|
2030
|
-
* @extends {BrowserCodeReader}
|
|
2031
|
-
*/
|
|
2032
|
-
var BrowserAztecCodeReader = /** @class */ (function (_super) {
|
|
2033
|
-
__extends(BrowserAztecCodeReader, _super);
|
|
2034
|
-
/**
|
|
2035
|
-
* Creates an instance of BrowserAztecCodeReader.
|
|
2036
|
-
* @param {number} [timeBetweenScansMillis=500] the time delay between subsequent decode tries
|
|
2037
|
-
*
|
|
2038
|
-
* @memberOf BrowserAztecCodeReader
|
|
2039
|
-
*/
|
|
2040
|
-
function BrowserAztecCodeReader(timeBetweenScansMillis) {
|
|
2041
|
-
if (timeBetweenScansMillis === void 0) { timeBetweenScansMillis = 500; }
|
|
2042
|
-
return _super.call(this, new _core_aztec_AztecReader__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"](), timeBetweenScansMillis) || this;
|
|
2043
|
-
}
|
|
2044
|
-
return BrowserAztecCodeReader;
|
|
2045
|
-
}(_BrowserCodeReader__WEBPACK_IMPORTED_MODULE_0__[/* BrowserCodeReader */ "a"]));
|
|
2046
|
-
|
|
2047
|
-
//# sourceMappingURL=BrowserAztecCodeReader.js.map
|
|
2048
|
-
|
|
2049
|
-
/***/ }),
|
|
2050
|
-
|
|
2051
|
-
/***/ "d615":
|
|
2052
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2053
|
-
|
|
2054
|
-
"use strict";
|
|
2055
|
-
/* harmony import */ var _Exception__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d0b6");
|
|
2056
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
2057
|
-
var extendStatics = function (d, b) {
|
|
2058
|
-
extendStatics = Object.setPrototypeOf ||
|
|
2059
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
2060
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
2061
|
-
return extendStatics(d, b);
|
|
2062
|
-
};
|
|
2063
|
-
return function (d, b) {
|
|
2064
|
-
extendStatics(d, b);
|
|
2065
|
-
function __() { this.constructor = d; }
|
|
2066
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
2067
|
-
};
|
|
2068
|
-
})();
|
|
2069
|
-
|
|
2070
|
-
/**
|
|
2071
|
-
* Custom Error class of type Exception.
|
|
2072
|
-
*/
|
|
2073
|
-
var ReaderException = /** @class */ (function (_super) {
|
|
2074
|
-
__extends(ReaderException, _super);
|
|
2075
|
-
function ReaderException() {
|
|
2076
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
2077
|
-
}
|
|
2078
|
-
ReaderException.kind = 'ReaderException';
|
|
2079
|
-
return ReaderException;
|
|
2080
|
-
}(_Exception__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]));
|
|
2081
|
-
/* harmony default export */ __webpack_exports__["a"] = (ReaderException);
|
|
2082
|
-
//# sourceMappingURL=ReaderException.js.map
|
|
2083
|
-
|
|
2084
|
-
/***/ }),
|
|
2085
|
-
|
|
2086
|
-
/***/ "e027":
|
|
2087
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2088
|
-
|
|
2089
|
-
"use strict";
|
|
2090
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return VideoInputDevice; });
|
|
2091
|
-
/**
|
|
2092
|
-
* @deprecated Moving to @zxing/browser
|
|
2093
|
-
*
|
|
2094
|
-
* Video input device metadata containing the id and label of the device if available.
|
|
2095
|
-
*/
|
|
2096
|
-
var VideoInputDevice = /** @class */ (function () {
|
|
2097
|
-
/**
|
|
2098
|
-
* Creates an instance of VideoInputDevice.
|
|
2099
|
-
*
|
|
2100
|
-
* @param {string} deviceId the video input device id
|
|
2101
|
-
* @param {string} label the label of the device if available
|
|
2102
|
-
*/
|
|
2103
|
-
function VideoInputDevice(deviceId, label, groupId) {
|
|
2104
|
-
this.deviceId = deviceId;
|
|
2105
|
-
this.label = label;
|
|
2106
|
-
/** @inheritdoc */
|
|
2107
|
-
this.kind = 'videoinput';
|
|
2108
|
-
this.groupId = groupId || undefined;
|
|
2109
|
-
}
|
|
2110
|
-
/** @inheritdoc */
|
|
2111
|
-
VideoInputDevice.prototype.toJSON = function () {
|
|
2112
|
-
return {
|
|
2113
|
-
kind: this.kind,
|
|
2114
|
-
groupId: this.groupId,
|
|
2115
|
-
deviceId: this.deviceId,
|
|
2116
|
-
label: this.label,
|
|
2117
|
-
};
|
|
2118
|
-
};
|
|
2119
|
-
return VideoInputDevice;
|
|
2120
|
-
}());
|
|
2121
|
-
|
|
2122
|
-
//# sourceMappingURL=VideoInputDevice.js.map
|
|
2123
|
-
|
|
2124
|
-
/***/ }),
|
|
2125
|
-
|
|
2126
|
-
/***/ "e3f3":
|
|
2127
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2128
|
-
|
|
2129
|
-
"use strict";
|
|
2130
|
-
/* unused harmony export BrowserBarcodeReader */
|
|
2131
|
-
/* harmony import */ var _BrowserCodeReader__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f505");
|
|
2132
|
-
/* harmony import */ var _core_oned_MultiFormatOneDReader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("a793");
|
|
2133
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
2134
|
-
var extendStatics = function (d, b) {
|
|
2135
|
-
extendStatics = Object.setPrototypeOf ||
|
|
2136
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
2137
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
2138
|
-
return extendStatics(d, b);
|
|
2139
|
-
};
|
|
2140
|
-
return function (d, b) {
|
|
2141
|
-
extendStatics(d, b);
|
|
2142
|
-
function __() { this.constructor = d; }
|
|
2143
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
2144
|
-
};
|
|
2145
|
-
})();
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
/**
|
|
2149
|
-
* @deprecated Moving to @zxing/browser
|
|
2150
|
-
*
|
|
2151
|
-
* Barcode reader reader to use from browser.
|
|
2152
|
-
*/
|
|
2153
|
-
var BrowserBarcodeReader = /** @class */ (function (_super) {
|
|
2154
|
-
__extends(BrowserBarcodeReader, _super);
|
|
2155
|
-
/**
|
|
2156
|
-
* Creates an instance of BrowserBarcodeReader.
|
|
2157
|
-
* @param {number} [timeBetweenScansMillis=500] the time delay between subsequent decode tries
|
|
2158
|
-
* @param {Map<DecodeHintType, any>} hints
|
|
2159
|
-
*/
|
|
2160
|
-
function BrowserBarcodeReader(timeBetweenScansMillis, hints) {
|
|
2161
|
-
if (timeBetweenScansMillis === void 0) { timeBetweenScansMillis = 500; }
|
|
2162
|
-
return _super.call(this, new _core_oned_MultiFormatOneDReader__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"](hints), timeBetweenScansMillis, hints) || this;
|
|
2163
|
-
}
|
|
2164
|
-
return BrowserBarcodeReader;
|
|
2165
|
-
}(_BrowserCodeReader__WEBPACK_IMPORTED_MODULE_0__[/* BrowserCodeReader */ "a"]));
|
|
2166
|
-
|
|
2167
|
-
//# sourceMappingURL=BrowserBarcodeReader.js.map
|
|
2168
|
-
|
|
2169
|
-
/***/ }),
|
|
2170
|
-
|
|
2171
|
-
/***/ "e8f1":
|
|
2172
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2173
|
-
|
|
2174
|
-
"use strict";
|
|
2175
|
-
/* harmony import */ var _Exception__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d0b6");
|
|
2176
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
2177
|
-
var extendStatics = function (d, b) {
|
|
2178
|
-
extendStatics = Object.setPrototypeOf ||
|
|
2179
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
2180
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
2181
|
-
return extendStatics(d, b);
|
|
2182
|
-
};
|
|
2183
|
-
return function (d, b) {
|
|
2184
|
-
extendStatics(d, b);
|
|
2185
|
-
function __() { this.constructor = d; }
|
|
2186
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
2187
|
-
};
|
|
2188
|
-
})();
|
|
2189
|
-
|
|
2190
|
-
/**
|
|
2191
|
-
* Custom Error class of type Exception.
|
|
2192
|
-
*/
|
|
2193
|
-
var OutOfMemoryError = /** @class */ (function (_super) {
|
|
2194
|
-
__extends(OutOfMemoryError, _super);
|
|
2195
|
-
function OutOfMemoryError() {
|
|
2196
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
2197
|
-
}
|
|
2198
|
-
return OutOfMemoryError;
|
|
2199
|
-
}(_Exception__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]));
|
|
2200
|
-
/* harmony default export */ __webpack_exports__["a"] = (OutOfMemoryError);
|
|
2201
|
-
//# sourceMappingURL=OutOfMemoryError.js.map
|
|
2202
|
-
|
|
2203
|
-
/***/ }),
|
|
2204
|
-
|
|
2205
|
-
/***/ "f0a7":
|
|
2206
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2207
|
-
|
|
2208
|
-
"use strict";
|
|
2209
|
-
/* harmony import */ var _Exception__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d0b6");
|
|
2210
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
2211
|
-
var extendStatics = function (d, b) {
|
|
2212
|
-
extendStatics = Object.setPrototypeOf ||
|
|
2213
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
2214
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
2215
|
-
return extendStatics(d, b);
|
|
2216
|
-
};
|
|
2217
|
-
return function (d, b) {
|
|
2218
|
-
extendStatics(d, b);
|
|
2219
|
-
function __() { this.constructor = d; }
|
|
2220
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
2221
|
-
};
|
|
2222
|
-
})();
|
|
2223
|
-
|
|
2224
|
-
/**
|
|
2225
|
-
* Custom Error class of type Exception.
|
|
2226
|
-
*/
|
|
2227
|
-
var IllegalArgumentException = /** @class */ (function (_super) {
|
|
2228
|
-
__extends(IllegalArgumentException, _super);
|
|
2229
|
-
function IllegalArgumentException() {
|
|
2230
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
2231
|
-
}
|
|
2232
|
-
IllegalArgumentException.kind = 'IllegalArgumentException';
|
|
2233
|
-
return IllegalArgumentException;
|
|
2234
|
-
}(_Exception__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]));
|
|
2235
|
-
/* harmony default export */ __webpack_exports__["a"] = (IllegalArgumentException);
|
|
2236
|
-
//# sourceMappingURL=IllegalArgumentException.js.map
|
|
2237
|
-
|
|
2238
|
-
/***/ }),
|
|
2239
|
-
|
|
2240
|
-
/***/ "f20f":
|
|
2241
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2242
|
-
|
|
2243
|
-
"use strict";
|
|
2244
|
-
/* harmony import */ var _util_StringBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6530");
|
|
2245
|
-
/* harmony import */ var _UnsupportedOperationException__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("1cba");
|
|
2246
|
-
/*
|
|
2247
|
-
* Copyright 2009 ZXing authors
|
|
2248
|
-
*
|
|
2249
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2250
|
-
* you may not use this file except in compliance with the License.
|
|
2251
|
-
* You may obtain a copy of the License at
|
|
2252
|
-
*
|
|
2253
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2254
|
-
*
|
|
2255
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2256
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2257
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2258
|
-
* See the License for the specific language governing permissions and
|
|
2259
|
-
* limitations under the License.
|
|
2260
|
-
*/
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
/*namespace com.google.zxing {*/
|
|
2264
|
-
/**
|
|
2265
|
-
* The purpose of this class hierarchy is to abstract different bitmap implementations across
|
|
2266
|
-
* platforms into a standard interface for requesting greyscale luminance values. The interface
|
|
2267
|
-
* only provides immutable methods; therefore crop and rotation create copies. This is to ensure
|
|
2268
|
-
* that one Reader does not modify the original luminance source and leave it in an unknown state
|
|
2269
|
-
* for other Readers in the chain.
|
|
2270
|
-
*
|
|
2271
|
-
* @author dswitkin@google.com (Daniel Switkin)
|
|
2272
|
-
*/
|
|
2273
|
-
var LuminanceSource = /** @class */ (function () {
|
|
2274
|
-
function LuminanceSource(width /*int*/, height /*int*/) {
|
|
2275
|
-
this.width = width;
|
|
2276
|
-
this.height = height;
|
|
2277
|
-
}
|
|
2278
|
-
/**
|
|
2279
|
-
* @return The width of the bitmap.
|
|
2280
|
-
*/
|
|
2281
|
-
LuminanceSource.prototype.getWidth = function () {
|
|
2282
|
-
return this.width;
|
|
2283
|
-
};
|
|
2284
|
-
/**
|
|
2285
|
-
* @return The height of the bitmap.
|
|
2286
|
-
*/
|
|
2287
|
-
LuminanceSource.prototype.getHeight = function () {
|
|
2288
|
-
return this.height;
|
|
2289
|
-
};
|
|
2290
|
-
/**
|
|
2291
|
-
* @return Whether this subclass supports cropping.
|
|
2292
|
-
*/
|
|
2293
|
-
LuminanceSource.prototype.isCropSupported = function () {
|
|
2294
|
-
return false;
|
|
2295
|
-
};
|
|
2296
|
-
/**
|
|
2297
|
-
* Returns a new object with cropped image data. Implementations may keep a reference to the
|
|
2298
|
-
* original data rather than a copy. Only callable if isCropSupported() is true.
|
|
2299
|
-
*
|
|
2300
|
-
* @param left The left coordinate, which must be in [0,getWidth())
|
|
2301
|
-
* @param top The top coordinate, which must be in [0,getHeight())
|
|
2302
|
-
* @param width The width of the rectangle to crop.
|
|
2303
|
-
* @param height The height of the rectangle to crop.
|
|
2304
|
-
* @return A cropped version of this object.
|
|
2305
|
-
*/
|
|
2306
|
-
LuminanceSource.prototype.crop = function (left /*int*/, top /*int*/, width /*int*/, height /*int*/) {
|
|
2307
|
-
throw new _UnsupportedOperationException__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]('This luminance source does not support cropping.');
|
|
2308
|
-
};
|
|
2309
|
-
/**
|
|
2310
|
-
* @return Whether this subclass supports counter-clockwise rotation.
|
|
2311
|
-
*/
|
|
2312
|
-
LuminanceSource.prototype.isRotateSupported = function () {
|
|
2313
|
-
return false;
|
|
2314
|
-
};
|
|
2315
|
-
/**
|
|
2316
|
-
* Returns a new object with rotated image data by 90 degrees counterclockwise.
|
|
2317
|
-
* Only callable if {@link #isRotateSupported()} is true.
|
|
2318
|
-
*
|
|
2319
|
-
* @return A rotated version of this object.
|
|
2320
|
-
*/
|
|
2321
|
-
LuminanceSource.prototype.rotateCounterClockwise = function () {
|
|
2322
|
-
throw new _UnsupportedOperationException__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]('This luminance source does not support rotation by 90 degrees.');
|
|
2323
|
-
};
|
|
2324
|
-
/**
|
|
2325
|
-
* Returns a new object with rotated image data by 45 degrees counterclockwise.
|
|
2326
|
-
* Only callable if {@link #isRotateSupported()} is true.
|
|
2327
|
-
*
|
|
2328
|
-
* @return A rotated version of this object.
|
|
2329
|
-
*/
|
|
2330
|
-
LuminanceSource.prototype.rotateCounterClockwise45 = function () {
|
|
2331
|
-
throw new _UnsupportedOperationException__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]('This luminance source does not support rotation by 45 degrees.');
|
|
2332
|
-
};
|
|
2333
|
-
/*@Override*/
|
|
2334
|
-
LuminanceSource.prototype.toString = function () {
|
|
2335
|
-
var row = new Uint8ClampedArray(this.width);
|
|
2336
|
-
var result = new _util_StringBuilder__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]();
|
|
2337
|
-
for (var y = 0; y < this.height; y++) {
|
|
2338
|
-
var sourceRow = this.getRow(y, row);
|
|
2339
|
-
for (var x = 0; x < this.width; x++) {
|
|
2340
|
-
var luminance = sourceRow[x] & 0xFF;
|
|
2341
|
-
var c = void 0;
|
|
2342
|
-
if (luminance < 0x40) {
|
|
2343
|
-
c = '#';
|
|
2344
|
-
}
|
|
2345
|
-
else if (luminance < 0x80) {
|
|
2346
|
-
c = '+';
|
|
2347
|
-
}
|
|
2348
|
-
else if (luminance < 0xC0) {
|
|
2349
|
-
c = '.';
|
|
2350
|
-
}
|
|
2351
|
-
else {
|
|
2352
|
-
c = ' ';
|
|
2353
|
-
}
|
|
2354
|
-
result.append(c);
|
|
2355
|
-
}
|
|
2356
|
-
result.append('\n');
|
|
2357
|
-
}
|
|
2358
|
-
return result.toString();
|
|
2359
|
-
};
|
|
2360
|
-
return LuminanceSource;
|
|
2361
|
-
}());
|
|
2362
|
-
/* harmony default export */ __webpack_exports__["a"] = (LuminanceSource);
|
|
2363
|
-
//# sourceMappingURL=LuminanceSource.js.map
|
|
2364
|
-
|
|
2365
|
-
/***/ }),
|
|
2366
|
-
|
|
2367
|
-
/***/ "f505":
|
|
2368
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2369
|
-
|
|
2370
|
-
"use strict";
|
|
2371
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return BrowserCodeReader; });
|
|
2372
|
-
/* harmony import */ var _core_ArgumentException__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f8c0");
|
|
2373
|
-
/* harmony import */ var _core_BinaryBitmap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("57fd");
|
|
2374
|
-
/* harmony import */ var _core_ChecksumException__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("2d92");
|
|
2375
|
-
/* harmony import */ var _core_common_HybridBinarizer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("5641");
|
|
2376
|
-
/* harmony import */ var _core_FormatException__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("7978");
|
|
2377
|
-
/* harmony import */ var _core_NotFoundException__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("ca08");
|
|
2378
|
-
/* harmony import */ var _HTMLCanvasElementLuminanceSource__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("0c36");
|
|
2379
|
-
/* harmony import */ var _VideoInputDevice__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("e027");
|
|
2380
|
-
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2381
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2382
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2383
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
2384
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
2385
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
2386
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
2387
|
-
});
|
|
2388
|
-
};
|
|
2389
|
-
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
|
|
2390
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
2391
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
2392
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
2393
|
-
function step(op) {
|
|
2394
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
2395
|
-
while (_) try {
|
|
2396
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
2397
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
2398
|
-
switch (op[0]) {
|
|
2399
|
-
case 0: case 1: t = op; break;
|
|
2400
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
2401
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
2402
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
2403
|
-
default:
|
|
2404
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
2405
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
2406
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
2407
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
2408
|
-
if (t[2]) _.ops.pop();
|
|
2409
|
-
_.trys.pop(); continue;
|
|
2410
|
-
}
|
|
2411
|
-
op = body.call(thisArg, _);
|
|
2412
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
2413
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
2414
|
-
}
|
|
2415
|
-
};
|
|
2416
|
-
var __values = (undefined && undefined.__values) || function(o) {
|
|
2417
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
2418
|
-
if (m) return m.call(o);
|
|
2419
|
-
if (o && typeof o.length === "number") return {
|
|
2420
|
-
next: function () {
|
|
2421
|
-
if (o && i >= o.length) o = void 0;
|
|
2422
|
-
return { value: o && o[i++], done: !o };
|
|
2423
|
-
}
|
|
2424
|
-
};
|
|
2425
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
2426
|
-
};
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
/**
|
|
2436
|
-
* @deprecated Moving to @zxing/browser
|
|
2437
|
-
*
|
|
2438
|
-
* Base class for browser code reader.
|
|
2439
|
-
*/
|
|
2440
|
-
var BrowserCodeReader = /** @class */ (function () {
|
|
2441
|
-
/**
|
|
2442
|
-
* Creates an instance of BrowserCodeReader.
|
|
2443
|
-
* @param {Reader} reader The reader instance to decode the barcode
|
|
2444
|
-
* @param {number} [timeBetweenScansMillis=500] the time delay between subsequent successful decode tries
|
|
2445
|
-
*
|
|
2446
|
-
* @memberOf BrowserCodeReader
|
|
2447
|
-
*/
|
|
2448
|
-
function BrowserCodeReader(reader, timeBetweenScansMillis, _hints) {
|
|
2449
|
-
if (timeBetweenScansMillis === void 0) { timeBetweenScansMillis = 500; }
|
|
2450
|
-
this.reader = reader;
|
|
2451
|
-
this.timeBetweenScansMillis = timeBetweenScansMillis;
|
|
2452
|
-
this._hints = _hints;
|
|
2453
|
-
/**
|
|
2454
|
-
* This will break the loop.
|
|
2455
|
-
*/
|
|
2456
|
-
this._stopContinuousDecode = false;
|
|
2457
|
-
/**
|
|
2458
|
-
* This will break the loop.
|
|
2459
|
-
*/
|
|
2460
|
-
this._stopAsyncDecode = false;
|
|
2461
|
-
/**
|
|
2462
|
-
* Delay time between decode attempts made by the scanner.
|
|
2463
|
-
*/
|
|
2464
|
-
this._timeBetweenDecodingAttempts = 0;
|
|
2465
|
-
}
|
|
2466
|
-
Object.defineProperty(BrowserCodeReader.prototype, "hasNavigator", {
|
|
2467
|
-
/**
|
|
2468
|
-
* If navigator is present.
|
|
2469
|
-
*/
|
|
2470
|
-
get: function () {
|
|
2471
|
-
return typeof navigator !== 'undefined';
|
|
2472
|
-
},
|
|
2473
|
-
enumerable: false,
|
|
2474
|
-
configurable: true
|
|
2475
|
-
});
|
|
2476
|
-
Object.defineProperty(BrowserCodeReader.prototype, "isMediaDevicesSuported", {
|
|
2477
|
-
/**
|
|
2478
|
-
* If mediaDevices under navigator is supported.
|
|
2479
|
-
*/
|
|
2480
|
-
get: function () {
|
|
2481
|
-
return this.hasNavigator && !!navigator.mediaDevices;
|
|
2482
|
-
},
|
|
2483
|
-
enumerable: false,
|
|
2484
|
-
configurable: true
|
|
2485
|
-
});
|
|
2486
|
-
Object.defineProperty(BrowserCodeReader.prototype, "canEnumerateDevices", {
|
|
2487
|
-
/**
|
|
2488
|
-
* If enumerateDevices under navigator is supported.
|
|
2489
|
-
*/
|
|
2490
|
-
get: function () {
|
|
2491
|
-
return !!(this.isMediaDevicesSuported && navigator.mediaDevices.enumerateDevices);
|
|
2492
|
-
},
|
|
2493
|
-
enumerable: false,
|
|
2494
|
-
configurable: true
|
|
2495
|
-
});
|
|
2496
|
-
Object.defineProperty(BrowserCodeReader.prototype, "timeBetweenDecodingAttempts", {
|
|
2497
|
-
/** Time between two decoding tries in milli seconds. */
|
|
2498
|
-
get: function () {
|
|
2499
|
-
return this._timeBetweenDecodingAttempts;
|
|
2500
|
-
},
|
|
2501
|
-
/**
|
|
2502
|
-
* Change the time span the decoder waits between two decoding tries.
|
|
2503
|
-
*
|
|
2504
|
-
* @param {number} millis Time between two decoding tries in milli seconds.
|
|
2505
|
-
*/
|
|
2506
|
-
set: function (millis) {
|
|
2507
|
-
this._timeBetweenDecodingAttempts = millis < 0 ? 0 : millis;
|
|
2508
|
-
},
|
|
2509
|
-
enumerable: false,
|
|
2510
|
-
configurable: true
|
|
2511
|
-
});
|
|
2512
|
-
Object.defineProperty(BrowserCodeReader.prototype, "hints", {
|
|
2513
|
-
/**
|
|
2514
|
-
* Sets the hints.
|
|
2515
|
-
*/
|
|
2516
|
-
get: function () {
|
|
2517
|
-
return this._hints;
|
|
2518
|
-
},
|
|
2519
|
-
/**
|
|
2520
|
-
* Sets the hints.
|
|
2521
|
-
*/
|
|
2522
|
-
set: function (hints) {
|
|
2523
|
-
this._hints = hints || null;
|
|
2524
|
-
},
|
|
2525
|
-
enumerable: false,
|
|
2526
|
-
configurable: true
|
|
2527
|
-
});
|
|
2528
|
-
/**
|
|
2529
|
-
* Lists all the available video input devices.
|
|
2530
|
-
*/
|
|
2531
|
-
BrowserCodeReader.prototype.listVideoInputDevices = function () {
|
|
2532
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2533
|
-
var devices, videoDevices, devices_1, devices_1_1, device, kind, deviceId, label, groupId, videoDevice;
|
|
2534
|
-
var e_1, _a;
|
|
2535
|
-
return __generator(this, function (_b) {
|
|
2536
|
-
switch (_b.label) {
|
|
2537
|
-
case 0:
|
|
2538
|
-
if (!this.hasNavigator) {
|
|
2539
|
-
throw new Error('Can\'t enumerate devices, navigator is not present.');
|
|
2540
|
-
}
|
|
2541
|
-
if (!this.canEnumerateDevices) {
|
|
2542
|
-
throw new Error('Can\'t enumerate devices, method not supported.');
|
|
2543
|
-
}
|
|
2544
|
-
return [4 /*yield*/, navigator.mediaDevices.enumerateDevices()];
|
|
2545
|
-
case 1:
|
|
2546
|
-
devices = _b.sent();
|
|
2547
|
-
videoDevices = [];
|
|
2548
|
-
try {
|
|
2549
|
-
for (devices_1 = __values(devices), devices_1_1 = devices_1.next(); !devices_1_1.done; devices_1_1 = devices_1.next()) {
|
|
2550
|
-
device = devices_1_1.value;
|
|
2551
|
-
kind = device.kind === 'video' ? 'videoinput' : device.kind;
|
|
2552
|
-
if (kind !== 'videoinput') {
|
|
2553
|
-
continue;
|
|
2554
|
-
}
|
|
2555
|
-
deviceId = device.deviceId || device.id;
|
|
2556
|
-
label = device.label || "Video device " + (videoDevices.length + 1);
|
|
2557
|
-
groupId = device.groupId;
|
|
2558
|
-
videoDevice = { deviceId: deviceId, label: label, kind: kind, groupId: groupId };
|
|
2559
|
-
videoDevices.push(videoDevice);
|
|
2560
|
-
}
|
|
2561
|
-
}
|
|
2562
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2563
|
-
finally {
|
|
2564
|
-
try {
|
|
2565
|
-
if (devices_1_1 && !devices_1_1.done && (_a = devices_1.return)) _a.call(devices_1);
|
|
2566
|
-
}
|
|
2567
|
-
finally { if (e_1) throw e_1.error; }
|
|
2568
|
-
}
|
|
2569
|
-
return [2 /*return*/, videoDevices];
|
|
2570
|
-
}
|
|
2571
|
-
});
|
|
2572
|
-
});
|
|
2573
|
-
};
|
|
2574
|
-
/**
|
|
2575
|
-
* Obtain the list of available devices with type 'videoinput'.
|
|
2576
|
-
*
|
|
2577
|
-
* @returns {Promise<VideoInputDevice[]>} an array of available video input devices
|
|
2578
|
-
*
|
|
2579
|
-
* @memberOf BrowserCodeReader
|
|
2580
|
-
*
|
|
2581
|
-
* @deprecated Use `listVideoInputDevices` instead.
|
|
2582
|
-
*/
|
|
2583
|
-
BrowserCodeReader.prototype.getVideoInputDevices = function () {
|
|
2584
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2585
|
-
var devices;
|
|
2586
|
-
return __generator(this, function (_a) {
|
|
2587
|
-
switch (_a.label) {
|
|
2588
|
-
case 0: return [4 /*yield*/, this.listVideoInputDevices()];
|
|
2589
|
-
case 1:
|
|
2590
|
-
devices = _a.sent();
|
|
2591
|
-
return [2 /*return*/, devices.map(function (d) { return new _VideoInputDevice__WEBPACK_IMPORTED_MODULE_7__[/* VideoInputDevice */ "a"](d.deviceId, d.label); })];
|
|
2592
|
-
}
|
|
2593
|
-
});
|
|
2594
|
-
});
|
|
2595
|
-
};
|
|
2596
|
-
/**
|
|
2597
|
-
* Let's you find a device using it's Id.
|
|
2598
|
-
*/
|
|
2599
|
-
BrowserCodeReader.prototype.findDeviceById = function (deviceId) {
|
|
2600
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2601
|
-
var devices;
|
|
2602
|
-
return __generator(this, function (_a) {
|
|
2603
|
-
switch (_a.label) {
|
|
2604
|
-
case 0: return [4 /*yield*/, this.listVideoInputDevices()];
|
|
2605
|
-
case 1:
|
|
2606
|
-
devices = _a.sent();
|
|
2607
|
-
if (!devices) {
|
|
2608
|
-
return [2 /*return*/, null];
|
|
2609
|
-
}
|
|
2610
|
-
return [2 /*return*/, devices.find(function (x) { return x.deviceId === deviceId; })];
|
|
2611
|
-
}
|
|
2612
|
-
});
|
|
2613
|
-
});
|
|
2614
|
-
};
|
|
2615
|
-
/**
|
|
2616
|
-
* Decodes the barcode from the device specified by deviceId while showing the video in the specified video element.
|
|
2617
|
-
*
|
|
2618
|
-
* @param deviceId the id of one of the devices obtained after calling getVideoInputDevices. Can be undefined, in this case it will decode from one of the available devices, preffering the main camera (environment facing) if available.
|
|
2619
|
-
* @param video the video element in page where to show the video while decoding. Can be either an element id or directly an HTMLVideoElement. Can be undefined, in which case no video will be shown.
|
|
2620
|
-
* @returns The decoding result.
|
|
2621
|
-
*
|
|
2622
|
-
* @memberOf BrowserCodeReader
|
|
2623
|
-
*
|
|
2624
|
-
* @deprecated Use `decodeOnceFromVideoDevice` instead.
|
|
2625
|
-
*/
|
|
2626
|
-
BrowserCodeReader.prototype.decodeFromInputVideoDevice = function (deviceId, videoSource) {
|
|
2627
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2628
|
-
return __generator(this, function (_a) {
|
|
2629
|
-
switch (_a.label) {
|
|
2630
|
-
case 0: return [4 /*yield*/, this.decodeOnceFromVideoDevice(deviceId, videoSource)];
|
|
2631
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
2632
|
-
}
|
|
2633
|
-
});
|
|
2634
|
-
});
|
|
2635
|
-
};
|
|
2636
|
-
/**
|
|
2637
|
-
* In one attempt, tries to decode the barcode from the device specified by deviceId while showing the video in the specified video element.
|
|
2638
|
-
*
|
|
2639
|
-
* @param deviceId the id of one of the devices obtained after calling getVideoInputDevices. Can be undefined, in this case it will decode from one of the available devices, preffering the main camera (environment facing) if available.
|
|
2640
|
-
* @param video the video element in page where to show the video while decoding. Can be either an element id or directly an HTMLVideoElement. Can be undefined, in which case no video will be shown.
|
|
2641
|
-
* @returns The decoding result.
|
|
2642
|
-
*
|
|
2643
|
-
* @memberOf BrowserCodeReader
|
|
2644
|
-
*/
|
|
2645
|
-
BrowserCodeReader.prototype.decodeOnceFromVideoDevice = function (deviceId, videoSource) {
|
|
2646
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2647
|
-
var videoConstraints, constraints;
|
|
2648
|
-
return __generator(this, function (_a) {
|
|
2649
|
-
switch (_a.label) {
|
|
2650
|
-
case 0:
|
|
2651
|
-
this.reset();
|
|
2652
|
-
if (!deviceId) {
|
|
2653
|
-
videoConstraints = { facingMode: 'environment' };
|
|
2654
|
-
}
|
|
2655
|
-
else {
|
|
2656
|
-
videoConstraints = { deviceId: { exact: deviceId } };
|
|
2657
|
-
}
|
|
2658
|
-
constraints = { video: videoConstraints };
|
|
2659
|
-
return [4 /*yield*/, this.decodeOnceFromConstraints(constraints, videoSource)];
|
|
2660
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
2661
|
-
}
|
|
2662
|
-
});
|
|
2663
|
-
});
|
|
2664
|
-
};
|
|
2665
|
-
/**
|
|
2666
|
-
* In one attempt, tries to decode the barcode from a stream obtained from the given constraints while showing the video in the specified video element.
|
|
2667
|
-
*
|
|
2668
|
-
* @param constraints the media stream constraints to get s valid media stream to decode from
|
|
2669
|
-
* @param video the video element in page where to show the video while decoding. Can be either an element id or directly an HTMLVideoElement. Can be undefined, in which case no video will be shown.
|
|
2670
|
-
* @returns The decoding result.
|
|
2671
|
-
*
|
|
2672
|
-
* @memberOf BrowserCodeReader
|
|
2673
|
-
*/
|
|
2674
|
-
BrowserCodeReader.prototype.decodeOnceFromConstraints = function (constraints, videoSource) {
|
|
2675
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2676
|
-
var stream;
|
|
2677
|
-
return __generator(this, function (_a) {
|
|
2678
|
-
switch (_a.label) {
|
|
2679
|
-
case 0: return [4 /*yield*/, navigator.mediaDevices.getUserMedia(constraints)];
|
|
2680
|
-
case 1:
|
|
2681
|
-
stream = _a.sent();
|
|
2682
|
-
return [4 /*yield*/, this.decodeOnceFromStream(stream, videoSource)];
|
|
2683
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
2684
|
-
}
|
|
2685
|
-
});
|
|
2686
|
-
});
|
|
2687
|
-
};
|
|
2688
|
-
/**
|
|
2689
|
-
* In one attempt, tries to decode the barcode from a stream obtained from the given constraints while showing the video in the specified video element.
|
|
2690
|
-
*
|
|
2691
|
-
* @param {MediaStream} [constraints] the media stream constraints to get s valid media stream to decode from
|
|
2692
|
-
* @param {string|HTMLVideoElement} [video] the video element in page where to show the video while decoding. Can be either an element id or directly an HTMLVideoElement. Can be undefined, in which case no video will be shown.
|
|
2693
|
-
* @returns {Promise<Result>} The decoding result.
|
|
2694
|
-
*
|
|
2695
|
-
* @memberOf BrowserCodeReader
|
|
2696
|
-
*/
|
|
2697
|
-
BrowserCodeReader.prototype.decodeOnceFromStream = function (stream, videoSource) {
|
|
2698
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2699
|
-
var video, result;
|
|
2700
|
-
return __generator(this, function (_a) {
|
|
2701
|
-
switch (_a.label) {
|
|
2702
|
-
case 0:
|
|
2703
|
-
this.reset();
|
|
2704
|
-
return [4 /*yield*/, this.attachStreamToVideo(stream, videoSource)];
|
|
2705
|
-
case 1:
|
|
2706
|
-
video = _a.sent();
|
|
2707
|
-
return [4 /*yield*/, this.decodeOnce(video)];
|
|
2708
|
-
case 2:
|
|
2709
|
-
result = _a.sent();
|
|
2710
|
-
return [2 /*return*/, result];
|
|
2711
|
-
}
|
|
2712
|
-
});
|
|
2713
|
-
});
|
|
2714
|
-
};
|
|
2715
|
-
/**
|
|
2716
|
-
* Continuously decodes the barcode from the device specified by device while showing the video in the specified video element.
|
|
2717
|
-
*
|
|
2718
|
-
* @param {string|null} [deviceId] the id of one of the devices obtained after calling getVideoInputDevices. Can be undefined, in this case it will decode from one of the available devices, preffering the main camera (environment facing) if available.
|
|
2719
|
-
* @param {string|HTMLVideoElement|null} [video] the video element in page where to show the video while decoding. Can be either an element id or directly an HTMLVideoElement. Can be undefined, in which case no video will be shown.
|
|
2720
|
-
* @returns {Promise<void>}
|
|
2721
|
-
*
|
|
2722
|
-
* @memberOf BrowserCodeReader
|
|
2723
|
-
*
|
|
2724
|
-
* @deprecated Use `decodeFromVideoDevice` instead.
|
|
2725
|
-
*/
|
|
2726
|
-
BrowserCodeReader.prototype.decodeFromInputVideoDeviceContinuously = function (deviceId, videoSource, callbackFn) {
|
|
2727
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2728
|
-
return __generator(this, function (_a) {
|
|
2729
|
-
switch (_a.label) {
|
|
2730
|
-
case 0: return [4 /*yield*/, this.decodeFromVideoDevice(deviceId, videoSource, callbackFn)];
|
|
2731
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
2732
|
-
}
|
|
2733
|
-
});
|
|
2734
|
-
});
|
|
2735
|
-
};
|
|
2736
|
-
/**
|
|
2737
|
-
* Continuously tries to decode the barcode from the device specified by device while showing the video in the specified video element.
|
|
2738
|
-
*
|
|
2739
|
-
* @param {string|null} [deviceId] the id of one of the devices obtained after calling getVideoInputDevices. Can be undefined, in this case it will decode from one of the available devices, preffering the main camera (environment facing) if available.
|
|
2740
|
-
* @param {string|HTMLVideoElement|null} [video] the video element in page where to show the video while decoding. Can be either an element id or directly an HTMLVideoElement. Can be undefined, in which case no video will be shown.
|
|
2741
|
-
* @returns {Promise<void>}
|
|
2742
|
-
*
|
|
2743
|
-
* @memberOf BrowserCodeReader
|
|
2744
|
-
*/
|
|
2745
|
-
BrowserCodeReader.prototype.decodeFromVideoDevice = function (deviceId, videoSource, callbackFn) {
|
|
2746
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2747
|
-
var videoConstraints, constraints;
|
|
2748
|
-
return __generator(this, function (_a) {
|
|
2749
|
-
switch (_a.label) {
|
|
2750
|
-
case 0:
|
|
2751
|
-
if (!deviceId) {
|
|
2752
|
-
videoConstraints = { facingMode: 'environment' };
|
|
2753
|
-
}
|
|
2754
|
-
else {
|
|
2755
|
-
videoConstraints = { deviceId: { exact: deviceId } };
|
|
2756
|
-
}
|
|
2757
|
-
constraints = { video: videoConstraints };
|
|
2758
|
-
return [4 /*yield*/, this.decodeFromConstraints(constraints, videoSource, callbackFn)];
|
|
2759
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
2760
|
-
}
|
|
2761
|
-
});
|
|
2762
|
-
});
|
|
2763
|
-
};
|
|
2764
|
-
/**
|
|
2765
|
-
* Continuously tries to decode the barcode from a stream obtained from the given constraints while showing the video in the specified video element.
|
|
2766
|
-
*
|
|
2767
|
-
* @param {MediaStream} [constraints] the media stream constraints to get s valid media stream to decode from
|
|
2768
|
-
* @param {string|HTMLVideoElement} [video] the video element in page where to show the video while decoding. Can be either an element id or directly an HTMLVideoElement. Can be undefined, in which case no video will be shown.
|
|
2769
|
-
* @returns {Promise<Result>} The decoding result.
|
|
2770
|
-
*
|
|
2771
|
-
* @memberOf BrowserCodeReader
|
|
2772
|
-
*/
|
|
2773
|
-
BrowserCodeReader.prototype.decodeFromConstraints = function (constraints, videoSource, callbackFn) {
|
|
2774
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2775
|
-
var stream;
|
|
2776
|
-
return __generator(this, function (_a) {
|
|
2777
|
-
switch (_a.label) {
|
|
2778
|
-
case 0: return [4 /*yield*/, navigator.mediaDevices.getUserMedia(constraints)];
|
|
2779
|
-
case 1:
|
|
2780
|
-
stream = _a.sent();
|
|
2781
|
-
return [4 /*yield*/, this.decodeFromStream(stream, videoSource, callbackFn)];
|
|
2782
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
2783
|
-
}
|
|
2784
|
-
});
|
|
2785
|
-
});
|
|
2786
|
-
};
|
|
2787
|
-
/**
|
|
2788
|
-
* In one attempt, tries to decode the barcode from a stream obtained from the given constraints while showing the video in the specified video element.
|
|
2789
|
-
*
|
|
2790
|
-
* @param {MediaStream} [constraints] the media stream constraints to get s valid media stream to decode from
|
|
2791
|
-
* @param {string|HTMLVideoElement} [video] the video element in page where to show the video while decoding. Can be either an element id or directly an HTMLVideoElement. Can be undefined, in which case no video will be shown.
|
|
2792
|
-
* @returns {Promise<Result>} The decoding result.
|
|
2793
|
-
*
|
|
2794
|
-
* @memberOf BrowserCodeReader
|
|
2795
|
-
*/
|
|
2796
|
-
BrowserCodeReader.prototype.decodeFromStream = function (stream, videoSource, callbackFn) {
|
|
2797
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2798
|
-
var video;
|
|
2799
|
-
return __generator(this, function (_a) {
|
|
2800
|
-
switch (_a.label) {
|
|
2801
|
-
case 0:
|
|
2802
|
-
this.reset();
|
|
2803
|
-
return [4 /*yield*/, this.attachStreamToVideo(stream, videoSource)];
|
|
2804
|
-
case 1:
|
|
2805
|
-
video = _a.sent();
|
|
2806
|
-
return [4 /*yield*/, this.decodeContinuously(video, callbackFn)];
|
|
2807
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
2808
|
-
}
|
|
2809
|
-
});
|
|
2810
|
-
});
|
|
2811
|
-
};
|
|
2812
|
-
/**
|
|
2813
|
-
* Breaks the decoding loop.
|
|
2814
|
-
*/
|
|
2815
|
-
BrowserCodeReader.prototype.stopAsyncDecode = function () {
|
|
2816
|
-
this._stopAsyncDecode = true;
|
|
2817
|
-
};
|
|
2818
|
-
/**
|
|
2819
|
-
* Breaks the decoding loop.
|
|
2820
|
-
*/
|
|
2821
|
-
BrowserCodeReader.prototype.stopContinuousDecode = function () {
|
|
2822
|
-
this._stopContinuousDecode = true;
|
|
2823
|
-
};
|
|
2824
|
-
/**
|
|
2825
|
-
* Sets the new stream and request a new decoding-with-delay.
|
|
2826
|
-
*
|
|
2827
|
-
* @param stream The stream to be shown in the video element.
|
|
2828
|
-
* @param decodeFn A callback for the decode method.
|
|
2829
|
-
*/
|
|
2830
|
-
BrowserCodeReader.prototype.attachStreamToVideo = function (stream, videoSource) {
|
|
2831
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2832
|
-
var videoElement;
|
|
2833
|
-
return __generator(this, function (_a) {
|
|
2834
|
-
switch (_a.label) {
|
|
2835
|
-
case 0:
|
|
2836
|
-
videoElement = this.prepareVideoElement(videoSource);
|
|
2837
|
-
this.addVideoSource(videoElement, stream);
|
|
2838
|
-
this.videoElement = videoElement;
|
|
2839
|
-
this.stream = stream;
|
|
2840
|
-
return [4 /*yield*/, this.playVideoOnLoadAsync(videoElement)];
|
|
2841
|
-
case 1:
|
|
2842
|
-
_a.sent();
|
|
2843
|
-
return [2 /*return*/, videoElement];
|
|
2844
|
-
}
|
|
2845
|
-
});
|
|
2846
|
-
});
|
|
2847
|
-
};
|
|
2848
|
-
/**
|
|
2849
|
-
*
|
|
2850
|
-
* @param videoElement
|
|
2851
|
-
*/
|
|
2852
|
-
BrowserCodeReader.prototype.playVideoOnLoadAsync = function (videoElement) {
|
|
2853
|
-
var _this = this;
|
|
2854
|
-
return new Promise(function (resolve, reject) { return _this.playVideoOnLoad(videoElement, function () { return resolve(); }); });
|
|
2855
|
-
};
|
|
2856
|
-
/**
|
|
2857
|
-
* Binds listeners and callbacks to the videoElement.
|
|
2858
|
-
*
|
|
2859
|
-
* @param element
|
|
2860
|
-
* @param callbackFn
|
|
2861
|
-
*/
|
|
2862
|
-
BrowserCodeReader.prototype.playVideoOnLoad = function (element, callbackFn) {
|
|
2863
|
-
var _this = this;
|
|
2864
|
-
this.videoEndedListener = function () { return _this.stopStreams(); };
|
|
2865
|
-
this.videoCanPlayListener = function () { return _this.tryPlayVideo(element); };
|
|
2866
|
-
element.addEventListener('ended', this.videoEndedListener);
|
|
2867
|
-
element.addEventListener('canplay', this.videoCanPlayListener);
|
|
2868
|
-
element.addEventListener('playing', callbackFn);
|
|
2869
|
-
// if canplay was already fired, we won't know when to play, so just give it a try
|
|
2870
|
-
this.tryPlayVideo(element);
|
|
2871
|
-
};
|
|
2872
|
-
/**
|
|
2873
|
-
* Checks if the given video element is currently playing.
|
|
2874
|
-
*/
|
|
2875
|
-
BrowserCodeReader.prototype.isVideoPlaying = function (video) {
|
|
2876
|
-
return video.currentTime > 0 && !video.paused && !video.ended && video.readyState > 2;
|
|
2877
|
-
};
|
|
2878
|
-
/**
|
|
2879
|
-
* Just tries to play the video and logs any errors.
|
|
2880
|
-
* The play call is only made is the video is not already playing.
|
|
2881
|
-
*/
|
|
2882
|
-
BrowserCodeReader.prototype.tryPlayVideo = function (videoElement) {
|
|
2883
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2884
|
-
var _a;
|
|
2885
|
-
return __generator(this, function (_b) {
|
|
2886
|
-
switch (_b.label) {
|
|
2887
|
-
case 0:
|
|
2888
|
-
if (this.isVideoPlaying(videoElement)) {
|
|
2889
|
-
console.warn('Trying to play video that is already playing.');
|
|
2890
|
-
return [2 /*return*/];
|
|
2891
|
-
}
|
|
2892
|
-
_b.label = 1;
|
|
2893
|
-
case 1:
|
|
2894
|
-
_b.trys.push([1, 3, , 4]);
|
|
2895
|
-
return [4 /*yield*/, videoElement.play()];
|
|
2896
|
-
case 2:
|
|
2897
|
-
_b.sent();
|
|
2898
|
-
return [3 /*break*/, 4];
|
|
2899
|
-
case 3:
|
|
2900
|
-
_a = _b.sent();
|
|
2901
|
-
console.warn('It was not possible to play the video.');
|
|
2902
|
-
return [3 /*break*/, 4];
|
|
2903
|
-
case 4: return [2 /*return*/];
|
|
2904
|
-
}
|
|
2905
|
-
});
|
|
2906
|
-
});
|
|
2907
|
-
};
|
|
2908
|
-
/**
|
|
2909
|
-
* Searches and validates a media element.
|
|
2910
|
-
*/
|
|
2911
|
-
BrowserCodeReader.prototype.getMediaElement = function (mediaElementId, type) {
|
|
2912
|
-
var mediaElement = document.getElementById(mediaElementId);
|
|
2913
|
-
if (!mediaElement) {
|
|
2914
|
-
throw new _core_ArgumentException__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]("element with id '" + mediaElementId + "' not found");
|
|
2915
|
-
}
|
|
2916
|
-
if (mediaElement.nodeName.toLowerCase() !== type.toLowerCase()) {
|
|
2917
|
-
throw new _core_ArgumentException__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]("element with id '" + mediaElementId + "' must be an " + type + " element");
|
|
2918
|
-
}
|
|
2919
|
-
return mediaElement;
|
|
2920
|
-
};
|
|
2921
|
-
/**
|
|
2922
|
-
* Decodes the barcode from an image.
|
|
2923
|
-
*
|
|
2924
|
-
* @param {(string|HTMLImageElement)} [source] The image element that can be either an element id or the element itself. Can be undefined in which case the decoding will be done from the imageUrl parameter.
|
|
2925
|
-
* @param {string} [url]
|
|
2926
|
-
* @returns {Promise<Result>} The decoding result.
|
|
2927
|
-
*
|
|
2928
|
-
* @memberOf BrowserCodeReader
|
|
2929
|
-
*/
|
|
2930
|
-
BrowserCodeReader.prototype.decodeFromImage = function (source, url) {
|
|
2931
|
-
if (!source && !url) {
|
|
2932
|
-
throw new _core_ArgumentException__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]('either imageElement with a src set or an url must be provided');
|
|
2933
|
-
}
|
|
2934
|
-
if (url && !source) {
|
|
2935
|
-
return this.decodeFromImageUrl(url);
|
|
2936
|
-
}
|
|
2937
|
-
return this.decodeFromImageElement(source);
|
|
2938
|
-
};
|
|
2939
|
-
/**
|
|
2940
|
-
* Decodes the barcode from a video.
|
|
2941
|
-
*
|
|
2942
|
-
* @param {(string|HTMLImageElement)} [source] The image element that can be either an element id or the element itself. Can be undefined in which case the decoding will be done from the imageUrl parameter.
|
|
2943
|
-
* @param {string} [url]
|
|
2944
|
-
* @returns {Promise<Result>} The decoding result.
|
|
2945
|
-
*
|
|
2946
|
-
* @memberOf BrowserCodeReader
|
|
2947
|
-
*/
|
|
2948
|
-
BrowserCodeReader.prototype.decodeFromVideo = function (source, url) {
|
|
2949
|
-
if (!source && !url) {
|
|
2950
|
-
throw new _core_ArgumentException__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]('Either an element with a src set or an URL must be provided');
|
|
2951
|
-
}
|
|
2952
|
-
if (url && !source) {
|
|
2953
|
-
return this.decodeFromVideoUrl(url);
|
|
2954
|
-
}
|
|
2955
|
-
return this.decodeFromVideoElement(source);
|
|
2956
|
-
};
|
|
2957
|
-
/**
|
|
2958
|
-
* Decodes continuously the barcode from a video.
|
|
2959
|
-
*
|
|
2960
|
-
* @param {(string|HTMLImageElement)} [source] The image element that can be either an element id or the element itself. Can be undefined in which case the decoding will be done from the imageUrl parameter.
|
|
2961
|
-
* @param {string} [url]
|
|
2962
|
-
* @returns {Promise<Result>} The decoding result.
|
|
2963
|
-
*
|
|
2964
|
-
* @memberOf BrowserCodeReader
|
|
2965
|
-
*
|
|
2966
|
-
* @experimental
|
|
2967
|
-
*/
|
|
2968
|
-
BrowserCodeReader.prototype.decodeFromVideoContinuously = function (source, url, callbackFn) {
|
|
2969
|
-
if (undefined === source && undefined === url) {
|
|
2970
|
-
throw new _core_ArgumentException__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]('Either an element with a src set or an URL must be provided');
|
|
2971
|
-
}
|
|
2972
|
-
if (url && !source) {
|
|
2973
|
-
return this.decodeFromVideoUrlContinuously(url, callbackFn);
|
|
2974
|
-
}
|
|
2975
|
-
return this.decodeFromVideoElementContinuously(source, callbackFn);
|
|
2976
|
-
};
|
|
2977
|
-
/**
|
|
2978
|
-
* Decodes something from an image HTML element.
|
|
2979
|
-
*/
|
|
2980
|
-
BrowserCodeReader.prototype.decodeFromImageElement = function (source) {
|
|
2981
|
-
if (!source) {
|
|
2982
|
-
throw new _core_ArgumentException__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]('An image element must be provided.');
|
|
2983
|
-
}
|
|
2984
|
-
this.reset();
|
|
2985
|
-
var element = this.prepareImageElement(source);
|
|
2986
|
-
this.imageElement = element;
|
|
2987
|
-
var task;
|
|
2988
|
-
if (this.isImageLoaded(element)) {
|
|
2989
|
-
task = this.decodeOnce(element, false, true);
|
|
2990
|
-
}
|
|
2991
|
-
else {
|
|
2992
|
-
task = this._decodeOnLoadImage(element);
|
|
2993
|
-
}
|
|
2994
|
-
return task;
|
|
2995
|
-
};
|
|
2996
|
-
/**
|
|
2997
|
-
* Decodes something from an image HTML element.
|
|
2998
|
-
*/
|
|
2999
|
-
BrowserCodeReader.prototype.decodeFromVideoElement = function (source) {
|
|
3000
|
-
var element = this._decodeFromVideoElementSetup(source);
|
|
3001
|
-
return this._decodeOnLoadVideo(element);
|
|
3002
|
-
};
|
|
3003
|
-
/**
|
|
3004
|
-
* Decodes something from an image HTML element.
|
|
3005
|
-
*/
|
|
3006
|
-
BrowserCodeReader.prototype.decodeFromVideoElementContinuously = function (source, callbackFn) {
|
|
3007
|
-
var element = this._decodeFromVideoElementSetup(source);
|
|
3008
|
-
return this._decodeOnLoadVideoContinuously(element, callbackFn);
|
|
3009
|
-
};
|
|
3010
|
-
/**
|
|
3011
|
-
* Sets up the video source so it can be decoded when loaded.
|
|
3012
|
-
*
|
|
3013
|
-
* @param source The video source element.
|
|
3014
|
-
*/
|
|
3015
|
-
BrowserCodeReader.prototype._decodeFromVideoElementSetup = function (source) {
|
|
3016
|
-
if (!source) {
|
|
3017
|
-
throw new _core_ArgumentException__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]('A video element must be provided.');
|
|
3018
|
-
}
|
|
3019
|
-
this.reset();
|
|
3020
|
-
var element = this.prepareVideoElement(source);
|
|
3021
|
-
// defines the video element before starts decoding
|
|
3022
|
-
this.videoElement = element;
|
|
3023
|
-
return element;
|
|
3024
|
-
};
|
|
3025
|
-
/**
|
|
3026
|
-
* Decodes an image from a URL.
|
|
3027
|
-
*/
|
|
3028
|
-
BrowserCodeReader.prototype.decodeFromImageUrl = function (url) {
|
|
3029
|
-
if (!url) {
|
|
3030
|
-
throw new _core_ArgumentException__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]('An URL must be provided.');
|
|
3031
|
-
}
|
|
3032
|
-
this.reset();
|
|
3033
|
-
var element = this.prepareImageElement();
|
|
3034
|
-
this.imageElement = element;
|
|
3035
|
-
var decodeTask = this._decodeOnLoadImage(element);
|
|
3036
|
-
element.src = url;
|
|
3037
|
-
return decodeTask;
|
|
3038
|
-
};
|
|
3039
|
-
/**
|
|
3040
|
-
* Decodes an image from a URL.
|
|
3041
|
-
*/
|
|
3042
|
-
BrowserCodeReader.prototype.decodeFromVideoUrl = function (url) {
|
|
3043
|
-
if (!url) {
|
|
3044
|
-
throw new _core_ArgumentException__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]('An URL must be provided.');
|
|
3045
|
-
}
|
|
3046
|
-
this.reset();
|
|
3047
|
-
// creates a new element
|
|
3048
|
-
var element = this.prepareVideoElement();
|
|
3049
|
-
var decodeTask = this.decodeFromVideoElement(element);
|
|
3050
|
-
element.src = url;
|
|
3051
|
-
return decodeTask;
|
|
3052
|
-
};
|
|
3053
|
-
/**
|
|
3054
|
-
* Decodes an image from a URL.
|
|
3055
|
-
*
|
|
3056
|
-
* @experimental
|
|
3057
|
-
*/
|
|
3058
|
-
BrowserCodeReader.prototype.decodeFromVideoUrlContinuously = function (url, callbackFn) {
|
|
3059
|
-
if (!url) {
|
|
3060
|
-
throw new _core_ArgumentException__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]('An URL must be provided.');
|
|
3061
|
-
}
|
|
3062
|
-
this.reset();
|
|
3063
|
-
// creates a new element
|
|
3064
|
-
var element = this.prepareVideoElement();
|
|
3065
|
-
var decodeTask = this.decodeFromVideoElementContinuously(element, callbackFn);
|
|
3066
|
-
element.src = url;
|
|
3067
|
-
return decodeTask;
|
|
3068
|
-
};
|
|
3069
|
-
BrowserCodeReader.prototype._decodeOnLoadImage = function (element) {
|
|
3070
|
-
var _this = this;
|
|
3071
|
-
return new Promise(function (resolve, reject) {
|
|
3072
|
-
_this.imageLoadedListener = function () { return _this.decodeOnce(element, false, true).then(resolve, reject); };
|
|
3073
|
-
element.addEventListener('load', _this.imageLoadedListener);
|
|
3074
|
-
});
|
|
3075
|
-
};
|
|
3076
|
-
BrowserCodeReader.prototype._decodeOnLoadVideo = function (videoElement) {
|
|
3077
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3078
|
-
return __generator(this, function (_a) {
|
|
3079
|
-
switch (_a.label) {
|
|
3080
|
-
case 0:
|
|
3081
|
-
// plays the video
|
|
3082
|
-
return [4 /*yield*/, this.playVideoOnLoadAsync(videoElement)];
|
|
3083
|
-
case 1:
|
|
3084
|
-
// plays the video
|
|
3085
|
-
_a.sent();
|
|
3086
|
-
return [4 /*yield*/, this.decodeOnce(videoElement)];
|
|
3087
|
-
case 2:
|
|
3088
|
-
// starts decoding after played the video
|
|
3089
|
-
return [2 /*return*/, _a.sent()];
|
|
3090
|
-
}
|
|
3091
|
-
});
|
|
3092
|
-
});
|
|
3093
|
-
};
|
|
3094
|
-
BrowserCodeReader.prototype._decodeOnLoadVideoContinuously = function (videoElement, callbackFn) {
|
|
3095
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3096
|
-
return __generator(this, function (_a) {
|
|
3097
|
-
switch (_a.label) {
|
|
3098
|
-
case 0:
|
|
3099
|
-
// plays the video
|
|
3100
|
-
return [4 /*yield*/, this.playVideoOnLoadAsync(videoElement)];
|
|
3101
|
-
case 1:
|
|
3102
|
-
// plays the video
|
|
3103
|
-
_a.sent();
|
|
3104
|
-
// starts decoding after played the video
|
|
3105
|
-
this.decodeContinuously(videoElement, callbackFn);
|
|
3106
|
-
return [2 /*return*/];
|
|
3107
|
-
}
|
|
3108
|
-
});
|
|
3109
|
-
});
|
|
3110
|
-
};
|
|
3111
|
-
BrowserCodeReader.prototype.isImageLoaded = function (img) {
|
|
3112
|
-
// During the onload event, IE correctly identifies any images that
|
|
3113
|
-
// weren’t downloaded as not complete. Others should too. Gecko-based
|
|
3114
|
-
// browsers act like NS4 in that they report this incorrectly.
|
|
3115
|
-
if (!img.complete) {
|
|
3116
|
-
return false;
|
|
3117
|
-
}
|
|
3118
|
-
// However, they do have two very useful properties: naturalWidth and
|
|
3119
|
-
// naturalHeight. These give the true size of the image. If it failed
|
|
3120
|
-
// to load, either of these should be zero.
|
|
3121
|
-
if (img.naturalWidth === 0) {
|
|
3122
|
-
return false;
|
|
3123
|
-
}
|
|
3124
|
-
// No other way of checking: assume it’s ok.
|
|
3125
|
-
return true;
|
|
3126
|
-
};
|
|
3127
|
-
BrowserCodeReader.prototype.prepareImageElement = function (imageSource) {
|
|
3128
|
-
var imageElement;
|
|
3129
|
-
if (typeof imageSource === 'undefined') {
|
|
3130
|
-
imageElement = document.createElement('img');
|
|
3131
|
-
imageElement.width = 200;
|
|
3132
|
-
imageElement.height = 200;
|
|
3133
|
-
}
|
|
3134
|
-
if (typeof imageSource === 'string') {
|
|
3135
|
-
imageElement = this.getMediaElement(imageSource, 'img');
|
|
3136
|
-
}
|
|
3137
|
-
if (imageSource instanceof HTMLImageElement) {
|
|
3138
|
-
imageElement = imageSource;
|
|
3139
|
-
}
|
|
3140
|
-
return imageElement;
|
|
3141
|
-
};
|
|
3142
|
-
/**
|
|
3143
|
-
* Sets a HTMLVideoElement for scanning or creates a new one.
|
|
3144
|
-
*
|
|
3145
|
-
* @param videoSource The HTMLVideoElement to be set.
|
|
3146
|
-
*/
|
|
3147
|
-
BrowserCodeReader.prototype.prepareVideoElement = function (videoSource) {
|
|
3148
|
-
var videoElement;
|
|
3149
|
-
if (!videoSource && typeof document !== 'undefined') {
|
|
3150
|
-
videoElement = document.createElement('video');
|
|
3151
|
-
videoElement.width = 200;
|
|
3152
|
-
videoElement.height = 200;
|
|
3153
|
-
}
|
|
3154
|
-
if (typeof videoSource === 'string') {
|
|
3155
|
-
videoElement = this.getMediaElement(videoSource, 'video');
|
|
3156
|
-
}
|
|
3157
|
-
if (videoSource instanceof HTMLVideoElement) {
|
|
3158
|
-
videoElement = videoSource;
|
|
3159
|
-
}
|
|
3160
|
-
// Needed for iOS 11
|
|
3161
|
-
videoElement.setAttribute('autoplay', 'true');
|
|
3162
|
-
videoElement.setAttribute('muted', 'true');
|
|
3163
|
-
videoElement.setAttribute('playsinline', 'true');
|
|
3164
|
-
return videoElement;
|
|
3165
|
-
};
|
|
3166
|
-
/**
|
|
3167
|
-
* Tries to decode from the video input until it finds some value.
|
|
3168
|
-
*/
|
|
3169
|
-
BrowserCodeReader.prototype.decodeOnce = function (element, retryIfNotFound, retryIfChecksumOrFormatError) {
|
|
3170
|
-
var _this = this;
|
|
3171
|
-
if (retryIfNotFound === void 0) { retryIfNotFound = true; }
|
|
3172
|
-
if (retryIfChecksumOrFormatError === void 0) { retryIfChecksumOrFormatError = true; }
|
|
3173
|
-
this._stopAsyncDecode = false;
|
|
3174
|
-
var loop = function (resolve, reject) {
|
|
3175
|
-
if (_this._stopAsyncDecode) {
|
|
3176
|
-
reject(new _core_NotFoundException__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"]('Video stream has ended before any code could be detected.'));
|
|
3177
|
-
_this._stopAsyncDecode = undefined;
|
|
3178
|
-
return;
|
|
3179
|
-
}
|
|
3180
|
-
try {
|
|
3181
|
-
var result = _this.decode(element);
|
|
3182
|
-
resolve(result);
|
|
3183
|
-
}
|
|
3184
|
-
catch (e) {
|
|
3185
|
-
var ifNotFound = retryIfNotFound && e instanceof _core_NotFoundException__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"];
|
|
3186
|
-
var isChecksumOrFormatError = e instanceof _core_ChecksumException__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"] || e instanceof _core_FormatException__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"];
|
|
3187
|
-
var ifChecksumOrFormat = isChecksumOrFormatError && retryIfChecksumOrFormatError;
|
|
3188
|
-
if (ifNotFound || ifChecksumOrFormat) {
|
|
3189
|
-
// trying again
|
|
3190
|
-
return setTimeout(loop, _this._timeBetweenDecodingAttempts, resolve, reject);
|
|
3191
|
-
}
|
|
3192
|
-
reject(e);
|
|
3193
|
-
}
|
|
3194
|
-
};
|
|
3195
|
-
return new Promise(function (resolve, reject) { return loop(resolve, reject); });
|
|
3196
|
-
};
|
|
3197
|
-
/**
|
|
3198
|
-
* Continuously decodes from video input.
|
|
3199
|
-
*/
|
|
3200
|
-
BrowserCodeReader.prototype.decodeContinuously = function (element, callbackFn) {
|
|
3201
|
-
var _this = this;
|
|
3202
|
-
this._stopContinuousDecode = false;
|
|
3203
|
-
var loop = function () {
|
|
3204
|
-
if (_this._stopContinuousDecode) {
|
|
3205
|
-
_this._stopContinuousDecode = undefined;
|
|
3206
|
-
return;
|
|
3207
|
-
}
|
|
3208
|
-
try {
|
|
3209
|
-
var result = _this.decode(element);
|
|
3210
|
-
callbackFn(result, null);
|
|
3211
|
-
setTimeout(loop, _this.timeBetweenScansMillis);
|
|
3212
|
-
}
|
|
3213
|
-
catch (e) {
|
|
3214
|
-
callbackFn(null, e);
|
|
3215
|
-
var isChecksumOrFormatError = e instanceof _core_ChecksumException__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"] || e instanceof _core_FormatException__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"];
|
|
3216
|
-
var isNotFound = e instanceof _core_NotFoundException__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"];
|
|
3217
|
-
if (isChecksumOrFormatError || isNotFound) {
|
|
3218
|
-
// trying again
|
|
3219
|
-
setTimeout(loop, _this._timeBetweenDecodingAttempts);
|
|
3220
|
-
}
|
|
3221
|
-
}
|
|
3222
|
-
};
|
|
3223
|
-
loop();
|
|
3224
|
-
};
|
|
3225
|
-
/**
|
|
3226
|
-
* Gets the BinaryBitmap for ya! (and decodes it)
|
|
3227
|
-
*/
|
|
3228
|
-
BrowserCodeReader.prototype.decode = function (element) {
|
|
3229
|
-
// get binary bitmap for decode function
|
|
3230
|
-
var binaryBitmap = this.createBinaryBitmap(element);
|
|
3231
|
-
return this.decodeBitmap(binaryBitmap);
|
|
3232
|
-
};
|
|
3233
|
-
BrowserCodeReader.prototype._isHTMLVideoElement = function (mediaElement) {
|
|
3234
|
-
var potentialVideo = mediaElement;
|
|
3235
|
-
return potentialVideo.videoWidth !== 0;
|
|
3236
|
-
};
|
|
3237
|
-
/**
|
|
3238
|
-
* Creates a binaryBitmap based in some image source.
|
|
3239
|
-
*
|
|
3240
|
-
* @param mediaElement HTML element containing drawable image source.
|
|
3241
|
-
*/
|
|
3242
|
-
BrowserCodeReader.prototype.createBinaryBitmap = function (mediaElement) {
|
|
3243
|
-
var ctx = this.getCaptureCanvasContext(mediaElement);
|
|
3244
|
-
if (this._isHTMLVideoElement(mediaElement)) {
|
|
3245
|
-
this.drawFrameOnCanvas(mediaElement);
|
|
3246
|
-
}
|
|
3247
|
-
else {
|
|
3248
|
-
this.drawImageOnCanvas(mediaElement);
|
|
3249
|
-
}
|
|
3250
|
-
var canvas = this.getCaptureCanvas(mediaElement);
|
|
3251
|
-
var luminanceSource = new _HTMLCanvasElementLuminanceSource__WEBPACK_IMPORTED_MODULE_6__[/* HTMLCanvasElementLuminanceSource */ "a"](canvas);
|
|
3252
|
-
var hybridBinarizer = new _core_common_HybridBinarizer__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"](luminanceSource);
|
|
3253
|
-
return new _core_BinaryBitmap__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"](hybridBinarizer);
|
|
3254
|
-
};
|
|
3255
|
-
/**
|
|
3256
|
-
*
|
|
3257
|
-
*/
|
|
3258
|
-
BrowserCodeReader.prototype.getCaptureCanvasContext = function (mediaElement) {
|
|
3259
|
-
if (!this.captureCanvasContext) {
|
|
3260
|
-
var elem = this.getCaptureCanvas(mediaElement);
|
|
3261
|
-
var ctx = elem.getContext('2d');
|
|
3262
|
-
this.captureCanvasContext = ctx;
|
|
3263
|
-
}
|
|
3264
|
-
return this.captureCanvasContext;
|
|
3265
|
-
};
|
|
3266
|
-
/**
|
|
3267
|
-
*
|
|
3268
|
-
*/
|
|
3269
|
-
BrowserCodeReader.prototype.getCaptureCanvas = function (mediaElement) {
|
|
3270
|
-
if (!this.captureCanvas) {
|
|
3271
|
-
var elem = this.createCaptureCanvas(mediaElement);
|
|
3272
|
-
this.captureCanvas = elem;
|
|
3273
|
-
}
|
|
3274
|
-
return this.captureCanvas;
|
|
3275
|
-
};
|
|
3276
|
-
/**
|
|
3277
|
-
* Overwriting this allows you to manipulate the next frame in anyway you want before decode.
|
|
3278
|
-
*/
|
|
3279
|
-
BrowserCodeReader.prototype.drawFrameOnCanvas = function (srcElement, dimensions, canvasElementContext) {
|
|
3280
|
-
if (dimensions === void 0) { dimensions = { sx: 0, sy: 0, sWidth: srcElement.videoWidth, sHeight: srcElement.videoHeight, dx: 0, dy: 0, dWidth: srcElement.videoWidth, dHeight: srcElement.videoHeight }; }
|
|
3281
|
-
if (canvasElementContext === void 0) { canvasElementContext = this.captureCanvasContext; }
|
|
3282
|
-
canvasElementContext.drawImage(srcElement, dimensions.sx, dimensions.sy, dimensions.sWidth, dimensions.sHeight, dimensions.dx, dimensions.dy, dimensions.dWidth, dimensions.dHeight);
|
|
3283
|
-
};
|
|
3284
|
-
/**
|
|
3285
|
-
* Ovewriting this allows you to manipulate the snapshot image in anyway you want before decode.
|
|
3286
|
-
*/
|
|
3287
|
-
BrowserCodeReader.prototype.drawImageOnCanvas = function (srcElement, dimensions, canvasElementContext) {
|
|
3288
|
-
if (dimensions === void 0) { dimensions = { sx: 0, sy: 0, sWidth: srcElement.naturalWidth, sHeight: srcElement.naturalHeight, dx: 0, dy: 0, dWidth: srcElement.naturalWidth, dHeight: srcElement.naturalHeight }; }
|
|
3289
|
-
if (canvasElementContext === void 0) { canvasElementContext = this.captureCanvasContext; }
|
|
3290
|
-
canvasElementContext.drawImage(srcElement, dimensions.sx, dimensions.sy, dimensions.sWidth, dimensions.sHeight, dimensions.dx, dimensions.dy, dimensions.dWidth, dimensions.dHeight);
|
|
3291
|
-
};
|
|
3292
|
-
/**
|
|
3293
|
-
* Call the encapsulated readers decode
|
|
3294
|
-
*/
|
|
3295
|
-
BrowserCodeReader.prototype.decodeBitmap = function (binaryBitmap) {
|
|
3296
|
-
return this.reader.decode(binaryBitmap, this._hints);
|
|
3297
|
-
};
|
|
3298
|
-
/**
|
|
3299
|
-
* 🖌 Prepares the canvas for capture and scan frames.
|
|
3300
|
-
*/
|
|
3301
|
-
BrowserCodeReader.prototype.createCaptureCanvas = function (mediaElement) {
|
|
3302
|
-
if (typeof document === 'undefined') {
|
|
3303
|
-
this._destroyCaptureCanvas();
|
|
3304
|
-
return null;
|
|
3305
|
-
}
|
|
3306
|
-
var canvasElement = document.createElement('canvas');
|
|
3307
|
-
var width;
|
|
3308
|
-
var height;
|
|
3309
|
-
if (typeof mediaElement !== 'undefined') {
|
|
3310
|
-
if (mediaElement instanceof HTMLVideoElement) {
|
|
3311
|
-
width = mediaElement.videoWidth;
|
|
3312
|
-
height = mediaElement.videoHeight;
|
|
3313
|
-
}
|
|
3314
|
-
else if (mediaElement instanceof HTMLImageElement) {
|
|
3315
|
-
width = mediaElement.naturalWidth || mediaElement.width;
|
|
3316
|
-
height = mediaElement.naturalHeight || mediaElement.height;
|
|
3317
|
-
}
|
|
3318
|
-
}
|
|
3319
|
-
canvasElement.style.width = width + 'px';
|
|
3320
|
-
canvasElement.style.height = height + 'px';
|
|
3321
|
-
canvasElement.width = width;
|
|
3322
|
-
canvasElement.height = height;
|
|
3323
|
-
return canvasElement;
|
|
3324
|
-
};
|
|
3325
|
-
/**
|
|
3326
|
-
* Stops the continuous scan and cleans the stream.
|
|
3327
|
-
*/
|
|
3328
|
-
BrowserCodeReader.prototype.stopStreams = function () {
|
|
3329
|
-
if (this.stream) {
|
|
3330
|
-
this.stream.getVideoTracks().forEach(function (t) { return t.stop(); });
|
|
3331
|
-
this.stream = undefined;
|
|
3332
|
-
}
|
|
3333
|
-
if (this._stopAsyncDecode === false) {
|
|
3334
|
-
this.stopAsyncDecode();
|
|
3335
|
-
}
|
|
3336
|
-
if (this._stopContinuousDecode === false) {
|
|
3337
|
-
this.stopContinuousDecode();
|
|
3338
|
-
}
|
|
3339
|
-
};
|
|
3340
|
-
/**
|
|
3341
|
-
* Resets the code reader to the initial state. Cancels any ongoing barcode scanning from video or camera.
|
|
3342
|
-
*
|
|
3343
|
-
* @memberOf BrowserCodeReader
|
|
3344
|
-
*/
|
|
3345
|
-
BrowserCodeReader.prototype.reset = function () {
|
|
3346
|
-
// stops the camera, preview and scan 🔴
|
|
3347
|
-
this.stopStreams();
|
|
3348
|
-
// clean and forget about HTML elements
|
|
3349
|
-
this._destroyVideoElement();
|
|
3350
|
-
this._destroyImageElement();
|
|
3351
|
-
this._destroyCaptureCanvas();
|
|
3352
|
-
};
|
|
3353
|
-
BrowserCodeReader.prototype._destroyVideoElement = function () {
|
|
3354
|
-
if (!this.videoElement) {
|
|
3355
|
-
return;
|
|
3356
|
-
}
|
|
3357
|
-
// first gives freedon to the element 🕊
|
|
3358
|
-
if (typeof this.videoEndedListener !== 'undefined') {
|
|
3359
|
-
this.videoElement.removeEventListener('ended', this.videoEndedListener);
|
|
3360
|
-
}
|
|
3361
|
-
if (typeof this.videoPlayingEventListener !== 'undefined') {
|
|
3362
|
-
this.videoElement.removeEventListener('playing', this.videoPlayingEventListener);
|
|
3363
|
-
}
|
|
3364
|
-
if (typeof this.videoCanPlayListener !== 'undefined') {
|
|
3365
|
-
this.videoElement.removeEventListener('loadedmetadata', this.videoCanPlayListener);
|
|
3366
|
-
}
|
|
3367
|
-
// then forgets about that element 😢
|
|
3368
|
-
this.cleanVideoSource(this.videoElement);
|
|
3369
|
-
this.videoElement = undefined;
|
|
3370
|
-
};
|
|
3371
|
-
BrowserCodeReader.prototype._destroyImageElement = function () {
|
|
3372
|
-
if (!this.imageElement) {
|
|
3373
|
-
return;
|
|
3374
|
-
}
|
|
3375
|
-
// first gives freedon to the element 🕊
|
|
3376
|
-
if (undefined !== this.imageLoadedListener) {
|
|
3377
|
-
this.imageElement.removeEventListener('load', this.imageLoadedListener);
|
|
3378
|
-
}
|
|
3379
|
-
// then forget about that element 😢
|
|
3380
|
-
this.imageElement.src = undefined;
|
|
3381
|
-
this.imageElement.removeAttribute('src');
|
|
3382
|
-
this.imageElement = undefined;
|
|
3383
|
-
};
|
|
3384
|
-
/**
|
|
3385
|
-
* Cleans canvas references 🖌
|
|
3386
|
-
*/
|
|
3387
|
-
BrowserCodeReader.prototype._destroyCaptureCanvas = function () {
|
|
3388
|
-
// then forget about that element 😢
|
|
3389
|
-
this.captureCanvasContext = undefined;
|
|
3390
|
-
this.captureCanvas = undefined;
|
|
3391
|
-
};
|
|
3392
|
-
/**
|
|
3393
|
-
* Defines what the videoElement src will be.
|
|
3394
|
-
*
|
|
3395
|
-
* @param videoElement
|
|
3396
|
-
* @param stream
|
|
3397
|
-
*/
|
|
3398
|
-
BrowserCodeReader.prototype.addVideoSource = function (videoElement, stream) {
|
|
3399
|
-
// Older browsers may not have `srcObject`
|
|
3400
|
-
try {
|
|
3401
|
-
// @note Throws Exception if interrupted by a new loaded request
|
|
3402
|
-
videoElement.srcObject = stream;
|
|
3403
|
-
}
|
|
3404
|
-
catch (err) {
|
|
3405
|
-
// @note Avoid using this in new browsers, as it is going away.
|
|
3406
|
-
videoElement.src = URL.createObjectURL(stream);
|
|
3407
|
-
}
|
|
3408
|
-
};
|
|
3409
|
-
/**
|
|
3410
|
-
* Unbinds a HTML video src property.
|
|
3411
|
-
*
|
|
3412
|
-
* @param videoElement
|
|
3413
|
-
*/
|
|
3414
|
-
BrowserCodeReader.prototype.cleanVideoSource = function (videoElement) {
|
|
3415
|
-
try {
|
|
3416
|
-
videoElement.srcObject = null;
|
|
3417
|
-
}
|
|
3418
|
-
catch (err) {
|
|
3419
|
-
videoElement.src = '';
|
|
3420
|
-
}
|
|
3421
|
-
this.videoElement.removeAttribute('src');
|
|
3422
|
-
};
|
|
3423
|
-
return BrowserCodeReader;
|
|
3424
|
-
}());
|
|
3425
|
-
|
|
3426
|
-
//# sourceMappingURL=BrowserCodeReader.js.map
|
|
3427
|
-
|
|
3428
|
-
/***/ }),
|
|
3429
|
-
|
|
3430
|
-
/***/ "f8c0":
|
|
3431
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3432
|
-
|
|
3433
|
-
"use strict";
|
|
3434
|
-
/* harmony import */ var _Exception__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d0b6");
|
|
3435
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
3436
|
-
var extendStatics = function (d, b) {
|
|
3437
|
-
extendStatics = Object.setPrototypeOf ||
|
|
3438
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
3439
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
3440
|
-
return extendStatics(d, b);
|
|
3441
|
-
};
|
|
3442
|
-
return function (d, b) {
|
|
3443
|
-
extendStatics(d, b);
|
|
3444
|
-
function __() { this.constructor = d; }
|
|
3445
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
3446
|
-
};
|
|
3447
|
-
})();
|
|
3448
|
-
|
|
3449
|
-
/**
|
|
3450
|
-
* Custom Error class of type Exception.
|
|
3451
|
-
*/
|
|
3452
|
-
var ArgumentException = /** @class */ (function (_super) {
|
|
3453
|
-
__extends(ArgumentException, _super);
|
|
3454
|
-
function ArgumentException() {
|
|
3455
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3456
|
-
}
|
|
3457
|
-
ArgumentException.kind = 'ArgumentException';
|
|
3458
|
-
return ArgumentException;
|
|
3459
|
-
}(_Exception__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]));
|
|
3460
|
-
/* harmony default export */ __webpack_exports__["a"] = (ArgumentException);
|
|
3461
|
-
//# sourceMappingURL=ArgumentException.js.map
|
|
3462
|
-
|
|
3463
|
-
/***/ }),
|
|
3464
|
-
|
|
3465
|
-
/***/ "fe96":
|
|
3466
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3467
|
-
|
|
3468
|
-
"use strict";
|
|
3469
|
-
/*
|
|
3470
|
-
* Copyright 2009 ZXing authors
|
|
3471
|
-
*
|
|
3472
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3473
|
-
* you may not use this file except in compliance with the License.
|
|
3474
|
-
* You may obtain a copy of the License at
|
|
3475
|
-
*
|
|
3476
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3477
|
-
*
|
|
3478
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
3479
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3480
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3481
|
-
* See the License for the specific language governing permissions and
|
|
3482
|
-
* limitations under the License.
|
|
3483
|
-
*/
|
|
3484
|
-
/*namespace com.google.zxing {*/
|
|
3485
|
-
/**
|
|
3486
|
-
* Encapsulates a type of hint that a caller may pass to a barcode reader to help it
|
|
3487
|
-
* more quickly or accurately decode it. It is up to implementations to decide what,
|
|
3488
|
-
* if anything, to do with the information that is supplied.
|
|
3489
|
-
*
|
|
3490
|
-
* @author Sean Owen
|
|
3491
|
-
* @author dswitkin@google.com (Daniel Switkin)
|
|
3492
|
-
* @see Reader#decode(BinaryBitmap,java.util.Map)
|
|
3493
|
-
*/
|
|
3494
|
-
var DecodeHintType;
|
|
3495
|
-
(function (DecodeHintType) {
|
|
3496
|
-
/**
|
|
3497
|
-
* Unspecified, application-specific hint. Maps to an unspecified {@link Object}.
|
|
3498
|
-
*/
|
|
3499
|
-
DecodeHintType[DecodeHintType["OTHER"] = 0] = "OTHER"; /*(Object.class)*/
|
|
3500
|
-
/**
|
|
3501
|
-
* Image is a pure monochrome image of a barcode. Doesn't matter what it maps to;
|
|
3502
|
-
* use {@link Boolean#TRUE}.
|
|
3503
|
-
*/
|
|
3504
|
-
DecodeHintType[DecodeHintType["PURE_BARCODE"] = 1] = "PURE_BARCODE"; /*(Void.class)*/
|
|
3505
|
-
/**
|
|
3506
|
-
* Image is known to be of one of a few possible formats.
|
|
3507
|
-
* Maps to a {@link List} of {@link BarcodeFormat}s.
|
|
3508
|
-
*/
|
|
3509
|
-
DecodeHintType[DecodeHintType["POSSIBLE_FORMATS"] = 2] = "POSSIBLE_FORMATS"; /*(List.class)*/
|
|
3510
|
-
/**
|
|
3511
|
-
* Spend more time to try to find a barcode; optimize for accuracy, not speed.
|
|
3512
|
-
* Doesn't matter what it maps to; use {@link Boolean#TRUE}.
|
|
3513
|
-
*/
|
|
3514
|
-
DecodeHintType[DecodeHintType["TRY_HARDER"] = 3] = "TRY_HARDER"; /*(Void.class)*/
|
|
3515
|
-
/**
|
|
3516
|
-
* Specifies what character encoding to use when decoding, where applicable (type String)
|
|
3517
|
-
*/
|
|
3518
|
-
DecodeHintType[DecodeHintType["CHARACTER_SET"] = 4] = "CHARACTER_SET"; /*(String.class)*/
|
|
3519
|
-
/**
|
|
3520
|
-
* Allowed lengths of encoded data -- reject anything else. Maps to an {@code Int32Array}.
|
|
3521
|
-
*/
|
|
3522
|
-
DecodeHintType[DecodeHintType["ALLOWED_LENGTHS"] = 5] = "ALLOWED_LENGTHS"; /*(Int32Array.class)*/
|
|
3523
|
-
/**
|
|
3524
|
-
* Assume Code 39 codes employ a check digit. Doesn't matter what it maps to;
|
|
3525
|
-
* use {@link Boolean#TRUE}.
|
|
3526
|
-
*/
|
|
3527
|
-
DecodeHintType[DecodeHintType["ASSUME_CODE_39_CHECK_DIGIT"] = 6] = "ASSUME_CODE_39_CHECK_DIGIT"; /*(Void.class)*/
|
|
3528
|
-
/**
|
|
3529
|
-
* Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed.
|
|
3530
|
-
* For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to;
|
|
3531
|
-
* use {@link Boolean#TRUE}.
|
|
3532
|
-
*/
|
|
3533
|
-
DecodeHintType[DecodeHintType["ASSUME_GS1"] = 7] = "ASSUME_GS1"; /*(Void.class)*/
|
|
3534
|
-
/**
|
|
3535
|
-
* If true, return the start and end digits in a Codabar barcode instead of stripping them. They
|
|
3536
|
-
* are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them
|
|
3537
|
-
* to not be. Doesn't matter what it maps to; use {@link Boolean#TRUE}.
|
|
3538
|
-
*/
|
|
3539
|
-
DecodeHintType[DecodeHintType["RETURN_CODABAR_START_END"] = 8] = "RETURN_CODABAR_START_END"; /*(Void.class)*/
|
|
3540
|
-
/**
|
|
3541
|
-
* The caller needs to be notified via callback when a possible {@link ResultPoint}
|
|
3542
|
-
* is found. Maps to a {@link ResultPointCallback}.
|
|
3543
|
-
*/
|
|
3544
|
-
DecodeHintType[DecodeHintType["NEED_RESULT_POINT_CALLBACK"] = 9] = "NEED_RESULT_POINT_CALLBACK"; /*(ResultPointCallback.class)*/
|
|
3545
|
-
/**
|
|
3546
|
-
* Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this.
|
|
3547
|
-
* Maps to an {@code Int32Array} of the allowed extension lengths, for example [2], [5], or [2, 5].
|
|
3548
|
-
* If it is optional to have an extension, do not set this hint. If this is set,
|
|
3549
|
-
* and a UPC or EAN barcode is found but an extension is not, then no result will be returned
|
|
3550
|
-
* at all.
|
|
3551
|
-
*/
|
|
3552
|
-
DecodeHintType[DecodeHintType["ALLOWED_EAN_EXTENSIONS"] = 10] = "ALLOWED_EAN_EXTENSIONS"; /*(Int32Array.class)*/
|
|
3553
|
-
// End of enumeration values.
|
|
3554
|
-
/**
|
|
3555
|
-
* Data type the hint is expecting.
|
|
3556
|
-
* Among the possible values the {@link Void} stands out as being used for
|
|
3557
|
-
* hints that do not expect a value to be supplied (flag hints). Such hints
|
|
3558
|
-
* will possibly have their value ignored, or replaced by a
|
|
3559
|
-
* {@link Boolean#TRUE}. Hint suppliers should probably use
|
|
3560
|
-
* {@link Boolean#TRUE} as directed by the actual hint documentation.
|
|
3561
|
-
*/
|
|
3562
|
-
// private valueType: Class<?>
|
|
3563
|
-
// DecodeHintType(valueType: Class<?>) {
|
|
3564
|
-
// this.valueType = valueType
|
|
3565
|
-
// }
|
|
3566
|
-
// public getValueType(): Class<?> {
|
|
3567
|
-
// return valueType
|
|
3568
|
-
// }
|
|
3569
|
-
})(DecodeHintType || (DecodeHintType = {}));
|
|
3570
|
-
/* harmony default export */ __webpack_exports__["a"] = (DecodeHintType);
|
|
3571
|
-
//# sourceMappingURL=DecodeHintType.js.map
|
|
3572
|
-
|
|
3573
|
-
/***/ })
|
|
3574
|
-
|
|
3575
|
-
}]);
|
|
3576
|
-
//# sourceMappingURL=super-ui.common.yarn.zxing~b49f3034.js.map
|